From d0f955b0fd0cf4bcd19ef92feb968813c8adf3d0 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Mar 29 2018 16:51:03 +0000 Subject: Add bpftool package to kernel-tools 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 --- diff --git a/kernel-tools.spec b/kernel-tools.spec index f2e9192..e26c80e 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,15 @@ 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 +%license linux-%{kversion}/COPYING + %changelog * Mon Mar 26 2018 Jeremy Cline - 4.16.0-0.rc7.git0.1 - Linux 4.16-rc7