<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>134187</bug_id>
          
          <creation_ts>2006-05-24 03:45 0000</creation_ts>
          <short_desc>emerging net-mail/fetchmail-6.3.8-r2 fails on uclibc (linker miss dn_skipname)</short_desc>
          <delta_ts>2008-06-17 09:37:57 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>REOPENED</bug_status>
          
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>natanael.copa@gmail.com</reporter>
          <assigned_to>embedded@gentoo.org</assigned_to>
          <cc>matthias.andree@gmx.de</cc>
    
    <cc>net-mail@gentoo.org</cc>
    
    <cc>rbu@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>natanael.copa@gmail.com</who>
            <bug_when>2006-05-24 03:45:39 0000</bug_when>
            <thetext>i386-gentoo-linux-uclibc-gcc -I/usr/kerberos/include -march=i386 -Os -pipe -fomit-frame-pointer -L/usr/lib  -o fetchmail  socket.o getpass.o pop2.o pop3.o imap.o etrn.o odmr.o fetchmail.o env.o idle.o options.o daemon.o driver.o transact.o sink.o smtp.o uid.o mxget.o md5ify.o cram.o kerberos.o gssapi.o opie.o rpa.o interface.o netrc.o unmime.o conf.o checkalias.o lock.o rcfile_l.o rcfile_y.o norm_charmap.o getaddrinfo.o getnameinfo.o libfm.a    -lcrypt   -lssl -lcrypto
