import bcc-0.19.0-4.el8

This commit is contained in:
CentOS Sources 2021-10-05 19:47:47 -04:00 committed by Stepan Oksanichenko
parent ee89dbeb69
commit 64f2ce4ad7
7 changed files with 197 additions and 68 deletions

View File

@ -1 +1 @@
ae5102ef4109f8af03c7282c1f9f2c3201c3a400 SOURCES/bcc-src-with-submodule.tar.gz
96882747089d093b8933456d9c7905407bde7fd9 SOURCES/bcc-0.19.0.tar.gz

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/bcc-src-with-submodule.tar.gz
SOURCES/bcc-0.19.0.tar.gz

View File

@ -1,46 +0,0 @@
From 52c4e8cec4dd560503ff011f8fe7eec5f67b33c9 Mon Sep 17 00:00:00 2001
From: Jerome Marchand <jmarchan@redhat.com>
Date: Thu, 17 Sep 2020 10:37:02 +0200
Subject: [PATCH 2/2] tools: tcptracer: fix alignement in tcp_ipv6_event_t
On IPv6, tcptracer ports always appears as zeros:
Tracing TCP established connections. Ctrl-C to end.
T PID COMM IP SADDR DADDR SPORT DPORT
X 7055 nc 4 127.0.0.1 127.0.0.1 49476 9999
C 7074 nc 4 127.0.0.1 127.0.0.1 49478 9999
X 7074 nc 4 127.0.0.1 127.0.0.1 49478 9999
C 7085 nc 6 [::] [0:0:0:1::] 0 0
X 7085 nc 6 [::] [0:0:0:1::] 0 0
C 7086 nc 6 [::] [0:0:0:1::] 0 0
This seems related to alignment issue wrt to the __int128 type in
tcp_ipv6_event_t structure. Moving the u8 field ip to the end of the
structure fixes the issue.
Fixes #2781
---
tools/tcptracer.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/tcptracer.py b/tools/tcptracer.py
index 2e486b15..3220105e 100755
--- a/tools/tcptracer.py
+++ b/tools/tcptracer.py
@@ -73,12 +73,12 @@ struct tcp_ipv6_event_t {
u32 type;
u32 pid;
char comm[TASK_COMM_LEN];
- u8 ip;
unsigned __int128 saddr;
unsigned __int128 daddr;
u16 sport;
u16 dport;
u32 netns;
+ u8 ip;
};
BPF_PERF_OUTPUT(tcp_ipv6_event);
--
2.25.4

View File

