bpftrace/bpftrace.spec
cherry530 82e67bd879 fix build error
Signed-off-by: cherry530 <xuping33@huawei.com>
2022-11-11 10:31:01 +08:00

89 lines
2.7 KiB
RPMSpec

Name: bpftrace
Version: 0.14.1
Release: 4
Summary: High-level tracing language for Linux eBPF
License: ASL 2.0
URL: https://github.com/iovisor/bpftrace
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz
Patch0000: Choose-to-use-a-functional-interface-to-fix-build-error.patch
# Arches will be included as upstream support is added and dependencies are
# satisfied in the respective arches
ExclusiveArch: x86_64 %{power64} aarch64
BuildRequires: gcc-c++ bison flex cmake elfutils-libelf-devel
BuildRequires: zlib-devel llvm-devel clang-devel
BuildRequires: bcc-devel >= 0.19.0-1
BuildRequires: libbpf-devel libbpf-static
BuildRequires: binutils-devel
BuildRequires: cereal-devel libdwarf-devel rubygem-asciidoctor
%description
bpftrace is a high-level tracing language for Linux enhanced Berkeley Packet
Filter (eBPF) available in recent Linux kernels (4.x). bpftrace uses LLVM as a
backend to compile scripts to BPF-bytecode and makes use of BCC for
interacting with the Linux BPF system, as well as existing Linux tracing
capabilities: kernel dynamic tracing (kprobes), user-level dynamic tracing
(uprobes), and tracepoints. The BPFtrace language is inspired by awk and C,
and predecessor tracers such as DTrace and SystemTap.
%prep
%autosetup -p1
%build
%cmake . \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_TESTING:BOOL=OFF \
-DBUILD_SHARED_LIBS:BOOL=OFF \
-DENABLE_LLVM_SHARED=1
%make_build
%install
%global __os_install_post %{nil}
%global _find_debuginfo_opts -g
%make_install
find %{buildroot}%{_datadir}/%{name}/tools -type f -exec \
sed -i -e '1s=^#!/usr/bin/env %{name}\([0-9.]\+\)\?$=#!%{_bindir}/%{name}=' {} \;
%files
%doc README.md CONTRIBUTING-TOOLS.md
%doc docs/reference_guide.md docs/tutorial_one_liners.md
%license LICENSE
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/tools
%dir %{_datadir}/%{name}/tools/doc
%{_bindir}/%{name}
%{_bindir}/%{name}-aotrt
%{_mandir}/man8/*
%attr(0755,-,-) %{_datadir}/%{name}/tools/*.bt
%{_datadir}/%{name}/tools/doc/*.txt
%changelog
* Fri Nov 11 2022 xu_ping <xuping33@h-partners.com> - 0.14.1-4
- Use a functional interface depending on the version to fix build error
* Thu Jun 9 2022 LemmyHuang <huangliming5@huawei.com> - 0.14.1-3
- fix abort on startup caused by llvm compiler
* Sat May 7 2022 liyanan <liyanan32@h-partners.com> - 0.14.1-2
- Fix 'bpftrace symbols are stripped'
* Fri Apr 22 2022 yaoxin <yaoxin30@h-partners.com> - 0.14.1-1
- Update to 0.14.1
* Mon Jan 10 2022 liyanan <liyanan32@huawei.com> - 0.13.0-1
- update to 0.13.0
* Mon Nov 9 2020 wutao <wutao61@huawei.com> - 0.10.0-2
- fix build error
* Thu May 07 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.10.0-1
- Package init