From owner-svn-ports-head@freebsd.org Wed May 25 19:14:53 2016 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7726BB4A711; Wed, 25 May 2016 19:14:53 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 392AF18DB; Wed, 25 May 2016 19:14:53 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4PJEqYf044952; Wed, 25 May 2016 19:14:52 GMT (envelope-from pi@FreeBSD.org) Received: (from pi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4PJEq7C044949; Wed, 25 May 2016 19:14:52 GMT (envelope-from pi@FreeBSD.org) Message-Id: <201605251914.u4PJEq7C044949@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pi set sender to pi@FreeBSD.org using -f From: Kurt Jaeger Date: Wed, 25 May 2016 19:14:52 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r415856 - in head/net/qt4-network: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2016 19:14:53 -0000 Author: pi Date: Wed May 25 19:14:52 2016 New Revision: 415856 URL: https://svnweb.freebsd.org/changeset/ports/415856 Log: net/qt4-network: fix openssl runtime linking The PCBSD community discovered an issue with OpenSSL runtime linking, where the OS bundled OpenSSL libraries are being loaded despite the user having installed and selected a PORTS OpenSSL installation. The patch provided in [1] resolves this by hard-coding the OpenSSL path to the default PREFIX of /usr/local. References: [1] https://mail.kde.org/pipermail/kde-freebsd/2015-November/020535.html PR: 209317 Submitted by: Kris Moore Added: head/net/qt4-network/files/ head/net/qt4-network/files/patch-src_network_ssl_qsslsocket__openssl.cpp (contents, props changed) head/net/qt4-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols.cpp (contents, props changed) Modified: head/net/qt4-network/Makefile Modified: head/net/qt4-network/Makefile ============================================================================== --- head/net/qt4-network/Makefile Wed May 25 18:59:09 2016 (r415855) +++ head/net/qt4-network/Makefile Wed May 25 19:14:52 2016 (r415856) @@ -9,11 +9,13 @@ PKGNAMEPREFIX= qt4- MAINTAINER= kde@FreeBSD.org COMMENT= Qt network module +LICENSE= GPLv3 LGPL21 LGPL3 GFDL +LICENSE_COMB= dual + RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss USE_QT4= qmake_build moc_build rcc_build corelib QT_DIST= yes - HAS_CONFIGURE= yes USE_LDCONFIG= ${PREFIX}/${QT_LIBDIR_REL} USE_OPENSSL= yes @@ -52,6 +54,7 @@ post-configure: -E -e 's|(.*location=).*uic|\1${PREFIX}/${QT_BINDIR_REL}/${UIC:T}|g' \ ${WRKSRC}/lib/pkgconfig/QtNetwork.pc ${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ - ${WRKSRC}/src/network/ssl/qsslsocket_openssl.cpp + ${WRKSRC}/src/network/ssl/qsslsocket_openssl.cpp \ + ${WRKSRC}/src/network/ssl/qsslsocket_openssl_symbols.cpp .include Added: head/net/qt4-network/files/patch-src_network_ssl_qsslsocket__openssl.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/qt4-network/files/patch-src_network_ssl_qsslsocket__openssl.cpp Wed May 25 19:14:52 2016 (r415856) @@ -0,0 +1,21 @@ +--- src/network/ssl/qsslsocket_openssl.cpp.orig 2015-05-07 14:14:44 UTC ++++ src/network/ssl/qsslsocket_openssl.cpp +@@ -267,15 +267,14 @@ init_context: + #endif + break; + case QSsl::SslV3: +- ctx = q_SSL_CTX_new(client ? q_SSLv3_client_method() : q_SSLv3_server_method()); ++ ctx = 0; // SSL 3 not supported by the system, but chosen deliberately -> error + break; +- case QSsl::SecureProtocols: // SslV2 will be disabled below +- case QSsl::TlsV1SslV3: // SslV2 will be disabled below + case QSsl::AnyProtocol: +- default: + ctx = q_SSL_CTX_new(client ? q_SSLv23_client_method() : q_SSLv23_server_method()); + break; + case QSsl::TlsV1: ++ case QSsl::SecureProtocols: ++ default: + ctx = q_SSL_CTX_new(client ? q_TLSv1_client_method() : q_TLSv1_server_method()); + break; + } Added: head/net/qt4-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/qt4-network/files/patch-src_network_ssl_qsslsocket__openssl__symbols.cpp Wed May 25 19:14:52 2016 (r415856) @@ -0,0 +1,25 @@ +--- src/network/ssl/qsslsocket_openssl_symbols.cpp.orig 2015-05-07 14:14:44 UTC ++++ src/network/ssl/qsslsocket_openssl_symbols.cpp +@@ -511,9 +511,9 @@ static QPair loadO + libcrypto->setLoadHints(libcrypto->loadHints() | QLibrary::ImprovedSearchHeuristics); + #elif defined(SHLIB_VERSION_NUMBER) + // first attempt: the canonical name is libssl.so. +- libssl->setFileNameAndVersion(QLatin1String("ssl"), QLatin1String(SHLIB_VERSION_NUMBER)); ++ libssl->setFileNameAndVersion(QLatin1String("/usr/local/lib/libssl"), QLatin1String(SHLIB_VERSION_NUMBER)); + libssl->setLoadHints(QLibrary::ImprovedSearchHeuristics); +- libcrypto->setFileNameAndVersion(QLatin1String("crypto"), QLatin1String(SHLIB_VERSION_NUMBER)); ++ libcrypto->setFileNameAndVersion(QLatin1String("/usr/local/lib/libcrypto"), QLatin1String(SHLIB_VERSION_NUMBER)); + libcrypto->setLoadHints(libcrypto->loadHints() | QLibrary::ImprovedSearchHeuristics); + if (libcrypto->load() && libssl->load()) { + // libssl.so. and libcrypto.so. found +@@ -525,8 +525,8 @@ static QPair loadO + #endif + + // second attempt: find the development files libssl.so and libcrypto.so +- libssl->setFileNameAndVersion(QLatin1String("ssl"), -1); +- libcrypto->setFileNameAndVersion(QLatin1String("crypto"), -1); ++ libssl->setFileNameAndVersion(QLatin1String("/usr/local/lib/libssl"), -1); ++ libcrypto->setFileNameAndVersion(QLatin1String("/usr/local/lib/libcrypto"), -1); + if (libcrypto->load() && libssl->load()) { + // libssl.so.0 and libcrypto.so.0 found + return pair;