Add migration spec for kernel -> kernel-clk6.12 namespace transition#1247
Open
bmastbergen wants to merge 2 commits into
Open
Add migration spec for kernel -> kernel-clk6.12 namespace transition#1247bmastbergen wants to merge 2 commits into
bmastbergen wants to merge 2 commits into
Conversation
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.
…ich deps Switch shims from version-pinned Obsoletes to a version ceiling (< 6.13) so dnf upgrade automatically discovers them as replacements for installed non-namespaced packages. Remove Provides for old names on shims to avoid triggering Conflicts on the namespaced packages. Drop rich deps from base package since dnf upgrade discovers each shim independently via Obsoletes. Base package requires kernel-clk6.12-modules (to ensure the full kernel is installed, not just core) and kernel-clk6.12-default (to set DEFAULTKERNEL=kernel-clk6.12-core so future kernel installs become the default boot entry). Move dnf-mark-install to per-subpackage posttrans so namespaced packages survive shim removal. Rewrite cleanup script to dynamically find non-namespaced 6.12.x kernel-core packages instead of using a hardcoded version list. Fix cleanup script to only disable itself when all non-namespaced kernels are gone, not just when some were removed. Note: the kernel-clk6.12 meta-package does not get installed because kernel-clk6.12-core provides the kernel-clk6.12 virtual, letting DNF satisfy the dependency without the meta-package. All real packages (core, modules, modules-core) are installed and functional.
Collaborator
Author
|
Old PR got auto closed because we updated ciq-6.12.y. Grabbing this comment from that PR to continue the conversation here: Why do we need the service to remove the old kernels? Shouldn't the Obsoletes handle that? @jdieter The obsoletes are fine for the installonly packages (kernel, kernel-core, kernel-modules, etc) IFF you are not running the kernel you are obsoleting. If you are running kernel-6.12.X and run 'dnf upgrade' the whole transaction will fail because you can't remove the kernel you are running. So I landed on the script based cleanup for the installonly packages because that solution works (albeit with the delay of a reboot) no matter what kernel you are currently running when you do 'dnf upgrade'. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migration metapackage that transitions users from old non-namespaced CIQ kernel 6.12.x packages to the new kernel-clk6.12 namespace.
How it works
Each subpackage shim carries
Obsoletes: <old-name> < 6.12.86(sodnf upgradediscovers it automatically) andRequires: <namespaced-replacement>(to pull in the new package). Shims have no Provides for the old name, which avoids triggering theConflictsdirectives on the namespaced packages.Migration happens automatically via
dnf upgrade. Each shim is discovered independently by the DNF solver via its Obsoletes.What gets migrated
kernel-clk6.12-defaultis pulled in to setDEFAULTKERNEL=kernel-clk6.12-corein/etc/sysconfig/kernel, ensuring future namespaced kernel installs become the default boot entry%posttransrunsdnf mark installon each namespaced replacement so they survive shim removalPrerequisite
The old non-namespaced repo (
ciq-kernel-lt-6_12) must be disabled before migration. If both repos are enabled, DNF prefers same-name upgrades (e.g., kernel-headers 6.12.85 -> 6.12.88) over Obsoletes-based shims.Known limitation
The
kernel-clk6.12meta-package does not get installed becausekernel-clk6.12-coreprovides thekernel-clk6.12virtual, letting DNF satisfy the dependency without the meta-package. All real packages (core, modules, modules-core) are installed and functional.Tested scenarios
dnf upgradediscovers shims and migrates all packagesdnf install kernel-headersafter migration says "already installed"dnf upgradewith old repo re-enabled: nothing to do (Conflicts blocks regression)dnf autoremovedoes not touch any namespaced packages (dnf mark install working)kernel-clk6.12-defaultinstalled,DEFAULTKERNELupdated fromkernel-coretokernel-clk6.12-core