From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4C2zOZ81y2JdEAEAbAwnHQ (envelope-from ) for ; Sun, 10 Jul 2022 22:25:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id gGmCOZ81y2KtOgEAauVa8A (envelope-from ) for ; Sun, 10 Jul 2022 22:25:03 +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 B3E572665F for ; Sun, 10 Jul 2022 22:25:03 +0200 (CEST) Received: from localhost ([::1]:53826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oAd3G-00084C-2o for larch@yhetil.org; Sun, 10 Jul 2022 15:57:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAd38-00082m-BF for bug-guix@gnu.org; Sun, 10 Jul 2022 15:57:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43916) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oAd38-0007jr-2M for bug-guix@gnu.org; Sun, 10 Jul 2022 15:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oAd38-00046x-1j for bug-guix@gnu.org; Sun, 10 Jul 2022 15: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 19: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: elaexuotee@wilsonb.com Cc: 40641@debbugs.gnu.org, "pelzflorian \(Florian Pelz\)" Received: via spool by 40641-submit@debbugs.gnu.org id=B40641.165748296615726 (code B ref 40641); Sun, 10 Jul 2022 19:57:02 +0000 Received: (at 40641) by debbugs.gnu.org; 10 Jul 2022 19:56:06 +0000 Received: from localhost ([127.0.0.1]:37813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAd2E-00045Z-5v for submit@debbugs.gnu.org; Sun, 10 Jul 2022 15:56:06 -0400 Received: from mail-qk1-f180.google.com ([209.85.222.180]:36818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAd2C-000455-IW for 40641@debbugs.gnu.org; Sun, 10 Jul 2022 15:56:04 -0400 Received: by mail-qk1-f180.google.com with SMTP id b2so27154qkk.3 for <40641@debbugs.gnu.org>; Sun, 10 Jul 2022 12:56:04 -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; bh=l3jjDAx8Mft8NDCI5aS+1jCx1/xeRu3JENv68XxZQHU=; b=kOuHqyZOeyS2SPvDPil7r4MhWOt7HPJV7WoVZO99dIGryLsJZ1U6o4CLrzP9gWx5dD O0EIZF4r2tm4YitL9wi3u2FbBH7LoODI91uxHVWKYsc5hZEjWVQAuuYdvpQZG9jOEgu7 wK7lgXc9AH9/knSUHk7CvPSdEiQOgVY7z+UBJcXbjp75smMa2oR3qtUCDcHsXLGhStPJ ttiAxR9kitAHnAxOt5Jm2uQIYH2LfE390j4KFGgevO5xBC6FqnX+Zl43/DMpzM0P31pq ThJATMzrovfPsmjRgevrafdrJVltpmb4OQ/Z/gRJ6lcoO9jeeCMX2q07HrG6/pnH/Wca BF7g== 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; bh=l3jjDAx8Mft8NDCI5aS+1jCx1/xeRu3JENv68XxZQHU=; b=KEe/D4ZPi9jXfH+mMsg4gPTcH+oMa08jX/22PrhR/OoznIMdUFSgxkbBrRgiyvpI/m uEFQ50NldbOAAUgCtZVvtxnK4CyQSI+Jml/5vZASAqZuXzfFLvHVn5if6VrYOH4O0Czi B0MFN8xeD6GZXVg4u7sVc+K10GsJyVSIaWLIoHuO70hPcFz/eZArNMOoABH65QOtnZgS te/h6q+33UNA4YYQyIq6yETDpEafLrItd51/VJtFaya086KAKIievRXN0l/6RrM2b2XO hZZWCBpc8p2SOuANBZAGltT7lGLv8s+ySsqA1Xs6L4sQz08SwlSZJ8KbJwYTRKjeTeeL StOg== X-Gm-Message-State: AJIora+n3kfJsv+F84c/dVYYQ+QKbWevG2d3PgXR6GB15QkpP78kF/u9 z9N0HOT6AMVc5+2znjOfntf67Oh4RZwudw== X-Google-Smtp-Source: AGRyM1sY7fGeEcuh8+xU6f4tltPaVSao3mSESGAr3nDe2Af2cDlsuJwFyeUVBBFTh3qYh3bk1L7NiQ== X-Received: by 2002:a05:620a:288a:b0:6b5:3d7d:5c22 with SMTP id j10-20020a05620a288a00b006b53d7d5c22mr9061114qkp.603.1657482958689; Sun, 10 Jul 2022 12:55:58 -0700 (PDT) Received: from hurd (dsl-10-135-142.b2b2c.ca. [72.10.135.142]) by smtp.gmail.com with ESMTPSA id f20-20020a05620a409400b006b5840f3eefsm1503955qko.130.2022.07.10.12.55.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Jul 2022 12:55:58 -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> <87mtdhftw7.fsf@gmail.com> <62caa649.1c69fb81.5b288.1112SMTPIN_ADDED_BROKEN@mx.google.com> Date: Sun, 10 Jul 2022 15:55:56 -0400 In-Reply-To: <62caa649.1c69fb81.5b288.1112SMTPIN_ADDED_BROKEN@mx.google.com> (elaexuotee@wilsonb.com's message of "Sun, 10 Jul 2022 19:13:24 +0900") Message-ID: <87wnckeo8j.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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=1657484703; 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: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=l3jjDAx8Mft8NDCI5aS+1jCx1/xeRu3JENv68XxZQHU=; b=U0v0JOKZmFu9Aq6fDafvoBERJ2D2d6xrXCc80Wpfk9dumhCevuz5tl0vYfkXJ+LySqSiG6 h11LfOdpuo/jgZL1xOenXEyLWj5zdKI8VIPLh9Yke6O5LmOAN5WGM/Fd6kKSHtyXbwkUJ/ mcgQlg2pXxxnveADKDAOhFHf3bOV1J6S4J0LvjFwNjbSy2mQo/O64KRigyKbraS81UMj2m Q0gBC9jJLry8unsd+DTbcqMI4qvxOdSPMDlkJcb0/DjcFh1MdLOPivGGIIaHqRjFFSRdQM 3GEHal2MtEkdWvprA0xfKDwHhs02icFK0jHJAQ83B/AMM8nUKi+kzJgKJ2w2dg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1657484703; a=rsa-sha256; cv=none; b=sOLsJ1MaTGJUU0sroVYtWg+MQB8gpthn0Rs1T2ixmpchuj9pMGNIEp84WTisZ0bJpVyFPO c0UYJwPXj5aY4sOn8YYFHoGoUYcef7usr5Pf7doXCbFB+xJQgTQUoblKwav/LW9pFpmRrL +22QAtM3yKbLaB+I2EufCCgYmaZdDXp+lYcWqDCr2jkLD5g35nZK0/flMQz3SxHnrClyit 4jUQsJmUQHMU+18YQ6NSbw58keF+fq983vLeMzn2PO3i1RAxAJkFqceRyZCtjbs40rTRPJ HGnMWsDPEJwnWpA2YkVNyPT6QbDKH/WyK1d2vLHZW+NC7UaF/fqB7Qa/V0RiZQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=kOuHqyZO; 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: 5.05 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=kOuHqyZO; 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: B3E572665F X-Spam-Score: 5.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: 7knpbpznNINE Hi, elaexuotee@wilsonb.com writes: > CONFIG_SHELL simply acts as a user override; it's not part of autoconf's core > logic. That role belongs to the SHELL macro, who's picks the first available of > the following: > > - CONFIG_SHELL environment variable, > - SHELL environment variable, or > - /bin/sh > > See autoconf's m4sugar/m4sh.m4 for the gory details. Arguably, this should > also be updated to point to a fixed /bin/sh output fallback. > > Anyway, AM_SUBST_NOTMAKE([SHELL]), cf. '(automake) Optional', simply tells > automake to not define SHELL inside the generated Makefile. This means that > make will instead use it's default, which in our case is hard-coded to the > /bin/sh in its implicit bash-minimal dependency. For detailed info about this > behaviour of make, see '(make) Choosing the Shell'. Note, however, you will > have to do a mental sed-replace of "/bin/sh" with "/bin/sh" when > reading that page. Thanks for the extra details. So if I understand correctly, and re-reading your original message, the issue is that some tests shell scripts contain Bashisms that fail to run on POSIX shells such as Dash? Couldn't we just identify these tests with the proper shebang? e.g. '#!/usr/bin/env bash' where it is required? I've just 'ln -sf $(guix build dash)/bin/dash /bin/sh && export SHELL=/bin/sh' on my Guix System, and could rebuild Guix master from scratch successfully: make[1]: Leaving directory '/home/maxim/src/guix-master' $ echo $? 0 $ ./pre-inst-env guix describe Git checkout: repository: /home/maxim/src/guix/.git/worktrees branch: test-dash-as-bin-sh commit: bf0a646a5bcde489b602c58fbb63a93acb9d08f6 $ echo $SHELL /bin/sh $ ls -al /bin/sh lrwxrwxrwx 1 root root 66 Jul 10 15:11 /bin/sh -> /gnu/store/nm0hccsphymxi8c24xmg6ixm9vcf25xb-dash-0.5.11.5/bin/dash $ grep SHELL Makefile [...] SHELL = /bin/sh I'll now try the tests. Thanks, Maxim