summaryrefslogtreecommitdiff
path: root/dev-lang/python
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/python')
-rw-r--r--dev-lang/python/Manifest3
-rw-r--r--dev-lang/python/files/python-2.7-libressl-compatibility.patch92
-rw-r--r--dev-lang/python/python-2.7.14-r1.ebuild3
3 files changed, 96 insertions, 2 deletions
diff --git a/dev-lang/python/Manifest b/dev-lang/python/Manifest
index 3f0cebc60ef7..f798f6a2a072 100644
--- a/dev-lang/python/Manifest
+++ b/dev-lang/python/Manifest
@@ -5,6 +5,7 @@ AUX 3.6-disable-nis.patch 864 BLAKE2B a960b2f44ff1358677ebb0cf82bcff1ddc7812ed51
AUX 3.6.5-disable-nis.patch 297 BLAKE2B 86ca3e6b9aa1bcd9af55ea5f1ad835b60154d23339bf9d02404a5c50b774c556f482138f35d005c9a96b95b6fd9be94ac634164d0b8d173c15fbf841163cabba SHA512 e0a31d256c70159dcbd362ff35b7561c94087851514637bd2b26b6a1b3199309f81eb82305adec7f8d01118dd0856c5228863319ced1e275fbf6f4932034e855
AUX pydoc.conf 169 BLAKE2B ce40bb3d5f858bd7a8d9ef5bf215a8ab592568a724f0e08aea219da014dac12fdfcbcf5fb168bb9aa57be110f74d656aed46179ffe11e3c992d84a647e442b7b SHA512 30d0776a4004cd641e6f283658c3c24915a21ea15fe40e506ff2c3a5f95936aa00c9490b04ab25f29e9b7ac65cd88fd54ca0b08e000e73820b13c7c57c0bf5b2
AUX pydoc.init 600 BLAKE2B fb8775a6663483e5112ec283627610b746020d88494e772b92bb718a9493a52606e565c6c2fa4917a5cb963f166283d09883bd26903f2f3ced6c240d4e292a7f SHA512 9e71ad53486b6882a8441b24225c602195ee33d29dd1b60df27febbc6b752e79929be356152a489f893dcfb11f9c066b999787bc27a8ac61062c86e67a69e87a
+AUX python-2.7-libressl-compatibility.patch 2783 BLAKE2B 44c13d121291c1f660a2fd2edbbaafb4861896503423e9a85d506aea3c416de238a5a1ff08a6065cb4cd2498e456fb3646186dbd3472fbb37058b6ebfd47ad0f SHA512 d258b28d3d9d87e11148b16d3e2f8d378c95897b630f5132058654ee031045f4a0dcc7f11dfb43a8deeac2723e6c1ae88e55db1b4eaad019e1d3b9fa47ea2991
AUX python-2.7.10-cross-compile-warn-test.patch 775 BLAKE2B 617938353c7e19a9b931544ff1fdcd60cf46e3a68f3ff63bc6ac16432220aad13df4d2b405a968505fb64d31da51a478c46499944ab58e9bbfa5a5b44d392f00 SHA512 652941239541f6139ee3580ec0ea5240baf07ae1afb786f76a69b1d748de1f4dda2740a95c28866e9b0b59023410f8a1e86507642595991c0d90d187519cb758
AUX python-2.7.10-system-libffi.patch 1232 BLAKE2B 3483385cbbf7ef2304cf109d05b5e1d58ec2b9015b614c996c66a9917ab10703865b40c775d7ff89a6fa80e9c8c9600292d8d916e9753027e9e0b23b0548ccff SHA512 3c888638180edc81b98a869478085de63741668ea62bdb919a60708fd64cb394e60f44a3730e2ccf3e41d1d61b72b469242fe2ccd20dc61bc2064b3e759c52bd
AUX python-2.7.5-nonfatal-compileall.patch 750 BLAKE2B a7999a6c5a706fbab213cd8a01c6df9b130537556d59bf50b1f5ca223bb9dcd24ccfef48e70e5d3a8afe2b9c6236e1ada87d5899052a2b39f05c4644697953e2 SHA512 d2e93e2a6fcd55d516df0ddaca31af97faed677ea6b4be282eb99e7864f8a7399b5ca11139844a4b3c264832183483b0f4c8c9865c05de0e8520e6d2c8f1dbc6
@@ -27,7 +28,7 @@ DIST python-gentoo-patches-3.4.6-0.tar.xz 11728 BLAKE2B 2a636f5500f4c7d354f42113
DIST python-gentoo-patches-3.5.4-0.tar.xz 11704 BLAKE2B 4a7d71feff18c7c8c109bed10748348484d314183c3de3ec950d5ca5ce7048bb322c470f3f5bff2d63eb7f2ed99c0fe75c621df050273d9d118681b28926061d SHA512 d395a87695f700598026038d6929ea5038abd7d494294037a4dfa02d5262203dbbaa6ae258a5a7f35ff5542f6266dcf69cc0b9c3df2a047cd2f6699a87e182ec
DIST python-gentoo-patches-3.6.2-0.tar.xz 10744 BLAKE2B 3075754627617ac2ceee879eaf1a0e6564505655cdbdff380233a09df701a6188d64fe1f6a8c642b1fb05ef3c460a07042b6a362d655cd02717d6d9ba47983a1 SHA512 2aac1700c541202aa4f43bff4cb521b996d52ab350133318abaddb43f4b6e20548f37de472ace8024ef325ebf63fdfff0d43f8aa1f717d3c56f974b7aa1764e3
DIST python-gentoo-patches-3.6.4.tar.xz 12888 BLAKE2B 7cf49ae22df53e855f2e99df51686b5d4bd0da82ef4c22836e24726ea9ed561808352c0305a5659b052d38b843f1ff61b6466a7bc3673b7e5cfb4d81d22fa4bc SHA512 90a1b685f2539872ffd67f96581f70145b7afaf18af19f4a7f4a61214103d2a10bf0069c1769dac229ae011fceaf8538f041082b33c1671905246d018d184dd7
-EBUILD python-2.7.14-r1.ebuild 10784 BLAKE2B d445806263033f5f6fb6bf816df12f6698acbb959b0a9b7a6db8c66d5d2a22cd849d3b80143fb6b7725133cad102bc3d97e57f079808fb75517f5fdc7d4933f8 SHA512 75ffa41dd4f6c15f02c07491c61ecbc3b0e47bab670e73eb34f13dba0aff06e9ce45da4c2220bc94dfc50cca2c9b3e2211d07263cfe2b13ce66b0ba79a2e01ea
+EBUILD python-2.7.14-r1.ebuild 10847 BLAKE2B 165c8b34e3be68c308a01a40b0d8874d163481be86340e2af7d6890256b2ec07136f1b23f2a0dc2506a7c278931d9dc02bee9a778c50eeb7a33a0830c2d4bdd3 SHA512 22d78089652e5595dd2edce96aa0374fa1b66a2dbaf4a3309caf60ea73bc12bc5cde4f786f97b5453b84c24589445601041d19f68f6233ea29c08acc8b9f56f7
EBUILD python-3.4.5-r1.ebuild 10658 BLAKE2B 46398a90c4f67b4923d9c65476f0eceb42135084b0f71f456162557a2c7adf2cf0c6f07e2d9b65d49eb92ee75233c249bfac32a9e5fb1fcdcd67988f19e4033a SHA512 7a2e1312afcfa032aa16579868f2c7efe04eb38904db2b66f11f87e174533c9df89abeb16a28e3f6372651e2a733f885ae5bb78b07cacd150c9ffe8c66f9c2aa
EBUILD python-3.4.6-r1.ebuild 10592 BLAKE2B 448762119589dde742a632950c21b423eeb7f48f7c5b632b28179839031b1a96232f131942027f1c41d0ceca76ca65592f69ee3d1d556e967b2125b257b9f4ef SHA512 a01670f2eeb8a8c86c6c6d597760c40208dc235c52a635099872a8e2f27332d9b094dfc41b4bd87e7db5e1f0a224d7bd24ece60ec71dfd0d63285093db7dfa77
EBUILD python-3.4.8.ebuild 10592 BLAKE2B 448762119589dde742a632950c21b423eeb7f48f7c5b632b28179839031b1a96232f131942027f1c41d0ceca76ca65592f69ee3d1d556e967b2125b257b9f4ef SHA512 a01670f2eeb8a8c86c6c6d597760c40208dc235c52a635099872a8e2f27332d9b094dfc41b4bd87e7db5e1f0a224d7bd24ece60ec71dfd0d63285093db7dfa77
diff --git a/dev-lang/python/files/python-2.7-libressl-compatibility.patch b/dev-lang/python/files/python-2.7-libressl-compatibility.patch
new file mode 100644
index 000000000000..c9e7a8458e35
--- /dev/null
+++ b/dev-lang/python/files/python-2.7-libressl-compatibility.patch
@@ -0,0 +1,92 @@
+# From https://github.com/python/cpython/pull/6215
+
+# LibreSSL 2.7 introduced OpenSSL 1.1.0 API. The ssl module now detects
+# LibreSSL 2.7 and only provides API shims for OpenSSL < 1.1.0 and
+# LibreSSL < 2.7.
+
+# Documentation updates and fixes for failing tests will be provided in
+# another patch set.
+
+# Signed-off-by: Christian Heimes christian@python.org.
+# (cherry picked from commit 4ca0739)
+
+#Co-authored-by: Christian Heimes christian@python.org
+
+--- a/Modules/_ssl.c 2017-09-16 17:38:35.000000000 +0000
++++ b/Modules/_ssl.c 2018-04-13 15:55:10.919424126 +0000
+@@ -97,6 +102,12 @@
+
+ #if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ # define OPENSSL_VERSION_1_1 1
++# define PY_OPENSSL_1_1_API 1
++#endif
++
++/* LibreSSL 2.7.0 provides necessary OpenSSL 1.1.0 APIs */
++#if defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER >= 0x2070000fL
++# define PY_OPENSSL_1_1_API 1
+ #endif
+
+ /* Openssl comes with TLSv1.1 and TLSv1.2 between 1.0.0h and 1.0.1
+@@ -118,24 +129,44 @@
+ #endif
+
+ /* ALPN added in OpenSSL 1.0.2 */
+-#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x1000200fL && !defined(OPENSSL_NO_TLSEXT)
+-# define HAVE_ALPN
++#ifdef TLSEXT_TYPE_application_layer_protocol_negotiation
++# define HAVE_ALPN 1
++#else
++# define HAVE_ALPN 0
++#endif
++
++/* We cannot rely on OPENSSL_NO_NEXTPROTONEG because LibreSSL 2.6.1 dropped
++ * NPN support but did not set OPENSSL_NO_NEXTPROTONEG for compatibility
++ * reasons. The check for TLSEXT_TYPE_next_proto_neg works with
++ * OpenSSL 1.0.1+ and LibreSSL.
++ * OpenSSL 1.1.1-pre1 dropped NPN but still has TLSEXT_TYPE_next_proto_neg.
++ */
++#ifdef OPENSSL_NO_NEXTPROTONEG
++# define HAVE_NPN 0
++#elif (OPENSSL_VERSION_NUMBER >= 0x10101000L) && !defined(LIBRESSL_VERSION_NUMBER)
++# define HAVE_NPN 0
++#elif defined(TLSEXT_TYPE_next_proto_neg)
++# define HAVE_NPN 1
++#else
++# define HAVE_NPN 0
+ #endif
+
+ #ifndef INVALID_SOCKET /* MS defines this */
+ #define INVALID_SOCKET (-1)
+ #endif
+
+-#ifdef OPENSSL_VERSION_1_1
+-/* OpenSSL 1.1.0+ */
+-#ifndef OPENSSL_NO_SSL2
+-#define OPENSSL_NO_SSL2
+-#endif
+-#else /* OpenSSL < 1.1.0 */
+-#if defined(WITH_THREAD)
++/* OpenSSL 1.0.2 and LibreSSL needs extra code for locking */
++#if !defined(OPENSSL_VERSION_1_1) && defined(WITH_THREAD)
+ #define HAVE_OPENSSL_CRYPTO_LOCK
+ #endif
+
++#if defined(OPENSSL_VERSION_1_1) && !defined(OPENSSL_NO_SSL2)
++#define OPENSSL_NO_SSL2
++#endif
++
++#ifndef PY_OPENSSL_1_1_API
++/* OpenSSL 1.1 API shims for OpenSSL < 1.1.0 and LibreSSL < 2.7.0 */
++
+ #define TLS_method SSLv23_method
+
+ static int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne)
+@@ -178,7 +209,7 @@
+ {
+ return store->param;
+ }
+-#endif /* OpenSSL < 1.1.0 or LibreSSL */
++#endif /* OpenSSL < 1.1.0 or LibreSSL < 2.7.0 */
+
+
+ enum py_ssl_error {
diff --git a/dev-lang/python/python-2.7.14-r1.ebuild b/dev-lang/python/python-2.7.14-r1.ebuild
index 7a006eb67d78..f5e6506189ee 100644
--- a/dev-lang/python/python-2.7.14-r1.ebuild
+++ b/dev-lang/python/python-2.7.14-r1.ebuild
@@ -49,7 +49,7 @@ RDEPEND="app-arch/bzip2:0=
sqlite? ( >=dev-db/sqlite-3.3.8:3= )
ssl? (
!libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:= )
+ libressl? ( dev-libs/libressl:0= )
)
tk? (
>=dev-lang/tcl-8.0:0=
@@ -102,6 +102,7 @@ src_prepare() {
epatch "${FILESDIR}/python-2.7.10-cross-compile-warn-test.patch"
epatch "${FILESDIR}/python-2.7.10-system-libffi.patch"
epatch "${FILESDIR}/2.7-disable-nis.patch"
+ epatch "${FILESDIR}/python-2.7-libressl-compatibility.patch"
epatch_user