Re: [exim-dev] build scripts and xpg4

Pàgina inicial
Delete this message
Reply to this message
Autor: Phil Pennock
Data:  
A: Jeremy Harris
CC: exim-dev
Assumpte: Re: [exim-dev] build scripts and xpg4
On 2013-11-16 at 17:46 +0000, Jeremy Harris wrote:
> Playing with building under OpenIndiana I run into a problem in
> scripts/lookups-Makefile and its use of "local" in functions.
>
> Bash has it. The /usr/xpg4/bin/sh on OpenIndiana does not seem to.
> I find no mention of it at
> http://pubs.opengroup.org/onlinepubs/009695399/utilities
> /xcu_chap02.html#tag_02_09_04
>
>
> Is it a non-xpg4 feature, that we're hitting after going to
> some length at the beginning of the script to exec an xpg4 shell?
> The use was introduced in the script by 0a34949459c8ec5.


For clarity: that's the initial commit of the script, when I wrote it.
It predates the addition of the checks for /usr/xpg4/bin/sh, so if
nobody complained when we added that shell-switching, this must've
worked for them, surely? Or am I forgetting lingering complaints?

The intent of the execs at the top is to get "a better shell", on the
basis that if /usr/xpg4/bin/sh exists it will be _more_ POSIXy than
/bin/sh; is that still the case in OpenIndiana, or do we need to become
more picky about when we do or don't exec?

> What do Solaris builders do?


The script was added to fix this for Solaris builders, so must've worked
for them to be happy. However, when I check in a Solaris 10, I do see:
----------------------------8< cut here >8------------------------------
/usr/xpg4/bin/sh: foo[1]: local: not found [No such file or directory]
----------------------------8< cut here >8------------------------------

I think that the best bet might be to look for the existence of
/bin/bash and exec that by preference to /usr/xpg4/bin/sh.

Anyone object to that approach?

-Phil