diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-08-23 09:20:55 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-08-23 09:21:37 +0000 |
commit | 97ddf0fe001e36724527420da8f0a77cde4fb553 (patch) | |
tree | 70a5d77f3f5e29056267ad79474e707f42ba6d7d /main | |
parent | b93125b7b1ef4e1dde5fd205a59469a250ad9669 (diff) | |
download | aports-97ddf0fe001e36724527420da8f0a77cde4fb553.tar.bz2 aports-97ddf0fe001e36724527420da8f0a77cde4fb553.tar.xz |
main/python3: remove unused patches
Diffstat (limited to 'main')
-rw-r--r-- | main/python3/bpo-30353.patch | 133 | ||||
-rw-r--r-- | main/python3/fix-xattrs-glibc.patch | 15 | ||||
-rw-r--r-- | main/python3/libressl-2.7.patch | 111 | ||||
-rw-r--r-- | main/python3/libressl.patch | 10 |
4 files changed, 0 insertions, 269 deletions
diff --git a/main/python3/bpo-30353.patch b/main/python3/bpo-30353.patch deleted file mode 100644 index 28fc93eef0..0000000000 --- a/main/python3/bpo-30353.patch +++ /dev/null @@ -1,133 +0,0 @@ -https://github.com/python/cpython/commit/9ba3aa4d02a110d1a1ea464a8aff3be7dd9c63c3.patch - -From 9ba3aa4d02a110d1a1ea464a8aff3be7dd9c63c3 Mon Sep 17 00:00:00 2001 -From: Erik Bray <erik.m.bray@gmail.com> -Date: Wed, 7 Jun 2017 18:42:24 +0100 -Subject: [PATCH] bpo-30353: Fix pass by value for structs on 64-bit - Cygwin/MinGW (GH-1559) - ---- - Lib/ctypes/test/test_as_parameter.py | 4 ++++ - Lib/ctypes/test/test_structures.py | 22 ++++++++++++++++++++++ - Modules/_ctypes/_ctypes_test.c | 18 ++++++++++++++++++ - Modules/_ctypes/callproc.c | 23 +++++++++++++++++++++-- - 4 files changed, 65 insertions(+), 2 deletions(-) - -diff --git a/Lib/ctypes/test/test_as_parameter.py b/Lib/ctypes/test/test_as_parameter.py -index 2a3484bec01..a2640575a07 100644 ---- a/Lib/ctypes/test/test_as_parameter.py -+++ b/Lib/ctypes/test/test_as_parameter.py -@@ -169,6 +169,10 @@ class S2H(Structure): - s2h = dll.ret_2h_func(self.wrap(inp)) - self.assertEqual((s2h.x, s2h.y), (99*2, 88*3)) - -+ # Test also that the original struct was unmodified (i.e. was passed by -+ # value) -+ self.assertEqual((inp.x, inp.y), (99, 88)) -+ - def test_struct_return_8H(self): - class S8I(Structure): - _fields_ = [("a", c_int), -diff --git a/Lib/ctypes/test/test_structures.py b/Lib/ctypes/test/test_structures.py -index 2e778fb1b43..d90c71144c9 100644 ---- a/Lib/ctypes/test/test_structures.py -+++ b/Lib/ctypes/test/test_structures.py -@@ -417,6 +417,28 @@ class X(Structure): - self.assertEqual(s.second, 0xcafebabe) - self.assertEqual(s.third, 0x0bad1dea) - -+ def test_pass_by_value_in_register(self): -+ class X(Structure): -+ _fields_ = [ -+ ('first', c_uint), -+ ('second', c_uint) -+ ] -+ -+ s = X() -+ s.first = 0xdeadbeef -+ s.second = 0xcafebabe -+ dll = CDLL(_ctypes_test.__file__) -+ func = dll._testfunc_reg_struct_update_value -+ func.argtypes = (X,) -+ func.restype = None -+ func(s) -+ self.assertEqual(s.first, 0xdeadbeef) -+ self.assertEqual(s.second, 0xcafebabe) -+ got = X.in_dll(dll, "last_tfrsuv_arg") -+ self.assertEqual(s.first, got.first) -+ self.assertEqual(s.second, got.second) -+ -+ - class PointerMemberTestCase(unittest.TestCase): - - def test(self): -diff --git a/Modules/_ctypes/_ctypes_test.c b/Modules/_ctypes/_ctypes_test.c -index fe0015c8013..2255e573393 100644 ---- a/Modules/_ctypes/_ctypes_test.c -+++ b/Modules/_ctypes/_ctypes_test.c -@@ -57,6 +57,24 @@ _testfunc_large_struct_update_value(Test in) - ((volatile Test *)&in)->third = 0x0badf00d; - } - -+typedef struct { -+ unsigned int first; -+ unsigned int second; -+} TestReg; -+ -+ -+EXPORT(TestReg) last_tfrsuv_arg; -+ -+ -+EXPORT(void) -+_testfunc_reg_struct_update_value(TestReg in) -+{ -+ last_tfrsuv_arg = in; -+ ((volatile TestReg *)&in)->first = 0x0badf00d; -+ ((volatile TestReg *)&in)->second = 0x0badf00d; -+} -+ -+ - EXPORT(void)testfunc_array(int values[4]) - { - printf("testfunc_array %d %d %d %d\n", -diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c -index 0b6faf96c68..5439b939dc4 100644 ---- a/Modules/_ctypes/callproc.c -+++ b/Modules/_ctypes/callproc.c -@@ -1039,6 +1039,13 @@ GetComError(HRESULT errcode, GUID *riid, IUnknown *pIunk) - } - #endif - -+#if (defined(__x86_64__) && (defined(__MINGW64__) || defined(__CYGWIN__))) || \ -+ defined(__aarch64__) -+#define CTYPES_PASS_BY_REF_HACK -+#define POW2(x) (((x & ~(x - 1)) == x) ? x : 0) -+#define IS_PASS_BY_REF(x) (x > 8 || !POW2(x)) -+#endif -+ - /* - * Requirements, must be ensured by the caller: - * - argtuple is tuple of arguments -@@ -1136,8 +1143,20 @@ PyObject *_ctypes_callproc(PPROC pProc, - } - for (i = 0; i < argcount; ++i) { - atypes[i] = args[i].ffi_type; -- if (atypes[i]->type == FFI_TYPE_STRUCT -- ) -+#ifdef CTYPES_PASS_BY_REF_HACK -+ size_t size = atypes[i]->size; -+ if (IS_PASS_BY_REF(size)) { -+ void *tmp = alloca(size); -+ if (atypes[i]->type == FFI_TYPE_STRUCT) -+ memcpy(tmp, args[i].value.p, size); -+ else -+ memcpy(tmp, (void*)&args[i].value, size); -+ -+ avalues[i] = tmp; -+ } -+ else -+#endif -+ if (atypes[i]->type == FFI_TYPE_STRUCT) - avalues[i] = (void *)args[i].value.p; - else - avalues[i] = (void *)&args[i].value; diff --git a/main/python3/fix-xattrs-glibc.patch b/main/python3/fix-xattrs-glibc.patch deleted file mode 100644 index 57a8fb73ab..0000000000 --- a/main/python3/fix-xattrs-glibc.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c -index 8f8ba25..72b92da 100644 ---- a/Modules/posixmodule.c -+++ b/Modules/posixmodule.c -@@ -103,8 +103,9 @@ corresponding Unix manual entries for more information on calls."); - #undef HAVE_SCHED_SETAFFINITY - #endif - --#if defined(HAVE_SYS_XATTR_H) && defined(__GLIBC__) && !defined(__FreeBSD_kernel__) && !defined(__GNU__) -+#if defined(HAVE_SYS_XATTR_H) && defined(__linux__) && !defined(__FreeBSD_kernel__) && !defined(__GNU__) - #define USE_XATTRS -+#include <linux/limits.h> - #endif - - #ifdef USE_XATTRS diff --git a/main/python3/libressl-2.7.patch b/main/python3/libressl-2.7.patch deleted file mode 100644 index 6ecb473bde..0000000000 --- a/main/python3/libressl-2.7.patch +++ /dev/null @@ -1,111 +0,0 @@ -From f5befbb0d1526f18eb2b24eabb48c3b761c624a2 Mon Sep 17 00:00:00 2001 -From: Christian Heimes <christian@python.org> -Date: Sat, 24 Mar 2018 18:38:14 +0100 -Subject: [PATCH] [3.6] bpo-33127: Compatibility patch for LibreSSL 2.7.0 - (GH-6210) (GH-6214) - -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 4ca0739c9d97ac7cd45499e0d31be68dc659d0e1) - -Co-authored-by: Christian Heimes <christian@python.org> ---- - Lib/test/test_ssl.py | 1 + - .../2018-03-24-15-08-24.bpo-33127.olJmHv.rst | 1 + - Modules/_ssl.c | 24 ++++++++++++++-------- - Tools/ssl/multissltests.py | 3 ++- - 4 files changed, 20 insertions(+), 9 deletions(-) - create mode 100644 Misc/NEWS.d/next/Library/2018-03-24-15-08-24.bpo-33127.olJmHv.rst - -diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py -index 8dd3b4145078..9785a59a7e49 100644 ---- a/Lib/test/test_ssl.py -+++ b/Lib/test/test_ssl.py -@@ -1687,6 +1687,7 @@ def test_get_ca_certs_capath(self): - self.assertEqual(len(ctx.get_ca_certs()), 1) - - @needs_sni -+ @unittest.skipUnless(hasattr(ssl, "PROTOCOL_TLSv1_2"), "needs TLS 1.2") - def test_context_setget(self): - # Check that the context of a connected socket can be replaced. - ctx1 = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2) -diff --git a/Misc/NEWS.d/next/Library/2018-03-24-15-08-24.bpo-33127.olJmHv.rst b/Misc/NEWS.d/next/Library/2018-03-24-15-08-24.bpo-33127.olJmHv.rst -new file mode 100644 -index 000000000000..635aabbde031 ---- /dev/null -+++ b/Misc/NEWS.d/next/Library/2018-03-24-15-08-24.bpo-33127.olJmHv.rst -@@ -0,0 +1 @@ -+The ssl module now compiles with LibreSSL 2.7.1. -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index c54e43c2b48a..5e007da858bd 100644 ---- a/Modules/_ssl.c -+++ b/Modules/_ssl.c -@@ -106,6 +106,12 @@ struct py_ssl_library_code { - - #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 -@@ -152,16 +158,18 @@ struct py_ssl_library_code { - #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 - #define TLS_client_method SSLv23_client_method - #define TLS_server_method SSLv23_server_method -@@ -227,7 +235,7 @@ SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s) - return s->tlsext_tick_lifetime_hint; - } - --#endif /* OpenSSL < 1.1.0 or LibreSSL */ -+#endif /* OpenSSL < 1.1.0 or LibreSSL < 2.7.0 */ - - - enum py_ssl_error { -diff --git a/Tools/ssl/multissltests.py b/Tools/ssl/multissltests.py -index ce5bbd85308c..ba4529ae0611 100755 ---- a/Tools/ssl/multissltests.py -+++ b/Tools/ssl/multissltests.py -@@ -57,8 +57,9 @@ - ] - - LIBRESSL_RECENT_VERSIONS = [ -- "2.5.3", - "2.5.5", -+ "2.6.4", -+ "2.7.1", - ] - - # store files in ../multissl diff --git a/main/python3/libressl.patch b/main/python3/libressl.patch deleted file mode 100644 index 21d9ed67d7..0000000000 --- a/main/python3/libressl.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- Python-3.6.3.orig/Lib/test/test_ssl.py -+++ Python-3.6.3/Lib/test/test_ssl.py -@@ -3303,6 +3303,7 @@ - self.assertIs(stats['client_npn_protocol'], None) - - @unittest.skipUnless(ssl.HAS_NPN, "NPN support needed for this test") -+ @unittest.skipIf(IS_LIBRESSL, "LibreSSL doesn't support NPN anymore") - def test_npn_protocols(self): - server_protocols = ['http/1.1', 'spdy/2'] - protocol_tests = [ |