From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Darrington Subject: Re: [PATCH] gnu: postgresql: Substitute hard coded "/bin/sh". Date: Fri, 25 Mar 2016 08:29:19 +0100 Message-ID: <20160325072919.GA4011@jocasta.intra> References: <1458853944-26415-1-git-send-email-jmd@gnu.org> <871t6z36y7.fsf@elephly.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="huq684BweRXVnRxX" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ajMBX-0005tq-1K for guix-devel@gnu.org; Fri, 25 Mar 2016 03:29:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ajMBW-0001Ra-4n for guix-devel@gnu.org; Fri, 25 Mar 2016 03:29:30 -0400 Content-Disposition: inline In-Reply-To: <871t6z36y7.fsf@elephly.net> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: guix-devel@gnu.org, John Darrington --huq684BweRXVnRxX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I committed it with the changes you suggested. =20 Thanks On Thu, Mar 24, 2016 at 10:24:32PM +0100, Ricardo Wurmus wrote: =20 Hi John, =20 thanks for the patch! While the patch looks generally okay, I do want to make a few nit-picking comments. =20 > * gnu/packages/databses.scm (postgresql): substitute /bin/sh > with location of bash binary. ^ \_ why two spaces? =20 > (build-system gnu-build-system) > + (arguments > + `(#:phases > + (modify-phases %standard-phases > + (add-before > + 'configure 'patch-/bin/sh =20 we usually keep these on the same line as ???add-before???. =20 > + (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"))))))))) =20 I think we could just do this: =20 (lambda _ (substitute* '(...) (("/bin/sh") (which "sh"))) #t) =20 Also note the final ???#t??? because ???substitute*??? has an undeterm= ined return value. =20 What do you think? =20 ~~ Ricardo =20 --=20 Avoid eavesdropping. Send strong encryted email. PGP Public key ID: 1024D/2DE827B3=20 fingerprint =3D 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://sks-keyservers.net or any PGP keyserver for public key. --huq684BweRXVnRxX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlb06M8ACgkQimdxnC3oJ7OskwCfTJZP7uoFVTUZpvzEOe/49mhN XOoAn3xsNRHPHccw/VUcEObYb7eunFmc =nHHu -----END PGP SIGNATURE----- --huq684BweRXVnRxX--