From: "Aaron Bauman" <bman@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/php/files/, dev-lang/php/
Date: Mon, 30 Apr 2018 00:16:12 +0000 (UTC) [thread overview]
Message-ID: <1525047288.d8af50b8b4257360017447d012a08ca968a7c2a7.bman@gentoo> (raw)
commit: d8af50b8b4257360017447d012a08ca968a7c2a7
Author: Aaron Bauman <bman <AT> gentoo <DOT> org>
AuthorDate: Mon Apr 30 00:14:35 2018 +0000
Commit: Aaron Bauman <bman <AT> gentoo <DOT> 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)"
next reply other threads:[~2018-04-30 0:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-30 0:16 Aaron Bauman [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-07-10 14:50 [gentoo-commits] repo/gentoo:master commit in: dev-lang/php/files/, dev-lang/php/ Michael Orlitzky
2024-04-09 13:51 Michael Orlitzky
2024-03-04 17:00 Michael Orlitzky
2024-02-18 23:54 Michael Orlitzky
2023-05-05 13:18 Brian Evans
2023-01-05 21:30 Brian Evans
2022-04-05 19:03 Brian Evans
2021-03-25 15:56 Brian Evans
2021-02-25 19:23 Brian Evans
2020-12-23 0:39 Thomas Deutschmann
2020-12-03 20:48 Thomas Deutschmann
2019-02-11 14:21 Brian Evans
2019-02-06 18:26 Thomas Deutschmann
2018-12-07 1:16 Thomas Deutschmann
2018-12-07 0:41 Thomas Deutschmann
2018-12-06 23:20 Thomas Deutschmann
2018-05-04 21:03 Brian Evans
2018-04-27 2:21 Brian Evans
2016-09-30 15:07 Michael Orlitzky
2015-11-02 23:37 Michael Orlitzky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1525047288.d8af50b8b4257360017447d012a08ca968a7c2a7.bman@gentoo \
--to=bman@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox