Allow choosing snap channel on subiquity ISOs

xnox/virtual-armhf
Dan Bungert 2 years ago
parent 761dc8f9b2
commit 3397098ff8

@ -189,8 +189,13 @@ add_snap ()
_check_immutable_passes_to_layers
_register_pass "$pass"
local channel=""
if [ -n "$CHANNEL" ] ; then
channel="=$CHANNEL"
fi
for pkg; do
echo "$pkg" >> "config/package-lists/livecd-rootfs.snaplist.chroot_$pass.full"
echo "$pkg$channel" >> "config/package-lists/livecd-rootfs.snaplist.chroot_$pass.full"
done
}
@ -1339,6 +1344,7 @@ echo "LB_BINARY_HOOKS=\"$BINARY_HOOKS\"" >> config/binary
echo "BUILDSTAMP=\"$NOW\"" >> config/binary
echo "SUBPROJECT=\"${SUBPROJECT:-}\"" >> config/binary
echo "LB_DISTRIBUTION=\"$SUITE\"" >> config/binary
echo "CHANNEL=\"${CHANNEL:-}\"" >> config/binary
if [ "${IMAGE_HAS_HARDCODED_PASSWORD:-}" = "1" ]; then
echo IMAGE_HAS_HARDCODED_PASSWORD=1 >> config/binary

@ -107,7 +107,12 @@ Ekm0W8qT4AT0GSk5CY8kx+UvCn6FLxMuv8xjWoX3OLcQx31yO6Uy6c2LN6nSlovDghKP5V1KvlKl
WiXM9CPKCZv/Es3uOp/ke0wWL7v0MZhzUJ+QhOtTNg==
EOF
env SNAPPY_STORE_NO_CDN=1 snap prepare-image --classic config/classic-model.model chroot
channel=""
if [ -n "$CHANNEL" ]; then
channel="--channel $CHANNEL"
fi
env SNAPPY_STORE_NO_CDN=1 snap prepare-image \
--classic config/classic-model.model $channel chroot
mv chroot/system-seed/systems/* chroot/system-seed/systems/enhanced-secureboot-desktop
rsync -a chroot/system-seed/ chroot/var/lib/snapd/seed
rm -rf chroot/system-seed/

@ -63,7 +63,12 @@ oPijs/y+KJ4DbdrmiwwWCxQZcx2T5GG4HB38eIsnmEWTyml02lOL9sWq6qKuk95a3DhF+Q02+zkG
c3kEHr8kcSEkJtgwre/RjjlvGYhur1rZ4i0G6gGBLw==
EOF
env SNAPPY_STORE_NO_CDN=1 snap prepare-image --classic config/classic-model-installer.model chroot
channel=""
if [ -n "$CHANNEL" ]; then
channel="--channel $CHANNEL"
fi
env SNAPPY_STORE_NO_CDN=1 snap prepare-image \
--classic config/classic-model-installer.model $channel chroot
mv chroot/system-seed/systems/* chroot/system-seed/systems/classic-installer
rsync -a chroot/system-seed/ chroot/var/lib/snapd/seed
rm -rf chroot/system-seed/

Loading…
Cancel
Save