summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3_3.12.11.bb
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2025-08-09 22:37:21 +0200
committerSteve Sakoman <steve@sakoman.com>2025-08-20 07:37:19 -0700
commit6d83b872af7421e1e4f18c999f356855116dc238 (patch)
tree7e1d96591659e800508c185dbc19b4606d8fb883 /meta/recipes-devtools/python/python3_3.12.11.bb
parent0263c3dfa4fe1b26619f028a6a1c242e7e221dbf (diff)
downloadpoky-6d83b872af7421e1e4f18c999f356855116dc238.tar.gz
python3: patch CVE-2025-8194
Pick commit from 3.12 branch mentioned in NVD report. https://nvd.nist.gov/vuln/detail/CVE-2025-8194 (From OE-Core rev: 34f1b4877a0601d2057453c159c76a54754f229a) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-devtools/python/python3_3.12.11.bb')
-rw-r--r--meta/recipes-devtools/python/python3_3.12.11.bb9
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/recipes-devtools/python/python3_3.12.11.bb b/meta/recipes-devtools/python/python3_3.12.11.bb
index 84c4f74158..1c31077320 100644
--- a/meta/recipes-devtools/python/python3_3.12.11.bb
+++ b/meta/recipes-devtools/python/python3_3.12.11.bb
@@ -34,6 +34,7 @@ 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://CVE-2025-8194.patch \
37 " 38 "
38 39
39SRC_URI:append:class-native = " \ 40SRC_URI:append:class-native = " \
@@ -184,14 +185,14 @@ do_install:append:class-native() {
184 # when they're only used for python called with -O or -OO. 185 # when they're only used for python called with -O or -OO.
185 #find ${D} -name *opt-*.pyc -delete 186 #find ${D} -name *opt-*.pyc -delete
186 # Remove all pyc files. There are a ton of them and it is probably faster to let 187 # Remove all pyc files. There are a ton of them and it is probably faster to let
187 # python create the ones it wants at runtime rather than manage in the sstate 188 # python create the ones it wants at runtime rather than manage in the sstate
188 # tarballs and sysroot creation. 189 # tarballs and sysroot creation.
189 find ${D} -name *.pyc -delete 190 find ${D} -name *.pyc -delete
190 191
191 # Nothing should be looking into ${B} for python3-native 192 # Nothing should be looking into ${B} for python3-native
192 sed -i -e 's:${B}:/build/path/unavailable/:g' \ 193 sed -i -e 's:${B}:/build/path/unavailable/:g' \
193 ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}*/Makefile 194 ${D}/${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_MAJMIN}${PYTHON_ABI}*/Makefile
194 195
195 # disable the lookup in user's site-packages globally 196 # disable the lookup in user's site-packages globally
196 sed -i 's#ENABLE_USER_SITE = None#ENABLE_USER_SITE = False#' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py 197 sed -i 's#ENABLE_USER_SITE = None#ENABLE_USER_SITE = False#' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
197 198
@@ -226,7 +227,7 @@ do_install:append() {
226 rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_range.cpython* 227 rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_range.cpython*
227 rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython* 228 rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/test/__pycache__/test_xml_etree.cpython*
228 229
229 # Similar to the above, we're getting reproducibility issues with 230 # Similar to the above, we're getting reproducibility issues with
230 # /usr/lib/python3.10/__pycache__/traceback.cpython-310.pyc 231 # /usr/lib/python3.10/__pycache__/traceback.cpython-310.pyc
231 # so remove it too 232 # so remove it too
232 rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/__pycache__/traceback.cpython* 233 rm -f ${D}${libdir}/python${PYTHON_MAJMIN}/__pycache__/traceback.cpython*
@@ -303,7 +304,7 @@ py_package_preprocess () {
303 cd - 304 cd -
304 305
305 mv ${PKGD}/${bindir}/python${PYTHON_MAJMIN}-config ${PKGD}/${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX} 306 mv ${PKGD}/${bindir}/python${PYTHON_MAJMIN}-config ${PKGD}/${bindir}/python${PYTHON_MAJMIN}-config-${MULTILIB_SUFFIX}
306 307
307 #Remove the unneeded copy of target sysconfig data 308 #Remove the unneeded copy of target sysconfig data
308 rm -rf ${PKGD}/${libdir}/python-sysconfigdata 309 rm -rf ${PKGD}/${libdir}/python-sysconfigdata
309} 310}