From: Prarit Bhargava <prarit(a)redhat.com>
redhat/kernel.spec.template: Specify vmlinux.h path when building samples/bpf
Bugzilla:
https://bugzilla.redhat.com/2041365
Upstream status: RHEL only.
Since the backport of commit 384b6b3bbf0d ("samples: bpf: Add
vmlinux.h generation support"), building samples/bpf start generating
vmlinux.h from vmlinux for use by patches. It provides a option to
provides vmlinux path through VMLINUX_BTF variable or vmlinux.h
directly through VMLINUX_H.
For selfests only build (e.g. rpmbuild --rebuild --without up
--without debug --without zfcpdump), we need to provide at least one
of those variables. So provide VMLINUX_H since that the one we already
use for selftests.
Signed-off-by: Jerome Marchand <jmarchan(a)redhat.com>
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100755
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -2356,7 +2356,7 @@ if [ ! -f include/generated/autoconf.h ]; then
%{make} %{?_smp_mflags} modules_prepare
fi
-%{make} %{?_smp_mflags} ARCH=$Arch V=1 M=samples/bpf/ || true
+%{make} %{?_smp_mflags} ARCH=$Arch V=1 M=samples/bpf/
VMLINUX_H="${RPM_VMLINUX_H}" || true
# Prevent bpf selftests to build bpftool repeatedly:
export BPFTOOL=$(pwd)/tools/bpf/bpftool/bpftool
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2021