Package: release.debian.org Severity: normal User: [email protected] Usertags: unblock
Dear release team, Here's the list of changes I would like to see in Jessie: - By default, the script was using a 1GB HDD, but this is no longer enough to build a Jessie image (it crashes during the initrd creation), even if after cleaning /var/cache/apt, the final image is less than 500 MB. So I have increased the default HDD size to 2GB. Note that under a normal use, the HDD is automatically resized to whatever is the size of the instance HDD, so the minimum HDD sice in the image is just the right thing to do. - Because the script traps errors, it was exiting with zero even in case of errors. This last upload fixes that (this is a trivial 2 lines patch inside the cleanup() function). - I added stretch and buster as allowed release names when building an image. - I added (as documentation) the hook script used by Steve McIntyre to generate the official Debian images on cdimage.debian.org [1] All of these changes, taken individually, are very small and I believe easy to review, but it's IMO important to have them as the script is now used during the generation of ISO images at cdimage.d.o. So I don't think it's a problem to ask for an unblock. Please unblock unblock openstack-debian-images/1.2. Debdiff attached. Cheers, Thomas Goirand (zigo) [1] http://cdimage.debian.org/cdimage/openstack/testing/ I've tested the image, and it works well! :)
diff -Nru openstack-debian-images-1.1/build-openstack-debian-image openstack-debian-images-1.2/build-openstack-debian-image --- openstack-debian-images-1.1/build-openstack-debian-image 2014-11-25 13:47:17.000000000 +0000 +++ openstack-debian-images-1.2/build-openstack-debian-image 2015-01-28 12:48:30.000000000 +0000 @@ -11,7 +11,7 @@ --sources.list-mirror|-s <source-list-mirror> (default: http://http.debian.net/debian) --extra-packages|-e <package>,<package>,... --hook-script|-hs <hook-script> - --image-size|-is <image-size> (default: 1G) + --image-size|-is <image-size> (default: 2G) --automatic-resize|-ar --automatic-resize-space|-ars <suplementary-space> (default: 50M) --login|-l <userlogin> (default: debian) @@ -89,7 +89,7 @@ shift ;; "--release"|"-r") - if [ "${2}" = "wheezy" ] || [ "${2}" = "jessie" ] ; then + if [ "${2}" = "wheezy" ] || [ "${2}" = "jessie" ] || [ "${2}" = "stretch" ] || [ "${2}" = "buster" ] ; then RELEASE=${2} shift shift @@ -134,7 +134,7 @@ SOURCE_LIST_MIRROR=http://http.debian.net/debian fi if [ -z "${IMAGE_SIZE}" ] ; then - IMAGE_SIZE=1 + IMAGE_SIZE=2 fi if [ -z "${AUTOMATIC_RESIZE_SPACE}" ] ; then AUTOMATIC_RESIZE_SPACE=50 @@ -192,14 +192,16 @@ fi cleanup(){ + error=$? [ ! -d "${MOUNT_DIR}" ] && return echo - echo "error, umounting $MOUNT_DIR" + echo "error $error, umounting $MOUNT_DIR" chroot ${MOUNT_DIR} umount /proc || true chroot ${MOUNT_DIR} umount /sys || true umount ${MOUNT_DIR} rmdir ${MOUNT_DIR} kpartx -d ${AMI_NAME} + exit $error } trap "cleanup" EXIT TERM INT diff -Nru openstack-debian-images-1.1/build-openstack-debian-image.1 openstack-debian-images-1.2/build-openstack-debian-image.1 --- openstack-debian-images-1.1/build-openstack-debian-image.1 2014-11-25 13:47:17.000000000 +0000 +++ openstack-debian-images-1.2/build-openstack-debian-image.1 2015-01-28 12:48:30.000000000 +0000 @@ -93,7 +93,7 @@ .I <image\-size> .IP -Select the image size (default to 1 GBytes if this option is ommited). Only +Select the image size (default to 2 GBytes if this option is ommited). Only useful if you need to use a custom script hook (see below). .LP diff -Nru openstack-debian-images-1.1/contrib/official-debian-image-hook openstack-debian-images-1.2/contrib/official-debian-image-hook --- openstack-debian-images-1.1/contrib/official-debian-image-hook 1970-01-01 00:00:00.000000000 +0000 +++ openstack-debian-images-1.2/contrib/official-debian-image-hook 2015-01-28 12:48:30.000000000 +0000 @@ -0,0 +1,28 @@ +#!/bin/bash + +# This script is used when generating the Debian official +# OpenStack image to list all source packages shipped in +# the image, and later on generate a tarball containing +# them all. + +TOP="/w" +LOCALCONF="${TOP}/in" +STATE="${TOP}/state" + +. ${LOCALCONF}/common.sh + +BUILDNAME="openstack-jessie" +WORK="${TOP}/work/${BUILDNAME}" + +# Write the script inside the image chroot +cat > $BODI_CHROOT_PATH/list-sources <<EOF +#!/bin/sh +for PKG in \$(COLUMNS=500 dpkg -l | awk '/^ii/ {printf "%s ",\$2}'); do + apt-get source -qq --print-uris \$PKG +done +EOF + +# Execute the script and delete it +chmod +x $BODI_CHROOT_PATH/list-sources +chroot $BODI_CHROOT_PATH /list-sources > $WORK/sources +rm -f $BODI_CHROOT_PATH/list-sources diff -Nru openstack-debian-images-1.1/debian/changelog openstack-debian-images-1.2/debian/changelog --- openstack-debian-images-1.1/debian/changelog 2014-11-25 13:47:17.000000000 +0000 +++ openstack-debian-images-1.2/debian/changelog 2015-01-28 12:48:30.000000000 +0000 @@ -1,3 +1,16 @@ +openstack-debian-images (1.2) unstable; urgency=medium + + * Uses 2GB by default as initial HDD space for the image, as 1GB isn't big + enough for building a Jessie image anymore (Closes: #776217). Thanks to + Steve McIntyre <[email protected]> for the bug report. + * Error as non-zero in case of an error (Closes: #776216). Thanks to Steve + McIntyre <[email protected]> for the bug report and patch. + * Allow stretch and buster as release names. + * Adds the contrib/official-debian-image-hook script used for generating the + official Debian image. + + -- Thomas Goirand <[email protected]> Mon, 26 Jan 2015 15:14:53 +0100 + openstack-debian-images (1.1) unstable; urgency=medium * Fixed compat option for newer qemu (Closes: #770943). diff -Nru openstack-debian-images-1.1/debian/openstack-debian-images.docs openstack-debian-images-1.2/debian/openstack-debian-images.docs --- openstack-debian-images-1.1/debian/openstack-debian-images.docs 1970-01-01 00:00:00.000000000 +0000 +++ openstack-debian-images-1.2/debian/openstack-debian-images.docs 2015-01-28 12:48:30.000000000 +0000 @@ -0,0 +1 @@ +contrib

