NetBSD Problem Report #35249
From www@NetBSD.org Wed Dec 13 18:03:24 2006
Return-Path: <www@NetBSD.org>
Received: by narn.NetBSD.org (Postfix, from userid 31301)
id 0265563BA6D; Wed, 13 Dec 2006 18:03:24 +0000 (UTC)
Message-Id: <20061213180324.0265563BA6D@narn.NetBSD.org>
Date: Wed, 13 Dec 2006 18:03:24 +0000 (UTC)
From: lorenl@north-winds.org
Reply-To: lorenl@north-winds.org
To: gnats-bugs@NetBSD.org
Subject: Sendmail fails to find libraries in /usr/pkg/lib on Linux.
X-Send-Pr-Version: www-1.0
>Number: 35249
>Category: pkg
>Synopsis: Sendmail fails to find libraries in /usr/pkg/lib on Linux.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: jnemeth
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Dec 13 18:05:01 +0000 2006
>Closed-Date: Fri Feb 20 06:46:04 +0000 2015
>Last-Modified: Fri Feb 20 06:46:04 +0000 2015
>Originator: Loren M. Lang
>Release: RedHat 9 Linux 2.4.20-20.9b
>Organization:
Alzatex, Inc.
>Environment:
Linux hosea.tallye.com 2.4.20-20.9b #1 SMP Wed Nov 19 22:14:33 PST 2003 i686 i686 i386 GNU/Linux
>Description:
I am using pkgsrc on Linux to replace parts of the Linux userland one-by-one. Cyrus SASL, OpenSSL and OpenLDAP are installed from pkgsrc with older versions sitting under /usr and /usr/local. The port mail/sendmail appears to install correctly, though none of the executables run due to missing libraries. Specifically, it cannot find the ldap libraries that were installed into /usr/pkg/lib as the SONAME is different than installed under /usr/lib.
$/usr/pkg/libexec/sendmail/sendmail
/usr/pkg/libexec/sendmail/sendmail: error while loading shared libraries: libldap-2.3.so.0: cannot open shared object file: No such file or directory
$ldd /usr/pkg/libexec/sendmail/sendmail
libssl.so.0.9.7 => /usr/lib/libssl.so.0.9.7 (0x4003a000)
libsasl2.so.2 => /usr/local/lib/libsasl2.so.2 (0x40184000)
libldap-2.3.so.0 => not found
liblber-2.3.so.0 => not found
libdb4-4.4.so.4 => not found
...
Looking in work/.work.log, I found no -R options to the linker or compiler.
>How-To-Repeat:
Install newer versions of OpenLDAP, BerkeleyDB, or other libraries onto a Linux system from pkgsrc, then install Sendmail from pkgsrc with the appropriate options enabled so that it depends on them and see that the generated binaries cannot find the libraries from pkgsrc unless /usr/pkg/lib is added to /etc/ld.so.conf and /sbin/ldconfig is re-ran.
>Fix:
A work-around on Linux is to add /usr/pkg/lib to /etc/ld.so.conf and run /sbin/ldconfig to update the library cache. This causes sendmail from pkgsrc to find the appropriate libraries, but, of course, causes a lot of the base system programs to change to the libraries from pkgsrc. The correct course of action is to have sendmail linked with the appropriate -R option.
>Release-Note:
>Audit-Trail:
From: "Loren M. Lang" <lorenl@north-winds.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/35249: Sendmail fails to find libraries in /usr/pkg/lib on
Linux.
Date: Fri, 15 Dec 2006 10:05:47 -0800
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig5E7184D9E1A6EFBB10D46978
Content-Type: multipart/mixed;
boundary="------------020304050801070009050800"
This is a multi-part message in MIME format.
--------------020304050801070009050800
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
This adds the -Wl,-R flag to the sendmail build which makes the sendmail
binaries able to find the appropriate libraries and run.
gnats-admin@NetBSD.org wrote:
> Thank you very much for your problem report.
> It has the internal identification `pkg/35249'.
> The individual assigned to look at your
> report is: pkg-manager.=20
>=20
>> Category: pkg
>> Responsible: pkg-manager
>> Synopsis: Sendmail fails to find libraries in /usr/pkg/lib on Li=
nux.
>> Arrival-Date: Wed Dec 13 18:05:01 +0000 2006
>=20
--=20
Loren M. Lang
lorenl@north-winds.org
http://www.north-winds.org/
Public Key: ftp://ftp.north-winds.org/pub/lorenl_pubkey.asc
Fingerprint: CEE1 AAE2 F66C 59B5 34CA C415 6D35 E847 0118 A3D2
--------------020304050801070009050800
Content-Type: text/plain;
name="sendmail.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline;
filename="sendmail.patch"
Index: sendmail/files/site.config.m4
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/mail/sendmail/files/site.config.m4,v
retrieving revision 1.5
diff -u -r1.5 site.config.m4
--- sendmail/files/site.config.m4 8 Jun 2006 02:26:32 -0000 1.5
+++ sendmail/files/site.config.m4 15 Dec 2006 18:04:58 -0000
@@ -17,4 +17,4 @@
define(`confMAN5EXT', `5')
define(`confMAN8EXT', `8')
APPENDDEF(`confENVDEF', `-I${PREFIX}/include')
-APPENDDEF(`confLIBS', `-L${PREFIX}/lib')
+APPENDDEF(`confLIBS', `-L${PREFIX}/lib -Wl,-R${PREFIX}/lib')
--------------020304050801070009050800--
--------------enig5E7184D9E1A6EFBB10D46978
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFguQISHsHRHUO+igRAuH0AKDM+YpFJHP6c3ghaDMy2u6XumajSQCdEhQ1
KP63/xDz9fyzwFfpkI24cHI=
=3RFY
-----END PGP SIGNATURE-----
--------------enig5E7184D9E1A6EFBB10D46978--
From: "Loren M. Lang" <lorenl@north-winds.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/35249: Sendmail fails to find libraries in /usr/pkg/lib on
Linux.
Date: Fri, 15 Dec 2006 16:46:10 -0800
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig8ADD1F5F7CB9B0703315605F
Content-Type: multipart/mixed;
boundary="------------010608000403030106050803"
This is a multi-part message in MIME format.
--------------010608000403030106050803
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Apparently I failed to fully test the last patch; this one should work
better. It seems that everytime APPENDDEF is called in site.config.m4,
a layer of quotes is lost exposing the comma in -Wl,-R which eats up
everything after it. I have changed to using LDOPTS instead of LIBS as
nothing else appends to it and so it only needs two layers of quotes.
This has been tested with several cleans followed by builds.
--=20
Loren M. Lang
lorenl@north-winds.org
http://www.north-winds.org/
Public Key: ftp://ftp.north-winds.org/pub/lorenl_pubkey.asc
Fingerprint: CEE1 AAE2 F66C 59B5 34CA C415 6D35 E847 0118 A3D2
--------------010608000403030106050803
Content-Type: text/plain;
name="sendmail.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline;
filename="sendmail.patch"
Index: sendmail/files/site.config.m4
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/pkgsrc/mail/sendmail/files/site.config.m4,v
retrieving revision 1.5
diff -u -r1.5 site.config.m4
--- sendmail/files/site.config.m4 8 Jun 2006 02:26:32 -0000 1.5
+++ sendmail/files/site.config.m4 16 Dec 2006 00:40:14 -0000
@@ -18,3 +18,4 @@
define(`confMAN8EXT', `8')
APPENDDEF(`confENVDEF', `-I${PREFIX}/include')
APPENDDEF(`confLIBS', `-L${PREFIX}/lib')
+APPENDDEF(`confLDOPTS', ``-Wl,-R${PREFIX}/lib'')
--------------010608000403030106050803--
--------------enig8ADD1F5F7CB9B0703315605F
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFFg0HaSHsHRHUO+igRAt0ZAKDS4ojdXofWRBeEWCg4BEQvMc0O8ACffmrW
n3xA+tzJU+j1Mo2AAQ4KRDI=
=Xdtp
-----END PGP SIGNATURE-----
--------------enig8ADD1F5F7CB9B0703315605F--
Responsible-Changed-From-To: pkg-manager->tv
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Sat, 16 Dec 2006 09:40:38 +0000
Responsible-Changed-Why:
Over to maintainer.
If you can't handle it, please assign it to linux-pkg-people.
Responsible-Changed-From-To: tv->linux-pkg-people
Responsible-Changed-By: tv@netbsd.org
Responsible-Changed-When: Sat, 05 May 2007 14:57:17 +0000
Responsible-Changed-Why:
I don't actively maintain pkgsrc sendmail anymore.
State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 05 Jan 2010 07:40:15 +0000
State-Changed-Why:
Is this still a problem?
Responsible-Changed-From-To: linux-pkg-people->jnemeth
Responsible-Changed-By: cheusov@NetBSD.org
Responsible-Changed-When: Tue, 30 Aug 2011 19:30:20 +0000
Responsible-Changed-Why:
1) This issue is reproducible
2) "Responsible" is set to OWNER (jnemeth)
3) This issue is not specific to Linux
4) The following patch solve the problem.
I built sendmail successfully with default option as well as with
db4, ldap and sasl enabled.
Index: files/site.config.m4
===================================================================
RCS file: /cvsroot/pkgsrc/mail/sendmail/files/site.config.m4,v
retrieving revision 1.10
diff -u -r1.10 site.config.m4
--- files/site.config.m4 16 Dec 2009 09:46:36 -0000 1.10
+++ files/site.config.m4 30 Aug 2011 19:23:22 -0000
@@ -17,7 +17,7 @@
define(`confMAN5EXT', `5')
define(`confMAN8EXT', `8')
APPENDDEF(`confENVDEF', `-I${PREFIX}/include -DSMRSH_CMDDIR=\"${SMRSH_CMDDIR}\"')
-APPENDDEF(`confLIBS', `-L${PREFIX}/lib')
+APPENDDEF(`confLIBDIRS', `-L${PREFIX}/lib ${COMPILER_RPATH_FLAG}${PREFIX}/lib')
APPENDDEF(`confMAPDEF', `-DSOCKETMAP')
# the following are handled by pkgsrc
State-Changed-From-To: feedback->open
State-Changed-By: cheusov@NetBSD.org
State-Changed-When: Tue, 30 Aug 2011 19:30:20 +0000
State-Changed-Why:
See above
From: "John Nemeth" <jnemeth@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/35249 CVS commit: pkgsrc/mail/sendmail
Date: Sun, 15 Jun 2014 20:48:50 +0000
Module Name: pkgsrc
Committed By: jnemeth
Date: Sun Jun 15 20:48:50 UTC 2014
Modified Files:
pkgsrc/mail/sendmail: Makefile Makefile.common PLIST distinfo
options.mk
pkgsrc/mail/sendmail/files: sendmail.sh site.config.m4 smmsp.sh
pkgsrc/mail/sendmail/patches: patch-aa patch-af patch-ai
Added Files:
pkgsrc/mail/sendmail: TODO
pkgsrc/mail/sendmail/files: netbsd-proto.mc site.config.m4-ffr_tls
site.config.m4-stdbool sm_os_netbsd.h
pkgsrc/mail/sendmail/patches: patch-ao patch-ap patch-aq patch-ar
patch-as patch-at patch-au patch-av patch-aw patch-ax patch-ay
patch-az
Removed Files:
pkgsrc/mail/sendmail/files: site.config.m4-ffr_tls_1
pkgsrc/mail/sendmail/patches: patch-ab patch-ac patch-ad patch-ae
patch-al patch-am
Log Message:
Update to sendmail 8.14.9: this fixes a minor potential security issue
pkgsrc changes:
- consolidate several patches into site.config.m4
- pkgsrc LDFLAGS should always be used
- don't bother specifying file owner/group anywhere except in Makefile
- create include/sm/os/sm_os_netbsd.h to fix warnings and OS specific stuff
- install mail.local and rmail
- convert to use res_n* functions
- allows for linking against threaded libraries
- add a TODO file
- PR/35249 - Loren M. Lang
- can't find libraries on Linux, this should be fixed by using pkgsrc LDFLAGS
- PR/46694 - Makoto Fujiwara
- bring back netbsd-proto.mc from when sendmail was part of the base system
- PR/47207 - Richard Palo
- let pkgsrc infrastructure handle file ownership and group
- PR/48566 - Emmanuel Dreyfus
- always set _FFR_USE_GETPWNAM_ERRNO on NetBSD
- roll ffr_tls_1 and the suggested ffr_tls_ec into one new ffr_tls option
- not enabled by default because it changes behaviour
8.14.9/8.14.9 2014/05/21
SECURITY: Properly set the close-on-exec flag for file descriptors
(except stdin, stdout, and stderr) before executing mailers.
Fix a misformed comment in conf.c: "/*" within comment
which may cause a compilation error on some systems.
Problem reported by John Beck of Oracle.
DEVTOOLS: Fix regression in auto-detection of libraries when only
shared libraries are available. Problem reported by
Bryan Costales.
To generate a diff of this commit:
cvs rdiff -u -r1.120 -r1.121 pkgsrc/mail/sendmail/Makefile
cvs rdiff -u -r1.60 -r1.61 pkgsrc/mail/sendmail/Makefile.common
cvs rdiff -u -r1.19 -r1.20 pkgsrc/mail/sendmail/PLIST
cvs rdiff -u -r0 -r1.1 pkgsrc/mail/sendmail/TODO
cvs rdiff -u -r1.50 -r1.51 pkgsrc/mail/sendmail/distinfo
cvs rdiff -u -r1.20 -r1.21 pkgsrc/mail/sendmail/options.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/mail/sendmail/files/netbsd-proto.mc \
pkgsrc/mail/sendmail/files/site.config.m4-ffr_tls \
pkgsrc/mail/sendmail/files/site.config.m4-stdbool \
pkgsrc/mail/sendmail/files/sm_os_netbsd.h
cvs rdiff -u -r1.2 -r1.3 pkgsrc/mail/sendmail/files/sendmail.sh \
pkgsrc/mail/sendmail/files/smmsp.sh
cvs rdiff -u -r1.10 -r1.11 pkgsrc/mail/sendmail/files/site.config.m4
cvs rdiff -u -r1.1 -r0 pkgsrc/mail/sendmail/files/site.config.m4-ffr_tls_1
cvs rdiff -u -r1.20 -r1.21 pkgsrc/mail/sendmail/patches/patch-aa
cvs rdiff -u -r1.12 -r0 pkgsrc/mail/sendmail/patches/patch-ab
cvs rdiff -u -r1.6 -r0 pkgsrc/mail/sendmail/patches/patch-ac
cvs rdiff -u -r1.7 -r0 pkgsrc/mail/sendmail/patches/patch-ad
cvs rdiff -u -r1.5 -r0 pkgsrc/mail/sendmail/patches/patch-ae \
pkgsrc/mail/sendmail/patches/patch-al
cvs rdiff -u -r1.11 -r1.12 pkgsrc/mail/sendmail/patches/patch-af
cvs rdiff -u -r1.8 -r1.9 pkgsrc/mail/sendmail/patches/patch-ai
cvs rdiff -u -r1.3 -r0 pkgsrc/mail/sendmail/patches/patch-am
cvs rdiff -u -r0 -r1.3 pkgsrc/mail/sendmail/patches/patch-ao
cvs rdiff -u -r0 -r1.1 pkgsrc/mail/sendmail/patches/patch-ap \
pkgsrc/mail/sendmail/patches/patch-aq \
pkgsrc/mail/sendmail/patches/patch-ar \
pkgsrc/mail/sendmail/patches/patch-as \
pkgsrc/mail/sendmail/patches/patch-at \
pkgsrc/mail/sendmail/patches/patch-au \
pkgsrc/mail/sendmail/patches/patch-av \
pkgsrc/mail/sendmail/patches/patch-aw \
pkgsrc/mail/sendmail/patches/patch-ax \
pkgsrc/mail/sendmail/patches/patch-ay \
pkgsrc/mail/sendmail/patches/patch-az
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: jnemeth@NetBSD.org
State-Changed-When: Sun, 15 Jun 2014 20:52:01 +0000
State-Changed-Why:
Should be fixed with update to sendmail 8.14.9. Please check.
State-Changed-From-To: feedback->closed
State-Changed-By: jnemeth@NetBSD.org
State-Changed-When: Fri, 20 Feb 2015 06:46:04 +0000
State-Changed-Why:
Feedback timeout, assumped fix.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.