From f2e9faa56a7c459a526d398766b179465a515dd6 Mon Sep 17 00:00:00 2001 From: Javier Martinez Canillas Date: Wed, 1 Feb 2023 22:40:47 +0100 Subject: [PATCH] 20-grub-install: Explicitly check '+debug' suffix for debug kernels The kernel-install script is also used to install kernels when built from source using the `make install` target. And if this source contains modifications, a '+' is added as suffix by the scripts/setlocalversion if no LOCALVERSION was set in the kernel config. This confuses the grub2 kernel-install plugin, since it currently assumes that any kernel that contain a version with a '+' suffix is a debug kernel. But the match is too greedy, just having '+debug' should be enough to check whether the kernel to install is a debug kernel or not. Related: #2184069 Signed-off-by: Javier Martinez Canillas --- 20-grub.install | 2 +- grub2.spec | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/20-grub.install b/20-grub.install index 2a0ac32..9730c2c 100755 --- a/20-grub.install +++ b/20-grub.install @@ -126,7 +126,7 @@ case "$COMMAND" in sed -i -e "s,^initrd.*,initrd ${BOOTPREFIX}${INITRD},g" "${BLS_TARGET}" fi - if [[ "$KERNEL_VERSION" == *\+* ]] && [ "x$GRUB_DEFAULT_TO_DEBUG" != "xtrue" ]; then + if [[ "$KERNEL_VERSION" == *\+debug* ]] && [ "x$GRUB_DEFAULT_TO_DEBUG" != "xtrue" ]; then GRUB_UPDATE_DEFAULT_KERNEL=false fi diff --git a/grub2.spec b/grub2.spec index 461a225..1235163 100644 --- a/grub2.spec +++ b/grub2.spec @@ -16,7 +16,7 @@ Name: grub2 Epoch: 1 Version: 2.06 -Release: 61%{?dist} +Release: 62%{?dist} Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -533,6 +533,10 @@ mv ${EFI_HOME}/grub.cfg.stb ${EFI_HOME}/grub.cfg %endif %changelog +* Tue May 23 2023 Javier Martinez Canillas - 2.06-62 +- 20-grub-install: Explicitly check '+debug' suffix for debug kernels +- Resolves: #2148351 + * Mon Feb 20 2023 Robbie Harwood - 2.06-61 - ppc64le sysfs and mm update - Resolves: #2026579