GNU bug report logs - #74952
[PATCH] guix-install.sh: Use "command -v nologin" instead of "which nologin".

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Simon Josefsson <simon@HIDDEN>; Keywords: patch; dated Wed, 18 Dec 2024 20:36:01 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 74952 <at> debbugs.gnu.org:


Received: (at 74952) by debbugs.gnu.org; 18 Dec 2024 21:55:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 18 16:55:31 2024
Received: from localhost ([127.0.0.1]:36310 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tO20w-0003Qe-Of
	for submit <at> debbugs.gnu.org; Wed, 18 Dec 2024 16:55:31 -0500
Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158]:50331)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1tO20u-0003QE-Ps
 for 74952 <at> debbugs.gnu.org; Wed, 18 Dec 2024 16:55:29 -0500
Received: from phl-compute-06.internal (phl-compute-06.phl.internal
 [10.202.2.46])
 by mailfhigh.stl.internal (Postfix) with ESMTP id 860422540185;
 Wed, 18 Dec 2024 16:55:23 -0500 (EST)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-06.internal (MEProxy); Wed, 18 Dec 2024 16:55:23 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=mesmtp; t=1734558923; x=
 1734645323; bh=CQpYvPXc8PCeOSkj6rgWWGUIIGCZBYsVUTHOBT03rjI=; b=N
 qMUfo8eOiFU969aZHfA6XvKt4gHhW9CathnaSRzqdrvN1Bt/oNAiefyV5EHlUQqx
 uxrsuVMxYnsweu9jytg8w5/NM8dqQX9sl4yZ8zzq8/iVtJQRdb7PSkurjznwodDO
 Rvbgk3tzvI2/PzFCmQ4jq+CMsg4oenV0NEMLoO7IgU=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=
 1734558923; x=1734645323; bh=CQpYvPXc8PCeOSkj6rgWWGUIIGCZBYsVUTH
 OBT03rjI=; b=gLhhasyeB/hk6QY15qsC5jGrX4npXKBk6VNJaJs26v8l1WvYyBF
 v4TMSI1y4bBqc+7SVnEb4y0bMqW5ltYEUKh3afTs5jOcuJ8KY1EJrEUz5pRYuE+4
 /wHVYDpIHcXpaExoDYpia3B5H9YpWYi5cBM0077p/0JDCgsGgY499NJ1iHu9Ck0u
 Whejsq0aoWoMoPDbaDD/Sp9w1817ijrgJ9KA3gJ5/r8PA7YH1/muwo+r666B+Mg6
 HI+lWM9IKHFNq8ZwopoYuWjkkhyIRJuyaT5r6jrCdk7MFbqJEaTgszacwIiEfRUn
 WbYqBi5Zmiz5O44SLByHDN4GyET86gqfY7A==
X-ME-Sender: <xms:y0RjZ-YpFKtbPO3ZeTXTtfnlczM04W4qswe5q_tPNmkvDTxTx4jk7A>
 <xme:y0RjZxaXOFECmQqMAZorvj6NS-O9UjUb3Nx4YHCY6ReWL10Wd2hO0IB7VXw1JJPkE
 EyEZ8ep3mI5hbvP4g>
X-ME-Received: <xmr:y0RjZ49wfsBqIu5gDvNsvGj1T0NvRotLcjhd6Ng-IEpeW8VyFbFqW2rDD9_10Jg57WSGCGVKgoQEr6U4uL-aeBDC>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrleekgdduheegucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
 htshculddquddttddmnecujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvden
 ucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhirdhnrg
 hmvgeqnecuggftrfgrthhtvghrnhepieetudehfeekueefleegudfhjefgleehfeeluefh
 feffgfeuudelhedvjeelieetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe
 hmrghilhhfrhhomheplhgvohesfhgrmhhulhgrrhhirdhnrghmvgdpnhgspghrtghpthht
 ohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepsghughdqghhuihigsehgnh
 hurdhorhhgpdhrtghpthhtohepjeegleehvdesuggvsggsuhhgshdrghhnuhdrohhrgh
