GNU bug report logs - #74962
[PATCH] etc/guix-install.sh: Explicit shebang to use /usr/bin/env.

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Thu, 19 Dec 2024 06:59:02 UTC

Severity: normal

Tags: patch

Full log


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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Simon Josefsson <simon <at> josefsson.org>, Josselin Poiret <dev <at> jpoiret.xyz>,
 Mathieu Othacehe <othacehe <at> gnu.org>, 74962 <at> debbugs.gnu.org,
 Janneke Nieuwenhuizen <janneke <at> gnu.org>
Subject: Re: [bug#74962] [PATCH v3 4/5] etc/guix-install.sh: Remove 'which'
 commands from requirements.
Date: Sun, 29 Dec 2024 11:26:57 +0900
Hi,

Ludovic Courtès <ludo <at> gnu.org> writes:

> Simon Josefsson <simon <at> josefsson.org> skribis:
>
>> Ludovic Courtès <ludo <at> gnu.org> writes:
>>
>>> Maxim Cournoyer <maxim.cournoyer <at> gmail.com> skribis:
>>>
>>>> * etc/guix-install.sh (REQUIRE): Remove "which".  Add "nologin".
>>>> (sys_create_build_user): Use 'type' instead of 'which'.
>>>>
>>>> Fixes: <https://issues.guix.gnu.org/74952>
>>>> Reported-by: Simon Josefsson <simon <at> josefsson.org>
>>>> Change-Id: I0675716bab3fc22d3289ee7af2cb0ab33a1cee71
>>>
>>> LGTM.
>>
>> Using 'type -P' is not POSIX and neither /bin/dash nor /bin/gash
>> supports it.  It seems like a GNU bash extension.  Is that okay?
>
> Oh, not great.  From what you write, I’m not sure what to conclude;
> just skip this patch and be done with it?

We currently use other Bash-specific features, so I think it's fine to
embrace the Bash requirement instead of shying away from it.

If we decide that we don't want Bash as a requirement at some point,
we'll have to change a bunch of things; one of them would be to no
longer make use of arrays since POSIX shells don't have them, for
example.

-- 
Thanks,
Maxim




This bug report was last modified 167 days ago.

Previous Next


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