hi,
please consider attached change that adds bpftool sub
package to be generated within kernel-tools spec.
The reason to have bpftool in separate rpm is to
have minimal dependency for sosreport that will
depend on it.
The bpftool rpm contains following files:
$ rpm -ql -p bpftool-4.16.0-0.rc5.git0.1.fc29.x86_64.rpm
/etc/bash_completion.d/bpftool
/usr/sbin/bpftool
/usr/share/man/man8/bpftool-cgroup.8.gz
/usr/share/man/man8/bpftool-map.8.gz
/usr/share/man/man8/bpftool-prog.8.gz
/usr/share/man/man8/bpftool.8.gz
thanks,
jirka
---
kernel-tools.spec | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/kernel-tools.spec b/kernel-tools.spec
index c8cbcff104fd..2d190d0497b6 100644
--- a/kernel-tools.spec
+++ b/kernel-tools.spec
@@ -69,7 +69,7 @@ BuildRequires: kmod, patch, bash, tar, git
BuildRequires: bzip2, xz, findutils, gzip, m4, perl-interpreter, perl(Carp), perl-devel, perl-generators, make, diffutils, gawk
BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc
BuildRequires: net-tools, hostname, bc, elfutils-devel
-BuildRequires: zlib-devel binutils-devel newt-devel python2-devel perl(ExtUtils::Embed) bison flex xz-devel
+BuildRequires: zlib-devel binutils-devel newt-devel python2-devel python2-docutils perl(ExtUtils::Embed) bison flex xz-devel
BuildRequires: audit-libs-devel glibc-devel glibc-static
%ifnarch s390x %{arm}
BuildRequires: numactl-devel
@@ -164,6 +164,13 @@ Provides: kernel-tools-devel
This package contains the development files for the tools/ directory from
the kernel source.
+%package -n bpftool
+Summary: Inspection and simple manipulation of eBPF programs and maps
+License: GPLv2
+%description -n bpftool
+This package contains the bpftool, which allows inspection and simple
+manipulation of eBPF programs and maps.
+
%prep
%setup -q -n kernel-%{kversion}%{?dist} -c
@@ -233,6 +240,9 @@ popd
pushd tools/gpio/
make
popd
+pushd tools/bpf/bpftool
+make
+popd
###
### install
@@ -299,6 +309,9 @@ popd
pushd tools/kvm/kvm_stat
make INSTALL_ROOT=%{buildroot} install-tools
popd
+pushd tools/bpf/bpftool
+make DESTDIR=%{buildroot} prefix=%{_prefix} bash_compdir=%{_sysconfdir}/bash_completion.d/ mandir=%{_mandir} install doc-install
+popd
###
### scripts
@@ -368,6 +381,14 @@ popd
%{_includedir}/cpufreq.h
%{_includedir}/cpuidle.h
+%files -n bpftool
+%{_sbindir}/bpftool
+%{_sysconfdir}/bash_completion.d/bpftool
+%{_mandir}/man8/bpftool-cgroup.8.gz
+%{_mandir}/man8/bpftool-map.8.gz
+%{_mandir}/man8/bpftool-prog.8.gz
+%{_mandir}/man8/bpftool.8.gz
+
%changelog
* Mon Mar 12 2018 Jeremy Cline <jeremy(a)jcline.org> - 4.16.0-0.rc5.git0.1
- Linux 4.16-rc5
--
2.13.6