From: John Darrington <john@darrington.wattle.id.au>
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel@gnu.org, John Darrington <jmd@gnu.org>
Subject: Re: [PATCH] gnu: postgresql: Substitute hard coded "/bin/sh".
Date: Fri, 25 Mar 2016 08:29:19 +0100 [thread overview]
Message-ID: <20160325072919.GA4011@jocasta.intra> (raw)
In-Reply-To: <871t6z36y7.fsf@elephly.net>
[-- Attachment #1: Type: text/plain, Size: 1735 bytes --]
I committed it with the changes you suggested.
Thanks
On Thu, Mar 24, 2016 at 10:24:32PM +0100, Ricardo Wurmus wrote:
Hi John,
thanks for the patch! While the patch looks generally okay, I do want
to make a few nit-picking comments.
> * gnu/packages/databses.scm (postgresql): substitute /bin/sh
> with location of bash binary.
^
\_ why two spaces?
> (build-system gnu-build-system)
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (add-before
> + 'configure 'patch-/bin/sh
we usually keep these on the same line as ???add-before???.
> + (lambda* (#:key inputs #:allow-other-keys)
> + (let ((bash (assoc-ref inputs "bash")))
> + ;; Refer to the actual shell.
> + (substitute* '("src/bin/pg_ctl/pg_ctl.c"
> + "src/bin/psql/command.c")
> + (("/bin/sh")
> + (string-append bash "/bin/sh")))))))))
I think we could just do this:
(lambda _
(substitute* '(...)
(("/bin/sh") (which "sh")))
#t)
Also note the final ???#t??? because ???substitute*??? has an undetermined
return value.
What do you think?
~~ Ricardo
--
Avoid eavesdropping. Send strong encryted email.
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
prev parent reply other threads:[~2016-03-25 7:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-24 17:54 [PATCH 1/2] gnu: postgresql: Substitute hard coded "/bin/sh" John Darrington
2016-03-24 18:18 ` Thompson, David
2016-03-24 21:12 ` [PATCH] " John Darrington
2016-03-24 21:24 ` Ricardo Wurmus
2016-03-25 7:29 ` John Darrington [this message]
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=20160325072919.GA4011@jocasta.intra \
--to=john@darrington.wattle.id.au \
--cc=guix-devel@gnu.org \
--cc=jmd@gnu.org \
--cc=rekado@elephly.net \
/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).