mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-08 17:31:38 +00:00
Merge branch 'no-maas-squashfs' into lp-1883156
This commit is contained in:
commit
ecc146ea5d
4
debian/changelog
vendored
4
debian/changelog
vendored
@ -1,6 +1,8 @@
|
|||||||
livecd-rootfs (2.525.45) UNRELEASED; urgency=medium
|
livecd-rootfs (2.525.45) UNRELEASED; urgency=medium
|
||||||
|
|
||||||
* Backport snap seeding and other fixes for live-server ISOs:
|
* 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 ]
|
[ Dimitri John Ledkov ]
|
||||||
* Run snap info on the downloaded snap, rather than against the
|
* Run snap info on the downloaded snap, rather than against the
|
||||||
|
@ -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 )
|
|
@ -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