mxget.o: In function `getmxrecords&apos;:
mxget.c:(.text+0xab): undefined reference to `__dn_skipname&apos;
collect2: ld returned 1 exit status
make[2]: *** [fetchmail] Error 1
make[2]: Leaving directory `/var/tmp/portage/fetchmail-6.3.4/work/fetchmail-6.3.4&apos;
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/fetchmail-6.3.4/work/fetchmail-6.3.4&apos;
make: *** [all] Error 2

hardened ~ # emerge --info
Portage 2.0.54-r2 (uclibc/x86/hardened, gcc-3.4.5, uclibc-0.9.28-r0, 2.6.16-gentoo-r8 i686)
=================================================================
System uname: 2.6.16-gentoo-r8 i686 Intel(R) Pentium(R) D CPU 3.00GHz
Gentoo Base System version 1.6.14
distcc 2.18.3 i386-gentoo-linux-uclibc (protocols 1 and 2) (default port 3632) [disabled]
dev-lang/python:     2.4.2
dev-python/pycrypto: [Not Present]
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS=&quot;x86&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;i386-gentoo-linux-uclibc&quot;
CFLAGS=&quot;-march=i386 -Os -pipe -fomit-frame-pointer&quot;
CHOST=&quot;i386-gentoo-linux-uclibc&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/bind /var/qmail/control&quot;
CONFIG_PROTECT_MASK=&quot;/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d&quot;
CXXFLAGS=&quot;-Os -pipe&quot;
DISTDIR=&quot;/var/cache/distfiles&quot;
FEATURES=&quot;autoconfig buildpkg distlocks nodoc noinfo noman sandbox sfperms strict&quot;
GENTOO_MIRRORS=&quot;http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo&quot;
MAKEOPTS=&quot;-j3&quot;
PKGDIR=&quot;/var/cache/packages/default&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/alpine-portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;x86 X509 bitmap-fonts bri bzip2 cdr cli cracklib curl dri encode expat gd gmp hardened iproute2 ipv6 jpeg mad mhash minimal ncurses netboot ogg oss pci pcmcia pic png pppd readline reflection rrdtool sensord session snmp speex spl ssl tdb truetype truetype-fonts type1-fonts uclibc udev usb userlocales vorbis winbind xorg zlib userland_GNU kernel_linux elibc_uclibc&quot;
Unset:  ASFLAGS, CTARGET, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTAGE_RSYNC_OPTS</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>solar@gentoo.org</who>
            <bug_when>2006-05-24 04:54:44 0000</bug_when>
            <thetext>dn_skipname does not exist in uClibc. It&apos;s documented as far back as 2004 as not existing. You will probably need to patch around it.
http://www.google.com/search?q=fetchmail+uclibc</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>natanael.copa@gmail.com</who>
            <bug_when>2006-05-24 05:10:50 0000</bug_when>
            <thetext>They must have added calls to dn_skipname in recent releases. fetchmail-6.3.2-r1 (stable) compiles without problems and I am using that version. 

I just wanted to report this before 6.3.4 is marked stable to tell that there are problems ahead for uclibc users.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ticho@gentoo.org</who>
            <bug_when>2006-05-30 16:08:53 0000</bug_when>
            <thetext>Embedded, what do you suggest to work around this uClibc issue?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-06-07 06:30:23 0000</bug_when>
            <thetext>fix it in uClibc</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>natanael.copa@gmail.com</who>
            <bug_when>2007-01-16 14:14:15 0000</bug_when>
            <thetext>I just tested fetchmail-6.3.6 against the latest uclibc (0.9.28-r2) and it fails with the same linker error.

Could we please get back any of the pre 6.3.4 versions to the portage tree until this is fixed?
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ticho@gentoo.org</who>
            <bug_when>2007-01-16 22:17:40 0000</bug_when>
            <thetext>This is weird, because 6.3.2 already contains a call to dn_skipname(). Even 6.3.0 had it.

Natanael, can you please grab ebuilds from http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/fetchmail/?hideattic=0 and test which will and which won&apos;t work?

embedded@: Alternatively, can I get access to some Gentoo uclibc system to test this myself? I&apos;m not sure if you have some available for tests like this...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>natanael.copa@gmail.com</who>
            <bug_when>2007-01-17 08:51:24 0000</bug_when>
            <thetext>(In reply to comment #6)
 
&gt; Natanael, can you please grab ebuilds from
&gt; http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-mail/fetchmail/?hideattic=0
&gt; and test which will and which won&apos;t work?

fetchmail-6.3.2-r1 works
fetchmail-6.3.3 works
fetchmail-6.3.4 fails
fetchmail-6.3.6 fails

Portage 2.1.1-r2 (uclibc/x86/hardened, gcc-3.4.6, uclibc-0.9.28-r2, 2.6.19-gentoo-r4 i686)
=================================================================
System uname: 2.6.19-gentoo-r4 i686 Intel(R) Pentium(R) D CPU 3.00GHz
Gentoo Base System version 1.12.6
Last Sync: Tue, 16 Jan 2007 09:30:01 +0000
distcc 2.18.3 i386-gentoo-linux-uclibc (protocols 1 and 2) (default port 3632) [disabled]
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     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.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r2
ACCEPT_KEYWORDS=&quot;x86&quot;
AUTOCLEAN=&quot;yes&quot;
CBUILD=&quot;i386-gentoo-linux-uclibc&quot;
CFLAGS=&quot;-march=i386 -Os -pipe -fomit-frame-pointer&quot;
CHOST=&quot;i386-gentoo-linux-uclibc&quot;
CONFIG_PROTECT=&quot;/etc /var/bind&quot;
CONFIG_PROTECT_MASK=&quot;/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo&quot;
CXXFLAGS=&quot;-Os -pipe&quot;
DISTDIR=&quot;/var/cache/distfiles&quot;
FEATURES=&quot;autoconfig buildpkg distlocks metadata-transfer nodoc noinfo noman sandbox sfperms strict&quot;
GENTOO_MIRRORS=&quot;http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo&quot;
MAKEOPTS=&quot;-j3&quot;
PKGDIR=&quot;/var/cache/packages/default&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=&apos;/distfiles&apos; --exclude=&apos;/local&apos; --exclude=&apos;/packages&apos;&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
PORTDIR_OVERLAY=&quot;/usr/alpine-portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;x86 X509 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 bitmap-fonts bri bzip2 cli cracklib dlloader dri elibc_uclibc encode expat extensions hardened input_devices_evdev input_devices_keyboard input_devices_mouse iproute2 ipv6 jpeg kernel_linux lua mad minimal misdn_cards_avmfritz misdn_cards_hfcmulti misdn_cards_hfcpci misdn_cards_hfcsmini misdn_cards_hfcsusb misdn_cards_netjetpci misdn_cards_sedlfax misdn_cards_w6692pci misdn_cards_xhfc ncurses netboot ntfs ogg oss pci pcmcia pic png pppd pri readline reflection rrdtool sensord session snmp speex spl ssl tdb truetype truetype-fonts type1-fonts uclibc uclibc++ udev usb userland_GNU userlocales video_cards_dummy video_cards_fbdev video_cards_v4l winbind wordexp xorg zaptel zlib&quot;
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ticho@gentoo.org</who>
            <bug_when>2007-01-18 00:56:25 0000</bug_when>
            <thetext>6.3.3 is back in CVS. Thanks for testing!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>matthias.andree@gmx.de</who>
            <bug_when>2007-02-20 10:33:03 0000</bug_when>
            <thetext>I&apos;d suggest not to use older versions because of security bug CVE-2006-5867.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>natanael.copa@gmail.com</who>
            <bug_when>2007-02-20 10:42:23 0000</bug_when>
            <thetext>(In reply to comment #9)
&gt; I&apos;d suggest not to use older versions because of security bug CVE-2006-5867.
&gt; 

Which puts me in an interesting situation. Newer fetchmail fails to compile due to missing features in uclibc. Old version has security problems.

What to do?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>matthias.andree@gmx.de</who>
            <bug_when>2007-02-20 12:15:45 0000</bug_when>
            <thetext>Basically, strip the alias detection code (which is AFAIR the only part using the resolver functions directly, look for res_* and dn_*), which is of limited use in real-life deployment scenarios because it relies on (bold) assumptions that are typically no longer true today: it assumes that the server listed as the MX for a given domain, that is the SMTP server, were also the IMAP/POP3 server. It still is on some sites, but that&apos;s not a general rule. In fact, this alias detection code is scheduled for removal in a later version (not on the 6.3 branch though) because of these assumptions, the non-portability to IPv6 and other issues with it.

The interesting fix underneath in one of the recent 6.3.X versions however was calling res_init() as well at the beginning of a poll loop to cater for systems that change /etc/resolv.conf but still let fetchmail run extended amounts of time. We need to make sure this res_init() alone does not break with the µC-oriented libc spinoffs.

Does it work to compile fetchmail with dietlibc?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>rbu@gentoo.org</who>
            <bug_when>2007-05-12 11:28:30 0000</bug_when>
            <thetext>A workaround to this used by nslu2 linux [1] is to set undef those macros that cause the code to be included:

/* Define to 1 if you have the &lt;resolv.h&gt; header file. */
#undef HAVE_RESOLV_H

/* Define to 1 if you have the &apos;res_search&apos; function. */
#undef HAVE_RES_SEARCH

[1] http://trac.nslu2-linux.org/optware/browser/trunk/make/fetchmail.mk
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>matthias.andree@gmx.de</who>
            <bug_when>2007-06-10 08:50:12 0000</bug_when>
            <thetext>Created an attachment (id=121645)
Fix mxget.o linker failures (dn_skipname) for µClibc

The attached patch extends the configure check for res_search() by another check for dn_skipname() which µClibc doesn&apos;t provide.

This fixes the link failures for dn_skipname() by disabling the DNS feature automatically on systems that don&apos;t provide a BSD/BIND9 compatible libresolv.a. 

Please file a feature request for µClibc to enable dn_skipname() and once that&apos;s added, rebuilding fetchmail should pick it up and enable DNS automatically.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>matthias.andree@gmx.de</who>
            <bug_when>2007-06-10 09:10:52 0000</bug_when>
            <thetext>The patch from comment #13 has been committed to the upstream fetchmail SVN repository and is scheduled to appear in 6.3.9.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-09-15 01:01:04 0000</bug_when>
            <thetext>sounds like newer fetchmail&apos;s are fixed</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>natanael.copa@gmail.com</who>
            <bug_when>2008-06-17 09:24:44 0000</bug_when>
            <thetext>This is still an issue in net-mail/fetchmail-6.3.8-r2.

i386-gentoo-linux-uclibc-gcc -I/usr/kerberos/include -march=i386 -Os -pipe -fomit-frame-pointer -L/usr/lib  -o fetchmail  socket.o getpass.o fetchmail.o env.o idle.o options.o daemon.o driver.o transact.o sink.o smtp.o uid.o mxget.o md5ify.o cram.o gssapi.o opie.o interface.o netrc.o unmime.o conf.o checkalias.o lock.o rcfile_l.o rcfile_y.o norm_charmap.o  pop3.o imap.o etrn.o odmr.o  rpa.o   libfm.a    -lcrypt   -lssl -lcrypto 
mxget.o: In function `getmxrecords&apos;:
mxget.c:(.text+0xab): undefined reference to `__dn_skipname&apos;
collect2: ld returned 1 exit status
make[2]: *** [fetchmail] Error 1
make[2]: Leaving directory `/var/tmp/portage/net-mail/fetchmail-6.3.8-r2/work/fetchmail-6.3.8&apos;
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/net-mail/fetchmail-6.3.8-r2/work/fetchmail-6.3.8&apos;
make: *** [all] Error 2
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>natanael.copa@gmail.com</who>
            <bug_when>2008-06-17 09:37:57 0000</bug_when>
            <thetext>the patch from comment #13 (renamed to fethcmail-6.3.8-dn_skipname.patch) and the change below fixes the issue.

