integ/grub/grub2/centos/meta_patches/0007-add-unsigned-package.p...

62 lines
3.1 KiB
Diff

From a3c831a18efa931cafd680d8275232e874239f50 Mon Sep 17 00:00:00 2001
Message-Id: <a3c831a18efa931cafd680d8275232e874239f50.1643237526.git.Jim.Somerville@windriver.com>
In-Reply-To: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com>
References: <8b5576704440696a7c8f1b00735217bf1745b6a1.1643237526.git.Jim.Somerville@windriver.com>
From: root <root@yow-cgts4-lx.wrs.com>
Date: Tue, 23 Jan 2018 14:46:01 -0500
Subject: [PATCH 07/13] add unsigned package
Signed-off-by: Jim Somerville <Jim.Somerville@windriver.com>
---
SOURCES/grub.macros | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros
index efe46cc..539b5d5 100644
--- a/SOURCES/grub.macros
+++ b/SOURCES/grub.macros
@@ -217,6 +217,13 @@ Requires: %{name}-common = %{evr} \
%{expand:%%description %{1}-cdboot} \
%{desc} \
This subpackage provides optional components of grub used with removeable media on %{1} systems.\
+ \
+%{expand:%%package %{1}-unsigned} \
+Summary: Unsigned versions of GRUB EFI binaries \
+ \
+%{expand:%%description %{1}-unsigned} \
+This package contains unsigned version of GRUB EFI binaries. \
+ \
%{nil}
%global do_common_setup() \
@@ -291,6 +298,8 @@ done \
-p /EFI/%{efidir} -d grub-core ${GRUB_MODULES} \
%{4}./grub-mkimage -O %{1} -o %{3}.orig \\\
-p /EFI/BOOT -d grub-core ${GRUB_MODULES} \
+cp %{2}.orig %{2}.unsigned \
+cp %{3}.orig %{3}.unsigned \
%{expand:%%{pesign -s -i %{2}.orig -o %{2}.one -a %{5} -c %{6} -n %{7}}} \
%{expand:%%{pesign -s -i %{3}.orig -o %{3}.one -a %{5} -c %{6} -n %{7}}} \
%{expand:%%{pesign -s -i %{2}.one -o %{2} -a %{8} -c %{9} -n %{10}}} \
@@ -387,6 +396,8 @@ find $RPM_BUILD_ROOT -iname "*.module" -exec chmod a-x {} '\;' \
touch $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/grub.cfg \
ln -sf ../boot/efi/EFI/%{efidir}/grub.cfg \\\
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg \
+install -m 700 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2}.unsigned \
+install -m 700 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3}.unsigned \
install -m 700 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2} \
install -m 700 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \
install -D -m 700 unicode.pf2 \\\
@@ -474,4 +485,8 @@ cd .. \
%defattr(-,root,root,-) \
%verify(not mtime) %attr(0700,root,root)/boot/efi/EFI/%{efidir}/%{3} \
%verify(not mtime) %attr(0700,root,root)/boot/efi/EFI/%{efidir}/fonts \
+ \
+%{expand:%%files %{1}-unsigned} \
+/boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned \
+/boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \
%{nil}
--
2.29.2