-
Notifications
You must be signed in to change notification settings - Fork 38.6k
configure.ac: remove Bashism #23557
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
configure.ac: remove Bashism #23557
Conversation
|
Concept ACK. It seems the proper way to achieve |
|
Is there a way to turn the warning into an error? We use dash in the CI, but no one is going to read the logs to find those errors. |
On my Gentoo system, because this particular mistake is so common, I have a post-configure check on all builds: It's a brittle check, but it's helped me catch and fix at least a dozen Bashisms in various packages. |
|
ACK cf72925. |
|
Code review ACK cf72925 Obvious agree that it would be good if these kind of errors were actually fatal errors. |
cf72925 configure.ac: remove Bashism (Matt Whitlock) Pull request description: Configure scripts are supposed to adhere to the POSIX shell language. The POSIX `test` builtin does not implement an `==` operator. Bash does, but not all systems have Bash installed as `/bin/sh`. In particular, many systems use the lighter-weight Dash as the default POSIX shell. Dash emits the following error when running `configure`: ``` ./configure: 39065: test: xno: unexpected operator ``` This PR removes the Bashism and restores correct operation with POSIX-compliant shells like Dash. ACKs for top commit: katesalazar: ACK cf72925. laanwj: Code review ACK cf72925 Tree-SHA512: 578c873fba52e0472baed9e024bddcf58a0e088600bd5854f3011f1f8d135773ad923bb16baefc960d17ecedee9cc980b36aaa70fb32eb9bc7de93f7fe60541d
cf72925 configure.ac: remove Bashism (Matt Whitlock) Pull request description: Configure scripts are supposed to adhere to the POSIX shell language. The POSIX `test` builtin does not implement an `==` operator. Bash does, but not all systems have Bash installed as `/bin/sh`. In particular, many systems use the lighter-weight Dash as the default POSIX shell. Dash emits the following error when running `configure`: ``` ./configure: 39065: test: xno: unexpected operator ``` This PR removes the Bashism and restores correct operation with POSIX-compliant shells like Dash. ACKs for top commit: katesalazar: ACK cf72925. laanwj: Code review ACK cf72925 Tree-SHA512: 578c873fba52e0472baed9e024bddcf58a0e088600bd5854f3011f1f8d135773ad923bb16baefc960d17ecedee9cc980b36aaa70fb32eb9bc7de93f7fe60541d
Configure scripts are supposed to adhere to the POSIX shell language. The POSIX
testbuiltin does not implement an==operator. Bash does, but not all systems have Bash installed as/bin/sh. In particular, many systems use the lighter-weight Dash as the default POSIX shell. Dash emits the following error when runningconfigure:This PR removes the Bashism and restores correct operation with POSIX-compliant shells like Dash.