From 05eb032a321d8bb4f9148877064710bfc58590dc Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Wed, 13 Nov 2024 12:39:05 -0600 Subject: [PATCH] Remove BLS fake config on kernel removal Resolves: #RHEL-59557 Signed-off-by: Michal Sekletar Reviewed-by: Leo Sandoval Reviewed-by: Marta Lewandowska --- 20-grub.install | 3 ++- grub2.spec | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/20-grub.install b/20-grub.install index afc706d..650b519 100755 --- a/20-grub.install +++ b/20-grub.install @@ -188,8 +188,9 @@ case "$COMMAND" in if [[ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]] || [[ ! -f /sbin/new-kernel-pkg ]]; then BLS_TARGET="${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf" + BLS_FAKE_TARGET="${BLS_DIR}/ffffffffffffffffffffffffffffffff-${KERNEL_VERSION}.conf" BLS_DEBUG="$(echo ${BLS_TARGET} | sed -e "s/${KERNEL_VERSION}/${KERNEL_VERSION}~debug/")" - rm -f "${BLS_TARGET}" "${BLS_DEBUG}" + rm -f "${BLS_TARGET}" "${BLS_DEBUG}" "${BLS_FAKE_TARGET}" for i in vmlinuz System.map config zImage.stub dtb; do rm -rf "/boot/${i}-${KERNEL_VERSION}" diff --git a/grub2.spec b/grub2.spec index 8c4ca7c..732c2d2 100644 --- a/grub2.spec +++ b/grub2.spec @@ -17,7 +17,7 @@ Name: grub2 Epoch: 1 Version: 2.12 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Bootloader with support for Linux, Multiboot and more License: GPL-3.0-or-later URL: http://www.gnu.org/software/grub/ @@ -583,6 +583,10 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg %endif %changelog +* Mon Dec 09 2024 Leo Sandoval 2.12-4 +- Remove BLS fake config in case of kernel removal +- Resolves: #RHEL-59557 + * Mon Dec 09 2024 Leo Sandoval 2.12-3 - acpi: Fix out of bounds access in grub_acpi_xsdt_find_table() - Resolves: #RHEL-68690