X-ME-Proxy: <xmx:y0RjZwrTrZl3RLqZDcOPtu6zUp9Cy62_zMot_HcxYXEB-zlw1iBbDg>
 <xmx:y0RjZ5qbGRCewd-Ag6nWiSIITZsE2ND5Z7z2uRo-cw20IEdGX11JjA>
 <xmx:y0RjZ-Q4kltrCPq2_TIqPf794S3W1r-bYsBabLtJp4A_CHW3hLNzSA>
 <xmx:y0RjZ5qiLPk2z_2v26-tWvYtY7rkNIirOT1XiPmDA0ZXB7hAQShgtg>
 <xmx:y0RjZw3C_trjy1ul24KcBYFBmwm8ThHtsPQCnO0WuOOHFAyfD_LtLVLu>
Feedback-ID: i819c4023:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 18 Dec 2024 16:55:22 -0500 (EST)
Date: Wed, 18 Dec 2024 16:55:21 -0500
From: Leo Famulari <leo@HIDDEN>
To: Simon Josefsson via Bug reports for GNU Guix <bug-guix@HIDDEN>
Subject: Re: bug#74952: [PATCH] guix-install.sh: Use "command -v nologin"
 instead of "which nologin".
Message-ID: <Z2NEyYfmnuWr60r-@jasmine.lan>
References: <871py4k9v4.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <871py4k9v4.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 74952
Cc: 74952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Wed, Dec 18, 2024 at 09:35:27PM +0100, Simon Josefsson via Bug reports for GNU Guix wrote:
> Hi!
> 
> In a small container image, I do not have the 'which' tool installed.  I
> believe 'command -v' is always available since it is /bin/sh standard.
> How about changing the idiom for user/group additions from 'which' to
> 'command -v'?  See attached patch.

Agreed, I don't think we need to require `which` here.

It can also be removed from REQUIRE in 'etc/guix-install.sh'.




Information forwarded to bug-guix@HIDDEN:
bug#74952; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Dec 2024 21:55:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 18 16:55:30 2024
Received: from localhost ([127.0.0.1]:36308 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tO20w-0003Qb-AT
	for submit <at> debbugs.gnu.org; Wed, 18 Dec 2024 16:55:30 -0500
Received: from lists.gnu.org ([209.51.188.17]:54466)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1tO20u-0003QJ-Ac
 for submit <at> debbugs.gnu.org; Wed, 18 Dec 2024 16:55:28 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <leo@HIDDEN>) id 1tO20s-0004nc-H9
 for bug-guix@HIDDEN; Wed, 18 Dec 2024 16:55:26 -0500
Received: from fhigh-b7-smtp.messagingengine.com ([202.12.124.158])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <leo@HIDDEN>) id 1tO20r-0002RT-60
 for bug-guix@HIDDEN; Wed, 18 Dec 2024 16:55:26 -0500
Received: from phl-compute-06.internal (phl-compute-06.phl.internal
 [10.202.2.46])
 by mailfhigh.stl.internal (Postfix) with ESMTP id 860422540185;
 Wed, 18 Dec 2024 16:55:23 -0500 (EST)
Received: from phl-mailfrontend-01 ([10.202.2.162])
 by phl-compute-06.internal (MEProxy); Wed, 18 Dec 2024 16:55:23 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=cc:cc:content-type:content-type:date:date:from:from
 :in-reply-to:in-reply-to:message-id:mime-version:references
 :reply-to:subject:subject:to:to; s=mesmtp; t=1734558923; x=
 1734645323; bh=CQpYvPXc8PCeOSkj6rgWWGUIIGCZBYsVUTHOBT03rjI=; b=N
 qMUfo8eOiFU969aZHfA6XvKt4gHhW9CathnaSRzqdrvN1Bt/oNAiefyV5EHlUQqx
 uxrsuVMxYnsweu9jytg8w5/NM8dqQX9sl4yZ8zzq8/iVtJQRdb7PSkurjznwodDO
 Rvbgk3tzvI2/PzFCmQ4jq+CMsg4oenV0NEMLoO7IgU=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-type:content-type:date:date
 :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to
 :message-id:mime-version:references:reply-to:subject:subject:to
 :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=
 1734558923; x=1734645323; bh=CQpYvPXc8PCeOSkj6rgWWGUIIGCZBYsVUTH
 OBT03rjI=; b=gLhhasyeB/hk6QY15qsC5jGrX4npXKBk6VNJaJs26v8l1WvYyBF
 v4TMSI1y4bBqc+7SVnEb4y0bMqW5ltYEUKh3afTs5jOcuJ8KY1EJrEUz5pRYuE+4
 /wHVYDpIHcXpaExoDYpia3B5H9YpWYi5cBM0077p/0JDCgsGgY499NJ1iHu9Ck0u
 Whejsq0aoWoMoPDbaDD/Sp9w1817ijrgJ9KA3gJ5/r8PA7YH1/muwo+r666B+Mg6
 HI+lWM9IKHFNq8ZwopoYuWjkkhyIRJuyaT5r6jrCdk7MFbqJEaTgszacwIiEfRUn
 WbYqBi5Zmiz5O44SLByHDN4GyET86gqfY7A==
