Fix packaging problems for Debian

This patch solves three issues with Debian packaging / apt:

o When building 'testing' only default apt sources is
  included - backports, updates and security are skipped because they
  do not exists.

o The default release for Debian was `unstable`: this is now fixed to
  `stable`.

o Starting a Debian Stretch VM that was build with diskimage-builder
  does not work, because some mandatory packages are missing.
  This patch fixes this problem: it adds the mandatory packages and
  the test case.

Change-Id: If49b5b162c4da1e074e9b19324839bc59d87dc57
Signed-off-by: Andreas Florath <andreas@florath.net>
This commit is contained in:
Andreas Florath 2016-07-17 19:03:55 +02:00
parent b8d10afd8f
commit a8c8c61711
10 changed files with 30 additions and 3 deletions

View File

@ -1 +1,2 @@
debootstrap debootstrap
pkg-map

View File

@ -1,5 +1,5 @@
export DISTRO_NAME=debian export DISTRO_NAME=debian
export DIB_RELEASE=${DIB_RELEASE:-unstable} export DIB_RELEASE=${DIB_RELEASE:-stable}
export DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-http://httpredir.debian.org/debian} export DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-http://httpredir.debian.org/debian}
export DIB_DEBIAN_COMPONENTS=${DIB_DEBIAN_COMPONENTS:-main} export DIB_DEBIAN_COMPONENTS=${DIB_DEBIAN_COMPONENTS:-main}
export DIB_DEBIAN_COMPONENTS_WS=${DIB_DEBIAN_COMPONENTS//,/ } export DIB_DEBIAN_COMPONENTS_WS=${DIB_DEBIAN_COMPONENTS//,/ }
@ -11,7 +11,7 @@ updates:deb ${DIB_DISTRIBUTION_MIRROR} ${DIB_RELEASE}-updates ${DIB_DEBIAN_COMPO
security:deb http://security.debian.org/ ${DIB_RELEASE}/updates ${DIB_DEBIAN_COMPONENTS_WS} security:deb http://security.debian.org/ ${DIB_RELEASE}/updates ${DIB_DEBIAN_COMPONENTS_WS}
" "
if [ "${DIB_RELEASE}" = "unstable" ]; then if [ "${DIB_RELEASE}" = "testing" -o "${DIB_RELEASE}" = "unstable" ]; then
DIB_APT_SOURCES_CONF_DEFAULT="default:deb ${DIB_DISTRIBUTION_MIRROR} ${DIB_RELEASE} ${DIB_DEBIAN_COMPONENTS_WS}" DIB_APT_SOURCES_CONF_DEFAULT="default:deb ${DIB_DISTRIBUTION_MIRROR} ${DIB_RELEASE} ${DIB_DEBIAN_COMPONENTS_WS}"
fi fi

View File

@ -0,0 +1,2 @@
systemd:
systemd-sysv:

View File

@ -0,0 +1,14 @@
{
"release": {
"debian": {
"testing": {
"systemd": "systemd",
"systemd-sysv": "systemd-sysv"
}
}
},
"default": {
"systemd": "",
"systemd-sysv": ""
}
}

View File

@ -0,0 +1 @@
Verify we can build a debian-minimal stable image.

View File

@ -0,0 +1,2 @@
export DISTRO_NAME=debian
export DIB_RELEASE=stable

View File

@ -0,0 +1 @@
Verify we can build a debian-minimal stable image.

View File

@ -0,0 +1,2 @@
export DISTRO_NAME=debian
export DIB_RELEASE=testing

View File

@ -59,9 +59,10 @@ else
# Have to --include=python because of dib-run-parts # Have to --include=python because of dib-run-parts
# Have to --include=sudo for pre-install.d use of sudoers files # Have to --include=sudo for pre-install.d use of sudoers files
# Have to --include=busybox because initramfs needs it
sudo sh -c "http_proxy=$http_proxy debootstrap --verbose \ sudo sh -c "http_proxy=$http_proxy debootstrap --verbose \
--variant=minbase \ --variant=minbase \
--include=python,sudo,$KERNEL_PACKAGE \ --include=python,sudo,busybox,$KERNEL_PACKAGE \
--components=${DIB_DEBIAN_COMPONENTS} \ --components=${DIB_DEBIAN_COMPONENTS} \
--arch=${ARCH} \ --arch=${ARCH} \
$KEYRING_OPT \ $KEYRING_OPT \

View File

@ -18,6 +18,9 @@ DEFAULT_SKIP_TESTS=(
fedora/build-succeeds fedora/build-succeeds
# in non-voting # in non-voting
gentoo/build-succeeds gentoo/build-succeeds
# good to have the test case around - but because of changes
# in testing does not work always.
debian-minimal/testing-build-succeeds
) )
# run_disk_element_test <test_element> <element> # run_disk_element_test <test_element> <element>