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 #26 received at 74962 <at> debbugs.gnu.org (full text, mbox):

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 74962 <at> debbugs.gnu.org
Cc: Simon Josefsson <simon <at> josefsson.org>,
 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: [PATCH v3 4/5] etc/guix-install.sh: Remove 'which' commands from
 requirements.
Date: Thu, 19 Dec 2024 16:45:32 +0900
* 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
---

Changes in v3:
 - New.

 etc/guix-install.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 8d3d9d224b..fb22287cf4 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -58,7 +58,7 @@ REQUIRE=(
     "wget"
     "gpg"
     "grep"
-    "which"
+    "nologin"
     "sed"
     "sort"
     "getent"
@@ -429,12 +429,12 @@ sys_create_build_user()
         if id "guixbuilder${i}" &>/dev/null; then
             _msg "${INF}user is already in the system, reset"
             usermod -g guixbuild -G "guixbuild${KVMGROUP}"     \
-                    -d /var/empty -s "$(which nologin)" \
+                    -d /var/empty -s "$(type -P nologin)" \
                     -c "Guix build user $i"             \
                     "guixbuilder${i}";
         else
             useradd -g guixbuild -G "guixbuild${KVMGROUP}"     \
-                    -d /var/empty -s "$(which nologin)" \
+                    -d /var/empty -s "$(type -P nologin)" \
                     -c "Guix build user $i" --system    \
                     "guixbuilder${i}";
             _msg "${PAS}user added <guixbuilder${i}>"
-- 
2.46.0





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.