[PATCH] services: Add ‘/usr/bin/env’ special file.

DoneSubmitted by Tobias Geerinckx-Rice.
Details
3 participants
  • Jeff Bauer
  • Ludovic Courtès
  • Tobias Geerinckx-Rice
Owner
unassigned
Severity
normal
T
T
Tobias Geerinckx-Rice wrote on 26 May 2019 04:06
[PATCH] services: Add ‘/usr/bin/env ’ special file.
(address . guix-patches@gnu.org)
20190526020635.20780-1-me@tobias.gr
* gnu/services/base.scm (%base-services): Add ‘/usr/bin/env‘ tospecial-files-service-type.---
Guix,
I didn't even realise this was ‘missing’. Is there any reason not to include it next to /bin/sh?
Sure, it's not pure, but then why provide /bin/sh when nowadays /usr/bin/env is both more common, more flexible,>
Feel free to gently enlighten me.
Kind regards,
T G-R
gnu/services/base.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Toggle diff (24 lines)diff --git a/gnu/services/base.scm b/gnu/services/base.scmindex f709ca5519..444e48f137 100644--- a/gnu/services/base.scm+++ b/gnu/services/base.scm@@ -8,6 +8,7 @@ ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>+;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr> ;;; ;;; This file is part of GNU Guix. ;;;@@ -2382,6 +2383,8 @@ to handle." (service special-files-service-type `(("/bin/sh" ,(file-append (canonical-package bash)- "/bin/sh"))))))+ "/bin/sh"))+ ("/usr/bin/env" ,(file-append (canonical-package coreutils)+ "/usr/bin/env")))))) ;;; base.scm ends here-- 2.21.0
T
T
Tobias Geerinckx-Rice wrote on 26 May 2019 04:59
Re: [bug#35910] [PATCH] services: Add ‘/usr /bin/env’ special file.
(address . 35910@debbugs.gnu.org)
87h89hq5ts.fsf@nckx
Tobias Geerinckx-Rice wrote:
Toggle quote (7 lines)> - "/bin/sh"))))))> + "/bin/sh"))> + ("/usr/bin/env" ,(file-append > (canonical-package coreutils)> + > "/usr/bin/env"))))))
'course this won't work unless you, also, have the hunk
#:use-module ((gnu packages base)- #:select (canonical-package glibc glibc-utf8-locales))+ #:select (canonical-package coreutils glibc glibc-utf8-locales))
accidentally placed in another commit, which is unlikely.
Kind regards,
T G-R
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXOoBAAAKCRANsP+IT1VteQ+vAP4nEocu1EWQ6+v5RFPVmmrIEhQA2djc26FVqEjQDSJNTQEAmOJY7hnrLL1tiAGQuC73TOvTm/NACCGjG1sR+WD4Sww==QMRS-----END PGP SIGNATURE-----
L
L
Ludovic Courtès wrote on 29 May 2019 23:06
(name . Tobias Geerinckx-Rice)(address . me@tobias.gr)(address . 35910@debbugs.gnu.org)
87a7f5t1gv.fsf@gnu.org
Hi,
Tobias Geerinckx-Rice <me@tobias.gr> skribis:
Toggle quote (6 lines)> I didn't even realise this was ‘missing’. Is there any reason not to include it next to /bin/sh?>> Sure, it's not pure, but then why provide /bin/sh when nowadays /usr/bin/env is both more common, more flexible,>>> Feel free to gently enlighten me.
The ‘special-files’ service, ‘extra-special-file’, and relateddocumentation, including a snippet for adding /usr/bin/env (info "(guix)Base Services"), stem from this discussion:
https://lists.gnu.org/archive/html/guix-devel/2017-02/msg00205.html
So, do people want to add /usr/bin/env by default? :-)
Thanks,Ludo’.
J
J
Jeff Bauer wrote on 16 Jun 2019 22:48
Re: [bug#35910] [PATCH] services : Add ‘/usr/bin/env’ special file.
(address . 35910@debbugs.gnu.org)
20190616204855.GE12459@serpent
Toggle quote (2 lines)> So, do people want to add /usr/bin/env by default? :-)
+1
This would provide some sanity in writing scripts thatcould be portable between guix and non-guix systems.
I've used this in the past to write scripts what wouldwork between Linux and BSD systems.
-Jeff
T
T
Tobias Geerinckx-Rice wrote on 6 Sep 2019 12:28
Re: Scripting guix in guile (Konrad Hinsen)
(name . Gary Johnson)(address . lambdatronic@gmail.com)
87pnkdwwfj.fsf@nckx
Konrad,
Konrad Hinsen 写道:
Toggle quote (5 lines)> Is there any reason why this isn't defined by default? That > would solve> portability problems for lots of scripts, and I don't see any> disadvantage caused by this link.
It is now!
Kind regards,
T G-R
-----BEGIN PGP SIGNATURE-----
iHUEARYKAB0WIQT12iAyS4c9C3o4dnINsP+IT1VteQUCXXI00AAKCRANsP+IT1VtebAcAP9G0komXnmbyJvBICc8rquV3wQ0rY/G7hYk2ofUuE6AIAD+KvIsx9CQmOEAWyRMmxXDefDr56uDELsS0DwJOGMCdAo==G+k0-----END PGP SIGNATURE-----
Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 35910@debbugs.gnu.org