GNU bug report logs - #35910
[PATCH] services: Add ‘/usr/bin/env’ special file.

Previous Next

Package: guix-patches;

Reported by: Tobias Geerinckx-Rice <me <at> tobias.gr>

Date: Sun, 26 May 2019 02:08:02 UTC

Severity: normal

Tags: patch

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35910 in the body.
You can then email your comments to 35910 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#35910; Package guix-patches. (Sun, 26 May 2019 02:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 26 May 2019 02:08:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: guix-patches <at> gnu.org
Subject: [PATCH] services: Add ‘/usr/bin/env’ special file.
Date: Sun, 26 May 2019 04:06:35 +0200
* gnu/services/base.scm (%base-services): Add ‘/usr/bin/env‘ to
special-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(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index f709ca5519..444e48f137 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2016 Ricardo Wurmus <rekado <at> elephly.net>
 ;;; Copyright © 2018 Mathieu Othacehe <m.othacehe <at> gmail.com>
 ;;; Copyright © 2019 Efraim Flashner <efraim <at> flashner.co.il>
+;;; Copyright © 2019 Tobias Geerinckx-Rice <me <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#35910; Package guix-patches. (Sun, 26 May 2019 03:00:03 GMT) Full text and rfc822 format available.

Message #8 received at 35910 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 35910 <at> debbugs.gnu.org
Subject: Re: [bug#35910] [PATCH] services: Add ‘/usr/bin/env’ special file.
Date: Sun, 26 May 2019 04:59:11 +0200
[Message part 1 (text/plain, inline)]
Tobias Geerinckx-Rice wrote:
> -                                            "/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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#35910; Package guix-patches. (Wed, 29 May 2019 21:07:02 GMT) Full text and rfc822 format available.

Message #11 received at 35910 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>
Cc: 35910 <at> debbugs.gnu.org
Subject: Re: [bug#35910] [PATCH] services: Add ‘/usr/bin/env’ special file.
Date: Wed, 29 May 2019 23:06:24 +0200
Hi,

Tobias Geerinckx-Rice <me <at> tobias.gr> skribis:

> 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 related
documentation, 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’.




Information forwarded to guix-patches <at> gnu.org:
bug#35910; Package guix-patches. (Sun, 16 Jun 2019 21:26:02 GMT) Full text and rfc822 format available.

Message #14 received at 35910 <at> debbugs.gnu.org (full text, mbox):

From: Jeff Bauer <jeffrubic <at> gmail.com>
To: 35910 <at> debbugs.gnu.org
Subject: Re: [bug#35910] [PATCH] services: Add ‘/usr/bin/env’ special file.
Date: Sun, 16 Jun 2019 15:48:55 -0500
> So, do people want to add /usr/bin/env by default?  :-)

+1

This would provide some sanity in writing scripts that
could be portable between guix and non-guix systems.

I've used this in the past to write scripts what would
work between Linux and BSD systems.

-Jeff




Reply sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
You have taken responsibility. (Fri, 06 Sep 2019 10:29:02 GMT) Full text and rfc822 format available.

Notification sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
bug acknowledged by developer. (Fri, 06 Sep 2019 10:29:02 GMT) Full text and rfc822 format available.

Message #19 received at 35910-done <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: help-guix <at> gnu.org, 35910-done <at> debbugs.gnu.org
Cc: Gary Johnson <lambdatronic <at> gmail.com>
Subject: Re: Scripting guix in guile (Konrad Hinsen)
Date: Fri, 06 Sep 2019 12:28:32 +0200
[Message part 1 (text/plain, inline)]
Konrad,

Konrad Hinsen 写道:
> 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
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 04 Oct 2019 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 205 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.