python3: Update to 3.11.5, refresh patches
authorJeffery To <[email protected]>
Tue, 5 Sep 2023 03:53:41 +0000 (11:53 +0800)
committerTianling Shen <[email protected]>
Fri, 8 Sep 2023 11:01:47 +0000 (19:01 +0800)
Includes fix for CVE-2023-40217 (Bypass TLS handshake on closed
sockets).

This also:

* Remove 027-install-python3-symlink-after-stdlib.patch

  This was merged upstream in
  https://github.com/python/cpython/pull/104693.

* Remove fix for unnecessary linking with libbsd
  (60bf01cb606344619e002901646171da1e69c0f9)

  This was fixed upstream in
  https://github.com/python/cpython/pull/105236.

Signed-off-by: Jeffery To <[email protected]>
lang/python/python3-version.mk
lang/python/python3/Makefile
lang/python/python3/patches/003-do-not-run-compileall.patch
lang/python/python3/patches/025-choose-python-config-version.patch
lang/python/python3/patches/026-openssl-feature-flags.patch
lang/python/python3/patches/027-install-python3-symlink-after-stdlib.patch [deleted file]
lang/python/python3/test.sh [new file with mode: 0644]

index 25185f44b561f311a76f3201b28bf37d57638d1f..4e503fb6e41c4c79a38e88a56a84507ad820698f 100644 (file)
@@ -8,7 +8,7 @@
 # Note: keep in sync with setuptools & pip
 PYTHON3_VERSION_MAJOR:=3
 PYTHON3_VERSION_MINOR:=11
-PYTHON3_VERSION_MICRO:=4
+PYTHON3_VERSION_MICRO:=5
 
 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:=65.5.0
-PYTHON3_PIP_VERSION:=23.1.2
+PYTHON3_PIP_VERSION:=23.2.1
index 0b4eb31592798c4a313d6eb4cc92465cc734fb15..a54d0270400a688d2d0ba8bf0e298c3474649cee 100644 (file)
@@ -11,15 +11,15 @@ include $(TOPDIR)/rules.mk
 include ../python3-version.mk
 
 PKG_NAME:=python3
-PKG_RELEASE:=3
+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:=2f0e409df2ab57aa9fc4cbddfb976af44e4e55bf6f619eee6bc5c2297264a7f6
+PKG_HASH:=85cd12e9cf1d6d5a45f17f7afe1cebe7ee628d3282281c492e86adf636defa3f
 
 PKG_MAINTAINER:=Jeffery To <[email protected]>
-PKG_LICENSE:=PSF-2.0
+PKG_LICENSE:=Python-2.0.1 0BSD
 PKG_LICENSE_FILES:=LICENSE Doc/copyright.rst Doc/license.rst Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi_osx/LICENSE Modules/expat/COPYING
 PKG_CPE_ID:=cpe:/a:python:python
 
@@ -162,11 +162,6 @@ CONFIGURE_VARS += \
        ac_cv_file__dev_ptc=no \
        ac_cv_file__dev_ptmx=yes
 
-# Do not link with libbsd for flock
-# https://github.com/openwrt/packages/issues/21161
-CONFIGURE_VARS += \
-       ac_cv_lib_bsd_flock=no
-
 # Disable stdlib modules
 # Check for a better way in the future: https://github.com/python/cpython/issues/98558
 CONFIGURE_VARS += \
index 9b6bc45a32bd648cfbe6145b03af40fb5de9c511..9bb10fac7927a7197108ddae50cd794c954d705d 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -2118,6 +2118,7 @@ libinstall:      all $(srcdir)/Modules/xxmodu
+@@ -2123,6 +2123,7 @@ libinstall:      all $(srcdir)/Modules/xxmodu
                $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
                        $(DESTDIR)$(LIBDEST)/distutils/tests ; \
        fi
@@ -8,7 +8,7 @@
        -PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
                $(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
                -j0 -d $(LIBDEST) -f \
-@@ -2145,6 +2146,7 @@ libinstall:      all $(srcdir)/Modules/xxmodu
+@@ -2150,6 +2151,7 @@ libinstall:      all $(srcdir)/Modules/xxmodu
                $(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
                -j0 -d $(LIBDEST)/site-packages -f \
                -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
index a8c06a7260ce0fb556df066ffde6ccd330180244..aa56d89426003c7d0b1b68aefaa42400ee631883 100644 (file)
@@ -1,6 +1,6 @@
 --- a/Makefile.pre.in
 +++ b/Makefile.pre.in
-@@ -2163,7 +2163,7 @@ python-config: $(srcdir)/Misc/python-con
+@@ -2168,7 +2168,7 @@ python-config: $(srcdir)/Misc/python-con
        @ # On Darwin, always use the python version of the script, the shell
        @ # version doesn't use the compiler customizations that are provided
        @ # in python (_osx_support.py).
index 2546048b0d7e8c2626d6ba4b7eafcd65b8f544e1..604f41d8e64f1a449ac8b7691bd09f1bd7bccc12 100644 (file)
@@ -47,7 +47,7 @@
      PY_HASH_ENTRY(NULL, NULL, NULL, 0),
  };
  
-@@ -873,11 +889,15 @@ py_evp_fromname(PyObject *module, const
+@@ -874,11 +890,15 @@ py_evp_fromname(PyObject *module, const
          goto exit;
      }
  
diff --git a/lang/python/python3/patches/027-install-python3-symlink-after-stdlib.patch b/lang/python/python3/patches/027-install-python3-symlink-after-stdlib.patch
deleted file mode 100644 (file)
index 26241d0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/Makefile.pre.in
-+++ b/Makefile.pre.in
-@@ -1839,7 +1839,7 @@ altbininstall: $(BUILDPYTHON) @FRAMEWORK
-                       $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE); \
-       fi
--bininstall: altbininstall
-+bininstall: commoninstall altbininstall
-       if test ! -d $(DESTDIR)$(LIBPC); then \
-               echo "Creating directory $(LIBPC)"; \
-               $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC); \
diff --git a/lang/python/python3/test.sh b/lang/python/python3/test.sh
new file mode 100644 (file)
index 0000000..b45e654
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+case "$1" in
+python3|python3-base|python3-light)
+       python3 --version | grep -Fx "Python $2"
+       ;;
+esac