diff --git a/debian/changelog b/debian/changelog index 764e97cb..e26e572f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,19 @@ +livecd-rootfs (23.10.16) mantic; urgency=medium + + * fix: Do not install recommends for ubuntu-cpc minimized project (LP: #2031640) + * fix: Remove dangling symlink /boot/initrd.img.old if exists + * fix: Ensure required dependencies are installed before trying `grub-install` + * fix: Install required package fuse3 when preseeding snaps + + -- Philip Roche Thu, 17 Aug 2023 11:44:23 +0100 + +livecd-rootfs (23.10.15) mantic; urgency=medium + + [ Stefan Hammer ] + * fix(armhf): Fix armhf kernel file detection + + -- Utkarsh Gupta Thu, 17 Aug 2023 07:06:53 +0530 + livecd-rootfs (23.10.14) mantic; urgency=medium * canary diff --git a/live-build/auto/build b/live-build/auto/build index 2a94e910..d67e5d0e 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -618,7 +618,11 @@ for FLAVOUR in $LB_LINUX_FLAVOURS; do fi case $FLAVOUR in allwinner|virtual|generic-hwe-*) - FLAVOUR="generic" + if [ "$ARCH" = "armhf" ]; then + FLAVOUR="generic-lpae" + else + FLAVOUR="generic" + fi ;; oem-*) FLAVOUR="oem" diff --git a/live-build/auto/config b/live-build/auto/config index c9157d07..587bcb39 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -1106,6 +1106,12 @@ case $PROJECT in KERNEL_FLAVOURS=virtual if [ "${SUBPROJECT:-}" = minimized ]; then + # For minimized images we do not want to install any recommended packages. + # We can do this by setting APT::Install-Recommends to false in apt config + # or by passing --no-install-recommends to apt-get install. + # Apt config is set using `APT_OPTIONS` variable in this script. + # This fixes LP: #2031640 + APT_OPTIONS="${APT_OPTIONS:+$APT_OPTIONS }--no-install-recommends" add_package install ubuntu-cloud-minimal else add_task install minimal standard cloud-image diff --git a/live-build/functions b/live-build/functions index 7a97670c..dea971dc 100644 --- a/live-build/functions +++ b/live-build/functions @@ -708,6 +708,12 @@ snap_preseed() { SNAP=${SNAP%=*} # strip /classic confinement local SNAP_NAME=${SNAP%/*} + + # For snap preseed to work, we need to ensure that fuse3 is installed in the chroot. + # fuse3 is a recommends of snapd but if this is a minimized image then recommends are not installed + # and preseeding will fail. + chroot "${CHROOT_ROOT}" apt-get install --assume-yes --no-install-recommends fuse3 + # Seed from the specified channel (e.g. core18 latest/stable) # Or Channel endcoded in the snap name (e.g. lxd=4.0/stable/ubuntu-20.04) # Or Ubuntu policy default channel latest/stable/ubuntu-$(release_ver) diff --git a/live-build/ubuntu-cpc/hooks.d/base/disk-image.binary b/live-build/ubuntu-cpc/hooks.d/base/disk-image.binary index 7fcc8167..8751773e 100755 --- a/live-build/ubuntu-cpc/hooks.d/base/disk-image.binary +++ b/live-build/ubuntu-cpc/hooks.d/base/disk-image.binary @@ -115,6 +115,8 @@ esac if [ "${should_install_grub}" -eq 1 ]; then echo "(hd0) ${loop_device}" > mountpoint/tmp/device.map + # install the required package to get the grub-install command + chroot mountpoint apt-get -qqy install --no-install-recommends grub-pc grub2-common chroot mountpoint grub-install ${loop_device} chroot mountpoint grub-bios-setup \ --boot-image=i386-pc/boot.img \ diff --git a/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot b/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot index 6d7b62ea..12956529 100755 --- a/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot +++ b/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot @@ -88,7 +88,11 @@ fi # previous steps may have left a dangling symlink here with # SUBPROJECT=minimized and that breaks lb_chroot_hacks step if [ -L "${rootd}/boot/initrd.img" ] && [ ! -e "${rootd}/boot/initrd.img" ]; then - rm "${rootd}/boot/initrd.img" + rm --verbose "${rootd}/boot/initrd.img" +fi + +if [ -L "${rootd}/boot/initrd.img.old" ] && [ ! -e "${rootd}/boot/initrd.img.old" ]; then + rm --verbose "${rootd}/boot/initrd.img.old" fi #### END COMMON ARCH FUNCTIONS @@ -196,8 +200,11 @@ if [ -x "${rootd}/usr/sbin/update-grub" ]; then fi # reconfigure grub so that upgrades to grub-pc do not force a debconf config -# changed prompt (LP: #1009294). This re-runs update-grub -if [ -n "`_xchroot "${rootd}" dpkg-query -W grub-pc 2>/dev/null`" ]; then +# changed prompt (LP: #1009294). This re-runs update-grub. Only do so if grub-pc +# is installed. Determine whether grub-pc is installed by checking for the +# status of the grub-pc package. Only packages installed will result in +# output to the dpkg-query --status command. +if [ -n "`_xchroot "${rootd}" dpkg-query --status grub-pc 2>/dev/null`" ]; then _xchroot "${rootd}" env DEBIAN_FRONTEND=noninteractive \ dpkg-reconfigure grub-pc fi