From 03a18fb9dcffdcdb9f26b24210d757b887d980ec Mon Sep 17 00:00:00 2001 From: Johnny Hughes Date: Apr 05 2022 15:38:29 +0000 Subject: CentOS debranding and secureboot3 --- diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros index f65c00d..5975444 100644 --- a/SOURCES/grub.macros +++ b/SOURCES/grub.macros @@ -114,16 +114,10 @@ %global efi_modules " efi_netfs efifwsetup efinet lsefi lsefimmap connectefi " %endif -%ifarch x86_64 %{ix86} -%global platform_modules " backtrace chain usb usbserial_common usbserial_pl2303 usbserial_ftdi usbserial_usbdebug keylayouts at_keyboard " -%endif - -%ifarch ppc64le -%global platform_modules " appendedsig " -%endif - %ifarch aarch64 %{arm} %global platform_modules " " +%else +%global platform_modules " backtrace chain usb usbserial_common usbserial_pl2303 usbserial_ftdi usbserial_usbdebug keylayouts at_keyboard " %endif @@ -417,34 +411,6 @@ done \ %{nil} %endif -%ifarch ppc64le -%define ieee1275_mkimage() \ -APPENDED_SIG_SIZE=0 \ -if [ -x /usr/bin/rpm-sign ]; then \ - touch empty.unsigned \ - rpm-sign --key %{5} \\\ - --lkmsign empty.unsigned \\\ - --output empty.signed \ - APPENDED_SIG_SIZE="$(stat -c '%s' empty.signed)" \ - rm empty.{un,}signed \ -fi \ -# FIXME: using this prefix is fragile, must be done properly \ -./grub-mkimage -O %{1} -o %{2}.orig \\\ - -p '/grub2' -d grub-core \\\ - -x %{3} -x %{4} \\\ - --appended-signature-size ${APPENDED_SIG_SIZE} \\\ - ${GRUB_MODULES} \ -if [ -x /usr/bin/rpm-sign ]; then \ - truncate -s -${APPENDED_SIG_SIZE} %{2}.orig \ - rpm-sign --key %{5} \\\ - --lkmsign %{2}.orig \\\ - --output %{2} \ -else \ - mv %{2}.orig %{2} \ -fi \ -%{nil} -%endif - %define do_efi_build_images() \ GRUB_MODULES+=%{grub_modules} \ GRUB_MODULES+=%{efi_modules} \ @@ -452,14 +418,6 @@ GRUB_MODULES+=%{platform_modules} \ %{expand:%%{efi_mkimage %{1} %{2} %{3} %{4} %{5} %{6} %{7} %{8} %{9} %{10}}} \ %{nil} -%define do_ieee1275_build_images() \ -GRUB_MODULES+=%{grub_modules} \ -GRUB_MODULES+=%{platform_modules} \ -cd grub-%{1}-%{tarversion} \ -%{expand:%%ieee1275_mkimage %%{1} %%{2} %%{3} %%{4} %%{5}} \ -cd .. \ -%{nil} - %define do_primary_efi_build() \ cd grub-%{1}-%{tarversion} \ %{expand:%%do_efi_configure %%{4} %%{5} %%{6}} \ @@ -554,9 +512,6 @@ fi \ if [ -f $RPM_BUILD_ROOT%{_infodir}/grub-dev.info ]; then \ rm -f $RPM_BUILD_ROOT%{_infodir}/grub-dev.info \ fi \ -%{expand:%ifarch ppc64le \ - install -m 700 %{grubelfname} $RPM_BUILD_ROOT/%{_libdir}/grub/%{1} \ -%endif} \ ln -s ../boot/%{name}/grub.cfg \\\ ${RPM_BUILD_ROOT}%{_sysconfdir}/grub2.cfg \ if [ -f $RPM_BUILD_ROOT/%{_libdir}/grub/%{1}/grub2.chrp ]; then \ @@ -598,19 +553,12 @@ touch ${RPM_BUILD_ROOT}/boot/%{name}/grub.cfg \ %config(noreplace) %{_sysconfdir}/%{name}.cfg \ %ghost %config(noreplace) /boot/%{name}/grub.cfg \ %dir %attr(0700,root,root)/boot/loader/entries \ -%ifarch ppc64le \ -%dir %{_libdir}/grub/%{2}/ \ -%{_libdir}/grub/%{2}/%{grubelfname} \ -%endif \ \ %{expand:%if 0%{?with_legacy_modules} \ %{expand:%%files %{1}-modules} \ %defattr(-,root,root) \ %dir %{_libdir}/grub/%{2}/ \ %{_libdir}/grub/%{2}/* \ -%ifarch ppc64le \ -%exclude %{_libdir}/grub/%{2}/%{grubelfname} \ -%endif \ %exclude %{_libdir}/grub/%{2}/*.module \ %exclude %{_libdir}/grub/%{2}/{boot,boot_hybrid,cdboot,diskboot,lzma_decompress,pxeboot}.image \ %exclude %{_libdir}/grub/%{2}/*.o \