Blame SPECS/bpftrace.spec

295890
%bcond_without llvm_static
295890
295890
Name:           bpftrace
a8449c
Version:        0.11.1
a8449c
Release:        3%{?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
a8449c
Patch1:         %{name}-%{version}-irbuilderbpf.cpp-bpforc.h-Fix-compilation-with-LLVM-.patch
a8449c
Patch2:         %{name}-%{version}-Fix-clear-when-called-on-an-array.patch
b7cc67
# WARNING: because of the arch-specific patch, no autosetup is used
b7cc67
# Remember to patch accordingly
b7cc67
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
a8449c
BuildRequires:  libbpf-devel
a8449c
BuildRequires:  libbpf-static
a8449c
BuildRequires:  binutils-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
b7cc67
%setup
295890
b7cc67
%patch0 -p1
b7cc67
%patch1 -p1
b7cc67
%patch2 -p1
b7cc67
b7cc67
%ifarch aarch64
b7cc67
%patch10 -p1
b7cc67
%endif
295890
295890
%build
295890
%cmake . \
295890
        -DCMAKE_BUILD_TYPE=RelWithDebInfo \
295890
        -DBUILD_TESTING:BOOL=OFF \
a8449c
        -DBUILD_SHARED_LIBS:BOOL=OFF \
a8449c
        -DLIBBCC_LIBRARIES:PATH=%{_libdir}/libbcc-no-libbpf.so
295890
%make_build
295890
295890
295890
%install
a8449c
# The post hooks strip the binary which removes
a8449c
# the BEGIN_trigger and END_trigger functions
a8449c
# which are needed for the BEGIN and END probes
a8449c
%global __os_install_post %{nil}
a8449c
%global _find_debuginfo_opts -g
a8449c
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
b7cc67
#mkdir -p %{buildroot}%{_mandir}
b7cc67
#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
b7cc67
# tcp_drop() is inlined on ppc64
b7cc67
%ifarch %{power64}
b7cc67
%exclude %{_datadir}/%{name}/tools/tcpdrop.bt
b7cc67
%exclude %{_datadir}/%{name}/tools/doc/tcpdrop_example.txt
b7cc67
%exclude %{_mandir}/man8/tcpdrop.8.gz
b7cc67
%endif
295890
295890
%changelog
a8449c
* Thu Jan 28 2021 Jerome Marchand <jmarchan@redhat.com> - 0.11.1-3
a8449c
- Add missing libbpf and binutils-dev dependencies
a8449c
a8449c
* Wed Nov 11 2020 Jerome Marchand <jmarchan@redhat.com> - 0.11.1-2
a8449c
- Fix statsnoop and opensnoop on aarch64 again
a8449c
a8449c
* Fri Nov 06 2020 Jerome Marchand <jmarchan@redhat.com> - 0.11.1-1
a8449c
- Rebase on bpftrace 0.11.1
a8449c
a8449c
* Tue Oct 27 2020 Jerome Marchand <jmarchan@redhat.com> - 0.10.0-5
a8449c
- Rebuild for bcc 0.16.0
a8449c
b7cc67
* Thu Jun 11 2020 Jerome Marchand <jmarchan@redhat.com> - 0.10.0-4
b7cc67
- Fix KBUILD_MODNAME
b7cc67
b7cc67
* Thu Jun 11 2020 Jerome Marchand <jmarchan@redhat.com> - 0.10.0-3
b7cc67
- Fix ENOMEM issue on arm64 machine with many cpus
b7cc67
- Fix statsnoop and opensnoop on aarch64
b7cc67
- Drop tcpdrop on ppc64
b7cc67
b7cc67
* Tue May 05 2020 Jerome Marchand <jmarchan@redhat.com> - 0.10.0-2
b7cc67
- Fix libpthread path in threadsnoop
b7cc67
b7cc67
* Wed Apr 22 2020 Jerome Marchand <jmarchan@redhat.com> - 0.10.0-1
b7cc67
- Rebase on bpftrace 0.10.0
b7cc67
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