mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-08-15 10:44:26 +00:00
Imported 2.525.45
No reason for CPC update specified.
This commit is contained in:
parent
2ffcfdfed7
commit
2720f4bdb3
26
debian/changelog
vendored
26
debian/changelog
vendored
@ -1,3 +1,29 @@
|
||||
livecd-rootfs (2.525.45) bionic; urgency=medium
|
||||
|
||||
[ Francis Ginther ]
|
||||
* Use the linux-raspi-hwe-18.04 kernel for raspi3 classic image builds.
|
||||
(LP: #1889188)
|
||||
|
||||
[ Michael Hudson-Doyle ]
|
||||
* Backport snap seeding and other fixes for live-server ISOs. (LP: #1883156)
|
||||
* Stop building and mounting the mass-rack and maas-region squashfses for
|
||||
the server-live build as subiquity does not use them any more.
|
||||
|
||||
[ Dimitri John Ledkov ]
|
||||
* Run snap info on the downloaded snap, rather than against the
|
||||
store. First of all snap info doesn't have --channel argument, thus
|
||||
queries the wrong channel, and depening on the cohort, a different
|
||||
snap might be visible too. Thus seed the base of the snap revision we
|
||||
dowanloaded, rather than some random one from the store.
|
||||
* Use snap-tool to seed subiquity snap.
|
||||
* Subiquity: install linux-firmware in the installer layer, to make
|
||||
firmware blobs available in the live session. LP: #1847835
|
||||
|
||||
[ Robert C Jennings ]
|
||||
* Fix logic to ensure snapd is seeded in core18-only images (LP: #1871919)
|
||||
|
||||
-- Michael Hudson-Doyle <michael.hudson@ubuntu.com> Wed, 22 Jul 2020 14:44:38 +1200
|
||||
|
||||
livecd-rootfs (2.525.44) bionic; urgency=medium
|
||||
|
||||
* Add support for building uc18 appliance images (LP: #1887673).
|
||||
|
@ -906,7 +906,7 @@ case $ARCH in
|
||||
;;
|
||||
raspi3)
|
||||
COMPONENTS='main restricted universe multiverse'
|
||||
KERNEL_FLAVOURS=raspi2-hwe-18.04
|
||||
KERNEL_FLAVOURS=raspi-hwe-18.04
|
||||
add_package install linux-firmware-raspi2 u-boot-rpi flash-kernel u-boot-tools wpasupplicant
|
||||
BINARY_REMOVE_LINUX=false
|
||||
;;
|
||||
|
@ -439,6 +439,24 @@ _snap_preseed() {
|
||||
return
|
||||
fi
|
||||
|
||||
sh -c "
|
||||
set -x;
|
||||
cd \"$CHROOT_ROOT/var/lib/snapd/seed\";
|
||||
SNAPPY_STORE_NO_CDN=1 snap download \
|
||||
--cohort="${COHORT_KEY:-}" \
|
||||
--channel=\"$CHANNEL\" \"$SNAP_NAME\"" || snap_download_failed=1
|
||||
if [ $snap_download_failed = 1 ] ; then
|
||||
echo "If the channel ($CHANNEL) includes '*/ubuntu-##.##' track per "
|
||||
echo "Ubuntu policy (ex. stable/ubuntu-18.04) the publisher will need "
|
||||
echo "to temporarily create the channel/track to allow fallback during"
|
||||
echo "download (ex. stable/ubuntu-18.04 falls back to stable if the"
|
||||
echo "prior had been created in the past)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mv -v $seed_dir/*.assert $assertions_dir
|
||||
mv -v $seed_dir/*.snap $snaps_dir
|
||||
|
||||
# Pre-seed snap's base
|
||||
local core_snap=""
|
||||
case $SNAP_NAME in
|
||||
@ -452,7 +470,8 @@ _snap_preseed() {
|
||||
# Determine which core snap is needed
|
||||
local snap_info
|
||||
|
||||
snap_info=$(snap info --verbose "${SNAP_NAME}")
|
||||
# snap info doesn't have --channel, so must run agains the downloaded snap
|
||||
snap_info=$(snap info --verbose ${snaps_dir}/${SNAP_NAME}_[0-9]*.snap)
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to retrieve base of $SNAP_NAME!"
|
||||
@ -468,24 +487,6 @@ _snap_preseed() {
|
||||
;;
|
||||
esac
|
||||
|
||||
sh -c "
|
||||
set -x;
|
||||
cd \"$CHROOT_ROOT/var/lib/snapd/seed\";
|
||||
SNAPPY_STORE_NO_CDN=1 snap download \
|
||||
--cohort=\"${COHORT_KEY:-}\" \
|
||||
--channel=\"$CHANNEL\" \"$SNAP_NAME\"" || snap_download_failed=1
|
||||
if [ $snap_download_failed = 1 ] ; then
|
||||
echo "If the channel ($CHANNEL) includes '*/ubuntu-##.##' track per "
|
||||
echo "Ubuntu policy (ex. stable/ubuntu-18.04) the publisher will need "
|
||||
echo "to temporarily create the channel/track to allow fallback during"
|
||||
echo "download (ex. stable/ubuntu-18.04 falls back to stable if the"
|
||||
echo "prior had been created in the past)."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mv -v $seed_dir/*.assert $assertions_dir
|
||||
mv -v $seed_dir/*.snap $snaps_dir
|
||||
|
||||
# Add the snap to the seed.yaml
|
||||
! [ -e $seed_yaml ] && echo "snaps:" > $seed_yaml
|
||||
cat <<EOF >> $seed_yaml
|
||||
@ -499,11 +500,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() {
|
||||
@ -559,12 +556,6 @@ snap_prepare() {
|
||||
local snaps_dir="$seed_dir/snaps"
|
||||
|
||||
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() {
|
||||
|
@ -1,91 +0,0 @@
|
||||
#!/bin/bash -ex
|
||||
# vi: ts=4 noexpandtab
|
||||
#
|
||||
# Generate a squashfs root and manifest
|
||||
|
||||
set -x
|
||||
|
||||
echo "031-maas-squashfs.binary"
|
||||
|
||||
case $IMAGE_TARGETS in
|
||||
""|*squashfs*)
|
||||
;;
|
||||
*)
|
||||
echo "Skipping squashfs build"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
if [ -n "$SUBARCH" ]; then
|
||||
echo "Skipping rootfs build for subarch flavor build"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
. config/functions
|
||||
. config/common
|
||||
|
||||
SQUASH_ROOT=binary/boot/squashfs.dir
|
||||
|
||||
RACK_ROOT=binary/boot/squashfs-rack.dir
|
||||
REGION_ROOT=binary/boot/squashfs-region.dir
|
||||
|
||||
OVERLAY_RACK_ROOT=binary/overlay-maas-rack
|
||||
OVERLAY_REGION_ROOT=binary/overlay-maas-region
|
||||
|
||||
mkdir -p "$RACK_ROOT"
|
||||
mkdir -p "$REGION_ROOT"
|
||||
|
||||
mkdir -p "$OVERLAY_RACK_ROOT"
|
||||
mkdir -p "$OVERLAY_REGION_ROOT"
|
||||
|
||||
# RACK is on top of the regular squashfs
|
||||
|
||||
mount_overlay "$SQUASH_ROOT/" "$OVERLAY_RACK_ROOT/" "$RACK_ROOT/" "RACK"
|
||||
|
||||
setup_mountpoint $RACK_ROOT
|
||||
env DEBIAN_FRONTEND=noninteractive chroot $RACK_ROOT apt-get -y install maas-rack-controller
|
||||
rm -f $RACK_ROOT/etc/maas/rackd.conf
|
||||
chroot $RACK_ROOT sh -c 'echo RESET maas/default-maas-url | debconf-communicate maas-common'
|
||||
chroot $RACK_ROOT sh -c 'echo RESET maas-rack-controller/maas-url | debconf-communicate maas-common'
|
||||
chroot $RACK_ROOT sh -c 'echo RESET maas-rack-controller/maas-url | debconf-communicate maas-rack-controller'
|
||||
teardown_mountpoint $RACK_ROOT
|
||||
|
||||
umount "$RACK_ROOT"
|
||||
|
||||
# Full MAAS (Region) is on top of the rack
|
||||
# in overlayfs lowerdir are mounted right to left, colon separated
|
||||
mount_overlay "$OVERLAY_RACK_ROOT/:$SQUASH_ROOT/" "$OVERLAY_REGION_ROOT/" "$REGION_ROOT/" "REGION"
|
||||
|
||||
setup_mountpoint $REGION_ROOT
|
||||
|
||||
env DEBIAN_FRONTEND=noninteractive chroot $REGION_ROOT apt-get -y install maas
|
||||
|
||||
# Forget how things had to be configured
|
||||
chroot $REGION_ROOT debconf -fnoninteractive -omaas-region-controller /var/lib/dpkg/info/maas-region-controller.prerm remove
|
||||
chroot $REGION_ROOT debconf -fnoninteractive -omaas-region-controller /var/lib/dpkg/info/maas-region-controller.postrm remove
|
||||
chroot $REGION_ROOT debconf -fnoninteractive -omaas-region-controller /var/lib/dpkg/info/maas-region-controller.postrm purge
|
||||
chroot $REGION_ROOT sh -c 'echo RESET maas/default-maas-url | debconf-communicate maas-common'
|
||||
chroot $REGION_ROOT sudo -u postgres psql -c 'alter role maas password null;'
|
||||
rm -f $REGION_ROOT/etc/maas/rackd.conf
|
||||
rm -f $REGION_ROOT/etc/maas/regiond.conf
|
||||
chroot $REGION_ROOT pg_ctlcluster $(/bin/ls $REGION_ROOT/var/lib/postgresql/) main stop || :
|
||||
|
||||
# After the install, one may call the below to "reconfigure" maas-region-controller
|
||||
## debconf -fnoninteractive -omaas-region-controller /var/lib/dpkg/info/maas-region-controller.config configure
|
||||
## debconf -fnoninteractive -omaas-region-controller /var/lib/dpkg/info/maas-region-controller.postinst configure
|
||||
|
||||
teardown_mountpoint "$REGION_ROOT"
|
||||
|
||||
umount "$REGION_ROOT"
|
||||
|
||||
squashfs_rack_f="${PWD}/livecd.${PROJECT}.maas-rack.squashfs"
|
||||
|
||||
(cd "$OVERLAY_RACK_ROOT/" &&
|
||||
mksquashfs . ${squashfs_rack_f} \
|
||||
-no-progress -xattrs -comp xz )
|
||||
|
||||
squashfs_region_f="${PWD}/livecd.${PROJECT}.maas-region.squashfs"
|
||||
|
||||
(cd "$OVERLAY_REGION_ROOT/" &&
|
||||
mksquashfs . ${squashfs_region_f} \
|
||||
-no-progress -xattrs -comp xz )
|
@ -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
|
||||
@ -52,6 +54,8 @@ EOF
|
||||
|
||||
# Install casper for live session magic.
|
||||
chroot $INSTALLER_ROOT apt-get -y install lupin-casper
|
||||
# Install linux-firmware for kernel to upload into hardware.
|
||||
chroot $INSTALLER_ROOT apt-get -y install linux-firmware
|
||||
chroot $INSTALLER_ROOT apt-get clean
|
||||
|
||||
# For bug #1743643 "Install to dirty disk with swap fails" remove the
|
||||
@ -61,33 +65,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"
|
||||
|
||||
|
@ -1,5 +0,0 @@
|
||||
[Mount]
|
||||
What=/cdrom/casper/maas/maas-rack.squashfs
|
||||
Where=/media/rack.lower
|
||||
Type=squashfs
|
||||
Options=ro
|
@ -1,5 +0,0 @@
|
||||
[Mount]
|
||||
What=/cdrom/casper/maas/maas-region.squashfs
|
||||
Where=/media/region.lower
|
||||
Type=squashfs
|
||||
Options=ro
|
Loading…
x
Reference in New Issue
Block a user