all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: 74962@debbugs.gnu.org
Cc: "Simon Josefsson" <simon@josefsson.org>,
	"Maxim Cournoyer" <maxim.cournoyer@gmail.com>,
	"Janneke Nieuwenhuizen" <janneke@gnu.org>,
	"Josselin Poiret" <dev@jpoiret.xyz>,
	"Ludovic Courtès" <ludo@gnu.org>,
	"Mathieu Othacehe" <othacehe@gnu.org>
Subject: [bug#74962] [PATCH v3 4/5] etc/guix-install.sh: Remove 'which' commands from requirements.
Date: Thu, 19 Dec 2024 16:45:32 +0900	[thread overview]
Message-ID: <6d1f4ffaa70f4cfb3ed9e18b46fe3cedb44025f2.1734594333.git.maxim.cournoyer@gmail.com> (raw)
In-Reply-To: <3d0ccfc5f28f48b0a4e513e4ebfd3018c85b4407.1734594333.git.maxim.cournoyer@gmail.com>

* 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@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





  parent reply	other threads:[~2024-12-19  7:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-19  6:57 [bug#74962] [PATCH] etc/guix-install.sh: Explicit shebang to use /usr/bin/env Maxim Cournoyer
2024-12-19  7:17 ` [bug#74962] [PATCH 1/3] etc/teams.scm: Add etc/guix-install.sh to installer team scope Maxim Cournoyer
2024-12-19  7:17   ` [bug#74962] [PATCH 2/3] etc/guix-install.sh: Explicit shebang to use /usr/bin/env Maxim Cournoyer
2024-12-19  8:18     ` Janneke Nieuwenhuizen
2024-12-19 12:48       ` Maxim Cournoyer
2024-12-19  7:17   ` [bug#74962] [PATCH 3/3] etc/guix-install.sh: Fix quoting and other issues Maxim Cournoyer
2024-12-19  7:45 ` [bug#74962] [PATCH v3 1/5] etc/teams.scm: Add etc/guix-install.sh to installer team scope Maxim Cournoyer
2024-12-19  7:45   ` [bug#74962] [PATCH v3 2/5] etc/guix-install.sh: Explicit shebang to use /usr/bin/env Maxim Cournoyer
2024-12-19  7:45   ` [bug#74962] [PATCH v3 3/5] etc/guix-install.sh: Fix quoting and other issues Maxim Cournoyer
2024-12-19  7:45   ` Maxim Cournoyer [this message]
2024-12-19  7:45   ` [bug#74962] [PATCH v3 5/5] etc/guix-install.sh: Sort requirements Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6d1f4ffaa70f4cfb3ed9e18b46fe3cedb44025f2.1734594333.git.maxim.cournoyer@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=74962@debbugs.gnu.org \
    --cc=dev@jpoiret.xyz \
    --cc=janneke@gnu.org \
    --cc=ludo@gnu.org \
    --cc=othacehe@gnu.org \
    --cc=simon@josefsson.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.