[Merge] ~xypron/grub:riscv into ~ubuntu-core-dev/grub/+git/ubuntu:ubuntu

Dimitri John Ledkov mp+415323 at code.launchpad.net
Wed Feb 9 17:41:32 UTC 2022


Comments about packaging - it should follow armhf packaging closely by building all of riscv64 EFI arch from src:grub2, and not build anything in unsigned/signed packages.

Diff comments:

> diff --git a/debian/control b/debian/control
> index 1819b2e..f96fb8b 100644
> --- a/debian/control
> +++ b/debian/control
> @@ -28,14 +28,14 @@ Build-Depends: debhelper-compat (= 10),
>   fonts-dejavu-core,
>   liblzma-dev,
>   liblzo2-dev,
> - dosfstools [any-amd64 any-arm64],
> - mtools [any-amd64 any-arm64],
> + dosfstools [any-amd64 any-arm64 any-riscv64],
> + mtools [any-amd64 any-arm64 any-riscv64],

Above two changes are not needed, given that riscv64 EFI platform will be unsigned for now.

>   wamerican,
>   libparted-dev [any-powerpc any-ppc64 any-ppc64el],
>   pkg-config,
>   bash-completion,
> - libefiboot-dev [i386 amd64 ia64 x32 armel armhf arm64],
> - libefivar-dev [i386 amd64 ia64 x32 armel armhf arm64],
> + libefiboot-dev [i386 amd64 ia64 x32 armel armhf arm64 riscv64],
> + libefivar-dev [i386 amd64 ia64 x32 armel armhf arm64 riscv64],
>  Build-Conflicts: autoconf2.13, libzfs-dev, libnvpair-dev
>  Standards-Version: 3.9.6
>  Homepage: https://www.gnu.org/software/grub/
> @@ -522,10 +522,66 @@ Description: GRand Unified Bootloader, version 2 (ARM64 UEFI version)
>  
>  Package: grub-efi-arm64-signed-template
>  Architecture: arm64
> -Description: GRand Unified Bootloader, version 2 (ARM64 UEFI signing template)
> +Description: GRand Unified Bootloader, version 2 (arm64 UEFI signing template)
>   This package contains template files for grub-efi-arm64-signed.
>   This is only needed for Secure Boot signing.
>  
> +Package: grub-efi-riscv64-bin
> +Architecture: any-riscv64
> +Depends: ${shlibs:Depends}, ${misc:Depends}, grub-common (>= 2.02~beta2-9)
> +Recommends: grub-efi-riscv64-signed [riscv64], efibootmgr [linux-any]
> +Multi-Arch: foreign
> +XB-Efi-Vendor: ${efi:Vendor}
> +Description: GRand Unified Bootloader, version 2 (riscv64 UEFI modules)
> + GRUB is a portable, powerful bootloader.  This version of GRUB is based on a
> + cleaner design than its predecessors, and provides the following new features:
> + .
> +  - Scripting in grub.cfg using BASH-like syntax.
> +  - Support for modern partition maps such as GPT.
> +  - Modular generation of grub.cfg via update-grub.  Packages providing GRUB
> +    add-ons can plug in their own script rules and trigger updates by invoking
> +    update-grub.
> + .
> + This package contains GRUB modules that have been built for use on riscv64
> + systems with UEFI.  It can be installed in parallel with other flavours,
> + but will not automatically install GRUB as the active boot loader nor
> + automatically update grub.cfg on upgrade unless grub-efi-riscv64 is also
> + installed.
> +
> +Package: grub-efi-riscv64-dbg
> +Section: debug
> +Architecture: any-riscv64
> +Depends: ${misc:Depends}, grub-efi-riscv64-bin (= ${binary:Version})
> +Multi-Arch: foreign
> +Description: GRand Unified Bootloader, version 2 (riscv64 UEFI debug files)
> + This package contains debugging files for grub-efi-riscv64-bin.  You only
> + need these if you are trying to debug GRUB using its GDB stub.
> +
> +Package: grub-efi-riscv64
> +Architecture: any-riscv64
> +Pre-Depends: ${misc:Pre-Depends}
> +Depends: ${shlibs:Depends}, ${misc:Depends}, grub2-common (>= 2.02~beta2-9), grub-efi-riscv64-bin (= ${binary:Version}), ucf
> +Multi-Arch: foreign
> +Description: GRand Unified Bootloader, version 2 (riscv64 UEFI version)
> + GRUB is a portable, powerful bootloader.  This version of GRUB is based on a
> + cleaner design than its predecessors, and provides the following new features:
> + .
> +  - Scripting in grub.cfg using BASH-like syntax.
> +  - Support for modern partition maps such as GPT.
> +  - Modular generation of grub.cfg via update-grub.  Packages providing GRUB
> +    add-ons can plug in their own script rules and trigger updates by invoking
> +    update-grub.
> + .
> + This is a dependency package for a version of GRUB that has been built for
> + use on RISC-V 64-bit systems with UEFI.  Installing this package indicates that
> + this version of GRUB should be the active boot loader.
> +
> +Package: grub-efi-riscv64-signed-template

