-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kpatch build dependency cleanup #1271
kpatch build dependency cleanup #1271
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 <joe.lawrence@redhat.com>
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 <joe.lawrence@redhat.com>
All three distributions work more or less the same, so just combine their dependency installs. Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
Installing the dependencies should be a one-step operation for the user. Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
We've got a lot of top level Makefile targets, help out the user. Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
@echo | ||
@echo "[1] requires admin privileges" | ||
@echo "[2] installs test kpatch kernel modules, run at your own risk" | ||
@echo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I skipped the vagrant targets since we don't document them on any markdown page.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
yum-builddep kernel
has 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-builddep
invocation 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.