Blame SPECS/bpftrace.spec

05649e
%bcond_without llvm_static
05649e
05649e
Name:           bpftrace
18bb42
Version:        0.10.0
18bb42
Release:        4%{?dist}
05649e
Summary:        High-level tracing language for Linux eBPF
05649e
License:        ASL 2.0
05649e
05649e
URL:            https://github.com/iovisor/bpftrace
05649e
Source0:        %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
774fff
Patch0:         %{name}-%{version}-RHEL-8-fixes.patch
18bb42
Patch1:         %{name}-%{version}-Add-s390x-register-support.patch
18bb42
Patch2:         %{name}-%{version}-Remove-RLIMIT_AS-limit.patch
18bb42
Patch3:         %{name}-%{version}-Fix-KBUILD_MODNAME.patch
18bb42
# WARNING: because of the arch-specific patch, no autosetup is used
18bb42
# Remember to patch accordingly
18bb42
Patch10:        %{name}-%{version}-RHEL-8-aarch64-fixes-statsnoop-and-opensnoop.patch
05649e
05649e
# Arches will be included as upstream support is added and dependencies are
05649e
# satisfied in the respective arches
05649e
ExclusiveArch:  x86_64 %{power64} aarch64 s390x
05649e
05649e
BuildRequires:  gcc-c++
05649e
BuildRequires:  bison
05649e
BuildRequires:  flex
05649e
BuildRequires:  cmake
05649e
BuildRequires:  elfutils-libelf-devel
05649e
BuildRequires:  zlib-devel
05649e
BuildRequires:  llvm-devel
05649e
BuildRequires:  clang-devel
05649e
BuildRequires:  bcc-devel
05649e
05649e
%if %{with llvm_static}
05649e
BuildRequires:  llvm-static
05649e
%endif
05649e
05649e
%description
05649e
BPFtrace is a high-level tracing language for Linux enhanced Berkeley Packet
05649e
Filter (eBPF) available in recent Linux kernels (4.x). BPFtrace uses LLVM as a
05649e
backend to compile scripts to BPF-bytecode and makes use of BCC for
05649e
interacting with the Linux BPF system, as well as existing Linux tracing
05649e
capabilities: kernel dynamic tracing (kprobes), user-level dynamic tracing
05649e
(uprobes), and tracepoints. The BPFtrace language is inspired by awk and C,
05649e
and predecessor tracers such as DTrace and SystemTap
05649e
05649e
05649e
%prep
18bb42
%setup
05649e
18bb42
%patch0 -p1
18bb42
%patch1 -p1
18bb42
%patch2 -p1
18bb42
%patch3 -p1
18bb42
18bb42
%ifarch aarch64
18bb42
%patch10 -p1
18bb42
%endif
05649e
05649e
%build
05649e
%cmake . \
05649e
        -DCMAKE_BUILD_TYPE=RelWithDebInfo \
05649e
        -DBUILD_TESTING:BOOL=OFF \
774fff
        -DBUILD_SHARED_LIBS:BOOL=OFF
774fff
#        -DLLVM_DIR=/usr/lib64/llvm7.0/lib/cmake/llvm/
05649e
%make_build
05649e
05649e
05649e
%install
05649e
%make_install
05649e
05649e
# Fix shebangs (https://fedoraproject.org/wiki/Packaging:Guidelines#Shebang_lines)
05649e
find %{buildroot}%{_datadir}/%{name}/tools -type f -exec \
05649e
  sed -i -e '1s=^#!/usr/bin/env %{name}\([0-9.]\+\)\?$=#!%{_bindir}/%{name}=' {} \;
