[Merge] ~gjolly/livecd-rootfs:ubuntu-cpc/mount_esp_on_boot into livecd-rootfs:ubuntu/master

Steve Langasek mp+433639 at code.launchpad.net
Wed Jun 14 00:49:54 UTC 2023


Review: Approve

Looks good, just one comment inline.  (Take it or leave it, I'm happy to merge this either way, just let me know.)

Diff comments:

> diff --git a/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot b/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot
> index 9a25c0a..38e49db 100755
> --- a/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot
> +++ b/live-build/ubuntu-cpc/hooks.d/chroot/999-cpc-fixes.chroot
> @@ -124,6 +124,20 @@ fi
>  
>  #### END COMMON ARCH FUNCTIONS
>  
> +# For everything except s390x, disable kernel and initramfs symlinks
> +case $arch in
> +   # On s390x the sipl.conf is static right now with just two boot options.
> +   s390x)
> +      exit 0
> +      ;;
> +esac
> +
> +find "${rootd}/boot" -type l -exec rm {} \;
> +if [ -f "${rootd}/etc/kernel-img.conf" ]; then

Makes assumptions about the content of this file which are not guaranteed.  'do_symlinks = yes' is the default (/usr/share/perl5/DebianLinux.pm) so if /etc/kernel-img.conf exists but does not contain a line beginning with 'do_symlinks', this will not have the intended effect.

I recommend instead

if grep -q '^do_symlinks = '; then

because it is more future-proof.

> +    sed -i 's/^do_symlinks = .*$/do_symlinks = no/g' "${rootd}/etc/kernel-img.conf"
> +else
> +    echo "do_symlinks = no" > "${rootd}/etc/kernel-img.conf"
> +fi
>  
>  case $arch in
>  	# ARM, ppc, riscv64 and s390x images are special


-- 
https://code.launchpad.net/~gjolly/livecd-rootfs/+git/livecd-rootfs/+merge/433639
Your team Ubuntu Core Development Team is requested to review the proposed merge of ~gjolly/livecd-rootfs:ubuntu-cpc/mount_esp_on_boot into livecd-rootfs:ubuntu/master.




More information about the Ubuntu-reviews mailing list