Blame SPECS/bpftrace.spec

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