Re: bash exorcism experiment ('bug' 762923 & 763012)
On Fri, Oct 03, 2014 at 10:42:56AM +1000, Russell Stuart wrote:
> On Fri, 2014-10-03 at 00:04 +0000, brian m. carlson wrote:
> > Unfortunately, some developers have outright refused to make their
> > software using /bin/sh work with posh, even when provided with a patch
> > (e.g. #309415), to the point that last time I tried to use posh
> > as /bin/sh, the system wouldn't boot.
> If I understand what you are saying correctly this means policy 10.4 is
> mostly ignored.
I think you're making the mistake of inferring from a few notable
failures that the whole thing is broken. It's not. Policy 10.4 has
been incredibly useful in practice to short-circuit a whole load of what
would otherwise have been repetitive and time-wasting arguments about
what shells we ought to support, by having the argument once and then
being able to refer to its results in test code, bug reports, and so on.
Most people who don't care too much about the specifics will go along
with it and fix things up along with the various other things they do,
and it's been very useful in harnessing the efforts of a long tail of
developers that way.
> If we want Debian policy to reflect reality and make it easy for
> developers to test their scripts conform to policy, then it should say
> "#!/bin/sh" scripts must work with dash.
If we were to decide that #309415 should be fixed in policy (and hence
posh), then it should be done by requiring support for the obsolescent
XSI extensions test -a and test -o. I might even have supported that
once except that the rules for parsing those are headache-inducing; yes,
I'm sure shell implementers can manage them, but they're a lot of
complexity to stuff into what people intuitively expect to be a simple
primitive operation. As it is, I think recent versions of POSIX make an
excellent argument for why they're a terrible idea, and I've generally
found upstreams to be receptive to patches to avoid them.
Colin Watson [firstname.lastname@example.org]