From: Russ Allbery Date: Mon, 27 Feb 2012 03:47:49 +0000 (-0800) Subject: Suggest checkbashisms or posh rather than dash to check scripts X-Git-Url: https://git.donarmstrong.com/?p=debian%2Fdebian-policy.git;a=commitdiff_plain;h=81047fb3cf766bf985008a0754d0dd65cd82dd06 Suggest checkbashisms or posh rather than dash to check scripts * Suggest checkbashisms from devscripts or the posh shell for checking whether /bin/sh scripts are Policy-compliant rather than recommending dash. Thanks, Raphael Geissert. (Closes: #490604) --- diff --git a/debian/changelog b/debian/changelog index d2704ca..96eb8f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,9 @@ debian-policy (3.9.3.1) UNRELEASED; urgency=low Also mention that the Files pattern syntax is the same as fnmatch(3) and GNU find -path without [] patterns. Thanks, Jonathan Nieder and Ben Finney. + * Suggest checkbashisms from devscripts or the posh shell for checking + whether /bin/sh scripts are Policy-compliant rather than recommending + dash. Thanks, Raphael Geissert. (Closes: #490604) * Install the HTML version of upgrading-checklist in the policy.html directory as upgrading-checklist.html so that it can be deployed on www.debian.org in a way that will allow links to Policy sections to diff --git a/policy.sgml b/policy.sgml index 9e822e2..3fcae75 100644 --- a/policy.sgml +++ b/policy.sgml @@ -7968,10 +7968,12 @@ fname () {

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. + as its interpreter. Checking your script + with checkbashisms from + the devscripts package or running your script + with posh may help uncover violations of the above + requirements. If in doubt whether a script complies with these + requirements, use /bin/bash.