-
-
Notifications
You must be signed in to change notification settings - Fork 7k
m4: fix test(1) operator #19371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
m4: fix test(1) operator #19371
Conversation
|
The failing checks are connection problems with github. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe say 'Apple SecTrust' in the title or commit message to narrow the scope of the issue?
|
The problem is this becomes part of the main configure script, so all systems are affected. |
Would these |
'=' is the operator defined by POSIX, only bash supports '=='
|
I think yes. |
|
@0-wiz-0 thanks. Silly me for sticking to bash on my macos dev machine. But why was this not noticed in CI, I wonder? With what local setup do you see the problem? |
|
We have an extra check for this kind of incorrect test(1) in pkgsrc. |
macOS uses zsh by default (and previously used bash IIRC), and should not be affected. I was looking for a shellcheck solution for m4 files for a while, but didn't find any so far. It'd be super to use one if such tool existed. |
Does it blow up if we run it on the generated configure script? |
Something to try ...it took 177 seconds (on a fast machine) and Part of the problem is that lots of code is coming from autotools Maybe possible to tweak options to tame results a bit, but one run I have an open PR aiming to tidy up mainly |
|
I tried |
A heredoc within backticks: xc_tst_str=`cat <<_EOT 2>/dev/null \
| wc -l 2>/dev/null | tr -d "$xc_space$xc_tab" 2>/dev/null
unknown
unknown
unknown
_EOT` |
|
Thanks! |
|
It would be easy to run the configure script using an alternate shell in
CI (e.g. something like "busybox ash ./configure CONFIG_SHELL=ash --foo").
But, things like = vs == would probably just output a message and silently skip
whatever option was being tested so it would take some post-configure checking
that the results were as expected.
|
'=' is the operator defined by POSIX, only bash supports '=='