From 0bfc5c429088a61e8f0c5a0297b63d0943d83f2d Mon Sep 17 00:00:00 2001 From: Robert C Jennings Date: Thu, 2 May 2019 15:48:46 -0500 Subject: [PATCH 1/4] ubuntu-cpc: Fixup comment references to file names post-parallelization --- live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary | 4 ++-- live-build/ubuntu-cpc/hooks.d/base/root-squashfs.binary | 2 +- live-build/ubuntu-cpc/hooks.d/base/root-xz.binary | 2 +- live-build/ubuntu-cpc/hooks.d/base/vmdk-ova-image.binary | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary index c176de46..d51bb7a2 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image-uefi.binary @@ -65,8 +65,8 @@ install_grub() { chroot mountpoint mkdir -p "${efi_boot_dir}" if [ -n "$partuuid" ]; then - # FIXME: code duplicated between 032-disk-image.binary - # and 033-disk-image-uefi.binary. We want to fix this to not + # FIXME: code duplicated between disk-image.binary + # and disk-image-uefi.binary. We want to fix this to not # have initramfs-tools installed at all on these images. echo "partuuid found for root device; omitting initrd" echo "GRUB_FORCE_PARTUUID=$partuuid" >> mountpoint/etc/default/grub.d/40-force-partuuid.cfg diff --git a/live-build/ubuntu-cpc/hooks.d/base/root-squashfs.binary b/live-build/ubuntu-cpc/hooks.d/base/root-squashfs.binary index c6e2273e..eb2b5318 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/root-squashfs.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/root-squashfs.binary @@ -8,7 +8,7 @@ if [ -n "$SUBARCH" ]; then exit 0 fi -# This is the directory created by 031-0-create-root-dir.binary +# This is the directory created by create-root-dir.binary rootfs_dir=rootfs.dir squashfs_f="$PWD/livecd.ubuntu-cpc.squashfs" diff --git a/live-build/ubuntu-cpc/hooks.d/base/root-xz.binary b/live-build/ubuntu-cpc/hooks.d/base/root-xz.binary index b23cd8d6..609538ad 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/root-xz.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/root-xz.binary @@ -8,7 +8,7 @@ if [ -n "$SUBARCH" ]; then exit 0 fi -# This is the directory created by 031-0-create-root-dir.binary +# This is the directory created by create-root-dir.binary rootfs_dir=rootfs.dir cp $rootfs_dir.manifest livecd.ubuntu-cpc.rootfs.manifest diff --git a/live-build/ubuntu-cpc/hooks.d/base/vmdk-ova-image.binary b/live-build/ubuntu-cpc/hooks.d/base/vmdk-ova-image.binary index f9bcfb18..a827a8a6 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/vmdk-ova-image.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/vmdk-ova-image.binary @@ -7,7 +7,7 @@ # and checksums. This step produces an OVA that is suitable for use with # Cloud's that support the OVF specification. # -# For this step, we re-use the VMDK's made in 040-vmdk-image.binary +# For this step, we re-use the VMDK's made in vmdk-image.binary case ${SUBPROJECT:-} in minimized) From 05850394d79ae9a83b740c7da87d2e0122071acc Mon Sep 17 00:00:00 2001 From: Robert C Jennings Date: Wed, 1 May 2019 09:56:34 -0500 Subject: [PATCH 2/4] ubuntu-cpc: Ensure base disk image is the same between all build targets The following targets have livecd.ubuntu-cpc.manifest (and livecd.ubuntu-cpc.ext4) which differ in some way from the 'all' target. They are all missing grub-efi and other modifications: root-dir squashfs tarball These targets do not depend on the 'disk-image' target. This means that the ext4 produced will lack the uefi modifications (and any from the disk-image target binary hooks). Since the ext4 file is common to all builds there is a chance that a parallel build from one of these targets could overwrite this artifact. This patch ensures that all targets will produce consistent base output. --- debian/changelog | 6 ++++++ live-build/ubuntu-cpc/hooks.d/base/series/root-dir | 1 + live-build/ubuntu-cpc/hooks.d/base/series/squashfs | 1 + live-build/ubuntu-cpc/hooks.d/base/series/tarball | 1 + 4 files changed, 9 insertions(+) diff --git a/debian/changelog b/debian/changelog index 71705174..da2260a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.580.1) UNRELEASED; urgency=medium + + * ubuntu-cpc: Ensure base disk image is the same between all build targets + + -- Robert C Jennings Thu, 02 May 2019 16:03:39 -0500 + livecd-rootfs (2.580) eoan; urgency=medium * Run clean_debian_chroot after minimize_manual (LP: #1826377) diff --git a/live-build/ubuntu-cpc/hooks.d/base/series/root-dir b/live-build/ubuntu-cpc/hooks.d/base/series/root-dir index b5d3b4e4..32a02423 100644 --- a/live-build/ubuntu-cpc/hooks.d/base/series/root-dir +++ b/live-build/ubuntu-cpc/hooks.d/base/series/root-dir @@ -1 +1,2 @@ +depends disk-image base/create-root-dir.binary diff --git a/live-build/ubuntu-cpc/hooks.d/base/series/squashfs b/live-build/ubuntu-cpc/hooks.d/base/series/squashfs index 60332761..aee4ce40 100644 --- a/live-build/ubuntu-cpc/hooks.d/base/series/squashfs +++ b/live-build/ubuntu-cpc/hooks.d/base/series/squashfs @@ -1,2 +1,3 @@ +depends disk-image depends root-dir base/root-squashfs.binary diff --git a/live-build/ubuntu-cpc/hooks.d/base/series/tarball b/live-build/ubuntu-cpc/hooks.d/base/series/tarball index 2ea30bf2..b0634f47 100644 --- a/live-build/ubuntu-cpc/hooks.d/base/series/tarball +++ b/live-build/ubuntu-cpc/hooks.d/base/series/tarball @@ -1,2 +1,3 @@ +depends disk-image depends root-dir base/root-xz.binary From bca9242474053603cabb78a797091669b5bf0cde Mon Sep 17 00:00:00 2001 From: Robert C Jennings Date: Thu, 2 May 2019 17:15:12 -0500 Subject: [PATCH 3/4] ubuntu-cpc: Allow comments in series files and add comments The addition of disk-image to series files in a prior commit required some explanation. Without comment support in series files that was not possible. This patch adds support for comments and adds those comments as well. --- live-build/ubuntu-cpc/hooks.d/base/series/root-dir | 1 + live-build/ubuntu-cpc/hooks.d/base/series/squashfs | 1 + live-build/ubuntu-cpc/hooks.d/base/series/tarball | 1 + live-build/ubuntu-cpc/hooks.d/make-hooks | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/live-build/ubuntu-cpc/hooks.d/base/series/root-dir b/live-build/ubuntu-cpc/hooks.d/base/series/root-dir index 32a02423..b41635af 100644 --- a/live-build/ubuntu-cpc/hooks.d/base/series/root-dir +++ b/live-build/ubuntu-cpc/hooks.d/base/series/root-dir @@ -1,2 +1,3 @@ +# Include disk-image to ensure livecd.ubuntu-cpc.ext4 is consistent depends disk-image base/create-root-dir.binary diff --git a/live-build/ubuntu-cpc/hooks.d/base/series/squashfs b/live-build/ubuntu-cpc/hooks.d/base/series/squashfs index aee4ce40..6d2cb910 100644 --- a/live-build/ubuntu-cpc/hooks.d/base/series/squashfs +++ b/live-build/ubuntu-cpc/hooks.d/base/series/squashfs @@ -1,3 +1,4 @@ +# Include disk-image to ensure livecd.ubuntu-cpc.ext4 is consistent depends disk-image depends root-dir base/root-squashfs.binary diff --git a/live-build/ubuntu-cpc/hooks.d/base/series/tarball b/live-build/ubuntu-cpc/hooks.d/base/series/tarball index b0634f47..184046c2 100644 --- a/live-build/ubuntu-cpc/hooks.d/base/series/tarball +++ b/live-build/ubuntu-cpc/hooks.d/base/series/tarball @@ -1,3 +1,4 @@ +# Include disk-image to ensure livecd.ubuntu-cpc.ext4 is consistent depends disk-image depends root-dir base/root-xz.binary diff --git a/live-build/ubuntu-cpc/hooks.d/make-hooks b/live-build/ubuntu-cpc/hooks.d/make-hooks index 7796be3d..08ae45be 100755 --- a/live-build/ubuntu-cpc/hooks.d/make-hooks +++ b/live-build/ubuntu-cpc/hooks.d/make-hooks @@ -161,7 +161,7 @@ class MakeHooks: with open(series_file, "r", encoding="utf-8") as fp: for line in fp: line = line.strip() - if not line: + if not line or line.startswith("#"): continue m = re.match(r"^\s*depends\s+(\S+.*)$", line) if m: From 8b70933598033caaf2325b3805ab0f4c1024c7b3 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Tue, 21 May 2019 09:26:33 +1200 Subject: [PATCH 4/4] update version number in changelog --- debian/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index da2260a0..4f371863 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.580.1) UNRELEASED; urgency=medium +livecd-rootfs (2.585) UNRELEASED; urgency=medium * ubuntu-cpc: Ensure base disk image is the same between all build targets