@ -0,0 +1,27 @@
From d25f87677b554d9cbdc609c020a2baa59e442443 Mon Sep 17 00:00:00 2001
From: Jerome Marchand <jmarchan@redhat.com>
Date: Wed, 2 Jun 2021 10:57:43 +0200
Subject: [PATCH] Define missing BPF_* macros
We're currently missing BPF_MAP_TYPE_TASK_STORAGE. This could be
fixed by a future rebase. In the mean time, let's have a temporary
fix.
diff --git a/introspection/bps.c b/introspection/bps.c
index 0eae675e..1108e417 100644
--- a/introspection/bps.c
+++ b/introspection/bps.c
@@ -49,6 +49,10 @@ static const char * const prog_type_strings[] = {
[BPF_PROG_TYPE_SK_LOOKUP] = "sk_lookup",
};
+#ifndef BPF_MAP_TYPE_TASK_STORAGE
+#define BPF_MAP_TYPE_TASK_STORAGE (BPF_MAP_TYPE_INODE_STORAGE + 1)
+#endif
+
static const char * const map_type_strings[] = {
[BPF_MAP_TYPE_UNSPEC] = "unspec",
[BPF_MAP_TYPE_HASH] = "hash",
--
2.31.1

View File

@ -0,0 +1,39 @@
From 9051043a126a838902b88d144eea1b631d2c3eef Mon Sep 17 00:00:00 2001
From: Jerome Marchand <jmarchan@redhat.com>
Date: Tue, 27 Apr 2021 15:13:12 +0200
Subject: [PATCH] Fix BPF(src_file="foo")
Since commit 75f20a15 ("Use string type for comparison to PATH
elements"), src_file isn't working anymore. Somehow, two wrongs
(ArgString __str__() returning a bytes object and joining a bytes and
what was supposed to be a string) did make a right.
It fixes the following error in netqtop and deadlock:
Traceback (most recent call last):
File "/usr/share/bcc/tools/netqtop", line 207, in <module>
b = BPF(src_file = EBPF_FILE)
File "/usr/lib/python3.6/site-packages/bcc/__init__.py", line 335, in __init__
src_file = BPF._find_file(src_file)
File "/usr/lib/python3.6/site-packages/bcc/__init__.py", line 255, in _find_file
t = b"/".join([os.path.abspath(os.path.dirname(argv0.__str__())), filename])
TypeError: sequence item 0: expected a bytes-like object, str found
---
src/python/bcc/__init__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/python/bcc/__init__.py b/src/python/bcc/__init__.py
index 90562cd7..eabe0a55 100644
--- a/src/python/bcc/__init__.py
+++ b/src/python/bcc/__init__.py
@@ -252,7 +252,7 @@ DEBUG_BTF = 0x20
if filename:
if not os.path.isfile(filename):
argv0 = ArgString(sys.argv[0])
- t = b"/".join([os.path.abspath(os.path.dirname(argv0.__str__())), filename])
+ t = b"/".join([os.path.abspath(os.path.dirname(argv0.__bytes__())), filename])
if os.path.isfile(t):
filename = t
else:
--
2.30.2

View File

@ -1,4 +1,4 @@
From c42e75d3a80e9fcee66a27edf256452451a3a9b1 Mon Sep 17 00:00:00 2001
From f4e66f50d1af5b5dd0dc1dbb261f911514c465ed Mon Sep 17 00:00:00 2001
From: Jerome Marchand <jmarchan@redhat.com>
Date: Tue, 6 Aug 2019 14:44:33 +0200
Subject: [PATCH] Manpages: remove unstable statement
@ -53,6 +53,7 @@ enough.
man/man8/memleak.8 | 2 --
man/man8/mountsnoop.8 | 2 --
man/man8/mysqld_qslower.8 | 2 --
man/man8/netqtop.8 | 2 --
man/man8/nfsdist.8 | 2 --
man/man8/nfsslower.8 | 2 --
man/man8/offcputime.8 | 2 --
@ -61,6 +62,7 @@ enough.
man/man8/opensnoop.8 | 2 --
man/man8/pidpersec.8 | 2 --
man/man8/profile.8 | 2 --
man/man8/readahead.8 | 2 --
man/man8/reset-trace.8 | 2 --
man/man8/runqlat.8 | 2 --
man/man8/runqlen.8 | 2 --
@ -74,6 +76,7 @@ enough.
man/man8/sslsniff.8 | 2 --
man/man8/stackcount.8 | 2 --
man/man8/statsnoop.8 | 2 --
man/man8/swapin.8 | 2 --
man/man8/syncsnoop.8 | 2 --
man/man8/syscount.8 | 2 --
man/man8/tcpaccept.8 | 2 --
@ -82,10 +85,13 @@ enough.
man/man8/tcpdrop.8 | 2 --
man/man8/tcplife.8 | 2 --
man/man8/tcpretrans.8 | 2 --
man/man8/tcprtt.8 | 2 --
man/man8/tcpstates.8 | 2 --
man/man8/tcpsubnet.8 | 2 --
man/man8/tcpsynbl.8 | 2 --
man/man8/tcptop.8 | 2 --
man/man8/tcptracer.8 | 2 --
man/man8/threadsnoop.8 | 2 --
man/man8/tplist.8 | 2 --
man/man8/trace.8 | 2 --
man/man8/ttysnoop.8 | 2 --
@ -97,12 +103,13 @@ enough.
man/man8/uthreads.8 | 2 --
man/man8/vfscount.8 | 2 --
man/man8/vfsstat.8 | 2 --
man/man8/virtiostat.8 | 2 --
man/man8/wakeuptime.8 | 2 --
man/man8/xfsdist.8 | 2 --
man/man8/xfsslower.8 | 2 --
man/man8/zfsdist.8 | 2 --
man/man8/zfsslower.8 | 2 --
96 files changed, 194 deletions(-)
103 files changed, 208 deletions(-)
diff --git a/man/man8/argdist.8 b/man/man8/argdist.8
index 4116cd4d..aa128d2d 100644
@ -143,10 +150,10 @@ index f8fa1850..05ed95a7 100644
Pavel Dubovitsky
.SH SEE ALSO
diff --git a/man/man8/biolatency.8 b/man/man8/biolatency.8
index fe4da6b2..6ffa3429 100644
index c303eec0..895deb31 100644
--- a/man/man8/biolatency.8
+++ b/man/man8/biolatency.8
@@ -91,8 +91,6 @@ Also look in the bcc distribution for a companion _examples.txt file containing
@@ -98,8 +98,6 @@ Also look in the bcc distribution for a companion _examples.txt file containing
example usage, output, and commentary for this tool.
.SH OS
Linux
@ -709,6 +716,18 @@ index 5753079a..7daf074b 100644
.SH AUTHOR
Brendan Gregg
.SH SEE ALSO
diff --git a/man/man8/netqtop.8 b/man/man8/netqtop.8
index bfa34d11..8750782b 100644
--- a/man/man8/netqtop.8
+++ b/man/man8/netqtop.8
@@ -50,7 +50,5 @@ Also look in the bcc distribution for a netqtop_example.txt file containing
example usage, output and commentary for this tool.
.SH OS
Linux
-.SH STABILITY
-Unstable - in development
.SH AUTHOR
Yolandajn
diff --git a/man/man8/nfsdist.8 b/man/man8/nfsdist.8
index c72cfaa6..34532c18 100644
--- a/man/man8/nfsdist.8
@ -813,6 +832,19 @@ index 30871afe..8523a731 100644
.SH AUTHOR
Brendan Gregg
.SH SEE ALSO
diff --git a/man/man8/readahead.8 b/man/man8/readahead.8
index a2a10914..da8e4fe4 100644
--- a/man/man8/readahead.8
+++ b/man/man8/readahead.8
@@ -51,8 +51,6 @@ Also look in the bcc distribution for a companion _examples.txt file containing
example usage, output, and commentary for this tool.
.SH OS
Linux
-.SH STABILITY
-Unstable - in development.
.SH AUTHOR
Suchakra Sharma
.SH SEE ALSO
diff --git a/man/man8/reset-trace.8 b/man/man8/reset-trace.8
index e96d4790..90f525e0 100644
--- a/man/man8/reset-trace.8
@ -971,6 +1003,19 @@ index c0555043..d1560b3c 100644
.SH OS
Linux
-.SH STABILITY
-Unstable - in development.
.SH AUTHOR
Brendan Gregg
.SH SEE ALSO
diff --git a/man/man8/swapin.8 b/man/man8/swapin.8
index c5ef1ffc..89600460 100644
--- a/man/man8/swapin.8
+++ b/man/man8/swapin.8
@@ -50,8 +50,6 @@ Also look in the bcc distribution for a companion _examples.txt file
containing example usage, output, and commentary for this tool.
.SH OS
Linux
-.SH STABILITY
-Unstable - in development.
.SH AUTHOR
Brendan Gregg
@ -1015,10 +1060,10 @@ index 603a5ca4..4e7dfc9e 100644
Brendan Gregg
.SH SEE ALSO
diff --git a/man/man8/tcpconnect.8 b/man/man8/tcpconnect.8
index c96058b0..843aaa9c 100644
index 55105709..7c1740a4 100644
--- a/man/man8/tcpconnect.8
+++ b/man/man8/tcpconnect.8
@@ -125,8 +125,6 @@ Also look in the bcc distribution for a companion _examples.txt file containing
@@ -183,8 +183,6 @@ Also look in the bcc distribution for a companion _examples.txt file containing
example usage, output, and commentary for this tool.
.SH OS
Linux
@ -1028,10 +1073,10 @@ index c96058b0..843aaa9c 100644
Brendan Gregg
.SH SEE ALSO
diff --git a/man/man8/tcpconnlat.8 b/man/man8/tcpconnlat.8
index 996c21bb..7af1c57b 100644
index 9c810071..236f0fb0 100644
--- a/man/man8/tcpconnlat.8
+++ b/man/man8/tcpconnlat.8
@@ -101,8 +101,6 @@ Also look in the bcc distribution for a companion _examples.txt file containing
@@ -111,8 +111,6 @@ Also look in the bcc distribution for a companion _examples.txt file containing
example usage, output, and commentary for this tool.
.SH OS
Linux
@ -1079,6 +1124,19 @@ index 0ac82afa..04226dc6 100644
.SH AUTHOR
Brendan Gregg
.SH SEE ALSO
diff --git a/man/man8/tcprtt.8 b/man/man8/tcprtt.8
index 729a1abb..e934102a 100644
--- a/man/man8/tcprtt.8
+++ b/man/man8/tcprtt.8
@@ -78,8 +78,6 @@ Also look in the bcc distribution for a companion _examples.txt file containing
example usage, output, and commentary for this tool.
.SH OS
Linux
-.SH STABILITY
-Unstable - in development.
.SH AUTHOR
zhenwei pi
.SH SEE ALSO
diff --git a/man/man8/tcpstates.8 b/man/man8/tcpstates.8
index 26c7a8a1..d93c198d 100644
--- a/man/man8/tcpstates.8
@ -1105,6 +1163,19 @@ index 525b8082..daf41583 100644
.SH AUTHOR
Rodrigo Manyari
.SH INSPIRATION
diff --git a/man/man8/tcpsynbl.8 b/man/man8/tcpsynbl.8
index 4dd38c8a..93c353b1 100644
--- a/man/man8/tcpsynbl.8
+++ b/man/man8/tcpsynbl.8
@@ -51,8 +51,6 @@ Also look in the bcc distribution for a companion _examples.txt file
containing example usage, output, and commentary for this tool.
.SH OS
Linux
-.SH STABILITY
-Unstable - in development.
.SH AUTHOR
Brendan Gregg
.SH SEE ALSO
diff --git a/man/man8/tcptop.8 b/man/man8/tcptop.8
index e636f456..633b0c93 100644
--- a/man/man8/tcptop.8
@ -1131,6 +1202,19 @@ index d2346c77..893604d6 100644
.SH AUTHOR
Iago López Galeiras
.SH SEE ALSO
diff --git a/man/man8/threadsnoop.8 b/man/man8/threadsnoop.8
index 3c655f24..007281ad 100644
--- a/man/man8/threadsnoop.8
+++ b/man/man8/threadsnoop.8
@@ -52,8 +52,6 @@ Also look in the bcc distribution for a companion _examples.txt file
containing example usage, output, and commentary for this tool.
.SH OS
Linux
-.SH STABILITY
-Unstable - in development.
.SH AUTHOR
Brendan Gregg
.SH SEE ALSO
diff --git a/man/man8/tplist.8 b/man/man8/tplist.8
index da5edf37..f7e459da 100644
--- a/man/man8/tplist.8
@ -1272,6 +1356,19 @@ index 929e6b63..f439857e 100644
.SH AUTHOR
Brendan Gregg
.SH SEE ALSO
diff --git a/man/man8/virtiostat.8 b/man/man8/virtiostat.8
index 8578f8d3..ac312c56 100644
--- a/man/man8/virtiostat.8
+++ b/man/man8/virtiostat.8
@@ -58,8 +58,6 @@ Also look in the bcc distribution for a companion _examples.txt file containing
example usage, output, and commentary for this tool.
.SH OS
Linux
-.SH STABILITY
-Unstable - in development.
.SH AUTHOR
zhenwei pi
.SH SEE ALSO
diff --git a/man/man8/wakeuptime.8 b/man/man8/wakeuptime.8
index 8630ae4a..3c7cf80a 100644
--- a/man/man8/wakeuptime.8
@ -1338,5 +1435,5 @@ index d1e2f9c1..31d382f6 100644
Brendan Gregg
.SH SEE ALSO
--
2.25.4
2.30.2

View File

@ -8,16 +8,15 @@
%endif
Name: bcc
Version: 0.16.0
Release: 2%{?dist}
Version: 0.19.0
Release: 4%{?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
Patch0: %{name}-%{version}-Manpages-remove-unstable-statement.patch
Patch1: %{name}-%{version}-tools-tcptracer-fix-alignement-in-tcp_ipv6_event_t.patch
Patch1: %{name}-%{version}-Fix-BPF-src_file-foo.patch
Patch2: %{name}-%{version}-Define-missing-BPF_-macros.patch
# Arches will be included as upstream support is added and dependencies are
# satisfied in the respective arches
@ -40,8 +39,10 @@ BuildRequires: pkgconfig(luajit)
%endif
BuildRequires: libbpf-devel >= 0.0.9, libbpf-static >= 0.0.9
Requires: %{name}-tools = %{version}-%{release}
Requires: libbpf >= 0.0.9
Requires: tar
Recommends: kernel-devel
Recommends: %{name}-tools = %{version}-%{release}
%description
BCC is a toolkit for creating efficient kernel tracing and manipulation
@ -97,13 +98,12 @@ Standalone tool to run BCC tracers written in Lua
Summary: Command line tools for BPF Compiler Collection (BCC)
Requires: python3-%{name} = %{version}-%{release}
Requires: python3-netaddr
Requires: kernel-devel
%description tools
Command line tools for BPF Compiler Collection (BCC)
%prep
%autosetup -p1 -n %{name}
%autosetup -p1
%build
%cmake . \
@ -157,14 +157,12 @@ done
%license LICENSE.txt
%{_libdir}/lib%{name}.so.*
%{_libdir}/libbcc_bpf.so.*
%{_libdir}/libbcc-no-libbpf.so.*
%files devel
%exclude %{_libdir}/lib%{name}*.a
%exclude %{_libdir}/lib%{name}*.la
%{_libdir}/lib%{name}.so
%{_libdir}/libbcc_bpf.so
%{_libdir}/libbcc-no-libbpf.so
%{_libdir}/pkgconfig/lib%{name}.pc
%{_includedir}/%{name}/
@ -215,6 +213,20 @@ done
%changelog
* Fri Jul 02 2021 Jerome Marchand <jmarchan@redhat.com> - 0.19.0-4
- Build bcc from standard sources
- Don't require bcc-tools by default
* Wed Jun 09 2021 Jerome Marchand <jmarchan@redhat.com> - 0.19.0-3
- Rebuild on LLVM 12
* Fri Apr 30 2021 Jerome Marchand <jmarchan@redhat.com> - 0.19.0-2
- Fix BPF src_file.
* Tue Apr 27 2021 Jerome Marchand <jmarchan@redhat.com> - 0.19.0-1
- Rebased to version 0.19.0
- Remove hard dependency on kernel-devel
* Fri Jan 22 2021 Jerome Marchand <jmarchan@redhat.com> - 0.16.0-2
- Build with libbpf package
- spec file cleanups