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 0D16C13835A for ; Tue, 9 Feb 2021 23:38:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 46CECE08F6; Tue, 9 Feb 2021 23:38:48 +0000 (UTC) Received: from smtp.gentoo.org (mail.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 AA25FE08F6 for ; Tue, 9 Feb 2021 23:38:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 2F861340F0F for ; Tue, 9 Feb 2021 23:38:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id DC1224C0 for ; Tue, 9 Feb 2021 23:38:44 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1612913921.ba21d61bf2fd7912252e10ecff3e03f735a78855.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/pypy3/files/, dev-python/pypy3/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/pypy3/files/7.3.3_p37-sni-handle.patch dev-python/pypy3/pypy3-7.3.3_p37-r1.ebuild dev-python/pypy3/pypy3-7.3.3_p37.ebuild X-VCS-Directories: dev-python/pypy3/files/ dev-python/pypy3/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: ba21d61bf2fd7912252e10ecff3e03f735a78855 X-VCS-Branch: master Date: Tue, 9 Feb 2021 23:38:44 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: e27643e1-184a-493e-94f1-eff7efe3ebbf X-Archives-Hash: 3953511380f9c3198b9ba50dbba99fe4 commit: ba21d61bf2fd7912252e10ecff3e03f735a78855 Author: Michał Górny gentoo org> AuthorDate: Tue Feb 9 23:34:56 2021 +0000 Commit: Michał Górny gentoo org> CommitDate: Tue Feb 9 23:38:41 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba21d61b dev-python/pypy3: Backport servername_callback fix Signed-off-by: Michał Górny gentoo.org> dev-python/pypy3/files/7.3.3_p37-sni-handle.patch | 38 ++++++++++++++++++++++ ...-7.3.3_p37.ebuild => pypy3-7.3.3_p37-r1.ebuild} | 4 ++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/dev-python/pypy3/files/7.3.3_p37-sni-handle.patch b/dev-python/pypy3/files/7.3.3_p37-sni-handle.patch new file mode 100644 index 00000000000..c4e377c3d8d --- /dev/null +++ b/dev-python/pypy3/files/7.3.3_p37-sni-handle.patch @@ -0,0 +1,38 @@ +diff -dupr a/lib_pypy/_cffi_ssl/_stdssl/__init__.py b/lib_pypy/_cffi_ssl/_stdssl/__init__.py +--- a/lib_pypy/_cffi_ssl/_stdssl/__init__.py 2021-02-10 00:15:40.815208732 +0100 ++++ b/lib_pypy/_cffi_ssl/_stdssl/__init__.py 2021-02-10 00:19:27.963109365 +0100 +@@ -1008,10 +1008,10 @@ for name in SSL_CTX_STATS_NAMES: + SSL_CTX_STATS.append((name, getattr(lib, attr))) + + class _SSLContext(object): +- __slots__ = ('ctx', '_check_hostname', 'servername_callback', ++ __slots__ = ('ctx', '_check_hostname', + 'alpn_protocols', '_alpn_protocols_handle', '_protocol' + 'npn_protocols', 'set_hostname', '_post_handshake_auth', +- '_sni_cb', '_npn_protocols_handle') ++ '_sni_cb', '_sni_cb_handle', '_npn_protocols_handle') + def __new__(cls, protocol): + self = object.__new__(cls) + self.ctx = ffi.NULL +@@ -1451,15 +1451,17 @@ class _SSLContext(object): + "is not in the current OpenSSL library.") + if cb is None: + lib.SSL_CTX_set_tlsext_servername_callback(self.ctx, ffi.NULL) +- self._sni_cb= None ++ self._sni_cb = None ++ lib.SSL_CTX_set_tlsext_servername_arg(self.ctx, ffi.NULL) ++ self._sni_cb_handle = None + return + if not callable(cb): + lib.SSL_CTX_set_tlsext_servername_callback(self.ctx, ffi.NULL) + raise TypeError("not a callable object") +- self.scb = ServernameCallback(cb, self) +- sni_cb = ffi.new_handle(self.scb) ++ self._sni_cb = ServernameCallback(cb, self) ++ self._sni_cb_handle = ffi.new_handle(self._sni_cb) + lib.SSL_CTX_set_tlsext_servername_callback(self.ctx, _servername_callback) +- lib.SSL_CTX_set_tlsext_servername_arg(self.ctx, sni_cb) ++ lib.SSL_CTX_set_tlsext_servername_arg(self.ctx, self._sni_cb_handle) + + def cert_store_stats(self): + store = lib.SSL_CTX_get_cert_store(self.ctx) diff --git a/dev-python/pypy3/pypy3-7.3.3_p37.ebuild b/dev-python/pypy3/pypy3-7.3.3_p37-r1.ebuild similarity index 97% rename from dev-python/pypy3/pypy3-7.3.3_p37.ebuild rename to dev-python/pypy3/pypy3-7.3.3_p37-r1.ebuild index 9c1fc7d860b..a5d9d3cf0aa 100644 --- a/dev-python/pypy3/pypy3-7.3.3_p37.ebuild +++ b/dev-python/pypy3/pypy3-7.3.3_p37-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -50,6 +50,8 @@ src_prepare() { eapply "${FILESDIR}/7.3.1-gentoo-path.patch" eapply "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch" eapply "${FILESDIR}/7.3.2-py37-distutils-cxx.patch" + # https://foss.heptapod.net/pypy/pypy/-/issues/3396 + eapply "${FILESDIR}/7.3.3_p37-sni-handle.patch" sed -e "s^@EPREFIX@^${EPREFIX}^" \ -i lib-python/3/distutils/command/install.py || die