From 0e70c8a35c4434fa23717228cfa819bd64ed082f Mon Sep 17 00:00:00 2001 From: root Date: Tue, 23 Jan 2018 14:46:01 -0500 Subject: [PATCH 2/4] add unsigned package --- SOURCES/grub.macros | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros index f03bc1a..486604c 100755 --- a/SOURCES/grub.macros +++ b/SOURCES/grub.macros @@ -212,6 +212,13 @@ Requires: %{name}-common = %{evr} \ %{expand:%%description %{1}-cdboot} \ %{desc} \ This subpackage provides optional components of grub used with removeable media on %{1} systems.\ + \ +%package %{1}-unsigned \ +Summary: Unsigned versions of GRUB EFI binaries \ + \ +%description %{1}-unsigned \ +This package contains unsigned version of GRUB EFI binaries. \ + \ %{nil} %global do_common_setup() \ @@ -286,6 +293,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} -a %{5} -c %{6} -n %{7}}} \ %{expand:%%{pesign -s -i %{3}.orig -o %{3} -a %{5} -c %{6} -n %{7}}} \ %{nil} @@ -380,6 +389,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 755 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2}.unsigned \ +install -m 755 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3}.unsigned \ install -m 755 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2} \ install -m 755 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \ install -D -m 644 unicode.pf2 \\\ @@ -470,4 +481,8 @@ cd .. \ %defattr(-,root,root,-) \ %attr(0755,root,root)/boot/efi/EFI/%{efidir}/%{3} \ %attr(0755,root,root)/boot/efi/EFI/%{efidir}/fonts \ + \ +%{expand:%%files %{1}-unsigned} \ +/boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned \ +/boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \ %{nil} -- 1.8.3.1