[Merge] ~mwhudson/livecd-rootfs/+git/livecd-rootfs:rebuild-archive-1 into livecd-rootfs:ubuntu/master

Michael Hudson-Doyle mp+425053 at code.launchpad.net
Thu Jun 13 01:16:19 UTC 2024


Thanks for the review! I should be trying to use this for real next week so I should be able to propose a version I know works then (it's OK if this just waits until you get back I guess)

Diff comments:

> diff --git a/live-build/auto/config b/live-build/auto/config
> index ac63994..2066273 100755
> --- a/live-build/auto/config
> +++ b/live-build/auto/config
> @@ -1265,7 +1291,6 @@ lb config noauto \
>  	--mode ubuntu \
>  	--distribution "$SUITE" \
>  	--iso-preparer "livecd-rootfs" \
> -	--bootstrap-keyring ubuntu-keyring \

I don't remember! I can test next week and find out.

>  	--binary-images "$BINARY_IMAGES" \
>  	--memtest "$MEMTEST" \
>  	$SOURCE \
> diff --git a/live-build/functions b/live-build/functions
> index 543bb3f..0177f3a 100644
> --- a/live-build/functions
> +++ b/live-build/functions
> @@ -886,11 +886,7 @@ clean_debian_chroot() {
>  }
>  
>  configure_universe() {
> -	if [ -f config/universe-enabled ]; then
> -        # This is cargo-culted almost verbatim (with some syntax changes for
> -        # preinstalled being slightly different in what it doesn't ask) from
> -        # debian-installer's apt-setup:
> -
> +    if [ -f config/universe-enabled ]; then

yeah. not new though.

>          cat > chroot/etc/apt/sources.list << EOF
>  # Ubuntu sources have moved to the /etc/apt/sources.list.d/ubuntu.sources
>  # file, which uses the deb822 format. Use deb822-formatted .sources files
> @@ -898,7 +894,8 @@ configure_universe() {
>  # See the sources.list(5) manual page for details.
>  EOF
>  
> -        cat > chroot/etc/apt/sources.list.d/ubuntu.sources << EOF
> +        if [ $LB_VOLATILE = "true" ]; then

buildd images don't touch universe-enabled, so I don't think so, but this is all a house of cards of course.

> +            cat > chroot/etc/apt/sources.list.d/ubuntu.sources << EOF
>  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
>  # newer versions of the distribution.
>  
> @@ -944,8 +941,23 @@ Suites: $LB_DISTRIBUTION-security
>  Components: main universe restricted multiverse
>  Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
>  EOF
> -
> -fi
> +        else
> +            # We only expect to fall into this path when building for a rebuild archive.
> +            if [ "$LB_PARENT_MIRROR_BINARY" = "http://archive.ubuntu.com/ubuntu/" ]; then
> +                echo "Unexpected LB_VOLATILE=false" >&2
> +                exit 1
> +            fi
> +            # live-build just runs apt-key add on the rebuild archive's key so we don't
> +            # need to include Signed-By here. It's a bit ugly but well, hopefully we
> +            # can stop using live-build before this is a real problem.
> +            cat > chroot/etc/apt/sources.list.d/ubuntu.sources << EOF
> +Types: deb
> +URIs: $LB_PARENT_MIRROR_BINARY
> +Suites: $LB_DISTRIBUTION
> +Components: main universe restricted multiverse
> +EOF
> +        fi
> +    fi

It would probably be less ugly to store REBUILDARCHIVENAME to config/common or something. I can try that when I build images from the O3 archive.

>  }
>  
>  configure_oci() {


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




More information about the Ubuntu-reviews mailing list