The package rpms/kernel-tools.git has added or updated architecture specific content in
its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/kernel-tools.git/commit/?id=0f768....
Change:
+%ifnarch i686 armv7hl
Thanks.
Full change:
============
commit 0f76832967ddcae1eea88b9b7d5fb4bfbe662b70
Author: Justin M. Forbes <jforbes(a)fedoraproject.org>
Date: Wed Apr 20 14:04:41 2022 -0500
Fix BPF build
Signed-off-by: Justin M. Forbes <jforbes(a)fedoraproject.org>
diff --git a/kernel-tools.spec b/kernel-tools.spec
index e5e49ee..dba98b9 100644
--- a/kernel-tools.spec
+++ b/kernel-tools.spec
@@ -72,6 +72,10 @@ BuildRequires: asciidoc xmlto libcap-devel
BuildRequires: openssl-devel libbabeltrace-devel
BuildRequires: libbpf-devel
BuildRequires: clang llvm
+# bpftool will look for a matching vmlinux.h here
+%ifnarch i686 armvv7hl
+BuildRequires: kernel-devel
+%endif
# Used to mangle unversioned shebangs to be Python 3
BuildRequires: /usr/bin/pathfix.py
%ifnarch s390x %{arm}
@@ -276,8 +280,18 @@ pushd tools/gpio/
%{tools_make}
popd
+# This is a bit messy, but if we have a kernel-devel installed from this version, and it
includes a vmlinux.h
+# we want to use that. Otherwise, we need to pass an empty so it will generate one from
the running kernel.
+%ifnarch i686 armv7hl
+develpackage=$(rpm -qa | grep "kernel-devel" | grep %{kversion})
+vmlinux_h=$(rpm -ql $develpackage | grep vmlinux.h)
+if [ -f $vmlinux_h ]; then
+ RPM_VMLINUX_H=$vmlinux_h
+fi
+%endif
+
%global bpftool_make \
- make EXTRA_CFLAGS="${RPM_OPT_FLAGS}"
EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT V=1
+ make EXTRA_CFLAGS="${RPM_OPT_FLAGS}"
EXTRA_LDFLAGS="%{__global_ldflags}" DESTDIR=$RPM_BUILD_ROOT
VMLINUX_H="${RPM_VMLINUX_H}" V=1
pushd tools/bpf/bpftool
%{bpftool_make}