diff --git a/live-build/auto/config b/live-build/auto/config index 1d622e2c..499a7d5b 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -778,6 +778,12 @@ case $PROJECT in add_package ubuntu-server.installer s390-tools-zkey fi + # Live server ISOs for LTS point releases past .2 offer both + # the GA and HWE kernels (in separate layers) so this code is + # written generically to support both even though a lot of the + # time only one kernel is offered. + + # variants='ga hwe' variants='ga' for variant in $variants; do @@ -797,7 +803,7 @@ case $PROJECT in done ;; *) - echo "no thanks" + echo "unrecognized subproject for server: '$SUBPROJECT'" exit 1 ;; esac diff --git a/live-build/lb_chroot_layered b/live-build/lb_chroot_layered index d6cf49ee..2c7cbcfa 100755 --- a/live-build/lb_chroot_layered +++ b/live-build/lb_chroot_layered @@ -132,6 +132,17 @@ reduce_pass_size () { fi p=$(dirname $f) while [ "$p" != . ]; do + # As explained in the overlayfs documentation + # https://www.kernel.org/doc/html/latest/filesystems/overlayfs.html#whiteouts-and-opaque-directories + # an xattr of trusted.overlay.opaque indicates an 'opaque' directory + # that was deleted from the overlay. Removing files from within the + # directory, even if identical with one in the lower layer, will result + # in it going missing from the combined filesystem. + # + # It would be possible to be more clever, e.g. if the two directories + # are still similar, we could the delete the attribute and convert any + # still-needed deletions to whiteouts but it doesn't seem worth it in + # the cases seen so far. if [ -n "$(getfattr -n trusted.overlay.opaque -h --only-values -- "$pass_dir/$p" 2>/dev/null)" ]; then Echo_message "reduce_pass_size: '%s' would be removed from overlay but for trusted.overlay.opaque on '%s'" "$f" "$p" continue 2 diff --git a/live-build/ubuntu-server/hooks/03-kernel-metapkg.chroot_early b/live-build/ubuntu-server/hooks/03-kernel-metapkg.chroot_early index 921960e5..7e99c6bf 100755 --- a/live-build/ubuntu-server/hooks/03-kernel-metapkg.chroot_early +++ b/live-build/ubuntu-server/hooks/03-kernel-metapkg.chroot_early @@ -4,14 +4,14 @@ case $PASS in ubuntu-server.installer.*) flavor=${PASS##*.} - if [ "$flavor" = "generic" ]; then - kernel_metapkg=linux-generic - elif [ "$flavor" = "generic-hwe" ]; then - kernel_metapkg=linux-generic-hwe-$(lsb_release -sr) - else - echo "bogus flavor: $flavor" - exit 1 - fi + if [ "$flavor" = "generic" ]; then + kernel_metapkg=linux-generic + elif [ "$flavor" = "generic-hwe" ]; then + kernel_metapkg=linux-generic-hwe-$(lsb_release -sr) + else + echo "bogus flavor: $flavor" + exit 1 + fi ;; *) exit 0