Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 159296

Summary: autoconf-2.60 borks "Configure parameters" output of command "dspam --version"
Product: Gentoo Linux Reporter: Kevin Parent <kparent>
Component: Current packagesAssignee: Alin Năstac (RETIRED) <mrness>
Status: RESOLVED INVALID    
Severity: normal CC: net-mail+disabled
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch tested on autoconf-2.60 reverting back to 2.59-r7 AC_SITE_LOAD code

Description Kevin Parent 2006-12-28 10:18:25 UTC
autoconf-2.60 borks "Configure paramters" output of command "dspam --version"

It is already known that the output of "dspam --version" is borked and a patch has been supplied to get it working (14_all_autodetect-conf.patch)  albeit not as originally desiged.  All of the "Configure parameters" end up being quoted and additional parameters that were not there are included, ie CFLAGS and CXXFLAGS.

======================================================
dspam-3.6.8-r1 (Current output of "dspam --version")
  with autoconf-2.60 and autoconf-wrapper-3.2-r2
  and with 14_all_autodetect-conf.patch
======================================================

# dspam --version

DSPAM Anti-Spam Suite 3.6.8 (agent/library)

Copyright (c) 2002-2006 Jonathan A. Zdziarski
http://dspam.nuclearelephant.com

DSPAM may be copied only under the terms of the GNU General Public License,
a copy of which can be found with the DSPAM distribution kit.

Configuration parameters:  '--prefix=/usr' '--host=i686-pc-linux-gnu' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--datadir=/usr/share' '--sysconfdir=/etc' '--localstatedir=/var/lib' '--enable-long-usernames' '--enable-syslog' '--enable-domain-scale' '--enable-debug' '--enable-verbose-debug' '--enable-bnr-debug' '--enable-preferences-extension' '--with-mysql-includes=/usr/include/mysql' '--with-mysql-libraries=/usr/lib/mysql' '--with-storage-driver=mysql_drv' '--with-dspam-home=/var/spool/dspam' '--sysconfdir=/etc/mail/dspam' '--enable-daemon' '--disable-ldap' '--disable-clamav' '--with-dspam-group=dspam' '--with-dspam-home-group=dspam' '--with-logdir=/var/log/dspam' '--build=i686-pc-linux-gnu' 'build_alias=i686-pc-linux-gnu' 'host_alias=i686-pc-linux-gnu' 'CFLAGS=-march=athlon-xp -O2 -msse2 -pipe -Wl,-z,now' 'CXXFLAGS=-march=athlon-xp -O2 -msse2 -pipe -Wl,-z,now'


======================================================
dspam-3.6.8-r1 (incorrect output)
  with autoconf-2.60 and autoconf-wrapper-3.2-r2
  and w/o 14_all_autodetect-conf.patch
======================================================

# dspam --version

DSPAM Anti-Spam Suite 3.6.8 (agent/library)

Copyright (c) 2002-2006 Jonathan A. Zdziarski
http://dspam.nuclearelephant.com

DSPAM may be copied only under the terms of the GNU General Public License,
a copy of which can be found with the DSPAM distribution kit.

Configuration parameters: /usr/share/config.site /usr/etc/config.site

======================================================
dspam-3.6.8-r1 (correct output)
  with autoconf-2.59-r7 and autoconf-wrapper-3.2
  and w/o 14_all_autodetect-conf.patch
======================================================

# dspam --version

DSPAM Anti-Spam Suite 3.6.8 (agent/library)

Copyright (c) 2002-2006 Jonathan A. Zdziarski
http://dspam.nuclearelephant.com

DSPAM may be copied only under the terms of the GNU General Public License,
a copy of which can be found with the DSPAM distribution kit.

Configuration parameters: --prefix=/usr --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --enable-long-usernames --enable-syslog --enable-domain-scale --enable-debug --enable-verbose-debug --enable-bnr-debug --enable-preferences-extension --with-mysql-includes=/usr/include/mysql --with-mysql-libraries=/usr/lib/mysql --with-storage-driver=mysql_drv --with-dspam-home=/var/spool/dspam --sysconfdir=/etc/mail/dspam --enable-daemon --disable-ldap --disable-clamav --with-dspam-group=dspam --with-dspam-home-group=dspam --with-logdir=/var/log/dspam --build=i686-pc-linux-gnu


Downgrading to autoconf-2.59-r7 solved the issue.

I think the cause is the AC_SITE_LOAD section of /usr/share/autoconf/autoconf/general.m4.  The logic block for $CONFIG_SITE has changed between versions:

===============================================
autoconf-2.60
    /usr/share/autoconf/autoconf/general.m4
===============================================
--- begin snip ---

