From 3398ed29b0c09dcb5519e229ba25db30043d1566 Mon Sep 17 00:00:00 2001 From: Jeffery To Date: Tue, 22 Mar 2022 02:16:36 +0800 Subject: [PATCH] python3: Update to 3.7.13, refresh patches Includes fixes for: * Windows builds updated to bzip2 1.0.8 to mitigate CVE-2016-3189 and CVE-2019-12900 * CVE-2022-26488: Escalation of privilege via Windows Installer Signed-off-by: Jeffery To --- lang/python/python3-version.mk | 4 ++-- lang/python/python3/Makefile | 4 ++-- .../python3/patches-pip/001-pep517-pyc-fix.patch | 12 +++++------- .../patches/014-remove-platform-so-suffix.patch | 4 ++-- .../python3/patches/016-adjust-config-paths.patch | 4 ++-- ...untime-test-to-get-float-byte-order-GH-9085.patch | 2 +- .../patches/026-bpo-34585-run-autoconf-GH-9411.patch | 2 +- 7 files changed, 15 insertions(+), 17 deletions(-) diff --git a/lang/python/python3-version.mk b/lang/python/python3-version.mk index b1f1076985..2511abee1d 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:=7 -PYTHON3_VERSION_MICRO:=12 +PYTHON3_VERSION_MICRO:=13 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR) @@ -16,4 +16,4 @@ PYTHON3_SETUPTOOLS_PKG_RELEASE:=1 PYTHON3_PIP_PKG_RELEASE:=1 PYTHON3_SETUPTOOLS_VERSION:=47.1.0 -PYTHON3_PIP_VERSION:=20.1.1 +PYTHON3_PIP_VERSION:=22.0.4 diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index 320a68237e..7d02cb0d04 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -19,7 +19,7 @@ PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO) PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION) -PKG_HASH:=f77bf7fb47839f213e5cbf7827281078ea90de7e72b44f10d7ef385ea8c43210 +PKG_HASH:=99f106275df8899c3e8cb9d7c01ce686c202ef275953301427194693de5bef84 PKG_MAINTAINER:=Alexandru Ardelean , Jeffery To PKG_LICENSE:=Python/2.0 @@ -197,7 +197,7 @@ define Build/Compile/python3-pip --ignore-installed \ --root=$(PKG_BUILD_DIR)/install-pip \ --prefix=/usr \ - $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/pip-$(PYTHON3_PIP_VERSION)-py2.py3-none-any.whl + $(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/pip-$(PYTHON3_PIP_VERSION)-py3-none-any.whl $(call PatchDir,$(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages,./patches-pip,) endef endif # CONFIG_PACKAGE_python3-pip diff --git a/lang/python/python3/patches-pip/001-pep517-pyc-fix.patch b/lang/python/python3/patches-pip/001-pep517-pyc-fix.patch index b07cdd19ec..e600b0a30e 100644 --- a/lang/python/python3/patches-pip/001-pep517-pyc-fix.patch +++ b/lang/python/python3/patches-pip/001-pep517-pyc-fix.patch @@ -1,7 +1,8 @@ -diff -Nurp a/pip/_vendor/pep517/wrappers.py b/pip/_vendor/pep517/wrappers.py ---- a/pip/_vendor/pep517/wrappers.py 2020-05-19 10:39:38.000000000 +0800 -+++ b/pip/_vendor/pep517/wrappers.py 2020-06-30 20:19:05.495033208 +0800 -@@ -14,11 +14,16 @@ try: +diff --git a/pip/_vendor/pep517/in_process/__init__.py b/pip/_vendor/pep517/in_process/__init__.py +index c932313..a01143b 100644 +--- a/pip/_vendor/pep517/in_process/__init__.py ++++ b/pip/_vendor/pep517/in_process/__init__.py +@@ -10,8 +10,13 @@ try: import importlib.resources as resources def _in_proc_script_path(): @@ -17,6 +18,3 @@ diff -Nurp a/pip/_vendor/pep517/wrappers.py b/pip/_vendor/pep517/wrappers.py + if not os.path.isfile(_in_proc_script): + _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.pyc') + yield _in_proc_script - - - @contextmanager 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 7d48bd2919..be91fdde8f 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 -@@ -15275,7 +15275,7 @@ $as_echo_n "checking ABIFLAGS... " >&6; +@@ -15277,7 +15277,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 -@@ -4757,7 +4757,7 @@ AC_SUBST(SOABI) +@@ -4759,7 +4759,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 3cd76fbe27..7aa61aa571 100644 --- a/lang/python/python3/patches/016-adjust-config-paths.patch +++ b/lang/python/python3/patches/016-adjust-config-paths.patch @@ -49,7 +49,7 @@ fi elif test "$cross_compiling" = maybe; then as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5 -@@ -15294,7 +15294,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)' +@@ -15296,7 +15296,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)' $as_echo "$LDVERSION" >&6; } @@ -69,7 +69,7 @@ fi elif test "$cross_compiling" = maybe; then AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH]) -@@ -4774,7 +4774,7 @@ AC_MSG_RESULT($LDVERSION) +@@ -4776,7 +4776,7 @@ AC_MSG_RESULT($LDVERSION) dnl define LIBPL after ABIFLAGS and LDVERSION is defined. AC_SUBST(PY_ENABLE_SHARED) diff --git a/lang/python/python3/patches/025-bpo-34585-Dont-do-runtime-test-to-get-float-byte-order-GH-9085.patch b/lang/python/python3/patches/025-bpo-34585-Dont-do-runtime-test-to-get-float-byte-order-GH-9085.patch index b2deb679c6..86406c4129 100644 --- a/lang/python/python3/patches/025-bpo-34585-Dont-do-runtime-test-to-get-float-byte-order-GH-9085.patch +++ b/lang/python/python3/patches/025-bpo-34585-Dont-do-runtime-test-to-get-float-byte-order-GH-9085.patch @@ -25,7 +25,7 @@ RFC because this doesn't yet handle the weird ancient ARMv4 OABI 'mixed-endian' +builds. --- a/configure.ac +++ b/configure.ac -@@ -4365,74 +4365,24 @@ fi +@@ -4367,74 +4367,24 @@ fi # * Check for various properties of floating point * # ************************************************** diff --git a/lang/python/python3/patches/026-bpo-34585-run-autoconf-GH-9411.patch b/lang/python/python3/patches/026-bpo-34585-run-autoconf-GH-9411.patch index 2a2d7aef5d..0bcb879045 100644 --- a/lang/python/python3/patches/026-bpo-34585-run-autoconf-GH-9411.patch +++ b/lang/python/python3/patches/026-bpo-34585-run-autoconf-GH-9411.patch @@ -20,7 +20,7 @@ Follow up to 2a9c3805ddedf282881ef7811a561c70b74f80b1 (bpo-34585). m4_include([m4/ax_check_openssl.m4]) --- a/configure +++ b/configure -@@ -14235,131 +14235,77 @@ fi +@@ -14237,131 +14237,77 @@ fi # * Check for various properties of floating point * # ************************************************** -- 2.30.2