aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-06-23 11:37:10 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-06-24 08:34:44 -0400
commit77d949c812a29577c12fe9b08c9bf5dddc6d0d2f (patch)
treedfec2a7e52f63e71760e4de4c1323d0304f4f81a /gnu/packages
parent08149c02bc3a0c55229d63a372e211d6e1d31a18 (diff)
downloadguix-77d949c812a29577c12fe9b08c9bf5dddc6d0d2f.tar.gz
guix-77d949c812a29577c12fe9b08c9bf5dddc6d0d2f.zip
gnu: bpftrace: Update to 0.21.0 and enable tests.
* gnu/packages/linux.scm (bpftrace): Update to 0.21.0. [source]: Update URL. Remove patch. [arguments] <tests?>: Remove argument. <test-target>: New argument. <configure-flags>: Enable BUILD_TESTING CMake option. Remove -DHAVE_BFD_DISASM=OFF. <phases>: New argument. [native-inputs]: Add dwarves, googletest and xxd. [inputs]: Replace clang-toolchain-9 with clang-15. Add libiberty. [home-page]: Update URL. * gnu/packages/patches/bpftrace-disable-bfd-disasm.patch: Delete file. * gnu/local.mk (dist_patch_DATA): De-register it. Change-Id: I927f881594ff78c43b1713a19ee28c158e040ef3 Change-Id: I36bb022f21873fff7ad81ec8e80b9569f3d45417
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/linux.scm40
-rw-r--r--gnu/packages/patches/bpftrace-disable-bfd-disasm.patch15
2 files changed, 24 insertions, 31 deletions
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index d259d6fddc..4c4bf2aa6b 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -190,6 +190,7 @@
#:use-module (gnu packages tls)
#:use-module (gnu packages valgrind)
#:use-module (gnu packages video)
+ #:use-module (gnu packages vim)
#:use-module (gnu packages vulkan)
#:use-module (gnu packages web)
#:use-module (gnu packages xiph)
@@ -10129,30 +10130,37 @@ modification of BPF objects on the system.")
(define-public bpftrace
(package
(name "bpftrace")
- (version "0.18.1")
+ (version "0.21.0")
(source
(origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/iovisor/bpftrace")
+ (url "https://github.com/bpftrace/bpftrace")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
- (base32 "0j8ba2j98d3j8lilgx3z2n162r26ryg7zw5ldwd9m36xnjp40347"))
- (patches (search-patches "bpftrace-disable-bfd-disasm.patch"))))
+ (base32 "06yg3w80kdq0i003w2gvn0czbh8z9d3rfgmglp37dkir7g3dc6iz"))))
(build-system cmake-build-system)
- (native-inputs
- (list bison flex))
- (inputs
- (list bcc clang-toolchain-9 elfutils libbpf cereal))
- (arguments
- `(#:tests? #f ;Tests require googletest sources.
- #:configure-flags
- '("-DBUILD_TESTING=OFF"
- ;; FIXME: libbfd misses some link dependencies, when fixed, remove
- ;; the associated patch.
- "-DHAVE_BFD_DISASM=OFF")))
- (home-page "https://github.com/iovisor/bpftrace")
+ (arguments (list #:configure-flags #~(list "-DBUILD_TESTING=ON")
+ ;; Only run the unit tests suite, as the other ones
+ ;; (runtime_tests, tools-parsing-test) require to run as
+ ;; 'root'.
+ #:test-target "bpftrace_test"
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'patch-paths
+ (lambda _
+ (with-directory-excursion "tests"
+ (substitute* (find-files ".")
+ (("/bin/sh")
+ (which "sh")))
+ (substitute* '("child.cpp"
+ "runtime/call"
+ "procmon.cpp")
+ (("/bin/ls")
+ (which "ls")))))))))
+ (native-inputs (list bison dwarves flex googletest xxd))
+ (inputs (list bcc clang-15 elfutils libbpf libiberty cereal))
+ (home-page "https://github.com/bpftrace/bpftrace")
(synopsis "High-level tracing language for Linux eBPF")
(description
"bpftrace is a high-level tracing language for Linux enhanced Berkeley
diff --git a/gnu/packages/patches/bpftrace-disable-bfd-disasm.patch b/gnu/packages/patches/bpftrace-disable-bfd-disasm.patch
deleted file mode 100644
index 8565d8d851..0000000000
--- a/gnu/packages/patches/bpftrace-disable-bfd-disasm.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e89a6a9..a594786 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -126,10 +126,6 @@ find_package(LibBpf)
- find_package(LibBfd)
- find_package(LibOpcodes)
-
--if(${LIBBFD_FOUND} AND ${LIBOPCODES_FOUND})
-- set(HAVE_BFD_DISASM TRUE)
--endif()
--
- include(CheckIncludeFile)
- check_include_file("sys/sdt.h" HAVE_SYSTEMTAP_SYS_SDT_H)
-