GNU bug report logs - #58045
[PATCH] gnu: Add libpatch.

Previous Next

Package: guix-patches;

Reported by: Olivier Dion <olivier.dion <at> polymtl.ca>

Date: Sat, 24 Sep 2022 16:39:02 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 58045 in the body.
You can then email your comments to 58045 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#58045; Package guix-patches. (Sat, 24 Sep 2022 16:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Olivier Dion <olivier.dion <at> polymtl.ca>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 24 Sep 2022 16:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Olivier Dion <olivier.dion <at> polymtl.ca>
To: guix-patches <at> gnu.org
Cc: Olivier Dion <olivier.dion <at> polymtl.ca>, othacehe <at> gnu.org
Subject: [PATCH] gnu: Add libpatch.
Date: Sat, 24 Sep 2022 12:38:15 -0400
* gnu/packages/instrumentation.scm (libpatch): New variable.
---
 gnu/packages/instrumentation.scm | 64 ++++++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
index c508801c6b..b611f2b141 100644
--- a/gnu/packages/instrumentation.scm
+++ b/gnu/packages/instrumentation.scm
@@ -22,6 +22,7 @@ (define-module (gnu packages instrumentation)
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages commencement)
+  #:use-module (gnu packages compression)
   #:use-module (gnu packages datastructures)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages elf)
@@ -30,6 +31,7 @@ (define-module (gnu packages instrumentation)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages gawk)
   #:use-module (gnu packages glib)
+  #:use-module (gnu packages guile)
   #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages libunwind)
   #:use-module (gnu packages linux)
@@ -207,6 +209,68 @@ (define-public flamegraph
 with the script @command{flamegraph.pl} and many stackcollapse scripts.")
       (license license:cddl1.0))))
 
+(define-public libpatch
+  (package
+    (name "libpatch")
+    (version "1.0.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://git.sr.ht/~old/libpatch")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1sx1sichnnqfi84z37gd04h41vpr8i2vg6yg0jkqxlrv3dys489a"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list
+        (string-append
+         "--target="
+         ,(platform-linux-architecture
+           (lookup-platform-by-target-or-system
+            (or
+             (%current-target-system)
+             (%current-system))))))))
+    (inputs
+     (list capstone
+           elfutils
+           ;; Uncomment the following if you want tracepoints within libpatch
+           ;; for debugging.
+           ;;
+           ;; lttng-ust
+           libunwind
+           liburcu))
+    (native-inputs
+     (list coreutils
+           ;; test-ftrace.scm
+           (list coreutils "debug")
+           ;; For eu-nm in test-ftrace.scm.
+           (list elfutils "bin")
+           ;; Put Guile in your profile if you want to use the bindings.
+           guile-3.0
+           ;; test-ftrace.scm
+           (list guile-3.0 "debug")
+           gnu-make
+           ;; test-ftrace.scm
+           (list gnu-make "debug")
+           pkg-config
+           ;; zlib is required by libdw.  This can be removed if zlib is put
+           ;; as a propagated-input of elfutils.
+           zlib))
+    (synopsis "Dynamic binary patcher")
+    (description
+     "libpatch is a lightweight C library that can be used by tracers,
+debuggers and other tools for insertion of probes in a program at runtime.  It
+has many strategies to minimize probe overhead and maximize possible
+coverage.")
+    (home-page "https://git.sr.ht/~old/libpatch")
+    (license (list license:lgpl2.1 license:expat license:gpl3+))
+    ;; Libpatch only supports instrumentation for x86_64 right now.  Augment
+    ;; that list in further version.
+    (supported-systems (list "x86_64-linux"))))
+
 (define-public lttng-modules
   (package
     (name "lttng-modules")
-- 
2.37.3





Reply sent to Mathieu Othacehe <othacehe <at> gnu.org>:
You have taken responsibility. (Mon, 26 Sep 2022 13:34:03 GMT) Full text and rfc822 format available.

Notification sent to Olivier Dion <olivier.dion <at> polymtl.ca>:
bug acknowledged by developer. (Mon, 26 Sep 2022 13:34:03 GMT) Full text and rfc822 format available.

Message #10 received at 58045-done <at> debbugs.gnu.org (full text, mbox):

From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Olivier Dion <olivier.dion <at> polymtl.ca>
Cc: 58045-done <at> debbugs.gnu.org
Subject: Re: bug#58045: [PATCH] gnu: Add libpatch.
Date: Mon, 26 Sep 2022 15:33:46 +0200
> * gnu/packages/instrumentation.scm (libpatch): New variable.

Applied with the following diff:

--8<---------------cut here---------------start------------->8---
diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
index b611f2b141..3d6b6fab38 100644
--- a/gnu/packages/instrumentation.scm
+++ b/gnu/packages/instrumentation.scm
@@ -233,28 +233,25 @@ (define-public libpatch
             (or
              (%current-target-system)
              (%current-system))))))))
+    ;;; Add lttng-ust to the inputs if you want tracepoints within libpatch
+    ;;; for debugging.
     (inputs
      (list capstone
            elfutils
-           ;; Uncomment the following if you want tracepoints within libpatch
-           ;; for debugging.
-           ;;
-           ;; lttng-ust
            libunwind
            liburcu))
     (native-inputs
      (list coreutils
            ;; test-ftrace.scm
            (list coreutils "debug")
+           (list guile-3.0 "debug")
+           (list gnu-make "debug")
+
            ;; For eu-nm in test-ftrace.scm.
            (list elfutils "bin")
-           ;; Put Guile in your profile if you want to use the bindings.
+
            guile-3.0
-           ;; test-ftrace.scm
-           (list guile-3.0 "debug")
            gnu-make
-           ;; test-ftrace.scm
-           (list gnu-make "debug")
            pkg-config
            ;; zlib is required by libdw.  This can be removed if zlib is put
            ;; as a propagated-input of elfutils.
--8<---------------cut here---------------end--------------->8---

Thanks,

Mathieu




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 25 Oct 2022 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 154 days ago.

Previous Next


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