unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Thompson, David" <dthompson2@worcester.edu>
To: Mathieu Lirzin <mthl@gnu.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] gnu: password-store: Wrap PATH.
Date: Fri, 29 Jul 2016 10:02:45 -0400	[thread overview]
Message-ID: <CAJ=RwfZb_-593RcKkdhQOYOQpDe4KtiiwXuvDu34w56mr+S9dA@mail.gmail.com> (raw)
In-Reply-To: <871t2c7qy0.fsf@gnu.org>

On Fri, Jul 29, 2016 at 5:07 AM, Mathieu Lirzin <mthl@gnu.org> wrote:
> Hello,
>
> Alex Griffin <a@ajgrf.com> writes:
>
>> On Thu, Jul 28, 2016, at 07:20 PM, Alex Griffin wrote:
>>
>> From 74b838fea52293386169299881cdd7cfefff7f4d Mon Sep 17 00:00:00 2001
>> From: Alex Griffin <a@ajgrf.com>
>> Date: Thu, 28 Jul 2016 19:06:10 -0500
>> Subject: [PATCH] gnu: password-store: Wrap PATH.
>>
>> * gnu/packages/password-utils.scm (password-store):
>> [arguments]: Wrap PATH more thoroughly.
>> [native-inputs]: Move getopt to inputs.
>> [inputs]: Add sed & alphabetize packages.
>                       ^^
> Indentation and formatting changes can be omitted in commit log.
>
>> ---
>>  gnu/packages/password-utils.scm | 33 ++++++++++++++++-----------------
>>  1 file changed, 16 insertions(+), 17 deletions(-)
>>
>> diff --git a/gnu/packages/password-utils.scm b/gnu/packages/password-utils.scm
>> index a03214a..497717f 100644
>> --- a/gnu/packages/password-utils.scm
>> +++ b/gnu/packages/password-utils.scm
>> @@ -6,6 +6,7 @@
>>  ;;; Copyright © 2016 Jessica Tallon <tsyesika@tsyesika.se>
>>  ;;; Copyright © 2016 Andreas Enge <andreas@enge.fr>
>>  ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
>> +;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
>>  ;;;
>>  ;;; This file is part of GNU Guix.
>>  ;;;
>> @@ -266,27 +267,25 @@ any X11 window.")
>>       '(#:phases
>>         (modify-phases %standard-phases
>>           (delete 'configure)
>> -         (add-after
>> -          ;; The script requires 'getopt' at run-time, and this allows
>> -          ;; the user to not install the providing package 'util-linux'
>> -          ;; in their profile.
>> -          'unpack 'patch-path
>> -          (lambda* (#:key inputs outputs #:allow-other-keys)
>> -            (let ((getopt (string-append (assoc-ref inputs "getopt")
>> -                                         "/bin/getopt")))
>> -              (substitute* "src/password-store.sh"
>> -                (("GETOPT=\"getopt\"")
>> -                 (string-append "GETOPT=\"" getopt "\"")))
>> -              #t))))
>> +         (add-after 'install 'wrap-path
>> +           (lambda* (#:key inputs outputs #:allow-other-keys)
>> +             (let* ((out (assoc-ref outputs "out"))
>> +                    (path (map (lambda (pkg)
>> +                                 (string-append (assoc-ref inputs pkg) "/bin"))
>> +                               '("coreutils" "getopt" "git" "gnupg" "pwgen"
>> +                                 "sed" "tree" "which" "xclip"))))
>> +               (wrap-program (string-append out "/bin/pass")
>> +                 `("PATH" ":" prefix (,(string-join path ":"))))))))
>
> 'let*' can safely be replaced by 'let' here.
>
>>         #:make-flags (list "CC=gcc" (string-append "PREFIX=" %output))
>>         #:test-target "test"))
>> -    (native-inputs `(("getopt" ,util-linux))) ; getopt for the tests
>> -    (inputs `(("gnupg" ,gnupg)
>> -              ("pwgen" ,pwgen)
>> -              ("xclip" ,xclip)
>> +    (inputs `(("getopt" ,util-linux)
>>                ("git" ,git)
>> +              ("gnupg" ,gnupg)
>> +              ("pwgen" ,pwgen)
>> +              ("sed" ,sed)
>>                ("tree" ,tree)
>> -              ("which" ,which)))
>> +              ("which" ,which)
>> +              ("xclip" ,xclip)))
>>      (home-page "http://www.passwordstore.org/")
>>      (synopsis "Encrypted password manager")
>>      (description "Password-store is a password manager which uses GnuPG to
>
> Pushed in commit 61201e46a72b715e1a38ce56932c3f4f2d3885b4.

Sorry I'm late, but I don't think this is the right fix.  Wrapping
programs should only be considered after other options are exhausted.
The correct fix is to patch the source directly to refer to
executables by their absolute path.  Why wasn't it done this way?

- Dave

  reply	other threads:[~2016-07-29 14:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-29  0:20 [PATCH] gnu: password-store: Wrap PATH Alex Griffin
2016-07-29  0:38 ` Alex Griffin
2016-07-29  9:07   ` Mathieu Lirzin
2016-07-29 14:02     ` Thompson, David [this message]
2016-07-29 14:27       ` Alex Griffin
2016-07-29 16:57         ` Mathieu Lirzin

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='CAJ=RwfZb_-593RcKkdhQOYOQpDe4KtiiwXuvDu34w56mr+S9dA@mail.gmail.com' \
    --to=dthompson2@worcester.edu \
    --cc=guix-devel@gnu.org \
    --cc=mthl@gnu.org \
    /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).