[PATCH] gnu: Add lttng-tools.

DoneSubmitted by Olivier Dion.
Details
3 participants
  • Ludovic Courtès
  • Olivier Dion
  • Xinglu Chen
Owner
unassigned
Severity
normal
O
O
Olivier Dion wrote on 23 Sep 14:40 +0200
(address . guix-patches@gnu.org)(name . Olivier Dion)(address . olivier.dion@polymtl.ca)
20210923124004.3164-1-olivier.dion@polymtl.ca
* 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(+)
Toggle diff (74 lines)diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scmindex 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
X
X
Xinglu Chen wrote on 24 Sep 16:24 +0200
(name . Olivier Dion)(address . olivier.dion@polymtl.ca)
87mto2jbkl.fsf@yoctocell.xyz
On Thu, Sep 23 2021, Olivier Dion via Guix-patches via wrote:
Toggle quote (4 lines)> * 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.
Toggle quote (2 lines)> Signed-off-by: Olivier Dion <olivier.dion@polymtl.ca>
There is no need to “sign-off” your own commit; this is only done bycommitters who push a patch on behalf of someone else.
Toggle quote (25 lines)> ---> 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?
Toggle quote (7 lines)> + (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.
Toggle quote (3 lines)> +> + (build-system gnu-build-system)
These newlines aren’t necessary.
Toggle quote (4 lines)> + (arguments> + `(#:tests? #f> + #:parallel-tests? #f
There is no need to set #:parallel-tests? if #:tests? is set to #f.
Toggle quote (16 lines)> + #: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?
Toggle quote (6 lines)> + (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, andPython would be needed during runtime as well.
Toggle quote (13 lines)> + ("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
Toggle quote (3 lines)> +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}.
Toggle quote (2 lines)> + (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
-----BEGIN PGP SIGNATURE-----
iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFN36sVHHB1YmxpY0B5b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5ihMQAI1+w4oNUsNIJ68FkvLzw4Pquh510mXz+E7Jn2k2zf81ouWOguIKyaZlAH6i5TpntBsYJnQn31JsuGnisThcHpObz8cRIr6xVCgpbA6FpwqJ4UD+bBPek+DJygORSUH1VhMYFLmVi0nvJ9OVhbXQxw8vjSPyEfqMxpG3/OTmDMZRgOwu4k5n+CpyCnFXS33EHFoJ6/NF8bhacqVmLg21VRWwc19GdITsi8fAaReNj4swAbrWaUPs3rIuOf7ERuhxcN2IZa9gyB0KQ5O7PNy39k+n+XN8VKnW1bqLY1a3VPoLWXfwqkupIfmaHcjbdOCzInOV1RCyzLWZ6ZVBZl3u4pdrXvKmJvCJZDOJK1rU1i6kEhzKBMiORdwCzyeyW/jyKHjfeJFlMsbg5FXIDaDSnxaZ6r1gXo/BdSWApkMKwlc+5MQ07UMjjPMefG9K1HvJ7JftmOgfcmaia0+wymA73Jk4Qt0isr2CfqX9zVZvLwkMWcztzwLQ110emzXuSm59CfH1o034iIwi+WYIufWjbv3YD4msqtrIaUCQoz8PbQuo5msICxGbYFDAlfplW+1wHyWdMkWML2R2AyI75PAjdeISwpKAGs0oTSIuogbFSD5KV95cXOGiHIGQmq14voO339q3CR7EeglO6iKdMPu7BTgHaKHsIx4Uy0FQ03CptSh2=gs8K-----END PGP SIGNATURE-----
O
O
Olivier Dion wrote on 24 Sep 17:13 +0200
87tuia2ehj.fsf@laura
On Fri, 24 Sep 2021, Xinglu Chen <public@yoctocell.xyz> wrote:
Toggle quote (9 lines)> 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 thisin another patch.
Toggle quote (6 lines)>> + (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 workingbecause of how the lttng-daemon works. So I disable the parallel optionin order to not forget it when testing will work in the future. Ishould probably add a comment to explain the rationale here.
Toggle quote (6 lines)>> + (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 READMEso it's easier to map the dependencies described by it to Guix'spackages. I can change this, but I find it more clear that way.
Toggle quote (14 lines)>>> + (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 wouldrequire python-3 at runtime to use the bindings, you don't requirepython-3 to use the other tools of the project. I don't mind adding itto the inputs, I'm just asking.
Toggle quote (2 lines)> Could you send an updated patch?
Will do soon!
-- Olivier DionPolymtl
X
X
Xinglu Chen wrote on 26 Sep 11:42 +0200
875yunk70l.fsf@yoctocell.xyz
On Fri, Sep 24 2021, Olivier Dion via Guix-patches via wrote:
Toggle quote (13 lines)> 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.
Toggle quote (21 lines)>>> + (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 wouldchange them to “kmod” and “module-init-tools” respectively.
Toggle quote (19 lines)>>>>> + (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 profilethemselves.
-----BEGIN PGP SIGNATURE-----
iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFQQHoVHHB1YmxpY0B5b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5ag4P/2fBRNy73tVNjITBIYfTlhENNzI6zf4dz7841A99MBUqsrpb+SDN674SAmi4bUd8+xtsSZTSDIirUqY/MWLT+EgXE5GLr1qDO6DrEgpd8MI/YxKY9EOYVQ7wi+U+RzndroR8CXoIiFbr0q4DHXsJAwNKW8i8XX5PP++2mbESD0uOydNlvzPvgibHokikwoZXZZLazq03l3seLAOv3HvL+E1zK4fPCqnLTg2XDr9teXA8m/JMgAETcbuZI/Fn52SpOvUH8B2x2QSASPYrS1c7dR2PWd2WfQvRM/MNuG1hjOnuBeTkczSMCpNee/zd4ubXnDV9nftS+/ig0dUwQ8bC/a+uJ3+ShfCdJt4Wh4zZpvfS3xD7ThZtRF5fMrjOFQUh/FBYk/ox2VNXpHarU06DfTuobDPUYWIEQtvTH7jZ1HTTpZfEi0Rcl2e2qgIvORyL4it9g5EXwg7UMkPG0V96gSo5XeYuR7JRjIaE3ZGTy9x+mPDo+MpLmV6wYPZDZ3IV0QJFFKF2L7XDn/ejIavTDACyZl80LWlwGlRbI7vWgj/9ZsuVIGxTm8+wwcT0X9EvWhs+np6+M7DCZR1b/KoLQpKFT96J1aEBeLVJbkuraPesMGJEAYDg1TCv4NIN9+0IIHN2JZZMCGEJTNhnKu8okVVzeEm1ifMoFZUT1OEo0tWb=YSqJ-----END PGP SIGNATURE-----
L
L
Ludovic Courtès wrote on 13 Oct 10:52 +0200
Re: bug#50756: [PATCH] gnu: Add lttng-tools.
(name . Xinglu Chen)(address . public@yoctocell.xyz)
87zgrds3wn.fsf_-_@gnu.org
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:
Toggle quote (62 lines)> 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.
L
L
Ludovic Courtès wrote on 13 Oct 10:52 +0200
control message for bug #50756
(address . control@debbugs.gnu.org)
87y26xs3w3.fsf@gnu.org
tags 50756 + moreinfoquit
O
O
Olivier Dion wrote on 13 Oct 16:41 +0200
Re: bug#50756: [PATCH] gnu: Add lttng-tools.
(address . 50756@debbugs.gnu.org)
87mtnd0yy3.fsf@laura
On Wed, 13 Oct 2021, Ludovic Courtès <ludo@gnu.org> wrote:
Toggle quote (10 lines)> 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 tosend my updated patch this weekend! :-)
O
O
Olivier Dion wrote on 17 Oct 17:06 +0200
[PATCH v2] gnu: Add lttng-tools.
(address . 50756@debbugs.gnu.org)
20211017150639.4625-1-olivier.dion@polymtl.ca
* gnu/packages/linux.scm (lttng-tools): New variable.--- gnu/packages/linux.scm | 61 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+)
Toggle diff (81 lines)diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scmindex 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
L
L
Ludovic Courtès wrote on 25 Oct 14:02 +0200
Re: bug#50756: [PATCH] gnu: Add lttng-tools.
(name . Olivier Dion)(address . olivier.dion@polymtl.ca)
87wnm1l3cu.fsf_-_@gnu.org
Hi Olivier,
Olivier Dion <olivier.dion@polymtl.ca> skribis:
Toggle quote (2 lines)> * gnu/packages/linux.scm (lttng-tools): New variable.
Applied!
I noticed this:
Toggle snippet (8 lines)$ strace -f -o ,,s /gnu/store/dyx2cwfv85d02bdhbvi1l8wqrxya7gdk-lttng-tools-2.12.5/bin/lttng --helpError: Cannot show --help for `lttng`exec: No such file or directory$ grep execve ,,s39780 execve("/gnu/store/dyx2cwfv85d02bdhbvi1l8wqrxya7gdk-lttng-tools-2.12.5/bin/lttng", ["/gnu/store/dyx2cwfv85d02bdhbvi1l"..., "--help"], 0x7ffc335c9a50 /* 34 vars */) = 039780 execve("/usr/bin/man", ["man", "-M", "/gnu/store/dyx2cwfv85d02bdhbvi1l"..., "1", "lttng"], 0x7ffecb1adb50 /* 34 vars */) = -1 ENOENT (Aucun fichier ou dossier de ce type)
IWBN if you could follow up with a patch that changes /usr/bin/man tothe right absolute file name.
Thank you!
Ludo’.
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send email to 50756@debbugs.gnu.org