Skip to content

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

Open
bmastbergen wants to merge 1 commit into
ciq-6.12.yfrom
{bmastbergen}_ciq-6.12.y-migrate
Open

Add migration spec for kernel -> kernel-clk6.12 namespace transition#1215
bmastbergen wants to merge 1 commit into
ciq-6.12.yfrom
{bmastbergen}_ciq-6.12.y-migrate

Conversation

@bmastbergen
Copy link
Copy Markdown
Collaborator

@bmastbergen bmastbergen commented May 11, 2026

The namespaced kernel packages (kernel-clk6.12-*) carry Provides and Conflicts for their non-namespaced equivalents, which prevents co-installation but doesn't create an automatic upgrade path. DNF's dnf upgrade only considers packages with the same name as what's already installed, so it won't spontaneously replace kernel-headers with kernel-clk6.12-headers just because the latter provides and conflicts with the former. Even adding Obsoletes to the namespaced packages wouldn't help, since DNF doesn't evaluate Obsoletes from packages it isn't already considering for installation. The migration package solves this as a one-time explicit action: dnf install kernel-clk6.12-migrate. It uses rich deps to detect which old non-namespaced packages the user has installed, pulls in shim subpackages that Obsoletes those specific old versions, and Requires the namespaced replacements. A systemd oneshot service then cleans up old installonly packages (kernel-core, kernel-modules) on the next reboot, since those can't be removed mid-transaction when they belong to the running kernel.

This may not be the best place for this spec to live, but I've put it here so at least we can have a PR to discuss the issue in.

@bmastbergen bmastbergen requested a review from jdieter May 11, 2026 18:19
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).

Migration shims intentionally avoid Provides for non-namespaced names
(e.g. kernel-headers) since the namespaced packages already carry those
Provides, and adding them to the shims would trigger the corresponding
Conflicts directives.
@bmastbergen bmastbergen force-pushed the {bmastbergen}_ciq-6.12.y-migrate branch from 4b2ba6f to 65468cf Compare May 11, 2026 19:07
@bmastbergen bmastbergen requested review from josephtate and skip77 May 11, 2026 19:12
@jdieter
Copy link
Copy Markdown

jdieter commented May 12, 2026

I think this is the wrong approach. Instead of using requires and scriptlets to remove the old packages, we should have

Provides: subpackage-name = %{some version}
Obsoletes: subpackage-name < %{some_version}
Requires: kernel-clk6.12-subpackage-name

This should remove the requirement for the boolean dependencies and for users to manually install the migration package. With the above, a simple dnf update should automatically transition users from the old non-namespaced CLK kernels to the new namespaced ones. Note that it will also transition stock Rocky kernels to the new CLK kernels, which is why it should only live in the current CLK repo.

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