From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33230) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fSdEo-00044i-TA for guix-patches@gnu.org; Tue, 12 Jun 2018 02:57:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fSdEl-0001MI-OG for guix-patches@gnu.org; Tue, 12 Jun 2018 02:57:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:36081) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fSdEl-0001ME-Jv for guix-patches@gnu.org; Tue, 12 Jun 2018 02:57:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fSdEk-0007pb-Cw for guix-patches@gnu.org; Tue, 12 Jun 2018 02:57:03 -0400 Subject: [bug#31678] [PATCH 1/2] gnu: erlang: Patch occurrences of /bin/sh in the source. Resent-Message-ID: References: <87o9gumxgd.fsf@cbaines.net> <20180601135106.32680-1-mail@cbaines.net> <87wov7gsnj.fsf@member.fsf.org> <87in6rgp08.fsf@member.fsf.org> From: Christopher Baines In-reply-to: <87in6rgp08.fsf@member.fsf.org> Date: Tue, 12 Jun 2018 07:56:43 +0100 Message-ID: <87wov4332s.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Cc: 31678@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable =E5=AE=8B=E6=96=87=E6=AD=A6 writes: > iyzsong@member.fsf.org (=E5=AE=8B=E6=96=87=E6=AD=A6) writes: > >> Christopher Baines writes: >> >>> Previously, the elixir package would often fail to build, as running :o= s:cmd >>> would fail, as /bin/sh doesn't exist when building the elixir package. = These >>> changes fix that issue. >>> >>> * gnu/packages/erlang.scm (erlang)[arguments]: Add new patch-/bin/sh ph= ase to >>> replace hardcoded references to /bin/sh with a file in the store. >>> --- >>> gnu/packages/erlang.scm | 21 +++++++++++++++++++++ >>> 1 file changed, 21 insertions(+) >>> >>> diff --git a/gnu/packages/erlang.scm b/gnu/packages/erlang.scm >>> index 0e2b7b5bc..1fce57388 100644 >>> --- a/gnu/packages/erlang.scm >>> +++ b/gnu/packages/erlang.scm >>> @@ -127,6 +127,27 @@ >>> (date->string source-date-epoch >>> "{H,Mi,S} =3D {~H,~M,~S},"))) >>> #t))) >>> + (add-after 'unpack 'patch-/bin/sh >>> + (lambda _ >>> + (substitute* "erts/etc/unix/run_erl.c" >>> + (("sh =3D \"/bin/sh\";") >>> + (string-append "sh =3D \"" >>> + (which "sh") >>> + "\";"))) >>> + >>> + (substitute* "erts/emulator/sys/unix/sys_drivers.c" >>> + (("SHELL \"/bin/sh\"") >>> + (string-append "SHELL \"" >>> + (which "sh") >>> + "\""))) >>> + (substitute* "erts/emulator/sys/unix/erl_child_setup.c" >>> + (("SHELL \"/bin/sh\"") >>> + (string-append "SHELL \"" >>> + (which "sh") >>> + "\""))) >>> + >>> + (substitute* "lib/kernel/src/os.erl" >>> + (("/bin/sh") (which "sh"))))) >> >> It should return =E2=80=98#t=E2=80=99, otherwise look good to me! > > Oh, =E2=80=98substitute*=E2=80=99 does return =E2=80=98#t=E2=80=99 itself= , never mind :-) I've added an explicit #t in there anyway, as I couldn't quite work out under what circumstances substitute* returned #t. The other phase in the erlang package using substitute* also explicitly returns #t. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlsfbqtfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XdDCA/6A+F/VU539BAfoncodK6CgrVuZLwk5y1LvfRF2qtrX4oX8qxcyBo/U1MF dAPDJnhOseRW6sI1haVv1RdMogwDGpFMmFoVHN8XVw7iGk1sGRRcESQ/beaC+xh1 9ZfWD0kC5iPwAA3kGKVu0wt5C18MvfshFG5ZrrWER0UjD+EPFFPP6zCcO37iS//o YoNm8h7GtK+uDJmAt/1rj64QGIxI23L81xzhiukDy7DD6YpyNh6rwzp5Gu5Vx6PZ 5wbtxYwTn7L2dRXGF9h54a47q+3dGNjUzSQhvP/ELty27UCAaY3v18wWyiMKbAUH 6T8Vyzx+XA4XOdnOmYxQML7S8s3f9rUPZhGch261F3wUViYmNKwmPgrrYznJdDAG dHFfQ9BvHi+d2gKxlVJpFeMA3YnvNHuVqJFxFOL+w5cORdQlmvWW5zulLh/kfRxT tYGUALkI0OccvVq1ErAiMj0zvirkL9wLYdp99r65XJdgjwMwKFj2PxecjOkhHAm/ RUMDHFawjwFlehC+47tdnYKGqg9HB4RGwwTe8hDu/UMgvTy6gBgvx0+wiwT7FdDq hGLdNBdi2xi4MOYccC5gKOz+y4yIucD2stLBD3qVWJfpFqSKZ+xYZOm/8rhukWQd ok1/O6bZVZcKPqtbB++R1KeDni3gT5RY/GtLXBxian+pjjMkCJY= =3Kc3 -----END PGP SIGNATURE----- --=-=-=--