X-ME-Sender: <xms:y0RjZ-YpFKtbPO3ZeTXTtfnlczM04W4qswe5q_tPNmkvDTxTx4jk7A>
 <xme:y0RjZxaXOFECmQqMAZorvj6NS-O9UjUb3Nx4YHCY6ReWL10Wd2hO0IB7VXw1JJPkE
 EyEZ8ep3mI5hbvP4g>
X-ME-Received: <xmr:y0RjZ49wfsBqIu5gDvNsvGj1T0NvRotLcjhd6Ng-IEpeW8VyFbFqW2rDD9_10Jg57WSGCGVKgoQEr6U4uL-aeBDC>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrleekgdduheegucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu
 rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh
 htshculddquddttddmnecujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvden
 ucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgrrhhirdhnrg
 hmvgeqnecuggftrfgrthhtvghrnhepieetudehfeekueefleegudfhjefgleehfeeluefh
 feffgfeuudelhedvjeelieetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe
 hmrghilhhfrhhomheplhgvohesfhgrmhhulhgrrhhirdhnrghmvgdpnhgspghrtghpthht
 ohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepsghughdqghhuihigsehgnh
 hurdhorhhgpdhrtghpthhtohepjeegleehvdesuggvsggsuhhgshdrghhnuhdrohhrgh
X-ME-Proxy: <xmx:y0RjZwrTrZl3RLqZDcOPtu6zUp9Cy62_zMot_HcxYXEB-zlw1iBbDg>
 <xmx:y0RjZ5qbGRCewd-Ag6nWiSIITZsE2ND5Z7z2uRo-cw20IEdGX11JjA>
 <xmx:y0RjZ-Q4kltrCPq2_TIqPf794S3W1r-bYsBabLtJp4A_CHW3hLNzSA>
 <xmx:y0RjZ5qiLPk2z_2v26-tWvYtY7rkNIirOT1XiPmDA0ZXB7hAQShgtg>
 <xmx:y0RjZw3C_trjy1ul24KcBYFBmwm8ThHtsPQCnO0WuOOHFAyfD_LtLVLu>
Feedback-ID: i819c4023:Fastmail
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed,
 18 Dec 2024 16:55:22 -0500 (EST)
Date: Wed, 18 Dec 2024 16:55:21 -0500
From: Leo Famulari <leo@HIDDEN>
To: Simon Josefsson via Bug reports for GNU Guix <bug-guix@HIDDEN>
Subject: Re: bug#74952: [PATCH] guix-install.sh: Use "command -v nologin"
 instead of "which nologin".
Message-ID: <Z2NEyYfmnuWr60r-@jasmine.lan>
References: <871py4k9v4.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <871py4k9v4.fsf@HIDDEN>
Received-SPF: pass client-ip=202.12.124.158; envelope-from=leo@HIDDEN;
 helo=fhigh-b7-smtp.messagingengine.com
X-Spam_score_int: -27
X-Spam_score: -2.8
X-Spam_bar: --
X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
Cc: 74952 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

On Wed, Dec 18, 2024 at 09:35:27PM +0100, Simon Josefsson via Bug reports for GNU Guix wrote:
> Hi!
> 
> In a small container image, I do not have the 'which' tool installed.  I
> believe 'command -v' is always available since it is /bin/sh standard.
> How about changing the idiom for user/group additions from 'which' to
> 'command -v'?  See attached patch.

