Skip to content

kpatch-build cleanups#759

Merged
joe-lawrence merged 6 commits intodynup:masterfrom
juergh:master-next
Nov 17, 2017
Merged

kpatch-build cleanups#759
joe-lawrence merged 6 commits intodynup:masterfrom
juergh:master-next

Conversation

@juergh
Copy link
Copy Markdown

@juergh juergh commented Nov 10, 2017

Added --archversion commandline option conflict detection.

This was introduced in commit 5352d8b ('build objects in separate
directory to fix caching') but is no longer necessary.

Fixes: 2e99d6b ('kpatch-build: build the kernel in ~/.kpatch/src again')
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Fixes: 8dc25d7 ('kpatch-build: let user specify kpatch module name')
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Replace stray spaces with tabs, except in the usage output where tabs
don't make much sense.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
This can be used for building a kpatch module for a non-running
kernel. Note that the correct kernel and debug packages still need
to be installed.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
The current checks never fail, because the first grep in the pipeline
doesn't write anything to stdout.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
When searching for 'Linux version ...' in vmlinux, stop after the first
match so that we don't keep reading a potentially huge file.

Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
@jpoimboe
Copy link
Copy Markdown
Member

Looks good, thanks!

BTW, next time you don't have to open a new pull request when you make changes. You can reuse the same pull request by force pushing to the original branch.

👍

@jpoimboe jpoimboe changed the title Master next kpatch-build cleanups Nov 10, 2017
@jpoimboe
Copy link
Copy Markdown
Member

This feature worked for me on Fedora 26:

[pr/759] ~/git/kpatch $ uname -r
4.13.10-200.fc26.x86_64
[pr/759] ~/git/kpatch $ rpm -q kernel-debuginfo
kernel-debuginfo-4.13.11-200.fc26.x86_64
[pr/759] ~/git/kpatch $ kpatch-build/kpatch-build -a 4.13.11-200.fc26.x86_64 -t vmlinux test/integration/fedora-25/meminfo-string.patch
Fedora/Red Hat distribution detected
Downloading kernel source for 4.13.11-200.fc26.x86_64
Unpacking kernel source
Testing patch file(s)
Reading special section data
Building original kernel
Building patched kernel
Extracting new and modified ELF sections
meminfo.o: changed function: meminfo_proc_show
Patched objects: vmlinux
Building patch module: kpatch-meminfo-string.ko
SUCCESS

@jpoimboe jpoimboe mentioned this pull request Nov 17, 2017
@joe-lawrence
Copy link
Copy Markdown
Contributor

@juergh : the patchset looks good, the speed up in 'kpatch-build: Stop reading vmlinux after the first match' shaves over 10 seconds off the build in my Fedora VM.

@joe-lawrence joe-lawrence merged commit 270d783 into dynup:master Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants