Skip to content

Commit 5771215

Browse files
committed
feat(grubby): provide the /etc/sysconfig/kernel file
This file has a setting, UPDATEDEFAULT=, which is used by the kernel-install (aka installkernel) program to determine if the default kernel should be updated to use the newly installed kernel. This sets UPDATEDEFAULT=yes, so a newly installed kernel will be set as the default kernel (on the next boot); without this, the default kernel will remain set to the current kernel. Taken from upstream: https://src.fedoraproject.org/rpms/grubby/c/482a2825c47c4fd28a18beb279a3e826461bf878 Fixes: AB#20392
1 parent b71c2c7 commit 5771215

5 files changed

Lines changed: 20 additions & 5 deletions

File tree

base/comps/components.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,6 @@ includes = ["**/*.comp.toml", "component-check-disablement.toml", "component-min
11071107
[components.grep]
11081108
[components.groff]
11091109
[components.grpc]
1110-
[components.grubby]
11111110
[components.gsettings-desktop-schemas]
11121111
[components.gsl]
11131112
[components.gsm]

base/comps/grubby/grubby.comp.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[components.grubby]
2+
spec = { type = "upstream", upstream-commit = "482a2825c47c4fd28a18beb279a3e826461bf878" }

locks/grubby.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Managed by azldev component update. Do not edit manually.
22
version = 1
33
import-commit = '6095bc576b3aa216400f1cc133ade107d4830ea7'
4-
upstream-commit = '6095bc576b3aa216400f1cc133ade107d4830ea7'
5-
input-fingerprint = 'sha256:b671086c622372cdbe19f56c5b93a8cf2e9c9011cda4ef5ca095be17b87fd3d1'
6-
resolution-input-hash = 'sha256:466421704711c4fd3c71f0b2ed715a0e61d49e3e26f3a2637fee755795849c8e'
4+
upstream-commit = '482a2825c47c4fd28a18beb279a3e826461bf878'
5+
input-fingerprint = 'sha256:0629234843fdfaecf2b8ae3d60085bfa30d628f16998201e2ec1dbf0958d3fdf'
6+
resolution-input-hash = 'sha256:593fa932ecee0e1182baf5d9cc43eeec1f8cdc1bb17670a50e8daf18d7d3f95c'

specs/g/grubby/grubby.spec

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Name: grubby
88
Version: 8.40
9-
Release: 86%{?dist}
9+
Release: 88%{?dist}
1010
Summary: Command line tool for updating bootloader configs
1111
License: GPL-2.0-or-later
1212
Source1: grubby-bls
@@ -15,6 +15,7 @@ Source3: COPYING
1515
Source5: 95-kernel-hooks.install
1616
Source6: 10-devicetree.install
1717
Source7: grubby.8
18+
Source8: kernel.sysconfig
1819

1920
BuildRequires: gcc
2021
BuildRequires: glib2-devel
@@ -62,6 +63,9 @@ install -D -m 0755 -t %{buildroot}%{_prefix}/lib/kernel/install.d/ %{SOURCE6}
6263
mkdir -p %{buildroot}%{_mandir}/man8
6364
install -m 0644 %{SOURCE7} %{buildroot}%{_mandir}/man8/
6465

66+
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
67+
install -m 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/kernel
68+
6569
%post
6670
if [ "$1" = 2 ]; then
6771
arch=$(uname -m)
@@ -75,8 +79,12 @@ fi
7579
%attr(0755,root,root) %{_prefix}/lib/kernel/install.d/10-devicetree.install
7680
%attr(0755,root,root) %{_prefix}/lib/kernel/install.d/95-kernel-hooks.install
7781
%{_mandir}/man8/grubby.8*
82+
%config(noreplace) %{_sysconfdir}/sysconfig/kernel
7883

7984
%changelog
85+
* Wed Dec 10 2025 Simon de Vlieger <cmdr@supakeen.com> - 8.40-86
86+
- Own `/etc/sysconfig/kernel` which is used for `grubby` configuration
87+
8088
* Wed Jul 30 2025 Leo Sandoval <lsandova@redhat.com> - 8.40-85
8189
- Update cfg when setting a default kernel
8290

specs/g/grubby/kernel.sysconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# UPDATEDEFAULT specifies if kernel-install should make
2+
# new kernels the default
3+
UPDATEDEFAULT=yes
4+
5+
# DEFAULTKERNEL specifies the default kernel package type
6+
DEFAULTKERNEL=kernel-core

0 commit comments

Comments
 (0)