diff --git a/grub.macros b/grub.macros index cc2d3357c7831bd25c327d2f52205d7a12d900f2..8691e2c11a6af85e9516bb463c54a9550849b822 100644 --- a/grub.macros +++ b/grub.macros @@ -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 db22e0716505b50fc1fc57b677e4a11e8f54857c..c62f59f6384ba3ca01074451f56a9e40f8dea6c5 100644 --- a/grub2.spec +++ b/grub2.spec @@ -14,7 +14,7 @@ Name: grub2 Epoch: 1 Version: 2.06 -Release: 10 +Release: 11 Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -436,6 +436,12 @@ 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