Blame SPECS/bcc.spec

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