From 52c0f7568741c727e31869cd63d436947a4576ac Mon Sep 17 00:00:00 2001 From: markeryang Date: Fri, 10 Oct 2025 07:38:04 +0000 Subject: [PATCH] new-kernel-pkg: also set kernel-4k and kernel-64k as default --- ...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 dea4204..522c681 100644 --- a/grubby.spec +++ b/grubby.spec @@ -1,6 +1,6 @@ Name: grubby Version: 8.40 -Release: 32 +Release: 33 Summary: Update and display information about the configuration files License: GPLv2+ URL: https://github.com/rhinstaller/grubby @@ -36,6 +36,7 @@ Patch6017: backport-Fix-maybe-uninitialized-warning.patch Patch9001: fix-make-test-fail-when-no-boot-partition.patch Patch9002: 0001-add-loongarch-support-for-grubby.patch Patch9003: grubby-aarch64-skip-test-grub2.15.patch +Patch9004: 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 @@ -110,6 +111,9 @@ sed -e "s,@@LIBEXECDIR@@,%{_libexecdir}/installkernel,g" %{SOURCE3} > %{buildroo %{_mandir}/man8/*.8* %changelog +* Fri Oct 10 2025 yanglongkang - 8.40-33 +- new-kernel-pkg: also set kernel-4k and kernel-64k as default + * Thu Aug 28 2025 wangjiang - 8.40-32 - fix changelog display exception -- Gitee