From 9ff34ae65ec307efeb917b366fda0e46004e1dd8 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 1113de03..db11fe03 100644 --- a/live-build/functions +++ b/live-build/functions @@ -536,11 +536,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 909a6f8bfb12d48762c85dd96e52915d180f4b32 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 db11fe03..279bfa8d 100644 --- a/live-build/functions +++ b/live-build/functions @@ -615,12 +615,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 e4e05f1c1d7f39b7e4a8bc6e40ba4f1c69cea767 Mon Sep 17 00:00:00 2001 From: Robert C Jennings Date: Wed, 15 Apr 2020 10:07:45 -0500 Subject: [PATCH 3/3] Release 2.620.2 --- debian/changelog | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/debian/changelog b/debian/changelog index 9d751e0f..e7f415f6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +livecd-rootfs (2.620.2) eoan; urgency=medium + + * Fix logic to ensure snapd is seeded in core18-only images (LP: #1871919) + + -- Robert C Jennings Wed, 15 Apr 2020 10:05:55 -0500 + livecd-rootfs (2.620.1) eoan; urgency=medium * Use snap cli rather than custom snap-tool (LP: #1864252)