From 24fbbb1ff557f791caf263d738fb82d63777ff54 Mon Sep 17 00:00:00 2001
From: Upgrade Helper <auh@yoctoproject.org>
Date: Sat, 15 Oct 2022 11:15:38 +0000
Subject: [PATCH] python3: upgrade 3.10.6 -> 3.10.8

---
 ...-search-system-for-headers-libraries.patch |  2 +-
 ...-use-prefix-value-from-build-configu.patch |  2 +-
 ...e-the-race-condition-in-testSockName.patch | 47 -------------------
 ...fig-append-STAGING_LIBDIR-python-sys.patch |  2 +-
 ...tutils-prefix-is-inside-staging-area.patch |  2 +-
 .../{python3_3.10.6.bb => python3_3.10.8.bb}  | 46 ++++++++++++++++--
 6 files changed, 47 insertions(+), 54 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python3/0001-Mitigate-the-race-condition-in-testSockName.patch
 rename meta/recipes-devtools/python/{python3_3.10.6.bb => python3_3.10.8.bb} (90%)

diff --git a/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch b/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch
index c790c7b886..b8b5ce9d0f 100644
--- a/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch
+++ b/meta/recipes-devtools/python/python3/0001-Don-t-search-system-for-headers-libraries.patch
@@ -1,4 +1,4 @@
-From 7589ab03ad3f7cb4bb092c31273ff22371ac77e4 Mon Sep 17 00:00:00 2001
+From 69d4c763367c82d87499ccf2c4d7b839dcdf0a6a Mon Sep 17 00:00:00 2001
 From: Jeremy Puhlman <jpuhlman@mvista.com>
 Date: Wed, 4 Mar 2020 00:06:42 +0000
 Subject: [PATCH] Don't search system for headers/libraries
diff --git a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch
index 641017edd5..144983f5e6 100644
--- a/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch
+++ b/meta/recipes-devtools/python/python3/0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch
@@ -1,4 +1,4 @@
-From d82cb96eed1098920ad3cdcb36feb32137618066 Mon Sep 17 00:00:00 2001
+From cbf401ecec5efa5ddf03fe4491779dbefe11737f Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex@linutronix.de>
 Date: Fri, 10 Sep 2021 12:28:31 +0200
 Subject: [PATCH] Lib/sysconfig.py: use prefix value from build configuration
diff --git a/meta/recipes-devtools/python/python3/0001-Mitigate-the-race-condition-in-testSockName.patch b/meta/recipes-devtools/python/python3/0001-Mitigate-the-race-condition-in-testSockName.patch
deleted file mode 100644
index e19df08f87..0000000000
--- a/meta/recipes-devtools/python/python3/0001-Mitigate-the-race-condition-in-testSockName.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Upstream-Status: Pending
-Signed-off-by: Ross Burton <ross.burton@arm.com>
-
-From 8103b90148e8768456c3ab707de105d63d9d5b20 Mon Sep 17 00:00:00 2001
-From: Ross Burton <ross.burton@arm.com>
-Date: Fri, 17 Jun 2022 11:53:59 +0100
-Subject: [PATCH] Mitigate the race condition in testSockName
-
-find_unused_port() has an inherent race condition, but we can't use
-bind_port() as that uses .getsockname() which this test is exercising.
-
-Try binding to unused ports a few times before failing.
----
- Lib/test/test_socket.py | 15 +++++++++++++--
- 1 file changed, 13 insertions(+), 2 deletions(-)
-
-diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
-index c981903824..b1630d18b6 100644
---- a/Lib/test/test_socket.py
-+++ b/Lib/test/test_socket.py
-@@ -1390,10 +1390,21 @@ def testStringToIPv6(self):
- 
-     def testSockName(self):
-         # Testing getsockname()
--        port = socket_helper.find_unused_port()
-         sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
-         self.addCleanup(sock.close)
--        sock.bind(("0.0.0.0", port))
-+
-+        # Since find_unused_port() is inherently subject to race conditions, we
-+        # call it a couple times if necessary.
-+        for i in itertools.count():
-+            port = socket_helper.find_unused_port()
-+            try:
-+                sock.bind(("0.0.0.0", port))
-+            except OSError as e:
-+                if e.errno != errno.EADDRINUSE or i == 5:
-+                    raise
-+            else:
-+                break
-+
-         name = sock.getsockname()
-         # XXX(nnorwitz): http://tinyurl.com/os5jz seems to indicate
-         # it reasonable to get the host's addr in addition to 0.0.0.0.
--- 
-2.25.1
-
diff --git a/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch b/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch
index 368a725ff7..639865fa5d 100644
--- a/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch
+++ b/meta/recipes-devtools/python/python3/0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch
@@ -1,4 +1,4 @@
-From c24674e0a52367359a1a3d950bab8bc3d282279b Mon Sep 17 00:00:00 2001
+From d6c9508fa68224da9c553a758f3092582d3e0995 Mon Sep 17 00:00:00 2001
 From: Alexander Kanavin <alex.kanavin@gmail.com>
 Date: Thu, 31 Jan 2019 16:46:30 +0100
 Subject: [PATCH] distutils/sysconfig: append
