commit
52af40cc5d
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
|||||||
# bcc
|
|
||||||
|
|
||||||
#### Description
|
|
||||||
BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
|
|
||||||
|
|
||||||
#### Software Architecture
|
|
||||||
Software architecture description
|
|
||||||
|
|
||||||
#### Installation
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Instructions
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Contribution
|
|
||||||
|
|
||||||
1. Fork the repository
|
|
||||||
2. Create Feat_xxx branch
|
|
||||||
3. Commit your code
|
|
||||||
4. Create Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### Gitee Feature
|
|
||||||
|
|
||||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
|
||||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
|
||||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
37
README.md
37
README.md
@ -1,37 +0,0 @@
|
|||||||
# bcc
|
|
||||||
|
|
||||||
#### 介绍
|
|
||||||
BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
|
|
||||||
|
|
||||||
#### 软件架构
|
|
||||||
软件架构说明
|
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 使用说明
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 参与贡献
|
|
||||||
|
|
||||||
1. Fork 本仓库
|
|
||||||
2. 新建 Feat_xxx 分支
|
|
||||||
3. 提交代码
|
|
||||||
4. 新建 Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### 码云特技
|
|
||||||
|
|
||||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
|
||||||
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
|
|
||||||
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
|
|
||||||
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
BIN
bcc-0.13.0.tar.gz
Normal file
BIN
bcc-0.13.0.tar.gz
Normal file
Binary file not shown.
156
bcc.spec
Normal file
156
bcc.spec
Normal file
@ -0,0 +1,156 @@
|
|||||||
|
Name: bcc
|
||||||
|
Version: 0.13.0
|
||||||
|
Release: 1
|
||||||
|
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}/archive/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
|
# Arches will be included as upstream support is added and dependencies are
|
||||||
|
# satisfied in the respective arches
|
||||||
|
|
||||||
|
BuildRequires: bison cmake >= 2.8.7 flex libxml2-devel python3-devel
|
||||||
|
BuildRequires: elfutils-libelf-devel llvm-devel clang-devel
|
||||||
|
BuildRequires: llvm-static ncurses-devel pkgconfig(luajit)
|
||||||
|
BuildRequires: libbpf-devel >= 0.0.5-3, libbpf-static >= 0.0.5-3
|
||||||
|
|
||||||
|
Requires: %{name}-tools = %{version}-%{release}
|
||||||
|
Requires: libbpf >= 0.0.5-3
|
||||||
|
|
||||||
|
%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} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
The %{name}-devel package contains libraries and header files for developing
|
||||||
|
application that use BPF Compiler Collection (BCC).
|
||||||
|
|
||||||
|
|
||||||
|
%package help
|
||||||
|
Summary: Examples for BPF Compiler Collection (BCC)
|
||||||
|
Requires: man info
|
||||||
|
Recommends: python3-%{name} = %{version}-%{release}
|
||||||
|
Recommends: %{name}-lua = %{version}-%{release}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description help
|
||||||
|
Examples for BPF Compiler Collection (BCC)
|
||||||
|
|
||||||
|
|
||||||
|
%package -n python3-%{name}
|
||||||
|
Summary: Python3 bindings for BPF Compiler Collection (BCC)
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
BuildArch: noarch
|
||||||
|
%{?python_provide:%python_provide python3-%{srcname}}
|
||||||
|
|
||||||
|
%description -n python3-%{name}
|
||||||
|
Python3 bindings for BPF Compiler Collection (BCC)
|
||||||
|
|
||||||
|
|
||||||
|
%package lua
|
||||||
|
Summary: Standalone tool to run BCC tracers written in Lua
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description lua
|
||||||
|
Standalone tool to run BCC tracers written in Lua
|
||||||
|
|
||||||
|
%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 -n %{name} -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
|
||||||
|
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=' {} \;
|
||||||
|
|
||||||
|
# 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
|
||||||
|
mkdir -p %{buildroot}%{_docdir}/%{name}
|
||||||
|
mv %{buildroot}%{_datadir}/%{name}/examples %{buildroot}%{_docdir}/%{name}/
|
||||||
|
|
||||||
|
# Delete old tools we don't want to ship
|
||||||
|
rm -rf %{buildroot}%{_datadir}/%{name}/tools/old/
|
||||||
|
|
||||||
|
# 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.*
|
||||||
|
%{_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}/
|
||||||
|
|
||||||
|
%files -n python3-%{name}
|
||||||
|
%{python3_sitelib}/%{name}*
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%dir %{_docdir}/%{name}
|
||||||
|
%doc %{_docdir}/%{name}/examples/
|
||||||
|
%{_mandir}/man8/*
|
||||||
|
|
||||||
|
%files tools
|
||||||
|
%dir %{_datadir}/%{name}
|
||||||
|
%{_datadir}/%{name}/tools/
|
||||||
|
%{_datadir}/%{name}/introspection/
|
||||||
|
|
||||||
|
%files lua
|
||||||
|
%{_bindir}/bcc-lua
|
||||||
|
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Sun Apr 26 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.13.0-1
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user