Skip to content

Add migration spec for kernel -> kernel-clk6.12 namespace transition#1139

Closed
bmastbergen wants to merge 14 commits intociq-6.12.yfrom
{bmastbergen}_ciq-6.12.y-migrate
Closed

Add migration spec for kernel -> kernel-clk6.12 namespace transition#1139
bmastbergen wants to merge 14 commits intociq-6.12.yfrom
{bmastbergen}_ciq-6.12.y-migrate

Conversation

@bmastbergen
Copy link
Copy Markdown
Collaborator

RPM spec that transitions users from old non-namespaced CIQ kernel 6.12.x packages to the new kernel-clk6.12 namespace. Uses rich deps to only migrate packages the user actually has installed. Includes a systemd oneshot service to clean up old installonly packages on next boot (can't rpm -e from %posttrans due to RPM db lock).

@bmastbergen
Copy link
Copy Markdown
Collaborator Author

@jdieter For lack of a better place to put it for review, this PR has a spec file with my ham-fisted attempt at a migration spec. See if this is at all what you had in mind.

@bmastbergen bmastbergen requested a review from jdieter April 23, 2026 20:29
@bmastbergen bmastbergen force-pushed the {bmastbergen}_ciq-6.12.y-migrate branch 2 times, most recently from f05def8 to 4921d01 Compare April 28, 2026 14:17
@bmastbergen bmastbergen force-pushed the {bmastbergen}_ciq-6.12.y-namespacing branch from 10368eb to d378027 Compare May 1, 2026 19:06
bmastbergen and others added 10 commits May 1, 2026 15:11
Rename spec file from kernel.spec to kernel-clk6.12.spec.

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>

Adds Provides and Conflicts tags to kernel-clk6.12-* 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 with stock Rocky
kernel tools.

Remove gemini switch, which comes from kernel-ark and is part of their
solution for a kernel variant that should supplant the factory kernel.

Fix config file naming in %prep to use %{name} instead of hardcoded
'kernel' prefix.

Update generate_tarball.sh to reference kernel-clk6.12.spec.
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.12.78-1.1.el9_ciq.x86_64+clk6.12.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
- Consolidate version defines (kernel_major_minor, kernel_patch, buildid)
- Derive specversion, pkgrelease, tarfile_release from base defines
- Rework -default package with proper scriptlets and kernel-provider
- Convert tools subpackages to short form naming
- Bundle bindgen-cli for Rocky 9.6 builds
- Export GRUB_NON_STANDARD_KERNEL to prevent boot default hijacking
- Update generate_tarball.sh for new version scheme

Fix Provides/Requires to use %{name} instead of hardcoded kernel

Package names should use %{name} (kernel-clk6.12) instead of hardcoded
'kernel' in Provides and Requires to ensure dependency resolution works
correctly for CLK kernels.
Adds 'Provides: kernel = version' to base package for compatibility
with packages depending on generic kernel capability.
@bmastbergen bmastbergen force-pushed the {bmastbergen}_ciq-6.12.y-namespacing branch from d378027 to 7e73526 Compare May 1, 2026 19:15
@bmastbergen bmastbergen force-pushed the {bmastbergen}_ciq-6.12.y-migrate branch 2 times, most recently from 790f00f to adf99e3 Compare May 4, 2026 19:37
Comment thread ciq/SPECS/kernel-clk6.12-migrate.spec Outdated
Add versioned Provides for kernel-headers, kernel-devel, and
kernel-devel-<arch> so the namespaced CLK packages satisfy the same
dependency capabilities as stock Rocky kernel packages.

Remove Conflicts on kernel-headers and kernel-cross-headers since the
namespaced packages now provide those capabilities directly.
…ons, ipaclones

Replace remaining hardcoded 'kernel' references with %{name} in:
- kernel_kvm_package: Summary, Requires, Provides, %description
- uki-virt-addons: Requires
- kernel_ipaclones_package: Summary
- Add set -e so the script exits on any command failure
- Add -f (--fail) to curl so HTTP errors are caught
- Verify the downloaded crate against the known SHA256 from crates.io
  before extracting
RPM spec that transitions users from old non-namespaced CIQ kernel 6.12.x
packages to the new kernel-clk6.12 namespace. Uses rich deps to only
migrate packages the user actually has installed. Includes a systemd
oneshot service to clean up old installonly packages on next boot.

kernel-headers migration removes old headers but does not install CLK
headers as replacement — stock kernel-headers from Rocky repos satisfies
glibc-devel and similar dependencies.
@bmastbergen bmastbergen force-pushed the {bmastbergen}_ciq-6.12.y-namespacing branch from 28f12bb to 659c616 Compare May 6, 2026 14:30
@bmastbergen bmastbergen force-pushed the {bmastbergen}_ciq-6.12.y-migrate branch from adf99e3 to fd1fc2a Compare May 6, 2026 14:31
@bmastbergen bmastbergen requested a review from jdieter May 6, 2026 14:41
Base automatically changed from {bmastbergen}_ciq-6.12.y-namespacing to ciq-6.12.y May 7, 2026 20:03
@ciq-kernel-automation ciq-kernel-automation Bot deleted the branch ciq-6.12.y May 8, 2026 13:03
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.

2 participants