-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
builds are broken on systems using dash as /bin/sh #10510
Comments
About half of the issues flagged by checkbashisms are the following: https://unix.stackexchange.com/questions/57840/posix-test-and-a That is not an actual bashism, but it is simultaneously non-portable and a pain to read, with the alternative being much more readable. @behlendorf Do you have any objections to dropping Also, we probably should create a test case using checkbashisms to minimize the possibility of future regressions once this is fixed. I am not sure how adding that to our tests would work given that we would need to install the script on the various buildbots. |
I'll admit, I've burned reviewer time identifying and eliminating bashisms in my proposed code. In my case, it got worked out, but including the checkbashisms in the test suite to would reduce reviewer burden and speedup code improvement suggestions. |
@ryao no I don't have any objection to dropping |
I worked around it in gentoo by using setting |
Actually, I believe we can close this one out. There was a lot of work done to the build system and support scripts to get rid of these kind of bashisms. We've also enabled |
We received a bug report at Gentoo regarding this:
https://bugs.gentoo.org/724452
Debian based systems use dash as /bin/sh by default and Gentoo offers it as an option. Builds on such systems were broken by ff3e2e3, but there were commits slowly breaking things well before then, such as 85ce3f4. The checkbashisms script can find some issues, although the latter commit simply breaks it. It also misses issues in shell code that gets processed by eval, which is the breakage that prompted the Gentoo bug. The following fixes the issue that got caught in the bug report:
However, this alone is insufficient to fix the build, as there are other bashisms in the code. One of us (probably me) needs to sit down and comb through the autotools code to find and squash the various bashisms. I am filing this issue in advance of a more complete patch now that the issue has been properly triaged.
The text was updated successfully, but these errors were encountered: