unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: iyzsong@member.fsf.org (宋文武)
To: Christopher Baines <mail@cbaines.net>
Cc: 31678@debbugs.gnu.org
Subject: [bug#31678] [PATCH 1/2] gnu: erlang: Patch occurrences of /bin/sh in the source.
Date: Sun, 10 Jun 2018 14:00:07 +0800	[thread overview]
Message-ID: <87in6rgp08.fsf@member.fsf.org> (raw)
In-Reply-To: <87wov7gsnj.fsf@member.fsf.org> ("宋文武"'s message of "Sun, 10 Jun 2018 12:41:20 +0800")

iyzsong@member.fsf.org (宋文武) writes:

> Christopher Baines <mail@cbaines.net> writes:
>
>> 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")))))
>
> It should return ‘#t’, otherwise look good to me!

Oh, ‘substitute*’ does return ‘#t’ itself, never mind :-)

  reply	other threads:[~2018-06-10  6:01 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 ` [bug#31678] [PATCH 1/2] gnu: erlang: Patch occurrences of /bin/sh in the source Christopher Baines
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     ` 宋文武 [this message]
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

  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=87in6rgp08.fsf@member.fsf.org \
    --to=iyzsong@member.fsf.org \
    --cc=31678@debbugs.gnu.org \
    --cc=mail@cbaines.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).