[Merge] livecd-rootfs:ui-by-default into livecd-rootfs:ubuntu/master

Loïc Minier mp+434682 at code.launchpad.net
Tue May 23 08:35:06 UTC 2023



Diff comments:

> diff --git a/live-build/auto/build b/live-build/auto/build
> index ddbb733..ee0f60e 100755
> --- a/live-build/auto/build
> +++ b/live-build/auto/build
> @@ -89,8 +89,14 @@ PREFIX="livecd.$PROJECT${SUBARCH:+-$SUBARCH}"
>  if [ "${IMAGEFORMAT:-}" = "ubuntu-image" ]; then
>  	# Use ubuntu-image instead of live-build
>  
> +	export SNAPPY_STORE_NO_CDN=1
> +	snap install --classic --channel=candidate ubuntu-image
> +
> +	# TODO: eventually, this should be handled by a single ubuntu-image
> +	#  call without having to do a conditional on ubuntu-core/classic.
> +	#  We could already do that, but then we'd still have to do the
> +	#  compressing for the core images.
>  	if [ "$PROJECT" = "ubuntu-core" ]; then
> -		env SNAPPY_STORE_NO_CDN=1 \
>  		ubuntu-image snap $UBUNTU_IMAGE_ARGS \

We should either call /snap/bin/ubuntu-image, or change PATH to prefer /snap/bin (probably too invasive), or fail live-build if the ubuntu-image deb is installed; otherwise if you have the deb and the snap, the deb is preferred.

>  			-O output "$PREFIX".model-assertion
>  		# XXX: currently we only have one image generated, but really
> diff --git a/live-build/auto/config b/live-build/auto/config
> index db1da0d..62305f9 100755
> --- a/live-build/auto/config
> +++ b/live-build/auto/config
> @@ -507,41 +508,20 @@ case $IMAGEFORMAT in
>  		else
>  			# classic images
>  
> -			# Certain models have different names but are built from the same source gadget tree
> -			case $MODEL in
> -				pi-arm64|pi3-arm64)
> -					MODEL=pi
> -					;;
> -				intel-iot)
> -					MODEL=pc
> -					;;
> -			esac
> -
> -			GADGET_TARGET="server"
> -			if [ "$SUBPROJECT" = "desktop-preinstalled" ]; then
> -				GADGET_TARGET="desktop"
> -			fi
> +			IMAGE_PROJECT=$PROJECT
> +			[ "$IMAGE_PROJECT" = "ubuntu-cpc" ] && IMAGE_PROJECT="ubuntu-server"
> +			DEFINITION="$IMAGE_PROJECT-$MODEL.yaml"
>  
> -			UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS${SUBPROJECT:+ --subproject \"$SUBPROJECT\"}"
> -			UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS${PROPOSED:+ --with-proposed}"
> -			UBUNTU_IMAGE_ARGS="$UBUNTU_IMAGE_ARGS${EXTRA_PPAS:+ --extra-ppas \"$EXTRA_PPAS\"}"
> -
> -			# We need to look in two places for the gadget tree:
> -			# - Launchpad hosted gadgets will be in the snap-gadget repo
> -			# - Github hosted gadgets are mirrored into a github-mirror repo
> -			BRANCH="classic"
> -			git clone git://git.launchpad.net/~canonical-foundations/snap-$MODEL/+git/snap-$MODEL -b $BRANCH config/$PREFIX-gadget || git clone git://git.launchpad.net/~canonical-foundations/snap-$MODEL/+git/github-mirror -b $BRANCH config/$PREFIX-gadget || git clone git://git.launchpad.net/~canonical-foundations/snap-$MODEL/+git/github-mirror-$ARCH -b $BRANCH config/$PREFIX-gadget
> -
> -			echo "IMAGEFORMAT=$IMAGEFORMAT" >> config/common
> -			echo "SUITE=$SUITE" >> config/common
> -			echo "GADGET_TARGET=$GADGET_TARGET" >> config/common
> -			echo "UBUNTU_IMAGE_ARGS=\"$UBUNTU_IMAGE_ARGS\"" >> config/common
> -
> -			echo "Configured ubuntu-image for the following gadget model: $MODEL"
> +			git clone git://git.launchpad.net/ubuntu-images -b $SUITE image-definitions

It would be nice to have an override mechanism from launchpad-buildd env to override the git repo here

> +			cp image-definitions/$DEFINITION "$PREFIX".yaml
> +			echo "Configured ubuntu-image for the following image-definition:"
> +			cat "$PREFIX".yaml
> +			echo "----------------------------------------------------------"
>  		fi
>  
>  		# Save the model name used for building, mostly for any model-specific hook execution
>  		echo "MODEL=$MODEL" >> config/common
> +		echo "IMAGEFORMAT=$IMAGEFORMAT" >> config/common
>  		# Fake finished configuration for lb build
>  		mkdir -p .build
>  		touch .build/config


-- 
https://code.launchpad.net/~ubuntu-core-dev/livecd-rootfs/+git/livecd-rootfs/+merge/434682
Your team Ubuntu Core Development Team is requested to review the proposed merge of livecd-rootfs:ui-by-default into livecd-rootfs:ubuntu/master.




More information about the Ubuntu-reviews mailing list