DevHeads.net

Using debugsource package during package build

hi,
I just learnt I can't use debugsource package during package build ;-(
No matching package to install: 'libbpf-debugsource'

The issue I'm trying to solve is to change bcc package to use
libbpf as dynamic dependency instead of static one, which is
causing many other problems.

Bcc would normaly download libbpf from Github (during the build) and
use some of its sources to build libbcc_bpf.so library. The recent
change allows bcc to use libbpf package instead and link libbpf
dynamicaly into libbcc. The bcc change already got upstream:
<a href="https://github.com/iovisor/bcc/commit/d4b3bf03d9c67324ff85f9d3c74b201b7e427615" title="https://github.com/iovisor/bcc/commit/d4b3bf03d9c67324ff85f9d3c74b201b7e427615">https://github.com/iovisor/bcc/commit/d4b3bf03d9c67324ff85f9d3c74b201b7e...</a>

So now it should be just the matter of patch below..

However bcc package still needs part of the libbpf sources to build
libbcc, which I was hoping would be supplied by libbpf-debugsource
package.

I'm told there's no way I could use debugsource package during
the spec build. Could I build my 'own libbpf-source' package?

Any ideas/suggestions?

thanks,
jirka

Requires: %{name}-tools = %{version}-%{release}
+Requires: libbpf

%description
BCC is a toolkit for creating efficient kernel tracing and manipulation
@@ -113,6 +115,7 @@ Command line tools for BPF Compiler Collection (BCC)
%cmake . \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DREVISION_LAST=%{version} -DREVISION=%{version} -DPYTHON_CMD=python3 \
+ -DCMAKE_USE_LIBBPF_PACKAGE:BOOL=TRUE \
%{?with_llvm_shared:-DENABLE_LLVM_SHARED=1}
%make_build

@@ -152,6 +155,7 @@ rm -rf %{buildroot}%{_datadir}/%{name}/tools/old/
%license LICENSE.txt
%{_libdir}/lib%{name}.so.*
%{_libdir}/libbcc_bpf.so.*
+%{_libdir}/libbcc-no-libbpf.so.*

%files devel
%{_libdir}/lib%{name}.so