[Merge] ~mwhudson/livecd-rootfs/+git/livecd-rootfs:no-snaps-ubuntu-cpc-minimized into livecd-rootfs:ubuntu/master

Steve Langasek steve.langasek at canonical.com
Tue Mar 12 04:25:27 UTC 2019


Review: Needs Information



Diff comments:

> diff --git a/live-build/auto/build b/live-build/auto/build
> index b4bd009..1750608 100755
> --- a/live-build/auto/build
> +++ b/live-build/auto/build
> @@ -226,7 +226,14 @@ if dpkg-query --show --showformat='${db:Status-Status}\n' ubuntu-server 2> /dev/
>  fi
>  EOF
>  fi
> -                cat >> chroot/usr/local/sbin/unminimize <<'EOF'
> +		if [ "$PROJECT" = "ubuntu-cpc" ]; then
> +			cat >> chroot/usr/local/sbin/unminimize <<'EOF'
> +
> +echo "Installing lxd from snap..."
> +snap install lxd
> +EOF
> +		fi

It doesn't look like this handles removing the lxd-installer once it's no longer needed; should it?

> +		cat >> chroot/usr/local/sbin/unminimize <<'EOF'
>  
>  # unminimization succeeded, there is no need to mention it in motd
>  rm -f /etc/update-motd.d/60-unminimize
> diff --git a/live-build/auto/config b/live-build/auto/config
> index 2626229..2896470 100755
> --- a/live-build/auto/config
> +++ b/live-build/auto/config
> @@ -806,7 +806,7 @@ case $PROJECT in
>  	ubuntu-cpc)
>  		if [ "${SUBPROJECT:-}" = minimized ]; then
>  			add_task install cloud-image
> -			add_package install sudo
> +			add_package install sudo lxd-installer

the lxd-installer package seems not to exist yet in the archive?

>  			# linux-kvm currently only exists for amd64, so fall back to the
>  			# virtual flavour for other architectures
>  			if [ "$ARCH" = "amd64" ]; then
> @@ -895,6 +895,22 @@ esac
>  if [ "$PASSES_TO_LAYERS" != "true" ] && [ -n "${BASE_SEED}" ]; then
>  	snap_from_seed "${BASE_SEED}" config/seeded-snaps
>  fi
> +if [ "$PROJECT:${SUBPROJECT:-}" = ubuntu-cpc:minimized ]; then
> +	# We install a lxc script that installs the snap when invoked. We don't
> +	# want any other snaps to come in without due consideration, so fail the
> +	# build if we see such a snap.
> +	for snap in `cat config/seeded-snaps`; do
> +		case $snap in
> +			lxd)
> +				;;
> +			*)
> +				echo "Unexpected seeded snap for ubuntu-cpc:minimized build: $snap"
> +				exit 1
> +				;;

Took me a second to understand that this is ok because this runs as part of the base ubuntu-cpc image, where we are only seeding lxd; and all the other derived images that have other snaps seeded are handled in per-image hooks later.

> +		esac
> +	done
> +	rm config/seeded-snaps
> +fi
>  
>  # grab a list of packags to remove for a "minimal" installation from the seed
>  # mirror for this project


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



More information about the Ubuntu-reviews mailing list