mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-08 17:31:38 +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
|
livecd-rootfs (2.582) eoan; urgency=medium
|
||||||
|
|
||||||
* Don't purge busybox-static in minimized, no longer installed
|
* Don't purge busybox-static in minimized, no longer installed
|
||||||
|
@ -23,6 +23,8 @@ fi
|
|||||||
|
|
||||||
. config/functions
|
. config/functions
|
||||||
. config/common
|
. config/common
|
||||||
|
# somehow i don't have LB_DISTRIBUTION set ?!
|
||||||
|
. config/bootstrap
|
||||||
|
|
||||||
FILESYSTEM_ROOT=binary/boot/squashfs.dir
|
FILESYSTEM_ROOT=binary/boot/squashfs.dir
|
||||||
INSTALLER_ROOT=binary/boot/installer.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.
|
# Don't let cloud-init run in the live session.
|
||||||
touch $INSTALLER_ROOT/etc/cloud/cloud-init.disabled
|
touch $INSTALLER_ROOT/etc/cloud/cloud-init.disabled
|
||||||
|
|
||||||
# Do the snap seeding dance.
|
# Preseed subiquity into installer layer
|
||||||
chroot $INSTALLER_ROOT mkdir -p /var/lib/snapd/seed/snaps /var/lib/snapd/seed/assertions
|
snap_prepare $INSTALLER_ROOT
|
||||||
chroot $INSTALLER_ROOT sh -c '
|
snap_preseed $INSTALLER_ROOT subiquity/classic
|
||||||
set -x;
|
# Drop lxd from the installer layer preseed
|
||||||
mkdir -p /var/lib/snapd/seed/snaps/
|
sed -i -e'N;/name: lxd/,+2d' $INSTALLER_ROOT/var/lib/snapd/seed/seed.yaml
|
||||||
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
|
|
||||||
'
|
|
||||||
|
|
||||||
teardown_mountpoint "$INSTALLER_ROOT"
|
teardown_mountpoint "$INSTALLER_ROOT"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user