Re: [exim] Exim 4.74 RC2 uploaded

Pàgina inicial
Delete this message
Reply to this message
Autor: Dennis Davis
Data:  
A: exim-users
Assumpte: Re: [exim] Exim 4.74 RC2 uploaded
On Mon, 24 Jan 2011, Phil Pennock wrote:

> From: Phil Pennock <exim-users@???>
> To: Dennis Davis <D.H.Davis@???>
> Cc: exim-users@???
> Date: Mon, 24 Jan 2011 14:15:22
> Subject: Re: [exim] Exim 4.74 RC2 uploaded
> Reply-To: exim-users@???


...

> No, it's written by me on a FreeBSD box where /bin/sh is a POSIX
> sh and does assume POSIX. POSIX mandates -q for grep and the tr
> syntax used is correct POSIX. There are no bash extensions and no
> GNU assumptions in lookups-Makefile.


Apologies. I'd assumed Linux as such a lot of development is done
on Linux...or at least seems to be.

...

> I forget, and don't have a Solaris box to test on -- does
> /usr/xpg4/bin contain a POSIX-compliant tr and grep?


Yes, and I note you're moving to requiring POSIX-compliance. This
might influence the build instructions for Solaris where /bin/sh,
/usr/bin/tr, /usr/bin/grep *aren't* POSIX-compliant.

> How about the attached patch, does it resolve the issues for you?


Haven't yet tested your patch. Because I took a slightly different
route...

> If not, do you have any recommendations?


...and I got this to build quite easily using the command line:

PATH=/usr/xpg4/bin:$PATH make SHELL=/usr/xpg4/bin/sh

I'd seriously consider including this in the build instructions for
Solaris. As noted above, you're requiring POSIX-compliance in a few
commands and the shell. The above command line gets you this on
Solaris without having to put in extra OS-specific code in scripts
etc and leaves your code as clean as possible. And so easier to
maintain.

The main Makefile already hints at using "make SHELL=..." when
necessary. So I don't regard this as unreasonable. You'd probably
need to document this change for Solaris with some prominance for
a release or two.

> I could code up an early section, using even more portable sh, to
> deal with Solaris explicitly.


As noted above this isn't necessary if the main makefile is called
with the right PATH and shell. I'd be wary of putting lots of
special cases in shell scripts. You could easily make them
unreadable/unmaintainable in the same way that some C programs with
heavily nested #ifdef statements are unreadable. Although here I
may be making my prejudices more visible than I should :-)

> What's reported by { uname -s } ?


"uname -s" reports:

SunOS

on both sparc and i386 platforms. If you want a wordier response,
"uname -a" produces lines similar to:

SunOS shoe.bath.ac.uk 5.10 Generic_120011-14 sun4u sparc SUNW,UltraAX-i2

and:

SunOS xanthus.bath.ac.uk 5.10 Generic_118855-14 i86pc i386 i86pc
-- 
Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK
D.H.Davis@???               Phone: +44 1225 386101