!48 fix the installation failure of grub2-efi-x64/grub2-efi-aa64 package on the /boot partition of VFAT file system

From: @zhangqiumiao
Reviewed-by: @t_feng
Signed-off-by: @t_feng
This commit is contained in:
openeuler-ci-bot 2021-03-18 10:31:49 +08:00 committed by Gitee
commit e80e977fca
2 changed files with 23 additions and 1 deletions

View File

@ -277,6 +277,8 @@ Requires: %{name}-common = %{evr} \
Requires: %{name}-tools-minimal >= %{evr} \ Requires: %{name}-tools-minimal >= %{evr} \
Requires: %{name}-tools-extra = %{evr} \ Requires: %{name}-tools-extra = %{evr} \
Requires: %{name}-tools = %{evr} \ Requires: %{name}-tools = %{evr} \
Requires(pre): %{name}-tools = %{evr} \
Requires(postun): %{name}-tools = %{evr} \
Provides: %{name}-efi = %{evr} \ Provides: %{name}-efi = %{evr} \
%{?legacy_provides:Provides: %{name} = %{evr}} \ %{?legacy_provides:Provides: %{name} = %{evr}} \
%{-o:Obsoletes: %{name}-efi < %{evr}} \ %{-o:Obsoletes: %{name}-efi < %{evr}} \
@ -284,6 +286,19 @@ Provides: %{name}-efi = %{evr} \
%{expand:%%description %{1}} \ %{expand:%%description %{1}} \
%{desc} \ %{desc} \
This subpackage provides support for %{1} systems. \ 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:%%{?!buildsubdir:%%define buildsubdir grub-%{1}-%{tarversion}}}\
%{expand:%if 0%{?with_efi_modules} \ %{expand:%if 0%{?with_efi_modules} \

View File

@ -7,7 +7,7 @@
Name: grub2 Name: grub2
Epoch: 1 Epoch: 1
Version: 2.04 Version: 2.04
Release: 11 Release: 12
Summary: Bootloader with support for Linux, Multiboot and more Summary: Bootloader with support for Linux, Multiboot and more
License: GPLv3+ License: GPLv3+
URL: http://www.gnu.org/software/grub/ URL: http://www.gnu.org/software/grub/
@ -448,6 +448,13 @@ rm -r /boot/grub2.tmp/ || :
%{_datadir}/man/man* %{_datadir}/man/man*
%changelog %changelog
* Wed Mar 17 2021 zhangqiumiao <zhangqiumiao1@huawei.com> - 2.04-12
- 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.
* Tue Mar 62 2021 hanhui <hanhui15@huawei.com> - 2.04-11 * Tue Mar 62 2021 hanhui <hanhui15@huawei.com> - 2.04-11
- Type:cves - Type:cves
- Id:CVE-2020-27779 CVE-2020-14372 - Id:CVE-2020-27779 CVE-2020-14372