Autor: Phil Pennock Datum: To: Chris Gerhard CC: exim-users Betreff: Re: [exim] Exim 4.80.1 security release - details
On 2012-10-26 at 14:13 +0100, Chris Gerhard wrote: > Thank you Phil,
>
> To build this on OpenIndiana (and I would assume Solaris) apart from the
> usual changes to the Local/Makefile I had to modify one file which
> expected /bin/sh to be a bash like shell.
Ugh. This suggests that /usr/xpg4/bin/sh does not exist, because we
explicitly restart the invocation with that shell, using very portable
shell that early in the script, to deal with this. The tr(1) command is
also problematic on Solaris if /usr/xpg4/bin is not the path used to
find it.
I hadn't realised that 'local' wasn't in POSIX, only in the ksh used for
/usr/xpg4/bin and ... very widely in other shells.
It seems that 'typeset' is also not in POSIX. I'm hesitant to alias one
common builtin to another common builtin, for all shells, when neither
is POSIX.
In a pinch, we could remove the 'local' usage and let the functions set
global variables. I'm reluctant to do that, because it will make it
easier for bugs to creep in.
Is there a good way to detect the shell as being the variant which is
missing "local"? Failing that, is there a portable OS detection means
which will pick up all of the OpenIndiana/Illumos/SmartOS variants so
that we can alias local on just those? Something from uname(1) ?
Out of curiosity: what shell is the basis for the /bin/sh on these
systems, and what is its history? If /usr/xpg4/bin has gone then I'm
hoping this means that OpenIndiana has chosen to make /bin/sh be POSIX
but I'm bemused at the choice of a POSIX shell which is so different to
every other, to missing the most common extensions of BSD sh, dash, etc.