import bcc-0.8.0-2.el8
This commit is contained in:
commit
7c9a4e1014
1
.bcc.metadata
Normal file
1
.bcc.metadata
Normal file
@ -0,0 +1 @@
|
||||
168b517240fd27aaa48f480d2470907fe1875dac SOURCES/bcc-0.8.0.tar.gz
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
SOURCES/bcc-0.8.0.tar.gz
|
@ -0,0 +1,50 @@
|
||||
From 3f7b59660037c0d5dea785d115df25d9b95f07dc Mon Sep 17 00:00:00 2001
|
||||
From: Xiaozhou Liu <liuxiaozhou@bytedance.com>
|
||||
Date: Mon, 21 Jan 2019 11:23:42 +0800
|
||||
Subject: [PATCH] print_log2_hist(): check and skip possible paddings (#2155)
|
||||
|
||||
Address issue 2154.
|
||||
|
||||
When a struct S is used as key to a BPF_HISTOGRAM, it is assumed that the second
|
||||
member of S holds the slot. But when S is converted to python from bpf C,
|
||||
a padding may be inserted as a second member. This breaks print_log2_hist().
|
||||
|
||||
root@debian:~/bcc/tools# ./softirqs.py -d
|
||||
Tracing soft irq event time... Hit Ctrl-C to end.
|
||||
^C
|
||||
Traceback (most recent call last):
|
||||
File "./softirqs.py", line 144, in <module>
|
||||
dist.print_log2_hist(label, "softirq", section_print_fn=vec_to_name)
|
||||
File "/usr/local/lib/python2.7/dist-packages/bcc/table.py", line 326, in print_log2_hist
|
||||
vals[slot] = v.value
|
||||
TypeError: list indices must be integers, not str
|
||||
|
||||
Fix it by skipping the possible padding. Future work would be fixing/working
|
||||
around in the library where the padding is introduced.
|
||||
---
|
||||
src/python/bcc/table.py | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/src/python/bcc/table.py b/src/python/bcc/table.py
|
||||
index 6f598353..f6449de7 100644
|
||||
--- a/src/python/bcc/table.py
|
||||
+++ b/src/python/bcc/table.py
|
||||
@@ -317,6 +317,15 @@ linear_index_max = 1025
|
||||
tmp = {}
|
||||
f1 = self.Key._fields_[0][0]
|
||||
f2 = self.Key._fields_[1][0]
|
||||
+
|
||||
+ # The above code assumes that self.Key._fields_[1][0] holds the
|
||||
+ # slot. But a padding member may have been inserted here, which
|
||||
+ # breaks the assumption and leads to chaos.
|
||||
+ # TODO: this is a quick fix. Fixing/working around in the BCC
|
||||
+ # internal library is the right thing to do.
|
||||
+ if f2 == '__pad_1' and len(self.Key._fields_) == 3:
|
||||
+ f2 = self.Key._fields_[2][0]
|
||||
+
|
||||
for k, v in self.items():
|
||||
bucket = getattr(k, f1)
|
||||
if bucket_fn:
|
||||
--
|
||||
2.20.1
|
||||
|
@ -0,0 +1,111 @@
|
||||
From f03beca4d6e6bc3fa7089416d752387bd26904dc Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Marchand <jmarchan@redhat.com>
|
||||
Date: Fri, 15 Feb 2019 17:35:37 +0100
|
||||
Subject: [PATCH] tools: fix some python3 bytes vs strings issues (#2205)
|
||||
|
||||
It fixes the following errors:
|
||||
|
||||
$ execsnoop.py -q
|
||||
PCOMM PID PPID RET ARGS
|
||||
Traceback (most recent call last):
|
||||
File "_ctypes/callbacks.c", line 234, in 'calling callback function'
|
||||
File "/usr/lib/python3.6/site-packages/bcc/table.py", line 572, in raw_cb_
|
||||
callback(cpu, data, size)
|
||||
File "tools/execsnoop.py", line 229, in print_event
|
||||
for arg in argv[event.pid]
|
||||
File "tools/execsnoop.py", line 229, in <listcomp>
|
||||
for arg in argv[event.pid]
|
||||
TypeError: a bytes-like object is required, not 'str'
|
||||
|
||||
$ offcputime.py -K -f 5
|
||||
Traceback (most recent call last):
|
||||
File "./tools/offcputime.py", line 298, in <module>
|
||||
print("%s %d" % (";".join(line), v.value))
|
||||
TypeError: sequence item 1: expected str instance, bytes found
|
||||
|
||||
$ offwaketime.py -f 5
|
||||
Traceback (most recent call last):
|
||||
File "./tools/offwaketime.py", line 350, in <module>
|
||||
print("%s %d" % (";".join(line), v.value))
|
||||
TypeError: sequence item 1: expected str instance, bytes found
|
||||
---
|
||||
tools/execsnoop.py | 2 +-
|
||||
tools/offcputime.py | 6 ++++--
|
||||
tools/offwaketime.py | 8 ++++----
|
||||
3 files changed, 9 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/tools/execsnoop.py b/tools/execsnoop.py
|
||||
index c4021165..1ce83e07 100755
|
||||
--- a/tools/execsnoop.py
|
||||
+++ b/tools/execsnoop.py
|
||||
@@ -210,7 +210,7 @@ argv = defaultdict(list)
|
||||
skip = True
|
||||
if args.quote:
|
||||
argv[event.pid] = [
|
||||
- "\"" + arg.replace("\"", "\\\"") + "\""
|
||||
+ b"\"" + arg.replace(b"\"", b"\\\"") + b"\""
|
||||
for arg in argv[event.pid]
|
||||
]
|
||||
|
||||
diff --git a/tools/offcputime.py b/tools/offcputime.py
|
||||
index d84ae529..ac3b7281 100755
|
||||
--- a/tools/offcputime.py
|
||||
+++ b/tools/offcputime.py
|
||||
@@ -288,13 +288,15 @@ stack_traces = b.get_table("stack_traces")
|
||||
if stack_id_err(k.user_stack_id):
|
||||
line.append("[Missed User Stack]")
|
||||
else:
|
||||
- line.extend([b.sym(addr, k.tgid) for addr in reversed(user_stack)])
|
||||
+ line.extend([b.sym(addr, k.tgid).decode('utf-8', 'replace')
|
||||
+ for addr in reversed(user_stack)])
|
||||
if not args.user_stacks_only:
|
||||
line.extend(["-"] if (need_delimiter and k.kernel_stack_id >= 0 and k.user_stack_id >= 0) else [])
|
||||
if stack_id_err(k.kernel_stack_id):
|
||||
line.append("[Missed Kernel Stack]")
|
||||
else:
|
||||
- line.extend([b.ksym(addr) for addr in reversed(kernel_stack)])
|
||||
+ line.extend([b.ksym(addr).decode('utf-8', 'replace')
|
||||
+ for addr in reversed(kernel_stack)])
|
||||
print("%s %d" % (";".join(line), v.value))
|
||||
else:
|
||||
# print default multi-line stack output
|
||||
diff --git a/tools/offwaketime.py b/tools/offwaketime.py
|
||||
index 38a9ff25..4a1cebab 100755
|
||||
--- a/tools/offwaketime.py
|
||||
+++ b/tools/offwaketime.py
|
||||
@@ -323,28 +323,28 @@ need_delimiter = args.delimited and not (args.kernel_stacks_only or
|
||||
if stack_id_err(k.t_u_stack_id):
|
||||
line.append("[Missed User Stack]")
|
||||
else:
|
||||
- line.extend([b.sym(addr, k.t_tgid)
|
||||
+ line.extend([b.sym(addr, k.t_tgid).decode('utf-8', 'replace')
|
||||
for addr in reversed(list(target_user_stack)[1:])])
|
||||
if not args.user_stacks_only:
|
||||
line.extend(["-"] if (need_delimiter and k.t_k_stack_id > 0 and k.t_u_stack_id > 0) else [])
|
||||
if stack_id_err(k.t_k_stack_id):
|
||||
line.append("[Missed Kernel Stack]")
|
||||
else:
|
||||
- line.extend([b.ksym(addr)
|
||||
+ line.extend([b.ksym(addr).decode('utf-8', 'replace')
|
||||
for addr in reversed(list(target_kernel_stack)[1:])])
|
||||
line.append("--")
|
||||
if not args.user_stacks_only:
|
||||
if stack_id_err(k.w_k_stack_id):
|
||||
line.append("[Missed Kernel Stack]")
|
||||
else:
|
||||
- line.extend([b.ksym(addr)
|
||||
+ line.extend([b.ksym(addr).decode('utf-8', 'replace')
|
||||
for addr in reversed(list(waker_kernel_stack))])
|
||||
if not args.kernel_stacks_only:
|
||||
line.extend(["-"] if (need_delimiter and k.w_u_stack_id > 0 and k.w_k_stack_id > 0) else [])
|
||||
if stack_id_err(k.w_u_stack_id):
|
||||
line.append("[Missed User Stack]")
|
||||
else:
|
||||
- line.extend([b.sym(addr, k.w_tgid)
|
||||
+ line.extend([b.sym(addr, k.w_tgid).decode('utf-8', 'replace')
|
||||
for addr in reversed(list(waker_user_stack))])
|
||||
line.append(k.waker.decode('utf-8', 'replace'))
|
||||
print("%s %d" % (";".join(line), v.value))
|
||||
--
|
||||
2.20.1
|
||||
|
180
SOURCES/bcc-0.8.0-usdt-s390x.patch
Normal file
180
SOURCES/bcc-0.8.0-usdt-s390x.patch
Normal file
@ -0,0 +1,180 @@
|
||||
From ba41501bb2ca89312061b31c08e570a11c092370 Mon Sep 17 00:00:00 2001
|
||||
From: mephi42 <mephi42@gmail.com>
|
||||
Date: Tue, 12 Mar 2019 07:02:56 +0100
|
||||
Subject: [PATCH] Add basic USDT support for s390x (#2266)
|
||||
|
||||
Approach and code shamelessly borrowed from "422db709: Add basic USDT
|
||||
support for powerpc64".
|
||||
---
|
||||
src/cc/usdt.h | 7 +++++
|
||||
src/cc/usdt/usdt.cc | 2 ++
|
||||
src/cc/usdt/usdt_args.cc | 53 ++++++++++++++++++++++++++++++++++++++
|
||||
tests/cc/test_usdt_args.cc | 46 +++++++++++++++++++++++++++++++++
|
||||
4 files changed, 108 insertions(+)
|
||||
|
||||
diff --git a/src/cc/usdt.h b/src/cc/usdt.h
|
||||
index 6d89fd644..406cfd546 100644
|
||||
--- a/src/cc/usdt.h
|
||||
+++ b/src/cc/usdt.h
|
||||
@@ -81,6 +81,7 @@ class Argument {
|
||||
friend class ArgumentParser;
|
||||
friend class ArgumentParser_aarch64;
|
||||
friend class ArgumentParser_powerpc64;
|
||||
+ friend class ArgumentParser_s390x;
|
||||
friend class ArgumentParser_x64;
|
||||
};
|
||||
|
||||
@@ -130,6 +131,12 @@ class ArgumentParser_powerpc64 : public ArgumentParser {
|
||||
ArgumentParser_powerpc64(const char *arg) : ArgumentParser(arg) {}
|
||||
};
|
||||
|
||||
+class ArgumentParser_s390x : public ArgumentParser {
|
||||
+public:
|
||||
+ bool parse(Argument *dest);
|
||||
+ ArgumentParser_s390x(const char *arg) : ArgumentParser(arg) {}
|
||||
+};
|
||||
+
|
||||
class ArgumentParser_x64 : public ArgumentParser {
|
||||
private:
|
||||
enum Register {
|
||||
diff --git a/src/cc/usdt/usdt.cc b/src/cc/usdt/usdt.cc
|
||||
index 0914fe3a5..c91faa016 100644
|
||||
--- a/src/cc/usdt/usdt.cc
|
||||
+++ b/src/cc/usdt/usdt.cc
|
||||
@@ -40,6 +40,8 @@ Location::Location(uint64_t addr, const std::string &bin_path, const char *arg_f
|
||||
ArgumentParser_aarch64 parser(arg_fmt);
|
||||
#elif __powerpc64__
|
||||
ArgumentParser_powerpc64 parser(arg_fmt);
|
||||
+#elif __s390x__
|
||||
+ ArgumentParser_s390x parser(arg_fmt);
|
||||
#else
|
||||
ArgumentParser_x64 parser(arg_fmt);
|
||||
#endif
|
||||
diff --git a/src/cc/usdt/usdt_args.cc b/src/cc/usdt/usdt_args.cc
|
||||
index b27e515f4..3e2045575 100644
|
||||
--- a/src/cc/usdt/usdt_args.cc
|
||||
+++ b/src/cc/usdt/usdt_args.cc
|
||||
@@ -285,6 +285,59 @@ bool ArgumentParser_powerpc64::parse(Argument *dest) {
|
||||
return true;
|
||||
}
|
||||
|
||||
+bool ArgumentParser_s390x::parse(Argument *dest) {
|
||||
+ if (done())
|
||||
+ return false;
|
||||
+
|
||||
+ bool matched;
|
||||
+ std::cmatch matches;
|
||||
+#define S390X_IMM "(-?[0-9]+)"
|
||||
+ std::regex arg_n_regex("^" S390X_IMM "@");
|
||||
+ // <imm>
|
||||
+ std::regex arg_op_regex_imm("^" S390X_IMM "(?: +|$)");
|
||||
+ // %r<N>
|
||||
+#define S390X_REG "%r([0-9]|1[0-5])"
|
||||
+ std::regex arg_op_regex_reg("^" S390X_REG "(?: +|$)");
|
||||
+ // <disp>(%r<N>,%r<N>)
|
||||
+ std::regex arg_op_regex_mem("^" S390X_IMM "?\\(" S390X_REG
|
||||
+ "(?:," S390X_REG ")?\\)(?: +|$)");
|
||||
+#undef S390X_IMM
|
||||
+#undef S390X_REG
|
||||
+
|
||||
+ matched = std::regex_search(arg_ + cur_pos_, matches, arg_n_regex);
|
||||
+ if (matched) {
|
||||
+ dest->arg_size_ = stoi(matches.str(1));
|
||||
+ cur_pos_ += matches.length(0);
|
||||
+
|
||||
+ if (std::regex_search(arg_ + cur_pos_, matches, arg_op_regex_imm)) {
|
||||
+ dest->constant_ = stoi(matches.str(1));
|
||||
+ } else if (std::regex_search(arg_ + cur_pos_, matches, arg_op_regex_reg)) {
|
||||
+ dest->base_register_name_ = "gprs[" + matches.str(1) + "]";
|
||||
+ } else if (std::regex_search(arg_ + cur_pos_, matches, arg_op_regex_mem)) {
|
||||
+ if (matches.length(1) > 0) {
|
||||
+ dest->deref_offset_ = stoi(matches.str(1));
|
||||
+ }
|
||||
+ dest->base_register_name_ = "gprs[" + matches.str(2) + "]";
|
||||
+ if (matches.length(3) > 0) {
|
||||
+ dest->index_register_name_ = "gprs[" + matches.str(3) + "]";
|
||||
+ }
|
||||
+ } else {
|
||||
+ matched = false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!matched) {
|
||||
+ print_error(cur_pos_);
|
||||
+ skip_until_whitespace_from(cur_pos_);
|
||||
+ skip_whitespace_from(cur_pos_);
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ cur_pos_ += matches.length(0);
|
||||
+ skip_whitespace_from(cur_pos_);
|
||||
+ return true;
|
||||
+}
|
||||
+
|
||||
ssize_t ArgumentParser_x64::parse_identifier(ssize_t pos,
|
||||
optional<std::string> *result) {
|
||||
if (isalpha(arg_[pos]) || arg_[pos] == '_') {
|
||||
diff --git a/tests/cc/test_usdt_args.cc b/tests/cc/test_usdt_args.cc
|
||||
index 3a96c5aac..db1f8c8e6 100644
|
||||
--- a/tests/cc/test_usdt_args.cc
|
||||
+++ b/tests/cc/test_usdt_args.cc
|
||||
@@ -58,6 +58,8 @@ TEST_CASE("test usdt argument parsing", "[usdt]") {
|
||||
USDT::ArgumentParser_aarch64 parser("4@[x32,200]");
|
||||
#elif __powerpc64__
|
||||
USDT::ArgumentParser_powerpc64 parser("4@-12(42)");
|
||||
+#elif __s390x__
|
||||
+ USDT::ArgumentParser_s390x parser("4@-12(%r42)");
|
||||
#elif defined(__x86_64__)
|
||||
USDT::ArgumentParser_x64 parser("4@i%ra+1r");
|
||||
#endif
|
||||
@@ -121,6 +123,50 @@ TEST_CASE("test usdt argument parsing", "[usdt]") {
|
||||
verify_register(parser, 2, 1097);
|
||||
verify_register(parser, 4, "gpr[30]", 108);
|
||||
verify_register(parser, -2, "gpr[31]", -4);
|
||||
+#elif __s390x__
|
||||
+ USDT::ArgumentParser_s390x parser(
|
||||
+ "-4@%r0 8@%r0 8@0 4@0(%r0) -2@0(%r0) "
|
||||
+ "1@%r0 -2@%r3 -8@9 -1@0(%r4) -4@16(%r6) "
|
||||
+ "2@%r7 4@%r11 4@-67 8@-16(%r15) 1@-52(%r11) "
|
||||
+ "-8@%r4 -8@%r14 2@-11 -2@14(%r13) -8@-32(%r12) "
|
||||
+ "4@%r5 2@%r11 -8@-693 -1@-23(%r10) 4@28(%r9) "
|
||||
+ "-2@%r3 -4@%r8 2@1097 4@108(%r7) -2@-4(%r6)");
|
||||
+
|
||||
+ verify_register(parser, -4, "gprs[0]");
|
||||
+ verify_register(parser, 8, "gprs[0]");
|
||||
+ verify_register(parser, 8, 0);
|
||||
+ verify_register(parser, 4, "gprs[0]", 0);
|
||||
+ verify_register(parser, -2, "gprs[0]", 0);
|
||||
+
|
||||
+ verify_register(parser, 1, "gprs[0]");
|
||||
+ verify_register(parser, -2, "gprs[3]");
|
||||
+ verify_register(parser, -8, 9);
|
||||
+ verify_register(parser, -1, "gprs[4]", 0);
|
||||
+ verify_register(parser, -4, "gprs[6]", 16);
|
||||
+
|
||||
+ verify_register(parser, 2, "gprs[7]");
|
||||
+ verify_register(parser, 4, "gprs[11]");
|
||||
+ verify_register(parser, 4, -67);
|
||||
+ verify_register(parser, 8, "gprs[15]", -16);
|
||||
+ verify_register(parser, 1, "gprs[11]", -52);
|
||||
+
|
||||
+ verify_register(parser, -8, "gprs[4]");
|
||||
+ verify_register(parser, -8, "gprs[14]");
|
||||
+ verify_register(parser, 2, -11);
|
||||
+ verify_register(parser, -2, "gprs[13]", 14);
|
||||
+ verify_register(parser, -8, "gprs[12]", -32);
|
||||
+
|
||||
+ verify_register(parser, 4, "gprs[5]");
|
||||
+ verify_register(parser, 2, "gprs[11]");
|
||||
+ verify_register(parser, -8, -693);
|
||||
+ verify_register(parser, -1, "gprs[10]", -23);
|
||||
+ verify_register(parser, 4, "gprs[9]", 28);
|
||||
+
|
||||
+ verify_register(parser, -2, "gprs[3]");
|
||||
+ verify_register(parser, -4, "gprs[8]");
|
||||
+ verify_register(parser, 2, 1097);
|
||||
+ verify_register(parser, 4, "gprs[7]", 108);
|
||||
+ verify_register(parser, -2, "gprs[6]", -4);
|
||||
#elif defined(__x86_64__)
|
||||
USDT::ArgumentParser_x64 parser(
|
||||
"-4@$0 8@$1234 %rdi %rax %rsi "
|
301
SPECS/bcc.spec
Normal file
301
SPECS/bcc.spec
Normal file
@ -0,0 +1,301 @@
|
||||
# luajit is not available RHEL 8
|
||||
%bcond_with lua
|
||||
|
||||
%bcond_without llvm_static
|
||||
|
||||
Name: bcc
|
||||
Version: 0.8.0
|
||||
Release: 2%{?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
|
||||
Patch0: %{name}-%{version}-usdt-s390x.patch
|
||||
Patch1: %{name}-%{version}-print_log2_hist-check-and-skip-possible-paddings-215.patch
|
||||
Patch2: %{name}-%{version}-tools-fix-some-python3-bytes-vs-strings-issues-2205.patch
|
||||
|
||||
# Arches will be included as upstream support is added and dependencies are
|
||||
# satisfied in the respective arches
|
||||
ExcludeArch: i686
|
||||
|
||||
BuildRequires: bison, cmake >= 2.8.7, flex, libxml2-devel
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: elfutils-libelf-devel
|
||||
BuildRequires: llvm-devel
|
||||
BuildRequires: clang-devel
|
||||
BuildRequires: ncurses-devel
|
||||
%if %{with lua}
|
||||
BuildRequires: pkgconfig(luajit)
|
||||
%endif
|
||||
%if %{with llvm_static}
|
||||
BuildRequires: llvm-static
|
||||
%endif
|
||||
|
||||
BuildRequires: clang
|
||||
|
||||
Requires: %{name}-tools = %{version}-%{release}
|
||||
|
||||
%description
|
||||
BCC is a toolkit for creating efficient kernel tracing and manipulation
|
||||
programs, and includes several useful tools and examples. It makes use of
|
||||
extended BPF (Berkeley Packet Filters), formally known as eBPF, a new feature
|
||||
that was first added to Linux 3.15. BCC makes BPF programs easier to write,
|
||||
with kernel instrumentation in C (and includes a C wrapper around LLVM), and
|
||||
front-ends in Python and lua. It is suited for many tasks, including
|
||||
performance analysis and network traffic control.
|
||||
|
||||
|
||||
%package devel
|
||||
Summary: Shared library for BPF Compiler Collection (BCC)
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description devel
|
||||
The %{name}-devel package contains libraries and header files for developing
|
||||
application that use BPF Compiler Collection (BCC).
|
||||
|
||||
|
||||
%package doc
|
||||
Summary: Examples for BPF Compiler Collection (BCC)
|
||||
Recommends: python3-%{name} = %{version}-%{release}
|
||||
%if %{with lua}
|
||||
Recommends: %{name}-lua = %{version}-%{release}
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
Examples for BPF Compiler Collection (BCC)
|
||||
|
||||
|
||||
%package -n python3-%{name}
|
||||
Summary: Python3 bindings for BPF Compiler Collection (BCC)
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
%{?python_provide:%python_provide python3-%{srcname}}
|
||||
|
||||
%description -n python3-%{name}
|
||||
Python3 bindings for BPF Compiler Collection (BCC)
|
||||
|
||||
|
||||
%if %{with lua}
|
||||
%package lua
|
||||
Summary: Standalone tool to run BCC tracers written in Lua
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
|
||||
%description lua
|
||||
Standalone tool to run BCC tracers written in Lua
|
||||
%endif
|
||||
|
||||
|
||||
%package tools
|
||||
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
|
||||
|
||||
%build
|
||||
%cmake . \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DREVISION_LAST=%{version} -DREVISION=%{version} -DPYTHON_CMD=python3
|
||||
%make_build
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
# Fix python shebangs
|
||||
# This messes the timestamp and rpmdiff complains about it
|
||||
# Let's set the all thing according to a reference file
|
||||
touch -r %{buildroot}%{_datadir}/%{name}/examples/hello_world.py %{_tmppath}/timestamp
|
||||
|
||||
find %{buildroot}%{_datadir}/%{name}/{tools,examples} -type f -exec \
|
||||
sed -i -e '1s=^#!/usr/bin/python\([0-9.]\+\)\?$=#!%{__python3}=' \
|
||||
-e '1s=^#!/usr/bin/env python\([0-9.]\+\)\?$=#!%{__python3}=' \
|
||||
-e '1s=^#!/usr/bin/env bcc-lua$=#!/usr/bin/bcc-lua=' {} \;
|
||||
|
||||
for i in `find %{buildroot}%{_datadir}/%{name}/examples/` ; do
|
||||
touch -h -r %{_tmppath}/timestamp $i
|
||||
done
|
||||
|
||||
# Move man pages to the right location
|
||||
mkdir -p %{buildroot}%{_mandir}
|
||||
mv %{buildroot}%{_datadir}/%{name}/man/* %{buildroot}%{_mandir}/
|
||||
# Avoid conflict with other manpages
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1517408
|
||||
for i in `find %{buildroot}%{_mandir} -name "*.gz"`; do
|
||||
tname=$(basename $i)
|
||||
rename $tname %{name}-$tname $i
|
||||
done
|
||||
# Fix the symlink too
|
||||
for i in `find %{buildroot}%{_mandir} -lname \*.gz` ; do
|
||||
target=`readlink $i`;
|
||||
ln -sf bcc-$target $i;
|
||||
done
|
||||
|
||||
# We cannot run the test suit since it requires root and it makes changes to
|
||||
# the machine (e.g, IP address)
|
||||
#%check
|
||||
|
||||
%ldconfig_scriptlets
|
||||
|
||||
%files
|
||||
%doc README.md
|
||||
%license LICENSE.txt
|
||||
%{_libdir}/lib%{name}.so.*
|
||||
%{_libdir}/libbpf.so.*
|
||||
|
||||
%files devel
|
||||
%{_libdir}/lib%{name}.so
|
||||
%{_libdir}/libbpf.so
|
||||
%{_libdir}/pkgconfig/lib%{name}.pc
|
||||
%{_includedir}/%{name}/
|
||||
|
||||
%files -n python3-%{name}
|
||||
%{python3_sitelib}/%{name}*
|
||||
|
||||
%files doc
|
||||
# % dir % {_docdir}/% {name}
|
||||
%doc %{_datadir}/%{name}/examples/
|
||||
%if %{without lua}
|
||||
%exclude %{_datadir}/%{name}/examples/lua
|
||||
%endif
|
||||
|
||||
%files tools
|
||||
%dir %{_datadir}/%{name}
|
||||
%dir %{_datadir}/%{name}/tools
|
||||
%dir %{_datadir}/%{name}/introspection
|
||||
%{_datadir}/%{name}/tools/*
|
||||
%{_datadir}/%{name}/introspection/*
|
||||
%exclude %{_datadir}/%{name}/tools/old/
|
||||
# inject relies on BPF_KPROBE_OVERRIDE which is not set on RHEL 8
|
||||
%exclude %{_datadir}/%{name}/tools/inject
|
||||
%exclude %{_datadir}/%{name}/tools/doc/inject_example.txt
|
||||
%exclude %{_mandir}/man8/bcc-inject.8.gz
|
||||
# Neither btrfs nor zfs are available on RHEL8
|
||||
%exclude %{_datadir}/%{name}/tools/btrfs*
|
||||
%exclude %{_datadir}/%{name}/tools/doc/btrfs*
|
||||
%exclude %{_mandir}/man8/bcc-btrfs*
|
||||
%exclude %{_datadir}/%{name}/tools/zfs*
|
||||
%exclude %{_datadir}/%{name}/tools/doc/zfs*
|
||||
%exclude %{_mandir}/man8/bcc-zfs*
|
||||
%{_mandir}/man8/*
|
||||
|
||||
%if %{with lua}
|
||||
%files lua
|
||||
%{_bindir}/bcc-lua
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed May 15 2019 Jerome Marchand <jmarchan@redhat.com> - 0.8.0-2
|
||||
- Rebuild for llvm 8
|
||||
|
||||
* Thu Apr 11 2019 Jerome Marchand <jmarchan@redhat.com> - 0.8.0-1
|
||||
- Rebase on bcc-8.0.0
|
||||
- Replace the temporary s390x workaround by a proper fix
|
||||
- Remove the doc of excluded tool from the package
|
||||
- Fix print_log2_hist
|
||||
- Fix yet a few other python3 bytes vs strings issues
|
||||
|
||||
* Mon Mar 25 2019 Jerome Marchand <jmarchan@redhat.com> - 0.7.0-6
|
||||
- Add CI gating
|
||||
|
||||
* Thu Dec 13 2018 Jerome Marchand <jmarchan@redhat.com> - 0.7.0-5
|
||||
- Fix biolatency -D
|
||||
- Fix biotop manpage
|
||||
- Rebuild for LLVM 7.0.1 (from Tom Stellard)
|
||||
|
||||
* Mon Dec 10 2018 Jerome Marchand <jmarchan@redhat.com> - 0.7.0-4
|
||||
- Fix bio* tools
|
||||
|
||||
* Mon Nov 05 2018 Jerome Marchand <jmarchan@redhat.com> - 0.7.0-3
|
||||
- Fix multiple bytes/string encoding issues
|
||||
- Fix misc covscan warning
|
||||
|
||||
* Mon Oct 15 2018 Tom Stellard <tstellar@redhat.com> - 0.7.0-2
|
||||
- Drop explicit dependency on clang-libs
|
||||
|
||||
* Fri Oct 12 2018 Jerome Marchand <jmarchan@redhat.com> - 0.7.0-1
|
||||
- Rebase on bcc-7.0.0
|
||||
- Remove useless tools (zfs*, btrfs* and inject)
|
||||
|
||||
* Thu Sep 20 2018 Jerome Marchand <jmarchan@redhat.com> - 0.6.1-1
|
||||
- Rebase on bcc-0.6.1
|
||||
|
||||
* Thu Sep 20 2018 Jerome Marchand <jmarchan@redhat.com> - 0.6.0-6
|
||||
- llcstat: print a nicer error message on virtual machine
|
||||
- Add NSS support to sslsniff
|
||||
- Fixes miscellaneous error uncovered by covscan
|
||||
|
||||
* Wed Aug 08 2018 Tom Stellard <tstellar@redhat.com> - 0.6.0-5
|
||||
- Use llvm-toolset-6.0 prefix for clang-libs dependency
|
||||
|
||||
* Fri Aug 03 2018 Tom Stellard <tstellar@redhat.com> - 0.6.0-4
|
||||
- Rebuld for llvm-toolset-6.0
|
||||
|
||||
* Wed Jul 18 2018 Jerome Marchand <jmarchan@redhat.com> - 0.6.0-3
|
||||
- Disable lua on all arches
|
||||
|
||||
* Tue Jun 26 2018 Jerome Marchand <jmarchan@redhat.com> - 0.6.0-2
|
||||
- Add clang-libs requirement
|
||||
- Fix manpages symlinks
|
||||
|
||||
* Tue Jun 19 2018 Jerome Marchand <jmarchan@redhat.com> - 0.6.0-1
|
||||
- Rebase on bcc-0.6.0
|
||||
|
||||
* Thu May 24 2018 Jerome Marchand <jmarchan@redhat.com> - 0.5.0-5
|
||||
- Enables build on ppc64(le) and s390x arches
|
||||
|
||||
* Thu Apr 05 2018 Rafael Santos <rdossant@redhat.com> - 0.5.0-4
|
||||
- Resolves #1555627 - fix compilation error with latest llvm/clang
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
||||
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.5.0-2
|
||||
- Switch to %%ldconfig_scriptlets
|
||||
|
||||
* Wed Jan 03 2018 Rafael Santos <rdossant@redhat.com> - 0.5.0-1
|
||||
- Rebase to new released version
|
||||
|
||||
* Thu Nov 16 2017 Rafael Santos <rdossant@redhat.com> - 0.4.0-4
|
||||
- Resolves #1517408 - avoid conflict with other manpages
|
||||
|
||||
* Thu Nov 02 2017 Rafael Santos <rdossant@redhat.com> - 0.4.0-3
|
||||
- Use weak deps to not require lua subpkg on ppc64(le)
|
||||
|
||||
* Wed Nov 01 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.0-2
|
||||
- Rebuild for LLVM5
|
||||
|
||||
* Wed Nov 01 2017 Rafael Fonseca <rdossant@redhat.com> - 0.4.0-1
|
||||
- Resolves #1460482 - rebase to new release
|
||||
- Resolves #1505506 - add support for LLVM 5.0
|
||||
- Resolves #1460482 - BPF module compilation issue
|
||||
- Partially address #1479990 - location of man pages
|
||||
- Enable ppc64(le) support without lua
|
||||
- Soname versioning for libbpf by ignatenkobrain
|
||||
|
||||
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||
|
||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
* Thu Mar 30 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.3.0-2
|
||||
- Rebuild for LLVM4
|
||||
- Trivial fixes in spec
|
||||
|
||||
* Fri Mar 10 2017 Rafael Fonseca <rdossant@redhat.com> - 0.3.0-1
|
||||
- Rebase to new release.
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
* Tue Jan 10 2017 Rafael Fonseca <rdossant@redhat.com> - 0.2.0-2
|
||||
- Fix typo
|
||||
|
||||
* Tue Nov 29 2016 Rafael Fonseca <rdossant@redhat.com> - 0.2.0-1
|
||||
- Initial import
|
Loading…
Reference in New Issue
Block a user