# AC_SITE_LOAD
# ------------
# Look for site or system specific initialization scripts.
m4_define([AC_SITE_LOAD],
[# Prefer explicitly selected file to automatically selected ones.
if test -n "$CONFIG_SITE"; then
  set x "$CONFIG_SITE"
elif test "x$prefix" != xNONE; then
  set x "$prefix/share/config.site" "$prefix/etc/config.site"
else
  set x "$ac_default_prefix/share/config.site" \
        "$ac_default_prefix/etc/config.site"
fi
shift
for ac_site_file
do
  if test -r "$ac_site_file"; then
    AC_MSG_NOTICE([loading site script $ac_site_file])
    sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
    . "$ac_site_file"
  fi
done
])

--- end snip ---

===============================================
autoconf-2.59-r7
    /usr/share/autoconf/autoconf/general.m4
===============================================
--- begin snip ---

# AC_SITE_LOAD
# ------------
# Look for site or system specific initialization scripts.
m4_define([AC_SITE_LOAD],
[# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
  if test "x$prefix" != xNONE; then
    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  else
    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/con
fig.site"
  fi
fi
for ac_site_file in $CONFIG_SITE; do
  if test -r "$ac_site_file"; then
    AC_MSG_NOTICE([loading site script $ac_site_file])
    sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD
    . "$ac_site_file"
  fi
done
])

--- end snip ---

It appears the $CONFIG_SITE variable was actually set in autoconf-2.59, where 2.60 it isn't.

I tested it first by editing the dspam configure script generated by autoconf-2.60 using the 2.59 AC_SITE_LOAD section and recompiling dspam without the 14_all_autodetect-conf.patch.  It was sucessful - output was correct.

Then I edited the autoconf-2.60 ebuild in my overlay to patch general.m4 with the autoconf-2.59 AC_SITE_LOAD section and reinstalled autoconf-2.60.  Reemerged dspam-3.6.8-r1 without the 14_all_autodetect-conf.patch and it too compiled successfully and displayed the output of "dspam --version" correctly.

I'm not saying this is the correct solution since my scripting skills are very limited.  Maybe another solution is needed.

I hope this little buggy isn't borking anything else.
Comment 1 Kevin Parent 2006-12-28 10:21:21 UTC
forgot emerge --info

# emerge --info
Portage 2.1.1-r2 (default-linux/x86/2006.1/desktop, gcc-4.1.1, glibc-2.4-r4, 2.6.18-ck1-r2 i686)
=================================================================
System uname: 2.6.18-ck1-r2 i686 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.6
Last Sync: Fri, 22 Dec 2006 11:50:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.3.5, 2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.60
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -msse2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=athlon-xp -O2 -msse2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer noclean sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo http://gentoo.chem.wisc.edu/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.narmerica.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext X a52 aac alsa alsa_cards_via82xx alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958 alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share alsa_pcm_plugins_shm alsa_pcm_plugins_softvol apache2 apm audiofile berkdb bitmap-fonts bonobo bzip2 cairo cdparanoia cdr cli cracklib crypt cups curl dga dlloader dri dts dvd dvdr dvdread eds elibc_glibc emboss encode esd ethereal fam fame ffmpeg firefox flac foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 gtkhtml iconv idn imagemagick imap imlib input_devices_keyboard input_devices_mouse irda irmc isdnlog ithreads java jpeg jpeg2k kernel_linux lcms ldap libg++ lirc lirc_devices_hauppauge logrotate lzo mad maildir mikmod mjpeg mmx mmxext mng motif mozilla mp3 mpeg mysql mythtv ncurses network nls nptl nptlonly nsplugin nvidia oav offensive ogg opengl oss pam pcre pdf perl png posix ppds pppd pthreads python qt3 qt4 quicktime readline reflection rhythmbox samba sdl session slang sndfile spell spl sse sse2 ssl svga tcpd tiff transcode truetype truetype-fonts type1-fonts udev userland_GNU v4l v4l2 vcd video_cards_nvidia vorbis wifi win32codecs xine xml xorg xv xvid xvmc yv12 zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Kevin Parent 2006-12-28 10:23:50 UTC
Created attachment 104866 [details, diff]
patch tested on autoconf-2.60 reverting back to 2.59-r7 AC_SITE_LOAD code
Comment 3 Alin Năstac (RETIRED) gentoo-dev 2007-01-08 14:55:30 UTC
Not my domain, reassigned to base-system.

FWIW, I don't agree with the reporter. I don't think having CFLAGS/CXXFLAGS or quoting parameters in ac_configure_args is a bad thing.
Comment 4 SpanKY gentoo-dev 2007-01-09 01:08:52 UTC
dspam is broken and that patch is wrong ... you reverted a bugfix; that code needs to be using 'set' and working over the $@ parameters

the correct fix is to make dspam user proper autoconf variables:
-CONFIGURE_ARGS=$@
+CONFIGURE_ARGS=$ac_configure_args
Comment 5 Alin Năstac (RETIRED) gentoo-dev 2007-01-09 05:33:16 UTC
Closed as INVALID.