[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Proposed new POSIX sh policy

Jari Aalto <jari.aalto@cante.net> writes:


> All discussion about "policy has problems" is really due to lack of
> quality assurance work that prevents non-sh-compliant scripts to enter
> into the packaging in the first place. If people are sloppy or don't
> know how to comply with standard sh scripts, this is great oppurtunity
> to make lintian to warn them. Simple typical constructs would not be
> hard to add - substle differences are another matter.

lintian already warns about use of non-POSIX constructs in maintainer
scripts.  One of the reasons why I'm pursuing this issue right now is that
I'd like to clarify shell policy in Debian Policy given the discussions
over the last couple of years before expanding that check to all shell
scripts in a package that start with #!/bin/sh, something that's been
requested for some time (Bug#253012, Bug#338005, Bug#372578).  It will
also require a bit of restructuring to avoid duplicated code, but I
already know how I want to do that.

I expect that when the check is expanded, it will pick up quite a few
cases that have slipped through the cracks, but as Marco says I know that
a fair number of people are using dash as their /bin/sh already without
encountering many problems.  The core of Debian is already in fairly good
shape for supporting changing /bin/sh to other shells and I expect new
lintian checks will mostly pick up little-used scripts or
infrequently-used packages.

Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>

Reply to: