diff mbox

gnu: %static-inputs: Use bash from PATH in bootstrap tar.

Message ID 7td1iqut93.fsf@gmail.com
State New
Headers show

Commit Message

Carlos Sánchez de La Lama Oct. 24, 2016, 6:59 a.m. UTC
Hi!

>> See
>> <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg02272.html>.
>
> Could you put this URL next to the “Do not use /bin/sh” comment?
>
>> gnu/packages/make-bootstrap.scm (%static-inputs): Use bash from PATH.
>
> Otherwise LGTM, thanks!

Done, and untabify'ed also (I forgot on first version).

Thanks!

Carlos

gnu: %static-inputs: Use bash from PATH in bootstrap tar.

gnu/packages/make-bootstrap.scm (%static-inputs): Use bash from PATH.
---
 gnu/packages/make-bootstrap.scm | 11 +++++++++++
 1 file changed, 11 insertions(+)

Comments

Ludovic Courtès Oct. 24, 2016, 9:08 p.m. UTC | #1
csanchezdll@gmail.com (Carlos Sánchez de La Lama) skribis:

> Hi!
>
>>> See
>>> <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg02272.html>.
>>
>> Could you put this URL next to the “Do not use /bin/sh” comment?
>>
>>> gnu/packages/make-bootstrap.scm (%static-inputs): Use bash from PATH.
>>
>> Otherwise LGTM, thanks!
>
> Done, and untabify'ed also (I forgot on first version).
>
> Thanks!

I had done it for you in 80c9164fd7741e3bb3da368666f41c49a456d990 when I
realized that I’d have to push on your behalf.

Sorry for the confusion!

Thanks,
Ludo’.
Carlos Sánchez de La Lama Oct. 25, 2016, 7:33 a.m. UTC | #2
Hi Ludo,

>> Done, and untabify'ed also (I forgot on first version).
>
> I had done it for you in 80c9164fd7741e3bb3da368666f41c49a456d990 when I
> realized that I’d have to push on your behalf.

Great, thanks :)

Carlos
diff mbox

Patch

diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index def9c23..28b1549 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -186,6 +186,17 @@  for `sh' in $PATH, and without nscd, and with static NSS modules."
                 (inputs (if (%current-target-system)
                             `(("bash" ,%bash-static))
                             '()))))
+        (tar (package (inherit tar)
+               (arguments
+                '(#:phases (modify-phases %standard-phases
+                             (add-before 'build 'set-shell-file-name
+                               (lambda _
+                                 ;; Do not use "/bin/sh" to run programs. See
+                                 ;; <http://lists.gnu.org/archive/html/guix-devel/2016-09/msg02272.html>.
+                                 (substitute* "src/system.c"
+                                   (("/bin/sh") "sh")
+                                   (("execv ") "execvp "))
+                                 #t)))))))
         (finalize (compose static-package
                            package-with-relocatable-glibc)))
     `(,@(map (match-lambda