Mailinglist Archive: opensuse-packaging (130 mails)
| < Previous | Next > |
Re: [opensuse-packaging] Proposal for a shell scripting policy
- From: Guido Berhoerster <guido+opensuse.org@xxxxxxxxxxxxxxxx>
- Date: Fri, 26 Mar 2010 13:03:45 +0100
- Message-id: <20100326120345.GA14893@xxxxxxxxxxxxxxxxxx>
* Michael Matz <matz@xxxxxxx> [2010-03-25 14:47]:
I agree and I can understand the concerns of maintainers about
additional workload, my only concern is/was that we might chase
a moving target as packages get added or updated.
That's a sad fact but no reason not to do somthing about it :)
BTW, it's also nowhere mandated that /bin/sh has to be the SUSv3
shell, e.g. on Solaris 10 and the now defunct SXCE it is the
Bourne shell, however there seems to be a convergence towards
offering a shell that at least supports SUSv3 (on all Linux
distros, Opensolaris, newer OS X, and HP-UX).
See above.
There is now a checkbashisms package in home:gberh, should I
submit that to devel:tools or openSUSE:Tools? I was a bit
uncomfortable with introducing a perl dependency in the dash
package. Ideally wed have a devscripts package to collect such
scripts like Fedora and Debian have.
--
Guido Berhoerster
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx
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.
I agree and I can understand the concerns of maintainers about
additional workload, my only concern is/was that we might chase
a moving target as packages get added or updated.
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.
That's a sad fact but no reason not to do somthing about it :)
BTW, it's also nowhere mandated that /bin/sh has to be the SUSv3
shell, e.g. on Solaris 10 and the now defunct SXCE it is the
Bourne shell, however there seems to be a convergence towards
offering a shell that at least supports SUSv3 (on all Linux
distros, Opensolaris, newer OS X, and HP-UX).
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.
See above.
There is now a checkbashisms package in home:gberh, should I
submit that to devel:tools or openSUSE:Tools? I was a bit
uncomfortable with introducing a perl dependency in the dash
package. Ideally wed have a devscripts package to collect such
scripts like Fedora and Debian have.
--
Guido Berhoerster
--
To unsubscribe, e-mail: opensuse-packaging+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx
| < Previous | Next > |