Agreed, I don't think we need to require `which` here.

It can also be removed from REQUIRE in 'etc/guix-install.sh'.




Information forwarded to bug-guix@HIDDEN:
bug#74952; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 18 Dec 2024 20:35:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Dec 18 15:35:37 2024
Received: from localhost ([127.0.0.1]:36159 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tO0ld-00080Y-8g
	for submit <at> debbugs.gnu.org; Wed, 18 Dec 2024 15:35:37 -0500
Received: from lists.gnu.org ([209.51.188.17]:43592)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <simon@HIDDEN>) id 1tO0lb-00080Q-8z
 for submit <at> debbugs.gnu.org; Wed, 18 Dec 2024 15:35:35 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <simon@HIDDEN>)
 id 1tO0la-0001kY-Ta
 for bug-guix@HIDDEN; Wed, 18 Dec 2024 15:35:34 -0500
Received: from uggla.sjd.se ([2001:9b1:8633::107])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <simon@HIDDEN>)
 id 1tO0lY-0005oP-Cy
 for bug-guix@HIDDEN; Wed, 18 Dec 2024 15:35:34 -0500
DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed;
 d=josefsson.org; s=ed2303; h=Content-Type:MIME-Version:Message-ID:Date:
 Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:
 Content-Description; bh=Tz/XzSl87a0mTHF2GxUHn5v7ZVCnvvQJJjl9coikX84=;
 t=1734554125; x=1735763725; b=c6orGYgGMAGXh/2IL+2ZyQBAmIV+yTa7GY29mAHwP9IXo1R
 8x7zt/trFQmRS40aCqSrRRrfSMDBW7j2J3lUgDQ==;
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=josefsson.org; s=rsa2303; h=Content-Type:MIME-Version:Message-ID:Date:
 Subject:To:From:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:
 Content-Description; bh=Tz/XzSl87a0mTHF2GxUHn5v7ZVCnvvQJJjl9coikX84=;
 t=1734554125; x=1735763725; b=RxhFlDSC+A1110LHXOjwZFrkFR3NoZeo0QuL/BZ1s0kBZwY
 tzTACy/fFlCwFgf9vulvm8BvzUBT6rE/j2TFSfTDt0EkMxdC65r4QiQz7a9EngaLyYdOnA+qhownd
 n4ImwWXBFhiELyEpLSUeEZnsVDKwDlyvKjIkc6XSVTOXaxxeCUN5A3rFRaILBCiY4nzD64FNsmxIK
 W4hX+B6ViQ6j+tJhQnWYzzJT2m5R2HmJvlFniX+0F4gKpuwtKvo5NM2ktRDCN6RdEXROrYb7z6jkp
 DAkBTG24xVADlNIpeDDD3DqeSIWYjjYuWyApwcnHaN7k5qu0N8tcESy+wgBumn7AtOLdTBLlZYWI7
 Rxkss1eosQDmZr8CoaGhtx79dQkw341LE/U5HTpcNcebKb+7xkWf6oriDQ3bl+6ow4U6v8rMDz4AR
 +fN/hHf7Bv13DjXm7EU/lClo;
Received: from h-178-174-130-130.a498.priv.bahnhof.se ([178.174.130.130]:59720
 helo=kaka) by uggla.sjd.se with esmtpsa (TLS1.3) tls
 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95)
 (envelope-from <simon@HIDDEN>) id 1tO0lN-00D1Nq-Jl
 for bug-guix@HIDDEN; Wed, 18 Dec 2024 20:35:21 +0000
X-Hashcash: 1:23:241218:bug-guix@HIDDEN::gjgPYbRM5Hf9Slx8:KyI+
From: Simon Josefsson <simon@HIDDEN>
To: bug-guix@HIDDEN
Subject: [PATCH] guix-install.sh: Use "command -v nologin" instead of "which
 nologin".
OpenPGP: id=B1D2BD1375BECB784CF4F8C4D73CF638C53C06BE;
 url=https://josefsson.org/key-20190320.txt