05649e
05649e
# Move man pages to the right location
18bb42
#mkdir -p %{buildroot}%{_mandir}
18bb42
#mv %{buildroot}%{_prefix}/man/* %{buildroot}%{_mandir}/
05649e
05649e
05649e
%files
05649e
%doc README.md CONTRIBUTING-TOOLS.md
05649e
%doc docs/reference_guide.md docs/tutorial_one_liners.md
05649e
%license LICENSE
05649e
%dir %{_datadir}/%{name}
05649e
%dir %{_datadir}/%{name}/tools
05649e
%dir %{_datadir}/%{name}/tools/doc
05649e
%{_bindir}/%{name}
05649e
%{_mandir}/man8/*
05649e
%attr(0755,-,-) %{_datadir}/%{name}/tools/*.bt
05649e
%{_datadir}/%{name}/tools/doc/*.txt
18bb42
# tcp_drop() is inlined on ppc64
18bb42
%ifarch %{power64}
18bb42
%exclude %{_datadir}/%{name}/tools/tcpdrop.bt
18bb42
%exclude %{_datadir}/%{name}/tools/doc/tcpdrop_example.txt
18bb42
%exclude %{_mandir}/man8/tcpdrop.8.gz
18bb42
%endif
05649e
05649e
%changelog
18bb42
* Thu Jun 11 2020 Jerome Marchand <jmarchan@redhat.com> - 0.10.0-4
18bb42
- Fix KBUILD_MODNAME
18bb42
18bb42
* Thu Jun 11 2020 Jerome Marchand <jmarchan@redhat.com> - 0.10.0-3
18bb42
- Fix ENOMEM issue on arm64 machine with many cpus
18bb42
- Fix statsnoop and opensnoop on aarch64
18bb42
- Drop tcpdrop on ppc64
18bb42
18bb42
* Tue May 05 2020 Jerome Marchand <jmarchan@redhat.com> - 0.10.0-2
18bb42
- Fix libpthread path in threadsnoop
18bb42
18bb42
* Wed Apr 22 2020 Jerome Marchand <jmarchan@redhat.com> - 0.10.0-1
18bb42
- Rebase on bpftrace 0.10.0
18bb42
774fff
* Fri Nov 08 2019 Jerome Marchand <jmarchan@redhat.com> - 0.9.2-1
774fff
- Rebase on bpftrace 0.9.2
774fff
774fff
* Tue Jun 18 2019 Jerome Marchand <jmarchan@redhat.com> - 0.9-3
05649e
- Don't allow to raw_spin_lock* kprobes that can deadlock the kernel.
05649e
774fff
* Wed Jun 12 2019 Jerome Marchand <jmarchan@redhat.com> - 0.9-2
05649e
- Fixes gethostlatency
05649e
- Fixes a struct definition issue that made several tools fail
05649e
- Add CI gating
05649e
05649e
* Wed May 15 2019 Jerome Marchand <jmarchan@redhat.com> - 0.9.1
05649e
- Original build on RHEL 8
05649e
05649e
* Thu Apr 25 2019 Augusto Caringi <acaringi@redhat.com> - 0.9-3
05649e
- Rebuilt for bcc 0.9.0
05649e
05649e
* Mon Apr 22 2019 Neal Gompa <ngompa@datto.com> - 0.9-2
05649e
- Fix Source0 reference
05649e
- Use make_build macro for calling make
05649e
05649e
* Mon Apr  1 2019 Peter Robinson <pbrobinson@fedoraproject.org> 0.9-1
05649e
- Build on aarch64 and s390x
05649e
05649e
* Mon Mar 25 2019 Augusto Caringi <acaringi@redhat.com> - 0.9-0
05649e
- Updated to version 0.9
05649e
05649e
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.0-2.20181210gitc49b333
05649e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
05649e
05649e
* Mon Dec 10 2018 Augusto Caringi <acaringi@redhat.com> - 0.0-1.20181210gitc49b333
05649e
- Updated to latest upstream (c49b333c034a6d29a7ce90f565e27da1061af971)
05649e
05649e
* Wed Nov 07 2018 Augusto Caringi <acaringi@redhat.com> - 0.0-1.20181107git029717b
05649e
- Initial import