[PATCH] kernel-tools.spec: Adding libbpf package

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,
please consider attached change that adds libbpf sub
package to be generated within kernel-tools spec.

We need libbpf in a separate package, starting with basic
files, some more might come later if there's a need.

thanks,
jirka


---
Packaging libbpf library, resulting in 3 packages:
  libbpf
  libbpf-devel
  libbpf-debuginfo

$ rpm -qpl libbpf-5.1.0-0.rc3.git0.1.fc31.x86_64.rpm
/usr/lib/.build-id
/usr/lib/.build-id/da
/usr/lib/.build-id/da/34eb899cd9b325e75073da52cb12682a405910
/usr/lib64/libbpf.so.0
/usr/lib64/libbpf.so.0.0.2
/usr/share/licenses/libbpf
/usr/share/licenses/libbpf/COPYING

$ rpm -qpl libbpf-devel-5.1.0-0.rc3.git0.1.fc31.x86_64.rpm
/usr/include/bpf/bpf.h
/usr/include/bpf/btf.h
/usr/include/bpf/libbpf.h
/usr/lib64/libbpf.a
/usr/lib64/libbpf.so
/usr/share/licenses/libbpf-devel
/usr/share/licenses/libbpf-devel/COPYING

$ rpm -qpl libbpf-debuginfo-5.1.0-0.rc3.git0.1.fc31.x86_64.rpm
/usr/lib/debug
/usr/lib/debug/.build-id
/usr/lib/debug/.build-id/da
/usr/lib/debug/.build-id/da/34eb899cd9b325e75073da52cb12682a405910
/usr/lib/debug/.build-id/da/34eb899cd9b325e75073da52cb12682a405910.debug
/usr/lib/debug/usr
/usr/lib/debug/usr/lib64
/usr/lib/debug/usr/lib64/libbpf.so.0.0.2-5.1.0-0.rc3.git0.1.fc31.x86_64.debug
---
 kernel-tools.spec | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/kernel-tools.spec b/kernel-tools.spec
index 0b1fd4438155..68b4f93ebc68 100644
--- a/kernel-tools.spec
+++ b/kernel-tools.spec
@@ -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 <jolsa@xxxxxxxxxx> - 5.1.0-1.rc3.git0.1
+- Add libbpf, libbpf-devel and libbpf-debuginfo packages
+
 * Mon Apr 01 2019 Jeremy Cline <jeremy@xxxxxxxxxx> - 5.1.0-0.rc3.git0.1
 - Linux v5.1-rc3
 
-- 
2.17.2
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux