From a373fb527c76e664d226a79177b4e302d77dc829 Mon Sep 17 00:00:00 2001 From: Philip Roche Date: Thu, 17 Aug 2023 11:50:20 +0100 Subject: [PATCH] fix: Install required package fuse3 when preseeding snaps (LP: #2031640) fuse3 was previously installed through recommends but with minimized images we no longer install recommends packages. It is only required when preseeding snaps so does not need to be present in all minimized images so does not need to be in the cloud-minimal seed. --- debian/changelog | 1 + live-build/functions | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/debian/changelog b/debian/changelog index 7bf741d4..7d7dd8fe 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ 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 (LP: #2031640) * fix: Ensure required dependencies are installed before trying `grub-install` (LP: #2031640) + * fix: Install required package fuse3 when preseeding snaps (LP: #2031640) -- Philip Roche Thu, 17 Aug 2023 11:44:23 +0100 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)