Auto sync2gitlab import of bcc-0.19.0-5.el8.src.rpm
This commit is contained in:
parent
f16f175452
commit
76f153b132
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/bcc-0.19.0.tar.gz
|
27
bcc-0.19.0-Define-missing-BPF_-macros.patch
Normal file
27
bcc-0.19.0-Define-missing-BPF_-macros.patch
Normal 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
|
||||
|
39
bcc-0.19.0-Fix-BPF-src_file-foo.patch
Normal file
39
bcc-0.19.0-Fix-BPF-src_file-foo.patch
Normal 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
|
||||
|
46
bcc-0.19.0-Fix-a-llvm-compilation-error.patch
Normal file
46
bcc-0.19.0-Fix-a-llvm-compilation-error.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From bb121e49b1a05e86c88274a89f5229b4ec6939c6 Mon Sep 17 00:00:00 2001
|
||||
From: Yonghong Song <yhs@fb.com>
|
||||
Date: Tue, 25 May 2021 19:58:00 -0700
|
||||
Subject: [PATCH 2/2] Fix a llvm compilation error
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Current llvm trunk (https://github.com/llvm/llvm-project)
|
||||
will cause the following compilation errors:
|
||||
/home/yhs/work/bcc/src/cc/bcc_debug.cc: In member function ‘void ebpf::SourceDebugger::dump()’:
|
||||
/home/yhs/work/bcc/src/cc/bcc_debug.cc:135:75: error: no matching function for call to
|
||||
‘llvm::MCContext::MCContext(llvm::Triple&, std::unique_ptr<llvm::MCAsmInfo>::pointer,
|
||||
std::unique_ptr<llvm::MCRegisterInfo>::pointer, llvm::MCObjectFileInfo*,
|
||||
std::unique_ptr<llvm::MCSubtargetInfo>::pointer, std::nullptr_t)’
|
||||
MCContext Ctx(TheTriple, MAI.get(), MRI.get(), &MOFI, STI.get(), nullptr);
|
||||
^
|
||||
......
|
||||
|
||||
This is because upstream patch https://reviews.llvm.org/D101921
|
||||
refactored MCObjectFileInfo initialization and changed MCContext
|
||||
constructor signature.
|
||||
|
||||
This patch fixed the issue by following the new code patterns
|
||||
in https://reviews.llvm.org/D101921.
|
||||
---
|
||||
src/cc/bcc_debug.cc | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/cc/bcc_debug.cc b/src/cc/bcc_debug.cc
|
||||
index 775c9141..97d6d95b 100644
|
||||
--- a/src/cc/bcc_debug.cc
|
||||
+++ b/src/cc/bcc_debug.cc
|
||||
@@ -132,7 +132,8 @@ void SourceDebugger::dump() {
|
||||
T->createMCSubtargetInfo(TripleStr, "", ""));
|
||||
MCObjectFileInfo MOFI;
|
||||
#if LLVM_MAJOR_VERSION >= 13
|
||||
- MCContext Ctx(TheTriple, MAI.get(), MRI.get(), &MOFI, STI.get(), nullptr);
|
||||
+ MCContext Ctx(TheTriple, MAI.get(), MRI.get(), STI.get(), nullptr);
|
||||
+ Ctx.setObjectFileInfo(&MOFI);
|
||||
MOFI.initMCObjectFileInfo(Ctx, false, false);
|
||||
#else
|
||||
MCContext Ctx(MAI.get(), MRI.get(), &MOFI, nullptr);
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,110 @@
|
||||
From c610314e8f8265317bf54ef518df48809834feba Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Marchand <jmarchan@redhat.com>
|
||||
Date: Thu, 14 Oct 2021 12:01:01 +0200
|
||||
Subject: [PATCH] Handle renaming of task_struct_>state field on RHEL 9
|
||||
|
||||
There has been some cleanup of task_struct's state field and to catch
|
||||
any place that has been missed in the conversion, it has been renamed
|
||||
__state.
|
||||
---
|
||||
tools/cpudist.py | 2 +-
|
||||
tools/offcputime.py | 4 ++--
|
||||
tools/offwaketime.py | 4 ++--
|
||||
tools/runqlat.py | 4 ++--
|
||||
tools/runqslower.py | 4 ++--
|
||||
5 files changed, 9 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/tools/cpudist.py b/tools/cpudist.py
|
||||
index eb04f590..ba36ba76 100755
|
||||
--- a/tools/cpudist.py
|
||||
+++ b/tools/cpudist.py
|
||||
@@ -101,7 +101,7 @@ int sched_switch(struct pt_regs *ctx, struct task_struct *prev)
|
||||
u32 tgid = pid_tgid >> 32, pid = pid_tgid;
|
||||
|
||||
#ifdef ONCPU
|
||||
- if (prev->state == TASK_RUNNING) {
|
||||
+ if (prev->__state == TASK_RUNNING) {
|
||||
#else
|
||||
if (1) {
|
||||
#endif
|
||||
diff --git a/tools/offcputime.py b/tools/offcputime.py
|
||||
index 128c6496..b93e78d2 100755
|
||||
--- a/tools/offcputime.py
|
||||
+++ b/tools/offcputime.py
|
||||
@@ -205,10 +205,10 @@ thread_context = ""
|
||||
thread_context = "all threads"
|
||||
thread_filter = '1'
|
||||
if args.state == 0:
|
||||
- state_filter = 'prev->state == 0'
|
||||
+ state_filter = 'prev->__state == 0'
|
||||
elif args.state:
|
||||
# these states are sometimes bitmask checked
|
||||
- state_filter = 'prev->state & %d' % args.state
|
||||
+ state_filter = 'prev->__state & %d' % args.state
|
||||
else:
|
||||
state_filter = '1'
|
||||
bpf_text = bpf_text.replace('THREAD_FILTER', thread_filter)
|
||||
diff --git a/tools/offwaketime.py b/tools/offwaketime.py
|
||||
index 753eee97..722c0381 100755
|
||||
--- a/tools/offwaketime.py
|
||||
+++ b/tools/offwaketime.py
|
||||
@@ -254,10 +254,10 @@ int oncpu(struct pt_regs *ctx, struct task_struct *p) {
|
||||
else:
|
||||
thread_filter = '1'
|
||||
if args.state == 0:
|
||||
- state_filter = 'p->state == 0'
|
||||
+ state_filter = 'p->__state == 0'
|
||||
elif args.state:
|
||||
# these states are sometimes bitmask checked
|
||||
- state_filter = 'p->state & %d' % args.state
|
||||
+ state_filter = 'p->__state & %d' % args.state
|
||||
else:
|
||||
state_filter = '1'
|
||||
bpf_text = bpf_text.replace('THREAD_FILTER', thread_filter)
|
||||
diff --git a/tools/runqlat.py b/tools/runqlat.py
|
||||
index b13ff2d1..8e443c3c 100755
|
||||
--- a/tools/runqlat.py
|
||||
+++ b/tools/runqlat.py
|
||||
@@ -116,7 +116,7 @@ int trace_run(struct pt_regs *ctx, struct task_struct *prev)
|
||||
u32 pid, tgid;
|
||||
|
||||
// ivcsw: treat like an enqueue event and store timestamp
|
||||
- if (prev->state == TASK_RUNNING) {
|
||||
+ if (prev->__state == TASK_RUNNING) {
|
||||
tgid = prev->tgid;
|
||||
pid = prev->pid;
|
||||
if (!(FILTER || pid == 0)) {
|
||||
@@ -170,7 +170,7 @@ RAW_TRACEPOINT_PROBE(sched_switch)
|
||||
u32 pid, tgid;
|
||||
|
||||
// ivcsw: treat like an enqueue event and store timestamp
|
||||
- if (prev->state == TASK_RUNNING) {
|
||||
+ if (prev->__state == TASK_RUNNING) {
|
||||
tgid = prev->tgid;
|
||||
pid = prev->pid;
|
||||
if (!(FILTER || pid == 0)) {
|
||||
diff --git a/tools/runqslower.py b/tools/runqslower.py
|
||||
index 6df98d9f..ba71e5d3 100755
|
||||
--- a/tools/runqslower.py
|
||||
+++ b/tools/runqslower.py
|
||||
@@ -112,7 +112,7 @@ int trace_run(struct pt_regs *ctx, struct task_struct *prev)
|
||||
u32 pid, tgid;
|
||||
|
||||
// ivcsw: treat like an enqueue event and store timestamp
|
||||
- if (prev->state == TASK_RUNNING) {
|
||||
+ if (prev->__state == TASK_RUNNING) {
|
||||
tgid = prev->tgid;
|
||||
pid = prev->pid;
|
||||
u64 ts = bpf_ktime_get_ns();
|
||||
@@ -178,7 +178,7 @@ RAW_TRACEPOINT_PROBE(sched_switch)
|
||||
long state;
|
||||
|
||||
// ivcsw: treat like an enqueue event and store timestamp
|
||||
- bpf_probe_read_kernel(&state, sizeof(long), (const void *)&prev->state);
|
||||
+ bpf_probe_read_kernel(&state, sizeof(long), (const void *)&prev->__state);
|
||||
if (state == TASK_RUNNING) {
|
||||
bpf_probe_read_kernel(&tgid, sizeof(prev->tgid), &prev->tgid);
|
||||
bpf_probe_read_kernel(&pid, sizeof(prev->pid), &prev->pid);
|
||||
--
|
||||
2.31.1
|
||||
|
1439
bcc-0.19.0-Manpages-remove-unstable-statement.patch
Normal file
1439
bcc-0.19.0-Manpages-remove-unstable-statement.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,41 @@
|
||||
From da1f8b4b8389e463e323885e402f96b3bc6ceb35 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Mon, 14 Jun 2021 12:49:43 -0700
|
||||
Subject: [PATCH] Remove APInt/APSInt toString() std::string variants
|
||||
|
||||
clang 13+ has removed this in favour of a pair of llvm::toString
|
||||
() helpers inside StringExtras.h to improve compile speed by avoiding
|
||||
hits on <string> header
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
src/cc/json_map_decl_visitor.cc | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/cc/json_map_decl_visitor.cc b/src/cc/json_map_decl_visitor.cc
|
||||
index eff4d067..53896199 100644
|
||||
--- a/src/cc/json_map_decl_visitor.cc
|
||||
+++ b/src/cc/json_map_decl_visitor.cc
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <clang/AST/ASTContext.h>
|
||||
#include <clang/AST/RecordLayout.h>
|
||||
#include <clang/AST/RecursiveASTVisitor.h>
|
||||
+#include <llvm/ADT/StringExtras.h>
|
||||
#include "common.h"
|
||||
#include "table_desc.h"
|
||||
|
||||
@@ -79,7 +80,11 @@ void BMapDeclVisitor::genJSONForField(FieldDecl *F) {
|
||||
result_ += "[";
|
||||
TraverseDecl(F);
|
||||
if (const ConstantArrayType *T = dyn_cast<ConstantArrayType>(F->getType()))
|
||||
+#if LLVM_MAJOR_VERSION >= 13
|
||||
+ result_ += ", [" + toString(T->getSize(), 10, false) + "]";
|
||||
+#else
|
||||
result_ += ", [" + T->getSize().toString(10, false) + "]";
|
||||
+#endif
|
||||
if (F->isBitField())
|
||||
result_ += ", " + to_string(F->getBitWidthValue(C));
|
||||
result_ += "], ";
|
||||
--
|
||||
2.31.1
|
||||
|
42
bcc-0.19.0-fix-llvm-compilation-errors.patch
Normal file
42
bcc-0.19.0-fix-llvm-compilation-errors.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From d74c96d9423652d4467339ee24bb6db2e5df21cb Mon Sep 17 00:00:00 2001
|
||||
From: Yonghong Song <yhs@fb.com>
|
||||
Date: Wed, 5 May 2021 19:11:13 -0700
|
||||
Subject: [PATCH 1/2] fix llvm compilation errors
|
||||
|
||||
MCContext and InitMCObjectFileInfo name/signatures
|
||||
are changed due to upstream patch
|
||||
https://reviews.llvm.org/D101462
|
||||
Adjust related codes in bcc_debug.cc properly to resolve
|
||||
the compilation error for llvm13.
|
||||
|
||||
Signed-off-by: Yonghong Song <yhs@fb.com>
|
||||
---
|
||||
src/cc/bcc_debug.cc | 9 +++++++--
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/cc/bcc_debug.cc b/src/cc/bcc_debug.cc
|
||||
index 371b6ad3..775c9141 100644
|
||||
--- a/src/cc/bcc_debug.cc
|
||||
+++ b/src/cc/bcc_debug.cc
|
||||
@@ -128,11 +128,16 @@ void SourceDebugger::dump() {
|
||||
return;
|
||||
}
|
||||
|
||||
+ std::unique_ptr<MCSubtargetInfo> STI(
|
||||
+ T->createMCSubtargetInfo(TripleStr, "", ""));
|
||||
MCObjectFileInfo MOFI;
|
||||
+#if LLVM_MAJOR_VERSION >= 13
|
||||
+ MCContext Ctx(TheTriple, MAI.get(), MRI.get(), &MOFI, STI.get(), nullptr);
|
||||
+ MOFI.initMCObjectFileInfo(Ctx, false, false);
|
||||
+#else
|
||||
MCContext Ctx(MAI.get(), MRI.get(), &MOFI, nullptr);
|
||||
MOFI.InitMCObjectFileInfo(TheTriple, false, Ctx, false);
|
||||
- std::unique_ptr<MCSubtargetInfo> STI(
|
||||
- T->createMCSubtargetInfo(TripleStr, "", ""));
|
||||
+#endif
|
||||
|
||||
std::unique_ptr<MCInstrInfo> MCII(T->createMCInstrInfo());
|
||||
MCInstPrinter *IP = T->createMCInstPrinter(TheTriple, 0, *MAI, *MCII, *MRI);
|
||||
--
|
||||
2.31.1
|
||||
|
392
bcc.spec
Normal file
392
bcc.spec
Normal file
@ -0,0 +1,392 @@
|
||||
# luajit is not available RHEL 8
|
||||
%bcond_with lua
|
||||
|
||||
%bcond_with llvm_static
|
||||
|
||||
%if %{without llvm_static}
|
||||
%global with_llvm_shared 1
|
||||
%endif
|
||||
|
||||
Name: bcc
|
||||
Version: 0.19.0
|
||||
Release: 5%{?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}-Manpages-remove-unstable-statement.patch
|
||||
Patch1: %{name}-%{version}-Fix-BPF-src_file-foo.patch
|
||||
Patch2: %{name}-%{version}-Define-missing-BPF_-macros.patch
|
||||
Patch3: %{name}-%{version}-fix-llvm-compilation-errors.patch
|
||||
Patch4: %{name}-%{version}-Fix-a-llvm-compilation-error.patch
|
||||
Patch5: %{name}-%{version}-Remove-APInt-APSInt-toString-std-string-variants.patch
|
||||
Patch6: %{name}-%{version}-Handle-renaming-of-task_struct_-state-field-on-RHEL-.patch
|
||||
|
||||
# Arches will be included as upstream support is added and dependencies are
|
||||
# satisfied in the respective arches
|
||||
ExcludeArch: i686
|
||||
|
||||
BuildRequires: bison
|
||||
BuildRequires: cmake >= 2.8.7
|
||||
BuildRequires: flex
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: elfutils-libelf-devel
|
||||
BuildRequires: llvm-devel
|
||||
BuildRequires: clang-devel
|
||||
%if %{with llvm_static}
|
||||
BuildRequires: llvm-static
|
||||
%endif
|
||||
BuildRequires: ncurses-devel
|
||||
%if %{with lua}
|
||||
BuildRequires: pkgconfig(luajit)
|
||||
%endif
|
||||
BuildRequires: libbpf-devel >= 0.0.9, libbpf-static >= 0.0.9
|
||||
|
||||
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
|
||||
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-%{name}}
|
||||
|
||||
%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
|
||||
|
||||
%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 \
|
||||
-DCMAKE_USE_LIBBPF_PACKAGE:BOOL=TRUE \
|
||||
%{?with_llvm_shared:-DENABLE_LLVM_SHARED=1}
|
||||
%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}/libbcc_bpf.so.*
|
||||
|
||||
%files devel
|
||||
%exclude %{_libdir}/lib%{name}*.a
|
||||
%exclude %{_libdir}/lib%{name}*.la
|
||||
%{_libdir}/lib%{name}.so
|
||||
%{_libdir}/libbcc_bpf.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*
|
||||
# criticalstat relies on CONFIG_PREEMPTIRQ_EVENTS which is disabled on RHEL 8
|
||||
%exclude %{_datadir}/%{name}/tools/criticalstat
|
||||
%exclude %{_datadir}/%{name}/tools/doc/criticalstat_example.txt
|
||||
%exclude %{_mandir}/man8/bcc-criticalstat.8.gz
|
||||
# compactsnoop is only supported on x86_64
|
||||
%ifnarch x86_64
|
||||
%exclude %{_datadir}/%{name}/tools/compactsnoop
|
||||
%exclude %{_datadir}/%{name}/tools/doc/compactsnoop_example.txt
|
||||
%exclude %{_mandir}/man8/bcc-compactsnoop.8.gz
|
||||
%endif
|
||||
%{_mandir}/man8/*
|
||||
|
||||
%if %{with lua}
|
||||
%files lua
|
||||
%{_bindir}/bcc-lua
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Nov 23 2021 Jerome Marchand <jmarchan@redhat.com> - 0.19.0-5
|
||||
- Handle the renaming of task_struct_>state field
|
||||
- Rebuild for LLVM 13
|
||||
|
||||
* 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
|
||||
|
||||
* Mon Oct 26 2020 Jerome Marchand <jmarchan@redhat.com> - 0.16.0-1
|
||||
- Rebase on bcc-0.16.0
|
||||
- Fix IPv6 ports
|
||||
|
||||
* Wed Sep 02 2020 Jerome Marchand <jmarchan@redhat.com> - 0.14.0-4
|
||||
- Fix KFUNC_PROBE return value
|
||||
- Forbid trampolines on unsupported arches
|
||||
|
||||
* Tue Jul 21 2020 Jerome Marchand <jmarchan@redhat.com> - 0.14.0-3
|
||||
- Add KBUILD_MODNAME flag to default cflags
|
||||
|
||||
* Thu Jun 11 2020 Jerome Marchand <jmarchan@redhat.com> - 0.14.0-2
|
||||
- Remove criticalstat manpage
|
||||
- Remove compactsnoop on non x86_64
|
||||
- Suggest to use --binary in deadlock
|
||||
- Remove non-existent argument from tcpconnect man page
|
||||
- Suggest to install the proper kernel-devel version
|
||||
- Fix dbstat and dbslower
|
||||
|
||||
* Wed Apr 22 2020 Jerome Marchand <jmarchan@redhat.com> - 0.14.0-1
|
||||
- Rebase on bcc-0.14.0
|
||||
|
||||
* Wed Dec 04 2019 Jerome Marchand <jmarchan@redhat.com> - 0.11.0-2
|
||||
- Add -c option ton the synopsis of tcpretrans manpage
|
||||
|
||||
* Tue Nov 26 2019 Jerome Marchand <jmarchan@redhat.com> - 0.11.0-1
|
||||
- Rebase to bcc-0.11.0
|
||||
- Reinstate the unstable comment patch that has been removed by mistake
|
||||
|
||||
* Thu Oct 17 2019 Jerome Marchand <jmarchan@redhat.com> - 0.10.0-1
|
||||
- Rebase to bcc-0.10.0
|
||||
- Drop criticalstat
|
||||
- Fix regression on vfscount and runqslower
|
||||
- Rebuild on LLVM 9
|
||||
|
||||
* Tue Aug 06 2019 Jerome Marchand <jmarchan@redhat.com> - 0.8.0-4
|
||||
- remove unstable statement from the man pages
|
||||
|
||||
* Wed Jul 03 2019 Jerome Marchand <jmarchan@redhat.com> - 0.8.0-3
|
||||
- fix b.support_raw_tracepoint
|
||||
- fix runqslower warning
|
||||
|
||||
* 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