unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Olivier Dion via Guix-patches via <guix-patches@gnu.org>
To: 52043@debbugs.gnu.org
Cc: Olivier Dion <olivier.dion@polymtl.ca>
Subject: [bug#52043] [PATCH 2/2] gnu: Move instrumentation tools to instrumentation module.
Date: Mon, 22 Nov 2021 14:16:05 -0500	[thread overview]
Message-ID: <36f687de44920f795476e5ae5af564afc30a425e.1637608343.git.olivier.dion@polymtl.ca> (raw)
In-Reply-To: <60c77ab6e2f5f098b1ecdc9c50c602072dbc2f68.1637608343.git.olivier.dion@polymtl.ca>

* gnu/packages/linux.scm (lttng-ust, lttng-tools, babeltrace): Move to ...
* gnu/packages/instrumentation.scm: ... here.
---
 gnu/packages/instrumentation.scm | 162 +++++++++++++++++++++++++++++++
 gnu/packages/linux.scm           | 147 ----------------------------
 2 files changed, 162 insertions(+), 147 deletions(-)

diff --git a/gnu/packages/instrumentation.scm b/gnu/packages/instrumentation.scm
index cacd74ac0a..b876551673 100644
--- a/gnu/packages/instrumentation.scm
+++ b/gnu/packages/instrumentation.scm
@@ -17,15 +17,86 @@
 ;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 (define-module (gnu packages instrumentation)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
+  #:use-module (gnu packages datastructures)
+  #:use-module (gnu packages documentation)
   #:use-module (gnu packages elf)
+  #:use-module (gnu packages flex)
+  #:use-module (gnu packages glib)
+  #:use-module (gnu packages linux)
   #:use-module (gnu packages llvm)
+  #:use-module (gnu packages man)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages popt)
+  #:use-module (gnu packages python)
+  #:use-module (gnu packages sphinx)
+  #:use-module (gnu packages swig)
   #:use-module (gnu packages tbb)
+  #:use-module (gnu packages xml)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system cmake)
+  #:use-module (guix build-system gnu)
   #:use-module ((guix licenses) #:prefix license:))
 
+(define-public babeltrace
+  (package
+    (name "babeltrace")
+    (version "2.0.4")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://www.efficios.com/files/babeltrace/babeltrace2-"
+                                  version ".tar.bz2"))
+              (sha256
+               (base32 "1jlv925pr7hykc48mdvbmqm4ipy1r11xwzapa6fdpdfshmk12kvp"))))
+
+    (build-system gnu-build-system)
+
+    (arguments
+     `(;; FIXME - When Python's bindings are enabled, tests do not pass.
+       #:configure-flags '("--enable-debug-info"
+                           "--enable-man-pages"
+                           "--disable-python-bindings"
+                           "--disable-python-plugins")
+                         #:phases
+                         (modify-phases %standard-phases
+                           ;; These are recommended in the project's README for a development
+                           ;; build configuration.
+                           (add-before 'configure 'set-environment-variables
+                             (lambda _
+                               (setenv "BABELTRACE_DEV_MODE" "1")
+                               (setenv "BABELTRACE_MINIMAL_LOG_LEVEL" "TRACE"))))))
+    (inputs
+     `(("glib" ,glib)))
+    ;; NOTE - elfutils is used for the LTTng debug information filter
+    ;; component class.  This can be moved to `native-inputs` if
+    ;; `--enable-debug-info` is replaced by `--disable-debug-info` in
+    ;; `#:configure-flags`.
+    (propagated-inputs
+     `(("elfutils" ,elfutils)))
+    ;; NOTE - python-3 is set here for generating the bindings.  Users need to
+    ;; install python-3 in their profile in order to use these bindings.
+    (native-inputs
+     `(("asciidoc" ,asciidoc)
+       ("bison" ,bison)
+       ("flex" ,flex)
+       ("pkg-config" ,pkg-config)
+       ("python-3" ,python-3)
+       ("python-sphinx" ,python-sphinx)
+       ("swig", swig)
+       ("xmltoman" ,xmltoman)))
+    (home-page "https://babeltrace.org/")
+    (synopsis "Trace manipulation toolkit")
+    (description "Babeltrace 2 is a framework for viewing, converting,
+transforming, and analyzing traces.  It is also the reference parser
+implementation of the Common Trace Format (CTF), produced by tools such as
+LTTng and barectf.  This package provides a library with a C API, Python 3
+bindings, and the command-line tool @command{babeltrace2}.")
+    (license license:expat)))
+
 (define-public dyninst
   (package
     (name "dyninst")
@@ -54,3 +125,94 @@ (define-public dyninst
     (synopsis "Dynamic instrumentation")
     (description "Tools for binary instrumentation, analysis, and modification.")
     (license license:lgpl2.0)))
+
+(define-public lttng-ust
+  (package
+    (name "lttng-ust")
+    (version "2.13.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://lttng.org/files/lttng-ust/"
+                                  "lttng-ust-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "0l0p6y2zrd9hgd015dhafjmpcj7waz762n6wf5ws1xlwcwrwkr2l"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("liburcu" ,liburcu)
+       ("numactl" ,numactl)))
+    (native-inputs
+     `(("python" ,python-3)
+       ("pkg-config", pkg-config)))
+    (home-page "https://lttng.org/")
+    (synopsis "LTTng userspace tracer libraries")
+    (description "The user space tracing library, liblttng-ust, is the LTTng
+user space tracer.  It receives commands from a session daemon, for example to
+enable and disable specific instrumentation points, and writes event records
+to ring buffers shared with a consumer daemon.")
+    (license license:lgpl2.1+)))
+
+(define-public lttng-tools
+  (package
+    (name "lttng-tools")
+    (version "2.13.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://lttng.org/files/lttng-tools/"
+                                  "lttng-tools-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1df8ag2a1yyjn6hz6wxgcz0p847cq91b8inf0zyhgz1im1yxzrng"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(;; FIXME - Currently there's a segmentation fault by swig when enabling
+       ;; Python's bindings.  Thus, bindings are disable here.  Replace
+       ;; `disable` by `enable` in #:configure-flags when this is fixed.
+       #:configure-flags '("--disable-python-bindings")
+                         ;; FIXME - Tests are disabled for now because one test hangs
+                         ;; indefinetely.  Also, parallel testing is not possible because of how
+                         ;; the lttng-daemon handles sessions.  Thus, keep parallel testing
+                         ;; disabled even after tests are enabled!
+                         #:tests? #f
+                         #:parallel-tests? #f
+                         #:phases
+                         (modify-phases %standard-phases
+                           (add-before 'configure 'set-environment-variables
+                             (lambda _
+                               (setenv "HOME" "/tmp")
+                               (setenv "LTTNG_HOME" "/tmp")))
+                           ;; We don't put (which "man") here because LTTng uses execlp.
+                           (add-after 'unpack 'patch-default-man-path
+                             (lambda _
+                               (substitute* "src/common/defaults.h"
+                                 (("/usr/bin/man") "man")))))))
+    ;; NOTE - Users have to install python-3 in their profile to use the
+    ;; bindings.  We don't put it in the inputs, because the rest of the tools
+    ;; can work without it.
+    (inputs
+     `(("liburcu" ,liburcu)
+       ("popt" ,popt)
+       ("numactl" ,numactl)))
+    (propagated-inputs
+     `(("kmod" ,kmod)
+       ("module-init-tools" ,module-init-tools)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("perl" ,perl)
+       ("libpfm4" ,libpfm4)
+       ("python-3" ,python-3)
+       ("swig" ,swig)
+       ("procps" ,procps)
+       ("which" ,which)
+       ("flex" ,flex)
+       ("bison" ,bison)
+       ("asciidoc" ,asciidoc)
+       ("libxml2" ,libxml2)
+       ("lttng-ust" ,lttng-ust)))
+    (home-page "https://lttng.org/")
+    (synopsis "LTTng userspace tracer libraries")
+    (description "The lttng-tools project provides a session
+daemon @code{lttng-sessiond} that acts as a tracing registry, the @command{lttng} command
+line for tracing control, a @code{lttng-ctl} library for tracing control and a
+@code{lttng-relayd} for network streaming.")
+    (license (list  license:gpl2 license:lgpl2.1))))
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index ece3c588e8..8456450e52 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -131,7 +131,6 @@ (define-module (gnu packages linux)
   #:use-module (gnu packages sdl)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages slang)
-  #:use-module (gnu packages sphinx)
   #:use-module (gnu packages sqlite)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages tls)
@@ -8110,152 +8109,6 @@ (define-public ell
 platforms, it is not limited to resource-constrained systems.")
     (license license:lgpl2.1+)))
 
-(define-public lttng-ust
-  (package
-    (name "lttng-ust")
-    (version "2.13.0")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://lttng.org/files/lttng-ust/"
-                                  "lttng-ust-" version ".tar.bz2"))
-              (sha256
-               (base32
-                "0l0p6y2zrd9hgd015dhafjmpcj7waz762n6wf5ws1xlwcwrwkr2l"))))
-    (build-system gnu-build-system)
-    (inputs
-     `(("liburcu" ,liburcu)
-       ("numactl" ,numactl)))
-    (native-inputs
-     `(("python" ,python-3)
-       ("pkg-config", pkg-config)))
-    (home-page "https://lttng.org/")
-    (synopsis "LTTng userspace tracer libraries")
-    (description "The user space tracing library, liblttng-ust, is the LTTng
-user space tracer.  It receives commands from a session daemon, for example to
-enable and disable specific instrumentation points, and writes event records
-to ring buffers shared with a consumer daemon.")
-    (license license:lgpl2.1+)))
-
-(define-public lttng-tools
-  (package
-    (name "lttng-tools")
-    (version "2.13.1")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://lttng.org/files/lttng-tools/"
-                                  "lttng-tools-" version ".tar.bz2"))
-              (sha256
-               (base32
-                "1df8ag2a1yyjn6hz6wxgcz0p847cq91b8inf0zyhgz1im1yxzrng"))))
-    (build-system gnu-build-system)
-    (arguments
-     `(;; FIXME - Currently there's a segmentation fault by swig when enabling
-       ;; Python's bindings.  Thus, bindings are disable here.  Replace
-       ;; `disable` by `enable` in #:configure-flags when this is fixed.
-       #:configure-flags '("--disable-python-bindings")
-       ;; FIXME - Tests are disabled for now because one test hangs
-       ;; indefinetely.  Also, parallel testing is not possible because of how
-       ;; the lttng-daemon handles sessions.  Thus, keep parallel testing
-       ;; disabled even after tests are enabled!
-       #:tests? #f
-       #:parallel-tests? #f
-       #:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'set-environment-variables
-           (lambda _
-             (setenv "HOME" "/tmp")
-             (setenv "LTTNG_HOME" "/tmp")))
-         ;; We don't put (which "man") here because LTTng uses execlp.
-         (add-after 'unpack 'patch-default-man-path
-           (lambda _
-             (substitute* "src/common/defaults.h"
-               (("/usr/bin/man") "man")))))))
-    ;; NOTE - Users have to install python-3 in their profile to use the
-    ;; bindings.  We don't put it in the inputs, because the rest of the tools
-    ;; can work without it.
-    (inputs
-     `(("liburcu" ,liburcu)
-       ("popt" ,popt)
-       ("numactl" ,numactl)))
-    (propagated-inputs
-     `(("kmod" ,kmod)
-       ("module-init-tools" ,module-init-tools)))
-    (native-inputs
-     `(("pkg-config" ,pkg-config)
-       ("perl" ,perl)
-       ("libpfm4" ,libpfm4)
-       ("python-3" ,python-3)
-       ("swig" ,swig)
-       ("procps" ,procps)
-       ("which" ,which)
-       ("flex" ,flex)
-       ("bison" ,bison)
-       ("asciidoc" ,asciidoc)
-       ("libxml2" ,libxml2)
-       ("lttng-ust" ,lttng-ust)))
-    (home-page "https://lttng.org/")
-    (synopsis "LTTng userspace tracer libraries")
-    (description "The lttng-tools project provides a session
-daemon @code{lttng-sessiond} that acts as a tracing registry, the @command{lttng} command
-line for tracing control, a @code{lttng-ctl} library for tracing control and a
-@code{lttng-relayd} for network streaming.")
-    (license (list  license:gpl2 license:lgpl2.1))))
-
-(define-public babeltrace
-  (package
-    (name "babeltrace")
-    (version "2.0.4")
-    (source (origin
-              (method url-fetch)
-              (uri (string-append "https://www.efficios.com/files/babeltrace/babeltrace2-"
-                                  version ".tar.bz2"))
-              (sha256
-               (base32 "1jlv925pr7hykc48mdvbmqm4ipy1r11xwzapa6fdpdfshmk12kvp"))))
-
-    (build-system gnu-build-system)
-
-    (arguments
-     `(;; FIXME - When Python's bindings are enabled, tests do not pass.
-       #:configure-flags '("--enable-debug-info"
-                           "--enable-man-pages"
-                           "--disable-python-bindings"
-                           "--disable-python-plugins")
-       #:phases
-       (modify-phases %standard-phases
-         ;; These are recommended in the project's README for a development
-         ;; build configuration.
-         (add-before 'configure 'set-environment-variables
-           (lambda _
-             (setenv "BABELTRACE_DEV_MODE" "1")
-             (setenv "BABELTRACE_MINIMAL_LOG_LEVEL" "TRACE"))))))
-    (inputs
-     `(("glib" ,glib)))
-    ;; NOTE - elfutils is used for the LTTng debug information filter
-    ;; component class.  This can be moved to `native-inputs` if
-    ;; `--enable-debug-info` is replaced by `--disable-debug-info` in
-    ;; `#:configure-flags`.
-    (propagated-inputs
-     `(("elfutils" ,elfutils)))
-    ;; NOTE - python-3 is set here for generating the bindings.  Users need to
-    ;; install python-3 in their profile in order to use these bindings.
-    (native-inputs
-     `(("asciidoc" ,asciidoc)
-       ("bison" ,bison)
-       ("flex" ,flex)
-       ("pkg-config" ,pkg-config)
-       ("python-3" ,python-3)
-       ("python-sphinx" ,python-sphinx)
-       ("swig", swig)
-       ("xmltoman" ,xmltoman)))
-    (home-page "https://babeltrace.org/")
-    (synopsis "Trace manipulation toolkit")
-    (description "Babeltrace 2 is a framework for viewing, converting,
-transforming, and analyzing traces.  It is also the reference parser
-implementation of the Common Trace Format (CTF), produced by tools such as
-LTTng and barectf.  This package provides a library with a C API, Python 3
-bindings, and the command-line tool @command{babeltrace2}.")
-    (license license:expat)))
-
 (define-public kexec-tools
   (package
     (name "kexec-tools")
-- 
2.34.0





  reply	other threads:[~2021-11-22 19:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-22 19:13 [bug#52043] [PATCH 1/2] gnu: Add instrumentation packages Olivier Dion via Guix-patches via
2021-11-22 19:16 ` Olivier Dion via Guix-patches via [this message]
2021-11-23  1:53 ` [bug#52043] [PATCH v2 " Olivier Dion via Guix-patches via
2021-12-10 14:32   ` [bug#52043] [PATCH " Ludovic Courtès
2021-12-12 19:59 ` [bug#52043] [PATCH v3 " Olivier Dion via Guix-patches via
2021-12-12 19:59   ` [bug#52043] [PATCH v3 2/2] gnu: Move instrumentation tools to instrumentation module Olivier Dion via Guix-patches via
2021-12-16 18:40 ` [bug#52043] [PATCH v4 0/2] Create instrumentation package Olivier Dion via Guix-patches via
2021-12-16 18:40   ` [bug#52043] [PATCH v4 1/2] gnu: Add instrumentation packages Olivier Dion via Guix-patches via
2021-12-18 18:47     ` [bug#52043] [PATCH " Ludovic Courtès
2021-12-16 18:40   ` [bug#52043] [PATCH v4 2/2] gnu: Move instrumentation tools to instrumentation module Olivier Dion via Guix-patches via
2021-12-18 18:47     ` bug#52043: [PATCH 1/2] gnu: Add instrumentation packages Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=36f687de44920f795476e5ae5af564afc30a425e.1637608343.git.olivier.dion@polymtl.ca \
    --to=guix-patches@gnu.org \
    --cc=52043@debbugs.gnu.org \
    --cc=olivier.dion@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).