* [bug#50756] [PATCH] gnu: Add lttng-tools.
@ 2021-09-23 12:40 Olivier Dion via Guix-patches via
2021-09-24 14:24 ` Xinglu Chen
0 siblings, 1 reply; 8+ messages in thread
From: Olivier Dion via Guix-patches via @ 2021-09-23 12:40 UTC (permalink / raw)
To: 50756; +Cc: Olivier Dion
* gnu/packages/linux.scm (lttng-tools): New variable.
Note that tests are not yet working.
Signed-off-by: Olivier Dion <olivier.dion@polymtl.ca>
---
gnu/packages/linux.scm | 54 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 9bb90e599e..a8cb4fd05a 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -53,6 +53,7 @@
;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
;;; Copyright © 2021 B. Wilson <elaexuotee@wilsonb.com>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
+;;; Copyright © 2021 Olivier Dion <olivier.dion@polymtl.ca>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -8051,6 +8052,59 @@ 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.12.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://lttng.org/files/lttng-tools/"
+ "lttng-tools-" version ".tar.bz2"))
+ (sha256
+ (base32 "0bgk35423v6z17j1w80m7dcza7gigs1pwyq24sdmgqwg6j2d1zmc"))))
+
+ (build-system gnu-build-system)
+
+ (arguments
+ `(#:tests? #f
+ #:parallel-tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'set-environment-variables
+ (lambda _
+ (setenv "HOME" "/tmp")
+ (setenv "LTTNG_HOME" "/tmp"))))))
+
+ (inputs
+ `(("liburcu" ,liburcu)
+ ("popt" ,popt)
+ ("numactl" ,numactl)))
+
+ (propagated-inputs
+ `(("libkmod" ,kmod)
+ ("modprobe" ,module-init-tools)))
+
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("perl" ,perl)
+ ("libpfm4" ,libpfm4)
+ ("python" ,python-3)
+ ("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 (lttng-sessiond) that acts as a tracing registry, the \"lttng\" command
+line for tracing control, a lttng-ctl library for tracing control and a
+lttng-relayd for network streaming.")
+ (license license:gpl2)))
+
(define-public kexec-tools
(package
(name "kexec-tools")
--
2.33.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [bug#50756] [PATCH] gnu: Add lttng-tools.
2021-09-23 12:40 [bug#50756] [PATCH] gnu: Add lttng-tools Olivier Dion via Guix-patches via
@ 2021-09-24 14:24 ` Xinglu Chen
2021-09-24 15:13 ` Olivier Dion via Guix-patches via
0 siblings, 1 reply; 8+ messages in thread
From: Xinglu Chen @ 2021-09-24 14:24 UTC (permalink / raw)
To: 50756; +Cc: Olivier Dion
[-- Attachment #1: Type: text/plain, Size: 3904 bytes --]
On Thu, Sep 23 2021, Olivier Dion via Guix-patches via wrote:
> * gnu/packages/linux.scm (lttng-tools): New variable.
>
> Note that tests are not yet working.
What is the reason for that? There should be a comment explaining why.
> Signed-off-by: Olivier Dion <olivier.dion@polymtl.ca>
There is no need to “sign-off” your own commit; this is only done by
committers who push a patch on behalf of someone else.
> ---
> gnu/packages/linux.scm | 54 ++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 54 insertions(+)
>
> diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
> index 9bb90e599e..a8cb4fd05a 100644
> --- a/gnu/packages/linux.scm
> +++ b/gnu/packages/linux.scm
> @@ -53,6 +53,7 @@
> ;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
> ;;; Copyright © 2021 B. Wilson <elaexuotee@wilsonb.com>
> ;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
> +;;; Copyright © 2021 Olivier Dion <olivier.dion@polymtl.ca>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -8051,6 +8052,59 @@ 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.12.5")
Version 2.13 is available; any reason for not using it?
> + (source (origin
> + (method url-fetch)
> + (uri (string-append "https://lttng.org/files/lttng-tools/"
> + "lttng-tools-" version ".tar.bz2"))
> + (sha256
> + (base32 "0bgk35423v6z17j1w80m7dcza7gigs1pwyq24sdmgqwg6j2d1zmc"))))
Keep lines <=80 characters long.
> +
> + (build-system gnu-build-system)
These newlines aren’t necessary.
> + (arguments
> + `(#:tests? #f
> + #:parallel-tests? #f
There is no need to set #:parallel-tests? if #:tests? is set to #f.
> + #:phases
> + (modify-phases %standard-phases
> + (add-before 'configure 'set-environment-variables
> + (lambda _
> + (setenv "HOME" "/tmp")
> + (setenv "LTTNG_HOME" "/tmp"))))))
> +
> + (inputs
> + `(("liburcu" ,liburcu)
> + ("popt" ,popt)
> + ("numactl" ,numactl)))
> +
> + (propagated-inputs
> + `(("libkmod" ,kmod)
> + ("modprobe" ,module-init-tools)))
Any reason for the labels not being the same as the package?
> + (native-inputs
> + `(("pkg-config" ,pkg-config)
> + ("perl" ,perl)
> + ("libpfm4" ,libpfm4)
> + ("python" ,python-3)
While running the configure script, I get
configure: You may configure with --enable-python-bindings if you want Python bindings.
So you would have to pass the ‘--enable-python-bindings’ flag, and
Python would be needed during runtime as well.
> + ("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 (lttng-sessiond) that acts as a tracing registry, the \"lttng\" command
the @command{lttng} command
> +line for tracing control, a lttng-ctl library for tracing control and a
> +lttng-relayd for network streaming.")
I would use @code{lttng-ctl} and @code{lttng-relayd}.
> + (license license:gpl2)))
The bottom of the homepage says
…LTTng-tools is licensed under LGPLv2.1 and GPLv2…
so it would be (list license:gpl2 license:lgpl2.1)
Could you send an updated patch?
[1]: <https://lttng.org/docs/v2.13/#doc-building-from-source>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#50756] [PATCH] gnu: Add lttng-tools.
2021-09-24 14:24 ` Xinglu Chen
@ 2021-09-24 15:13 ` Olivier Dion via Guix-patches via
2021-09-26 9:42 ` Xinglu Chen
0 siblings, 1 reply; 8+ messages in thread
From: Olivier Dion via Guix-patches via @ 2021-09-24 15:13 UTC (permalink / raw)
To: public, 50756
On Fri, 24 Sep 2021, Xinglu Chen <public@yoctocell.xyz> wrote:
> On Thu, Sep 23 2021, Olivier Dion via Guix-patches via wrote:
>> +(define-public lttng-tools
>> + (package
>> + (name "lttng-tools")
>> + (version "2.12.5")
>
> Version 2.13 is available; any reason for not using it?
Would require to bump version of lttng-ust also I think. I prefer to do all of this
in another patch.
>> + (arguments
>> + `(#:tests? #f
>> + #:parallel-tests? #f
>
> There is no need to set #:parallel-tests? if #:tests? is set to #f.
During my testing, I noticed that test in parallel are not working
because of how the lttng-daemon works. So I disable the parallel option
in order to not forget it when testing will work in the future. I
should probably add a comment to explain the rationale here.
>> + (propagated-inputs
>> + `(("libkmod" ,kmod)
>> + ("modprobe" ,module-init-tools)))
>
> Any reason for the labels not being the same as the package?
I follow the naming convention in the description of the project's README
so it's easier to map the dependencies described by it to Guix's
packages. I can change this, but I find it more clear that way.
>
>> + (native-inputs
>> + `(("pkg-config" ,pkg-config)
>> + ("perl" ,perl)
>> + ("libpfm4" ,libpfm4)
>> + ("python" ,python-3)
>
> While running the configure script, I get
>
> configure: You may configure with --enable-python-bindings if you want Python bindings.
>
> So you would have to pass the ‘--enable-python-bindings’ flag, and
> Python would be needed during runtime as well.
Does it tho? Bindings can be generated at build time. While you would
require python-3 at runtime to use the bindings, you don't require
python-3 to use the other tools of the project. I don't mind adding it
to the inputs, I'm just asking.
> Could you send an updated patch?
Will do soon!
--
Olivier Dion
Polymtl
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#50756] [PATCH] gnu: Add lttng-tools.
2021-09-24 15:13 ` Olivier Dion via Guix-patches via
@ 2021-09-26 9:42 ` Xinglu Chen
2021-10-13 8:52 ` Ludovic Courtès
0 siblings, 1 reply; 8+ messages in thread
From: Xinglu Chen @ 2021-09-26 9:42 UTC (permalink / raw)
To: Olivier Dion, 50756
[-- Attachment #1: Type: text/plain, Size: 2258 bytes --]
On Fri, Sep 24 2021, Olivier Dion via Guix-patches via wrote:
> On Fri, 24 Sep 2021, Xinglu Chen <public@yoctocell.xyz> wrote:
>> On Thu, Sep 23 2021, Olivier Dion via Guix-patches via wrote:
>
>>> +(define-public lttng-tools
>>> + (package
>>> + (name "lttng-tools")
>>> + (version "2.12.5")
>>
>> Version 2.13 is available; any reason for not using it?
>
> Would require to bump version of lttng-ust also I think. I prefer to do all of this
> in another patch.
Ah, OK.
>>> + (arguments
>>> + `(#:tests? #f
>>> + #:parallel-tests? #f
>>
>> There is no need to set #:parallel-tests? if #:tests? is set to #f.
>
> During my testing, I noticed that test in parallel are not working
> because of how the lttng-daemon works. So I disable the parallel option
> in order to not forget it when testing will work in the future. I
> should probably add a comment to explain the rationale here.
>
>>> + (propagated-inputs
>>> + `(("libkmod" ,kmod)
>>> + ("modprobe" ,module-init-tools)))
>>
>> Any reason for the labels not being the same as the package?
>
> I follow the naming convention in the description of the project's README
> so it's easier to map the dependencies described by it to Guix's
> packages. I can change this, but I find it more clear that way.
The name of the label is usually the same as the package, so I would
change them to “kmod” and “module-init-tools” respectively.
>>
>>> + (native-inputs
>>> + `(("pkg-config" ,pkg-config)
>>> + ("perl" ,perl)
>>> + ("libpfm4" ,libpfm4)
>>> + ("python" ,python-3)
>>
>> While running the configure script, I get
>>
>> configure: You may configure with --enable-python-bindings if you want Python bindings.
>>
>> So you would have to pass the ‘--enable-python-bindings’ flag, and
>> Python would be needed during runtime as well.
>
> Does it tho? Bindings can be generated at build time. While you would
> require python-3 at runtime to use the bindings, you don't require
> python-3 to use the other tools of the project. I don't mind adding it
> to the inputs, I'm just asking.
True, the user can install always install Python in their profile
themselves.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#50756] [PATCH] gnu: Add lttng-tools.
2021-09-26 9:42 ` Xinglu Chen
@ 2021-10-13 8:52 ` Ludovic Courtès
2021-10-13 14:41 ` Olivier Dion via Guix-patches via
0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2021-10-13 8:52 UTC (permalink / raw)
To: Xinglu Chen; +Cc: Olivier Dion, 50756
Hi Olivier,
Did you have a chance to look into this?
https://issues.guix.gnu.org/50756
TIA!
Ludo’.
Xinglu Chen <public@yoctocell.xyz> skribis:
> On Fri, Sep 24 2021, Olivier Dion via Guix-patches via wrote:
>
>> On Fri, 24 Sep 2021, Xinglu Chen <public@yoctocell.xyz> wrote:
>>> On Thu, Sep 23 2021, Olivier Dion via Guix-patches via wrote:
>>
>>>> +(define-public lttng-tools
>>>> + (package
>>>> + (name "lttng-tools")
>>>> + (version "2.12.5")
>>>
>>> Version 2.13 is available; any reason for not using it?
>>
>> Would require to bump version of lttng-ust also I think. I prefer to do all of this
>> in another patch.
>
> Ah, OK.
>
>>>> + (arguments
>>>> + `(#:tests? #f
>>>> + #:parallel-tests? #f
>>>
>>> There is no need to set #:parallel-tests? if #:tests? is set to #f.
>>
>> During my testing, I noticed that test in parallel are not working
>> because of how the lttng-daemon works. So I disable the parallel option
>> in order to not forget it when testing will work in the future. I
>> should probably add a comment to explain the rationale here.
>>
>>>> + (propagated-inputs
>>>> + `(("libkmod" ,kmod)
>>>> + ("modprobe" ,module-init-tools)))
>>>
>>> Any reason for the labels not being the same as the package?
>>
>> I follow the naming convention in the description of the project's README
>> so it's easier to map the dependencies described by it to Guix's
>> packages. I can change this, but I find it more clear that way.
>
> The name of the label is usually the same as the package, so I would
> change them to “kmod” and “module-init-tools” respectively.
>
>>>
>>>> + (native-inputs
>>>> + `(("pkg-config" ,pkg-config)
>>>> + ("perl" ,perl)
>>>> + ("libpfm4" ,libpfm4)
>>>> + ("python" ,python-3)
>>>
>>> While running the configure script, I get
>>>
>>> configure: You may configure with --enable-python-bindings if you want Python bindings.
>>>
>>> So you would have to pass the ‘--enable-python-bindings’ flag, and
>>> Python would be needed during runtime as well.
>>
>> Does it tho? Bindings can be generated at build time. While you would
>> require python-3 at runtime to use the bindings, you don't require
>> python-3 to use the other tools of the project. I don't mind adding it
>> to the inputs, I'm just asking.
>
> True, the user can install always install Python in their profile
> themselves.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#50756] [PATCH] gnu: Add lttng-tools.
2021-10-13 8:52 ` Ludovic Courtès
@ 2021-10-13 14:41 ` Olivier Dion via Guix-patches via
2021-10-17 15:06 ` [bug#50756] [PATCH v2] " Olivier Dion via Guix-patches via
0 siblings, 1 reply; 8+ messages in thread
From: Olivier Dion via Guix-patches via @ 2021-10-13 14:41 UTC (permalink / raw)
To: Ludovic Courtès, Xinglu Chen; +Cc: 50756
On Wed, 13 Oct 2021, Ludovic Courtès <ludo@gnu.org> wrote:
> Hi Olivier,
>
> Did you have a chance to look into this?
>
> https://issues.guix.gnu.org/50756
>
> TIA!
>
> Ludo’.
Hi Ludo,
Sorry I'm over the head with the university right now. I will try to
send my updated patch this weekend! :-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [bug#50756] [PATCH v2] gnu: Add lttng-tools.
2021-10-13 14:41 ` Olivier Dion via Guix-patches via
@ 2021-10-17 15:06 ` Olivier Dion via Guix-patches via
2021-10-25 12:02 ` bug#50756: [PATCH] " Ludovic Courtès
0 siblings, 1 reply; 8+ messages in thread
From: Olivier Dion via Guix-patches via @ 2021-10-17 15:06 UTC (permalink / raw)
To: Olivier Dion, Ludovic Courtès, Xinglu Chen; +Cc: 50756
* gnu/packages/linux.scm (lttng-tools): New variable.
---
gnu/packages/linux.scm | 61 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 61 insertions(+)
diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index a64bc9b560..e10595ada6 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -52,6 +52,7 @@
;;; Copyright © 2020 pukkamustard <pukkamustard@posteo.net>
;;; Copyright © 2021 B. Wilson <elaexuotee@wilsonb.com>
;;; Copyright © 2021 Ivan Gankevich <i.gankevich@spbu.ru>
+;;; Copyright © 2021 Olivier Dion <olivier.dion@polymtl.ca>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -8138,6 +8139,66 @@ (define-public lttng-ust
to ring buffers shared with a consumer daemon.")
(license license:lgpl2.1+)))
+(define-public lttng-tools
+ (package
+ (name "lttng-tools")
+ (version "2.12.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://lttng.org/files/lttng-tools/"
+ "lttng-tools-" version ".tar.bz2"))
+ (sha256
+ (base32
+ "0bgk35423v6z17j1w80m7dcza7gigs1pwyq24sdmgqwg6j2d1zmc"))))
+ (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"))))))
+ ;; 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 kexec-tools
(package
(name "kexec-tools")
--
2.33.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#50756: [PATCH] gnu: Add lttng-tools.
2021-10-17 15:06 ` [bug#50756] [PATCH v2] " Olivier Dion via Guix-patches via
@ 2021-10-25 12:02 ` Ludovic Courtès
0 siblings, 0 replies; 8+ messages in thread
From: Ludovic Courtès @ 2021-10-25 12:02 UTC (permalink / raw)
To: Olivier Dion; +Cc: 50756-done, Xinglu Chen
Hi Olivier,
Olivier Dion <olivier.dion@polymtl.ca> skribis:
> * gnu/packages/linux.scm (lttng-tools): New variable.
Applied!
I noticed this:
--8<---------------cut here---------------start------------->8---
$ strace -f -o ,,s /gnu/store/dyx2cwfv85d02bdhbvi1l8wqrxya7gdk-lttng-tools-2.12.5/bin/lttng --help
Error: Cannot show --help for `lttng`
exec: No such file or directory
$ grep execve ,,s
39780 execve("/gnu/store/dyx2cwfv85d02bdhbvi1l8wqrxya7gdk-lttng-tools-2.12.5/bin/lttng", ["/gnu/store/dyx2cwfv85d02bdhbvi1l"..., "--help"], 0x7ffc335c9a50 /* 34 vars */) = 0
39780 execve("/usr/bin/man", ["man", "-M", "/gnu/store/dyx2cwfv85d02bdhbvi1l"..., "1", "lttng"], 0x7ffecb1adb50 /* 34 vars */) = -1 ENOENT (Aucun fichier ou dossier de ce type)
--8<---------------cut here---------------end--------------->8---
IWBN if you could follow up with a patch that changes /usr/bin/man to
the right absolute file name.
Thank you!
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-10-25 12:07 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-23 12:40 [bug#50756] [PATCH] gnu: Add lttng-tools Olivier Dion via Guix-patches via
2021-09-24 14:24 ` Xinglu Chen
2021-09-24 15:13 ` Olivier Dion via Guix-patches via
2021-09-26 9:42 ` Xinglu Chen
2021-10-13 8:52 ` Ludovic Courtès
2021-10-13 14:41 ` Olivier Dion via Guix-patches via
2021-10-17 15:06 ` [bug#50756] [PATCH v2] " Olivier Dion via Guix-patches via
2021-10-25 12:02 ` bug#50756: [PATCH] " Ludovic Courtès
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).