On Thu, 2014-10-02 at 18:05 -0700, Russ Allbery wrote:
> Up until dash changes, and then you have absolutely no idea what to do
> with that sort of policy.  There's a reason why no standards document I've
> ever seen says something like this.  The ISO C standard isn't going to say
> that anything that compiles with gcc is valid code.

Correct.  But we aren't we aren't ISO C, or POSIX and we aren't in the
standards business.  We are in the business of producing working
reliable systems.  Yes we do use standards to do that, we even write a
few of our own.  But unlike ISO and POSIX they are for our internal
consumption.  The thing we create and release to others is the archives,
and it would be a long stretch to call them a standard.

Onto your "then you have absolutely no idea what to do with that sort of
policy" comment.  

Why have policy 10.4 at all?  Presumably to make producing a reliable,
robust Debian easier.  But 10.4 doesn't proscribe a standard way of
doing that or checking it has been done.  Unsurprisingly adherence is at
best sporadic.

So now to the answer to your "then you have absolutely no idea what to
do with that sort of policy" comment.  This is what you do.  You, as a
developer create unit tests the scripts using /bin/posh (or whatever
shell implements the policy), and if you do your job well you deliver a
system that works reliably under a prescribed set of conditions (ie posh
is installed as /bin/sh). You have a reasonable chance of this remaining
so because the hopefully the unit tests are run every time the package
is build.  The standard may not be well enough defined for your tastes,
but in my world repeatable and reliable take a far higher precedence.

I can also tell you how "what to do with that sort of policy" applies
the current policy.  What is done is we have the occasional "spat" about
bash'ism and discussion on shell syntax.  Having bashism's (or not) is
NOT the same as working.  Yet, that's about the best we can do.  Thus
the policy is not robustly and objectively enforced (and worse, can not
be).  brian's observation should come as no surprise: when you configure
Debian with /bin/sh conforming strictly to 10.4, Debian doesn't boot.
Surely you aren't going to say this is an example of policy working
well?

AFAICT defining posh as the shell all "#!/bin/sh" scripts must work with
is better in every way, and where ever possible all Debian policy should
be like that.  Which is to say it should be obvious what you have to do
to comply, it should be automatically verifiable you have complied, and
if you comply it should help in ensuring Debian is robust and reliable.
The current policy 10.4 fails the first two tests.  Since could be
re-worded so it doesn't, there is no doubt in my mind it could be
better.

This isn't to say we should delete the statements on what we expect of
the shell.  They are excellent good documentation.  I guess in summing
up, my main point is good documentation doesn't necessarily make good
policy.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to