emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#26770: closed ([PATCH] gnu: tailon: Add missing in


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#26770: closed ([PATCH] gnu: tailon: Add missing inputs.)
Date: Wed, 17 May 2017 14:54:03 +0000

Your message dated Wed, 17 May 2017 16:53:45 +0200
with message-id <address@hidden>
and subject line Re: bug#26770: [PATCH] gnu: tailon: Use absolute paths for 
commands.
has caused the debbugs.gnu.org bug report #26770,
regarding [PATCH] gnu: tailon: Add missing inputs.
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
26770: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26770
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] gnu: tailon: Add missing inputs. Date: Thu, 4 May 2017 07:47:15 +0100
* gnu/packages/logging.scm (tailon)[inputs]: Add grep, gawk, sed and coreutils
  as inputs.
  [arguments]: Wrap bin/tailon to include some inputs in the PATH.
---
 gnu/packages/logging.scm | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/logging.scm b/gnu/packages/logging.scm
index 2523d65f6..060521eab 100644
--- a/gnu/packages/logging.scm
+++ b/gnu/packages/logging.scm
@@ -26,6 +26,8 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system python)
   #:use-module (gnu packages)
+  #:use-module (gnu packages base)
+  #:use-module (gnu packages gawk)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages autotools))
@@ -108,7 +110,25 @@ command line.")
     (inputs
      `(("python-pyyaml" ,python-pyyaml)
        ("python-sockjs-tornado" ,python-sockjs-tornado)
-       ("python-tornado" ,python-tornado)))
+       ("python-tornado" ,python-tornado)
+       ("grep" ,grep)
+       ("gawk" ,gawk)
+       ("sed" ,sed)
+       ("tail" ,coreutils)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-tailon-path
+                    (lambda* (#:key inputs outputs #:allow-other-keys)
+                      (let ((out (assoc-ref outputs "out")))
+                        (wrap-program (string-append out "/bin/tailon")
+                          `("PATH" ":" prefix ,(map
+                                                (lambda (input)
+                                                  (string-append
+                                                   (assoc-ref inputs input)
+                                                   "/bin"))
+                                                '("grep" "gawk" "sed" 
"tail"))))
+                        #t))))))
     (home-page "https://tailon.readthedocs.io/";)
     (synopsis
      "Webapp for looking at and searching through log files")
-- 
2.12.0




--- End Message ---
--- Begin Message --- Subject: Re: bug#26770: [PATCH] gnu: tailon: Use absolute paths for commands. Date: Wed, 17 May 2017 16:53:45 +0200 User-agent: Notmuch/0.24.1 (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu)
Christopher Baines <address@hidden> writes:

> On Mon, 15 May 2017 17:59:42 +0200
> Marius Bakke <address@hidden> wrote:
>
>> Christopher Baines <address@hidden> writes:
>> > +         (add-after 'install 'wrap-tailon-path
>> > +                    (lambda* (#:key inputs outputs
>> > #:allow-other-keys)
>> > +                      (let ((out (assoc-ref outputs "out")))
>> > +                        (substitute* (find-files out "commands.py")
>> > +                          (("self\\.first_in_path\\('grep'\\)")
>> > +                           (string-append"'" (which "grep") "'"))
>> > +                          (("self\\.first_in_path\\('gawk',
>> > 'awk'\\)")
>> > +                           (string-append"'" (which "gawk") "'"))
>> > +                          (("self\\.first_in_path\\('gsed',
>> > 'sed'\\)")
>> > +                           (string-append"'" (which "sed") "'"))
>> > +                          (("self\\.first_in_path\\('gtail',
>> > 'tail'\\)")
>> > +                           (string-append"'" (which "tail") "'")))
>> > +                        #t))))))  
>> 
>> Is there any particular reason this phase runs after 'install'? I
>> think we should try to avoid modifying files after they have been
>> copied to the store, but if doing this substitution earlier is
>> difficult I guess it's okay with a comment.
>
> No, I just put it there by default, but I can see why doing the
> substitution earlier would be better. I've sent another patch that
> moves it to after the unpack phase. 

Applied, thank you! My rationale was that the store may be on slow
storage (say NFS), whereas the build directory is probably a tmpfs
or local storage.

Note: I replaced the "find-files" invocation with just the one file
path. Hope that was okay!

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]