Build bcc from standard sources

We provide libbpf package and bcc is already link to it. We don't need
to bother with bcc-src-with-submodule.tar.gz source file.

Libbpf tools still build and link to the submodule libbpf package, so
make sure that libbpf tools are linked to the externel libbpf library.
This commit is contained in:
Jerome Marchand 2021-05-18 12:02:20 +02:00
parent 7b7ddeba41
commit 2221774aa0
3 changed files with 9 additions and 7 deletions

1
.gitignore vendored
View File

@ -13,3 +13,4 @@
/0001-Add-libbcc-no-libbpf.so-library.patch
/0002-Use-libbpf-static-instead-of-libbpf-debugsource-for-.patch
/bcc-src-with-submodule.tar.gz
/bcc-0.20.0.tar.gz

View File

@ -27,13 +27,11 @@
Name: bcc
Version: 0.20.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: BPF Compiler Collection (BCC)
License: ASL 2.0
URL: https://github.com/iovisor/bcc
# Upstream now provides a release with the git submodule embedded in it
Source0: %{url}/releases/download/v%{version}/%{name}-src-with-submodule.tar.gz
#Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
# Arches will be included as upstream support is added and dependencies are
# satisfied in the respective arches
@ -129,7 +127,7 @@ Command line libbpf tools for BPF Compiler Collection (BCC)
%endif
%prep
%autosetup -p1 -n %{name}
%autosetup -p1
%build
@ -147,7 +145,7 @@ Command line libbpf tools for BPF Compiler Collection (BCC)
# take them.
%if %{with libbpf_tools}
pushd libbpf-tools;
make BPFTOOL=bpftool
make BPFTOOL=bpftool LIBBPF_OBJ=%{_libdir}/libbpf.a
make DESTDIR=./tmp-install prefix= install
(cd tmp-install/bin; for file in *; do mv $file bpf-$file; done;)
popd
@ -226,6 +224,9 @@ install libbpf-tools/tmp-install/bin/* %{buildroot}/%{_sbindir}
%endif
%changelog
* Tue May 18 2021 Jerome Marchand <jmarchan@redhat.com> - 0.20.0-2
- Build bcc from standard sources
* Mon May 17 2021 Rafael dos Santos <rdossant@redhat.com> - 0.20.0-1
- Rebase to latest upstream (#1957727)

View File

@ -1 +1 @@
SHA512 (bcc-src-with-submodule.tar.gz) = 60ab3e7e11015878895d009afb2290d1e677e3c7bc04f493eb586136af190d7c0930757b34e721822eaf6700ecc17edeb30a4b04ea29c4a26cb885164060030a
SHA512 (bcc-0.20.0.tar.gz) = fa7c50a4fc64846ad798b6652101aa414cda53d08779cf48bd505191189cb23da2838f7511e700d59e086d35216f4e3bc9867b614738061630984dff3c4576dc