Specifically we don't need -signed-template packages in Ubuntu at all. It is Debian DAK only thing. It's best not to add this package at all, since we will never use it or have any way to test it. (and uncordinated addition of this in Debian can too cause issues, unless json config of dak signing is adjusted at the same time).

> +Architecture: riscv64
> +Description: GRand Unified Bootloader, version 2 (RISC-V 64-bit UEFI signing template)
> + This package contains template files for grub-efi-riscv64-signed.
> + This is only needed for Secure Boot signing.
> +
>  Package: grub-ieee1275-bin
>  Architecture: any-i386 any-amd64 any-powerpc any-ppc64 any-ppc64el any-sparc any-sparc64
>  Depends: ${shlibs:Depends}, ${misc:Depends}, grub-common (= ${binary:Version})
> diff --git a/debian/grub-efi-riscv64-signed-template.lintian-overrides b/debian/grub-efi-riscv64-signed-template.lintian-overrides
> new file mode 100644
> index 0000000..115f804
> --- /dev/null
> +++ b/debian/grub-efi-riscv64-signed-template.lintian-overrides
> @@ -0,0 +1 @@
> +grub-efi-riscv64-signed-template: missing-dep-for-interpreter

If we don't make the package, this lintian override is not needed either.

> diff --git a/debian/rules b/debian/rules
> index 9505998..9b7548a 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -143,6 +149,9 @@ generate-grub2-unsigned:
>  	grep-dctrl -r -F Package '^grub-efi-a.*64$$' debian/control >> debian/control.unsigned
>  	grep-dctrl -r -F Package '^grub-efi-a.*64.*-bin$$' debian/control >> debian/control.unsigned
>  	grep-dctrl -r -F Package '^grub-efi-a.*64.*-dbg$$' debian/control >> debian/control.unsigned
> +	grep-dctrl -r -F Package '^grub-efi-riscv64$$' debian/control >> debian/control.unsigned
> +	grep-dctrl -r -F Package '^grub-efi-riscv64.*-bin$$' debian/control >> debian/control.unsigned
> +	grep-dctrl -r -F Package '^grub-efi-riscv64.*-dbg$$' debian/control >> debian/control.unsigned
>  	cp ../grub2_$(DEB_VERSION_UPSTREAM).orig.tar.xz ../grub2-unsigned_$(DEB_VERSION_UPSTREAM).orig.tar.xz

This hunk is not needed.

>  	dch --append -c debian/changelog.unsigned 'Source package generated from src:grub2 using make -f ./debian/rules generate-grub2-unsigned'
>  	rm -f debian/files
> @@ -181,6 +190,16 @@ else
>  # on arm64, src:grub2 does not build efi-arm64 (-bin & -dbg)
>  ONLY_BUILD := -Ngrub-efi-$(DEB_HOST_ARCH) -Ngrub-efi-$(DEB_HOST_ARCH)-bin -Ngrub-efi-$(DEB_HOST_ARCH)-dbg
>  endif
> +else ifeq ($(DEB_HOST_ARCH),riscv64)
> +SB_PACKAGE := grub-efi-riscv64
> +override_dh_builddeb: SB_PLATFORM := riscv64-efi
> +ifeq ($(SB_SUBMIT),yes)
> +# on amd64, src:grub2-unsigned builds efi-riscv64 (-bin & -dbg)
> +ONLY_BUILD := -pgrub-efi-$(DEB_HOST_ARCH) -pgrub-efi-$(DEB_HOST_ARCH)-bin -pgrub-efi-$(DEB_HOST_ARCH)-dbg
> +else
> +# on riscv64, src:grub2 does not build efi-riscv64 (-bin & -dbg)
> +ONLY_BUILD := -Ngrub-efi-$(DEB_HOST_ARCH) -Ngrub-efi-$(DEB_HOST_ARCH)-bin -Ngrub-efi-$(DEB_HOST_ARCH)-dbg
> +endif

This hunk is not needed.

>  else ifeq ($(DEB_HOST_ARCH),i386)
>  ifeq ($(SB_SUBMIT),yes)
>  # on i386, src:grub2-unsigned builds efi-amd64 (-bin & -dbg)


-- 
https://code.launchpad.net/~xypron/grub/+git/grub/+merge/415323
Your team Ubuntu Core Development Team is subscribed to branch ~ubuntu-core-dev/grub/+git/ubuntu:ubuntu.




More information about the Ubuntu-reviews mailing list