|
|
5d1f51 |
# luajit is not available RHEL 8
|
|
|
5d1f51 |
%bcond_with lua
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%bcond_without llvm_static
|
|
|
5d1f51 |
|
|
|
5d1f51 |
Name: bcc
|
|
|
5d1f51 |
Version: 0.8.0
|
|
|
5d1f51 |
Release: 2%{?dist}
|
|
|
5d1f51 |
Summary: BPF Compiler Collection (BCC)
|
|
|
5d1f51 |
License: ASL 2.0
|
|
|
5d1f51 |
URL: https://github.com/iovisor/bcc
|
|
|
5d1f51 |
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
5d1f51 |
Patch0: %{name}-%{version}-usdt-s390x.patch
|
|
|
5d1f51 |
Patch1: %{name}-%{version}-print_log2_hist-check-and-skip-possible-paddings-215.patch
|
|
|
5d1f51 |
Patch2: %{name}-%{version}-tools-fix-some-python3-bytes-vs-strings-issues-2205.patch
|
|
|
5d1f51 |
|
|
|
5d1f51 |
# Arches will be included as upstream support is added and dependencies are
|
|
|
5d1f51 |
# satisfied in the respective arches
|
|
|
5d1f51 |
ExcludeArch: i686
|
|
|
5d1f51 |
|
|
|
5d1f51 |
BuildRequires: bison, cmake >= 2.8.7, flex, libxml2-devel
|
|
|
5d1f51 |
BuildRequires: python3-devel
|
|
|
5d1f51 |
BuildRequires: elfutils-libelf-devel
|
|
|
5d1f51 |
BuildRequires: llvm-devel
|
|
|
5d1f51 |
BuildRequires: clang-devel
|
|
|
5d1f51 |
BuildRequires: ncurses-devel
|
|
|
5d1f51 |
%if %{with lua}
|
|
|
5d1f51 |
BuildRequires: pkgconfig(luajit)
|
|
|
5d1f51 |
%endif
|
|
|
5d1f51 |
%if %{with llvm_static}
|
|
|
5d1f51 |
BuildRequires: llvm-static
|
|
|
5d1f51 |
%endif
|
|
|
5d1f51 |
|
|
|
5d1f51 |
BuildRequires: clang
|
|
|
5d1f51 |
|
|
|
5d1f51 |
Requires: %{name}-tools = %{version}-%{release}
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%description
|
|
|
5d1f51 |
BCC is a toolkit for creating efficient kernel tracing and manipulation
|
|
|
5d1f51 |
programs, and includes several useful tools and examples. It makes use of
|
|
|
5d1f51 |
extended BPF (Berkeley Packet Filters), formally known as eBPF, a new feature
|
|
|
5d1f51 |
that was first added to Linux 3.15. BCC makes BPF programs easier to write,
|
|
|
5d1f51 |
with kernel instrumentation in C (and includes a C wrapper around LLVM), and
|
|
|
5d1f51 |
front-ends in Python and lua. It is suited for many tasks, including
|
|
|
5d1f51 |
performance analysis and network traffic control.
|
|
|
5d1f51 |
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%package devel
|
|
|
5d1f51 |
Summary: Shared library for BPF Compiler Collection (BCC)
|
|
|
5d1f51 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%description devel
|
|
|
5d1f51 |
The %{name}-devel package contains libraries and header files for developing
|
|
|
5d1f51 |
application that use BPF Compiler Collection (BCC).
|
|
|
5d1f51 |
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%package doc
|
|
|
5d1f51 |
Summary: Examples for BPF Compiler Collection (BCC)
|
|
|
5d1f51 |
Recommends: python3-%{name} = %{version}-%{release}
|
|
|
5d1f51 |
%if %{with lua}
|
|
|
5d1f51 |
Recommends: %{name}-lua = %{version}-%{release}
|
|
|
5d1f51 |
%endif
|
|
|
5d1f51 |
BuildArch: noarch
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%description doc
|
|
|
5d1f51 |
Examples for BPF Compiler Collection (BCC)
|
|
|
5d1f51 |
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%package -n python3-%{name}
|
|
|
5d1f51 |
Summary: Python3 bindings for BPF Compiler Collection (BCC)
|
|
|
5d1f51 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
5d1f51 |
%{?python_provide:%python_provide python3-%{srcname}}
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%description -n python3-%{name}
|
|
|
5d1f51 |
Python3 bindings for BPF Compiler Collection (BCC)
|
|
|
5d1f51 |
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%if %{with lua}
|
|
|
5d1f51 |
%package lua
|
|
|
5d1f51 |
Summary: Standalone tool to run BCC tracers written in Lua
|
|
|
5d1f51 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%description lua
|
|
|
5d1f51 |
Standalone tool to run BCC tracers written in Lua
|
|
|
5d1f51 |
%endif
|
|
|
5d1f51 |
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%package tools
|
|
|
5d1f51 |
Summary: Command line tools for BPF Compiler Collection (BCC)
|
|
|
5d1f51 |
Requires: python3-%{name} = %{version}-%{release}
|
|
|
5d1f51 |
Requires: python3-netaddr
|
|
|
5d1f51 |
Requires: kernel-devel
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%description tools
|
|
|
5d1f51 |
Command line tools for BPF Compiler Collection (BCC)
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%prep
|
|
|
5d1f51 |
%autosetup -p1
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%build
|
|
|
5d1f51 |
%cmake . \
|
|
|
5d1f51 |
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
|
5d1f51 |
-DREVISION_LAST=%{version} -DREVISION=%{version} -DPYTHON_CMD=python3
|
|
|
5d1f51 |
%make_build
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%install
|
|
|
5d1f51 |
%make_install
|
|
|
5d1f51 |
|
|
|
5d1f51 |
# Fix python shebangs
|
|
|
5d1f51 |
# This messes the timestamp and rpmdiff complains about it
|
|
|
5d1f51 |
# Let's set the all thing according to a reference file
|
|
|
5d1f51 |
touch -r %{buildroot}%{_datadir}/%{name}/examples/hello_world.py %{_tmppath}/timestamp
|
|
|
5d1f51 |
|
|
|
5d1f51 |
find %{buildroot}%{_datadir}/%{name}/{tools,examples} -type f -exec \
|
|
|
5d1f51 |
sed -i -e '1s=^#!/usr/bin/python\([0-9.]\+\)\?$=#!%{__python3}=' \
|
|
|
5d1f51 |
-e '1s=^#!/usr/bin/env python\([0-9.]\+\)\?$=#!%{__python3}=' \
|
|
|
5d1f51 |
-e '1s=^#!/usr/bin/env bcc-lua$=#!/usr/bin/bcc-lua=' {} \;
|
|
|
5d1f51 |
|
|
|
5d1f51 |
for i in `find %{buildroot}%{_datadir}/%{name}/examples/` ; do
|
|
|
5d1f51 |
touch -h -r %{_tmppath}/timestamp $i
|
|
|
5d1f51 |
done
|
|
|
5d1f51 |
|
|
|
5d1f51 |
# Move man pages to the right location
|
|
|
5d1f51 |
mkdir -p %{buildroot}%{_mandir}
|
|
|
5d1f51 |
mv %{buildroot}%{_datadir}/%{name}/man/* %{buildroot}%{_mandir}/
|
|
|
5d1f51 |
# Avoid conflict with other manpages
|
|
|
5d1f51 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1517408
|
|
|
5d1f51 |
for i in `find %{buildroot}%{_mandir} -name "*.gz"`; do
|
|
|
5d1f51 |
tname=$(basename $i)
|
|
|
5d1f51 |
rename $tname %{name}-$tname $i
|
|
|
5d1f51 |
done
|
|
|
5d1f51 |
# Fix the symlink too
|
|
|
5d1f51 |
for i in `find %{buildroot}%{_mandir} -lname \*.gz` ; do
|
|
|
5d1f51 |
target=`readlink $i`;
|
|
|
5d1f51 |
ln -sf bcc-$target $i;
|
|
|
5d1f51 |
done
|
|
|
5d1f51 |
|
|
|
5d1f51 |
# We cannot run the test suit since it requires root and it makes changes to
|
|
|
5d1f51 |
# the machine (e.g, IP address)
|
|
|
5d1f51 |
#%check
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%ldconfig_scriptlets
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%files
|
|
|
5d1f51 |
%doc README.md
|
|
|
5d1f51 |
%license LICENSE.txt
|
|
|
5d1f51 |
%{_libdir}/lib%{name}.so.*
|
|
|
5d1f51 |
%{_libdir}/libbpf.so.*
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%files devel
|
|
|
5d1f51 |
%{_libdir}/lib%{name}.so
|
|
|
5d1f51 |
%{_libdir}/libbpf.so
|
|
|
5d1f51 |
%{_libdir}/pkgconfig/lib%{name}.pc
|
|
|
5d1f51 |
%{_includedir}/%{name}/
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%files -n python3-%{name}
|
|
|
5d1f51 |
%{python3_sitelib}/%{name}*
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%files doc
|
|
|
5d1f51 |
# % dir % {_docdir}/% {name}
|
|
|
5d1f51 |
%doc %{_datadir}/%{name}/examples/
|
|
|
5d1f51 |
%if %{without lua}
|
|
|
5d1f51 |
%exclude %{_datadir}/%{name}/examples/lua
|
|
|
5d1f51 |
%endif
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%files tools
|
|
|
5d1f51 |
%dir %{_datadir}/%{name}
|
|
|
5d1f51 |
%dir %{_datadir}/%{name}/tools
|
|
|
5d1f51 |
%dir %{_datadir}/%{name}/introspection
|
|
|
5d1f51 |
%{_datadir}/%{name}/tools/*
|
|
|
5d1f51 |
%{_datadir}/%{name}/introspection/*
|
|
|
5d1f51 |
%exclude %{_datadir}/%{name}/tools/old/
|
|
|
5d1f51 |
# inject relies on BPF_KPROBE_OVERRIDE which is not set on RHEL 8
|
|
|
5d1f51 |
%exclude %{_datadir}/%{name}/tools/inject
|
|
|
5d1f51 |
%exclude %{_datadir}/%{name}/tools/doc/inject_example.txt
|
|
|
5d1f51 |
%exclude %{_mandir}/man8/bcc-inject.8.gz
|
|
|
5d1f51 |
# Neither btrfs nor zfs are available on RHEL8
|
|
|
5d1f51 |
%exclude %{_datadir}/%{name}/tools/btrfs*
|
|
|
5d1f51 |
%exclude %{_datadir}/%{name}/tools/doc/btrfs*
|
|
|
5d1f51 |
%exclude %{_mandir}/man8/bcc-btrfs*
|
|
|
5d1f51 |
%exclude %{_datadir}/%{name}/tools/zfs*
|
|
|
5d1f51 |
%exclude %{_datadir}/%{name}/tools/doc/zfs*
|
|
|
5d1f51 |
%exclude %{_mandir}/man8/bcc-zfs*
|
|
|
5d1f51 |
%{_mandir}/man8/*
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%if %{with lua}
|
|
|
5d1f51 |
%files lua
|
|
|
5d1f51 |
%{_bindir}/bcc-lua
|
|
|
5d1f51 |
%endif
|
|
|
5d1f51 |
|
|
|
5d1f51 |
|
|
|
5d1f51 |
%changelog
|
|
|
5d1f51 |
* Wed May 15 2019 Jerome Marchand <jmarchan@redhat.com> - 0.8.0-2
|
|
|
5d1f51 |
- Rebuild for llvm 8
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Thu Apr 11 2019 Jerome Marchand <jmarchan@redhat.com> - 0.8.0-1
|
|
|
5d1f51 |
- Rebase on bcc-8.0.0
|
|
|
5d1f51 |
- Replace the temporary s390x workaround by a proper fix
|
|
|
5d1f51 |
- Remove the doc of excluded tool from the package
|
|
|
5d1f51 |
- Fix print_log2_hist
|
|
|
5d1f51 |
- Fix yet a few other python3 bytes vs strings issues
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Mon Mar 25 2019 Jerome Marchand <jmarchan@redhat.com> - 0.7.0-6
|
|
|
5d1f51 |
- Add CI gating
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Thu Dec 13 2018 Jerome Marchand <jmarchan@redhat.com> - 0.7.0-5
|
|
|
5d1f51 |
- Fix biolatency -D
|
|
|
5d1f51 |
- Fix biotop manpage
|
|
|
5d1f51 |
- Rebuild for LLVM 7.0.1 (from Tom Stellard)
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Mon Dec 10 2018 Jerome Marchand <jmarchan@redhat.com> - 0.7.0-4
|
|
|
5d1f51 |
- Fix bio* tools
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Mon Nov 05 2018 Jerome Marchand <jmarchan@redhat.com> - 0.7.0-3
|
|
|
5d1f51 |
- Fix multiple bytes/string encoding issues
|
|
|
5d1f51 |
- Fix misc covscan warning
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Mon Oct 15 2018 Tom Stellard <tstellar@redhat.com> - 0.7.0-2
|
|
|
5d1f51 |
- Drop explicit dependency on clang-libs
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Fri Oct 12 2018 Jerome Marchand <jmarchan@redhat.com> - 0.7.0-1
|
|
|
5d1f51 |
- Rebase on bcc-7.0.0
|
|
|
5d1f51 |
- Remove useless tools (zfs*, btrfs* and inject)
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Thu Sep 20 2018 Jerome Marchand <jmarchan@redhat.com> - 0.6.1-1
|
|
|
5d1f51 |
- Rebase on bcc-0.6.1
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Thu Sep 20 2018 Jerome Marchand <jmarchan@redhat.com> - 0.6.0-6
|
|
|
5d1f51 |
- llcstat: print a nicer error message on virtual machine
|
|
|
5d1f51 |
- Add NSS support to sslsniff
|
|
|
5d1f51 |
- Fixes miscellaneous error uncovered by covscan
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Wed Aug 08 2018 Tom Stellard <tstellar@redhat.com> - 0.6.0-5
|
|
|
5d1f51 |
- Use llvm-toolset-6.0 prefix for clang-libs dependency
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Fri Aug 03 2018 Tom Stellard <tstellar@redhat.com> - 0.6.0-4
|
|
|
5d1f51 |
- Rebuld for llvm-toolset-6.0
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Wed Jul 18 2018 Jerome Marchand <jmarchan@redhat.com> - 0.6.0-3
|
|
|
5d1f51 |
- Disable lua on all arches
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Tue Jun 26 2018 Jerome Marchand <jmarchan@redhat.com> - 0.6.0-2
|
|
|
5d1f51 |
- Add clang-libs requirement
|
|
|
5d1f51 |
- Fix manpages symlinks
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Tue Jun 19 2018 Jerome Marchand <jmarchan@redhat.com> - 0.6.0-1
|
|
|
5d1f51 |
- Rebase on bcc-0.6.0
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Thu May 24 2018 Jerome Marchand <jmarchan@redhat.com> - 0.5.0-5
|
|
|
5d1f51 |
- Enables build on ppc64(le) and s390x arches
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Thu Apr 05 2018 Rafael Santos <rdossant@redhat.com> - 0.5.0-4
|
|
|
5d1f51 |
- Resolves #1555627 - fix compilation error with latest llvm/clang
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-3
|
|
|
5d1f51 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.5.0-2
|
|
|
5d1f51 |
- Switch to %%ldconfig_scriptlets
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Wed Jan 03 2018 Rafael Santos <rdossant@redhat.com> - 0.5.0-1
|
|
|
5d1f51 |
- Rebase to new released version
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Thu Nov 16 2017 Rafael Santos <rdossant@redhat.com> - 0.4.0-4
|
|
|
5d1f51 |
- Resolves #1517408 - avoid conflict with other manpages
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Thu Nov 02 2017 Rafael Santos <rdossant@redhat.com> - 0.4.0-3
|
|
|
5d1f51 |
- Use weak deps to not require lua subpkg on ppc64(le)
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Wed Nov 01 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.0-2
|
|
|
5d1f51 |
- Rebuild for LLVM5
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Wed Nov 01 2017 Rafael Fonseca <rdossant@redhat.com> - 0.4.0-1
|
|
|
5d1f51 |
- Resolves #1460482 - rebase to new release
|
|
|
5d1f51 |
- Resolves #1505506 - add support for LLVM 5.0
|
|
|
5d1f51 |
- Resolves #1460482 - BPF module compilation issue
|
|
|
5d1f51 |
- Partially address #1479990 - location of man pages
|
|
|
5d1f51 |
- Enable ppc64(le) support without lua
|
|
|
5d1f51 |
- Soname versioning for libbpf by ignatenkobrain
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-4
|
|
|
5d1f51 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-3
|
|
|
5d1f51 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Thu Mar 30 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.3.0-2
|
|
|
5d1f51 |
- Rebuild for LLVM4
|
|
|
5d1f51 |
- Trivial fixes in spec
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Fri Mar 10 2017 Rafael Fonseca <rdossant@redhat.com> - 0.3.0-1
|
|
|
5d1f51 |
- Rebase to new release.
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-3
|
|
|
5d1f51 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Tue Jan 10 2017 Rafael Fonseca <rdossant@redhat.com> - 0.2.0-2
|
|
|
5d1f51 |
- Fix typo
|
|
|
5d1f51 |
|
|
|
5d1f51 |
* Tue Nov 29 2016 Rafael Fonseca <rdossant@redhat.com> - 0.2.0-1
|
|
|
5d1f51 |
- Initial import
|