mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-03-11 19:31:18 +00:00
Use snap-tool to seed subiquity snap.
This commit is contained in:
parent
66e382d73b
commit
ba49d6db5f
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
||||
livecd-rootfs (2.583) UNRELEASED; urgency=medium
|
||||
|
||||
* Use snap-tool to seed subiquity snap.
|
||||
|
||||
-- Dimitri John Ledkov <xnox@ubuntu.com> Mon, 13 May 2019 17:37:25 +0200
|
||||
|
||||
livecd-rootfs (2.582) eoan; urgency=medium
|
||||
|
||||
* Don't purge busybox-static in minimized, no longer installed
|
||||
|
@ -23,6 +23,8 @@ fi
|
||||
|
||||
. config/functions
|
||||
. config/common
|
||||
# somehow i don't have LB_DISTRIBUTION set ?!
|
||||
. config/bootstrap
|
||||
|
||||
FILESYSTEM_ROOT=binary/boot/squashfs.dir
|
||||
INSTALLER_ROOT=binary/boot/installer.squashfs.dir
|
||||
@ -61,33 +63,11 @@ rm -f $INSTALLER_ROOT/usr/share/initramfs-tools/scripts/casper-bottom/*swap
|
||||
# Don't let cloud-init run in the live session.
|
||||
touch $INSTALLER_ROOT/etc/cloud/cloud-init.disabled
|
||||
|
||||
# Do the snap seeding dance.
|
||||
chroot $INSTALLER_ROOT mkdir -p /var/lib/snapd/seed/snaps /var/lib/snapd/seed/assertions
|
||||
chroot $INSTALLER_ROOT sh -c '
|
||||
set -x;
|
||||
mkdir -p /var/lib/snapd/seed/snaps/
|
||||
cd /var/lib/snapd/seed/snaps/;
|
||||
if [ ! -e core_*.snap ]; then
|
||||
SNAPPY_STORE_NO_CDN=1 snap download core
|
||||
fi
|
||||
SNAPPY_STORE_NO_CDN=1 snap download subiquity;
|
||||
|
||||
CORE_SNAP=$(ls -1 core_*.snap);
|
||||
SUBIQUITY_SNAP=$(ls -1 subiquity*.snap);
|
||||
|
||||
mv *.assert /var/lib/snapd/seed/assertions/;
|
||||
|
||||
cat <<EOF > /var/lib/snapd/seed/seed.yaml
|
||||
snaps:
|
||||
- name: core
|
||||
channel: stable
|
||||
file: ${CORE_SNAP}
|
||||
- name: subiquity
|
||||
channel: stable
|
||||
classic: true
|
||||
file: ${SUBIQUITY_SNAP}
|
||||
EOF
|
||||
'
|
||||
# Preseed subiquity into installer layer
|
||||
snap_prepare $INSTALLER_ROOT
|
||||
snap_preseed $INSTALLER_ROOT subiquity/classic
|
||||
# Drop lxd from the installer layer preseed
|
||||
sed -i -e'N;/name: lxd/,+2d' $INSTALLER_ROOT/var/lib/snapd/seed/seed.yaml
|
||||
|
||||
teardown_mountpoint "$INSTALLER_ROOT"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user