Repository navigation
kpatch-build, lib.sh: add kernel variant support - #1530
usebeforefree wants to merge 2 commits into
Conversation
|
@usebeforefree - thanks for the PR. The parsing and code looks mostly good, I have a few cosmetic suggestions:
Also, at some point would you later update the testing farm / packit CI to run aarch64-64k ? |
12cc263 to
3e73301
Compare
Add kpatch-build, and test support for kernel variants in RHEL-derived distributions (e.g., +64k , +rt_64k). Signed-off-by: Marko Kostić <mkostic@redhat.com>
3e73301 to
1ce2d1a
Compare
|
Thanks for the review @joe-lawrence ! Applied all the suggestions.
I used the kpatch/kpatch-build/kpatch-build Lines 981 to 988 in 74ac9ff I can find-and-replace them if we'd like to use the proper term.
I will do this in a separate PR, otherwise we'd create circular dependency within them. |
You can leave the Photon "flavor" references in place. I have no idea if that's what that distribution uses that naming convention, I just thought for RHEL-based releases we should adopt what its kernel specfile is already using. (Naming things is already hard enough :)
Sounds good. |
|
@Tomcat-42 @ykopkova : I have no idea how to add @usebeforefree, or anybody for that matter, to the testing farm access. The current results say, "usebeforefree can't run tests internally". How can we add him? Thanks. |
|
Update: I would actually like to enable the packit tests in this PR, working on it in the meantime. |
I "think" only project maintainers or members can trigger packit ci testing. |
|
Update: I came up with this solution for adding the I see the test case is called in this PR, someone just needs to figure out a way to make the pipeline accept it. Though we firstly need to target the The easiest certainly would be:
Note to self: the same branch shenanigans could be done with Side question: Should we update other tests to target rhel-10.3? |
You know more than me about the testing :D, so I'd defer to Yulia / Pablo about this.
The next sprint we should be updating/pushing out final integration tests for the next y-stream releases. I think that's a pre-req for what you're asking here? |
|
/packit test |
f37de49 to
38fb136
Compare
|
/packit test |
1 similar comment
|
/packit test |
38fb136 to
bc8ebe1
Compare
|
not ready for merging, the 64k test is pointed to a custom branch |
|
/packit test |
bc8ebe1 to
1a0a39d
Compare
Signed-off-by: Marko Kostić <mkostic@redhat.com>
|
/packit test |
1a0a39d to
29cf1af
Compare
|
The tests for all arches except The only thing left really here is an issue I discovered along the way. The TLDR is that with this proposed fix you can't use the kpatch-build kpatch/kpatch-build/kpatch-build Lines 916 to 930 in 74ac9ff |
|
My proposal for how to fix the issue when calling
if [[ "$(uname -r)" =~ \+(.*)$ ]]; then
warn "kernel variants are incompatible with --sourcerpm"
exit 1
fi
if [[ "$(uname -r)" =~ \+(.*)$ ]]; then
ARCHVERSION="${ARCHVERSION}+${BASH_REMATCH[1]}"
fiNo idea what would be the better option. Exiting seems safer in any case, but I don't have the experience of how using kpatch-build to say if 2. solution would be viable. |
Here is how the kpatch-patch.spec runs kpatch-build: # ... close your eyes, kids, it's .specfile voodoo ...
kpatch-build/kpatch-build -n %{patchmodname} -r %{SOURCE10} -v $vmlinux --skip-cleanup $patch_sourcesI see, that's an interesting problem: the user initiates a kpatch-build and specifies the source rpm. Up until now, we could assume that the user was interested in the same-arch (non-variant) configuration from the source rpm. With this arm64 64k variant, that assumption may not always hold true. (BTW, I think this may be a similar problem if one wanted to build for modern RHEL realtime variant as well.) I think the "right" answer is probably an additional Does that capture the last hurdle and work as a solution? |
|
I think the proposal would work, but only if running kpatch-build on ex. I don't have the expertise to know this, what I do have are logs of tests that failed due to this exact situation, and an LLM analysis: A mismatch can at least cause a user to waste time on building the wrong kernel (see If the above is true, maybe we can just add an internal check for mismatch between running system variant and (non)passed variant? edit: I am confused about the usage of kpatch-build across different host and target systems, so feel free to just say if all this above is not really relevant, and I'll proceed to implement |
At the moment kpatch-build doesn't support kernel variants (e.g., +64k , +rt_64k), this PR aims to add support for kpatch-build and testing for them. Tested on
kernel-64k-aarch64.Cc: @joe-lawrence