From 3ee919512d2fcc853ba3aa731116cd3a38d1d5a7 Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Date: Thu, 25 Apr 2019 12:31:36 +0200 Subject: [PATCH] Rebase to new release - Resolves #1686626 - Also renamed libbpf to libbcc_bpf Signed-off-by: Rafael dos Santos --- .gitignore | 1 + bcc-0.9.0-rename-libbpf.patch | 39 +++++++++++++++++++++++++++++++++++ bcc.spec | 26 +++++++++++++++++------ sources | 2 +- 4 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 bcc-0.9.0-rename-libbpf.patch diff --git a/.gitignore b/.gitignore index cb3c5f0..c867f73 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ /bcc-0.6.1.tar.gz /bcc-0.7.0.tar.gz /bcc-0.8.0.tar.gz +/bcc-0.9.0.tar.gz diff --git a/bcc-0.9.0-rename-libbpf.patch b/bcc-0.9.0-rename-libbpf.patch new file mode 100644 index 0000000..3ee60be --- /dev/null +++ b/bcc-0.9.0-rename-libbpf.patch @@ -0,0 +1,39 @@ +From 3677925107c203d6e959250776cf7afd80e04da0 Mon Sep 17 00:00:00 2001 +From: yonghong-song +Date: Wed, 27 Mar 2019 08:52:24 -0700 +Subject: [PATCH] rename libbpf.{a,so} to libbcc_bpf.{a,so} (#2290) + +This is based on discussion in netdev regarding to libbpf repo +packaging: + https://lore.kernel.org/bpf/20190325202009.GA14511@krava/T/#t + +The libbpf repo https://github.com/libbpf/libbpf contains +the linux:tools/lib/bpf codes plus some other uapi and auxiliary +headers. It is natural for libbpf repo to generate a +libbpf.{a,so} installable as a package. + +To avoid conflicts, let us rename bcc libbpf.{a,so} +to libbcc_bpf.{a,so}. + +Signed-off-by: Yonghong Song +--- + src/cc/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/cc/CMakeLists.txt b/src/cc/CMakeLists.txt +index 59a598560..1c3df632c 100644 +--- a/src/cc/CMakeLists.txt ++++ b/src/cc/CMakeLists.txt +@@ -30,10 +30,10 @@ include(static_libstdc++) + + file(GLOB libbpf_sources "libbpf/src/*.c") + add_library(bpf-static STATIC libbpf.c perf_reader.c ${libbpf_sources}) +-set_target_properties(bpf-static PROPERTIES OUTPUT_NAME bpf) ++set_target_properties(bpf-static PROPERTIES OUTPUT_NAME bcc_bpf) + add_library(bpf-shared SHARED libbpf.c perf_reader.c ${libbpf_sources}) + set_target_properties(bpf-shared PROPERTIES VERSION ${REVISION_LAST} SOVERSION 0) +-set_target_properties(bpf-shared PROPERTIES OUTPUT_NAME bpf) ++set_target_properties(bpf-shared PROPERTIES OUTPUT_NAME bcc_bpf) + + set(bcc_common_sources bcc_common.cc bpf_module.cc bcc_btf.cc exported_files.cc) + if (${LLVM_PACKAGE_VERSION} VERSION_EQUAL 6 OR ${LLVM_PACKAGE_VERSION} VERSION_GREATER 6) diff --git a/bcc.spec b/bcc.spec index 2be5f9b..defc195 100644 --- a/bcc.spec +++ b/bcc.spec @@ -8,15 +8,25 @@ %bcond_without llvm_static Name: bcc -Version: 0.8.0 -Release: 5%{?dist} +Version: 0.9.0 +Release: 1%{?dist} Summary: BPF Compiler Collection (BCC) License: ASL 2.0 URL: https://github.com/iovisor/bcc -Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +# Generate source tarball until upstream bug is fixed +# See https://github.com/iovisor/bcc/issues/2261 +# To generate the tarball, use the following commands +# git clone -b "v0.9.0" --single-branch --depth 1 url bcc-0.9.0 +# pushd bcc-0.9.0 +# git submodule update --init +# popd +# tar zcvf bcc-0.9.0.tar.gz bcc-0.9.0/ +#Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +Source0: %{name}-%{version}.tar.gz # https://bugzilla.redhat.com/show_bug.cgi?id=1679310 -Patch0: %{name}-%{version}-usdt-s390x.patch +Patch0: %{name}-0.8.0-usdt-s390x.patch +Patch1: %{name}-%{version}-rename-libbpf.patch # Arches will be included as upstream support is added and dependencies are # satisfied in the respective arches @@ -145,11 +155,11 @@ rm -rf %{buildroot}%{_datadir}/%{name}/tools/old/ %doc README.md %license LICENSE.txt %{_libdir}/lib%{name}.so.* -%{_libdir}/libbpf.so.* +%{_libdir}/libbcc_bpf.so.* %files devel %{_libdir}/lib%{name}.so -%{_libdir}/libbpf.so +%{_libdir}/libbcc_bpf.so %{_libdir}/pkgconfig/lib%{name}.pc %{_includedir}/%{name}/ @@ -173,6 +183,10 @@ rm -rf %{buildroot}%{_datadir}/%{name}/tools/old/ %changelog +* Thu Apr 25 2019 Rafael dos Santos - 0.9.0-1 +- Rebase to latest upstream version (#1686626) +- Rename libbpf header to libbcc_bpf + * Mon Apr 22 2019 Neal Gompa - 0.8.0-5 - Make the Python 3 bindings package noarch - Small cleanups to the spec diff --git a/sources b/sources index e7d362f..5386e20 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (bcc-0.8.0.tar.gz) = e46bd8076f6a440b05fd4f94e14d05365d685bfef43d466831a82891a1c131aed22028d29e5be5dd957f00fc3e31d84a96021adf90ae7dbcd7bbf888a7c19774 +SHA512 (bcc-0.9.0.tar.gz) = 1a81c2f7c901cffebf877208e51638714bf937d19cd81a10243aba0ba7131c9ebc69f44c0d6d310b0a6598f020a3a3ae13b8e483d7bedaeb4e991b6008ece8a6