Avoid grub2-efi package to overwrite existing /boot/grub2/grubenv file

The grub2-efi package create a /boot/grub2/grubenv symlink that points to
/boot/efi/EFI/fedora/grubenv that's where the real grubenv file is looked
up by GRUB on an EFI installation.

But currently if the grub2-efi is installed on a legacy BIOS install, it
will overwrite an existing /boot/grub2/grubenv file with a broken symlink.

So mark it as %config(noreplace) to avoid loosing an existing grubenv.

Resolves: rhbz#1687323

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Javier Martinez Canillas 2019-03-08 23:37:30 +01:00
parent 5d7e4540ed
commit 8c44667ebf
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69

View File

@ -532,7 +532,7 @@ touch ${RPM_BUILD_ROOT}/boot/%{name}/grub.cfg \
%dir %attr(0700,root,root)%{efi_esp_dir}/fonts \
%dir %attr(0700,root,root)/boot/loader/entries \
%ghost %config(noreplace) %attr(0700,root,root)%{efi_esp_dir}/grub.cfg \
/boot/grub2/grubenv \
%config(noreplace) /boot/grub2/grubenv \
%ghost %config(noreplace) %attr(0700,root,root)%{efi_esp_dir}/grubenv \
%{expand:%if 0%{?without_efi_modules} \
%exclude %{_libdir}/grub/%{6} \