From 32197adbd7fd36c71a1770e4580cd24867c2b3fc Mon Sep 17 00:00:00 2001 From: CloudBuilder Date: Mon, 18 Mar 2019 11:26:07 +0000 Subject: [PATCH] Imported 2.570 No reason for CPC update specified. --- debian/changelog | 17 +++++++++++++++++ live-build/auto/build | 4 ++-- live-build/auto/config | 3 ++- live-build/lb_chroot_layered | 7 +++++++ 4 files changed, 28 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index f11ce0d5..0ffaf55e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,20 @@ +livecd-rootfs (2.570) disco; urgency=medium + + [ Jean-Baptiste Lallement ] + * Fix grub divert for multilayer images: + grub-probe must not be called during image build so grub is diverted. In + multilayer image the chroot is always the tip of the filesystem, so we + divert grub at the beginning of each pass and undivdert it as the end. + For flat images, it's diverted just before building the chroot and + undiverted after. + + [ Didier Roche ] + * Ensure default langpacks are removed after installation: + Add langpacks to live tasks to have them in the ubiquity diff file and + thus, purged after installation if not selected. (LP: #1818890) + + -- Didier Roche Mon, 18 Mar 2019 09:58:56 +0100 + livecd-rootfs (2.569) disco; urgency=medium * Drop /etc/update-motd.d/51-cloudguest from cloud images; this is not diff --git a/live-build/auto/build b/live-build/auto/build index 3a964636..8f4cf05d 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -261,14 +261,14 @@ EOF chmod +x chroot/usr/bin/man fi - divert_grub chroot if [ -n "${PASSES}" ]; then PATH="config/:$PATH" lb chroot_layered "$@" else + divert_grub chroot divert_update_initramfs lb chroot "$@" + undivert_grub chroot fi - undivert_grub chroot # Let all configuration non multi-layered project here. # If those are moving to a multi-layer layout, this needs to be diff --git a/live-build/auto/config b/live-build/auto/config index 26262293..a3a819a9 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -539,7 +539,8 @@ case $PROJECT in ;; *) LIVE_TASK='ubuntu-live' - add_task install minimal standard ubuntu-desktop ubuntu-desktop-minimal-default-languages ubuntu-desktop-default-languages + add_task install minimal standard ubuntu-desktop + add_task $LIVE_TASK ubuntu-desktop-minimal-default-languages ubuntu-desktop-default-languages case $ARCH in amd64) add_package live $SIGNED_KERNEL_PACKAGE ;; esac diff --git a/live-build/lb_chroot_layered b/live-build/lb_chroot_layered index 3a3d50c0..113c7e30 100755 --- a/live-build/lb_chroot_layered +++ b/live-build/lb_chroot_layered @@ -175,6 +175,10 @@ create_chroot_pass () { lb chroot_devpts install ${*} lb chroot_proc install ${*} lb chroot_sysfs install ${*} + + # grub-probe should not be called as part of an image build so divert it + divert_grub chroot + # We run chroot_hacks only on root layers (update-initramfs diverted) if $(is_root_layer $pass); then divert_update_initramfs @@ -245,6 +249,9 @@ create_chroot_pass () { Chroot chroot "dpkg-query -W" > chroot.packages.${pass} + # Restore grub + undivert_grub chroot + # Deconfiguring chroot if $(is_root_layer $pass); then lb chroot_archives chroot remove ${*}