From 5807275cf3b45d32dbdefad83d9ee09e3bd1e8a7 Mon Sep 17 00:00:00 2001 From: Qiumiao Zhang Date: Thu, 18 Mar 2021 15:45:21 +0800 Subject: [PATCH] fix the failure of grub2-efi-x64/grub2-efi-aa64 package on the /boot partition of VFAT file system (cherry picked from commit 2995a12993d43d0332dc1ba57fad568889e42a91) --- grub.macros | 15 +++++++++++++++ grub2.spec | 11 +++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/grub.macros b/grub.macros index aa6bfc0..685a938 100644 --- a/grub.macros +++ b/grub.macros @@ -277,6 +277,8 @@ Requires: %{name}-common = %{evr} \ Requires: %{name}-tools-minimal >= %{evr} \ Requires: %{name}-tools-extra = %{evr} \ Requires: %{name}-tools = %{evr} \ +Requires(pre): %{name}-tools = %{evr} \ +Requires(postun): %{name}-tools = %{evr} \ Provides: %{name}-efi = %{evr} \ %{?legacy_provides:Provides: %{name} = %{evr}} \ %{-o:Obsoletes: %{name}-efi < %{evr}} \ @@ -284,6 +286,19 @@ 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) \ + if[ "xvfat" != "x$res" -a "xfat" != "x$res" ];then \ + rm -f /boot/grub2/grubenv \ + fi \ +fi \ \ %{expand:%%{?!buildsubdir:%%define buildsubdir grub-%{1}-%{tarversion}}}\ %{expand:%if 0%{?with_efi_modules} \ diff --git a/grub2.spec b/grub2.spec index 2c2a747..f57cb65 100644 --- a/grub2.spec +++ b/grub2.spec @@ -7,7 +7,7 @@ Name: grub2 Epoch: 1 Version: 2.04 -Release: 10 +Release: 11 Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -445,9 +445,16 @@ rm -r /boot/grub2.tmp/ || : %{_datadir}/man/man* %changelog +* Wed Mar 17 2021 zhangqiumiao - 2.04-11 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:fix the installation failure of grub2-efi-x64/grub-efi-aa64 packages on + the /boot partition of VFAT file system. + * Fri Mar 12 2021 yanglu - 2.04-10 - Type:cves -- Id:CVE-2020-25632 CVE-2020-25647 CVE-2020-27749 CVE-2021-20225 CVE-2021-20233 +- ID:CVE-2020-25632 CVE-2020-25647 CVE-2020-27749 CVE-2021-20225 CVE-2021-20233 - SUG:NA - DESC:fix CVE-2020-25632 CVE-2020-25647 CVE-2020-27749 CVE-2021-20225 CVE-2021-20233 -- Gitee