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

Cristovao Cordeiro mp+430736 at code.launchpad.net
Thu Sep 29 11:14:09 UTC 2022


Review: Needs Fixing



Diff comments:

> diff --git a/live-build/functions b/live-build/functions
> index 3de9857..25383d4 100644
> --- a/live-build/functions
> +++ b/live-build/functions
> @@ -931,6 +932,11 @@ 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 if not exist and add a build.info file in it with the serial of the image
> +    mkdir -p ${chroot}/etc/cloud

could you pls instead do: `mkdir ${chroot}/etc/cloud`?

The reason being that: 1) we know that /etc already exists in the Ubuntu fs, and ${chroot} shouldn't be this function's responsibility. If for some reason ${chroot} doesn't exist, the `-p` will obfuscate the real problem, making it hard to debug

> +    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