Skip to content

Import initial dist-git for 6.18.19#1009

Open
bmastbergen wants to merge 18 commits intociq-6.18.yfrom
{bmastbergen}_ciq-6.18.y
Open

Import initial dist-git for 6.18.19#1009
bmastbergen wants to merge 18 commits intociq-6.18.yfrom
{bmastbergen}_ciq-6.18.y

Conversation

@bmastbergen
Copy link
Copy Markdown
Collaborator

@bmastbergen bmastbergen commented Mar 24, 2026

This is the initial dist-git import for CLK 6.18

In the case of CLK 6.12, we started with the dist-git from a kernel already released using the kernel-pkg src-git setup, and then iterated on top of that. The PR for that can be seen here: #959

Since we haven't released a CLK 6.18 build yet, I did the following to land at the initial dist-git import in this PR:

  • Locally created a kernel-pkg branch (ciq-pkg-6.18.y) based off of the fedora-6.18 branch of kernel-ark. Remember that the ciq-pkg-6.12.y branch of kernel-pkg was based off of the fedora-6.12 branch of kernel-ark.
  • Applied all of the same changes to ciq-pkg-6.18.y that we applied to ciq-pkg-6.12.y
  • Ran make -C ciq dist-srpm to build an srpm using that branch
  • Extracted that srpm to get our initial SOURCES and SPECS
  • Added them to ciq-6.18.y branch of kernel-src-tree
  • Integrated all of the feedback generated during the CLK 6.12 import process from PR 959

So, the spec for this branch differs from the spec in the ciq-6.12.y branch in the same ways that the spec template differs between the fedora-6.12 and fedora-6.18 branches in kernel-ark. But, the CIQ specific tweaks should be the same.

I have verified that building and installing rpms using this branch works the same as it does for the current ciq-6.12.y branch.

Building looks like this:

