all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 31678@debbugs.gnu.org
Subject: [bug#31678] [PATCH 1/2] gnu: erlang: Patch occurrences of /bin/sh in the source.
Date: Fri,  1 Jun 2018 14:51:05 +0100	[thread overview]
Message-ID: <20180601135106.32680-1-mail@cbaines.net> (raw)
In-Reply-To: <87o9gumxgd.fsf@cbaines.net>

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

  reply	other threads:[~2018-06-01 13:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-01 13:46 [bug#31678] [PATCH 0/2] Elixir and Erlang improvements Christopher Baines
2018-06-01 13:51 ` Christopher Baines [this message]
2018-06-01 13:51   ` [bug#31678] [PATCH 2/2] gnu: elixir: Enable more tests and remove patch Christopher Baines
2018-06-10  4:51     ` 宋文武
2018-06-12  6:55       ` bug#31678: " Christopher Baines
2018-06-10  4:41   ` [bug#31678] [PATCH 1/2] gnu: erlang: Patch occurrences of /bin/sh in the source 宋文武
2018-06-10  6:00     ` 宋文武
2018-06-12  6:56       ` Christopher Baines

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180601135106.32680-1-mail@cbaines.net \
    --to=mail@cbaines.net \
    --cc=31678@debbugs.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 external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.