Skip to content

redhat: pass correct RPM_VMLINUX_H to bpftool install

Ian Wienand requested to merge iwienand/centos-stream-9:bpf-build-fix into main

redhat: pass correct RPM_VMLINUX_H to bpftool install

This is required to fix occasional racy build failures where the lack of a correctly specified path to vmlinux.h in the %install phase can cause the bpf Makefile to try and re-generate it against the build-host kernel; the mistmatched built tools and host kernel can then crash, aborting the build. To add to the fun of this, it's somewhat randomly tied to when bpf /sys/ files have updated timestamps to trigger the make dependency.

By saving the file and referencing in the %install phase, we bypass all this.

JIRA: INTERNAL
Upstream-status: https://gitlab.com/cki-project/kernel-ark
Related-issue: https://gitlab.com/cki-project/kernel-arkproject/infrastructure/-/issues/340
Related-MR: cki-project/kernel-ark!3105 (merged)
Link: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/commit/?id=e7b64f9d3f5b10186038201e0b91f734cbd7fc3d

Signed-off-by: Ian Wienand iwienand@redhat.com

Edited by Ian Wienand

Merge request reports