diff options
author | Peter Marko <peter.marko@siemens.com> | 2025-02-09 00:23:19 +0100 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2025-02-14 07:49:09 -0800 |
commit | 61e2aebcb5efc5daa57a82d76550b4022342a6dd (patch) | |
tree | 0c61ac0e164f336d2be9ed0ce4964a93d9cc7d24 | |
parent | 27ef7bc694155332a7ba5532bf11cf52f246905c (diff) | |
download | poky-61e2aebcb5efc5daa57a82d76550b4022342a6dd.tar.gz |
python3: upgrade 3.12.8 -> 3.12.9
Release notes:
https://docs.python.org/release/3.12.9/whatsnew/changelog.html#python-3-12-9
Solves CVE-2025-0938, CVE-2024-12254 and 3 other vulnerabilities without
CVE number assigment.
Add a patch to fix failure of a new test.
(From OE-Core rev: cb0187ed2962e4c140c4f59ce08f94b18b05004c)
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
8 files changed, 67 insertions, 13 deletions
diff --git a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch index 3311a90bda..6e4930b9ec 100644 --- a/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch +++ b/meta/recipes-devtools/python/python3/0001-Avoid-shebang-overflow-on-python-config.py.patch | |||
@@ -19,7 +19,7 @@ diff --git a/Makefile.pre.in b/Makefile.pre.in | |||
19 | index 2d235d2..1ac2263 100644 | 19 | index 2d235d2..1ac2263 100644 |
20 | --- a/Makefile.pre.in | 20 | --- a/Makefile.pre.in |
21 | +++ b/Makefile.pre.in | 21 | +++ b/Makefile.pre.in |
22 | @@ -2354,6 +2354,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh | 22 | @@ -2355,6 +2355,8 @@ python-config: $(srcdir)/Misc/python-config.in Misc/python-config.sh |
23 | @ # Substitution happens here, as the completely-expanded BINDIR | 23 | @ # Substitution happens here, as the completely-expanded BINDIR |
24 | @ # is not available in configure | 24 | @ # is not available in configure |
25 | sed -e "s,@EXENAME@,$(EXENAME)," < $(srcdir)/Misc/python-config.in >python-config.py | 25 | sed -e "s,@EXENAME@,$(EXENAME)," < $(srcdir)/Misc/python-config.in >python-config.py |
diff --git a/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch b/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch index 6779dd515a..ec3bb9cbbd 100644 --- a/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch +++ b/meta/recipes-devtools/python/python3/0001-Skip-failing-tests-due-to-load-variability-on-YP-AB.patch | |||
@@ -54,7 +54,7 @@ diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py | |||
54 | index 9463add..4e0f39d 100644 | 54 | index 9463add..4e0f39d 100644 |
55 | --- a/Lib/test/test_time.py | 55 | --- a/Lib/test/test_time.py |
56 | +++ b/Lib/test/test_time.py | 56 | +++ b/Lib/test/test_time.py |
57 | @@ -527,6 +527,7 @@ class TimeTestCase(unittest.TestCase): | 57 | @@ -536,6 +536,7 @@ class TimeTestCase(unittest.TestCase): |
58 | @unittest.skipIf( | 58 | @unittest.skipIf( |
59 | support.is_wasi, "process_time not available on WASI" | 59 | support.is_wasi, "process_time not available on WASI" |
60 | ) | 60 | ) |
@@ -62,7 +62,7 @@ index 9463add..4e0f39d 100644 | |||
62 | def test_process_time(self): | 62 | def test_process_time(self): |
63 | # process_time() should not include time spend during a sleep | 63 | # process_time() should not include time spend during a sleep |
64 | start = time.process_time() | 64 | start = time.process_time() |
65 | @@ -540,6 +541,7 @@ class TimeTestCase(unittest.TestCase): | 65 | @@ -549,6 +550,7 @@ class TimeTestCase(unittest.TestCase): |
66 | self.assertTrue(info.monotonic) | 66 | self.assertTrue(info.monotonic) |
67 | self.assertFalse(info.adjustable) | 67 | self.assertFalse(info.adjustable) |
68 | 68 | ||
diff --git a/meta/recipes-devtools/python/python3/0001-ctypes-correct-gcc-check-in-test.patch b/meta/recipes-devtools/python/python3/0001-ctypes-correct-gcc-check-in-test.patch new file mode 100644 index 0000000000..3dd762e519 --- /dev/null +++ b/meta/recipes-devtools/python/python3/0001-ctypes-correct-gcc-check-in-test.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 2e2a0c8593a38f2020cc2baeeaa7972eb86773f9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Peter Marko <peter.marko@siemens.com> | ||
3 | Date: Sat, 8 Feb 2025 23:57:17 +0100 | ||
4 | Subject: [PATCH] ctypes: correct gcc check in test | ||
5 | |||
6 | In case gcc is not available, it will throw exception and test fails. | ||
7 | So chatch the exception to skip the test correctly. | ||
8 | |||
9 | ====================================================================== | ||
10 | ERROR: test_null_dlsym (test.test_ctypes.test_dlerror.TestNullDlsym.test_null_dlsym) | ||
11 | ---------------------------------------------------------------------- | ||
12 | Traceback (most recent call last): | ||
13 | File "/usr/lib/python3.12/test/test_ctypes/test_dlerror.py", line 61, in test_null_dlsym | ||
14 | retcode = subprocess.call(["gcc", "--version"], | ||
15 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
16 | File "/usr/lib/python3.12/subprocess.py", line 391, in call | ||
17 | with Popen(*popenargs, **kwargs) as p: | ||
18 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
19 | File "/usr/lib/python3.12/subprocess.py", line 1028, in __init__ | ||
20 | self._execute_child(args, executable, preexec_fn, close_fds, | ||
21 | File "/usr/lib/python3.12/subprocess.py", line 1963, in _execute_child | ||
22 | raise child_exception_type(errno_num, err_msg, err_filename) | ||
23 | FileNotFoundError: [Errno 2] No such file or directory: 'gcc' | ||
24 | |||
25 | Upstream-Status: Submitted [https://github.com/python/cpython/pull/129872] | ||
26 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
27 | --- | ||
28 | Lib/test/test_ctypes/test_dlerror.py | 11 +++++++---- | ||
29 | 1 file changed, 7 insertions(+), 4 deletions(-) | ||
30 | |||
31 | diff --git a/Lib/test/test_ctypes/test_dlerror.py b/Lib/test/test_ctypes/test_dlerror.py | ||
32 | index 6bf492399cb..56eb7622b4d 100644 | ||
33 | --- a/Lib/test/test_ctypes/test_dlerror.py | ||
34 | +++ b/Lib/test/test_ctypes/test_dlerror.py | ||
35 | @@ -58,11 +58,14 @@ def test_null_dlsym(self): | ||
36 | import subprocess | ||
37 | import tempfile | ||
38 | |||
39 | - retcode = subprocess.call(["gcc", "--version"], | ||
40 | - stdout=subprocess.DEVNULL, | ||
41 | - stderr=subprocess.DEVNULL) | ||
42 | - if retcode != 0: | ||
43 | + try: | ||
44 | + retcode = subprocess.call(["gcc", "--version"], | ||
45 | + stdout=subprocess.DEVNULL, | ||
46 | + stderr=subprocess.DEVNULL) | ||
47 | + except: | ||
48 | self.skipTest("gcc is missing") | ||
49 | + if retcode != 0: | ||
50 | + self.skipTest("gcc is not working") | ||
51 | |||
52 | pipe_r, pipe_w = os.pipe() | ||
53 | self.addCleanup(os.close, pipe_r) | ||
diff --git a/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch b/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch index c9ef409018..5a1f9ffccf 100644 --- a/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch +++ b/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch | |||
@@ -73,7 +73,7 @@ index 9270b5f..955daad 100644 | |||
73 | *clang*) | 73 | *clang*) |
74 | # Any changes made here should be reflected in the GCC+Darwin case below | 74 | # Any changes made here should be reflected in the GCC+Darwin case below |
75 | PGO_PROF_GEN_FLAG="-fprofile-instr-generate" | 75 | PGO_PROF_GEN_FLAG="-fprofile-instr-generate" |
76 | @@ -2158,7 +2159,7 @@ AC_MSG_RESULT([$BOLT_APPLY_FLAGS]) | 76 | @@ -2179,7 +2180,7 @@ AC_MSG_RESULT([$BOLT_APPLY_FLAGS]) |
77 | # compiler and platform. BASECFLAGS tweaks need to be made even if the | 77 | # compiler and platform. BASECFLAGS tweaks need to be made even if the |
78 | # user set OPT. | 78 | # user set OPT. |
79 | 79 | ||
@@ -82,7 +82,7 @@ index 9270b5f..955daad 100644 | |||
82 | *clang*) | 82 | *clang*) |
83 | cc_is_clang=1 | 83 | cc_is_clang=1 |
84 | ;; | 84 | ;; |
85 | @@ -2430,7 +2431,7 @@ yes) | 85 | @@ -2451,7 +2452,7 @@ yes) |
86 | 86 | ||
87 | # ICC doesn't recognize the option, but only emits a warning | 87 | # ICC doesn't recognize the option, but only emits a warning |
88 | ## XXX does it emit an unused result warning and can it be disabled? | 88 | ## XXX does it emit an unused result warning and can it be disabled? |
@@ -91,7 +91,7 @@ index 9270b5f..955daad 100644 | |||
91 | [*icc*], [ac_cv_disable_unused_result_warning=no] | 91 | [*icc*], [ac_cv_disable_unused_result_warning=no] |
92 | [PY_CHECK_CC_WARNING([disable], [unused-result])]) | 92 | [PY_CHECK_CC_WARNING([disable], [unused-result])]) |
93 | AS_VAR_IF([ac_cv_disable_unused_result_warning], [yes], | 93 | AS_VAR_IF([ac_cv_disable_unused_result_warning], [yes], |
94 | @@ -2676,7 +2677,7 @@ yes) | 94 | @@ -2697,7 +2698,7 @@ yes) |
95 | ;; | 95 | ;; |
96 | esac | 96 | esac |
97 | 97 | ||
@@ -100,7 +100,7 @@ index 9270b5f..955daad 100644 | |||
100 | *mpicc*) | 100 | *mpicc*) |
101 | CFLAGS_NODIST="$CFLAGS_NODIST" | 101 | CFLAGS_NODIST="$CFLAGS_NODIST" |
102 | ;; | 102 | ;; |
103 | @@ -3511,7 +3512,7 @@ then | 103 | @@ -3532,7 +3533,7 @@ then |
104 | then | 104 | then |
105 | LINKFORSHARED="-Wl,--export-dynamic" | 105 | LINKFORSHARED="-Wl,--export-dynamic" |
106 | fi;; | 106 | fi;; |
@@ -109,7 +109,7 @@ index 9270b5f..955daad 100644 | |||
109 | *gcc*) | 109 | *gcc*) |
110 | if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null | 110 | if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null |
111 | then | 111 | then |
112 | @@ -6832,7 +6833,7 @@ if test "$ac_cv_gcc_asm_for_x87" = yes; then | 112 | @@ -6853,7 +6854,7 @@ if test "$ac_cv_gcc_asm_for_x87" = yes; then |
113 | # Some versions of gcc miscompile inline asm: | 113 | # Some versions of gcc miscompile inline asm: |
114 | # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491 | 114 | # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491 |
115 | # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html | 115 | # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html |
diff --git a/meta/recipes-devtools/python/python3/0001-test_readline-skip-limited-history-test.patch b/meta/recipes-devtools/python/python3/0001-test_readline-skip-limited-history-test.patch index 3568d92bda..f9dc0ddcda 100644 --- a/meta/recipes-devtools/python/python3/0001-test_readline-skip-limited-history-test.patch +++ b/meta/recipes-devtools/python/python3/0001-test_readline-skip-limited-history-test.patch | |||
@@ -20,7 +20,7 @@ diff --git a/Lib/test/test_readline.py b/Lib/test/test_readline.py | |||
20 | index fab124a..291dd48 100644 | 20 | index fab124a..291dd48 100644 |
21 | --- a/Lib/test/test_readline.py | 21 | --- a/Lib/test/test_readline.py |
22 | +++ b/Lib/test/test_readline.py | 22 | +++ b/Lib/test/test_readline.py |
23 | @@ -133,6 +133,7 @@ class TestHistoryManipulation (unittest.TestCase): | 23 | @@ -141,6 +141,7 @@ class TestHistoryManipulation (unittest.TestCase): |
24 | self.assertEqual(readline.get_history_item(1), "entrée 1") | 24 | self.assertEqual(readline.get_history_item(1), "entrée 1") |
25 | self.assertEqual(readline.get_history_item(2), "entrée 22") | 25 | self.assertEqual(readline.get_history_item(2), "entrée 22") |
26 | 26 | ||
@@ -28,7 +28,7 @@ index fab124a..291dd48 100644 | |||
28 | def test_write_read_limited_history(self): | 28 | def test_write_read_limited_history(self): |
29 | previous_length = readline.get_history_length() | 29 | previous_length = readline.get_history_length() |
30 | self.addCleanup(readline.set_history_length, previous_length) | 30 | self.addCleanup(readline.set_history_length, previous_length) |
31 | @@ -371,6 +372,7 @@ readline.write_history_file(history_file) | 31 | @@ -379,6 +380,7 @@ readline.write_history_file(history_file) |
32 | self.assertIn(b"done", output) | 32 | self.assertIn(b"done", output) |
33 | 33 | ||
34 | 34 | ||
diff --git a/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch b/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch index f5e500b146..e917c8bdf0 100644 --- a/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch +++ b/meta/recipes-devtools/python/python3/0020-configure.ac-setup.py-do-not-add-a-curses-include-pa.patch | |||
@@ -18,7 +18,7 @@ diff --git a/configure.ac b/configure.ac | |||
18 | index 6e465a4..13c4835 100644 | 18 | index 6e465a4..13c4835 100644 |
19 | --- a/configure.ac | 19 | --- a/configure.ac |
20 | +++ b/configure.ac | 20 | +++ b/configure.ac |
21 | @@ -6537,12 +6537,6 @@ AS_VAR_IF([have_panel], [no], [ | 21 | @@ -6558,12 +6558,6 @@ AS_VAR_IF([have_panel], [no], [ |
22 | AC_MSG_RESULT([$have_panel (CFLAGS: $PANEL_CFLAGS, LIBS: $PANEL_LIBS)]) | 22 | AC_MSG_RESULT([$have_panel (CFLAGS: $PANEL_CFLAGS, LIBS: $PANEL_LIBS)]) |
23 | ]) | 23 | ]) |
24 | 24 | ||
diff --git a/meta/recipes-devtools/python/python3/makerace.patch b/meta/recipes-devtools/python/python3/makerace.patch index f420404f34..862b648685 100644 --- a/meta/recipes-devtools/python/python3/makerace.patch +++ b/meta/recipes-devtools/python/python3/makerace.patch | |||
@@ -20,7 +20,7 @@ diff --git a/Makefile.pre.in b/Makefile.pre.in | |||
20 | index dce36a5..2d235d2 100644 | 20 | index dce36a5..2d235d2 100644 |
21 | --- a/Makefile.pre.in | 21 | --- a/Makefile.pre.in |
22 | +++ b/Makefile.pre.in | 22 | +++ b/Makefile.pre.in |
23 | @@ -2265,7 +2265,7 @@ COMPILEALL_OPTS=-j0 | 23 | @@ -2266,7 +2266,7 @@ COMPILEALL_OPTS=-j0 |
24 | TEST_MODULES=@TEST_MODULES@ | 24 | TEST_MODULES=@TEST_MODULES@ |
25 | 25 | ||
26 | .PHONY: libinstall | 26 | .PHONY: libinstall |
diff --git a/meta/recipes-devtools/python/python3_3.12.8.bb b/meta/recipes-devtools/python/python3_3.12.9.bb index fddb29b271..2becde7f34 100644 --- a/meta/recipes-devtools/python/python3_3.12.8.bb +++ b/meta/recipes-devtools/python/python3_3.12.9.bb | |||
@@ -34,13 +34,14 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ | |||
34 | file://0001-test_deadlock-skip-problematic-test.patch \ | 34 | file://0001-test_deadlock-skip-problematic-test.patch \ |
35 | file://0001-test_active_children-skip-problematic-test.patch \ | 35 | file://0001-test_active_children-skip-problematic-test.patch \ |
36 | file://0001-test_readline-skip-limited-history-test.patch \ | 36 | file://0001-test_readline-skip-limited-history-test.patch \ |
37 | file://0001-ctypes-correct-gcc-check-in-test.patch \ | ||
37 | " | 38 | " |
38 | 39 | ||
39 | SRC_URI:append:class-native = " \ | 40 | SRC_URI:append:class-native = " \ |
40 | file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \ | 41 | file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \ |
41 | " | 42 | " |
42 | 43 | ||
43 | SRC_URI[sha256sum] = "c909157bb25ec114e5869124cc2a9c4a4d4c1e957ca4ff553f1edc692101154e" | 44 | SRC_URI[sha256sum] = "7220835d9f90b37c006e9842a8dff4580aaca4318674f947302b8d28f3f81112" |
44 | 45 | ||
45 | # exclude pre-releases for both python 2.x and 3.x | 46 | # exclude pre-releases for both python 2.x and 3.x |
46 | UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" | 47 | UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" |