From 0254a4bea90442bd8504fe85dd9f5c5502f67c4a Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Wed, 20 May 2020 17:40:38 +0800 Subject: [PATCH] python3: Update to 3.8.3, refresh patches Signed-off-by: Jeffery To --- lang/python/python3-version.mk | 2 +- lang/python/python3/Makefile | 4 ++-- .../patches/004-do-not-write-bytes-codes.patch | 2 +- .../patches/014-remove-platform-so-suffix.patch | 4 ++-- .../python3/patches/016-adjust-config-paths.patch | 4 ++-- .../020-ssl-module-emulate-tls-methods.patch | 15 +++++---------- .../python3/patches/021-openssl-deprecated.patch | 12 ++++++------ 7 files changed, 19 insertions(+), 24 deletions(-) diff --git a/lang/python/python3-version.mk b/lang/python/python3-version.mk index 74d6e315b1..5a521f3734 100644 --- a/lang/python/python3-version.mk +++ b/lang/python/python3-version.mk @@ -8,7 +8,7 @@ # Note: keep in sync with setuptools & pip PYTHON3_VERSION_MAJOR:=3 PYTHON3_VERSION_MINOR:=8 -PYTHON3_VERSION_MICRO:=2 +PYTHON3_VERSION_MICRO:=3 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index a0c46ffcc0..993dce7566 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -11,12 +11,12 @@ include $(TOPDIR)/rules.mk include ../python3-version.mk PKG_NAME:=python3 -PKG_RELEASE:=5 +PKG_RELEASE:=1 PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO) PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) -PKG_HASH:=2646e7dc233362f59714c6193017bb2d6f7b38d6ab4a0cb5fbac5c36c4d845df +PKG_HASH:=dfab5ec723c218082fe3d5d7ae17ecbdebffa9a1aea4d64aa3a2ecdd2e795864 PKG_MAINTAINER:=Alexandru Ardelean , Jeffery To PKG_LICENSE:=Python/2.0 diff --git a/lang/python/python3/patches/004-do-not-write-bytes-codes.patch b/lang/python/python3/patches/004-do-not-write-bytes-codes.patch index a67f55332a..c0d78f4b74 100644 --- a/lang/python/python3/patches/004-do-not-write-bytes-codes.patch +++ b/lang/python/python3/patches/004-do-not-write-bytes-codes.patch @@ -1,6 +1,6 @@ --- a/Python/initconfig.c +++ b/Python/initconfig.c -@@ -120,7 +120,7 @@ int Py_NoSiteFlag = 0; /* Suppress 'impo +@@ -152,7 +152,7 @@ int Py_NoSiteFlag = 0; /* Suppress 'impo int Py_BytesWarningFlag = 0; /* Warn on str(bytes) and str(buffer) */ int Py_FrozenFlag = 0; /* Needed by getpath.c */ int Py_IgnoreEnvironmentFlag = 0; /* e.g. PYTHONPATH, PYTHONHOME */ diff --git a/lang/python/python3/patches/014-remove-platform-so-suffix.patch b/lang/python/python3/patches/014-remove-platform-so-suffix.patch index cc6a8511b3..aff0cec5b6 100644 --- a/lang/python/python3/patches/014-remove-platform-so-suffix.patch +++ b/lang/python/python3/patches/014-remove-platform-so-suffix.patch @@ -1,6 +1,6 @@ --- a/configure +++ b/configure -@@ -15142,7 +15142,7 @@ $as_echo_n "checking ABIFLAGS... " >&6; +@@ -15174,7 +15174,7 @@ $as_echo_n "checking ABIFLAGS... " >&6; $as_echo "$ABIFLAGS" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5 $as_echo_n "checking SOABI... " >&6; } @@ -11,7 +11,7 @@ --- a/configure.ac +++ b/configure.ac -@@ -4633,7 +4633,7 @@ AC_SUBST(SOABI) +@@ -4654,7 +4654,7 @@ AC_SUBST(SOABI) AC_MSG_CHECKING(ABIFLAGS) AC_MSG_RESULT($ABIFLAGS) AC_MSG_CHECKING(SOABI) diff --git a/lang/python/python3/patches/016-adjust-config-paths.patch b/lang/python/python3/patches/016-adjust-config-paths.patch index b8ea6ccfcd..849346dc75 100644 --- a/lang/python/python3/patches/016-adjust-config-paths.patch +++ b/lang/python/python3/patches/016-adjust-config-paths.patch @@ -40,7 +40,7 @@ # Here are a couple of targets for MacOSX again, to install a full --- a/configure +++ b/configure -@@ -15181,7 +15181,7 @@ else +@@ -15213,7 +15213,7 @@ else fi @@ -51,7 +51,7 @@ LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}" --- a/configure.ac +++ b/configure.ac -@@ -4667,7 +4667,7 @@ fi +@@ -4688,7 +4688,7 @@ fi dnl define LIBPL after ABIFLAGS and LDVERSION is defined. AC_SUBST(PY_ENABLE_SHARED) diff --git a/lang/python/python3/patches/020-ssl-module-emulate-tls-methods.patch b/lang/python/python3/patches/020-ssl-module-emulate-tls-methods.patch index 1edd215d1e..5cd1b94df1 100644 --- a/lang/python/python3/patches/020-ssl-module-emulate-tls-methods.patch +++ b/lang/python/python3/patches/020-ssl-module-emulate-tls-methods.patch @@ -11,9 +11,6 @@ SSL_CTX_set_min/max_proto_version(). 2 files changed, 108 insertions(+), 30 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2018-02-25-20-05-51.bpo-30008.6Bmyhr.rst -diff --git a/Misc/NEWS.d/next/Library/2018-02-25-20-05-51.bpo-30008.6Bmyhr.rst b/Misc/NEWS.d/next/Library/2018-02-25-20-05-51.bpo-30008.6Bmyhr.rst -new file mode 100644 -index 000000000000..e0a08464a1e1 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-02-25-20-05-51.bpo-30008.6Bmyhr.rst @@ -0,0 +1,4 @@ @@ -21,11 +18,9 @@ index 000000000000..e0a08464a1e1 +1.1.0. The version specific TLS methods are emulated with TLS_method() plus +SSL_CTX_set_min/max_proto_version(). Pseudo random numbers are generated +with RAND_bytes(). -diff --git a/Modules/_ssl.c b/Modules/_ssl.c -index f50823e6947a..827026e3bf5c 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c -@@ -45,14 +45,6 @@ static PySocketModule_APIObject PySocketModule; +@@ -45,14 +45,6 @@ static PySocketModule_APIObject PySocket #include #endif @@ -48,7 +43,7 @@ index f50823e6947a..827026e3bf5c 100644 #define TLS_method SSLv23_method #define TLS_client_method SSLv23_client_method #define TLS_server_method SSLv23_server_method -@@ -896,7 +889,7 @@ _ssl_configure_hostname(PySSLSocket *self, const char* server_hostname) +@@ -896,7 +889,7 @@ _ssl_configure_hostname(PySSLSocket *sel goto error; } } else { @@ -57,7 +52,7 @@ index f50823e6947a..827026e3bf5c 100644 ASN1_STRING_length(ip))) { _setSSLError(NULL, 0, __FILE__, __LINE__); goto error; -@@ -1372,8 +1365,9 @@ _get_peer_alt_names (X509 *certificate) { +@@ -1372,8 +1365,9 @@ _get_peer_alt_names (X509 *certificate) goto fail; } PyTuple_SET_ITEM(t, 0, v); @@ -69,7 +64,7 @@ index f50823e6947a..827026e3bf5c 100644 if (v == NULL) { Py_DECREF(t); goto fail; -@@ -3031,44 +3025,124 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) +@@ -3078,44 +3072,124 @@ _ssl__SSLContext_impl(PyTypeObject *type long options; SSL_CTX *ctx = NULL; X509_VERIFY_PARAM *params; @@ -212,7 +207,7 @@ index f50823e6947a..827026e3bf5c 100644 _setSSLError(NULL, 0, __FILE__, __LINE__); return NULL; } -@@ -5241,7 +5315,7 @@ PySSL_RAND(int len, int pseudo) +@@ -5288,7 +5362,7 @@ PySSL_RAND(int len, int pseudo) if (bytes == NULL) return NULL; if (pseudo) { diff --git a/lang/python/python3/patches/021-openssl-deprecated.patch b/lang/python/python3/patches/021-openssl-deprecated.patch index f73ce80c34..4dd33f6236 100644 --- a/lang/python/python3/patches/021-openssl-deprecated.patch +++ b/lang/python/python3/patches/021-openssl-deprecated.patch @@ -1,6 +1,6 @@ --- a/Modules/_ssl.c +++ b/Modules/_ssl.c -@@ -201,6 +202,11 @@ static void _PySSLFixErrno(void) { +@@ -201,6 +201,11 @@ static void _PySSLFixErrno(void) { #define TLS_method SSLv23_method #define TLS_client_method SSLv23_client_method #define TLS_server_method SSLv23_server_method @@ -12,7 +12,7 @@ static int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne) { -@@ -1677,7 +1683,7 @@ _decode_certificate(X509 *certificate) { +@@ -1724,7 +1729,7 @@ _decode_certificate(X509 *certificate) { Py_DECREF(sn_obj); (void) BIO_reset(biobuf); @@ -21,7 +21,7 @@ ASN1_TIME_print(biobuf, notBefore); len = BIO_gets(biobuf, buf, sizeof(buf)-1); if (len < 0) { -@@ -1694,7 +1700,7 @@ _decode_certificate(X509 *certificate) { +@@ -1741,7 +1746,7 @@ _decode_certificate(X509 *certificate) { Py_DECREF(pnotBefore); (void) BIO_reset(biobuf); @@ -30,7 +30,7 @@ ASN1_TIME_print(biobuf, notAfter); len = BIO_gets(biobuf, buf, sizeof(buf)-1); if (len < 0) { -@@ -3235,7 +3241,7 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version) +@@ -3282,7 +3287,7 @@ _ssl__SSLContext_impl(PyTypeObject *type conservative and assume it wasn't fixed until release. We do this check at runtime to avoid problems from the dynamic linker. See #25672 for more on this. */ @@ -39,7 +39,7 @@ if (!(libver >= 0x10001000UL && libver < 0x1000108fUL) && !(libver >= 0x10000000UL && libver < 0x100000dfUL)) { SSL_CTX_set_mode(self->ctx, SSL_MODE_RELEASE_BUFFERS); -@@ -6403,10 +6409,10 @@ PyInit__ssl(void) +@@ -6450,10 +6455,10 @@ PyInit__ssl(void) return NULL; /* OpenSSL version */ @@ -52,7 +52,7 @@ r = PyLong_FromUnsignedLong(libver); if (r == NULL) return NULL; -@@ -6416,7 +6422,7 @@ PyInit__ssl(void) +@@ -6463,7 +6468,7 @@ PyInit__ssl(void) r = Py_BuildValue("IIIII", major, minor, fix, patch, status); if (r == NULL || PyModule_AddObject(m, "OPENSSL_VERSION_INFO", r)) return NULL; -- 2.30.2