Hi, On Thu, 25 Mar 2010, Guido Berhoerster wrote:
So if performance is any kind of argument, I suggest Guido changes his monitoring scripts to use /bin/dash directly ;)
I already do that on my server since it's running Debian Lenny. However, I think we had agreed that performance was not the primary rationale. I don't know why everyone is so obsessed with this, bash is a nice interactive shell, but its performance and memory usage suck for not so simple use cases
Ahem, so you're arguing performance now, right after saying it's not a primary goal :-)
(and I think I demonstrated that for startup and subshell performance).
Partly. The only shell faster in startup than bash (with LANG=C and on a to-be 11.3 system) is dash (your measurement of ash must be mistaken, I can't at all reproduce it, on 11.1 and 11.3 it's consistently 5 times slower than bash). Subshell performance you're right, ksh93 of course shines, and bash is the slowest.
I still believe that we should treat bash scripts labeled as /bin/sh as bugs, but Michael is right that it doesn't justify a fatal error. Then again, we urgently need some kind of rpmlint statistic for our packages available.
It is a bug
Yes.
and it should be treated as such,
Not necessarily. It's always the question of how common that bug is, if it's so common that it became sort of it's own de-facto standard, the issues aren't black-white anymore. Don't get me wrong, I'm all for strictly adhering to standards, everybody who ever came to me with "your compiler miscompiles my code" knows that ;-) But sometimes we do implement extensions if a certain type of error became too common. You're right that the work needed to fix such bugs needs to be taken into account, which in this particular case is very low (1s/sh/bash/), per incidence. It's the sum of all those small changes I'm worried about, hence we should gradually go there, and in the mean-time not throw errors but warnings.
particularly because changing #!/bin/sh to #!/bin/bash is not that difficult. I mean you also don't specify K&R mode if you want to compile C99?
People don't think. If they write "#!/bin/sh" they don't mean 'give me a SUSv3 shell', they mean 'gimme some shell-thingy-stuff'. Most people writing shell scripts didn't ever hear about SUSv3. So it's a bit unforgiving to yell back at them saying 'Hah! Didn't you know what you were requesting?', true as it might be.
I still think it is possible, certainly not before 11.3 but as a long term goal. However, at one point in time we need to say that all _newly written_ maintainer scripts must be tested with dash if they specify /bin/sh and that packages are tested on a system with /bin/sh pointing to dash.
That's okay to _require_ after most of the work is already done. Until then it can only be a friendly request. Ciao, Michael. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org