From ad01cdfcf0bc98c130fd14634f0252e70c75a71c Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Apr 03 2019 18:24:58 +0000 Subject: Add libbpf package We need libbpf in a separate package, starting with basic files, some more might come later if there's a need. --- diff --git a/kernel-tools.spec b/kernel-tools.spec index 0b1fd44..c5836f4 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -5,7 +5,7 @@ # and/or a kernel built from an rc or git snapshot, released_kernel should # be 0. %global released_kernel 0 -%global baserelease 1 +%global baserelease 2 %global fedora_build %{baserelease} # base_sublevel is the kernel version we're starting with and patching @@ -176,6 +176,19 @@ License: GPLv2 This package contains the bpftool, which allows inspection and simple manipulation of eBPF programs and maps. +%package -n libbpf +Summary: The bpf library from kernel source +License: GPLv2 +%description -n libbpf +This package contains the kernel source bpf library. + +%package -n libbpf-devel +Summary: Developement files for the bpf library from kernel source +License: GPLv2 +%description -n libbpf-devel +This package includes libraries and header files needed for development +of applications which use bpf library from kernel source. + %prep %setup -q -n kernel-%{kversion}%{?dist} -c @@ -253,6 +266,9 @@ popd pushd tools/bpf/bpftool make popd +pushd tools/lib/bpf +make V=1 +popd # Build the docs pushd tools/kvm/kvm_stat/ @@ -340,6 +356,9 @@ make DESTDIR=%{buildroot} prefix=%{_prefix} bash_compdir=%{_sysconfdir}/bash_com # man-pages packages this (rhbz #1686954) rm %{buildroot}%{_mandir}/man7/bpf-helpers.7 popd +pushd tools/lib/bpf +make DESTDIR=%{buildroot} prefix=%{_prefix} libdir=%{_libdir} V=1 install install_headers +popd ### ### scripts @@ -420,7 +439,23 @@ popd %{_mandir}/man8/bpftool.8.gz %license linux-%{kversion}/COPYING +%files -n libbpf +%{_libdir}/libbpf.so.0 +%{_libdir}/libbpf.so.0.0.2 +%license linux-%{kversion}/COPYING + +%files -n libbpf-devel +%{_libdir}/libbpf.a +%{_libdir}/libbpf.so +%{_includedir}/bpf/bpf.h +%{_includedir}/bpf/btf.h +%{_includedir}/bpf/libbpf.h +%license linux-%{kversion}/COPYING + %changelog +* Tue Apr 02 2019 Jiri Olsa - 5.1.0-0.rc3.git0.2 +- Add libbpf, libbpf-devel and libbpf-debuginfo packages + * Mon Apr 01 2019 Jeremy Cline - 5.1.0-0.rc3.git0.1 - Linux v5.1-rc3