From d41cc70bf54b84e4c298cd883d3eeeaabfa114b5 Mon Sep 17 00:00:00 2001 From: Robert C Jennings Date: Fri, 19 Jan 2018 12:26:32 -0600 Subject: [PATCH] ubuntu-cpc: Initramfs compression should match runtime default (LP: #1744114) Cloud images created from the 'ubuntu-cpc' project use lzma initramfs compression for the initial initramfs shipped in the image; this is the default for livecd-rootfs. When a user updates the initramfs (or installs a new kernel) on a running instance created from a cloud image they will get gzip compression, which is the default shipped in initramfs-tools. With this patch the compression method used to create the initramfs in the initial cloud images will match the compression menthod used when the end-user creates/updates an initramfs, namely gzip compression. --- debian/changelog | 7 +++++++ live-build/auto/config | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 843794e2..fb46ac9c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +livecd-rootfs (2.490) bionic; urgency=medium + + * ubuntu-cpc: Initramfs compression should match default for + update-initramfs (LP: #1744114) + + -- Robert C Jennings Thu, 18 Jan 2018 10:16:37 -0600 + livecd-rootfs (2.489) bionic; urgency=medium [ Balint Reczey ] diff --git a/live-build/auto/config b/live-build/auto/config index 9abaaa65..15788881 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -487,7 +487,8 @@ case $PROJECT in add_package install shim-signed ;; esac - OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none --initramfs-compression=none" + OPTS="${OPTS:+$OPTS }--linux-packages=none --initramfs=none" + INITRAMFS_COMPRESSION="none" # contains the framework definition add_package install ubuntu-core-libs @@ -583,6 +584,7 @@ case $PROJECT in OPTS="${OPTS:+$OPTS }--hdd-label=cloudimg-rootfs" OPTS="${OPTS:+$OPTS }--ext-resize-blocks=536870912 --ext-block-size=4096" OPTS="${OPTS:+$OPTS }--ext-fudge-factor=15" + INITRAMFS_COMPRESSION="gzip" ;; *) @@ -696,7 +698,7 @@ lb config noauto \ ${KERNEL_FLAVOURS:+--linux-flavours "$KERNEL_FLAVOURS"} \ --initsystem none \ --bootloader "$BOOTLOADER" \ - --initramfs-compression lzma \ + --initramfs-compression "${INITRAMFS_COMPRESSION:-lzma}" \ --cache false \ ${BOOTAPPEND_LIVE:+--bootappend-live "$BOOTAPPEND_LIVE"} \ $OPTS \