python3: Update to 3.7.16, refresh patches 20676/head
authorJeffery To <jeffery.to@gmail.com>
Thu, 16 Mar 2023 07:05:35 +0000 (15:05 +0800)
committerJeffery To <jeffery.to@gmail.com>
Thu, 16 Mar 2023 07:05:35 +0000 (15:05 +0800)
Includes fixes:

* 3.7.14:
  * CVE-2020-10735: Prevent DoS by large int<->str conversions
  * CVE-2021-28861: http.server: Open Redirection if the URL path starts with //

* 3.7.16:
  * CVE-2022-45061: Slow IDNA decoding with large strings
  * CVE-2022-37454: Buffer overflow in the _sha3 module
  * CVE-2015-20107: mailcap.findmatch: document shell command Injection danger in filename parameter

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
lang/python/python3-version.mk
lang/python/python3/Makefile
lang/python/python3/patches/003-do-not-run-distutils-tests.patch
lang/python/python3/patches/004-do-not-write-bytes-codes.patch
lang/python/python3/patches/013-getbuildinfo-date-time-source-date-epoch.patch
lang/python/python3/patches/016-adjust-config-paths.patch

index 2511abee1db750c461832fb49d8a0a1846c5cc76..a51b1dce2ba695add5c0148eda55201fb84d12af 100644 (file)
@@ -8,7 +8,7 @@
 # Note: keep in sync with setuptools & pip
 PYTHON3_VERSION_MAJOR:=3
 PYTHON3_VERSION_MINOR:=7
-PYTHON3_VERSION_MICRO:=13
+PYTHON3_VERSION_MICRO:=16
 
 PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
 
index 7d02cb0d04cda2d490c4a77ab1e6577a5e77702f..a4d25c4aae8d86f98392579b81beb8244e1e42b4 100644 (file)
@@ -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:=99f106275df8899c3e8cb9d7c01ce686c202ef275953301427194693de5bef84
+PKG_HASH:=8338f0c2222d847e904c955369155dc1beeeed806e8d5ef04b00ef4787238bfd
 
 PKG_MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>, Jeffery To <jeffery.to@gmail.com>
 PKG_LICENSE:=Python/2.0
index d8f478d49493aac271336b4a054ec0fa24dca1cf..71d6c6d5ceb3e6af4134921fc11794386eb7a799 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -1400,6 +1400,7 @@ libinstall:      build_all $(srcdir)/Modules/
+@@ -1407,6 +1407,7 @@ libinstall:      build_all $(srcdir)/Modules/
        $(INSTALL_DATA) `cat pybuilddir.txt`/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py \
                $(DESTDIR)$(LIBDEST); \
        $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
@@ -8,7 +8,7 @@
        if test -d $(DESTDIR)$(LIBDEST)/distutils/tests; then \
                $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
                        $(DESTDIR)$(LIBDEST)/distutils/tests ; \
-@@ -1435,6 +1436,7 @@ libinstall:      build_all $(srcdir)/Modules/
+@@ -1442,6 +1443,7 @@ libinstall:      build_all $(srcdir)/Modules/
                $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
        -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
                $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
index eb66443aa83e008eaa0e5ef92f72771de38613b6..d92f6978369ef04b2b4d2472de8edb20aab8cd8f 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Python/pylifecycle.c
 +++ b/Python/pylifecycle.c
-@@ -120,7 +120,7 @@ int Py_NoSiteFlag = 0; /* Suppress 'impo
+@@ -121,7 +121,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 */
index 5a907b0fab950d1d06c1c1da14cdcbea8cead446..7d5da728434bbecb6286062e341018cf53c20bed 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -754,6 +754,16 @@ regen-all: regen-opcode regen-opcode-tar
+@@ -761,6 +761,16 @@ regen-all: regen-opcode regen-opcode-tar
  ############################################################################
  # Special rules for object files
  
@@ -17,7 +17,7 @@
  Modules/getbuildinfo.o: $(PARSER_OBJS) \
                $(OBJECT_OBJS) \
                $(PYTHON_OBJS) \
-@@ -761,6 +771,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
+@@ -768,6 +778,8 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \
                $(MODOBJS) \
                $(srcdir)/Modules/getbuildinfo.c
        $(CC) -c $(PY_CORE_CFLAGS) \
index 7aa61aa57194efa267116e2b843c082b211e1481..4559a3c05d75e7763c9b3662c9c5348675360f24 100644 (file)
@@ -20,7 +20,7 @@
          abi=sys.abiflags,
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -1409,7 +1409,7 @@ libinstall:      build_all $(srcdir)/Modules/
+@@ -1416,7 +1416,7 @@ libinstall:      build_all $(srcdir)/Modules/
                        esac; \
                done; \
        done
@@ -29,7 +29,7 @@
                $(DESTDIR)$(LIBDEST); \
        $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
  ifeq (@COMPILE_ALL_TESTS@,yes)
-@@ -1554,7 +1554,7 @@ sharedinstall: sharedmods
+@@ -1561,7 +1561,7 @@ sharedinstall: sharedmods
                --install-scripts=$(BINDIR) \
                --install-platlib=$(DESTSHARED) \
                --root=$(DESTDIR)/