From 14066ce3895fe0fdb3768146b6ed2d5dca276e82 Mon Sep 17 00:00:00 2001 From: Robert C Jennings Date: Thu, 9 Apr 2020 14:36:35 -0500 Subject: [PATCH 1/3] Fix logic to ensure snapd is seeded in core18-only images The _snap_post_process function is meant to install snapd if core18 is the only core snap installed or removed snapd if core is installed and snapd was not explicitly installed. But the current logic in _snap_preseed will never call _snap_post_process. $core_name will never be empty with the existing logic, but even if it were that would only be for the 'core' snap and we'd miss using the 'core18' logic that pulls in snapd. Given the case statement in _snap_post_process can handle doing the right thing given any snap we can just call it unconditionally. --- live-build/functions | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/live-build/functions b/live-build/functions index 4daa6932..dd047c65 100644 --- a/live-build/functions +++ b/live-build/functions @@ -541,11 +541,7 @@ EOF echo -n " file: " >> $seed_yaml (cd $snaps_dir; ls -1 ${SNAP_NAME}_*.snap) >> $seed_yaml - # If $core_snap is the empty string then SNAP itself *may be* a core snap, - # and we run some post-processing logic. - if [ -z "$core_snap" ]; then - _snap_post_process $CHROOT_ROOT $SNAP_NAME - fi + _snap_post_process $CHROOT_ROOT $SNAP_NAME } snap_prepare_assertions() { From 66041e9d8cc62522d36455de2e3ab321a9735ea2 Mon Sep 17 00:00:00 2001 From: Robert C Jennings Date: Thu, 9 Apr 2020 14:38:45 -0500 Subject: [PATCH 2/3] Do not unconditionally install the core snap Seeing any snap via snap_preseed will evaluate the base for each snap and seed the appropriate base. There should be no reason to explicitly seed the 'core' snap and with snaps moving to 'core18' this will add 'core' without need. --- live-build/functions | 6 ------ 1 file changed, 6 deletions(-) diff --git a/live-build/functions b/live-build/functions index dd047c65..f730e0ba 100644 --- a/live-build/functions +++ b/live-build/functions @@ -620,12 +620,6 @@ snap_prepare() { local CUSTOM_BRAND_MODEL=${2:-generic:generic-classic} snap_prepare_assertions "$CHROOT_ROOT" "$CUSTOM_BRAND_MODEL" - - # ubuntu-cpc:minimized has its own special snap handling - if [ "$PROJECT:${SUBPROJECT:-}" != ubuntu-cpc:minimized ]; then - # Download the core snap - _snap_preseed "$CHROOT_ROOT" core stable - fi } snap_preseed() { From 903e743c7980bd4478f6e6c11b23c806a3d31579 Mon Sep 17 00:00:00 2001 From: Robert C Jennings Date: Thu, 9 Apr 2020 14:38:53 -0500 Subject: [PATCH 3/3] Release 2.659 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 520865b2..a0bcd257 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.659) focal; urgency=medium + + * Fix logic to ensure snapd is seeded in core18-only images (LP: #1871919) + + -- Robert C Jennings Thu, 09 Apr 2020 14:16:40 -0500 + livecd-rootfs (2.658) focal; urgency=medium * Remove some deprecated raspi2 special-casing, switch the main universal