From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id wCIKO5u1cGdPFQEA62LTzQ:P1 (envelope-from ) for ; Sun, 29 Dec 2024 02:36:12 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id wCIKO5u1cGdPFQEA62LTzQ (envelope-from ) for ; Sun, 29 Dec 2024 03:36:12 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=vlo102r7; dkim=fail ("headers eddsa verify failed") header.d=josefsson.org header.s=ed2303 header.b=RxyC1YR0; dkim=fail ("headers rsa verify failed") header.d=josefsson.org header.s=rsa2303 header.b=hBCo5CC1; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735439771; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature:openpgp:openpgp; bh=p+xpHxsq/hHiAwcjkWVsX2G4xFq12VPF7H8bhXTDFs8=; b=kELn5vofnOETBPqKBZbVpF2M9mtw1/tf9dB4lEBikX6TlCJaVoakTPummdcV7Y/M4TeuaK cDgFo8zEyJstBXmlltaXDz02XaC1VpAtwV5zZqWWwJPqEZqlA7hQos6I9RRcFsi1DpVV5/ bMOVx3RK+T3JwTGPzjHF3UsJS42OE3TQMw24valmOxveBbn4hsugjSjc1dNouVuhjXqajN PpCaHAxFeTHvsqrKtID+GJtQBJXNjnM+FBhdAR3z01S3OZZr8oQ/A9djfUjXonEDeg+0ax qO3HvEMZo2oaqP5MtgEOlqfZhee5kJpYcW5AdyGZisEXqPMr0ZgaLjQXM/T3Hw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=vlo102r7; dkim=fail ("headers eddsa verify failed") header.d=josefsson.org header.s=ed2303 header.b=RxyC1YR0; dkim=fail ("headers rsa verify failed") header.d=josefsson.org header.s=rsa2303 header.b=hBCo5CC1; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735439771; a=rsa-sha256; cv=none; b=E/Ukh1s2RDmVLQHs7THGCG/JORqMTE8ME9SPU+xAA1qjqS7FAKeKLY5mL6JvGSyTAMDJV/ 6dVCbcww61kdSn5E7r4rKscGdNOJsiZZr7wQTCEvn6BdkeXgCq8XFjSQWbAuEH6mAoHi0e uIS5LyJuUBYSk6hvHaNLFKVU8nYsUtXAmizMPXe9wblOemSMGXD6RnNk7r4XIkNnOzkE1n SEp2aAtxjNUsDvunDACn/nSYBL1wh/zabQtRYjI4DLAf+znKlLLvgDu/PfhFRoeRNBoeD1 Spct/qJEBgfn6Erb+pJT3QEwd76+wnkn2aXiPNeHFrDICwthHiKsVqvNt3lN0g== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 268E07882E for ; Sun, 29 Dec 2024 03:36:11 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRj9w-0002La-Fq; Sat, 28 Dec 2024 21:36:04 -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 ) id 1tRj9u-0002LF-QN for guix-patches@gnu.org; Sat, 28 Dec 2024 21:36:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tRj9u-0007bu-EQ for guix-patches@gnu.org; Sat, 28 Dec 2024 21:36:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:In-Reply-To:Date:References:From:To:Subject; bh=p+xpHxsq/hHiAwcjkWVsX2G4xFq12VPF7H8bhXTDFs8=; b=vlo102r7LQCMuwLD0oqOKI4vXm0RW2VbYfdm1q6KMI/DIM6PIZ7PisPPTfa32a5DMXMGrFu0QxTbKzWKNSrIS4eBjOoHzZsptZxSHDTve2v9jbfmUyM/QS19bD2eyNEgn4v/ps8AZseLkIIsb+Dex642DrLovQ/VQq4KVs/hKRd/lypNGAUevI+3Mxf8N8GlYcRVwx1RBbvbUSp+QfaOWkQcwVFiKn0SX5mhDs7T08gV2v79EBBlvUC9O+/Yu4pj3JrNx/6i5NRIWn3cNOeh7Nmli+rLt0/5A+9zRzzjkjlal/b472Y4r4x3qzKSEf4G/nUBzp01iIbNj0lM/+kyAg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tRj9u-0001LE-8A for guix-patches@gnu.org; Sat, 28 Dec 2024 21:36:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#74962] [PATCH v3 4/5] etc/guix-install.sh: Remove 'which' commands from requirements. Resent-From: Simon Josefsson Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 29 Dec 2024 02:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74962 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: Mathieu Othacehe , Ludovic =?UTF-8?Q?Court=C3=A8s?= , 74962@debbugs.gnu.org, Josselin Poiret , Janneke Nieuwenhuizen Received: via spool by 74962-submit@debbugs.gnu.org id=B74962.17354397495111 (code B ref 74962); Sun, 29 Dec 2024 02:36:02 +0000 Received: (at 74962) by debbugs.gnu.org; 29 Dec 2024 02:35:49 +0000 Received: from localhost ([127.0.0.1]:53240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRj9h-0001KM-6u for submit@debbugs.gnu.org; Sat, 28 Dec 2024 21:35:49 -0500 Received: from uggla.sjd.se ([178.174.241.107]:40368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRj9e-0001K9-QD for 74962@debbugs.gnu.org; Sat, 28 Dec 2024 21:35:47 -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:In-Reply-To :Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description; bh=p+xpHxsq/hHiAwcjkWVsX2G4xFq12VPF7H8bhXTDFs8=; t=1735439737; x=1736649337; b=RxyC1YR0VP1tnW14UWWAJdYZ72G8oZYi1DsD+WwV0rsq0S+SLXoU7tuR0H3FU/F5jmK3w+WdJpH VJKBWasgrBg==; 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: In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=p+xpHxsq/hHiAwcjkWVsX2G4xFq12VPF7H8bhXTDFs8=; t=1735439737; x=1736649337; b=hBCo5CC1HPU185OYMsZpVIluJ3HoqEcehyID+NLhRerwq5H/4irXcn+xaVnQw7hIlrfI5aYqyEF 6WPfXe0/LmoY6JYpHak/LU4hIeubBS3P9qpXZcLPUbv8SNsUhdWWTp1aDJR8mprIHGEnbrWt0X+0a T5VrXUEkwTFDBvj4uSjq/9Jou2xlyrsBgHST+FGE7UMb2pIaW/mxDnmon/+izMBfl7xLGdUJOlyf0 4gJsOUxLEO2oChCqfIGKVnV/CGSIbSXwh/dL68lbBtLM5JN22dTeBk86tBLcb5ERFf09IXN+Y62Fq 5y/s0T6jTXElbtHydHoFTQpTOOzVL1hYAuw096Q/m3GMgKt2GKrP4mNTT5xOEwTtkSj5a7wiFpRvO yaLRO30ZY1TpQkYLu9bcxmqJDjJynrHKMv82nVlePt48B4bzcjwXe9mEBKqennJlV3EJYnl7Q; Received: from h-178-174-130-130.a498.priv.bahnhof.se ([178.174.130.130]:41906 helo=kaka) by uggla.sjd.se with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tRj7M-00DV7b-5U; Sun, 29 Dec 2024 02:33:24 +0000 References: <3d0ccfc5f28f48b0a4e513e4ebfd3018c85b4407.1734594333.git.maxim.cournoyer@gmail.com> <6d1f4ffaa70f4cfb3ed9e18b46fe3cedb44025f2.1734594333.git.maxim.cournoyer@gmail.com> <878qs2zpaf.fsf@gnu.org> <87v7v6tygi.fsf@kaka.sjd.se> <87y0zzwxyf.fsf@gnu.org> <877c7ji5qm.fsf@gmail.com> OpenPGP: id=B1D2BD1375BECB784CF4F8C4D73CF638C53C06BE; url=https://josefsson.org/key-20190320.txt X-Hashcash: 1:23:241229:janneke@gnu.org::8i3pHUeV/b9ed04v:38QT X-Hashcash: 1:23:241229:ludo@gnu.org::6f3Gxx4e/iSa8XtL:QRWP X-Hashcash: 1:23:241229:othacehe@gnu.org::PHjiMQsE5L7R21A+:b5T+ X-Hashcash: 1:23:241229:dev@jpoiret.xyz::aE1a+qJXH/9r+ki1:ejHs X-Hashcash: 1:23:241229:maxim.cournoyer@gmail.com::Erb9Qlo3a3laa0q8:YOI5 X-Hashcash: 1:23:241229:74962@debbugs.gnu.org::tXMVxjPXzuhlJplg:flib Date: Sun, 29 Dec 2024 03:33:46 +0100 In-Reply-To: <877c7ji5qm.fsf@gmail.com> (Maxim Cournoyer's message of "Sun, 29 Dec 2024 11:26:57 +0900") Message-ID: <87ed1rjjzp.fsf@kaka.sjd.se> 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" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Simon Josefsson X-ACL-Warn: , Simon Josefsson via Guix-patches From: Simon Josefsson via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Migadu-Spam-Score: -7.50 X-Spam-Score: -7.50 X-Migadu-Queue-Id: 268E07882E X-TUID: kyO/LtJx2lAm --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Maxim Cournoyer writes: > Hi, > > Ludovic Court=C3=A8s writes: > >> Simon Josefsson skribis: >> >>> Ludovic Court=C3=A8s writes: >>> >>>> Maxim Cournoyer skribis: >>>> >>>>> * etc/guix-install.sh (REQUIRE): Remove "which". Add "nologin". >>>>> (sys_create_build_user): Use 'type' instead of 'which'. >>>>> >>>>> Fixes: >>>>> Reported-by: Simon Josefsson >>>>> 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=E2=80=99m not sure what to conclu= de; >> 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. There is a difference to use bashisms in code in Guix intended to be run on bash, and code we have in the manual that is suggested to be used on other operating system as part of the Guix installation process. There appears to be no perfect solution here. I think 'command -v nologin' is the closest. Or just keep the code as-is and use 'which', but that caused my initial problem (lack of 'which'). I'd like to second-guess why we even bother with using "nologin" instead of simply hard-coding "/bin/false" or why not "/" which I suppose is not a executable shell on any system. /Simon --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIoEARYIADIWIQSjzJyHC50xCrrUzy9RcisI/kdFogUCZ3C1CxQcc2ltb25Aam9z ZWZzc29uLm9yZwAKCRBRcisI/kdFosZsAP97gBlaJ9EzzMpPMi/IJqAjNNTkJZtW JfKtyg9fFEqqTQD/XSMCekay/9/i7lwM41YfehhnMdrwgPIZ3FFc+hzG0QA= =hyVe -----END PGP SIGNATURE----- --=-=-=--