Sync from SUSE:SLFO:Main bpftrace revision 918c164f88d082f279cc904640235cb9
This commit is contained in:
commit
4dadf66bc7
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
BIN
bpftrace-0.20.4.tar.gz
(Stored with Git LFS)
Normal file
BIN
bpftrace-0.20.4.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
413
bpftrace.changes
Normal file
413
bpftrace.changes
Normal file
@ -0,0 +1,413 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 22 07:17:45 UTC 2024 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
|
||||
- Update to 0.20.4
|
||||
* Drop the kernel headers unpack and caching feature
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 26 13:01:31 UTC 2024 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
|
||||
- Update to 0.20.3 to fix build on pre-v5.14 kernel
|
||||
- Drop fix-build-issue-when-using-UAPI-of-older-kernel.patch which is
|
||||
now included
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 19 05:31:53 UTC 2024 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
|
||||
- Change LLVM version macro to the cleaner alternative that supports SLE as
|
||||
well, matching the one used in bcc package
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 8 06:42:00 UTC 2024 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
|
||||
- Update to 0.20.2
|
||||
* Fix security hole checking unpacked kernel headers (CVE-2024-2313)
|
||||
- Add fix-build-issue-when-using-UAPI-of-older-kernel.patch to
|
||||
fix build issue on pre-v6.0 kernel
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 31 07:31:21 UTC 2024 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
|
||||
- Change LLVM version macro to the cleaner alternative suggested in
|
||||
SR#1134405
|
||||
- Update to 0.20.1
|
||||
* Add log2 histograms with finer granularity
|
||||
* Add support for uprobe_multi link
|
||||
* Attach BTF to generated BPF programs
|
||||
* Add fentry/fexit aliases for kfunc/kretfunc
|
||||
* Support pid targeting for uprobe
|
||||
* New builtin for getting the number of map elements
|
||||
* New config block syntax and standardize config and env var names
|
||||
* Add a jiffies builtin for advanced usages
|
||||
* Fix silent truncation of 64-bit values in hist()
|
||||
* Fix retval for kretfunc/fexit
|
||||
* Add PPID field to execsnoop.bt
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 20 22:44:04 UTC 2023 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||
|
||||
- No longer keep debug info: this is not needed since version 0.16
|
||||
because of gh#iovisor/bpftrace#2264. This reduces binary and
|
||||
package size significantly, and shouldn't regress on bsc#1178928.
|
||||
- Enable (Thin)LTO via CMake.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 14 11:21:31 UTC 2023 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
|
||||
- Bump LLVM major version to 17
|
||||
- Support DWARF parsing (boo#1217737)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 13 09:17:21 UTC 2023 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
|
||||
- Update to 0.19.1
|
||||
* Support all iterators
|
||||
* Support parsing bitfields from BTF/DWARF and printing entire
|
||||
structs
|
||||
* Support using BTF for tracepoints defined in modules
|
||||
* PowerPC
|
||||
* Enable watchpoint support
|
||||
* Add new function, offsetof, get the offset of the element in
|
||||
the struct
|
||||
* Add iter:task_vma iterators detection
|
||||
* Add trailer to truncated strings
|
||||
* Support func builtin for k(ret)func probes
|
||||
* Support casting int <-> int array
|
||||
* Support targeting all running processes for USDTs
|
||||
* Improve attaching to uprobes with size 0
|
||||
* Make args a structure (instead of a pointer)
|
||||
* Improve user symbol resolution
|
||||
* uprobes: make C++ symbol demangling explicit
|
||||
* uprobe: improve C++ probes listing
|
||||
* Fix segfaults in dwarf_parser
|
||||
* Fix resolving username for malformed /etc/passwd
|
||||
* Fix crashes when maps are concurrently modified
|
||||
* Fix alignment of byte arrays inside tuples
|
||||
* Allow '+' in attach point path
|
||||
* Improve listing and 'probe' builtin for several probe types
|
||||
* Allow probe builtin with aliased software/hardware probes
|
||||
* Support executing symlinked binaries with -c
|
||||
* Add access to CLOCK_MONOTONIC with nsecs(monotonic)
|
||||
* iter: Skip structures with '__safe_trusted' suffix
|
||||
* Improve detection of unknown typedefs in ClangParser
|
||||
- Drop Vendor-BPF_F_KPROBE_MULTI_RETURN-definition.patch since it
|
||||
is included from v0.18.0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 6 08:57:00 UTC 2023 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
|
||||
- Add Vendor-BPF_F_KPROBE_MULTI_RETURN-definition.patch to fix build on
|
||||
Leap 15.5/SLES 15-SP5
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 9 07:35:30 UTC 2023 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
|
||||
- Set USE_SYSTEM_BPF_BCC to ON so system libraries are used
|
||||
- Update to 0.17.0
|
||||
+ Support opaque pointer (boo#1207295)
|
||||
+ Support 32-bit ARM systems
|
||||
+ Support BTF in kernel modules
|
||||
+ Add %rh option to print buffer as hex without \x
|
||||
+ Add stdbool.h to built-in headers
|
||||
+ Raise minimum versions for libbpf and bcc and vendor them for local builds
|
||||
+ Support comparison for integer arrays
|
||||
+ Drop Ubuntu 19.10 lockdown detection
|
||||
+ Fix pointer/register loads on 32-bit architectures
|
||||
+ Fix kprobe multi-attachment
|
||||
+ Fix attaching to multiple USDT probes using the same wildcard
|
||||
+ Fix pointer arithmetics codegen
|
||||
+ Fix segfault for invalid AssignVarStatement visit
|
||||
+ Better handling of missing function trace support files
|
||||
+ Fix unroll ID reset
|
||||
+ Support profile and interval probes in probe matcher
|
||||
+ Fix BTF detection macro in tools/old/mdflush.bt
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 9 07:19:16 UTC 2023 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
|
||||
- Bump LLVM major version to 15 in preparation for Leap 15.5/SLES 15-SP5
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 1 04:58:08 UTC 2022 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
|
||||
- Drop Detect-new-BTF-api-btf_dump__new-btf_dump__new_v0_6_0.patch, which is
|
||||
incorporated since 0.16.0
|
||||
- Update to 0.16.0
|
||||
+ Add builtin: numaid
|
||||
+ Add helper verifier error handling
|
||||
+ Add builtin: pton
|
||||
+ Add builtin: debugf
|
||||
+ Add builtin: strerror
|
||||
+ Move from BCC to libbpf (although BCC is still a dependency)
|
||||
+ Add non-uprobe based BEGIN/END implementation
|
||||
+ Helper errors (-k, -kk options) are now emitted to text or json output
|
||||
+ kprobe offset verification is now optional, without requiring --unsafe
|
||||
+ Disallow different lhist bounds in a single map
|
||||
+ Serialize empty histogram as an empty JSON array
|
||||
+ Handle enum values in tracepoint format defs
|
||||
+ Fix compound assignments with non-unary expr
|
||||
+ Fix invalid LLVM IR in join builtin
|
||||
+ Fix lexer buffer size check
|
||||
+ Fix invalid LLVM IR as detected by tests
|
||||
+ Fix builds against libbfd(binutils) >=2.39
|
||||
+ Fix access to ctx
|
||||
+ Add sslsnoop and ssllatency tools
|
||||
+ Add undump tool.
|
||||
- Update to 0.15.0
|
||||
+ Add option for unconditional hex output
|
||||
+ Add builtin function: cgroup_path
|
||||
+ Limit number of generated BPF programs
|
||||
+ Support the octal format specifier (%o) in printf
|
||||
+ Improve include paths resolution
|
||||
+ Automatic type resolution from DWARF
|
||||
+ Add builtin function: bswap
|
||||
+ Print all maps to stdout on SIGUSR1
|
||||
+ Use auto-resolution of library paths for tools
|
||||
+ Improve handling empty attach points
|
||||
+ Fix precedence of multiplicative operations
|
||||
+ Fix probe matching for uprobes with absolute address
|
||||
+ Fix tools to work on new kernel versions
|
||||
+ Fix uprobe target resolution
|
||||
+ Fix using wildcards in kfunc
|
||||
+ Improve handling of format strings
|
||||
+ Fix codegen for buf
|
||||
+ Update biosnoop.bt for kernel >=5.17
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 21 08:36:57 UTC 2022 - pgajdos@suse.com
|
||||
|
||||
- do not link against the shared BFD libraries [bsc#1200630]
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 22 07:35:09 UTC 2022 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
|
||||
- Update to 0.14.1
|
||||
+ Fix precedence of multiplicative operations
|
||||
- Add Detect-new-BTF-api-btf_dump__new-btf_dump__new_v0_6_0.patch to fix
|
||||
compilation error when building with libbpf v0.6
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 26 07:46:27 UTC 2021 - Stephan Kulow <coolo@suse.com>
|
||||
|
||||
- Update to 0.14.0
|
||||
+ Support microsecond timestamps in stftime()
|
||||
+ Add _ as integer literal digit separator
|
||||
+ Support for C style integer suffix in parser
|
||||
+ Add C like pointer arithmetic
|
||||
+ Automatic resolution of library paths for uprobes
|
||||
+ Support positional parameters as integer literals
|
||||
+ Access to uprobe arguments by name
|
||||
+ Prevent LLVM from unrolling loops
|
||||
+ Fix memory leaks in struct types
|
||||
+ Fix strncmp() when N is bigger than on-stack buffer
|
||||
+ Fix strncmp() to check for NUL terminator
|
||||
+ Fix unroll() with async calls
|
||||
+ Fix string comparison codegen
|
||||
+ Fix verifier error when accessing same tracepoint field twice
|
||||
+ Fix reading too many bits for <64 bit kfunc args
|
||||
+ Fix misaligned stack access for map keys
|
||||
+ Write new man page for bpftrace(8)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 14 23:54:40 UTC 2021 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Ensure we always use a fixed LLVM major version to match upstream (12 at the
|
||||
moment). On Leap we use the latest LLVM (9 at the moment) because 12 is not
|
||||
available.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 4 04:11:02 UTC 2021 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
|
||||
- Update to bpftrace 0.13.0.
|
||||
+ support for LLVM 12
|
||||
+ warn if attaching a kprobe to a non-traceable function
|
||||
+ support for -k[k] and elapsed in iter probes
|
||||
+ improve JSON printing (nested structs)
|
||||
+ return 1 from tracepoint probes
|
||||
+ preserve original order of struct types
|
||||
- disallow accessing common tracepoint fields
|
||||
- forbid casting from/to struct types
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 16 17:42:10 UTC 2021 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Update to bpftrace 0.12.1.
|
||||
* Incorrect --info output bug fix release
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Apr 3 04:19:14 UTC 2021 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Update to bpftrace 0.12.0.
|
||||
+ add path, macaddr, strftime builtin
|
||||
+ allow wildcards for tracepoint categories
|
||||
+ add wildcard support for kfunc probe types
|
||||
+ support scientific notation for integer literals
|
||||
+ list retprobes
|
||||
+ resolve unknown typedefs using BTF and give a hint when a type cannot be found
|
||||
+ support multi-matched globbed targets for uprobe and ustd probes
|
||||
+ positional parameters: support numbers as strings and params as string literals
|
||||
+ support for tracepoint __data_loc fields
|
||||
+ set addrspace info for various builtins
|
||||
+ support watchpoint for kernel space address
|
||||
+ support for pointer to pointer
|
||||
+ support for uprobe refcounts
|
||||
+ support for usdt arguments utilising the index register and scale
|
||||
+ printing structures
|
||||
- disable str($# + 1)
|
||||
* array improvements (support assignment to variables and usage as a map key)
|
||||
- Remove upstreamed patches:
|
||||
- bpftrace-bsc1180670-sync-man-page-and-help.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 8 02:54:33 UTC 2021 - Gary Ching-Pang Lin <glin@suse.com>
|
||||
|
||||
- Add bpftrace-bsc1180670-sync-man-page-and-help.patch to sync
|
||||
man page and help (bsc1180670)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 23 06:25:32 UTC 2020 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Do not strip bpftrace binaries -- bpftrace depends on debuginfos for
|
||||
/proc/self/exe in order to implement the BEGIN trigger. bsc#1178928
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 14 23:44:23 UTC 2020 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Update to bpftrace 0.11.4.
|
||||
* Alpine build bug fix release
|
||||
* bcc 0.17 support release
|
||||
- Remove upstreamed patches:
|
||||
- detect-7-arg-bpf_attach_uprobe.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 9 01:17:21 UTC 2020 - Marcus Rueckert <mrueckert@suse.de>
|
||||
|
||||
- added detect-7-arg-bpf_attach_uprobe.patch:
|
||||
fix build with new bpf_attach_uprobe in TW
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 31 06:05:03 UTC 2020 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Update to bpftrace 0.11.2.
|
||||
* Support for LLVM 11.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 15 22:26:55 UTC 2020 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Update to bpftrace 0.11.0.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 14 06:57:29 UTC 2020 - Ismail Dönmez <idonmez@suse.com>
|
||||
|
||||
- Update to version 0.10.0
|
||||
* Support for LLVM 9 and LLVM 10 has been added.
|
||||
* See the complete changelog at https://github.com/iovisor/bpftrace/releases/tag/v0.10.0
|
||||
- Drop upstreamed patches:
|
||||
- boo1162312-cmake-use-_LIBRARIES-when-testing-for-libbfd-version.patch
|
||||
- install-man-dir.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 5 02:21:50 UTC 2020 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Update to bpftrace 0.9.4.
|
||||
* New calls: signal, override, strncmp.
|
||||
* Support for attaching to `kprobes` at an offset.
|
||||
* Support for struct bitfields.
|
||||
See the upstream changelog for more details:
|
||||
<https://github.com/iovisor/bpftrace/releases/tag/v0.9.4>
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jan 31 09:19:26 UTC 2020 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Fix builds on Leap 15.1. This requires quite a bit of trickery related to
|
||||
binutils (see boo#1162312), but it's nothing too hard.
|
||||
- Added patch to workaround boo#1162312.
|
||||
+ boo1162312-cmake-use-_LIBRARIES-when-testing-for-libbfd-version.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 21 20:49:17 UTC 2019 - Luigi Baldoni <aloisio@gmx.com>
|
||||
|
||||
- Update to version 0.9.3
|
||||
* Allow attaching to uprobes at an offset
|
||||
* BTF support
|
||||
* integer casts
|
||||
* integer pointer casts
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 19 06:41:39 UTC 2019 - Gary Ching-Pang Lin <glin@suse.com>
|
||||
|
||||
- Update bpftrace to v0.9.2
|
||||
+ New environment variables (BPFTRACE_NO_USER_SYMBOLS,
|
||||
BPFTRACE_LOG_SIZE)
|
||||
+ New probe type: memory watchpoint
|
||||
+ Support for JSON output
|
||||
- Exclude armv7 and i586 since bcc doesn't support USDT for these
|
||||
two architectures
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 20 14:05:31 UTC 2019 - Martin Pluskal <mpluskal@suse.com>
|
||||
|
||||
- Cleanup using spec-cleaner
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 20 08:50:27 UTC 2019 - Antonio Ojea <aojeagarcia@suse.com>
|
||||
|
||||
- Add readline missing dependency
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Jul 13 21:54:11 UTC 2019 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||
|
||||
- Use %cmake for building, don't set flags manually.
|
||||
- Use %cmake_install instead of installing manually.
|
||||
- install-man-dir.patch: Fix installation directory for man pages.
|
||||
- Fix executable bit for tools.
|
||||
- Fix shebangs in %prep, use -exec instead of piping to xargs.
|
||||
- Disable LTO, because -flto=<number> isn't supported by Clang.
|
||||
Also LTO is perhaps not so important here.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 26 01:49:06 UTC 2019 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Update bpftrace to v0.9.1. Upstream changelog:
|
||||
* Additions:
|
||||
+ Introduce compound assignment operators (+= and friends).
|
||||
+ Add support for arrays and IPv6 for the ntop builtin function.
|
||||
+ Add basic support to enums (treat them as constants).
|
||||
+ Add macro definition support.
|
||||
+ Add support for arrays and IPv6 for the ntop builtin function.
|
||||
+ Allow comparison of two string variables.
|
||||
+ Add pre and post behavior to ++ and -- operators.
|
||||
* Breaking changes:
|
||||
- Ban kprobes that cause CPU deadlocks.
|
||||
+ Add unsafe-mode and make default execution mode safe-mode.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 24 14:58:42 UTC 2019 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Update bpftrace to v0.9.
|
||||
- Deprecated: sym() and stack() are deprecated.
|
||||
Use ksym() and kstack() instead.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jan 15 09:56:40 UTC 2019 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Update bpftrace import to 0.0.0 (again).
|
||||
- Remove patch for bcc-devel now that there is an upstream fix for it
|
||||
(https://github.com/iovisor/bpftrace/pull/327). boo#1117223
|
||||
- 0001-cmake-fix-builds-within-OBS.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 25 01:11:33 UTC 2018 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Switch to using bcc-devel from Base:System. This required a few backports
|
||||
from upstream and some other various changes. boo#1117223
|
||||
https://github.com/iovisor/bpftrace/pull/227
|
||||
* 0001-cmake-fix-builds-within-OBS.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 30 18:51:01 UTC 2018 - Aleksa Sarai <asarai@suse.com>
|
||||
|
||||
- Initial bpftrace 0.0.0 import. Upstream doesn't really have versioning, so
|
||||
now we just use _service and pull from master. BCC required a bit of
|
||||
vendoring work, though hopefully we can switch to using bcc-tool-devel.
|
||||
boo#1117223
|
135
bpftrace.spec
Normal file
135
bpftrace.spec
Normal file
@ -0,0 +1,135 @@
|
||||
#
|
||||
# spec file for package bpftrace
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
# Use default LLVM on openSUSE unless it is not yet supported
|
||||
%if 0%{?suse_version} >= 1600 || 0%{?is_opensuse}
|
||||
%if 0%{?product_libs_llvm_ver} > 17
|
||||
%define llvm_major_version 17
|
||||
%else
|
||||
%define llvm_major_version %{nil}
|
||||
%endif
|
||||
%else
|
||||
# Hard-code latest LLVM for SLES, the default version is too old
|
||||
%if 0%{?sle_version} == 150600
|
||||
%define llvm_major_version 17
|
||||
%else
|
||||
%if 0%{?sle_version} == 150500
|
||||
%define llvm_major_version 15
|
||||
%else
|
||||
%if 0%{?sle_version} == 150400
|
||||
%define llvm_major_version 11
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
%endif
|
||||
|
||||
Name: bpftrace
|
||||
Version: 0.20.4
|
||||
Release: 0
|
||||
Summary: High-level tracing language for Linux eBPF
|
||||
License: Apache-2.0
|
||||
Group: Development/Tools/Debuggers
|
||||
URL: https://github.com/iovisor/bpftrace
|
||||
Source: https://github.com/iovisor/bpftrace/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
|
||||
BuildRequires: binutils
|
||||
BuildRequires: binutils-devel
|
||||
BuildRequires: bison
|
||||
BuildRequires: clang%{llvm_major_version}
|
||||
BuildRequires: clang%{llvm_major_version}-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: flex
|
||||
BuildRequires: libbpf-devel
|
||||
BuildRequires: libdw-devel
|
||||
BuildRequires: libxml2-devel
|
||||
BuildRequires: llvm%{llvm_major_version}-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: readline-devel
|
||||
BuildRequires: cmake(cereal)
|
||||
BuildRequires: pkgconfig(libbcc) >= 0.11
|
||||
BuildRequires: pkgconfig(libelf)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
BuildRequires: rubygem(asciidoctor)
|
||||
ExcludeArch: %arm %ix86
|
||||
|
||||
%description
|
||||
High-level tracing language for Linux, allowing for instrumentation of
|
||||
in-kernel and userspace state. It makes use of only upstream features such as
|
||||
eBPF tracing (which builds on kprobes, uprobes, and a variety of other kernel
|
||||
technologies). BPFtrace's language is inspired by awk and C, as well as other
|
||||
tracers such as DTrace and SystemTap.
|
||||
|
||||
%package tools
|
||||
Summary: Example bpftrace scripts and other useful snippets
|
||||
Group: Development/Tools/Debuggers
|
||||
Requires: %{name} = %{version}
|
||||
BuildArch: noarch
|
||||
|
||||
%description tools
|
||||
Collection of tools for quick instrumentation and inspection of a running
|
||||
system. These are all BPFtrace scripts within %{_datadir}/bpftrace, and can be
|
||||
easily modified to allow for different types of debugging.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%autopatch -p1
|
||||
|
||||
# Correct the #!-line to avoid rpmlint warnings.
|
||||
find tools -name '*.bt' -type f \
|
||||
-exec sed -i '1s|^#!%{_bindir}/env bpftrace|#!%{_bindir}/bpftrace|' '{}' ';'
|
||||
|
||||
%build
|
||||
# We need to build with clang, enable LTO via CMake instead.
|
||||
%define _lto_cflags %{nil}
|
||||
export CC="clang"
|
||||
export CXX="clang++"
|
||||
%cmake \
|
||||
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL=TRUE \
|
||||
-DLLVM_REQUESTED_VERSION="${LLVM_VERSION}" \
|
||||
-DLIBBFD_LIBRARIES="${LIBBFD}" \
|
||||
-DLIBOPCODES_LIBRARIES="${LIBOPCODES}" \
|
||||
-DUSE_SYSTEM_BPF_BCC:BOOL=ON \
|
||||
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
||||
-DBUILD_STATIC_LIBS:BOOL=ON \
|
||||
-DBUILD_TESTING:BOOL=OFF
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
%cmake_install
|
||||
# Set executable bit for tools.
|
||||
chmod +x %{buildroot}%{_datadir}/bpftrace/tools/*.bt
|
||||
chmod +x %{buildroot}%{_datadir}/bpftrace/tools/old/*.bt
|
||||
|
||||
%files
|
||||
%{_bindir}/bpftrace
|
||||
%{_bindir}/bpftrace-aotrt
|
||||
%{_mandir}/man8/bpftrace.8%{?ext_man}
|
||||
%doc README.md docs/
|
||||
%license LICENSE
|
||||
|
||||
%files tools
|
||||
%dir %{_datadir}/bpftrace/
|
||||
%dir %{_datadir}/bpftrace/tools
|
||||
%{_datadir}/bpftrace/tools/*.bt
|
||||
%dir %{_datadir}/bpftrace/tools/old
|
||||
%{_datadir}/bpftrace/tools/old/*.bt
|
||||
%dir %{_datadir}/bpftrace/tools/doc
|
||||
%{_datadir}/bpftrace/tools/doc/*_example.txt
|
||||
%{_mandir}/man8/*.8%{?ext_man}
|
||||
%exclude %{_mandir}/man8/bpftrace.8%{ext_man}
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user