include a sanity check that no layered image has more than one "live" layer

This would cause undefined behavior with the LAYERFS_LIVE handling in the
hook.
use-lxd-installer
Steve Langasek 1 year ago
parent 80cd4153e1
commit cdcb44ebf9

3
debian/changelog vendored

@ -4,6 +4,9 @@ livecd-rootfs (24.04.15) UNRELEASED; urgency=medium
layer ending in .live so this can be reused across flavors layer ending in .live so this can be reused across flavors
* live-build/ubuntu/hooks/020-ubuntu-live.chroot_early: check for * live-build/ubuntu/hooks/020-ubuntu-live.chroot_early: check for
glib-compile-schemas presence before calling glib-compile-schemas presence before calling
* live-build/auto/config: include a sanity check that no layered image has
more than one "live" layer that would cause undefined behavior with the
above hook.
-- Steve Langasek <steve.langasek@ubuntu.com> Wed, 20 Dec 2023 19:45:34 -0800 -- Steve Langasek <steve.langasek@ubuntu.com> Wed, 20 Dec 2023 19:45:34 -0800

@ -107,6 +107,18 @@ _register_pass () {
# $1 Name of the pass # $1 Name of the pass
[ "$PASSES_TO_LAYERS" != "true" ] && return [ "$PASSES_TO_LAYERS" != "true" ] && return
# live-build/ubuntu/hooks/020-ubuntu-live.chroot_early assumes the
# layer ending in '.live' is THE live layer to use, so ensure that
# we only define a single layer ending in '.live'. It principle it
# is not invalid to have multiple layers with .live in the name but
# we should not let this happen accidentally.
case "$PASSES $1" in
*.live *.live)
EXPLODE
;;
*)
;;
esac
PASSES="$PASSES $1" PASSES="$PASSES $1"
} }

Loading…
Cancel
Save