From unknown Fri Jun 20 07:19:47 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#34279 <34279@debbugs.gnu.org> To: bug#34279 <34279@debbugs.gnu.org> Subject: Status: guix-install.sh: uses /bin/bash shebang Reply-To: bug#34279 <34279@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:19:47 +0000 retitle 34279 guix-install.sh: uses /bin/bash shebang reassign 34279 guix submitter 34279 Claes Wallin (=E9=9F=8B=E5=98=89=E8=AA=A0) severity 34279 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 01 11:12:00 2019 Received: (at submit) by debbugs.gnu.org; 1 Feb 2019 16:12:00 +0000 Received: from localhost ([127.0.0.1]:55182 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gpbQ7-0003p3-K0 for submit@debbugs.gnu.org; Fri, 01 Feb 2019 11:11:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37248) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gparZ-0002rZ-U8 for submit@debbugs.gnu.org; Fri, 01 Feb 2019 10:36:18 -0500 Received: from lists.gnu.org ([209.51.188.17]:47936) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gparU-0005i0-LR for submit@debbugs.gnu.org; Fri, 01 Feb 2019 10:36:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51630) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gparS-0006mz-0g for bug-guix@gnu.org; Fri, 01 Feb 2019 10:36:12 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_EXCESS_BASE64,RCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gparR-0005gv-Db for bug-guix@gnu.org; Fri, 01 Feb 2019 10:36:09 -0500 Received: from mail-it1-f177.google.com ([209.85.166.177]:51459) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gparR-0005eG-9G for bug-guix@gnu.org; Fri, 01 Feb 2019 10:36:09 -0500 Received: by mail-it1-f177.google.com with SMTP id w18so9694856ite.1 for ; Fri, 01 Feb 2019 07:36:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=zXAoLU9ZwUltbh+fr2WhNe+y54DocbF8hbZHtsOwM4Y=; b=IsBCZ0EFMQWD0AQMsSRiosBDwvkop96KhbhG08f4+/J1633ljSpp31pYgwHZFH6Whx mRnXVxlsLARGrogFkU57kFMPusv123eZSJh9owqTI92f6aiSgtHA6z/nq7D2hv716MbI Ze5m1KTHEK0UfqkHP6n51KxI1IYKThyA23xHHnNY4eKI4yUbZUFroKqqIUDxpKAClNIb OM0XjgfSy56LAp+wphOUu94LzU+3Tq8rQHgwXKOgRDy/tc7kxM5Dycryd3Ip7Sl6Z/LN 5+vs1ydDAfWH9gPPqo0yAmesofiamNBwWidsSRk9y4evNv4cqdhjNxtulrB3F/5Fy+CP +tOw== X-Gm-Message-State: AHQUAuZ7WN5Y/CvBSoJVG6ZC8grfvX0CxgAHfeQe4WWn5Wjj0IFwTTwS L2gbBBpTX4cmNyCRn+JaHeDw6yeAkn/NPF0fb2qdjbn6jeo= X-Google-Smtp-Source: AHgI3IbtKWZEF1kV/YeOCuu7ANFb3zYqZV2l8hu41Qy+6Qr7jnzM21Qjb7wlcySE76kYxK8CRtgl5vxEUYwku27YX30= X-Received: by 2002:a24:ac02:: with SMTP id s2mr1849794ite.94.1549035367445; Fri, 01 Feb 2019 07:36:07 -0800 (PST) MIME-Version: 1.0 From: =?UTF-8?B?Q2xhZXMgV2FsbGluICjpn4vlmInoqqAp?= Date: Fri, 1 Feb 2019 16:35:56 +0100 Message-ID: Subject: guix-install.sh: uses /bin/bash shebang To: bug-guix@gnu.org Content-Type: text/plain; charset="UTF-8" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.166.177 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This means ./guix-install.sh doesn't work on e.g. NixOS. :-) Please use /usr/bin/env bash. The manual workaround is obvious, but this is a thousand-papercuts bug. Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (clacke[at]gmail.com) 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 0.1 FROM_EXCESS_BASE64 From: base64 encoded unnecessarily X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 01 Feb 2019 11:11:57 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.1 (/) This means ./guix-install.sh doesn't work on e.g. NixOS. :-) Please use /usr/bin/env bash. The manual workaround is obvious, but this is a thousand-papercuts bug. From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 04 16:26:11 2019 Received: (at 34279) by debbugs.gnu.org; 4 Feb 2019 21:26:11 +0000 Received: from localhost ([127.0.0.1]:59769 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqlkp-0000JZ-Iv for submit@debbugs.gnu.org; Mon, 04 Feb 2019 16:26:11 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:40542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqlkm-0000JQ-9q for 34279@debbugs.gnu.org; Mon, 04 Feb 2019 16:26:09 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 37DE5BAA3; Mon, 4 Feb 2019 22:26:06 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2VnCJrGV5MmL; Mon, 4 Feb 2019 22:26:04 +0100 (CET) Received: from ribbon (unknown [IPv6:2a01:e0a:1d:7270:af76:b9b:ca24:c465]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 5DEB0B91C; Mon, 4 Feb 2019 22:26:04 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Claes Wallin (=?utf-8?B?6Z+L5ZiJ6Kqg?=) Subject: Re: bug#34279: guix-install.sh: uses /bin/bash shebang References: X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 16 =?utf-8?Q?Pluvi=C3=B4se?= an 227 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 04 Feb 2019 22:26:03 +0100 In-Reply-To: ("Claes Wallin \=\?utf-8\?B\?KOmfi+WYieiqoCkiJ3M\=\?\= message of "Fri, 1 Feb 2019 16:35:56 +0100") Message-ID: <87lg2vp7o4.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 34279 Cc: 34279@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Claes Wallin (=E9=9F=8B=E5=98=89=E8=AA=A0) skribis: > This means ./guix-install.sh doesn't work on e.g. NixOS. :-) > > Please use /usr/bin/env bash. /usr/bin/env wouldn=E2=80=99t work on Guix System by default. :-) What about something like this: --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 8eb5214049..dc8de2fe92 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # GNU Guix --- Functional package management for GNU # Copyright =C2=A9 2017 sharlatan # Copyright =C2=A9 2018 Ricardo Wurmus @@ -19,6 +19,13 @@ # You should have received a copy of the GNU General Public License # along with GNU Guix. If not, see . =20 +# We require Bash but for portability we'd rather not use /bin/bash or +# /usr/bin/env in the shebang, hence this hack. +if [ "x$BASH_VERSION" =3D "x" ] +then + exec bash "$0" "$@" +fi + set -e =20 [ "$UID" -eq 0 ] || { echo "This script must be run as root."; exit 1; } --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 DQpUaGFua3MsDQpMdWRv4oCZLg0K --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 04 20:42:42 2019 Received: (at 34279) by debbugs.gnu.org; 5 Feb 2019 01:42:42 +0000 Received: from localhost ([127.0.0.1]:59947 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqpl3-0000YS-VS for submit@debbugs.gnu.org; Mon, 04 Feb 2019 20:42:42 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21134) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqpl0-0000YI-Mu for 34279@debbugs.gnu.org; Mon, 04 Feb 2019 20:42:40 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1549317370; cv=none; d=zoho.com; s=zohoarc; b=HaAAiG7U3whjdMnxcUEnQ3w1dmQNGQVm1m/8SWMCeQIzPtZiaKd8Se5kW96Q6LhNWJ+CQ9pMo9koaRcxVE7xfsqJfoiAcQO0gZ+VMewkqrE25fop3jOAW/9b+OJ+khaaBmpaprtjK6ylahd7wWsgwN1we+HvuHDzyZshqcnQPhI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1549317370; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=5TkcObv2AMBzZOS/8sBVmDy4dMhzVdjO1Zop93dvXOE=; b=V6kgbva8M1yyYhmaU+xLfbBHZOgchkLAipfLfZuaHqslVeqcuDhTTbfYvIk+XoCbj71Crtrqf7dMgWPj67fmo3Tl0W4cahPl53sqGKBW82mtOtvFHEeaSLMehLltKpjOIavuoAtuYTSyN9stQ+Ynvr9SGkFTMWxjkx1meUMz5dI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1549317370; s=zoho; d=elephly.net; i=rekado@elephly.net; h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; l=654; bh=5TkcObv2AMBzZOS/8sBVmDy4dMhzVdjO1Zop93dvXOE=; b=X4Qz8JPv8c/4P90r5Fn0/HMZ2YB3NY+579ZhStBYCb1BKk76AYlzj4XG9wT3WdvC MhVwTv36l2Gk816Ra/wTHmeoc3+LX9xUnlBNUheb21qDxCSxvJc48SSXG/qPPejbE5M k1OzZisndx1iRWVEpwT0MyWEkvo+mkRmE7eEAQak= Received: from localhost (p578E68C8.dip0.t-ipconnect.de [87.142.104.200]) by mx.zohomail.com with SMTPS id 1549317366203765.716998584011; Mon, 4 Feb 2019 13:56:06 -0800 (PST) References: <87lg2vp7o4.fsf@gnu.org> User-agent: mu4e 1.0; emacs 26.1 From: Ricardo Wurmus To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#34279: guix-install.sh: uses /bin/bash shebang In-reply-to: <87lg2vp7o4.fsf@gnu.org> X-URL: https://elephly.net X-PGP-Key: https://elephly.net/rekado.pubkey X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC Date: Mon, 04 Feb 2019 22:56:01 +0100 Message-ID: <877eefi5fy.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 34279 Cc: Claes Wallin , 34279@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ludovic Court=C3=A8s writes: > Hi, > > Claes Wallin (=E9=9F=8B=E5=98=89=E8=AA=A0) skribi= s: > >> This means ./guix-install.sh doesn't work on e.g. NixOS. :-) >> >> Please use /usr/bin/env bash. > > /usr/bin/env wouldn=E2=80=99t work on Guix System by default. :-) =E2=80=9Cguix-install.sh=E2=80=9D arguably would not primarily be executed = on a Guix system. > +# We require Bash but for portability we'd rather not use /bin/bash or > +# /usr/bin/env in the shebang, hence this hack. > +if [ "x$BASH_VERSION" =3D "x" ] > +then > + exec bash "$0" "$@" > +fi > + Neat! -- Ricardo From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 05 06:04:52 2019 Received: (at 34279-done) by debbugs.gnu.org; 5 Feb 2019 11:04:52 +0000 Received: from localhost ([127.0.0.1]:60236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqyX6-0006LG-87 for submit@debbugs.gnu.org; Tue, 05 Feb 2019 06:04:52 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:53038) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gqyX3-0006L5-83 for 34279-done@debbugs.gnu.org; Tue, 05 Feb 2019 06:04:50 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id B1B7CBEDC; Tue, 5 Feb 2019 12:04:46 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hkH2p7ZslUBQ; Tue, 5 Feb 2019 12:04:45 +0100 (CET) Received: from ribbon (unknown [IPv6:2001:660:6102:320:e120:2c8f:8909:cdfe]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 61104BDD3; Tue, 5 Feb 2019 12:04:45 +0100 (CET) From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Claes Wallin (=?utf-8?B?6Z+L5ZiJ6Kqg?=) Subject: Re: bug#34279: guix-install.sh: uses /bin/bash shebang References: <87lg2vp7o4.fsf@gnu.org> Date: Tue, 05 Feb 2019 12:04:44 +0100 In-Reply-To: <87lg2vp7o4.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 04 Feb 2019 22:26:03 +0100") Message-ID: <87ftt2jy2b.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 34279-done Cc: 34279-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Ludovic Court=C3=A8s skribis: > What about something like this: > > diff --git a/etc/guix-install.sh b/etc/guix-install.sh > index 8eb5214049..dc8de2fe92 100755 > --- a/etc/guix-install.sh > +++ b/etc/guix-install.sh > @@ -1,4 +1,4 @@ > -#!/bin/bash > +#!/bin/sh > # GNU Guix --- Functional package management for GNU > # Copyright =C2=A9 2017 sharlatan > # Copyright =C2=A9 2018 Ricardo Wurmus > @@ -19,6 +19,13 @@ > # You should have received a copy of the GNU General Public License > # along with GNU Guix. If not, see . >=20=20 > +# We require Bash but for portability we'd rather not use /bin/bash or > +# /usr/bin/env in the shebang, hence this hack. > +if [ "x$BASH_VERSION" =3D "x" ] > +then > + exec bash "$0" "$@" > +fi Pushed as f5fdc54d3a0845d0590c181d3bd6016f22765431. Ludo=E2=80=99. From unknown Fri Jun 20 07:19:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 05 Mar 2019 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator