Skip to content

Commit 6b40623

Browse files
jefferytofarmergreg
authored andcommitted
python3: Update to 3.8.4, refresh/rework patches, backport patches
This version includes fixes for: * CVE-2020-14422: Hash collisions in IPv4Interface and IPv6Interface * CVE-2020-15523: Python uses invalid DLL path after calling Py_SetPath on Windows This version also includes support for OpenSSL 1.1.x builds that use 'no-deprecated' and '--api=1.1.0'[1], and so this removes the previous OpenSSL-related patches. This also backports fixes for security issues, including: * CVE-2019-20907: Infinite loop in the tarfile module This also updates the setuptools and pip packages to 47.1.0 and 20.1.1, respectively. [1]: python/cpython#20566 Signed-off-by: Jeffery To <jeffery.to@gmail.com>
1 parent fffd3c1 commit 6b40623

12 files changed

Lines changed: 304 additions & 304 deletions

‎lang/python/python3-version.mk‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
# Note: keep in sync with setuptools & pip
99
PYTHON3_VERSION_MAJOR:=3
1010
PYTHON3_VERSION_MINOR:=8
11-
PYTHON3_VERSION_MICRO:=3
11+
PYTHON3_VERSION_MICRO:=4
1212

1313
PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
1414

15-
PYTHON3_SETUPTOOLS_PKG_RELEASE:=3
16-
PYTHON3_PIP_PKG_RELEASE:=4
15+
PYTHON3_SETUPTOOLS_PKG_RELEASE:=1
16+
PYTHON3_PIP_PKG_RELEASE:=1
1717

18-
PYTHON3_SETUPTOOLS_VERSION:=41.2.0
19-
PYTHON3_PIP_VERSION:=19.2.3
18+
PYTHON3_SETUPTOOLS_VERSION:=47.1.0
19+
PYTHON3_PIP_VERSION:=20.1.1

‎lang/python/python3/Makefile‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ include $(TOPDIR)/rules.mk
1111
include ../python3-version.mk
1212

1313
PKG_NAME:=python3
14-
PKG_RELEASE:=3
14+
PKG_RELEASE:=1
1515
PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO)
1616

1717
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
1818
PKG_SOURCE_URL:=https://www.python.org/ftp/python/$(PKG_VERSION)
19-
PKG_HASH:=dfab5ec723c218082fe3d5d7ae17ecbdebffa9a1aea4d64aa3a2ecdd2e795864
19+
PKG_HASH:=5f41968a95afe9bc12192d7e6861aab31e80a46c46fa59d3d837def6a4cd4d37
2020

2121
PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
2222
PKG_LICENSE:=Python/2.0
@@ -175,7 +175,7 @@ define Build/Compile/python3-setuptools
175175
--ignore-installed \
176176
--root=$(PKG_BUILD_DIR)/install-setuptools \
177177
--prefix=/usr \
178-
$(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/setuptools-$(PYTHON3_SETUPTOOLS_VERSION)-py2.py3-none-any.whl
178+
$(PKG_BUILD_DIR)/Lib/ensurepip/_bundled/setuptools-$(PYTHON3_SETUPTOOLS_VERSION)-py3-none-any.whl
179179
$(call PatchDir,$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages,./patches-setuptools,)
180180
endef
181181
endif # CONFIG_PACKAGE_python3-setuptools

‎lang/python/python3/patches-pip/001-pep517-pyc-fix.patch‎

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
diff -Nurp a/pip/_vendor/pep517/wrappers.py b/pip/_vendor/pep517/wrappers.py
2-
--- a/pip/_vendor/pep517/wrappers.py 2019-07-30 20:02:13.000000000 +0800
3-
+++ b/pip/_vendor/pep517/wrappers.py 2020-04-24 17:23:35.764905235 +0800
4-
@@ -10,6 +10,9 @@ from . import compat
2+
--- a/pip/_vendor/pep517/wrappers.py 2020-05-19 10:39:38.000000000 +0800
3+
+++ b/pip/_vendor/pep517/wrappers.py 2020-06-30 20:19:05.495033208 +0800
4+
@@ -14,11 +14,16 @@ try:
5+
import importlib.resources as resources
56

6-
_in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.py')
7+
def _in_proc_script_path():
8+
- return resources.path(__package__, '_in_process.py')
9+
+ if resources.is_resource(__package__, '_in_process.py'):
10+
+ return resources.path(__package__, '_in_process.py')
11+
+ return resources.path(__package__, '_in_process.pyc')
12+
except ImportError:
13+
@contextmanager
14+
def _in_proc_script_path():
15+
- yield pjoin(dirname(abspath(__file__)), '_in_process.py')
16+
+ _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.py')
17+
+ if not os.path.isfile(_in_proc_script):
18+
+ _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.pyc')
19+
+ yield _in_proc_script
720

8-
+if not os.path.isfile(_in_proc_script):
9-
+ _in_proc_script = pjoin(dirname(abspath(__file__)), '_in_process.pyc')
10-
+
1121

1222
@contextmanager
13-
def tempdir():

‎lang/python/python3/patches-setuptools/001-reproducible.patch‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Index: b/setuptools/command/easy_install.py
55
===================================================================
66
--- a/setuptools/command/easy_install.py
77
+++ b/setuptools/command/easy_install.py
8-
@@ -436,7 +436,7 @@ consider to install to another location,
8+
@@ -423,7 +423,7 @@ class easy_install(Command):
99
for spec in self.args:
1010
self.easy_install(spec, not self.no_deps)
1111
if self.record:

‎lang/python/python3/patches-setuptools/002-sorted-requires.patch‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ Index: b/setuptools/command/egg_info.py
55
===================================================================
66
--- a/setuptools/command/egg_info.py
77
+++ b/setuptools/command/egg_info.py
8-
@@ -621,7 +621,7 @@ def warn_depends_obsolete(cmd, basename,
9-
def _write_requirements(stream, reqs):
10-
lines = yield_lines(reqs or ())
11-
append_cr = lambda line: line + '\n'
8+
@@ -641,7 +641,7 @@ def _write_requirements(stream, reqs):
9+
10+
def append_cr(line):
11+
return line + '\n'
1212
- lines = map(append_cr, lines)
1313
+ lines = map(append_cr, sorted(lines))
1414
stream.writelines(lines)

‎lang/python/python3/patches-setuptools/003-PKG-INFO-output-reproducible.patch‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ https://sources.debian.org/patches/python-setuptools/40.8.0-1/PKG-INFO-output-re
33

44
--- a/setuptools/dist.py
55
+++ b/setuptools/dist.py
6-
@@ -191,7 +191,7 @@ def write_pkg_file(self, file):
6+
@@ -193,7 +193,7 @@ def write_pkg_file(self, file):
77
self.long_description_content_type
88
)
99
if self.provides_extras:

‎lang/python/python3/patches-setuptools/004-site-patch.patch‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/setuptools/command/easy_install.py
22
+++ b/setuptools/command/easy_install.py
3-
@@ -1315,7 +1315,10 @@ class easy_install(Command):
3+
@@ -1324,7 +1324,10 @@ class easy_install(Command):
44
return # already did it, or don't need to
55

66
sitepy = os.path.join(self.install_dir, "site.py")

‎lang/python/python3/patches/020-ssl-module-emulate-tls-methods.patch‎

Lines changed: 0 additions & 218 deletions
This file was deleted.

‎lang/python/python3/patches/021-openssl-deprecated.patch‎

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)