[Merge] ~samirakarioh/livecd-rootfs:add-metadata-rocks into livecd-rootfs:ubuntu/master

Athos Ribeiro mp+430736 at code.launchpad.net
Mon Oct 3 16:19:43 UTC 2022


Hi Samir,

I added a few comments inline here.

Diff comments:

> diff --git a/live-build/auto/build b/live-build/auto/build
> index 9c1f0fc..9842e45 100755
> --- a/live-build/auto/build
> +++ b/live-build/auto/build
> @@ -462,7 +462,12 @@ EOF
>  		fi
>  
>  		if [ "$PROJECT" = "ubuntu-oci" ]; then
> -		    configure_oci chroot
> +			if ! [ -z "$BUILDSTAMP" ]; then

Could we use `-n` instead of `! -z` (just for readability).

> +				configure_oci chroot $BUILDSTAMP

We could quote the variable here as well to avoid any issues with spaces in it.

> +			else
> +				echo "The \$BUILDSTAMP variable is empty"
> +				exit 1
> +			fi  

There are a couple of trailing spaces in the end of this line. It would be nice to remove them.

>  		fi
>  
>  		configure_network_manager
> diff --git a/live-build/functions b/live-build/functions
> index 3de9857..bf45429 100644
> --- a/live-build/functions
> +++ b/live-build/functions
> @@ -931,6 +932,13 @@ configure_oci() {
>      echo 'exit 101' >> ${chroot}/usr/sbin/policy-rc.d
>      Chroot ${chroot} "chmod +x /usr/sbin/policy-rc.d"
>  
> +
> +    # create a folder /etc/cloud and add a build.info file in it with the serial of the image
> +    mkdir ${chroot}/etc/cloud

You could add a -p option to mkdir here just to be safe.

> +    cat > ${chroot}/etc/cloud/build.info << EOF
> +serial: $serial
> +EOF
> +
>      # https://github.com/docker/docker/blob/9a9fc01af8fb5d98b8eec0740716226fadb3735c/contrib/mkimage/debootstrap#L54-L56
>      Chroot ${chroot} "dpkg-divert --local --rename --add /sbin/initctl"
>      cp -a ${chroot}/usr/sbin/policy-rc.d ${chroot}/sbin/initctl


-- 
https://code.launchpad.net/~samirakarioh/livecd-rootfs/+git/livecd-rootfs/+merge/430736
Your team Ubuntu Core Development Team is requested to review the proposed merge of ~samirakarioh/livecd-rootfs:add-metadata-rocks into livecd-rootfs:ubuntu/master.




More information about the Ubuntu-reviews mailing list