sys-boot/grub: install an sbat for grub-install --sbat ...

Booting with sys-boot/shim requires that an sbat section is present in
the EFI executable. Add an sbat.csv file that can optionally be
included when building the grub EFI executable.

Closes: https://bugs.gentoo.org/925902
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/35588
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
This commit is contained in:
Andrew Ammerlaan
2024-03-01 16:32:13 +01:00
parent 22a22f97ad
commit f879895488
3 changed files with 11 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
grub,3,Free Software Foundation,grub,%PV%,https//www.gnu.org/software/grub/
grub.gentoo,1,Gentoo,grub,%PV%,https://bugs.gentoo.org/
1 sbat 1 SBAT Version sbat 1 https://github.com/rhboot/shim/blob/main/SBAT.md
2 grub 3 Free Software Foundation grub %PV% https//www.gnu.org/software/grub/
3 grub.gentoo 1 Gentoo grub %PV% https://bugs.gentoo.org/

View File

@@ -315,6 +315,10 @@ src_install() {
# https://bugs.gentoo.org/231935
dostrip -x /usr/lib/grub
sed -e "s/%PV%/${PV}/" "${FILESDIR}/sbat.csv" > "${T}/sbat.csv" || die
insinto /usr/share/grub
doins "${T}/sbat.csv"
if use elibc_musl; then
# https://bugs.gentoo.org/900348
QA_CONFIG_IMPL_DECL_SKIP=( re_{compile_pattern,match,search,set_syntax} )

View File

@@ -311,6 +311,10 @@ src_install() {
# https://bugs.gentoo.org/231935
dostrip -x /usr/lib/grub
sed -e "s/%PV%/${PV}/" "${FILESDIR}/sbat.csv" > "${T}/sbat.csv" || die
insinto /usr/share/grub
doins "${T}/sbat.csv"
if use elibc_musl; then
# https://bugs.gentoo.org/900348
QA_CONFIG_IMPL_DECL_SKIP=( re_{compile_pattern,match,search,set_syntax} )