Skip to content

Add support for different kernel variants - #9

Merged
jdieter merged 1 commit into
mainfrom
add-variant-support
Nov 3, 2025
Merged

Add support for different kernel variants#9
jdieter merged 1 commit into
mainfrom
add-variant-support

Conversation

@jdieter

@jdieter jdieter commented Oct 28, 2025

Copy link
Copy Markdown
Collaborator

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.

@jdieter
jdieter requested review from Copilot and skip77 October 28, 2025 17:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread src/protected_kmods.py
Comment thread src/protected_kmods.py Outdated
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
jdieter force-pushed the add-variant-support branch from e783bdc to 86bf5b4 Compare October 29, 2025 09:59

@skip77 skip77 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks correct to me, especially with the new tests.

Approve.

Comment thread src/protected_kmods.py
@jdieter
jdieter merged commit 0ded660 into main Nov 3, 2025
1 check passed
@jdieter
jdieter deleted the add-variant-support branch November 3, 2025 15:17
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.

3 participants