From bbe7d2e50544a7682c279deaef4f52f8bd3fd1ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Fri, 8 Mar 2019 18:22:23 +0100 Subject: [PATCH] Do not remove boot loader configuration for other boot loaders --- 20-grub.install | 4 ++-- grub2.spec | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/20-grub.install b/20-grub.install index 3238e43..f2de776 100755 --- a/20-grub.install +++ b/20-grub.install @@ -16,8 +16,8 @@ KERNEL_DIR="${KERNEL_IMAGE%/*}" MACHINE_ID=$KERNEL_INSTALL_MACHINE_ID -# Remove it, since for grub2 the images are always installed in /boot -rm -rf "${BOOT_DIR_ABS%/*}" +# If ${BOOT_DIR_ABS} exists, some other boot loader is active. +[[ -d "${BOOT_DIR_ABS}" ]] && exit 0 BLS_DIR="/boot/loader/entries" diff --git a/grub2.spec b/grub2.spec index 77712fc..d5555b7 100644 --- a/grub2.spec +++ b/grub2.spec @@ -7,7 +7,7 @@ Name: grub2 Epoch: 1 Version: 2.02 -Release: 72%{?dist} +Release: 73%{?dist} Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -215,8 +215,6 @@ install -d -m 0755 %{buildroot}%{_prefix}/lib/kernel/install.d/ install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE9} install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE13} install -d -m 0755 %{buildroot}%{_sysconfdir}/kernel/install.d/ -install -m 0644 /dev/null %{buildroot}%{_sysconfdir}/kernel/install.d/20-grubby.install -install -m 0644 /dev/null %{buildroot}%{_sysconfdir}/kernel/install.d/90-loaderentry.install # Install systemd user service to set the boot_success flag install -D -m 0755 -t %{buildroot}%{_userunitdir} \ docs/grub-boot-success.{timer,service} @@ -317,8 +315,6 @@ rm -r /boot/grub2.tmp/ || : %exclude %{_datarootdir}/grub/themes/* %attr(0700,root,root) %dir %{_sysconfdir}/grub.d %{_prefix}/lib/kernel/install.d/20-grub.install -%{_sysconfdir}/kernel/install.d/20-grubby.install -%{_sysconfdir}/kernel/install.d/90-loaderentry.install %{_prefix}/lib/kernel/install.d/99-grub-mkconfig.install %dir %{_datarootdir}/grub %exclude %{_datarootdir}/grub/* @@ -480,6 +476,11 @@ rm -r /boot/grub2.tmp/ || : %endif %changelog +* Tue Mar 12 2019 Zbigniew Jędrzejewski-Szmek - 2.02-73 +- Never remove boot loader configuration for other boot loaders from the ESP. + This would render machines with sd-boot unbootable (#1648907). +- Do not mask systemd's kernel-install scriptlets. + * Mon Mar 11 2019 Javier Martinez Canillas - 2.02-72 - Avoid grub2-efi package to overwrite existing /boot/grub2/grubenv file Resolves: rhbz#1687323