kpatch build dependency cleanup#1271
Merged
joe-lawrence merged 5 commits intodynup:masterfrom May 25, 2022
Merged
Conversation
EPEL ships an epel-release-latest-X.noarch.rpm per rhel-X major release. Install the package matching the system release. Signed-off-by: Joe Lawrence <[email protected]>
The yum-builddep utility doesn't always install all the kernel build dependencies. Using the --skip-unavailable flag (rhel8+) lets us skip over packages that it can't find, but continue to install the ones it can. (Unavailable packages are usually platform-specific or not strictly necessary for kpatch-build's kernel build invocation.) Signed-off-by: Joe Lawrence <[email protected]>
All three distributions work more or less the same, so just combine their dependency installs. Signed-off-by: Joe Lawrence <[email protected]>
Installing the dependencies should be a one-step operation for the user. Signed-off-by: Joe Lawrence <[email protected]>
We've got a lot of top level Makefile targets, help out the user. Signed-off-by: Joe Lawrence <[email protected]>
joe-lawrence
commented
May 23, 2022
| @echo | ||
| @echo "[1] requires admin privileges" | ||
| @echo "[2] installs test kpatch kernel modules, run at your own risk" | ||
| @echo |
Contributor
Author
There was a problem hiding this comment.
(I skipped the vagrant targets since we don't document them on any markdown page.)
sm00th
approved these changes
May 23, 2022
Contributor
sm00th
left a comment
There was a problem hiding this comment.
Neat trick, indeed builddep has been a pain-point for a while. One might have thought --skip-unavailable will yield you less packages, not more.
Didn't try it but the changes look good to me.
jpoimboe
approved these changes
May 25, 2022
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.
yum-builddep kernelhas been bugging me for a long time. Sometimes it installs all kernel build dependencies, other times it leaves out obvious packages like bison, flex, bc, etc. The RHEL kernel.spec file is not the most straightforward specfile and I think effort has gone into paring down a minimal dependency set (think about skipping debug builds, kABI, all the other things that the specfile can do). Whether specfile complexity is the root cause or not, the result is that I have to often install additional packages after running test/integration/lib.sh's kpatch_dependencies() function.This patchset modifies kpatch_dependencies()'s
yum-builddepinvocation to add--skip-unavailable, which in my limited tests, seems to render a more complete dependency install. My theory is that without the flag, yum bails out early once it encounters a package it can't install (perhaps a dep for another architecture). With the flag, many more packages do get installed, at least the ones that kpatch-build's kernel build actually requires.A few cleanups were added along the way, including a few top-level Makefile flourishes that I thought would be helpful.