Skip to content

configure discards a user-supplied BASH_SHELL - #907

Merged
xroche merged 5 commits into
masterfrom
fix-bash-shell-override
Jul 31, 2026
Merged

configure discards a user-supplied BASH_SHELL#907
xroche merged 5 commits into
masterfrom
fix-bash-shell-override

Conversation

@xroche

@xroche xroche commented Jul 31, 2026

Copy link
Copy Markdown
Owner

Follow-up to #898, which introduced BASH_SHELL and unset it first so a preset value could never defeat the search. That also threw away an explicit ./configure BASH_SHELL=/path, so on a machine whose first bash on PATH is old or runs in POSIX mode there was no way to point the build elsewhere. BASH needed the guard because bash presets it; BASH_SHELL is our own name and nothing presets it, so AC_ARG_VAR is enough, and it documents the knob in configure --help.

xroche and others added 5 commits July 31, 2026 10:10
AS_UNSET erased the variable before AC_PATH_PROGS could honour it, so
"./configure BASH_SHELL=/path" had no effect and there was no way to
point the build at a bash other than the first one on PATH. Nothing
presets BASH_SHELL, which was the whole problem with BASH in #895, so
declaring it precious is enough.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
An in-tree build leaves a config.status in srcdir, and autoconf then refuses
the out-of-tree run the test needs. Every CI build leg builds in-tree, so the
check failed there while passing on an out-of-tree tree.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
The nested configure ran without the flags the outer one was given, so on
macOS it died at the openssl check that Homebrew paths satisfy. BASH_SHELL
is resolved long before that, so assert on the trace and let the run fail.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
Reading the configure trace let a mutant through: resolve the override
correctly, clobber BASH_SHELL one line later, and both assertions passed
while every Makefile got the wrong shell. Prefer the generated Makefile
and keep the trace only as a fallback for a configure that dies early.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
@xroche
xroche merged commit f3fa3a8 into master Jul 31, 2026
26 checks passed
@xroche
xroche deleted the fix-bash-shell-override branch July 31, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant