From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id OC1PBTNcymKL+gAAbAwnHQ (envelope-from ) for ; Sun, 10 Jul 2022 06:57:23 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id MNtUBDNcymIMmgAAG6o9tA (envelope-from ) for ; Sun, 10 Jul 2022 06:57:23 +0200 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 8D1E138AB for ; Sun, 10 Jul 2022 06:57:22 +0200 (CEST) Received: from localhost ([::1]:42154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oAP0T-0005hI-9Z for larch@yhetil.org; Sun, 10 Jul 2022 00:57:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36116) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAP0A-0005h8-Vp for bug-guix@gnu.org; Sun, 10 Jul 2022 00:57:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42247) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oAP0A-0007i9-Fd for bug-guix@gnu.org; Sun, 10 Jul 2022 00:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oAP0A-0004j3-Ei for bug-guix@gnu.org; Sun, 10 Jul 2022 00:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#40641: Building from git breaks when /bin/sh isn't bash Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 10 Jul 2022 04:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 40641 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: "pelzflorian (Florian Pelz)" Cc: 40641@debbugs.gnu.org, elaexuotee@wilsonb.com Received: via spool by 40641-submit@debbugs.gnu.org id=B40641.165742897918104 (code B ref 40641); Sun, 10 Jul 2022 04:57:02 +0000 Received: (at 40641) by debbugs.gnu.org; 10 Jul 2022 04:56:19 +0000 Received: from localhost ([127.0.0.1]:36144 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAOzS-0004hv-MF for submit@debbugs.gnu.org; Sun, 10 Jul 2022 00:56:19 -0400 Received: from mail-qt1-f173.google.com ([209.85.160.173]:33450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAOzQ-0004hj-LT for 40641@debbugs.gnu.org; Sun, 10 Jul 2022 00:56:17 -0400 Received: by mail-qt1-f173.google.com with SMTP id r2so3538605qta.0 for <40641@debbugs.gnu.org>; Sat, 09 Jul 2022 21:56:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=6Gri++a2tR0Pccs7JlCDuakQcEeZ+fKkPkJ+cx661gk=; b=eeHQvHq1Ll9d89XPhJCq7DjB3clUCP33MGrIdvb4WkYdMPAYVGquEd6fOGBksn8ipj OV1ZWL0T/o+0m3BOCvgP4Xp+3zHaqODA8mGiLlzhgPzst2wL5s++7No4TfzIRkEvixgZ V6CzUX9lVjumMFm/RMOZ9kMw+f76AagyOyuqjiu3OUM5hYMXBio2R83BIFVCzwEzcDhs s7ywRonIx31elPdkBnsCl0pppLJ08+Ufi2rq7hlEbplp4fOkkqKgBFLyayq2SO2JT4Dg iHtos3OtxpTT3Hj6NYwgM4JdWYVgChQzczlymrtLyn2CeY3OLKK2HcDVp3Z8uICaWH/o 6VeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=6Gri++a2tR0Pccs7JlCDuakQcEeZ+fKkPkJ+cx661gk=; b=Q9qlNp0e0BgBZVaiG4Cqt5obESvm7VHKvm07ALR53+n9vMPF90FHb8NnwDtceOkIe7 AAbVh5W1WK7NBPKWUg6PiwzsIt8lYrfK/xyKTeqtb/7oafqsk/hnEU/WgV16xjxRgc2m 0QRgumjmlVFJUjOg3ubt4KZ3OzRon3sftCi1rWRb+RrPsEHG6LtcjuqeKIgppdbAy1Tu MGucjz85G+xw7ISGlvmeT9N/FoTMT2jR79wYpWxYDoe4A0+VWz190WvYodxvhYN0YGzp uk0mi3Ripn5ZFbiy4erGfFNhnx1O0I6cGxQucAHrikk60cYAr1H/IbnrgI0cyo3e2M+Z daPQ== X-Gm-Message-State: AJIora8eEKN9JGrQkkx5zFWAcfdzUtR0CSIRbPcps3FmmL+4qBdtRi7R vNXev0ULdMbooiylgt+Mq690jj6n7Rl1/w== X-Google-Smtp-Source: AGRyM1vwuQf2Rlwzl2EzPC02/xumYIGl67VPHOxx5mRSVgamkVf+FWxObljKZBDEL8kWnPuy3QlNSQ== X-Received: by 2002:ac8:5846:0:b0:31d:40aa:4c41 with SMTP id h6-20020ac85846000000b0031d40aa4c41mr9570086qth.662.1657428970730; Sat, 09 Jul 2022 21:56:10 -0700 (PDT) Received: from hurd (dsl-10-135-142.b2b2c.ca. [72.10.135.142]) by smtp.gmail.com with ESMTPSA id w30-20020a05620a0e9e00b006b3583a106esm2899731qkm.87.2022.07.09.21.56.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Jul 2022 21:56:10 -0700 (PDT) From: Maxim Cournoyer References: <2O2NKRGHD2OZD.30CKDJBOP4LE3@wilsonb.com> <20200415122149.j7b6bcgvrp5cpq5l@pelzflorian.localdomain> <38M8QJ1PDKHCI.2ZBQF20W9BE03@wilsonb.com> <87h74tgxui.fsf@gmail.com> <20220613144005.gv2j5igdmisnaiqv@pelzflorian.localdomain> <874k0nfcq6.fsf@gmail.com> <2N3KLAV9USDUO.2FGVQNI398LFY@"@WILSONB.COM> <20220621090254.kyskzwkliku53mob@pelzflorian.localdomain> <62c2cd89.1c69fb81.7ad72.92c8SMTPIN_ADDED_BROKEN@mx.google.com> <87edywvbdz.fsf@gmail.com> <878rp4c7em.fsf@pelzflorian.de> Date: Sun, 10 Jul 2022 00:56:08 -0400 In-Reply-To: <878rp4c7em.fsf@pelzflorian.de> (pelzflorian@pelzflorian.de's message of "Fri, 08 Jul 2022 10:53:21 +0200") Message-ID: <87mtdhftw7.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1657429042; 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=6Gri++a2tR0Pccs7JlCDuakQcEeZ+fKkPkJ+cx661gk=; b=ahjL2Nkg94ireNF8Nyim2/mfCzzeLIuCzKrhqNiSe26uBdVAbAKj4GiEW1uCYOWPuHfBRA 9qpgu5N3GvOmODssbbnUMTlm+1g7J3ftKW2YAwPlZAhFkHCpk6iD66WEvgErVaOx+T2C0B SDGtrIs0mE/Sry3Toc/hZpJ5/jbHHnBVskpclSZUiLjqmZkMSPYMhH8ND9rYw+ZXdU138m oYq21hhlop2Y9XXsC0ZzmQK8D8TlAm1/oioxtbQoOfNc4m8wIHmkc0SFyu3k90zq1gBkBr P/Qrjfr5OF6bpyJIIkUfT8Q7XO7sLIZ3PMSkZsje7dO9jEiPYabDNDF175Wj5A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657429042; a=rsa-sha256; cv=none; b=ozxPKwcJ1PYJnrOcsn657ab8GQZ0JYisQ/0Ai6p9TO8lj3dhJpZgRXaEZXqDln93a+4mXV AdXxSM2DDwnI1nRqxVnq9De4lC6wmLuX4z9n9ZwnTKmEB3MLD+sXnZArD8wOYk37/NvV6U e0H42JdbY1ZNSFH1OL6TIEvP3hkiSjuFnm11JjuOPBqcYoP0oo5oo3dC2iA6ZgJRskPhnH wxdVYg0y2fEtNq0TIFtQxWKrSgVxrp9KuUOgk0VpSnkofDp+GU6O+ojPCTuKOgXHN07+k7 OFhm0GGmFJaE7DI4SynBQzvd8+Vje7nXwjceNm2G1O+LG4aMdTJxRnuvCTldKQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=eeHQvHq1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 6.05 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=eeHQvHq1; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 8D1E138AB X-Spam-Score: 6.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: 45XVFwA8b3d2 Hello, "pelzflorian (Florian Pelz)" writes: > Wait wait Maxim, the discussion was that > "B. Wilson" proposed >> [PATCH] build: Let make use its hard-coded default shell > > To: guix-patches@gnu.org >> > > * configure.ac: Set AM_SUBST_NOTMAKE([SHELL]) > > +# Use make's hard-coded default shell. The make in a guix profile > > +# defaults to the Right Thing, e.g. $GUIX_ENVIRONMENT/bin/sh >> +AM_SUBST_NOTMAKE([SHELL]) > > Then Maxim Cournoyer writes: >> This seems odd to me. Perhaps it'd be cleaner to detect which shell is > > used at configure time to detect when /bin/sh !=3D Bash, and warn that= if > > there are issues, the user should set the SHELL variable to Bash. > > elaexuotee@wilsonb.com writes: >> Excellent. I agree it's probably not worth POSIXifying the scripts. Forc= ing >> make to default to guix's bash seems like the right approach IMHO, so +1= for >> that fix. > > I think we=E2=80=99re not on the same page. Is AM_SUBST_NOTMAKE([SHELL])= really > problematic? Is seems like there is a legitimate use-case that foreign > distro users with /bin/sh =3D dash would want =E2=80=9Cguix shell -D guix= -- make=E2=80=9D > to just work without workaround? We could use elaexuotee=E2=80=99s > AM_SUBST_NOTMAKE([SHELL]) patch, could we not? Indeed, I had misunderstood, apologies. I've read the Autoconf/Automake Info manuals about AM_SUBST and AM_SUBST_NOTMAKE, but I don't have a clear understanding of the mechanisms involved. from info '(autoconf) config.status Invocation': -- Variable: CONFIG_SHELL The shell with which to run =E2=80=98configure=E2=80=99. It must be Bourne-compatible, and the absolute name of the shell should be passed. The default is a shell that supports =E2=80=98LINENO=E2=80=99= if available, and =E2=80=98/bin/sh=E2=80=99 otherwise. So it appears to me that by default, it'd look for a shell that supports LINENO if available, such as /bin/bash or something else? E.g., not use the user's SHELL environment variable directly, but that can be overridden with CONFIG_SHELL. Using AC_SUBST_NOTMAKE([SHELL]) would cause SHELL to be substituted in the build system files but prevent setting Make variables such as SHELL =3D '/bin/...' in generated Makefiles... how do that end up causing the Guix-provided Make to use its own "known" shell? It seems to me that a potential pitfall would be that by adding AC_SUBST_NOTMAKE([SHELL]), we'd change the default behavior of Autoconf, which is to honor CONFIG_SHELL and set the SHELL Make variable based on that; it seems it could be simpler to document that users on systems using a Bourne incompatible shell should set CONFIG_SHELL to a Bourne compatible one to build Guix from sources. Is someone able to explain how the suggested fix work in more details? Thanks, Maxim