GNU bug report logs - #48889
[PATCH 1/4] New package: bird bgp daemon, versions 1 and 2

Previous Next

Package: guix-patches;

Reported by: Ryan Sundberg <ryan <at> arctype.co>

Date: Sun, 6 Jun 2021 21:58:05 UTC

Severity: normal

Tags: patch

Full log


View this message in rfc822 format

From: Ryan Sundberg <ryan <at> arctype.co>
To: 48889 <at> debbugs.gnu.org
Cc: Ryan Sundberg <ryan <at> arctype.co>
Subject: [bug#48889] [PATCH 4/4] bpftool: new package
Date: Sun,  6 Jun 2021 11:52:04 -0700
Adds the bpftool package from the Linux kernel source tree.
---
 gnu/packages/linux.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index c8ec310665..06bb344475 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -54,6 +54,7 @@
 ;;; Copyright © 2020 David Dashyan <mail <at> davie.li>
 ;;; Copyright © 2020 pukkamustard <pukkamustard <at> posteo.net>
 ;;; Copyright © 2021 B. Wilson <elaexuotee <at> wilsonb.com>
+;;; Copyright © 2021 Ryan Sundberg <ryan <at> arctype.co>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -8108,3 +8109,42 @@ Availability and Serviceability} reports from Linux kernel trace events.
 These trace events are logged in @file{/sys/kernel/debug/tracing} and reported
 through standard log mechanisms like syslog.")
     (license license:gpl2)))
+
+(define-public bpftool
+  (package
+    (name "bpftool")
+    (version (package-version linux-libre))
+    (source (package-source linux-libre))
+    (build-system gnu-build-system)
+    (arguments
+      `(#:tests? #f
+        #:phases 
+        (modify-phases %standard-phases
+          (add-before 'configure 'chdir 
+            (lambda _ (chdir "tools/bpf") #t))
+          (delete 'configure)
+          (replace 'build 
+            (lambda _ (invoke "make" "CC=gcc" "bpftool") #t))
+          (replace 'install 
+            (lambda* (#:key outputs #:allow-other-keys)
+              (let* ((out (assoc-ref outputs "out"))) 
+                (mkdir-p (string-append out "/sbin"))
+                (mkdir-p (string-append out "/share/bash-completion/completions"))
+                (invoke "make" 
+                        (string-append "prefix=" out)
+                        (string-append "bash_compdir=" out "/share/bash-completion/completions")
+                        "-C" "bpftool"
+                        "install")
+                #t))))))
+    (inputs
+      `(("bison" ,bison)
+        ("python" ,python-3)
+        ("readline" ,readline)))
+    (propagated-inputs
+      `(("libcap" ,libcap)
+        ("libelf" ,libelf)
+        ("zlib" ,zlib)))
+    (home-page (package-home-page linux-libre))
+    (synopsis "bpftool is a tool for inspection and simple manipulation of eBPF programs and maps")
+    (description "*bpftool* allows for inspection and simple modification of BPF objects on the system.  Note that format of the output of all tools is not guaranteed to be stable and should not be depended upon.")
+    (license (package-license linux-libre))))
-- 
2.31.1





This bug report was last modified 3 years and 360 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.