From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fOkTN-0000fP-Kd for guix-patches@gnu.org; Fri, 01 Jun 2018 09:52:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fOkTK-0000Ol-Jo for guix-patches@gnu.org; Fri, 01 Jun 2018 09:52:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:49107) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fOkTK-0000Oe-Fd for guix-patches@gnu.org; Fri, 01 Jun 2018 09:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fOkTK-0000Yx-4D for guix-patches@gnu.org; Fri, 01 Jun 2018 09:52:02 -0400 Subject: [bug#31678] [PATCH 1/2] gnu: erlang: Patch occurrences of /bin/sh in the source. References: <87o9gumxgd.fsf@cbaines.net> In-Reply-To: <87o9gumxgd.fsf@cbaines.net> Resent-Message-ID: From: Christopher Baines Date: Fri, 1 Jun 2018 14:51:05 +0100 Message-Id: <20180601135106.32680-1-mail@cbaines.net> 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: 31678@debbugs.gnu.org Previously, the elixir package would often fail to build, as running :os: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 phase 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} = {~H,~M,~S},"))) #t))) + (add-after 'unpack 'patch-/bin/sh + (lambda _ + (substitute* "erts/etc/unix/run_erl.c" + (("sh = \"/bin/sh\";") + (string-append "sh = \"" + (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"))))) (add-after 'patch-source-shebangs 'patch-source-env (lambda _ (let ((escripts -- 2.17.1