From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B01481382C5 for ; Mon, 30 Apr 2018 00:16:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C4088E0BD0; Mon, 30 Apr 2018 00:16:16 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 87AC0E0BD0 for ; Mon, 30 Apr 2018 00:16:16 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 84803335CA1 for ; Mon, 30 Apr 2018 00:16:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4CB2829B for ; Mon, 30 Apr 2018 00:16:12 +0000 (UTC) From: "Aaron Bauman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Aaron Bauman" Message-ID: <1525047288.d8af50b8b4257360017447d012a08ca968a7c2a7.bman@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/php/files/, dev-lang/php/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/php/files/libressl-compatibility.patch dev-lang/php/php-7.0.29.ebuild dev-lang/php/php-7.0.30.ebuild dev-lang/php/php-7.1.16.ebuild dev-lang/php/php-7.1.17.ebuild dev-lang/php/php-7.2.5.ebuild X-VCS-Directories: dev-lang/php/ dev-lang/php/files/ X-VCS-Committer: bman X-VCS-Committer-Name: Aaron Bauman X-VCS-Revision: d8af50b8b4257360017447d012a08ca968a7c2a7 X-VCS-Branch: master Date: Mon, 30 Apr 2018 00:16:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e51a1900-0397-4351-8fc9-4cc46fd4d22a X-Archives-Hash: 3b77d2b2644fcd988ddfac93e1eb4d1c commit: d8af50b8b4257360017447d012a08ca968a7c2a7 Author: Aaron Bauman gentoo org> AuthorDate: Mon Apr 30 00:14:35 2018 +0000 Commit: Aaron Bauman gentoo org> CommitDate: Mon Apr 30 00:14:48 2018 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d8af50b8 dev-lang/php: add LibreSSL compatibility patch This patch fixes building with >=dev-libs/libressl-2.7.x. Patch taken from upstream bug https://bugs.php.net/bug.php?id=76174. Hopefully this will be included in future releases to properly detect LibreSSL versions due to API differences. Closes: https://bugs.gentoo.org/651308 Package-Manager: Portage-2.3.31, Repoman-2.3.9 dev-lang/php/files/libressl-compatibility.patch | 65 +++++++++++++++++++++++++ dev-lang/php/php-7.0.29.ebuild | 7 ++- dev-lang/php/php-7.0.30.ebuild | 7 ++- dev-lang/php/php-7.1.16.ebuild | 7 ++- dev-lang/php/php-7.1.17.ebuild | 5 ++ dev-lang/php/php-7.2.5.ebuild | 5 ++ 6 files changed, 93 insertions(+), 3 deletions(-) diff --git a/dev-lang/php/files/libressl-compatibility.patch b/dev-lang/php/files/libressl-compatibility.patch new file mode 100644 index 00000000000..3b9c39dcc59 --- /dev/null +++ b/dev-lang/php/files/libressl-compatibility.patch @@ -0,0 +1,65 @@ +--- a/ext/openssl/openssl.c 2018-04-04 14:26:34.583000000 +0000 ++++ b/ext/openssl/openssl.c 2018-04-04 14:20:16.907000000 +0000 +@@ -73,7 +73,7 @@ + #ifdef HAVE_OPENSSL_MD2_H + #define OPENSSL_ALGO_MD2 4 + #endif +-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) + #define OPENSSL_ALGO_DSS1 5 + #endif + #define OPENSSL_ALGO_SHA224 6 +@@ -560,7 +560,7 @@ + #endif + + /* {{{ OpenSSL compatibility functions and macros */ +-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) + #define EVP_PKEY_get0_RSA(_pkey) _pkey->pkey.rsa + #define EVP_PKEY_get0_DH(_pkey) _pkey->pkey.dh + #define EVP_PKEY_get0_DSA(_pkey) _pkey->pkey.dsa +@@ -677,7 +677,7 @@ + return M_ASN1_STRING_data(asn1); + } + +-#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined (LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER < 0x10002000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) + + static int X509_get_signature_nid(const X509 *x) + { +@@ -1324,7 +1324,7 @@ + mdtype = (EVP_MD *) EVP_md2(); + break; + #endif +-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) + case OPENSSL_ALGO_DSS1: + mdtype = (EVP_MD *) EVP_dss1(); + break; +@@ -1450,7 +1450,7 @@ + #ifdef HAVE_OPENSSL_MD2_H + REGISTER_LONG_CONSTANT("OPENSSL_ALGO_MD2", OPENSSL_ALGO_MD2, CONST_CS|CONST_PERSISTENT); + #endif +-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined (LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER < 0x10100000L || (defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) + REGISTER_LONG_CONSTANT("OPENSSL_ALGO_DSS1", OPENSSL_ALGO_DSS1, CONST_CS|CONST_PERSISTENT); + #endif + REGISTER_LONG_CONSTANT("OPENSSL_ALGO_SHA224", OPENSSL_ALGO_SHA224, CONST_CS|CONST_PERSISTENT); +@@ -3620,7 +3620,7 @@ + RETURN_FALSE; + } + +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !(defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) + /* Due to changes in OpenSSL 1.1 related to locking when decoding CSR, + * the pub key is not changed after assigning. It means if we pass + * a private key, it will be returned including the private part. +@@ -3631,7 +3631,7 @@ + /* Retrieve the public key from the CSR */ + tpubkey = X509_REQ_get_pubkey(csr); + +-#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) ++#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !(defined (LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) + /* We need to free the CSR as it was duplicated */ + X509_REQ_free(csr); + #endif diff --git a/dev-lang/php/php-7.0.29.ebuild b/dev-lang/php/php-7.0.29.ebuild index ab385d52c39..f0c6303f1cb 100644 --- a/dev-lang/php/php-7.0.29.ebuild +++ b/dev-lang/php/php-7.0.29.ebuild @@ -163,7 +163,12 @@ REQUIRED_USE=" mysql? ( || ( mysqli pdo ) ) " -PATCHES=( "${FILESDIR}/mbstring-oniguruma-6.8.patch" ) +PATCHES=( + "${FILESDIR}/mbstring-oniguruma-6.8.patch" + # hopefully upstream will include the same version check fixes in upcoming releases + # patch added 20180429 + "${FILESDIR}/libressl-compatibility.patch" +) PHP_MV="$(get_major_version)" diff --git a/dev-lang/php/php-7.0.30.ebuild b/dev-lang/php/php-7.0.30.ebuild index ec866bd84ba..8de4204d1c0 100644 --- a/dev-lang/php/php-7.0.30.ebuild +++ b/dev-lang/php/php-7.0.30.ebuild @@ -163,7 +163,12 @@ REQUIRED_USE=" mysql? ( || ( mysqli pdo ) ) " -PATCHES=( "${FILESDIR}/mbstring-oniguruma-6.8.patch" ) +PATCHES=( + "${FILESDIR}/mbstring-oniguruma-6.8.patch" + # hopefully upstream will include the same version check fixes in upcoming releases + # patch added 20180429 + "${FILESDIR}/libressl-compatibility.patch" +) PHP_MV="$(get_major_version)" diff --git a/dev-lang/php/php-7.1.16.ebuild b/dev-lang/php/php-7.1.16.ebuild index 55fab7c4c96..0075b8f5bd7 100644 --- a/dev-lang/php/php-7.1.16.ebuild +++ b/dev-lang/php/php-7.1.16.ebuild @@ -145,7 +145,12 @@ REQUIRED_USE=" mysql? ( || ( mysqli pdo ) ) " -PATCHES=( "${FILESDIR}/mbstring-oniguruma-6.8.patch" ) +PATCHES=( + "${FILESDIR}/mbstring-oniguruma-6.8.patch" + # hopefully upstream will include the same version check fixes in upcoming releases + # patch added 20180429 + "${FILESDIR}/libressl-compatibility.patch" +) PHP_MV="$(get_major_version)" diff --git a/dev-lang/php/php-7.1.17.ebuild b/dev-lang/php/php-7.1.17.ebuild index 34ff2d2648d..fcd553f3148 100644 --- a/dev-lang/php/php-7.1.17.ebuild +++ b/dev-lang/php/php-7.1.17.ebuild @@ -144,6 +144,11 @@ REQUIRED_USE=" session-mm? ( session !threads ) mysql? ( || ( mysqli pdo ) ) " +PATCHES=( + # hopefully upstream will include the same version check fixes in upcoming releases + # patch added 20180429 + "${FILESDIR}/libressl-compatibility.patch" +) PHP_MV="$(get_major_version)" diff --git a/dev-lang/php/php-7.2.5.ebuild b/dev-lang/php/php-7.2.5.ebuild index 5407f131e1a..558d91754f3 100644 --- a/dev-lang/php/php-7.2.5.ebuild +++ b/dev-lang/php/php-7.2.5.ebuild @@ -149,6 +149,11 @@ REQUIRED_USE=" mysql? ( || ( mysqli pdo ) ) zip-encryption? ( zip ) " +PATCHES=( + # hopefully upstream will include the same version check fixes in upcoming releases + # patch added 20180429 + "${FILESDIR}/libressl-compatibility.patch" +) PHP_MV="$(get_major_version)"