--- fetchmail-6.3.8-r2.ebuild.orig	2008-06-17 09:35:41 +0000
+++ fetchmail-6.3.8-r2.ebuild	2008-06-17 09:29:18 +0000
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/net-mail/fetchmail/fetchmail-6.3.8-r2.ebuild,v 1.7 2008/06/16 18:34:59 jer Exp $
 
-inherit eutils
+inherit eutils autotools
 
 DESCRIPTION=&quot;the legendary remote-mail retrieval and forwarding utility&quot;
 HOMEPAGE=&quot;http://fetchmail.berlios.de&quot;
@@ -33,6 +33,10 @@
 
 	# this patch fixes bug #34788 (ticho@gentoo.org 2004-09-03)
 	epatch &quot;${FILESDIR}&quot;/${PN}-6.2.5-broken-headers.patch
+
+	# bug #134187
+	epatch &quot;${FILESDIR}&quot;/${P}-dn_skipname.patch
+	eautoreconf
 }
 
 src_compile() {
</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>121645</attachid>
            <date>2007-06-10 08:50 0000</date>
            <desc>Fix mxget.o linker failures (dn_skipname) for µClibc</desc>
            <filename>fix-gentoo-134187.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">SW5kZXg6IGNvbmZpZ3VyZS5hYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBjb25maWd1cmUuYWMJKFJldmlzaW9u
IDUxMDIpCisrKyBjb25maWd1cmUuYWMJKEFyYmVpdHNrb3BpZSkKQEAgLTE5NSwxMCArMTk1LDEw
IEBACiAjaW5jbHVkZSA8cmVzb2x2Lmg+CiAjZW5kaWYKIGV4dGVybiBpbnQgcmVzX3NlYXJjaCgp
OwotXV0sIFtbcmVzX3NlYXJjaCgwLCAwLCAwLCAwLCAwKTtdXSldLAorXV0sIFtbcmVzX3NlYXJj
aCgwLCAwLCAwLCAwLCAwKTsgZG5fc2tpcG5hbWUoMCwwKTtdXSldLAogICAgIFtBQ19NU0dfUkVT
VUxUKFtmb3VuZF0pCiAgICAgIEFDX0RFRklORShIQVZFX1JFU19TRUFSQ0gsIFsxXSwKLQkgICAg
ICAgW0RlZmluZSB0byAxIGlmIHlvdSBoYXZlIHRoZSAncmVzX3NlYXJjaCcgZnVuY3Rpb24uXSkK
KwkgICAgICAgW0RlZmluZSB0byAxIGlmIHlvdSBoYXZlIHRoZSAncmVzX3NlYXJjaCcgYW5kICdk
bl9za2lwbmFtZScgZnVuY3Rpb25zLl0pCiAgICAgIGJyZWFrXSwgW0FDX01TR19SRVNVTFQoW25v
dCBmb3VuZF0pXSkKICAgICAgTElCUz0kb2xkX0xJQlMKIGRvbmUK
</data>        

          </attachment>
    </bug>

</bugzilla>