From: Prarit Bhargava <pra...@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 <jmarc...@redhat.com>
Signed-off-by: Prarit Bhargava <pra...@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
_______________________________________________
kernel mailing list -- kernel@lists.fedoraproject.org
To unsubscribe send an email to kernel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/kernel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to