From 6a175aebbe68aeeaa3372db2951cd3af4dd82605 Mon Sep 17 00:00:00 2001 From: duyiwei Date: Wed, 29 Jun 2022 06:38:54 +0000 Subject: [PATCH] move %pre to do_efi_install --- grub.macros | 14 +++++++------- grub2.spec | 14 +++++++++++++- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/grub.macros b/grub.macros index 0031e53..8691e2c 100644 --- a/grub.macros +++ b/grub.macros @@ -116,7 +116,7 @@ ### fixme %ifarch aarch64 %{arm} riscv64 -%global efi_modules " " +%global efi_modules " tpm " %else %global efi_modules " backtrace chain tpm usb usbserial_common usbserial_pl2303 usbserial_ftdi usbserial_usbdebug keylayouts at_keyboard " %endif @@ -296,12 +296,7 @@ Provides: %{name}-efi = %{evr} \ %{expand:%%description %{1}} \ %{desc} \ This subpackage provides support for %{1} systems. \ -%pre %{1} \ -res=$(grub2-probe /boot) \ -if [ "xvfat" != "x$res" -a "xfat" != "x$res" ]; then \ - ln -sf ../efi/EFI/%{efi_vendor}/grubenv /boot/grub2/grubenv \ -fi \ - \ + %postun %{1} \ if [ "x0" == "x$1" ]; then \ res=$(grub2-probe /boot) \ @@ -536,6 +531,11 @@ install -D -m 700 unicode.pf2 \\\ $RPM_BUILD_ROOT%{efi_esp_dir}/fonts/unicode.pf2 \ ${RPM_BUILD_ROOT}/%{_bindir}/%{name}-editenv \\\ ${RPM_BUILD_ROOT}%{efi_esp_dir}/grubenv create \ +res=$(grub2-probe /boot) \ +if [ "xvfat" != "x$res" -a "xfat" != "x$res" ]; then \ + ln -sf ../efi/EFI/%{efi_vendor}/grubenv \\\ + $RPM_BUILD_ROOT/boot/grub2/grubenv \ +fi \ %{expand:%%do_install_protected_file %{name}-%{package_arch}} \ cd .. \ %{nil} diff --git a/grub2.spec b/grub2.spec index 7416cdf..c62f59f 100644 --- a/grub2.spec +++ b/grub2.spec @@ -14,7 +14,7 @@ Name: grub2 Epoch: 1 Version: 2.06 -Release: 9 +Release: 11 Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -436,6 +436,18 @@ fi %{_datadir}/man/man* %changelog +* Thu Jun 30 2022 duyiwei - 1:2.06-11 +- Type:NA +- ID:NA +- SUG:NA +- DESC:move %pre to do_efi_install + +* Wed Jun 29 2022 zhangqiumiao - 1:2.06-10 +- Type:requirement +- CVE:NA +- SUG:NA +- DESC:add tpm in efi_modules of aarch64 + * Tue Jun 21 2022 sunhai - 1:2.06-9 - Type:CVE - CVE:CVE-2021-3697 CVE-2022-28735 CVE-2022-28736 CVE-2022-28734 CVE-2022-28733 CVE-2021-3695 CVE-2021-3696 -- Gitee