From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jul 24 02:44:45 2014 Return-Path: Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9344E10F for ; Thu, 24 Jul 2014 02:44:45 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A69926A2 for ; Thu, 24 Jul 2014 02:44:45 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s6O2ijqr032313 for ; Thu, 24 Jul 2014 02:44:45 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 192080] New: [PATCH] bsd.openssl.mk: supply -L in addition to -Wl,-rpath Date: Thu, 24 Jul 2014 02:44:45 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports Tree X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: leres@ee.lbl.gov X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Jul 2014 02:44:45 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192080 Bug ID: 192080 Summary: [PATCH] bsd.openssl.mk: supply -L in addition to -Wl,-rpath Product: Ports Tree Version: Latest Hardware: Any OS: Any Status: Needs Triage Severity: Affects Only Me Priority: Normal Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: leres@ee.lbl.gov Created attachment 144927 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=144927&action=edit patch.txt I was having trouble using sysutils/syslog-ng with self-signed ssl certificates after I installed the security/openssl port. I tracked this down to syslog-ng trying to open a rootca cert via a hash name, e.g. .../certs/9624bd1a.0, which didn't exist. When I first installed the openssl port I had noticed that the cert filename has changed and that it was necessary to re-run the c_rehash script against my certs directory. Since I had WITH_OPENSSL_PORT=yes in /etc/make.conf and had selected the PORTS_SSL option when building sysutils/syslog-ng, I suspected syslog-ng was linking against the base libcrypto. As it turns out the syslog-ng package is a twisted maze of shared images, some linked against /usr/local/lib/libcrypto.so and some against /usr/lib/libcrypt.so. How-To-Repeat: - Add WITH_OPENSSL_PORT=yes to /etc/make.conf - Build and install security/openssl - Build and isntall sysutils/syslog-ng with PORTS_SSL - Temporarily rename /lib/libcrypto.so.6 to /lib/libcrypto.so.6- - Create a syslog-ng.conf that uses tls() to forward logs: destination d_syslog { tcp("logger.noname.net" port(12345) tls(ca_dir("/usr/local/etc/certs") key_file("/usr/local/etc/private/ahost.noname.net.key") cert_file("/usr/local/etc/certs/ahost.noname.net.pem") peer_verify(required-trusted) ) ); }; - Attempt to start syslog-ng and see lots of shared images that to reference the wrong libcrypto: Error opening plugin module; module='afsocket-tls', error='Shared object "libcrypto.so.6" not found, required by "libafsocket-tls.so"' Error opening plugin module; module='afmongodb', error='Shared object "libcrypto.so.6" not found, required by "libafmongodb.so"' Error opening plugin module; module='afsocket', error='Shared object "libcrypto.so.6" not found, required by "libafsocket.so"' Error opening plugin module; module='cryptofuncs', error='Shared object "libcrypto.so.6" not found, required by "libcryptofuncs.so"' Error parsing afsocket, inner-dest plugin tls not found in /usr/local/etc/syslog-ng.conf at line 56, column 6: tls(ca_dir("/usr/local/etc/stunnel/certs") ^^^ syslog-ng documentation: http://www.balabit.com/support/documentation/?product=syslog-ng mailing list: https://lists.balabit.hu/mailman/listinfo/syslog-ng Fix: A minimal fix is to add -L/usr/local/lib where OPENSSL_LIBS is set in Makefile. However I believe the correct fix is something similar to the attached patch to bsd.openssl.mk which adds -L to OPENSSL_LDFLAGS. This approach should solve this issue for any port using this variable. -- You are receiving this mail because: You are the assignee for the bug.