mkdir build_files
git clone --branch {bmastbergen}_ciq-6.18.y --depth 1 https://github.com/ctrliq/kernel-src-tree
cd kernel-src-tree
./ciq/SOURCES/generate_tarball.sh
mock -v -r ~/ciq/mock-configs/ciq-kernel-9-x86_64.cfg --resultdir=../build_files --buildsrpm --sources=./ciq/SOURCES --spec=./ciq/SPECS/kernel.spec
mock -v -r ~/ciq/mock-configs/ciq-kernel-9-x86_64.cfg --resultdir=../build_files ../build_files/*.src.rpm

I then uploaded the resulting RPMs to a VM and verified I could install and boot them

[brett@clk-test ~]$ uname -a
Linux clk-test 6.18.19-1.1.0.0.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Mar 25 10:01:03 EDT 2026 x86_64 x86_64 x86_64 GNU/Linux

As with that PR, the goal here is to have a starting point for doing CLK 6.18 releases. I am sure there are improvements and cleanups we can do to improve the spec and process going forward. But the goal of this PR is to end up with something that we can build, sign, and release kernels with. So keep that in mind when reviewing.

@bmastbergen bmastbergen requested review from a team, elguero, jason-rodri and jdieter March 24, 2026 16:28
@PlaidCat
Copy link
Copy Markdown
Collaborator

Could you post for PR summary the clif notes evidence of the build process and testing?

@bmastbergen
Copy link
Copy Markdown
Collaborator Author

Could you post for PR summary the clif notes evidence of the build process and testing?

Done

Copy link
Copy Markdown

@elguero elguero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Noticed some things around the SBAT.

@@ -0,0 +1,2 @@
sbat,1,SBAT Version,sbat,1,https://github.com/rhboot/shim/blob/main/SBAT.md
kernel-uki-virt-addons.ciq_rocky,1,CIQ,kernel-uki-virt-addons,@KVER,mailto:secureboot@ciq.com
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kernel-uki-virt-addons.clk,1,CIQ,kernel-uki-virt-addons,@KVER,mailto:secureboot@ciq.com

The reason for clk is that this is product name. If we ever needed to revoke the cert or put this on the denylist, we can target this specific product build.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. See if it looks right now. Thanks!

Comment on lines +167 to +178
%define debugbuildsenabled 1
%define buildid .test
%define specrpmversion 6.18.19
%define specversion 6.18.19
%define patchversion 6.18
%define pkgrelease 1.test
%define kversion 6
%define tarfile_release 6.18.19-1.1.0.0.el9_clk
# This is needed to do merge window version magic
%define patchlevel 18
# This allows pkg_release to have configurable %%{?dist} tag
%define specrelease 1%{?buildid}%{?dist}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test?
Also is there a specific reason we can't make these expanded:?
%define pkgrelease 1.test to %define pkgrelease 1.%{?buildid} ???
Not sure if @jdieter or @skip77 have thoughts on this?

1.1.0.0

do we need the .0.0?? this doesn't seem useful
I would read this as 6.18.19-1.1 so its closer to a normal CentOS like build number?

also these defines are just super sloppy (this isn't a CIQ issue but wow)

should this me more dynamic and less repeated numbers?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, good catch on the test. Will fix it to match 6.12 for now.

Most of this stuff is just how I found it in the exploded 6.12 spec, so happy to change it to whatever makes the most sense.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've refined this significantly. Can you please let me know if you're still unhappy with it?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Err, I hadn't pushed my changes. This should be good now.

@PlaidCat
Copy link
Copy Markdown
Collaborator

FYI to other reviewers I asked claude to sturctural changes between the 6.12 and 6.18 fedora-ark changes

  Version string inconsistency: buildid is .test and pkgrelease is 1.test, but tarfile_release is 6.18.19-1.1.0.0.el9_clk (still has 1.1.0.0). In 6.12 these were consistent
  (1.1.0.0 everywhere). The RPM will be kernel-6.18.19-1.test.el9 but the source tarball name has 1.1.0.0. Not a build-breaker (Brett confirmed it builds/boots), but worth
  reconciling for production.

  Duplicate %define in toolsonly block: with_selftests 0 and with_vdso_install 0 are each defined twice in the with_toolsonly section. Harmless but sloppy upstream.

  Residual with_ipaclones 0 at spec lines ~310 and ~469 — dead code since ipaclones is entirely removed in 6.18. Minor cleanup.

  Upstream Features New in 6.18 (not CIQ-specific, but noteworthy)

  - rt-64k variant: New kernel-rt-64k and kernel-rt-64k-debug packages (realtime ARM64 64k page-size)
  - riscv64 architecture added to ExclusiveArch
  - YNL (YAML Netlink) tools — new build/install section
  - modules-extra-matched meta-package replaces ipaclones-internal
  - kernel_variant_preun gains --entry-type flag for kernel-install
  - Selftests hugely expanded — ~30 new test categories
  - cpupower Python bindings via swig
  - libcpupower 0.0.1 → 1.0.1
  - initramfs reservation doubled from 20MB to 40MB
  - Config filenames now include specrpmversion
  - Rust now unconditional (+ rustfmt, clippy added)
  - LLVM=1 unconditional with clang (was only for LTO)
  - License gains (GPL-2.0-only OR GFDL-1.2-no-invariants-or-later)
  - Many new BuildRequires (see list in main review above)

  6.12 CIQ Items That Changed Form in 6.18 (by design, not gaps)

  These are things the CIQ-unique agent flagged as 6.12 CIQ customizations that are no longer applicable:

  ┌──────────────────────────────────────┬─────────────────────────────────┬─────────────────────────────────┐
  │            6.12 CIQ Item             │           6.18 Status           │             Reason              │
  ├──────────────────────────────────────┼─────────────────────────────────┼─────────────────────────────────┤
  │ kernel_ipaclones_package             │ Gone → modules-extra-matched    │ Upstream removed ipaclones      │
  ├──────────────────────────────────────┼─────────────────────────────────┼─────────────────────────────────┤
  │ kernel_kvm_package / kernel_kvm_post │ Gone (but macro still invoked!) │ Upstream removed rt-kvm         │
  ├──────────────────────────────────────┼─────────────────────────────────┼─────────────────────────────────┤
  │ Inline SBAT heredocs                 │ → External template files       │ Upstream architecture change    │
  ├──────────────────────────────────────┼─────────────────────────────────┼─────────────────────────────────┤
  │ dracut --uefi UKI build              │ → dracut + ukify build          │ Upstream pipeline change        │
  ├──────────────────────────────────────┼─────────────────────────────────┼─────────────────────────────────┤
  │ Hardcoded kernel- in Provides        │ → %{name}-                      │ Upstream templating improvement │
  ├──────────────────────────────────────┼─────────────────────────────────┼─────────────────────────────────┤
  │ klptestarches for livepatch tests    │ Removed                         │ Upstream removed                │
  ├──────────────────────────────────────┼─────────────────────────────────┼─────────────────────────────────┤
  │ merge.py stub                        │ → Full implementation           │ 6.18 actually uses it           │
  └──────────────────────────────────────┴─────────────────────────────────┴─────────────────────────────────┘

  None of these are gaps — they're expected evolution.

This matches the 6.12 spec
- drivers/acpi/.*: modules-core
- drivers/ata/.*: modules-core

- drivers/base/.*(kunit|test).*: modules-internal
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fedora-ark 6.18 pulled this into a generic ... this will improve our maintenance burden
https://gitlab.com/cki-project/kernel-ark/-/blob/fedora-6.18/redhat/rhel_files/def_variants.yaml.rhel?ref_type=heads#L21-L23

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

picking up this change. thanks

- name: modules-rt-kvm
if_variant_in: ["rt"]
depends-on:
- modules-core
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also removed in the 6.18 fedora-ark for rhel
https://gitlab.com/cki-project/kernel-ark/-/commit/6f7cd68506a47c7751cf300ad76e0e7941bf98c9

and the KVM package does not exist in the spec we're shipping kernel_kvm_package

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call. removing.

Comment on lines +502 to +511
- net/sched/sch_choke.*: modules-extra
- net/sched/sch_drr.*: modules-extra
- net/sched/sch_gred.*: modules-extra
- net/sched/sch_mqprio.ko: modules-extra
- net/sched/sch_multiq.*: modules-extra
- net/sched/sch_netem.*: modules-extra
- net/sched/sch_qfq.*: modules-extra
- net/sched/sch_red.*: modules-extra
- net/sched/sch_sfb.*: modules-extra
- net/sched/sch_teql.*: modules-extra
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a potential bug here apparently this modules sysetm here will blacklist any module that has an alias.
These should be dropped ... apparently they will fall through to modules-core now.

https://gitlab.com/cki-project/kernel-ark/-/merge_requests/3712#note_2382602971

https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=241a94abcf465ba9363d93168da5ddd47002930

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. Will drop these lines.

%endif

Source4000: README.rst
Source4002: gating.yaml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you drop gating.yaml please make sure to remove it from here as well.

AutoReq: no\
AutoProv: yes\
%description %{?1:%{1}-}modules-internal\
This package provides kernel modules for the %{?2:%{2} }kernel package for Red Hat internal usage.\
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a call out we need to go through a rebranding exercise for this and probably ciq-6.12.y

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Thought of that when I went through the first pass. There are tweaks that can be made to make this truly a CIQ product.

We are defining the product as clk so if we ever need to revoke or
deny the cert we can target this specific product
@bmastbergen bmastbergen force-pushed the {bmastbergen}_ciq-6.18.y branch from 249da74 to 6f52350 Compare March 24, 2026 23:30
elguero
elguero previously approved these changes Mar 25, 2026
by design, kernel-ark blacklists all modules in modules-extra that have
a module alias. Now that qdiscs have their module alias [1], some of them
became blacklisted even if we didn't really intend to: move them back to
kernel-modules to preserve feature parity with other qdiscs (and
previous
releases).

[1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=241a94abcf465ba9363d93168da5ddd47002930f
And define pkgrelease using buildid.

.1.1.0.0 is excessive
This comes from kernel-ark and is part of their solution for a
kernel variant that should supplant the factory kernel.  Since thats
not what we want, remove this to avoid any confusion.
Adds Provides and Conflicts tags to kernel-clk6.18-* packages that
cannot be parallel installed with stock Rocky kernel packages:
- kernel-doc
- kernel-headers
- kernel-cross-headers
- kernel-debuginfo-common
- kernel-tools
- kernel-tools-libs
- kernel-tools-libs-devel
- kernel-selftests-internal

This allows these packages to satisfy dependencies for stock kernel
packages while preventing simultaneous installation.
Introduce %{pkg_suffix} macro (clk%{patchversion}) and use it for:
- package_name: kernel-%{pkg_suffix}
- tool packages: perf, python3-perf, libperf, rtla, rv

Tool packages now named:
- perf-%{pkg_suffix}
- python3-perf-%{pkg_suffix}
- libperf-%{pkg_suffix}
- libperf-%{pkg_suffix}-devel
- rtla-%{pkg_suffix}
- rv-%{pkg_suffix}
- *-debuginfo variants

Each tool package includes:
- Provides: <original-name> = %{specrpmversion}-%{release}
- Conflicts: <original-name>

This prevents parallel installation with stock Rocky kernel tools
while satisfying dependencies for the original package names.
@bmastbergen
Copy link
Copy Markdown
Collaborator Author

Updated with first attempt at namespacing this kernel to allow parallel installation with Rocky kernels

  • package_name changed from kernel to kernel-clk6.18
  • Packages that aren't parallel installable (kernel-headers, kernel-tools, etc) have Provides and Conflicts with the normal kernel package name to prevent simultaneous installation
  • Tools packages have their names tweaked in a similar way (like perf to perf-clk6.18) and have Provides and Conflicts to prevent simultaneous installation as well

The full packages list ends up looking like this:

kernel-clk6.18-cross-headers.x86_64
kernel-clk6.18-debug.x86_64
kernel-clk6.18-debug-core.x86_64
kernel-clk6.18-debug-debuginfo.x86_64
kernel-clk6.18-debug-devel.x86_64
kernel-clk6.18-debug-devel-matched.x86_64
kernel-clk6.18-debug-modules.x86_64
kernel-clk6.18-debug-modules-core.x86_64
kernel-clk6.18-debug-modules-extra.x86_64
kernel-clk6.18-debug-modules-internal.x86_64
kernel-clk6.18-debug-modules-partner.x86_64
kernel-clk6.18-debug-uki-virt.x86_64
kernel-clk6.18-debug-uki-virt-addons.x86_64
kernel-clk6.18-debuginfo.x86_64
kernel-clk6.18-debuginfo-common-x86_64.x86_64
kernel-clk6.18-devel-matched.x86_64
kernel-clk6.18-modules-extra.x86_64
kernel-clk6.18-modules-extra-matched.x86_64
kernel-clk6.18-modules-internal.x86_64
kernel-clk6.18-modules-partner.x86_64
kernel-clk6.18-selftests-internal.x86_64
kernel-clk6.18-tools.x86_64
kernel-clk6.18-tools-debuginfo.x86_64
kernel-clk6.18-tools-libs.x86_64
kernel-clk6.18-tools-libs-devel.x86_64
kernel-clk6.18-uki-virt.x86_64
kernel-clk6.18-uki-virt-addons.x86_64
libperf-clk6.18-debuginfo.x86_64
perf-clk6.18-debuginfo.x86_64
python3-perf-clk6.18.x86_64
python3-perf-clk6.18-debuginfo.x86_64
rtla-clk6.18.x86_64
rv-clk6.18.x86_64

I've verified that I can install the 6.18 kernel in addition to the already present rocky and CLK 6.12 kernel. I've also verified that trying to install kernel-clk6.18-headers or perf-clk6.18 doesn't work if the normal kernel-headers or perf packages are installed. Same for the opposite, kernel-headers or perf installed prevents installing kernel-clk6.18-headers and perf-clk6.18.

See what you think.

@PlaidCat
Copy link
Copy Markdown
Collaborator

I've verified that I can install the 6.18 kernel in addition to the already present rocky and CLK 6.12 kernel. I've also verified that trying to install kernel-clk6.18-headers or perf-clk6.18 doesn't work if the normal kernel-headers or perf packages are installed. Same for the opposite, kernel-headers or perf installed prevents installing kernel-clk6.18-headers and perf-clk6.18.

@jdieter @josephtate I wasn't expecting to be able to install both kernel-clk6.18 and kernel-clk6.12 maybe this is a symptom of us not having kernel-clk6.12 made yet?

@jdieter
Copy link
Copy Markdown

jdieter commented Mar 27, 2026

Why wouldn't you be able to install both of them? They're different package names. When you do updates, both will get updated, but only the stream you've selected with grubby will be set as default.

@bmastbergen
Copy link
Copy Markdown
Collaborator Author

I've verified that I can install the 6.18 kernel in addition to the already present rocky and CLK 6.12 kernel. I've also verified that trying to install kernel-clk6.18-headers or perf-clk6.18 doesn't work if the normal kernel-headers or perf packages are installed. Same for the opposite, kernel-headers or perf installed prevents installing kernel-clk6.18-headers and perf-clk6.18.

@jdieter @josephtate I wasn't expecting to be able to install both kernel-clk6.18 and kernel-clk6.12 maybe this is a symptom of us not having kernel-clk6.12 made yet?

Just to clarify, by CLK 6.12 I mean kernel-6.12.74-1.1.0.0.el9_clk, so a CLK 6.12 that hasn't been namespaced. So its being allowed to exist parallel to kernel-clk6.18 the same way kernel-5.14.0-611.36.1.el9_7 is.

Is there a reason not to allow kernel-clk6.18 and kernel-clk6.12 to be installed simultaneously? We can certainly make it so they can't with the right Conflicts. I just didn't think that was necessary.

@jdieter
Copy link
Copy Markdown

jdieter commented Mar 27, 2026

Let's not make them conflicts. If someone wants both 6.12 and 6.18 kernels on their system, I don't think we should stop them, any more than we stop them installing both the 4k and 64k variants of the regular aarch64 kernel.

@PlaidCat
Copy link
Copy Markdown
Collaborator

PlaidCat commented Mar 27, 2026

Let's not make them conflicts. If someone wants both 6.12 and 6.18 kernels on their system, I don't think we should stop them, any more than we stop them installing both the 4k and 64k variants of the regular aarch64 kernel.

I guess so but we do want the default RLC kernel to be in conflict right?

WRT 6.12 vs 6.18 if someone upgrades say from 6.12 to 6.18 they'll have to explicitly unistall 6.12 or depending on release order they could become flappy as to whats intsalled since the upgrade medium just sets the latest as the next boot.

@jdieter if you're happy with it i'm fine, I guess i don't actually have a strong position I know how to defend on the packaging side (or at least what I expect as an end user)

@jdieter
Copy link
Copy Markdown

jdieter commented Mar 30, 2026

@PlaidCat, we don't want any conflicts for parallel installable kernels. EL systems don't blindly update the default kernel to whatever's installed. Instead, there's a kernel-install script that uses plugins and a config file in /etc/sysconfig/kernel to determine whether the newly updated kernel package should become the new default.

@bmastbergen, I've been tracing the update logic, and, for it to work correctly, it looks like we're going to need to add the suffix "clk6.18" to the output of uname -r. In the debug/rt/64k kernels, this is done by adding +variant to the end of the output, so for us, it would need to look something like 6.12.74-1.1.el9_ciq.x86_64+clk6.18. This would also give us a clear indication in uname -r of whether a CLK kernel is being used, and, if so, which one. The spec file probably has a way that you can set that pretty easily.

@jdieter
Copy link
Copy Markdown

jdieter commented Mar 30, 2026

And when we make this change to the 6.12 CLK kernel, we'll need to update /etc/sysconfig/kernel, changing DEFAULTKERNEL from kernel-core to kernel-clk6.12-core.

jdieter and others added 2 commits March 30, 2026 10:54
Switch Module.symvers compression from the dynamic %compression
macro (xz) to hardcoded gzip -c9, matching the upstream kernel spec.
Also fixes the ghost file permissions from 0644 to 0600.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
Inject +%{pkg_suffix} into KVERREL and the shell-level equivalents
(KernelVer, DevelDir, EXTRAVERSION) so that uname -r shows the CLK
kernel identity, e.g. 6.18.19-1.1.el9_ciq.x86_64+clk6.18.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
@jdieter
Copy link
Copy Markdown

jdieter commented Mar 30, 2026

@bmastbergen, I've added a couple of commits, feel free to revert them if necessary. The first switches Modules.symvers back from xz to gzip to match what's expected in EL9. This should remove some of the scary warnings we see when installing kmods. The second adds the pkg_suffix to the uname -r output (and modules path, etc).

@bmastbergen
Copy link
Copy Markdown
Collaborator Author

@bmastbergen, I've added a couple of commits, feel free to revert them if necessary. The first switches Modules.symvers back from xz to gzip to match what's expected in EL9. This should remove some of the scary warnings we see when installing kmods. The second adds the pkg_suffix to the uname -r output (and modules path, etc).

LGTM Thanks!

@PlaidCat
Copy link
Copy Markdown
Collaborator

Is the naming state in a position for final reviews?

@jdieter
Copy link
Copy Markdown

jdieter commented Mar 31, 2026

Is the naming state in a position for final reviews?

Yes.

jdieter and others added 3 commits March 31, 2026 09:36
…g boot default

Reduce duplicated version numbers in the spec to single sources of truth:
- kernel_major_minor, kernel_patch, and buildid are the base defines
- specversion, kversion, patchlevel, pkgrelease, specrelease, and
  tarfile_release are all derived from them
- Remove specrpmversion (identical to specversion)
- Add el_version for tarball naming

Export GRUB_NON_STANDARD_KERNEL=true in the posttrans before calling
kernel-install so that 20-grub.install respects DEFAULTKERNEL in
/etc/sysconfig/kernel. When DEFAULTKERNEL=kernel-core, the CLK kernel
will no longer take over as the boot default on upgrade.

Update generate_tarball.sh to extract the base defines and compute
derived values rather than reading the now-derived tarfile_release
directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
Move -default subpackage out of %if %{with_tools} guard so it exists
independently of the tools build flag.  Add Requires(posttrans) on
-core to guarantee vmlinuz is installed before grubby runs.  Add
Provides/Conflicts on kernel-provider(default) for mutual exclusion.

Replace the simple %post sed approach with proper %pre/%postun/%posttrans
scriptlets that back up the original /etc/sysconfig/kernel, restore it
on uninstall, and use grubby to set the boot default.

Convert tools subpackages from -n %{package_name}-tools to %package tools
(short form) matching the convention used by all other subpackages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
The bindgen tool required for kernel Rust support is not packaged in
Rocky Linux 9.6. Replace the bindgen BuildRequires with a bundled
bindgen-cli crate built from vendored source during the RPM build.

Add bundle_bindgen.sh helper script to download, vendor, and tar the
bindgen-cli source for inclusion as Source5000.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
@jdieter jdieter force-pushed the {bmastbergen}_ciq-6.18.y branch from a685b71 to bcb36c2 Compare March 31, 2026 11:11
SOURCES=$1

BINDGEN_CLI=bindgen-cli
BINDGEN_CLI_VERSION="0.71.1"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there something we need to subcribe to to know when to update this pinned version?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it's only here because Rocky < 9.7 (and maybe < 10.1) doesn't have bindgen, and, if we're bundling for 9.2 and 9.6, might as well bundle for 9.7 as well.

This code was RH's solution to making the Fedora ARK kernels build in RH < 9.7.

As for figuring out when to update, I don't have a convenient feed to point you to.

%dir /lib/modules\
%dir /lib/modules/%{KVERREL}%{?3:+%{3}}\
/lib/modules/%{KVERREL}%{?3:+%{3}}/symvers.%compext\
/lib/modules/%{KVERREL}%{?3:+%{3}}/symvers.gz\
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm guessing that we're just doing this because our only target is Rocky9 right now.

Is this something that can be macro'd out in the future f we do Rocky10 and Rocky8 or insert other major version?

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rocky 8 will be gz as well. I'd prefer to cross the macro bridge when we need to for Rocky 10.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah why i tried to call out for futrue stuff just wanted to check

# to build the base kernel using the debug configuration. (Specifying
# the --with-release option overrides this setting.)
%define debugbuildsenabled 1
%define el_version 9
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note we'll need to figure out how to make this configurable tin the future

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you hoping to use the same spec for 8, 9 and 10 CLK kernels? If so, then, yeah, we'll need to figure that out.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YEs,
I assume we'll be able to make a macro override in the future ?

Copy link
Copy Markdown
Collaborator

@PlaidCat PlaidCat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@bmastbergen bmastbergen requested a review from elguero March 31, 2026 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants