Add support for different kernel variants - #9
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for different kernel variants (specifically kernel-rt) to the dnf-plugin-protected-kmods, and ensures that matching kernels aren't excluded for installed kmods even when the kmod is unavailable in enabled repositories.
Key Changes:
- Modified the plugin to support kernel variants by storing protected kmods in a dictionary keyed by variant
- Updated kernel matching logic to work with variant-specific kernel names (e.g., kernel-rt-core)
- Added variant field to kmod configuration files to specify which kernel variant a kmod is built for
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/protected_kmods.py | Core logic updated to handle kernel variants with dictionary-based kmod storage and variant-aware kernel filtering |
| test-build/kmod-test-rt1/kmod-test.spec | Test kmod spec file for kernel-rt variant version 1.0-1 |
| test-build/kmod-test-rt2/kmod-test.spec | Test kmod spec file for kernel-rt variant version 1.0-2 |
| test-build/kernel-rt1/kernel.spec | Test kernel-rt spec file version 6.0.0-1 |
| test-build/kernel-rt2/kernel.spec | Test kernel-rt spec file version 6.0.0-2 |
| test-build/Dockerfile | Build instructions updated to include new kernel-rt and kmod-test-rt packages |
| tests/test-common.sh | Helper functions updated to accept multiple package arguments |
| tests/tests.d/10-test-kernel-rt1-install-with-kmod.sh | Test for kernel-rt installation with existing kmod |
| tests/tests.d/11-test-kernel-rt2-install-with-broken-kmod.sh | Test for kernel-rt update when matching kmod is unavailable |
| tests/tests.d/12-test-kernel-rt2-update.sh | Test for kernel-rt update with matching kmod available |
| dnf-plugin-protected-kmods.spec | Version bumped to 1.0.0 with changelog entry |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Also, ensure matching kernels aren't excluded for installed kmods, even if the kmod is not available in the enabled repositories. Appropriate tests have been added. Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
jdieter
force-pushed
the
add-variant-support
branch
from
October 29, 2025 09:59
e783bdc to
86bf5b4
Compare
skip77
approved these changes
Nov 3, 2025
skip77
left a comment
There was a problem hiding this comment.
Looks correct to me, especially with the new tests.
Approve.
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.
Also, ensure matching kernels aren't excluded for installed kmods, even if the kmod is not available in the enabled repositories.
Appropriate tests have been added.