From e33c6d63034cf2f4a0d15fc26c75cf1a8e412b98 Mon Sep 17 00:00:00 2001 From: Rafael dos Santos Date: Jan 02 2020 22:16:52 +0000 Subject: Rebase to latest upstream version - Resolves #1758417 Signed-off-by: Rafael dos Santos --- diff --git a/.gitignore b/.gitignore index 9761938..4ef0033 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /bcc-0.11.0.tar.gz /0001-Add-libbcc-no-libbpf.so-library.patch /0002-Use-libbpf-static-instead-of-libbpf-debugsource-for-.patch +/bcc-src-with-submodule.tar.gz diff --git a/0001-Fix-compilation-error-ppc64le.patch b/0001-Fix-compilation-error-ppc64le.patch new file mode 100644 index 0000000..5d05bbf --- /dev/null +++ b/0001-Fix-compilation-error-ppc64le.patch @@ -0,0 +1,45 @@ +From fb3d17cec9ee8be9b7ac2582b39aad5db474f0da Mon Sep 17 00:00:00 2001 +From: Yonghong Song +Date: Thu, 2 Jan 2020 09:20:07 -0800 +Subject: [PATCH] fix test_map_in_map.cc compilation error + +fix issue #2679 where test_map_in_map.cc has a +compilation error on ppc64le due to conflicting +type __u64. Let us just remove the typedef. + +Signed-off-by: Yonghong Song +--- + tests/cc/test_map_in_map.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/tests/cc/test_map_in_map.cc b/tests/cc/test_map_in_map.cc +index 76c07f77f..f8c1a0b66 100644 +--- a/tests/cc/test_map_in_map.cc ++++ b/tests/cc/test_map_in_map.cc +@@ -22,7 +22,6 @@ + #include "catch.hpp" + + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0) +-typedef unsigned long long __u64; + + TEST_CASE("test hash of maps", "[hash_of_maps]") { + { +@@ -67,7 +66,7 @@ TEST_CASE("test hash of maps", "[hash_of_maps]") { + auto t = bpf.get_map_in_map_table("maps_hash"); + auto ex1_table = bpf.get_array_table("ex1"); + auto ex2_table = bpf.get_array_table("ex2"); +- auto ex3_table = bpf.get_array_table<__u64>("ex3"); ++ auto ex3_table = bpf.get_array_table("ex3"); + int ex1_fd = ex1_table.get_fd(); + int ex2_fd = ex2_table.get_fd(); + int ex3_fd = ex3_table.get_fd(); +@@ -162,7 +161,8 @@ TEST_CASE("test array of maps", "[array_of_maps]") { + auto t = bpf.get_map_in_map_table("maps_array"); + auto ex1_table = bpf.get_hash_table("ex1"); + auto ex2_table = bpf.get_hash_table("ex2"); +- auto ex3_table = bpf.get_hash_table<__u64, __u64>("ex3"); ++ auto ex3_table = ++ bpf.get_hash_table("ex3"); + int ex1_fd = ex1_table.get_fd(); + int ex2_fd = ex2_table.get_fd(); + int ex3_fd = ex3_table.get_fd(); diff --git a/bcc.spec b/bcc.spec index 84ea0b9..ad53c51 100644 --- a/bcc.spec +++ b/bcc.spec @@ -8,23 +8,17 @@ %bcond_without llvm_static Name: bcc -Version: 0.11.0 -Release: 2%{?dist} +Version: 0.12.0 +Release: 1%{?dist} Summary: BPF Compiler Collection (BCC) License: ASL 2.0 URL: https://github.com/iovisor/bcc -# 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.11.0" --single-branch --depth 1 url bcc-0.11.0 -# pushd bcc-0.11.0 -# git submodule update --init -# popd -# tar zcvf bcc-0.11.0.tar.gz bcc-0.11.0/ +# 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: %{name}-%{version}.tar.gz -Patch0: 0001-Add-libbcc-no-libbpf.so-library.patch -Patch1: 0002-Use-libbpf-static-instead-of-libbpf-debugsource-for-.patch + +# https://github.com/iovisor/bcc/issues/2679 +Patch0: 0001-Fix-compilation-error-ppc64le.patch # Arches will be included as upstream support is added and dependencies are # satisfied in the respective arches @@ -110,7 +104,7 @@ Command line tools for BPF Compiler Collection (BCC) %prep -%autosetup -p1 +%autosetup -p1 -n %{name} %build @@ -186,6 +180,9 @@ rm -rf %{buildroot}%{_datadir}/%{name}/tools/old/ %changelog +* Tue Dec 17 2019 Rafael dos Santos - 0.12.0-1 +- Rebase to latest upstream version (#1758417) + * Thu Dec 05 2019 Jiri Olsa - 0.11.0-2 - Add libbpf support diff --git a/sources b/sources index 622ecb6..d2341de 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ -SHA512 (bcc-0.11.0.tar.gz) = 7d6ae598c6ed79eb8ad2d9607f4d20632e7c0d229f1fd33f0503f4e9a1af3db9b63697a1b8e0d1f3d82b0bbe3050bdc09e27dca9106b4527e6844b2b4189a693 -SHA512 (0001-Add-libbcc-no-libbpf.so-library.patch) = 5ac372edeb790c28cbee7067998f238573b3525d85366f941b2c9aa12885c13154d5d3f0af3657b0fc9c54ee7dd64d62a14f8869860bcd8c1005d1b5338a48e2 -SHA512 (0002-Use-libbpf-static-instead-of-libbpf-debugsource-for-.patch) = 8924d39e3b5ef691bbb11e2146097f1b3e68dfe8a2c7116dd6f4d7782861b7758e54843a99576f0821382173b6e3f726e98dab0920ab4726e3bc2abf901553a9 +SHA512 (bcc-src-with-submodule.tar.gz) = ba59189258387511f4bdc450e619802adf61afb96163e7d3c53cba689a18cafe598a7ea077eba612d113e2795b46e54db9bdef5593c5d5ccb4012391b2830e0d