all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 宋文武 <iyzsong@member.fsf.org>
Cc: 31678@debbugs.gnu.org
Subject: [bug#31678] [PATCH 1/2] gnu: erlang: Patch occurrences of /bin/sh in the source.
Date: Tue, 12 Jun 2018 07:56:43 +0100	[thread overview]
Message-ID: <87wov4332s.fsf@cbaines.net> (raw)
In-Reply-To: <87in6rgp08.fsf@member.fsf.org>

[-- Attachment #1: Type: text/plain, Size: 2272 bytes --]


宋文武 <iyzsong@member.fsf.org> writes:

> 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 :-)

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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

      reply	other threads:[~2018-06-12  6:57 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     ` 宋文武
2018-06-12  6:56       ` Christopher Baines [this message]

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