Blame SPECS/bcc.spec

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