From 890ed1e0f1206e3e978c9ce055bfb32c023ff5d5 Mon Sep 17 00:00:00 2001 From: Qin Fandong Date: Mon, 29 Sep 2025 11:55:03 +0800 Subject: [PATCH] new-kernel-pkg: also set kernel-4k and kernel-64k as default (cherry picked from commit e01d1a18118177edb04cab5e074d694f2541ded5) --- ...lso-set-kernel-4k-and-kernel-64k-as-.patch | 28 +++++++++++++++++++ grubby.spec | 6 +++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0001-new-kernel-pkg-also-set-kernel-4k-and-kernel-64k-as-.patch diff --git a/0001-new-kernel-pkg-also-set-kernel-4k-and-kernel-64k-as-.patch b/0001-new-kernel-pkg-also-set-kernel-4k-and-kernel-64k-as-.patch new file mode 100644 index 0000000..889586b --- /dev/null +++ b/0001-new-kernel-pkg-also-set-kernel-4k-and-kernel-64k-as-.patch @@ -0,0 +1,28 @@ +From fdcf4a9b49a7e86a85218867dd878d8c30b3858a Mon Sep 17 00:00:00 2001 +From: Qin Fandong +Date: Mon, 29 Sep 2025 11:45:58 +0800 +Subject: [PATCH] new-kernel-pkg: also set kernel-4k and kernel-64k as default + kernel + +--- + new-kernel-pkg | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/new-kernel-pkg b/new-kernel-pkg +index a906a13..df1e17c 100755 +--- a/new-kernel-pkg ++++ b/new-kernel-pkg +@@ -754,7 +754,9 @@ fi + + # set this as the default if we have the package and it matches + if [ "$mode" == "--install" -a "$UPDATEDEFAULT" == "yes" -a -n "$package" -a -n "$DEFAULTKERNEL" ]; then +- if [ "$package" == "$DEFAULTKERNEL" -o "${package}-core" == "$DEFAULTKERNEL" ]; then ++ # also set kenerl-4k and kernel-64k to default kernel ++ if [ "$package" == "$DEFAULTKERNEL" -o "${package}-core" == "$DEFAULTKERNEL" \ ++ -o "${package%-*k}" == "$DEFAULTKERNEL" -o "${package%-*k}-core" == "$DEFAULTKERNEL" ]; then + makedefault="--make-default" + [ -n "$verbose" ] && echo "making it the default based on config" + fi +-- +2.43.0 + diff --git a/grubby.spec b/grubby.spec index fb65954..1a69065 100644 --- a/grubby.spec +++ b/grubby.spec @@ -1,6 +1,6 @@ Name: grubby Version: 8.40 -Release: 36 +Release: 37 Summary: Update and display information about the configuration files License: GPLv2+ URL: https://github.com/rhinstaller/grubby @@ -40,6 +40,7 @@ Patch9004: support-specify-cc.patch Patch9005: 0001-add-riscv64-support.patch Patch9006: grubby-8.40-After-opening-the-manual-through-man-the-symbol-cann.patch Patch9007: 0001-add-sw_64-support-for-grubby.patch +Patch9008: 0001-new-kernel-pkg-also-set-kernel-4k-and-kernel-64k-as-.patch BuildRequires: gcc pkgconfig glib2-devel popt-devel BuildRequires: libblkid-devel git-core sed make @@ -118,6 +119,9 @@ sed -e "s,@@LIBEXECDIR@@,%{_libexecdir}/installkernel,g" %{SOURCE3} > %{buildroo %{_mandir}/man8/*.8* %changelog +* Mon Sep 29 2025 Qin Fandong - 8.40-37 +- new-kernel-pkg: also set kernel-4k and kernel-64k as default + * Thu Aug 28 2025 wangjiang - 8.40-36 - fix changelog display exception -- Gitee