unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: %static-inputs: Use bash from PATH in bootstrap tar.
@ 2016-10-18 15:55 Carlos Sánchez de La Lama
  2016-10-19 15:34 ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: Carlos Sánchez de La Lama @ 2016-10-18 15:55 UTC (permalink / raw)
  To: guix-devel

See
<http://lists.gnu.org/archive/html/guix-devel/2016-09/msg02272.html>.

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

diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index def9c23..180ca72 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -186,6 +186,16 @@ 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.
+				 (substitute* "src/system.c"
+				   (("/bin/sh") "sh")
+				   (("execv ") "execvp "))
+				 #t)))))))
         (finalize (compose static-package
                            package-with-relocatable-glibc)))
     `(,@(map (match-lambda
-- 
2.9.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: %static-inputs: Use bash from PATH in bootstrap tar.
  2016-10-18 15:55 [PATCH] gnu: %static-inputs: Use bash from PATH in bootstrap tar Carlos Sánchez de La Lama
@ 2016-10-19 15:34 ` Ludovic Courtès
  2016-10-19 17:13   ` Efraim Flashner
  2016-10-24  6:59   ` Carlos Sánchez de La Lama
  0 siblings, 2 replies; 8+ messages in thread
From: Ludovic Courtès @ 2016-10-19 15:34 UTC (permalink / raw)
  To: Carlos Sánchez de La Lama; +Cc: guix-devel

csanchezdll@gmail.com (Carlos Sánchez de La Lama) skribis:

> 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!

Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: %static-inputs: Use bash from PATH in bootstrap tar.
  2016-10-19 15:34 ` Ludovic Courtès
@ 2016-10-19 17:13   ` Efraim Flashner
  2016-10-19 19:48     ` Ludovic Courtès
  2016-10-24  6:59   ` Carlos Sánchez de La Lama
  1 sibling, 1 reply; 8+ messages in thread
From: Efraim Flashner @ 2016-10-19 17:13 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

On Wed, Oct 19, 2016 at 05:34:17PM +0200, Ludovic Courtès wrote:
> csanchezdll@gmail.com (Carlos Sánchez de La Lama) skribis:
> 
> > 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!
> 
> Ludo’.
> 

Was this tested with the other bootstrap binaries? I'm still having
trouble with the aarch64 ones, didn't check if/how it affected the ones
that are already in Guix (which I assume would be not at all)

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: %static-inputs: Use bash from PATH in bootstrap tar.
  2016-10-19 17:13   ` Efraim Flashner
@ 2016-10-19 19:48     ` Ludovic Courtès
  2016-10-19 20:00       ` Efraim Flashner
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2016-10-19 19:48 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Efraim Flashner <efraim@flashner.co.il> skribis:

> On Wed, Oct 19, 2016 at 05:34:17PM +0200, Ludovic Courtès wrote:
>> csanchezdll@gmail.com (Carlos Sánchez de La Lama) skribis:
>> 
>> > 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!
>> 
>> Ludo’.
>> 
>
> Was this tested with the other bootstrap binaries?

It changes execv("/bin/sh", …) to execvp("sh", …) so it looks right.

> I'm still having trouble with the aarch64 ones, didn't check if/how it
> affected the ones that are already in Guix (which I assume would be
> not at all)

What kind of problems?  After this patch?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: %static-inputs: Use bash from PATH in bootstrap tar.
  2016-10-19 19:48     ` Ludovic Courtès
@ 2016-10-19 20:00       ` Efraim Flashner
  0 siblings, 0 replies; 8+ messages in thread
From: Efraim Flashner @ 2016-10-19 20:00 UTC (permalink / raw)
  To: ludo; +Cc: guix-devel



On October 19, 2016 10:48:11 PM GMT+03:00, ludo@gnu.org wrote:
>Efraim Flashner <efraim@flashner.co.il> skribis:
>
>> On Wed, Oct 19, 2016 at 05:34:17PM +0200, Ludovic Courtès wrote:
>>> csanchezdll@gmail.com (Carlos Sánchez de La Lama) skribis:
>>> 
>>> > 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!
>>> 
>>> Ludo’.
>>> 
>>
>> Was this tested with the other bootstrap binaries?
>
>It changes execv("/bin/sh", …) to execvp("sh", …) so it looks right.
>
>> I'm still having trouble with the aarch64 ones, didn't check if/how
>it
>> affected the ones that are already in Guix (which I assume would be
>> not at all)
>
>What kind of problems?  After this patch?
>
>Thanks,
>Ludo’.

Sorry, unrelated to this patch. Nvm and carry on

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: %static-inputs: Use bash from PATH in bootstrap tar.
  2016-10-19 15:34 ` Ludovic Courtès
  2016-10-19 17:13   ` Efraim Flashner
@ 2016-10-24  6:59   ` Carlos Sánchez de La Lama
  2016-10-24 21:08     ` Ludovic Courtès
  1 sibling, 1 reply; 8+ messages in thread
From: Carlos Sánchez de La Lama @ 2016-10-24  6:59 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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(+)

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
-- 
2.9.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: %static-inputs: Use bash from PATH in bootstrap tar.
  2016-10-24  6:59   ` Carlos Sánchez de La Lama
@ 2016-10-24 21:08     ` Ludovic Courtès
  2016-10-25  7:33       ` Carlos Sánchez de La Lama
  0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2016-10-24 21:08 UTC (permalink / raw)
  To: Carlos Sánchez de La Lama; +Cc: guix-devel

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’.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] gnu: %static-inputs: Use bash from PATH in bootstrap tar.
  2016-10-24 21:08     ` Ludovic Courtès
@ 2016-10-25  7:33       ` Carlos Sánchez de La Lama
  0 siblings, 0 replies; 8+ messages in thread
From: Carlos Sánchez de La Lama @ 2016-10-25  7:33 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-10-25  7:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-18 15:55 [PATCH] gnu: %static-inputs: Use bash from PATH in bootstrap tar Carlos Sánchez de La Lama
2016-10-19 15:34 ` Ludovic Courtès
2016-10-19 17:13   ` Efraim Flashner
2016-10-19 19:48     ` Ludovic Courtès
2016-10-19 20:00       ` Efraim Flashner
2016-10-24  6:59   ` Carlos Sánchez de La Lama
2016-10-24 21:08     ` Ludovic Courtès
2016-10-25  7:33       ` Carlos Sánchez de La Lama

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