Remove BLS fake config on kernel removal

Resolves: #RHEL-59557
Signed-off-by: Michal Sekletar <msekleta@redhat.com>
Reviewed-by: Leo Sandoval <lsandova@redhat.com>
Reviewed-by: Marta Lewandowska <mlewando@redhat.com>
This commit is contained in:
Michal Sekletar 2024-11-13 12:39:05 -06:00 committed by Leo Sandoval
parent 8812e31e42
commit 05eb032a32
2 changed files with 7 additions and 2 deletions

View File

@ -188,8 +188,9 @@ case "$COMMAND" in
if [[ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]] || [[ ! -f /sbin/new-kernel-pkg ]]; then if [[ "x${GRUB_ENABLE_BLSCFG}" = "xtrue" ]] || [[ ! -f /sbin/new-kernel-pkg ]]; then
BLS_TARGET="${BLS_DIR}/${MACHINE_ID}-${KERNEL_VERSION}.conf" 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/")" 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 for i in vmlinuz System.map config zImage.stub dtb; do
rm -rf "/boot/${i}-${KERNEL_VERSION}" rm -rf "/boot/${i}-${KERNEL_VERSION}"

View File

@ -17,7 +17,7 @@
Name: grub2 Name: grub2
Epoch: 1 Epoch: 1
Version: 2.12 Version: 2.12
Release: 3%{?dist} Release: 4%{?dist}
Summary: Bootloader with support for Linux, Multiboot and more Summary: Bootloader with support for Linux, Multiboot and more
License: GPL-3.0-or-later License: GPL-3.0-or-later
URL: http://www.gnu.org/software/grub/ URL: http://www.gnu.org/software/grub/
@ -583,6 +583,10 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg
%endif %endif
%changelog %changelog
* Mon Dec 09 2024 Leo Sandoval <lsandova@redhat.com> 2.12-4
- Remove BLS fake config in case of kernel removal
- Resolves: #RHEL-59557
* Mon Dec 09 2024 Leo Sandoval <lsandova@redhat.com> 2.12-3 * Mon Dec 09 2024 Leo Sandoval <lsandova@redhat.com> 2.12-3
- acpi: Fix out of bounds access in grub_acpi_xsdt_find_table() - acpi: Fix out of bounds access in grub_acpi_xsdt_find_table()
- Resolves: #RHEL-68690 - Resolves: #RHEL-68690