alias in maintainer scripts?
- Date: Thu, 1 Mar 2018 22:54:01 +0100
- From: Ralf Treinen <treinen@xxxxxxx>
- Subject: alias in maintainer scripts?
should we really allow for the usage of alias in maintainer scripts?
Policy 10.4 says that /bin/sh scripts may assume an interpreter
that implements the POSIX standard, plus some additional features
listed in the policy. And the POSIX standards describes alias
substitution in shell scripts , so it seems we currently do
allow for it.
However, /bin/sh may be linked to bash, and bash does alias substitution
only when in interactive mode but not in batch mode . That is, unless
a special bash option is set.
Hence, maintainer scripts relying on alias substitution will not work
correctly when /bin/sh is bash. I think we should
- state in the policy that /bin/sh maintainer scripts must not use
the alias buildin. We might suggest to use a shell function instead.
- file bug reports against packages that use alias in their maintainer
scripts. Luckily, there currently seem to be only two such packages,
namely logdata-anomaly-miner and exim4-config.