Note: I have not actually tested this on a non-BASH system yet.
Downstream Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=524332
Note: I have not actually tested this on a non-BASH system yet.
Downstream Gentoo bug: https://bugs.gentoo.org/show_bug.cgi?id=524332
ACK in principle. As you said on IRC, I'd like to have travis testing for this. Shouldn't be too hard to spawn in a new shell and export a few things as needed.
One request though.. please split into 3 commits: build/tests/gitian, that way we can backport more easily if needed.
Split
In case it's non-obvious to anyone reading after-the-fact:
This PR adds fixes for shell-scripts that needlessly used bashisms. There was previously no test for these. #5040 introduced a test, and the build failed as expected. This PR fixes the scripts and adds the test from #5040. The fact that it's green means that they're confirmed fixed.
ACK.
utACK.
Not meaning to depreciate this pull, but is there really no modern non-bash alternative to uglyness like
if test x$use_pkgconfig = x; then
I remember, from maybe 20 years ago, that constructions like that were used for compatibility with some shell from the 80's. Hasn't really anything changed on that front?
It's just so stupid to have to add a dummy string to do a string comparison, as if it's some amazing new thing. In other places we also have limits on how far we go back with regard to compatibility.
Anyhow, I was just asking. For anything worthwhile (that is actually meant to be reviewed) we should be using Python, not shellscript.
utACK.
Um, why did we make the changes within the gitian build scripts? Those, by definition, run on Ubuntu 12.04, and with bash, unless I'm missing something. I just checked gitian's source, and the build script has a hard-coded #!/bin/bash, as well as the fact that the actual command run is on-target setarch #{@arches[arch]} bash -x < var/build-script > var/build.log 2>&1
Better to use standards?
It just seems weird to me to make it ugly in the name of compatibility/reducing bashisms, in a script that will only ever be run by bash.
@Michagogo Agreed. Wouldn't have been needed for the gitian descriptors as it forces bash. It's just the basic build system that needs to be compatible between shells. @theuni We could revert this with #4727, which completely overhauls the gitian descriptors anyway.
Yea, all of the above is fine by me. I didn't argue it because they should be obsoleted soon anyway, as you said.