Re: [exim] Exim 4.77 RC2 uploaded

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Dennis Davis
日付:  
To: exim-users
題目: Re: [exim] Exim 4.77 RC2 uploaded
On Tue, 4 Oct 2011, Phil Pennock wrote:

> From: Phil Pennock <pdp@???>
> To: exim-users@???
> Date: Tue, 4 Oct 2011 10:47:55
> Subject: [exim] Exim 4.77 RC2 uploaded
> Reply-To: exim-users@???
>
> I have uploaded Exim 4.77 RC2 to:
>     ftp://ftp.exim.org/pub/exim/exim4/test/

>
> The only change from RC1 is that the reversion script used in the build
> process is now safe when /bin/sh is bash in strict POSIX mode.


...

Fails to build on Solaris with:

Building configuration file config.h
>>> config.h built


../scripts/reversion: syntax error at line 21: `(' unexpected
*** Error code 2
make: Fatal error: Command failed for target `version.h'
Current working directory /tmp/ccsdhd/exim-4.77_RC2/build-SunOS5-5.8-sparc
*** Error code 1
make: Fatal error: Command failed for target `all'


This problem's caused by scripts/reversion assuming that /bin/sh
is bash or equivalent (eg ksh) and so contains several bashisms.
This doesn't work with /bin/sh on Solaris.

Here's a patch:


*** reversion.orig    Tue Oct  4 00:16:36 2011
--- reversion    Tue Oct  4 13:02:28 2011
***************
*** 13,25 ****


# If this tree is a git working directory, use that to get version information.

! if [ -e ../../.git ] || [ "$1" = "release" ]
  then
      # Modify the output of git describe into separate parts for
      # the name "exim" and the release and variant versions.
      # Put a dot in the version number and remove a spurious g.
!     set $(git describe --dirty=-XX --match 'exim-4*' |
!         sed 's|-| |;s|_|.|;s|[-_]| _|;s|-g|-|')
      # Only update if we need to
      if [ "$2 $3" != "$EXIM_RELEASE_VERSION $EXIM_VARIANT_VERSION" ]
      then
--- 13,25 ----


# If this tree is a git working directory, use that to get version information.

! if [ -f ../../.git ] || [ "$1" = "release" ]
  then
      # Modify the output of git describe into separate parts for
      # the name "exim" and the release and variant versions.
      # Put a dot in the version number and remove a spurious g.
!     set `git describe --dirty=-XX --match 'exim-4*' |
!         sed 's|-| |;s|_|.|;s|[-_]| _|;s|-g|-|'`
      # Only update if we need to
      if [ "$2 $3" != "$EXIM_RELEASE_VERSION $EXIM_VARIANT_VERSION" ]
      then
***************
*** 33,44 ****
  # create your own version.sh as part of your release process, or you
  # can modify EXIM_VARIANT_VERSION at this point in this script.


! case $EXIM_RELEASE_VERSION in
  '')    echo "*** Your copy of Exim lacks any version information."
      exit 1
  esac


! EXIM_COMPILE_NUMBER=$(expr "${EXIM_COMPILE_NUMBER:-0}" + 1)

echo "$EXIM_COMPILE_NUMBER" >cnumber.h

--- 33,44 ----
# create your own version.sh as part of your release process, or you
# can modify EXIM_VARIANT_VERSION at this point in this script.

! case "$EXIM_RELEASE_VERSION" in
  '')    echo "*** Your copy of Exim lacks any version information."
      exit 1
  esac


! EXIM_COMPILE_NUMBER=`expr "${EXIM_COMPILE_NUMBER:-0}" + 1`

echo "$EXIM_COMPILE_NUMBER" >cnumber.h


With the above patch in place I can get RC2 to build on:

build-SunOS5-5.10-i386
build-SunOS5-5.8-sparc
build-OpenBSD-i386

(The above patch isn't necessary on OpenBSD but I thought I'd
double-check.)

Others have noted the gcc warning on line 1778 of expand.c.
OpenBSD also reports:

cc rfc2047.c
rfc2047.c: In function 'rfc2047_decode2':
rfc2047.c:260: warning: passing argument 2 of 'libiconv' from incompatible pointer type

OpenBSD also suggests:

strcpy() is almost always misused, please use strlcpy()
sprintf() is often misused, please use snprintf()
strcat() is almost always misused, please use strlcat()

in a few places.  Details on request.
-- 
Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK
D.H.Davis@???               Phone: +44 1225 386101