Date: Wed, 18 Dec 2024 21:35:27 +0100
Message-ID: <871py4k9v4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="==-=-=";
 micalg=pgp-sha256; protocol="application/pgp-signature"
Received-SPF: pass client-ip=2001:9b1:8633::107;
 envelope-from=simon@HIDDEN; helo=uggla.sjd.se
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

--==-=-=
Content-Type: multipart/mixed; boundary="=-=-="

--=-=-=
Content-Type: text/plain

Hi!

In a small container image, I do not have the 'which' tool installed.  I
believe 'command -v' is always available since it is /bin/sh standard.
How about changing the idiom for user/group additions from 'which' to
'command -v'?  See attached patch.

/Simon

--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline;
 filename=0001-guix-install.sh-Use-command-v-nologin-instead-of-whi.patch
Content-Transfer-Encoding: quoted-printable

From=202bc261126a84a4a9a33acea9f107ad4bdef929d0 Mon Sep 17 00:00:00 2001
From: Simon Josefsson <simon@HIDDEN>
Date: Wed, 18 Dec 2024 21:30:10 +0100
Subject: [PATCH] guix-install.sh: Use "command -v nologin" instead of "which
 nologin".

* doc/guix.texi (Build Environment Setup): Change.
* etc/guix-install.sh (sys_create_build_user): Likewise.
* gnu/machine/digital-ocean.scm (guix-infect): Update.
=2D--
 doc/guix.texi                 | 6 +++---
 etc/guix-install.sh           | 4 ++--
 gnu/machine/digital-ocean.scm | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index f7b7569887..46ceb71cde 100644
=2D-- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -944,9 +944,9 @@ Bash syntax and the @code{shadow} commands):
 # groupadd --system guixbuild
 # for i in $(seq -w 1 10);
   do
=2D    useradd -g guixbuild -G guixbuild           \
=2D            -d /var/empty -s $(which nologin)   \
=2D            -c "Guix build user $i" --system    \
+    useradd -g guixbuild -G guixbuild              \
+            -d /var/empty -s $(command -v nologin) \
+            -c "Guix build user $i" --system       \
             guixbuilder$i;
   done
 @end example
diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index f07b2741bb..44b3e62ed2 100755
=2D-- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -435,12 +435,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}     \
=2D                    -d /var/empty -s "$(which nologin)" \
+                    -d /var/empty -s "$(command -v nologin)" \
                     -c "Guix build user $i"             \
                     "guixbuilder${i}";
         else
             useradd -g guixbuild -G guixbuild${KVMGROUP}     \
=2D                    -d /var/empty -s "$(which nologin)" \
+                    -d /var/empty -s "$(command -v nologin)" \
                     -c "Guix build user $i" --system    \
                     "guixbuilder${i}";
             _msg "${PAS}user added <guixbuilder${i}>"
diff --git a/gnu/machine/digital-ocean.scm b/gnu/machine/digital-ocean.scm
index d0f0bbe4cb..5fa679ab8c 100644
=2D-- a/gnu/machine/digital-ocean.scm
+++ b/gnu/machine/digital-ocean.scm
@@ -260,7 +260,7 @@ (define os
 groupadd --system guixbuild
 for i in `seq -w 1 10`; do
    useradd -g guixbuild -G guixbuild         \
=2D           -d /var/empty -s `which nologin`  \
+           -d /var/empty -s `command -v nologin`  \
            -c \"Guix build user $i\" --system  \
            guixbuilder$i;
 done;
=2D-=20
2.46.0


--=-=-=--

--==-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iIoEARYIADIWIQSjzJyHC50xCrrUzy9RcisI/kdFogUCZ2MyDxQcc2ltb25Aam9z
ZWZzc29uLm9yZwAKCRBRcisI/kdFohOiAP9M1lkpygkqn3WVp03fj5V3wWeGYSuM
OpYEbgUfmOxwowD9E7bmWBNzJTVMGVHbpsTqperCPfJ9fvtb4E0ryV+RvwQ=
=Gd72
-----END PGP SIGNATURE-----
--==-=-=--




Acknowledgement sent to Simon Josefsson <simon@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#74952; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

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