From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id CGjdIIRNXWbjfwAAe85BDQ:P1 (envelope-from ) for ; Mon, 03 Jun 2024 06:58:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id CGjdIIRNXWbjfwAAe85BDQ (envelope-from ) for ; Mon, 03 Jun 2024 06:58:44 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=ESznR69s; dmarc=none; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717390724; a=rsa-sha256; cv=none; b=aOwdd//1klQfNjYRIqhbk8reFNN8PMYlLjkH4H83umpecEqHsekMIFrB8eQoIH9Bmkni4i PpTtBrNjN3laxD3Vx2l/YnFc+pif6YdVb1+Yh+AJyPOs/kBGgKMIb6jL7/eh6BaLXoUJi9 tyNsJmAPFe2ckynbDj+3TF/VR6J6wjV03k0Mc2SeenqOluoZyhGblDevmkK1T2C8wg7LXk CH4VGQyQupn6L/P2xy8duwNf3snwXN33W5xHXRD8SgAt9e6o6+RzSuBwiDiZR2QtqNoZfd ZjSZ5Kvx689ZSNQkh8514pxyH1iT2lPkK3Cq6g41y8XkEeqiJn9fkzdCzCdssg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none ("invalid DKIM record") header.d=freakingpenguin.com header.s=x header.b=ESznR69s; dmarc=none; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1717390724; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: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; bh=9wcqvB6zgd64tPfQ/CPL94Qbx9iJezhqarI/Iiv4DeI=; b=q/G2AnmVrNhFPTWLqzCnZ3p4MgltfdoNf5bZllb/sSMNco9/Lg9SCghe2OAOH7J81vxO7m QpH/iPcSuH94hUdkoRy7Q0dpB47hdO5AfQvwFYjjHlYyNN00sbXLyIkCWU6MwisEWfOjb8 HJICAoRH4FK0QMrphnro2D9XNx8CkK1bjIUMZl0v3Jg6cauCqlwQjakullAtl+HdWdwOTv pRbvs3GrNFB9S3d8o3/qRTjfBQrlDO+1BpKEETZJCl6x5ugrLUnoZzBrNRtwcl2Uho+9uR fdJMR709g69Nf+/0e49JusjlSsSqbJp8Etq551ztzio++4LQwUzTW94Adop5RQ== 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 5BA636AFD0 for ; Mon, 3 Jun 2024 06:58:44 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sDy6h-0004M0-9c; Sun, 02 Jun 2024 23:11:35 -0400 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 1sDy6f-0004La-AA for guix-patches@gnu.org; Sun, 02 Jun 2024 23:11:33 -0400 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 1sDmIM-0008PH-5P for guix-patches@gnu.org; Sun, 02 Jun 2024 10:34:50 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sDmIY-0006s2-3X for guix-patches@gnu.org; Sun, 02 Jun 2024 10:35:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70148] [PATCH v2] guix-install.sh: Add unique requirement for sysv init system Resent-From: Richard Sent Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 02 Jun 2024 14:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70148 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 70148@debbugs.gnu.org, zimon.toutoune@gmail.com Received: via spool by 70148-submit@debbugs.gnu.org id=B70148.171733886626352 (code B ref 70148); Sun, 02 Jun 2024 14:35:02 +0000 Received: (at 70148) by debbugs.gnu.org; 2 Jun 2024 14:34:26 +0000 Received: from localhost ([127.0.0.1]:60109 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDmHy-0006qx-Dx for submit@debbugs.gnu.org; Sun, 02 Jun 2024 10:34:26 -0400 Received: from mail-108-mta182.mxroute.com ([136.175.108.182]:44261) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDmHu-0006qn-5x for 70148@debbugs.gnu.org; Sun, 02 Jun 2024 10:34:25 -0400 Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta182.mxroute.com (ZoneMTA) with ESMTPSA id 18fd95f2d82000e2b6.001 for <70148@debbugs.gnu.org> (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Sun, 02 Jun 2024 14:34:04 +0000 X-Zone-Loop: 2846cac75cb8978da94986b49de3e4c119a94b192dec X-Originating-IP: [136.175.111.3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=freakingpenguin.com; s=x; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9wcqvB6zgd64tPfQ/CPL94Qbx9iJezhqarI/Iiv4DeI=; b=ESznR69sjnn+Mxv+w57cM1cIvR bPNPGb4/kISfcnCHyGj3FTMbs6BMXxmeEpMOEHU7vIwcsZ+tO9Y5efRrpjqeusTLizd+MTtzqIMe+ arEBkhGlEHnKuHt1OgJmule7occJrteRzwmr3FA7OwocEXPGsSphKQ62MX86ELTVdS4YRvYhpVisu P6gaqJ+h7h6O26rRvFdSLmWFNBHOFIbRiorE8JzmO0KUeKgJRD+zTmswhjCK2YeHkEEc6eRfoyq3r PkxuYB6YQEX7n3AUEcPdxTQ6+goJN0RQirJ0MwmJMvvxNWnyH6KKO95vqN30zHiVlAlV7MQpnCCqp Apv4A6sw==; From: Richard Sent In-Reply-To: <87a5k3n0eg.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Sun, 02 Jun 2024 11:45:27 +0200") References: <4e4fa72cfff690365f06c94534bc3d03ac7a3418.1712074456.git.richard@freakingpenguin.com> <4253a50c53caa41f468163c6f9f8730e86678f38.1716942966.git.richard@freakingpenguin.com> <87a5k3n0eg.fsf@gnu.org> Date: Sun, 02 Jun 2024 10:33:56 -0400 Message-ID: <87ikyre7mz.fsf@freakingpenguin.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Authenticated-Id: richard@freakingpenguin.com 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: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 5BA636AFD0 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -6.34 X-Spam-Score: -6.34 X-TUID: /TG31I1sCyP1 Hi Ludo! Ludovic Court=C3=A8s writes: > =E2=80=98local=E2=80=99, [[, and arrays are probably Bash-specific. Howe= ver this is a > #!/bin/sh script, and some systems such as Debian use Dash as /bin/sh. > So I=E2=80=99m afraid the script would break on such systems. > > WDYT? Do you think we can avoid those features? Right, I did notice that. A strictly 100% POSIX-compliant shell doesn't support local, arrays, or [[]] constructs. From my understanding Dash supports 1 and /maybe/ 3, but not 2. However, the script already contains provisions to enter bash even if launc= hed using a POSIX-complaint shell. See this at the beginning: --8<---------------cut here---------------start------------->8--- if [ "x$BASH_VERSION" =3D "x" ] then exec bash "$0" "$@" fi --8<---------------cut here---------------end--------------->8--- This construct is a little bit odd to me. At the time it was added ( by you ;) ) because /usr/bin/env did not exist on Guix System [1], but that's been added since [2]. Perhaps we should change the shebang to #!/usr/bin/env bash. (Also looks like the comment you wrote re. bash was spliced away from the code.) --8<---------------cut here---------------start------------->8--- # We require Bash but for portability we'd rather not use /bin/bash or # /usr/bin/env in the shebang, hence this hack. # Environment variables ....... if [ "x$BASH_VERSION" =3D "x" ] ....... --8<---------------cut here---------------end--------------->8--- The script is already using all 3 of these constructs too. [1]: https://issues.guix.gnu.org/34279 [2]: https://issues.guix.gnu.org/35910 --=20 Take it easy, Richard Sent Making my computer weirder one commit at a time.