[Merge] ~mwhudson/livecd-rootfs/+git/livecd-rootfs:move-live-server-to-layers-3 into livecd-rootfs:ubuntu/master

Dan Bungert daniel.bungert at canonical.com
Tue Jul 6 23:32:08 UTC 2021


Review: Needs Fixing

Minor things and some questions.

Diff comments:

> diff --git a/debian/changelog b/debian/changelog
> index e6057de..88c8353 100644
> --- a/debian/changelog
> +++ b/debian/changelog
> @@ -1,8 +1,13 @@
>  livecd-rootfs (2.729) UNRELEASED; urgency=medium
>  
> +<<<<<<< debian/changelog

merge conflict markers need removed

>    [ Michael Hudson-Doyle ]
>    * Fix a few things found while porting the liver server ISO builds to
> +=======
> +  * Fix a few things found while porting the live server ISO builds to
> +>>>>>>> debian/changelog
>      layers.
> +  * Port live server ISO builds to layers.
>  
>    [ ChloƩ 'kajiya' Smith ]
>    * Image hangs during boot after deploying groovy-server-cloudimg-amd64.ova,
> diff --git a/live-build/auto/config b/live-build/auto/config
> index df5bc88..1d622e2 100755
> --- a/live-build/auto/config
> +++ b/live-build/auto/config
> @@ -764,12 +764,41 @@ case $PROJECT in
>  		;;
>  
>  	ubuntu-server)
> -		add_task install minimal
>  		case ${SUBPROJECT:-} in
>  			live)
> -				add_task install standard
> -				add_task install server
> -				add_package install cloud-init
> +				PASSES_TO_LAYERS=true
> +				add_task ubuntu-server minimal standard server
> +				# add_task really should do this itself but for now...
> +				snap_from_seed server config/package-lists/livecd-rootfs.snaplist.chroot_ubuntu-server.full
> +				add_package ubuntu-server cloud-init
> +
> +				add_package ubuntu-server.installer linux-firmware lupin-casper openssh-server
> +				add_snap ubuntu-server.installer subiquity/classic
> +				if [ $ARCH = s390x ]; then

There's probably a better answer for s390x specific things but the old code does this too so I wouldn't hold the changeset for that.

> +					add_package ubuntu-server.installer s390-tools-zkey
> +				fi
> +
> +				variants='ga'

This looked weird until I read the removed 033-kernel-bits.binary.
Maybe a quick comment on why we don't want hwe right now?

> +
> +				for variant in $variants; do
> +					if [ "$variant" = "ga" ]; then
> +						kernel_metapkg=linux-generic
> +						flavor=generic
> +					elif [ "$variant" = "hwe" ]; then
> +						kernel_metapkg=linux-generic-hwe-$(lsb_release -sr)
> +						flavor=generic-hwe
> +					else
> +						echo "bogus variant: $variant"
> +						exit 1
> +					fi
> +
> +					add_package ubuntu-server.installer.$flavor $kernel_metapkg
> +					LIVE_PASSES="${LIVE_PASSES:+$LIVE_PASSES }ubuntu-server.installer.$flavor"
> +				done
> +				;;
> +			*)
> +				echo "no thanks"

How about "unrecognized subproject" ?

> +				exit 1
>  				;;
>  		esac
>  		COMPONENTS='main'
> diff --git a/live-build/lb_chroot_layered b/live-build/lb_chroot_layered
> index c08a43e..d6cf49e 100755
> --- a/live-build/lb_chroot_layered
> +++ b/live-build/lb_chroot_layered
> @@ -130,6 +130,14 @@ reduce_pass_size () {
>  		if ! diff --brief --no-dereference "$pass_dir/$f" "$parent_pass_dir/$f" >/dev/null; then
>  			continue
>  		fi
> +		p=$(dirname $f)
> +		while [ "$p" != . ]; do
> +			if [ -n "$(getfattr -n trusted.overlay.opaque -h --only-values -- "$pass_dir/$p" 2>/dev/null)" ]; then

A quick grep of the branch doesn't find other references to opaque - does there need to be a matching setfattr somewhere?  Or maybe that's outside of livecd-rootfs?

> +				Echo_message "reduce_pass_size: '%s' would be removed from overlay but for trusted.overlay.opaque on '%s'" "$f" "$p"
> +				continue 2
> +			fi
> +			p=$(dirname $p)
> +		done
>  		# Files are strictly identical between the 2 passes (only mod or access times differs). No need for unused delta.
>  		Echo_message "reduce_pass_size: '%s' is strictly identical between %s and %s. Removing." "$f" "$pass" "$parent"
>  		rm "$pass_dir/$f"
> diff --git a/live-build/ubuntu-server/hooks/03-kernel-metapkg.chroot_early b/live-build/ubuntu-server/hooks/03-kernel-metapkg.chroot_early
> new file mode 100755
> index 0000000..921960e
> --- /dev/null
> +++ b/live-build/ubuntu-server/hooks/03-kernel-metapkg.chroot_early
> @@ -0,0 +1,37 @@
> +#!/bin/bash -ex
> +# vi: ts=4 noexpandtab
> +
> +case $PASS in
> +    ubuntu-server.installer.*)
> +        flavor=${PASS##*.}
> +	if [ "$flavor" = "generic" ]; then

whitespace weirdness - in the diff it looks like the line starting with flavor has 8 spaces, line starting with if has 7.

> +		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
> +        ;;
> +esac
> +
> +cat <<EOF > /etc/initramfs-tools/scripts/init-bottom/live-server
> +#!/bin/sh
> +case \$1 in
> +prereqs) exit 0;;
> +esac
> +
> +echo ${kernel_metapkg} > /run/kernel-meta-package
> +EOF
> +chmod +x /etc/initramfs-tools/scripts/init-bottom/live-server
> +
> +cat <<EOF > /etc/initramfs-tools/conf.d/casperize.conf
> +export CASPER_GENERATE_UUID=1
> +EOF
> +
> +cat <<EOF > /etc/initramfs-tools/conf.d/default-layer.conf
> +LAYERFS_PATH=${PASS}.squashfs
> +EOF


-- 
https://code.launchpad.net/~mwhudson/livecd-rootfs/+git/livecd-rootfs/+merge/405239
Your team Ubuntu Core Development Team is requested to review the proposed merge of ~mwhudson/livecd-rootfs/+git/livecd-rootfs:move-live-server-to-layers-3 into livecd-rootfs:ubuntu/master.



More information about the Ubuntu-reviews mailing list