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

Bug#490604: debian-policy: please don't state that scripts working under dash are 'probably' policy-compliant



Raphael Geissert <atomo64@gmail.com> writes:

> I fail to see why policy states (10.4):

>> You may wish to restrict your script to SUSv3 features plus the above
>> set when possible so that it may use /bin/sh as its interpreter. If
>> your script works with dash (originally called ash), it probably
>> complies with the above requirements, but if you are in doubt, use
>> /bin/bash.

> dash has some extra features not required by policy and thus may give
> the reader the impression that if a script works fine under dash it is
> likely to be policy-compliant.

> If such kind of statement is really wanted please instead refer to posh
> and/or checkbashisms. The former is meant to only provide what the
> policy requires and the latter is a tool to detect the usage of features
> not required by policy (as stated in the man page, despite the usage of
> the name 'bashisms').

Since this paragraph isn't normative and is just providing advice on how
to check for violations of the normative policy, I've gone ahead and
applied the following change for the next release.

--- a/policy.sgml
+++ b/policy.sgml
@@ -7968,10 +7968,12 @@ fname () {
        <p>
          You may wish to restrict your script to SUSv3 features plus the
          above set when possible so that it may use <file>/bin/sh</file>
-         as its interpreter. If your script works with <prgn>dash</prgn>
-         (originally called <prgn>ash</prgn>), it probably complies with
-         the above requirements, but if you are in doubt, use
-         <file>/bin/bash</file>.
+         as its interpreter.  Checking your script
+         with <prgn>checkbashisms</prgn> from
+         the <package>devscripts</package> package or running your script
+         with <prgn>posh</prgn> may help uncover violations of the above
+         requirements.  If in doubt whether a script complies with these
+         requirements, use <file>/bin/bash</file>.
        </p>
 
        <p>

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



Reply to: