-
Notifications
You must be signed in to change notification settings - Fork 335
kpatch-build: sanity check patched filenames #1030
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
Conversation
|
I was revisiting issue #902 to see if we could improve the user experience a bit. Here's an enhancement that could head off some low-hanging fruit if the user tries to patch file paths that are obviously unsupported. Since this operates on the patch file itself, feedback is provided fairly early in the process and not after long kernel builds. Here's what the output looks like with test patches: I can add additional pathname patterns if desired. I'd be interested in other sanity checks that could be applied through simple patch file inspection as well. |
|
Looks good, though I guess our (horribly out-of-date) README should also be updated to make patchutils a real dependency instead of only being needed for unit tests. |
Run the input patch(es) through lsdiff and then verify that no obviously unsupported files are directly modified (e.g. assembly .S files). Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
3c2c548 to
e4525ce
Compare
|
v2: updated the README.md file |
|
While we're at it, is there anything else that would make sense to check? Other un-patchable files? Directory depth (ie, one that applies with |
|
Not that I can think of, but you might want to look at all the files that are ignored by kpatch-gcc. For example, it ignores |
Here's the interesting portion of that list: Already got As far as removing the checks in kpatch-gcc, I don't think we can do that as this commit only checks direct changes to those source files. A header file change could slip through and still modify an end object file, so I think kpatch-gcc needs to keep its checks intact. |
Agreed |
|
Merging this for now, we can update paths later if we need to. |
Run the input patch(es) through lsdiff and then verify that no obviously
unsupported files are directly modified (e.g. assembly .S files).
Signed-off-by: Joe Lawrence joe.lawrence@redhat.com