Re: Plans for libbpf packaging for distros?
Jakub Kicinski
On Thu, 8 Nov 2018 14:37:54 +0100, Jesper Dangaard Brouer wrote:
Hi Jakub, Laura and Jiri Olsa (Cc others),To my understanding it's useful in two ways: - some less fortunate distros (Debian) reportedly need a kernel build to package bpftool, and for libbpf the same would have to happen. At least that's what I'm told. So separate repo helps there a lot; - we actually use the separate git repo as a submodule in our projects (https://github.com/Netronome/bpf-samples will migrate there really soon, just finishing code review). So for us the git submodule thing works quite well until distros package libbpf :) To be honest, I have very little knowledge about building RPMs andWe were planning to do the same thing for libbpf. Let me copy paste the patch to the package: Add libbpf to kernel tools development libs. This library contains functionality for loading and managing eBPF programs. Signed-off-by: David Beckett <david.beckett@...> --- kernel-tools.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/kernel-tools.spec b/kernel-tools.spec index 44d29ba..cf2f7a0 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -261,6 +261,9 @@ popd pushd tools/gpio/ make popd +pushd tools/lib/bpf +make +popd pushd tools/bpf/bpftool make popd @@ -347,6 +350,9 @@ popd pushd tools/kvm/kvm_stat make INSTALL_ROOT=%{buildroot} install-tools popd +pushd tools/lib/bpf +make DESTDIR=%{buildroot} prefix=%{_prefix} install install_headers +popd pushd tools/bpf/bpftool make DESTDIR=%{buildroot} prefix=%{_prefix} bash_compdir=%{_sysconfdir}/bash_completion.d/ mandir=%{_mandir} install doc-install popd @@ -420,8 +426,13 @@ popd %files -n kernel-tools-libs-devel %{_libdir}/libcpupower.so +%{_libdir}/libbpf.a +%{_libdir}/libbpf.so %{_includedir}/cpufreq.h %{_includedir}/cpuidle.h +%{_includedir}/bpf/bpf.h +%{_includedir}/bpf/btf.h +%{_includedir}/bpf/libbpf.h %files -n bpftool %{_sbindir}/bpftool Fairly trivial patch, but since we learnt about the separate repo we are migrating our internal projects and tests to that, then Alexei suggested we need to add proper versioning to libbpf, and when all that is done we can come back to packaging. |
|