* [gentoo-commits] repo/gentoo:master commit in: dev-python/pyopenssl/, dev-python/pyopenssl/files/
@ 2016-01-17 17:20 Justin Lecher
0 siblings, 0 replies; 3+ messages in thread
From: Justin Lecher @ 2016-01-17 17:20 UTC (permalink / raw
To: gentoo-commits
commit: 62ef99690296363865900424a0fb5150d6bed305
Author: Justin Lecher <jlec <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 17 17:17:31 2016 +0000
Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
CommitDate: Sun Jan 17 17:20:22 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=62ef9969
dev-python/pyopenssl: Backport fixes for openssl-1.0.2
Package-Manager: portage-2.2.26
Signed-off-by: Justin Lecher <jlec <AT> gentoo.org>
...pyopenssl-0.15.1-openssl-1.0.2-backport-1.patch | 19 +++++
...pyopenssl-0.15.1-openssl-1.0.2-backport-2.patch | 31 ++++++++
.../pyopenssl-0.15.1-openssl-1.0.2-backport.patch | 84 ++++++++++++++++++++++
dev-python/pyopenssl/pyopenssl-0.15.1-r1.ebuild | 57 +++++++++++++++
4 files changed, 191 insertions(+)
diff --git a/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-1.patch b/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-1.patch
new file mode 100644
index 0000000..3e2c06c
--- /dev/null
+++ b/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-1.patch
@@ -0,0 +1,19 @@
+ OpenSSL/test/test_ssl.py | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/OpenSSL/test/test_ssl.py b/OpenSSL/test/test_ssl.py
+index bb1c9ae..d3bffe7 100644
+--- a/OpenSSL/test/test_ssl.py
++++ b/OpenSSL/test/test_ssl.py
+@@ -1416,6 +1416,11 @@ class ContextTests(TestCase, _LoopbackMixin):
+ """
+ context = Context(TLSv1_METHOD)
+ for curve in get_elliptic_curves():
++ if curve.name.startswith(u"Oakley-"):
++ # Setting Oakley-EC2N-4 and Oakley-EC2N-3 adds
++ # ('bignum routines', 'BN_mod_inverse', 'no inverse') to the
++ # error queue on OpenSSL 1.0.2.
++ continue
+ # The only easily "assertable" thing is that it does not raise an
+ # exception.
+ context.set_tmp_ecdh(curve)
diff --git a/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-2.patch b/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-2.patch
new file mode 100644
index 0000000..be3c180
--- /dev/null
+++ b/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-2.patch
@@ -0,0 +1,31 @@
+ OpenSSL/crypto.py | 3 +++
+ OpenSSL/test/test_crypto.py | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/OpenSSL/crypto.py b/OpenSSL/crypto.py
+index 555ba24..2c1eddb 100644
+--- a/OpenSSL/crypto.py
++++ b/OpenSSL/crypto.py
+@@ -464,6 +464,9 @@ class X509Name(object):
+ if isinstance(value, _text_type):
+ value = value.encode('utf-8')
+
++ # Make it so OpenSSL generates utf-8 strings.
++ _lib.ASN1_STRING_set_default_mask_asc(b'utf8only')
++
+ add_result = _lib.X509_NAME_add_entry_by_NID(
+ self._name, nid, _lib.MBSTRING_UTF8, value, -1, -1, 0)
+ if not add_result:
+diff --git a/OpenSSL/test/test_crypto.py b/OpenSSL/test/test_crypto.py
+index 1620623..b817451 100644
+--- a/OpenSSL/test/test_crypto.py
++++ b/OpenSSL/test/test_crypto.py
+@@ -1003,7 +1003,7 @@ class X509NameTests(TestCase):
+ self.assertEqual(
+ a.der(),
+ b('0\x1b1\x0b0\t\x06\x03U\x04\x06\x13\x02US'
+- '1\x0c0\n\x06\x03U\x04\x03\x13\x03foo'))
++ '1\x0c0\n\x06\x03U\x04\x03\x0c\x03foo'))
+
+
+ def test_get_components(self):
diff --git a/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport.patch b/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport.patch
new file mode 100644
index 0000000..048ede2
--- /dev/null
+++ b/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport.patch
@@ -0,0 +1,84 @@
+From fc18f7bed12f58100c3a5eef3dbae29c9a26f18a Mon Sep 17 00:00:00 2001
+From: Jeff Tang <mrjefftang@users.noreply.github.com>
+Date: Wed, 15 Apr 2015 17:42:33 -0400
+Subject: [PATCH] OpenSSL 1.0.2 Compatibility
+
+- Perform the time comparison in python to fix #192
+- Add root cert has_expired test
+- Self sign test cert to fix issue in #149
+- Change test case to verify digest of a valid certficate
+---
+ OpenSSL/crypto.py | 9 +++++----
+ OpenSSL/test/test_crypto.py | 15 +++++++++++++--
+ 2 files changed, 18 insertions(+), 6 deletions(-)
+
+diff --git a/OpenSSL/crypto.py b/OpenSSL/crypto.py
+index c7bdabc..1b1058e 100644
+--- a/OpenSSL/crypto.py
++++ b/OpenSSL/crypto.py
+@@ -1,5 +1,6 @@
+-from time import time
++from time import time, strptime
+ from base64 import b16encode
++from calendar import timegm
+ from functools import partial
+ from operator import __eq__, __ne__, __lt__, __le__, __gt__, __ge__
+ from warnings import warn as _warn
+@@ -1161,10 +1162,10 @@ def has_expired(self):
+ :return: True if the certificate has expired, false otherwise
+ """
+ now = int(time())
+- notAfter = _lib.X509_get_notAfter(self._x509)
+- return _lib.ASN1_UTCTIME_cmp_time_t(
+- _ffi.cast('ASN1_UTCTIME*', notAfter), now) < 0
++ notAfter = self.get_notAfter().decode('utf-8')
++ notAfterSecs = timegm(strptime(notAfter, '%Y%m%d%H%M%SZ'))
+
++ return now > notAfterSecs
+
+ def _get_boundary_time(self, which):
+ return _get_asn1_time(which(self._x509))
+diff --git a/OpenSSL/test/test_crypto.py b/OpenSSL/test/test_crypto.py
+index 73e9cc7..b817451 100644
+--- a/OpenSSL/test/test_crypto.py
++++ b/OpenSSL/test/test_crypto.py
+@@ -1562,19 +1562,29 @@ def test_has_not_expired(self):
+ cert.gmtime_adj_notAfter(2)
+ self.assertFalse(cert.has_expired())
+
++ def test_root_has_not_expired(self):
++ """
++ :py:obj:`X509Type.has_expired` returns :py:obj:`False` if the certificate's not-after
++ time is in the future.
++ """
++ cert = load_certificate(FILETYPE_PEM, root_cert_pem)
++ self.assertFalse(cert.has_expired())
++
+
+ def test_digest(self):
+ """
+ :py:obj:`X509.digest` returns a string giving ":"-separated hex-encoded words
+ of the digest of the certificate.
+ """
+- cert = X509()
++ cert = load_certificate(FILETYPE_PEM, root_cert_pem)
+ self.assertEqual(
+ # This is MD5 instead of GOOD_DIGEST because the digest algorithm
+ # actually matters to the assertion (ie, another arbitrary, good
+ # digest will not product the same digest).
++ # Digest verified with the command:
++ # openssl x509 -in root_cert.pem -noout -fingerprint -md5
+ cert.digest("MD5"),
+- b("A8:EB:07:F8:53:25:0A:F2:56:05:C5:A5:C4:C4:C7:15"))
++ b("19:B3:05:26:2B:F8:F2:FF:0B:8F:21:07:A8:28:B8:75"))
+
+
+ def _extcert(self, pkey, extensions):
+@@ -1587,6 +1597,7 @@ def _extcert(self, pkey, extensions):
+ cert.set_notAfter(when)
+
+ cert.add_extensions(extensions)
++ cert.sign(pkey, 'sha1')
+ return load_certificate(
+ FILETYPE_PEM, dump_certificate(FILETYPE_PEM, cert))
+
diff --git a/dev-python/pyopenssl/pyopenssl-0.15.1-r1.ebuild b/dev-python/pyopenssl/pyopenssl-0.15.1-r1.ebuild
new file mode 100644
index 0000000..0391eff
--- /dev/null
+++ b/dev-python/pyopenssl/pyopenssl-0.15.1-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python2_7 python3_{3,4,5} pypy )
+PYTHON_REQ_USE="threads(+)"
+
+inherit distutils-r1 flag-o-matic
+
+MY_PN=pyOpenSSL
+MY_P=${MY_PN}-${PV}
+
+DESCRIPTION="Python interface to the OpenSSL library"
+HOMEPAGE="
+ http://pyopenssl.sourceforge.net/
+ https://launchpad.net/pyopenssl
+ https://pypi.python.org/pypi/pyOpenSSL
+"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
+IUSE="doc examples"
+
+RDEPEND="
+ >=dev-python/six-1.5.2[${PYTHON_USEDEP}]
+ >=dev-python/cryptography-0.7[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
+
+S=${WORKDIR}/${MY_P}
+
+PATCHES=(
+ "${FILESDIR}"/${P}-openssl-1.0.2-backport.patch
+ "${FILESDIR}"/${P}-openssl-1.0.2-backport-1.patch
+ "${FILESDIR}"/${P}-openssl-1.0.2-backport-2.patch
+)
+
+python_compile_all() {
+ use doc && emake -C doc html
+}
+
+python_test() {
+ esetup.py test
+
+ # https://bugs.launchpad.net/pyopenssl/+bug/1237953
+ rm -rf tmp* *.key *.pem || die
+}
+
+python_install_all() {
+ use doc && local HTML_DOCS=( doc/_build/html/. )
+ use examples && local EXAMPLES=( examples/. )
+ distutils-r1_python_install_all
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pyopenssl/, dev-python/pyopenssl/files/
@ 2018-01-05 23:19 Michał Górny
0 siblings, 0 replies; 3+ messages in thread
From: Michał Górny @ 2018-01-05 23:19 UTC (permalink / raw
To: gentoo-commits
commit: 9560192c74275acbfedf53e02df65934a8aac8e0
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 5 22:14:45 2018 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Fri Jan 5 23:19:21 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9560192c
dev-python/pyopenssl: Clean old up
dev-python/pyopenssl/Manifest | 2 -
...pyopenssl-0.15.1-openssl-1.0.2-backport-1.patch | 19 -----
...pyopenssl-0.15.1-openssl-1.0.2-backport-2.patch | 31 --------
.../pyopenssl-0.15.1-openssl-1.0.2-backport.patch | 84 ----------------------
dev-python/pyopenssl/pyopenssl-0.15.1-r1.ebuild | 56 ---------------
dev-python/pyopenssl/pyopenssl-17.3.0.ebuild | 66 -----------------
6 files changed, 258 deletions(-)
diff --git a/dev-python/pyopenssl/Manifest b/dev-python/pyopenssl/Manifest
index 95f9cc7ac36..9e343464a73 100644
--- a/dev-python/pyopenssl/Manifest
+++ b/dev-python/pyopenssl/Manifest
@@ -1,6 +1,4 @@
-DIST pyOpenSSL-0.15.1.tar.gz 149887 BLAKE2B 0355eebe4d2fcbc2160cd03f5e1edc12b171685df101cd3b61d476b08303c3bfefbdf90223374fa9a95a10adb053a452c3e04b5cc0ddfebf7f051e93d56e7fa0 SHA512 bd204f40c9583a8580cff28b061f02ea772fdda3965dab6ac9e3f8c3b98792bea87b6de76494f7ce81e1ddcc76019432a9ffa3bcd55c5adb063bb639efe62e51
DIST pyOpenSSL-16.2.0.tar.gz 167305 BLAKE2B c6daa906695b57cd48153ad6e86ac1ca24f561a9468934cde3f6848cb195dcde4079313e6e892ef607ebaf78ee1b5edd7d7de0814e83fc65b5a5dae383062fc7 SHA512 c1b068137a492564fe958603712d401b7ee0def94c01a28be55f5c89e07c25684ecb0f465f3c56f35924bde038894f2914ac49539144845fb586d12b80307078
DIST pyOpenSSL-17.0.0.tar.gz 167121 BLAKE2B d3aa8713ecba18c6018e83b4da2de46ec8a0bb7bd24fa0b069c32f4ea75fde8aa371b9fa90625e536ea64cb9ee9c349d3c129988cdf495de8389707198248e43 SHA512 819be95f920a70b40ae48ed6740bd1d8cd3bf2fc080f682db8978946929994cb87ac467e220267dcdafc40aa7ed2cce51a334a49b06c1e2665d295157181ddad
DIST pyOpenSSL-17.2.0.tar.gz 170816 BLAKE2B 10abfa61ff329d23c99897c58a02a487c28d19ce7c5d312bd5c769473aea40d846c3b036d34d674e008d155e2be88e26190f19a890ee375893a08ecafe6afaf5 SHA512 aef1628665353445760a0c869c5b88ba1f61a3ade7471bfd1ad9e57672573501574dab5a2491aaac1dc283893fcac1a81dd9b972f43d53fe7ef1aa48e3f0e88a
-DIST pyOpenSSL-17.3.0.tar.gz 168119 BLAKE2B 6f345c6970f6be45ea5d8d77c7bd8b02ae582a76110868e92418a7cd3b49f671604bd172e418651286d1289e6110c42db1dbc06c66d2a5fe2005af03a6db7218 SHA512 2b58a652b8d6e2adadbc620a6b3411cd44169940ef1839fd3365cd343ebe1e630ddbb580d8d4dc79e738e0b4f91db0bdbbaecf18aea74204499c737eebb3fae8
DIST pyOpenSSL-17.4.0.tar.gz 169362 BLAKE2B 87a51efaa157b4a91a48edfcd9348402b6734e1c9f78e7ed638e3d245ae3922083c625e3d967e7513c588e131f96b06f110ae528cccbbb820f685afb9dda72ef SHA512 c3c791b15f2245d3c1381f84471f9e1b07b4a01c318a5a4012ec70193ba055fe948ba150f9c88d2dabe30b37f2025fe26ffb95c01682ca656d561014d41cf965
diff --git a/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-1.patch b/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-1.patch
deleted file mode 100644
index 3e2c06c1abd..00000000000
--- a/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-1.patch
+++ /dev/null
@@ -1,19 +0,0 @@
- OpenSSL/test/test_ssl.py | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/OpenSSL/test/test_ssl.py b/OpenSSL/test/test_ssl.py
-index bb1c9ae..d3bffe7 100644
---- a/OpenSSL/test/test_ssl.py
-+++ b/OpenSSL/test/test_ssl.py
-@@ -1416,6 +1416,11 @@ class ContextTests(TestCase, _LoopbackMixin):
- """
- context = Context(TLSv1_METHOD)
- for curve in get_elliptic_curves():
-+ if curve.name.startswith(u"Oakley-"):
-+ # Setting Oakley-EC2N-4 and Oakley-EC2N-3 adds
-+ # ('bignum routines', 'BN_mod_inverse', 'no inverse') to the
-+ # error queue on OpenSSL 1.0.2.
-+ continue
- # The only easily "assertable" thing is that it does not raise an
- # exception.
- context.set_tmp_ecdh(curve)
diff --git a/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-2.patch b/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-2.patch
deleted file mode 100644
index be3c1803948..00000000000
--- a/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport-2.patch
+++ /dev/null
@@ -1,31 +0,0 @@
- OpenSSL/crypto.py | 3 +++
- OpenSSL/test/test_crypto.py | 2 +-
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/OpenSSL/crypto.py b/OpenSSL/crypto.py
-index 555ba24..2c1eddb 100644
---- a/OpenSSL/crypto.py
-+++ b/OpenSSL/crypto.py
-@@ -464,6 +464,9 @@ class X509Name(object):
- if isinstance(value, _text_type):
- value = value.encode('utf-8')
-
-+ # Make it so OpenSSL generates utf-8 strings.
-+ _lib.ASN1_STRING_set_default_mask_asc(b'utf8only')
-+
- add_result = _lib.X509_NAME_add_entry_by_NID(
- self._name, nid, _lib.MBSTRING_UTF8, value, -1, -1, 0)
- if not add_result:
-diff --git a/OpenSSL/test/test_crypto.py b/OpenSSL/test/test_crypto.py
-index 1620623..b817451 100644
---- a/OpenSSL/test/test_crypto.py
-+++ b/OpenSSL/test/test_crypto.py
-@@ -1003,7 +1003,7 @@ class X509NameTests(TestCase):
- self.assertEqual(
- a.der(),
- b('0\x1b1\x0b0\t\x06\x03U\x04\x06\x13\x02US'
-- '1\x0c0\n\x06\x03U\x04\x03\x13\x03foo'))
-+ '1\x0c0\n\x06\x03U\x04\x03\x0c\x03foo'))
-
-
- def test_get_components(self):
diff --git a/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport.patch b/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport.patch
deleted file mode 100644
index 048ede23786..00000000000
--- a/dev-python/pyopenssl/files/pyopenssl-0.15.1-openssl-1.0.2-backport.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From fc18f7bed12f58100c3a5eef3dbae29c9a26f18a Mon Sep 17 00:00:00 2001
-From: Jeff Tang <mrjefftang@users.noreply.github.com>
-Date: Wed, 15 Apr 2015 17:42:33 -0400
-Subject: [PATCH] OpenSSL 1.0.2 Compatibility
-
-- Perform the time comparison in python to fix #192
-- Add root cert has_expired test
-- Self sign test cert to fix issue in #149
-- Change test case to verify digest of a valid certficate
----
- OpenSSL/crypto.py | 9 +++++----
- OpenSSL/test/test_crypto.py | 15 +++++++++++++--
- 2 files changed, 18 insertions(+), 6 deletions(-)
-
-diff --git a/OpenSSL/crypto.py b/OpenSSL/crypto.py
-index c7bdabc..1b1058e 100644
---- a/OpenSSL/crypto.py
-+++ b/OpenSSL/crypto.py
-@@ -1,5 +1,6 @@
--from time import time
-+from time import time, strptime
- from base64 import b16encode
-+from calendar import timegm
- from functools import partial
- from operator import __eq__, __ne__, __lt__, __le__, __gt__, __ge__
- from warnings import warn as _warn
-@@ -1161,10 +1162,10 @@ def has_expired(self):
- :return: True if the certificate has expired, false otherwise
- """
- now = int(time())
-- notAfter = _lib.X509_get_notAfter(self._x509)
-- return _lib.ASN1_UTCTIME_cmp_time_t(
-- _ffi.cast('ASN1_UTCTIME*', notAfter), now) < 0
-+ notAfter = self.get_notAfter().decode('utf-8')
-+ notAfterSecs = timegm(strptime(notAfter, '%Y%m%d%H%M%SZ'))
-
-+ return now > notAfterSecs
-
- def _get_boundary_time(self, which):
- return _get_asn1_time(which(self._x509))
-diff --git a/OpenSSL/test/test_crypto.py b/OpenSSL/test/test_crypto.py
-index 73e9cc7..b817451 100644
---- a/OpenSSL/test/test_crypto.py
-+++ b/OpenSSL/test/test_crypto.py
-@@ -1562,19 +1562,29 @@ def test_has_not_expired(self):
- cert.gmtime_adj_notAfter(2)
- self.assertFalse(cert.has_expired())
-
-+ def test_root_has_not_expired(self):
-+ """
-+ :py:obj:`X509Type.has_expired` returns :py:obj:`False` if the certificate's not-after
-+ time is in the future.
-+ """
-+ cert = load_certificate(FILETYPE_PEM, root_cert_pem)
-+ self.assertFalse(cert.has_expired())
-+
-
- def test_digest(self):
- """
- :py:obj:`X509.digest` returns a string giving ":"-separated hex-encoded words
- of the digest of the certificate.
- """
-- cert = X509()
-+ cert = load_certificate(FILETYPE_PEM, root_cert_pem)
- self.assertEqual(
- # This is MD5 instead of GOOD_DIGEST because the digest algorithm
- # actually matters to the assertion (ie, another arbitrary, good
- # digest will not product the same digest).
-+ # Digest verified with the command:
-+ # openssl x509 -in root_cert.pem -noout -fingerprint -md5
- cert.digest("MD5"),
-- b("A8:EB:07:F8:53:25:0A:F2:56:05:C5:A5:C4:C4:C7:15"))
-+ b("19:B3:05:26:2B:F8:F2:FF:0B:8F:21:07:A8:28:B8:75"))
-
-
- def _extcert(self, pkey, extensions):
-@@ -1587,6 +1597,7 @@ def _extcert(self, pkey, extensions):
- cert.set_notAfter(when)
-
- cert.add_extensions(extensions)
-+ cert.sign(pkey, 'sha1')
- return load_certificate(
- FILETYPE_PEM, dump_certificate(FILETYPE_PEM, cert))
-
diff --git a/dev-python/pyopenssl/pyopenssl-0.15.1-r1.ebuild b/dev-python/pyopenssl/pyopenssl-0.15.1-r1.ebuild
deleted file mode 100644
index 7133e32ab83..00000000000
--- a/dev-python/pyopenssl/pyopenssl-0.15.1-r1.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-
-PYTHON_COMPAT=( python2_7 python3_{4,5} pypy )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1 flag-o-matic
-
-MY_PN=pyOpenSSL
-MY_P=${MY_PN}-${PV}
-
-DESCRIPTION="Python interface to the OpenSSL library"
-HOMEPAGE="
- http://pyopenssl.sourceforge.net/
- https://launchpad.net/pyopenssl
- https://pypi.python.org/pypi/pyOpenSSL
-"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris"
-IUSE="doc examples"
-
-RDEPEND="
- >=dev-python/six-1.5.2[${PYTHON_USEDEP}]
- >=dev-python/cryptography-0.7[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
- doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
-
-S=${WORKDIR}/${MY_P}
-
-PATCHES=(
- "${FILESDIR}"/${P}-openssl-1.0.2-backport.patch
- "${FILESDIR}"/${P}-openssl-1.0.2-backport-1.patch
- "${FILESDIR}"/${P}-openssl-1.0.2-backport-2.patch
-)
-
-python_compile_all() {
- use doc && emake -C doc html
-}
-
-python_test() {
- esetup.py test
-
- # https://bugs.launchpad.net/pyopenssl/+bug/1237953
- rm -rf tmp* *.key *.pem || die
-}
-
-python_install_all() {
- use doc && local HTML_DOCS=( doc/_build/html/. )
- use examples && local EXAMPLES=( examples/. )
- distutils-r1_python_install_all
-}
diff --git a/dev-python/pyopenssl/pyopenssl-17.3.0.ebuild b/dev-python/pyopenssl/pyopenssl-17.3.0.ebuild
deleted file mode 100644
index bd636d9c7a7..00000000000
--- a/dev-python/pyopenssl/pyopenssl-17.3.0.ebuild
+++ /dev/null
@@ -1,66 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-PYTHON_COMPAT=( python2_7 python3_{4,5,6} pypy{,3} )
-PYTHON_REQ_USE="threads(+)"
-
-inherit distutils-r1 flag-o-matic
-
-MY_PN=pyOpenSSL
-MY_P=${MY_PN}-${PV}
-
-DESCRIPTION="Python interface to the OpenSSL library"
-HOMEPAGE="
- http://pyopenssl.sourceforge.net/
- https://launchpad.net/pyopenssl
- https://pypi.python.org/pypi/pyOpenSSL
-"
-SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86"
-IUSE="doc examples test"
-
-RDEPEND="
- >=dev-python/six-1.5.2[${PYTHON_USEDEP}]
- >=dev-python/cryptography-1.9[${PYTHON_USEDEP}]"
-DEPEND="${RDEPEND}
- doc? (
- dev-python/sphinx[${PYTHON_USEDEP}]
- dev-python/sphinx_rtd_theme[${PYTHON_USEDEP}]
- )
- test? (
- virtual/python-cffi[${PYTHON_USEDEP}]
- dev-python/flaky[${PYTHON_USEDEP}]
- dev-python/pretend[${PYTHON_USEDEP}]
- >=dev-python/pytest-3.0.1[${PYTHON_USEDEP}] )"
-
-S=${WORKDIR}/${MY_P}
-
-python_prepare_all() {
- # Requires network access
- sed -i -e 's/test_set_default_verify_paths/_&/' tests/test_ssl.py || die
- distutils-r1_python_prepare_all
-}
-
-python_compile_all() {
- use doc && emake -C doc html
-}
-
-python_test() {
- TZ=UTC py.test -v || die "Testing failed with ${EPYTHON}" # Fixes bug #627530
-}
-
-python_install_all() {
- use doc && local HTML_DOCS=( doc/_build/html/. )
- if use examples ; then
- docinto examples
- dodoc -r examples/*
- docompress -x /usr/share/doc/${PF}/examples
- fi
-
- distutils-r1_python_install_all
-}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-python/pyopenssl/, dev-python/pyopenssl/files/
@ 2020-12-02 12:26 Stefan Strogin
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Strogin @ 2020-12-02 12:26 UTC (permalink / raw
To: gentoo-commits
commit: ed217e133fe9313a47ef34da94239693ce72440c
Author: Stefan Strogin <steils <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 2 12:23:52 2020 +0000
Commit: Stefan Strogin <steils <AT> gentoo <DOT> org>
CommitDate: Wed Dec 2 12:25:42 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed217e13
dev-python/pyopenssl: add patch for LibreSSL
Closes: https://bugs.gentoo.org/757738
Package-Manager: Portage-3.0.11, Repoman-3.0.2
Signed-off-by: Stefan Strogin <steils <AT> gentoo.org>
.../files/pyopenssl-20.0.0-libressl.patch | 30 ++++++++++++++++++++++
...sl-20.0.0.ebuild => pyopenssl-20.0.0-r1.ebuild} | 2 ++
2 files changed, 32 insertions(+)
diff --git a/dev-python/pyopenssl/files/pyopenssl-20.0.0-libressl.patch b/dev-python/pyopenssl/files/pyopenssl-20.0.0-libressl.patch
new file mode 100644
index 00000000000..6e9c7847fce
--- /dev/null
+++ b/dev-python/pyopenssl/files/pyopenssl-20.0.0-libressl.patch
@@ -0,0 +1,30 @@
+From ecbd275386e5608f0f90d3536506d7f50026ffe6 Mon Sep 17 00:00:00 2001
+From: "Nathaniel J. Smith" <njs@pobox.com>
+Date: Thu, 1 Aug 2019 21:23:51 -0700
+Subject: [PATCH] Support openssl <1.1.1
+
+Upstream-Status: Inappropriate
+[https://github.com/pyca/pyopenssl/pull/861/commits/ecbd275386e5608f0f90d3536506d7f50026ffe6
+was accepted in 19.1.0 but later removed since the upstream dropped
+support of OpenSSL <1.1.1]
+Signed-off-by: Stefan Strogin <steils@gentoo.org>
+---
+ src/OpenSSL/SSL.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/OpenSSL/SSL.py b/src/OpenSSL/SSL.py
+index 6f785fc4..55211511 100644
+--- a/src/OpenSSL/SSL.py
++++ b/src/OpenSSL/SSL.py
+@@ -140,7 +140,10 @@ class _buffer(object):
+ OP_NO_TLSv1 = _lib.SSL_OP_NO_TLSv1
+ OP_NO_TLSv1_1 = _lib.SSL_OP_NO_TLSv1_1
+ OP_NO_TLSv1_2 = _lib.SSL_OP_NO_TLSv1_2
+-OP_NO_TLSv1_3 = _lib.SSL_OP_NO_TLSv1_3
++try:
++ OP_NO_TLSv1_3 = _lib.SSL_OP_NO_TLSv1_3
++except AttributeError:
++ pass
+
+ MODE_RELEASE_BUFFERS = _lib.SSL_MODE_RELEASE_BUFFERS
+
diff --git a/dev-python/pyopenssl/pyopenssl-20.0.0.ebuild b/dev-python/pyopenssl/pyopenssl-20.0.0-r1.ebuild
similarity index 96%
rename from dev-python/pyopenssl/pyopenssl-20.0.0.ebuild
rename to dev-python/pyopenssl/pyopenssl-20.0.0-r1.ebuild
index b09f1b1bdec..0e4a096a48a 100644
--- a/dev-python/pyopenssl/pyopenssl-20.0.0.ebuild
+++ b/dev-python/pyopenssl/pyopenssl-20.0.0-r1.ebuild
@@ -37,6 +37,8 @@ DEPEND="${RDEPEND}
>=dev-python/pytest-3.0.1[${PYTHON_USEDEP}]
)"
+PATCHES=( "${FILESDIR}"/${P}-libressl.patch )
+
distutils_enable_sphinx doc \
dev-python/sphinx_rtd_theme
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-12-02 12:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-05 23:19 [gentoo-commits] repo/gentoo:master commit in: dev-python/pyopenssl/, dev-python/pyopenssl/files/ Michał Górny
-- strict thread matches above, loose matches on Subject: below --
2020-12-02 12:26 Stefan Strogin
2016-01-17 17:20 Justin Lecher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox