|
|
1910f2 |
# luajit is not available for some architectures and not at all on RHEL7
|
|
|
1910f2 |
%if 0%{?rhel} <= 7
|
|
|
1910f2 |
%bcond_with lua
|
|
|
1910f2 |
%else
|
|
|
1910f2 |
%ifarch ppc64 ppc64le s390x
|
|
|
1910f2 |
%bcond_with lua
|
|
|
1910f2 |
%else
|
|
|
1910f2 |
%bcond_without lua
|
|
|
1910f2 |
%endif
|
|
|
1910f2 |
%endif
|
|
|
1910f2 |
|
|
|
1910f2 |
Name: bcc
|
|
|
1910f2 |
Version: 0.10.0
|
|
|
1910f2 |
Release: 1%{?dist}
|
|
|
1910f2 |
Summary: BPF Compiler Collection (BCC)
|
|
|
1910f2 |
License: ASL 2.0
|
|
|
1910f2 |
URL: https://github.com/iovisor/bcc
|
|
|
1910f2 |
# Generate source tarball until upstream bug is fixed
|
|
|
1910f2 |
# See https://github.com/iovisor/bcc/issues/2261
|
|
|
1910f2 |
# To generate the tarball, use the following commands
|
|
|
1910f2 |
# git clone -b "v0.10.0" --single-branch --depth 1 url bcc-0.10.0
|
|
|
1910f2 |
# pushd bcc-0.10.0
|
|
|
1910f2 |
# git submodule update --init
|
|
|
1910f2 |
# popd
|
|
|
1910f2 |
# tar zcvf bcc-0.10.0.tar.gz bcc-0.10.0/
|
|
|
1910f2 |
#Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
|
|
|
1910f2 |
Source0: %{name}-%{version}.tar.gz
|
|
|
1910f2 |
Patch0: link-against-libLLVM.so-instead-of-static-libs.patch
|
|
|
1910f2 |
Patch1: Fix-tools-for-RHEL-7.patch
|
|
|
1910f2 |
Patch2: %{name}-%{version}-tools-fix-vfscount-output-when-no-duration-is-specif.patch
|
|
|
1910f2 |
|
|
|
1910f2 |
# Arches will be included as upstream support is added and dependencies are
|
|
|
1910f2 |
# satisfied in the respective arches
|
|
|
1910f2 |
ExcludeArch: i686 ppc s390
|
|
|
1910f2 |
|
|
|
1910f2 |
BuildRequires: bison, cmake >= 2.8.7, flex, libxml2-devel
|
|
|
1910f2 |
BuildRequires: python-devel
|
|
|
1910f2 |
BuildRequires: elfutils-libelf-devel
|
|
|
1910f2 |
BuildRequires: ncurses-devel
|
|
|
1910f2 |
%if %{with lua}
|
|
|
1910f2 |
BuildRequires: pkgconfig(luajit)
|
|
|
1910f2 |
%endif
|
|
|
1910f2 |
BuildRequires: llvm-private-devel >= 6.0.1-0.3
|
|
|
1910f2 |
|
|
|
1910f2 |
Requires: %{name}-tools = %{version}-%{release}
|
|
|
1910f2 |
Requires: llvm-private >= 6.0.1-0.3
|
|
|
1910f2 |
|
|
|
1910f2 |
%description
|
|
|
1910f2 |
BCC is a toolkit for creating efficient kernel tracing and manipulation
|
|
|
1910f2 |
programs, and includes several useful tools and examples. It makes use of
|
|
|
1910f2 |
extended BPF (Berkeley Packet Filters), formally known as eBPF, a new feature
|
|
|
1910f2 |
that was first added to Linux 3.15. BCC makes BPF programs easier to write,
|
|
|
1910f2 |
with kernel instrumentation in C (and includes a C wrapper around LLVM), and
|
|
|
1910f2 |
front-ends in Python and lua. It is suited for many tasks, including
|
|
|
1910f2 |
performance analysis and network traffic control.
|
|
|
1910f2 |
|
|
|
1910f2 |
|
|
|
1910f2 |
%package devel
|
|
|
1910f2 |
Summary: Shared library for BPF Compiler Collection (BCC)
|
|
|
1910f2 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
1910f2 |
|
|
|
1910f2 |
%description devel
|
|
|
1910f2 |
The %{name}-devel package contains libraries and header files for developing
|
|
|
1910f2 |
application that use BPF Compiler Collection (BCC).
|
|
|
1910f2 |
|
|
|
1910f2 |
|
|
|
1910f2 |
%package doc
|
|
|
1910f2 |
Summary: Examples for BPF Compiler Collection (BCC)
|
|
|
1910f2 |
BuildArch: noarch
|
|
|
1910f2 |
|
|
|
1910f2 |
%description doc
|
|
|
1910f2 |
Examples for BPF Compiler Collection (BCC)
|
|
|
1910f2 |
|
|
|
1910f2 |
|
|
|
1910f2 |
%package -n python-%{name}
|
|
|
1910f2 |
Summary: Python bindings for BPF Compiler Collection (BCC)
|
|
|
1910f2 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
1910f2 |
%{?python_provide:%python_provide python-%{srcname}}
|
|
|
1910f2 |
|
|
|
1910f2 |
%description -n python-%{name}
|
|
|
1910f2 |
Python bindings for BPF Compiler Collection (BCC)
|
|
|
1910f2 |
|
|
|
1910f2 |
|
|
|
1910f2 |
%if %{with lua}
|
|
|
1910f2 |
%package lua
|
|
|
1910f2 |
Summary: Standalone tool to run BCC tracers written in Lua
|
|
|
1910f2 |
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
1910f2 |
|
|
|
1910f2 |
%description lua
|
|
|
1910f2 |
Standalone tool to run BCC tracers written in Lua
|
|
|
1910f2 |
%endif
|
|
|
1910f2 |
|
|
|
1910f2 |
|
|
|
1910f2 |
%package tools
|
|
|
1910f2 |
Summary: Command line tools for BPF Compiler Collection (BCC)
|
|
|
1910f2 |
Requires: python-%{name} = %{version}-%{release}
|
|
|
1910f2 |
Requires: python-netaddr
|
|
|
1910f2 |
Requires: kernel-devel
|
|
|
1910f2 |
|
|
|
1910f2 |
%description tools
|
|
|
1910f2 |
Command line tools for BPF Compiler Collection (BCC)
|
|
|
1910f2 |
|
|
|
1910f2 |
%prep
|
|
|
1910f2 |
%autosetup -p1
|
|
|
1910f2 |
|
|
|
1910f2 |
%build
|
|
|
1910f2 |
%cmake . \
|
|
|
1910f2 |
-DCMAKE_BUILD_TYPE=RelWithDebInfo\
|
|
|
1910f2 |
-DCMAKE_CXX_FLAGS='-std=c++11 -I/usr/include/llvm-private/'\
|
|
|
1910f2 |
-DREVISION_LAST=%{version} -DREVISION=%{version}\
|
|
|
1910f2 |
-DCMAKE_LIBRARY_PATH=/usr/lib64/clang-private/\
|
|
|
1910f2 |
-DCMAKE_INSTALL_RPATH=/usr/lib64/clang-private/
|
|
|
1910f2 |
%make_build
|
|
|
1910f2 |
|
|
|
1910f2 |
%install
|
|
|
1910f2 |
%make_install
|
|
|
1910f2 |
|
|
|
1910f2 |
# Move man pages to the right location
|
|
|
1910f2 |
mkdir -p %{buildroot}%{_mandir}
|
|
|
1910f2 |
mv %{buildroot}%{_datadir}/%{name}/man/* %{buildroot}%{_mandir}/
|
|
|
1910f2 |
# Avoid conflict with other manpages
|
|
|
1910f2 |
# https://bugzilla.redhat.com/show_bug.cgi?id=1517408
|
|
|
1910f2 |
for i in `find %{buildroot}%{_mandir} -name "*.gz"`; do
|
|
|
1910f2 |
tname=$(basename $i)
|
|
|
1910f2 |
rename $tname %{name}-$tname $i
|
|
|
1910f2 |
done
|
|
|
1910f2 |
# Fix the symlink too
|
|
|
1910f2 |
for i in `find %{buildroot}%{_mandir} -lname \*.gz` ; do
|
|
|
1910f2 |
target=`readlink $i`;
|
|
|
1910f2 |
ln -sf bcc-$target $i;
|
|
|
1910f2 |
done
|
|
|
1910f2 |
mkdir -p %{buildroot}%{_docdir}/%{name}
|
|
|
1910f2 |
mv %{buildroot}%{_datadir}/%{name}/examples %{buildroot}%{_docdir}/%{name}/
|
|
|
1910f2 |
|
|
|
1910f2 |
# We cannot run the test suit since it requires root and it makes changes to
|
|
|
1910f2 |
# the machine (e.g, IP address)
|
|
|
1910f2 |
#%check
|
|
|
1910f2 |
|
|
|
1910f2 |
%post -p /sbin/ldconfig
|
|
|
1910f2 |
%postun -p /sbin/ldconfig
|
|
|
1910f2 |
|
|
|
1910f2 |
%files
|
|
|
1910f2 |
%doc README.md
|
|
|
1910f2 |
%license LICENSE.txt
|
|
|
1910f2 |
%{_libdir}/lib%{name}.so.*
|
|
|
1910f2 |
%{_libdir}/libbcc_bpf.so.*
|
|
|
1910f2 |
|
|
|
1910f2 |
%files devel
|
|
|
1910f2 |
%{_libdir}/lib%{name}.so
|
|
|
1910f2 |
%{_libdir}/libbcc_bpf.so
|
|
|
1910f2 |
%{_libdir}/pkgconfig/lib%{name}.pc
|
|
|
1910f2 |
%{_includedir}/%{name}/
|
|
|
1910f2 |
|
|
|
1910f2 |
%files -n python-%{name}
|
|
|
1910f2 |
%{python_sitelib}/%{name}*
|
|
|
1910f2 |
|
|
|
1910f2 |
%files doc
|
|
|
1910f2 |
%dir %{_docdir}/%{name}
|
|
|
1910f2 |
%doc %{_docdir}/%{name}/examples/
|
|
|
1910f2 |
|
|
|
1910f2 |
%files tools
|
|
|
1910f2 |
%dir %{_datadir}/%{name}
|
|
|
1910f2 |
%dir %{_datadir}/%{name}/tools
|
|
|
1910f2 |
%dir %{_datadir}/%{name}/introspection
|
|
|
1910f2 |
%{_datadir}/%{name}/tools/*
|
|
|
1910f2 |
%{_datadir}/%{name}/introspection/*
|
|
|
1910f2 |
%exclude %{_datadir}/%{name}/tools/old/
|
|
|
1910f2 |
# inject relies on BPF_KPROBE_OVERRIDE which is absent on RHEL 7
|
|
|
1910f2 |
%exclude %{_datadir}/%{name}/tools/inject
|
|
|
1910f2 |
%exclude %{_datadir}/%{name}/tools/doc/inject_example.txt
|
|
|
1910f2 |
%exclude %{_mandir}/man8/inject.8
|
|
|
1910f2 |
# ZFS isn't available on RHEL
|
|
|
1910f2 |
%exclude %{_datadir}/%{name}/tools/zfs*
|
|
|
1910f2 |
%exclude %{_datadir}/%{name}/tools/doc/zfs*
|
|
|
1910f2 |
%exclude %{_mandir}/man8/zfs*
|
|
|
1910f2 |
# criticalstat relies on CONFIG_PREEMPTIRQ_EVENTS which is absent on RHEL 7
|
|
|
1910f2 |
%exclude %{_datadir}/%{name}/tools/criticalstat
|
|
|
1910f2 |
%exclude %{_datadir}/%{name}/tools/doc/criticalstat_example.txt
|
|
|
1910f2 |
%exclude %{_mandir}/man8/criticalstat.8
|
|
|
1910f2 |
# tcpstates relies on sock:inet_sock_set_state which is absent on RHEL 7
|
|
|
1910f2 |
%exclude %{_datadir}/%{name}/tools/tcpstates
|
|
|
1910f2 |
%exclude %{_datadir}/%{name}/tools/doc/tcpstates_example.txt
|
|
|
1910f2 |
%exclude %{_mandir}/man8/tcpstates.8
|
|
|
1910f2 |
%{_mandir}/man8/*
|
|
|
1910f2 |
|
|
|
1910f2 |
%if %{with lua}
|
|
|
1910f2 |
%files lua
|
|
|
1910f2 |
%{_bindir}/bcc-lua
|
|
|
1910f2 |
%endif
|
|
|
1910f2 |
|
|
|
1910f2 |
|
|
|
1910f2 |
%changelog
|
|
|
1910f2 |
* Tue Aug 06 2019 Jerome Marchand <jmarchan@redhat.com> - 0.10.0-1
|
|
|
1910f2 |
- Rebase on bcc-0.10.0
|
|
|
1910f2 |
- Fix regression of vfscount
|
|
|
1910f2 |
- Drop tools that relies on features unavailable on RHEL 7
|
|
|
1910f2 |
|
|
|
1910f2 |
* Mon Jan 28 2019 Jerome Marchand <jmarchan@redhat.com> - 0.8.0-1
|
|
|
1910f2 |
- Rebase on bcc-8.0.0
|
|
|
1910f2 |
- Update libLLVM.so name for 7.0
|
|
|
1910f2 |
|
|
|
1910f2 |
* Fri Sep 21 2018 Jerome Marchand <jmarchan@redhat.com> - 0.6.1-2
|
|
|
1910f2 |
- Set a minimal version for llvm-private(-devel)
|
|
|
1910f2 |
|
|
|
1910f2 |
* Thu Aug 16 2018 Jerome Marchand <jmarchan@redhat.com> - 0.6.1-1
|
|
|
1910f2 |
- Rebase on v0.6.1
|
|
|
1910f2 |
- Fix tcpsubnet
|
|
|
1910f2 |
- Reinstate llcstat tool
|
|
|
1910f2 |
- Remove inject tool
|
|
|
1910f2 |
- Add NSS support to sslsniff
|
|
|
1910f2 |
- Fixes miscellaneous error uncovered by covscan
|
|
|
1910f2 |
|
|
|
1910f2 |
* Wed Jul 04 2018 Jerome Marchand <jmarchan@redhat.com> - 0.6.0-3
|
|
|
1910f2 |
- Fix tools on RHEL 7
|
|
|
1910f2 |
- Remove llcstat and ZFS tools.
|
|
|
1910f2 |
|
|
|
1910f2 |
* Tue Jun 26 2018 Jerome Marchand <jmarchan@redhat.com> - 0.6.0-2
|
|
|
1910f2 |
- Add llvm-private requirement
|
|
|
1910f2 |
- Fix manpages symlinks
|
|
|
1910f2 |
|
|
|
1910f2 |
* Tue Jun 19 2018 Jerome Marchand <jmarchan@redhat.com> - 0.6.0-1
|
|
|
1910f2 |
- Rebase on bcc-0.6.0
|
|
|
1910f2 |
|
|
|
1910f2 |
* Thu Jun 07 2018 Jerome Marchand <jmarchan@redhat.com> - 0.5.0-6
|
|
|
1910f2 |
- Enables build on RHEL 7
|
|
|
1910f2 |
|
|
|
1910f2 |
* Thu May 24 2018 Jerome Marchand <jmarchan@redhat.com> - 0.5.0-5
|
|
|
1910f2 |
- Enables build on ppc64(le) and s390x arches
|
|
|
1910f2 |
|
|
|
1910f2 |
* Thu Apr 05 2018 Rafael Santos <rdossant@redhat.com> - 0.5.0-4
|
|
|
1910f2 |
- Resolves #1555627 - fix compilation error with latest llvm/clang
|
|
|
1910f2 |
|
|
|
1910f2 |
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.5.0-3
|
|
|
1910f2 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
1910f2 |
|
|
|
1910f2 |
* Fri Feb 02 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.5.0-2
|
|
|
1910f2 |
- Switch to %%ldconfig_scriptlets
|
|
|
1910f2 |
|
|
|
1910f2 |
* Wed Jan 03 2018 Rafael Santos <rdossant@redhat.com> - 0.5.0-1
|
|
|
1910f2 |
- Rebase to new released version
|
|
|
1910f2 |
|
|
|
1910f2 |
* Thu Nov 16 2017 Rafael Santos <rdossant@redhat.com> - 0.4.0-4
|
|
|
1910f2 |
- Resolves #1517408 - avoid conflict with other manpages
|
|
|
1910f2 |
|
|
|
1910f2 |
* Thu Nov 02 2017 Rafael Santos <rdossant@redhat.com> - 0.4.0-3
|
|
|
1910f2 |
- Use weak deps to not require lua subpkg on ppc64(le)
|
|
|
1910f2 |
|
|
|
1910f2 |
* Wed Nov 01 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.4.0-2
|
|
|
1910f2 |
- Rebuild for LLVM5
|
|
|
1910f2 |
|
|
|
1910f2 |
* Wed Nov 01 2017 Rafael Fonseca <rdossant@redhat.com> - 0.4.0-1
|
|
|
1910f2 |
- Resolves #1460482 - rebase to new release
|
|
|
1910f2 |
- Resolves #1505506 - add support for LLVM 5.0
|
|
|
1910f2 |
- Resolves #1460482 - BPF module compilation issue
|
|
|
1910f2 |
- Partially address #1479990 - location of man pages
|
|
|
1910f2 |
- Enable ppc64(le) support without lua
|
|
|
1910f2 |
- Soname versioning for libbpf by ignatenkobrain
|
|
|
1910f2 |
|
|
|
1910f2 |
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-4
|
|
|
1910f2 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
1910f2 |
|
|
|
1910f2 |
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-3
|
|
|
1910f2 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
1910f2 |
|
|
|
1910f2 |
* Thu Mar 30 2017 Igor Gnatenko <ignatenko@redhat.com> - 0.3.0-2
|
|
|
1910f2 |
- Rebuild for LLVM4
|
|
|
1910f2 |
- Trivial fixes in spec
|
|
|
1910f2 |
|
|
|
1910f2 |
* Fri Mar 10 2017 Rafael Fonseca <rdossant@redhat.com> - 0.3.0-1
|
|
|
1910f2 |
- Rebase to new release.
|
|
|
1910f2 |
|
|
|
1910f2 |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-3
|
|
|
1910f2 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
1910f2 |
|
|
|
1910f2 |
* Tue Jan 10 2017 Rafael Fonseca <rdossant@redhat.com> - 0.2.0-2
|
|
|
1910f2 |
- Fix typo
|
|
|
1910f2 |
|
|
|
1910f2 |
* Tue Nov 29 2016 Rafael Fonseca <rdossant@redhat.com> - 0.2.0-1
|
|
|
1910f2 |
- Initial import
|