diff --git a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
index a06e9b56c1..3d3618a500 100644
--- a/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
+++ b/meta/recipes-devtools/python/python3/12-distutils-prefix-is-inside-staging-area.patch
@@ -1,4 +1,4 @@
-From 1cc4cab8d579bbccb8a4fc13a28158a58c603cb4 Mon Sep 17 00:00:00 2001
+From 5d8a5327259683173550cfd99f799a5e9506560a Mon Sep 17 00:00:00 2001
 From: Khem Raj <raj.khem@gmail.com>
 Date: Tue, 14 May 2013 15:00:26 -0700
 Subject: [PATCH] python3: Add target and native recipes
diff --git a/meta/recipes-devtools/python/python3_3.10.6.bb b/meta/recipes-devtools/python/python3_3.10.8.bb
similarity index 90%
rename from meta/recipes-devtools/python/python3_3.10.6.bb
rename to meta/recipes-devtools/python/python3_3.10.8.bb
index 1f8b60a7a5..33076507cc 100644
--- a/meta/recipes-devtools/python/python3_3.10.6.bb
+++ b/meta/recipes-devtools/python/python3_3.10.8.bb
@@ -1,10 +1,47 @@
+# FIXME: the LIC_FILES_CHKSUM values have been updated by 'devtool upgrade'.
+# The following is the difference between the old and the new license text.
+# Please update the LICENSE value if needed, and summarize the changes in
+# the commit message via 'License-Update:' tag.
+# (example: 'License-Update: copyright years updated.')
+#
+# The changes:
+#
+# --- LICENSE
+# +++ LICENSE
+# @@ -2,12 +2,12 @@
+#  ==========================
+#  
+#  Python was created in the early 1990s by Guido van Rossum at Stichting
+# -Mathematisch Centrum (CWI, see http://www.cwi.nl) in the Netherlands
+# +Mathematisch Centrum (CWI, see https://www.cwi.nl) in the Netherlands
+#  as a successor of a language called ABC.  Guido remains Python's
+#  principal author, although it includes many contributions from others.
+#  
+#  In 1995, Guido continued his work on Python at the Corporation for
+# -National Research Initiatives (CNRI, see http://www.cnri.reston.va.us)
+# +National Research Initiatives (CNRI, see https://www.cnri.reston.va.us)
+#  in Reston, Virginia where he released several versions of the
+#  software.
+#  
+# @@ -19,7 +19,7 @@
+#  created specifically to own Python-related Intellectual Property.
+#  Zope Corporation was a sponsoring member of the PSF.
+#  
+# -All Python releases are Open Source (see http://www.opensource.org for
+# +All Python releases are Open Source (see https://opensource.org for
+#  the Open Source Definition).  Historically, most, but not all, Python
+#  releases have also been GPL-compatible; the table below summarizes
+#  the various releases.
+# 
+#
+
 SUMMARY = "The Python Programming Language"
 HOMEPAGE = "http://www.python.org"
 DESCRIPTION = "Python is a programming language that lets you work more quickly and integrate your systems more effectively."
 LICENSE = "PSF-2.0"
 SECTION = "devel/python"
 
-LIC_FILES_CHKSUM = "file://LICENSE;md5=4b8801e752a2c70ac41a5f9aa243f766"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=a1822df8d0f068628ca6090aedc5bfc8"
 
 SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
            file://run-ptest \
@@ -35,7 +72,10 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
            file://0001-setup.py-Do-not-detect-multiarch-paths-when-cross-co.patch \
            file://deterministic_imports.patch \
            file://0001-Avoid-shebang-overflow-on-python-config.py.patch \
-           file://0001-Mitigate-the-race-condition-in-testSockName.patch \
+           file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \
+           file://0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch \
+           file://12-distutils-prefix-is-inside-staging-area.patch \
+           file://0001-Don-t-search-system-for-headers-libraries.patch \
            "
 
 SRC_URI:append:class-native = " \
@@ -44,7 +84,7 @@ SRC_URI:append:class-native = " \
            file://12-distutils-prefix-is-inside-staging-area.patch \
            file://0001-Don-t-search-system-for-headers-libraries.patch \
            "
-SRC_URI[sha256sum] = "f795ff87d11d4b0c7c33bc8851b0c28648d8a4583aa2100a98c22b4326b6d3f3"
+SRC_URI[sha256sum] = "6a30ecde59c47048013eb5a658c9b5dec277203d2793667f578df7671f7f03f3"
 
 # exclude pre-releases for both python 2.x and 3.x
 UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
-- 
2.31.1

