unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: elaexuotee@wilsonb.com
Cc: 40641@debbugs.gnu.org,
	"pelzflorian \(Florian Pelz\)" <pelzflorian@pelzflorian.de>
Subject: bug#40641: Building from git breaks when /bin/sh isn't bash
Date: Sun, 10 Jul 2022 15:55:56 -0400	[thread overview]
Message-ID: <87wnckeo8j.fsf@gmail.com> (raw)
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")

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 "<bash-minimal>/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




  parent reply	other threads:[~2022-07-10 20:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15  9:06 bug#40641: Building from git breaks when /bin/sh isn't bash elaexuotee--- via Bug reports for GNU Guix
2020-04-15 12:21 ` pelzflorian (Florian Pelz)
2020-04-17 14:57   ` elaexuotee--- via Bug reports for GNU Guix
2022-06-10  0:34     ` Maxim Cournoyer
2022-06-13 14:40       ` pelzflorian (Florian Pelz)
2022-06-14 16:09         ` Maxim Cournoyer
2022-06-21  0:20           ` elaexuotee--- via Bug reports for GNU Guix
2022-06-21  9:02             ` pelzflorian (Florian Pelz)
2022-07-04 11:22               ` elaexuotee--- via Bug reports for GNU Guix
     [not found]               ` <62c2cd89.1c69fb81.7ad72.92c8SMTPIN_ADDED_BROKEN@mx.google.com>
2022-07-07 21:52                 ` Maxim Cournoyer
2022-07-08  8:53                   ` pelzflorian (Florian Pelz)
2022-07-08  8:58                     ` pelzflorian (Florian Pelz)
2022-07-08  9:51                     ` elaexuotee--- via Bug reports for GNU Guix
2022-07-10  4:56                     ` Maxim Cournoyer
2022-07-10 10:13                       ` elaexuotee--- via Bug reports for GNU Guix
     [not found]                       ` <62caa649.1c69fb81.5b288.1112SMTPIN_ADDED_BROKEN@mx.google.com>
2022-07-10 19:55                         ` Maxim Cournoyer [this message]
2022-07-11 13:48                           ` Maxim Cournoyer
2022-07-19  4:14                             ` elaexuotee--- via Bug reports for GNU Guix
2022-07-21 15:29                               ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnckeo8j.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=40641@debbugs.gnu.org \
    --cc=elaexuotee@wilsonb.com \
    --cc=pelzflorian@pelzflorian.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).