section 10.4 says:
Scripts may assume that /bin/sh implements the SUSv3 Shell Command
Language ...
This version of the standard is so outdated that it isn't even any
longer available on the opengroup web site. The latest version of the standard is 4.2 (published in 2016), earlier versions currently
available on the opengroup site are 4 (from 2008) and 4.1 (from 2013).
Please consider updating the policy.
On Sun, 2017-06-11 at 20:46:23 +0200, Bill Allombert wrote:
Before doing that, we have to check whether all the relevant packages
are compliant with this update.
Well, I don't all of our current shell packages are even compliant with
the current version specified in policy.
dash is one of such packages, with several non-compliancy bugs. And given that it is our default shell…
control: tag -1 +moreinfo
Hello Ralf,
On Sun, Jun 11, 2017 at 06:51:49PM +0200, Ralf Treinen wrote:
section 10.4 says:
Scripts may assume that /bin/sh implements the SUSv3 Shell
Command
Language ...
This version of the standard is so outdated that it isn't even any
longer available on the opengroup web site.
The latest version of the
standard is 4.2 (published in 2016), earlier versions currently
available on the opengroup site are 4 (from 2008) and 4.1 (from
2013).
Please consider updating the policy.
I found the 2016 edition of version 4 of the SUS,[1] but what makes
you think that is version 4.2? I couldn't find that version number anywhere. If they've changed their versioning scheme, maybe Policy
needs to use the expression "SUSv4 (2016 edition)"?
The 2016 edition is Technical Corrigendum 2. I'm not sure that it's conventional to use versioning such as 4.2 in such cases, however. I'd
expect it to be referred to as SUSv4, SUSv4TC2, or SUSv4 2016 edition;
the latter seems to be more common.
diff --git a/policy/ch-files.rst b/policy/ch-files.rst
index d4df316..dc0d152 100644
--- a/policy/ch-files.rst
+++ b/policy/ch-files.rst
@@ -202,9 +202,9 @@ may instead be easier to check the exit status of commands directly. See
Every script should use ``set -e`` or check the exit status of *every*
command.
-Scripts may assume that ``/bin/sh`` implements the SUSv3 Shell Command -Language [#]_ plus the following additional features not mandated by -SUSv3.. [#]_
+Scripts may assume that ``/bin/sh`` implements the SUSv4 (2016
+edition) Shell Command Language [#]_ plus the following additional
+features not mandated by SUSv4 (2016 edition).. [#]_
- ``echo -n``, if implemented as a shell built-in, must not generate a
newline.
@@ -237,18 +237,20 @@ SUSv3.. [#]_
which are the same as for ``kill`` above, 13 (SIGPIPE) must be
allowed.
-If a shell script requires non-SUSv3 features from the shell interpreter -other than those listed above, the appropriate shell must be specified
-in the first line of the script (e.g., ``#!/bin/bash``) and the package -must depend on the package providing the shell (unless the shell package
-is marked "Essential", as in the case of ``bash``).
-
-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. -Checking your script with ``checkbashisms`` from the devscripts package
-or running your script with an alternate shell such as ``posh`` may help -uncover violations of the above requirements. If in doubt whether a
-script complies with these requirements, use ``/bin/bash``.
+If a shell script requires non-SUSv4 (2016 edition) features from the
+shell interpreter other than those listed above, the appropriate shell
+must be specified in the first line of the script (e.g.,
+``#!/bin/bash``) and the package must depend on the package providing
+the shell (unless the shell package is marked "Essential", as in the
+case of ``bash``).
+
+You may wish to restrict your script to SUSv4 (2016 edition) features
+plus the above set when possible so that it may use ``/bin/sh`` as its +interpreter. Checking your script with ``checkbashisms`` from the +devscripts package or running your script with an alternate shell such
+as ``posh`` may help uncover violations of the above requirements. If
+in doubt whether a script complies with these requirements, use +``/bin/bash``.
Perl scripts should check for errors when making any system calls,
including ``open``, ``print``, ``close``, ``rename`` and ``system``.
diff --git a/policy/ch-opersys.rst b/policy/ch-opersys.rst
index 7d9e20a..9574f82 100644
--- a/policy/ch-opersys.rst
+++ b/policy/ch-opersys.rst
@@ -461,19 +461,19 @@ statement at the top of the script, like this:
test -f program-executed-later-in-script || exit 0
Often there are some variables in the ``init.d`` scripts whose values -control the behavior of the scripts, and which a system administrator is -likely to want to change. As the scripts themselves are frequently -``conffile``\ s, modifying them requires that the administrator merge in -their changes each time the package is upgraded and the ``conffile`` -changes. To ease the burden on the system administrator, such
-configurable values should not be placed directly in the script.
+control the behavior of the scripts, and which a system administrator
+is likely to want to change. As the scripts themselves are frequently +``conffile``\ s, modifying them requires that the administrator merge
+in their changes each time the package is upgraded and the
+``conffile`` changes. To ease the burden on the system administrator,
+such configurable values should not be placed directly in the script.
Instead, they should be placed in a file in ``/etc/default``, which
typically will have the same base name as the ``init.d`` script. This
-extra file should be sourced by the script when the script runs. It must -contain only variable settings and comments in SUSv3 ``sh`` format. It
-may either be a ``conffile`` or a configuration file maintained by the -package maintainer scripts. See :ref:`s-config-files` for
-more details.
+extra file should be sourced by the script when the script runs. It
+must contain only variable settings and comments in SUSv4 (2016
+edition) ``sh`` format. It may either be a ``conffile`` or a
+configuration file maintained by the package maintainer scripts. See +:ref:`s-config-files` for more details.
To ensure that vital configurable values are always available, the
``init.d`` script should set default values for each of the shell
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 62:17:05 |
Calls: | 6,654 |
Files: | 12,200 |
Messages: | 5,331,626 |