Bug#784342: jessie-pu: package openstack-debian-images/1.3
On 05/05/2015 08:20 PM, Adam D. Barratt wrote:
Control: tags -1 + moreinfo
On Tue, 2015-05-05 at 18:05 +0200, Thomas Goirand wrote:
I'd like to get openstack-debian-images version 1.3 get somehow into Jessie, so
that the images gets generated with the above changes. Should I prepare a
prepare a version 1.2+deb7u1 targetting stable-proposed-updates with the same
changes? Or can we just use the version 1.3 which I uploaded to Sid (which I
would prefer)? The package contains only a shell script plus some doc, so
rebuilding isn't needed.
No, it would need to be a re-upload. We've never (afair) taken packages
straight out of unstable. For one thing, we want packages to be built
within the release they're part of.
If it's a simple rebuild then 1.3~deb8u1 would be preferable (definitely
not +deb7u1 as this isn't for wheezy :-p).
Please let me know what I should do,
Same as every other p-u. Provide a debdiff of a package that's been
built and tested in a jessie environment, and we'll take it from there.
I do have one pre-emptive question, having looked at the 1.2 -> 1.3 diff
in unstable:
contrib/official-debian-image-hook | 28 --
contrib/official-debian-openstack-image/README | 6
contrib/official-debian-openstack-image/debian-cd-pettersson-live | 107 ++++++++++
contrib/official-debian-openstack-image/openstack-hook | 28 ++
Which of the changelog entries covers the above changes?
Regards,
Adam
I have generated a new 1.3~deb8u1 version as suggested, and attached the
debdiff to this bug.
Please note that I tested the package on the HP cloud using the below
procedure:
1/ Booted a new VM using the currently released Jessie OpenStack image
from cdimage.debian.org.
2/ apt-get install openstack-debian-images
3/ upgraded to this new version 1.3~deb8u1, which I built on my laptop
using sbuild
4/ generated a new Jessie image using that new version, and from the HP
cloud (building the image on my laptop is ok, but uploading 500 MB is
not, so building the image there is best...)
5/ uploaded the new image to HP cloud (not as public image)
6/ booted a new VM on that new image
7/ logged in that new image
Everything worked as expected, and didn't experience any issue.
Let me know if it is a fit for upload to jessie-proposed-updates.
Cheers,
Thomas Goirand (zigo)
diff -Nru openstack-debian-images-1.2/build-openstack-debian-image openstack-debian-images-1.3~deb8u1/build-openstack-debian-image
--- openstack-debian-images-1.2/build-openstack-debian-image 2015-01-28 13:48:30.000000000 +0100
+++ openstack-debian-images-1.3~deb8u1/build-openstack-debian-image 2015-05-07 00:06:47.000000000 +0200
@@ -128,7 +128,7 @@
DEB_MIRROR=http://http.debian.net/debian
fi
if [ -z "${EXTRA_PACKAGES}" ] ; then
- EXTRA_PACKAGES=bash-completion,joe,most,screen,less,vim,bzip2
+ EXTRA_PACKAGES=bash-completion,joe,most,screen,less,vim,bzip2,nano
fi
if [ -z "${SOURCE_LIST_MIRROR}" ] ; then
SOURCE_LIST_MIRROR=http://http.debian.net/debian
@@ -145,12 +145,12 @@
NEEDED_PACKAGES=sudo,adduser,locales,extlinux,openssh-server,linux-image-amd64,euca2ools,file,kbd
if [ "${RELEASE}" = "jessie" ] ; then
- NEEDED_PACKAGES=${NEEDED_PACKAGES},cloud-init,cloud-utils,cloud-initramfs-growroot
+ NEEDED_PACKAGES=${NEEDED_PACKAGES},cloud-init,cloud-utils,cloud-initramfs-growroot,dbus,libpam-systemd
else
# These are needed by cloud-init and friends, and since we don't want backports of them,
# but just normal packages from Wheezy, we resolve dependencies by hand, prior to using
# apt-get -t wheezy-backports install cloud-init cloud-utils cloud-initramfs-growroot
- NEEDED_PACKAGES=${NEEDED_PACKAGES},python,python-paramiko,python-argparse,python-cheetah,python-configobj,python-oauth,python-software-properties,python-yaml,python-boto,python-prettytable,initramfs-tools,python-requests
+ NEEDED_PACKAGES=${NEEDED_PACKAGES},python,python-paramiko,python-argparse,python-cheetah,python-configobj,python-oauth,python-software-properties,python-yaml,python-boto,python-prettytable,initramfs-tools,python-requests,acpid,acpi-support-base
fi
if [ ${EXTRA} = "no" ] ; then
@@ -252,10 +252,10 @@
echo "# disable pc speaker
blacklist pcspkr" >${MOUNT_DIR}/etc/modprobe.d/blacklist.conf
-echo "# Required for cinder hotplug
-acpiphp
-pci_hotplug
-" >>${MOUNT_DIR}/etc/modules
+#echo "# Required for cinder hotplug
+#acpiphp
+#pci_hotplug
+#" >>${MOUNT_DIR}/etc/modules
# Enable bash-completion by default
if [ ${EXTRA} = "yes" ] ; then
@@ -319,16 +319,20 @@
echo "deb ${SOURCE_LIST_MIRROR} ${RELEASE} main
deb-src ${SOURCE_LIST_MIRROR} ${RELEASE} main" >${MOUNT_DIR}/etc/apt/sources.list
-if [ "${RELEASE}" = "wheezy" ] ; then
- echo "deb ${SOURCE_LIST_MIRROR} wheezy-updates main
-deb-src ${SOURCE_LIST_MIRROR} wheezy-updates main
-deb http://security.debian.org/ wheezy/updates main
-deb-src http://security.debian.org/ wheezy/updates main
+if [ "${RELEASE}" = "wheezy" ] || [ "${RELEASE}" = "jessie" ] ; then
+ echo "deb ${SOURCE_LIST_MIRROR} ${RELEASE}-updates main
+deb-src ${SOURCE_LIST_MIRROR} ${RELEASE}-updates main
+deb http://security.debian.org/ ${RELEASE}/updates main
+deb-src http://security.debian.org/ ${RELEASE}/updates main
+" >>${MOUNT_DIR}/etc/apt/sources.list
+fi
-deb ${SOURCE_LIST_MIRROR} wheezy-backports main
+if [ "${RELEASE}" = "wheezy" ] ; then
+ echo "deb ${SOURCE_LIST_MIRROR} wheezy-backports main
deb-src ${SOURCE_LIST_MIRROR} wheezy-backports main
" >>${MOUNT_DIR}/etc/apt/sources.list
fi
+
chroot ${MOUNT_DIR} apt-get update
chroot ${MOUNT_DIR} apt-get upgrade -y
diff -Nru openstack-debian-images-1.2/contrib/official-debian-image-hook openstack-debian-images-1.3~deb8u1/contrib/official-debian-image-hook
--- openstack-debian-images-1.2/contrib/official-debian-image-hook 2015-01-28 13:48:30.000000000 +0100
+++ openstack-debian-images-1.3~deb8u1/contrib/official-debian-image-hook 1970-01-01 01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-#!/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.2/contrib/official-debian-openstack-image/debian-cd-pettersson-live openstack-debian-images-1.3~deb8u1/contrib/official-debian-openstack-image/debian-cd-pettersson-live
--- openstack-debian-images-1.2/contrib/official-debian-openstack-image/debian-cd-pettersson-live 1970-01-01 01:00:00.000000000 +0100
+++ openstack-debian-images-1.3~deb8u1/contrib/official-debian-openstack-image/debian-cd-pettersson-live 2015-05-07 00:06:47.000000000 +0200
@@ -0,0 +1,107 @@
+#!/bin/bash
+
+#set -x
+
+NL="
+"
+OLDIFS=$IFS
+
+TOP="/w"
+LOCALCONF="${TOP}/in"
+STATE="${TOP}/state"
+
+. ${LOCALCONF}/common.sh
+. ${LOCALCONF}/CONF.sh
+
+# Rename the output files to something more appropriate for our use
+RENAME="s,debian-$CODENAME-(.*)-amd64,debian-$VERSION-openstack-amd64,"
+
+mkdir -p ${STATE}
+rm -rf ${STATE}/*
+BUILDNAME="openstack-$CODENAME"
+WORK="${TOP}/work/${BUILDNAME}"
+OUT="${TOP}/out/${BUILDNAME}"
+LOG="${TOP}/out/log"
+mkdir -p ${WORK} ${OUT}
+
+SOURCE_ERROR=0
+
+grab_file () {
+ REMOTE=$(echo $1 | tr -d \')
+ LOCAL="source/$2"
+ SIZE=$3
+ SHA=$4
+
+ if [ ! -f $LOCAL ] ; then
+ wget -O $LOCAL $REMOTE >> ${LOG}/${BUILDNAME}.log
+ local_size=$(stat -c %s $LOCAL)
+ check_alg=${SHA%%:*}
+ check_prog="sha"${check_alg##SHA}"sum"
+ local_check=$(${check_prog} < $LOCAL | awk '{print $1}')
+ if [ ${local_size} != $SIZE ] ; then
+ echo "Size mismatch for $REMOTE" >> ${LOG}/${BUILDNAME}.log
+ SOURCE_ERROR=1
+ fi
+ if [ ${check_alg}":"${local_check} != $SHA ] ; then
+ echo "Checksums mismatch for $REMOTE" >> ${LOG}/${BUILDNAME}.log
+ echo ${check_alg}":"${local_check}
+ echo $SHA
+ SOURCE_ERROR=1
+ fi
+ fi
+}
+
+cd ${WORK}
+
+BUILDSTART=$(now)
+log "Starting full OpenStack image build (codename $CODENAME, version $VERSION) at $BUILDSTART"
+
+START=$(now)
+
+build-openstack-debian-image \
+ -hs $LOCALCONF/openstack-hook \
+ -u http://ftp.se.debian.org/debian \
+ -r $CODENAME \
+ -is 2 2>&1 >> ${LOG}/${BUILDNAME}.log
+
+ERROR=$?
+END=$(now)
+time_spent=$(calc_time $CKSUMSTART $END)
+
+if [ $ERROR -eq 0 ] ; then
+ log "successful build started at $START, ended at $END (took $time_spent)"
+ if [ "$RENAME"x != ""x ] ; then
+ rename -v "$RENAME" * >> ${LOG}/${BUILDNAME}.log
+ fi
+
+ cd ${WORK}
+ mkdir source
+
+ IFS="$NL"
+ for line in $(cat sources); do
+ IFS=$OLDIFS
+ grab_file $line
+ IFS="$NL"
+ done
+ IFS=$OLDIFS
+ tar czf debian-$VERSION-openstack-source.tar.gz source
+ rm -rf source sources
+
+ mv * ${OUT}
+
+ CKSUMSTART=(now)
+ cd ${OUT} && checksum_files
+ END=$(now)
+ time_spent=$(calc_time $CKSUMSTART $END)
+ log "checksums started at $CKSUMSTART, ended at $END (took $time_spent)"
+else
+ log "FAILED with error $error, build started at $START, ended at $END (took $time_spent)"
+fi
+
+if [ $SOURCE_ERROR -ne 0 ] ; then
+ log "FAILED to download sources"
+ ERROR=2
+fi
+
+time_spent=$(calc_time $BUILDSTART $END)
+log "DONE. ERROR=$ERROR $BUILDNAME run started at $BUILDSTART, ended at $END (took $time_spent)"
diff -Nru openstack-debian-images-1.2/contrib/official-debian-openstack-image/openstack-hook openstack-debian-images-1.3~deb8u1/contrib/official-debian-openstack-image/openstack-hook
--- openstack-debian-images-1.2/contrib/official-debian-openstack-image/openstack-hook 1970-01-01 01:00:00.000000000 +0100
+++ openstack-debian-images-1.3~deb8u1/contrib/official-debian-openstack-image/openstack-hook 2015-05-07 00:06:47.000000000 +0200
@@ -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.2/contrib/official-debian-openstack-image/README openstack-debian-images-1.3~deb8u1/contrib/official-debian-openstack-image/README
--- openstack-debian-images-1.2/contrib/official-debian-openstack-image/README 1970-01-01 01:00:00.000000000 +0100
+++ openstack-debian-images-1.3~deb8u1/contrib/official-debian-openstack-image/README 2015-05-07 00:06:47.000000000 +0200
@@ -0,0 +1,6 @@
+These scripts are used to generate the official OpenStack Debian images, and
+where written by Steve McIntyre <sledge@debian.org>, who is the person in
+charge of building the Debian official ISO images. I'd like to thanks him for
+his help and work on it.
+
+Thomas Goirand <zigo@debian.org>
diff -Nru openstack-debian-images-1.2/debian/changelog openstack-debian-images-1.3~deb8u1/debian/changelog
--- openstack-debian-images-1.2/debian/changelog 2015-01-28 13:48:30.000000000 +0100
+++ openstack-debian-images-1.3~deb8u1/debian/changelog 2015-05-07 00:06:47.000000000 +0200
@@ -1,3 +1,18 @@
+openstack-debian-images (1.3~deb8u1) jessie-proposed-updates; urgency=medium
+
+ * Backport of the version 1.3 from Sid to Jessie.
+ * Fixed debian/gbp.conf to use debian/jessie as new packaging branch.
+ * Removed the tweak of /etc/modules, as acpiphp and pci_hotplug aren't in the
+ Jessie kernel: they are built not as module (Closes: #783340).
+ * Also adds security repository if building an image for Jessie. Previously,
+ this was done only for Wheezy (Closes: #783480).
+ * Adds dbus + libpam-systemd when building a Jessie image, and acpid +
+ acpi-support-base when building a Wheezy image, so that ACPI shutdown works
+ by default (Closes: #783448).
+ * Adds nano as default when not using the --minimal flag (Closes: #783341).
+
+ -- Thomas Goirand <zigo@debian.org> Thu, 07 May 2015 00:03:47 +0200
+
openstack-debian-images (1.2) unstable; urgency=medium
* Uses 2GB by default as initial HDD space for the image, as 1GB isn't big
diff -Nru openstack-debian-images-1.2/debian/gbp.conf openstack-debian-images-1.3~deb8u1/debian/gbp.conf
--- openstack-debian-images-1.2/debian/gbp.conf 2015-01-28 13:48:30.000000000 +0100
+++ openstack-debian-images-1.3~deb8u1/debian/gbp.conf 2015-05-07 00:06:47.000000000 +0200
@@ -1,5 +1,5 @@
[DEFAULT]
-debian-branch = debian/unstable
+debian-branch = debian/jessie
[git-buildpackage]
export-dir = ../build-area/
Reply to: