[Merge] ~vorlon/livecd-rootfs:flavor-refactor into livecd-rootfs:ubuntu/master

Dan Bungert mp+463269 at code.launchpad.net
Thu Mar 28 22:05:31 UTC 2024


Review: Approve

I feel reasonably certain that this is correct, but with the quantity of changes it's hard to tell.  I suggest that PPA builds be run and the resulting catalog files can be compared, which should limit most of the risk.

Diff comments:

> diff --git a/live-build/auto/config b/live-build/auto/config
> index c819d54..c0288a1 100755
> --- a/live-build/auto/config
> +++ b/live-build/auto/config
> @@ -662,6 +658,118 @@ if ! [ -e config/germinate-output/structure ]; then
>                  -s $FLAVOUR.$SUITE $GERMINATE_ARG -a $ARCH)
>  fi
>  
> +do_layered_desktop_image() {
> +	touch config/universe-enabled
> +	PASSES_TO_LAYERS="true"
> +	if [ -n "$HAS_MINIMAL" ]; then
> +		if [ -z "$MINIMAL_TASKS" ]; then
> +			MINIMAL_TASKS="${FLAVOUR}-desktop-minimal"
> +			if [ -n "$HAS_DEFAULT_LANGUAGES" ]; then
> +				MINIMAL_TASKS="$MINIMAL_TASKS ${FLAVOUR}-desktop-minimal-default-languages"
> +			fi
> +		fi
> +		# the minimal layer, for minimal installs
> +		add_task minimal minimal standard $MINIMAL_TASKS
> +		# fixme: this should go in seeds, not be in code here
> +		add_package minimal cloud-init

ah, ok, that's one of the bugs (cloud-init missing) I was worried about which prompted the desire for a seed audit.  Yes moving that to the seeds would be good.  If we don't merge this MP before beta then this will need fixed some other way.

> +		MINIMAL_PREFIX=minimal.
> +	fi
> +
> +	LIVE_PREFIX=$MINIMAL_PREFIX
> +	# the standard layer, contains all base common packages for later layers
> +	if [ "$HAS_STANDARD" != no ]; then
> +		if [ -z "$STANDARD_TASKS" ]; then
> +			STANDARD_TASKS="${FLAVOUR}-desktop"
> +			if [ -n "$HAS_DEFAULT_LANGUAGES" ]; then
> +				STANDARD_TASKS="$STANDARD_TASKS ${FLAVOUR}-desktop-default-languages"
> +			fi
> +		fi
> +		if [ -z "$HAS_MINIMAL" ]; then
> +			STANDARD_TASKS="minimal standard $STANDARD_TASKS"
> +			add_package standard cloud-init
> +		fi
> +		add_task ${MINIMAL_PREFIX}standard $STANDARD_TASKS
> +		LIVE_PREFIX="${LIVE_PREFIX}standard."
> +	fi
> +
> +	# the live layer, contains all packages for the live session installer
> +	[ -n "$LIVE_TASK" ] || LIVE_TASK=${FLAVOUR}-live
> +	add_task ${LIVE_PREFIX}live "$LIVE_TASK"
> +	add_package ${LIVE_PREFIX}live linux-$KERNEL_FLAVOURS casper
> +
> +	if [ -n "$LANGUAGE_BASE" ]; then
> +		# language support
> +		seeded_langs="$(get_seeded_languages $LANGUAGE_BASE)"
> +		echo "$seeded_langs" | tr ' ' ',' > config/seeded-languages
> +		if [ -n "$HAS_MINIMAL" ]; then
> +			derive_language_layers minimal \
> +				${LANGUAGE_BASE}-minimal \
> +				${LANGUAGE_BASE}-minimal-default-languages \
> +				"$seeded_langs"
> +		fi
> +		if [ "$HAS_STANDARD" != no ]; then
> +			derive_language_layers ${LIVE_PREFIX%.} $LANGUAGE_BASE \
> +				${LANGUAGE_BASE}-default-languages \
> +				"$seeded_langs"
> +		fi
> +	fi
> +
> +	# now let's create the necessary catalog files
> +	[ -n "$LOCALE_SUPPORT" ] || LOCALE_SUPPORT=langpack
> +
> +	[ -n "$UCFLAVOUR" ] || UCFLAVOUR=$(echo $FLAVOUR | sed -e's/^./\U&\E/')
> +	[ -n "$STANDARD_NAME" ] || STANDARD_NAME="$UCFLAVOUR Desktop"
> +	[ -n "$STANDARD_DESC" ] \
> +	|| STANDARD_DESC="A full featured $UCFLAVOUR Desktop."
> +
> +	if [ -z "$MINIMAL_IS_DEFAULT" ]; then
> +		if [ "$HAS_STANDARD" = no ]; then
> +			MINIMAL_IS_DEFAULT=yes
> +		else
> +			MINIMAL_IS_DEFAULT=no
> +		fi
> +	fi
> +	if [ "$MINIMAL_IS_DEFAULT" = yes ]; then
> +		STANDARD_IS_DEFAULT=no
> +	else
> +		STANDARD_IS_DEFAULT=yes
> +	fi
> +
> +	if [ -n "$HAS_MINIMAL" ]; then
> +		[ -n "$MINIMAL_NAME" ] \
> +		|| MINIMAL_NAME="$STANDARD_NAME (minimized)"
> +
> +		cat <<-EOF > config/minimal.catalog-in.yaml
> +			name: "$MINIMAL_NAME"
> +			description: >-
> +			  $MINIMAL_DESC
> +			id: ${FLAVOUR}-desktop-minimal
> +			type: fsimage-layered
> +			default: $MINIMAL_IS_DEFAULT
> +			variant: desktop
> +			locale_support: $LOCALE_SUPPORT
> +		EOF
> +	fi
> +	if [ "$HAS_STANDARD" != no ]; then
> +		cat <<-EOF > config/${MINIMAL_PREFIX}standard.catalog-in.yaml
> +			name: "$STANDARD_NAME"
> +			description: >-
> +			  $STANDARD_DESC
> +			id: ${FLAVOUR}-desktop
> +			type: fsimage-layered
> +			default: $STANDARD_IS_DEFAULT
> +			variant: desktop
> +			locale_support: $LOCALE_SUPPORT
> +		EOF
> +	fi
> +
> +	if [ "$LOCALE_SUPPORT" != none ]; then
> +		/usr/share/livecd-rootfs/checkout-translations-branch \
> +			https://git.launchpad.net/subiquity po \
> +			config/catalog-translations
> +	fi
> +}
> +
>  case $PROJECT in
>  	ubuntu)
>  		case ${SUBPROJECT:-} in


-- 
https://code.launchpad.net/~vorlon/livecd-rootfs/+git/livecd-rootfs/+merge/463269
Your team Ubuntu Core Development Team is subscribed to branch livecd-rootfs:ubuntu/master.




More information about the Ubuntu-reviews mailing list