Commit Graph

183 Commits

Author SHA1 Message Date
Praveen Kumar
c6234dce63 python3: fix CVE-2025-6075
If the value passed to os.path.expandvars() is user-controlled a
performance degradation is possible when expanding environment variables.

Reference:
https://nvd.nist.gov/vuln/detail/CVE-2025-6075

Upstream-patch:
892747b4cf

(From OE-Core rev: 9a7f33d85355ffbe382aa175c04c64541e77b441)

Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-12-01 06:50:49 -08:00
Peter Marko
7ca21c761a python3: upgrade 3.10.18 -> 3.10.19
Drop upstreamed patch and refresh remaining patches.

Release information:
* https://www.python.org/downloads/release/python-31019/
* The release you're looking at is Python 3.10.19, a security bugfix
  release for the legacy 3.10 series.

Handles CVE-2025-59375, CVE-2025-47273 and CVE-2024-6345.

(From OE-Core rev: 9b3dbd691f6ebdbdfe88cef3d3a676ddd1399c63)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-10-24 06:47:20 -07:00
Peter Marko
e371e6b3a7 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: 4ae9daf3d05530952a8b002257dd9afda2e077e4)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-08-18 13:18:01 -07:00
Peter Marko
8cd040c218 python3: upgrade 3.10.16 -> 3.10.18
Drop upstreamed patch and refresh remaining patches.

* https://www.python.org/downloads/release/python-31017/

  Security content in this release
  * gh-131809: Upgrade vendored expat to 2.7.1
  * gh-80222: Folding of quoted string in display_name violates RFC
  * gh-121284: Invalid RFC 2047 address header after refolding with
    email.policy.default
  * gh-131261: Update libexpat to 2.7.0
  * gh-105704: CVE-2025-0938 urlparse does not flag hostname containing
    [ or ] as incorrect
  * gh-119511: OOM vulnerability in the imaplib module

* https://www.python.org/downloads/release/python-31018/

  Security content in this release
  * gh-135034: [CVE 2024-12718] [CVE 2025-4138] [CVE 2025-4330]
    [CVE 2025-4435] [CVE 2025-4517] Fixes multiple issues that allowed
    tarfile extraction filters (filter="data" and filter="tar") to be
    bypassed using crafted symlinks and hard links.
  * gh-133767: Fix use-after-free in the “unicode-escape” decoder with a
    non-“strict” error handler.
  * gh-128840: Short-circuit the processing of long IPv6 addresses early
    in ipaddress to prevent excessive memory consumption and a minor
    denial-of-service.

gh-133767 got meawhile CVE-2025-4516 assigned.

(From OE-Core rev: 838a8b5ca148dfa6c6c2c76f1705d1e358a31648)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-06-13 08:42:35 -07:00
Peter Marko
d4bb2231fa python3: patch CVE-2025-0938
Pick commit mentioned in NDV CVE report
b8b4b713c5
which is on 3.10 branch.

(From OE-Core rev: 70036b4ea0ab968adab82fc632bb967f95203de2)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-04-01 09:02:41 -07:00
Khem Raj
bd51ce99cb python3: Treat UID/GID overflow as failure
This fixes ptest failures on 32bit architectures

AssertionError:
Failed ptests:
{'python3': ['test_extractall_none_gid',
             'test_extractall_none_gname',
             'test_extractall_none_mode',
             'test_extractall_none_mtime',
             'test_extractall_none_uid',
             'test_extractall_none_uname',
             'setUpClass',
             'python3']}

(From OE-Core rev: 838f3cff2a123fb7d5833b6760772ded6efb60bd)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 43104b547cb79693c83df0882773ae8dd74b1d35)
Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-02-15 06:04:44 -08:00
Peter Marko
2d08595a93 python3: upgrade 3.10.15 -> 3.10.16
Handles CVE-2024-50602, CVE-2024-11168 and CVE-2024-9287.

(From OE-Core rev: 5a611fbbdb3e373d379f922ffc5606ff70279831)

Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2025-01-09 08:41:04 -08:00
Divya Chellam
487e8cdf1d python3: Upgrade 3.10.14 -> 3.10.15
Includes security fixes for CVE-2024-4030, CVE-2024-7592, CVE-2024-4032, CVE-2024-8088
CVE-2024-6232, CVE-2024-6923, CVE-2023-27043 and other bug fixes.

Removed below patches, as the fixes included in 3.10.15 upgrade:
1. CVE-2023-27043.patch
2. CVE-2024-6232.patch
3. CVE-2024-7592.patch
4. CVE-2024-8088.patch

Release Notes:
https://www.python.org/downloads/release/python-31015/

(From OE-Core rev: e64ead97ae3d680f97bf85422f777cd77ae7c434)

Signed-off-by: Divya Chellam <divya.chellam@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-09-27 05:57:35 -07:00
Hitendra Prajapati
bfbf6d481d python3: fix CVE-2023-27043
Upstream-Status: Backport from 2a9273a0e4

(From OE-Core rev: 793c22623e8b3da2ca8e28fe662d8428b0f805a7)

Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-09-16 06:09:56 -07:00
Hugo SIMELIERE
85134c7690 python3: CVE-2024-6232 CVE-2024-7592 fixes
Upstream-Status: Backport from b2f11ca766
Upstream-Status: Backport from 743acbe872

(From OE-Core rev: 3e5697687c8fb0aa6312773b233442b8df974feb)

Signed-off-by: Hugo SIMELIERE <hsimeliere.opensource@witekio.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-09-16 06:09:56 -07:00
Rohini Sangam
630e7d6000 python3: Security fix for CVE-2024-8088
CVE fixed:
- CVE-2024-8088: python: cpython: denial of service in zipfile
Upstream-Status: Backport from e0264a6111

(From OE-Core rev: 295addec33c83443423a3ef87905c3a70f44a4e7)

Signed-off-by: Rohini Sangam <rsangam@mvista.com>
Signed-off-by: Siddharth Doshi <sdoshi@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2024-09-07 05:38:17 -07:00
Trevor Gamblin
d95d26073d python3-ptest: skip test_storlines
[YOCTO #14933]

test_storlines is yet another Python ptest that fails intermittently on
the Yocto AB, so disable it during ptests for now.

(From OE-Core rev: b71d5ec10f8e64fc6102c66dfc36151f2b0b3c86)

Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit d7b9f8157e6214a83b5495e8a32e11540ae65ff8)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-12-22 16:36:55 -10:00
Ross Burton
4b5f2ecf67 python3: fix missing comma in get_module_deps3.py
Wes Tarro <wes.tarro@azuresummit.com> noticed a missing comma in a
preplace() call, add it.

That said, calling replace() with one argument results in a TypeError,
so this is obviously dead code.

(From OE-Core rev: 3a79a210665efae1af6d68e9e923a739c82d800e)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 9b2e2c8d809e7ca34451ec9702b029a00dfb410b)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-02 04:47:13 -10:00
Tim Orling
7658d8f2c9 python3: upgrade 3.10.9 -> 3.10.12
Security and bugfix updates.

* Drop cve-2023-24329.patch as it is merged in 3.10.12

CVE: CVE-2023-24329

Includes openssl 1.1.1u which addresses:
CVE: CVE-2023-0286
CVE: CVE-2022-4304
CVE: CVE-2022-4203

https://docs.python.org/release/3.10.12/whatsnew/changelog.html#python-3-10-12-final
https://docs.python.org/release/3.10.12/whatsnew/changelog.html#python-3-10-11-final
https://docs.python.org/release/3.10.12/whatsnew/changelog.html#python-3-10-10-final

License-Update: Update Copyright years to include 2023

(From OE-Core rev: 4df594dbc1b391afbe703f663fb2d5c9e9d35078)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
2023-08-02 04:47:13 -10:00
Joe Slater
6af5a447a1 python3: fix CVE-2023-24329
Backport fix from cpython 3.11 branch.

(From OE-Core rev: 37defd828cc6a8267139928730d766167905d21a)

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-03-23 22:45:33 +00:00
Florin Diaconescu
c4bbc6d9c5 python3: upgrade 3.10.8 -> 3.10.9
Security and bug fixes.

Drop patch for CVE-2022-42919 and CVE-2022-37454 which were merged in 3.10.9

Fixes:
* CVE-2022-45061 (gh-98433)
  https://nvd.nist.gov/vuln/detail/CVE-2022-45061

List of changes:
https://docs.python.org/3.10/whatsnew/changelog.html#python-3-10-9-final

(From OE-Core rev: f98b9c71686eb5ce5115ee73155a7d0389831ef0)

Signed-off-by: Florin Diaconescu <florin.diaconescu009@gmail.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-23 23:05:50 +00:00
Joe Slater
eea9ca003f python3: advance to version 3.10.8
Fixes CVE-2022-37460.  Also add patch to fix CVE-2022-37454.

(From OE-Core rev: b446dd69b79783ea232514e1c5212595ec28e553)

Signed-off-by: Joe Slater <joe.slater@windriver.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-13 15:23:34 +00:00
Vivek Kumbhar
9510218414 python3: fix CVE-2022-42919 local privilege escalation via the multiprocessing forkserver start method
Upstream-Status: Backport from eae692eed1

(From OE-Core rev: 9ed7184930707c98afabca8c6b712df874ad659f)

Signed-off-by: Vivek Kumbhar <vkumbhar@mvista.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-12-01 19:35:04 +00:00
Leon Anavi
f9679ac9f8 get_module_deps3.py: Check attribute '__file__'
Check if the module object has attribute '__file__' to fix and
avoid errors like:

AttributeError: module '_abc' has no attribute '__file__'. Did you mean: '__name__'?

(From OE-Core rev: 1684457df9fb7029a276df4438c8fc4a17e3e1e9)

Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 8acce12c1a4cf37ac312c92d62a6ae93a349dddf)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-11-24 15:30:01 +00:00
Tim Orling
6a3c365332 python3: upgrade 3.10.4 -> 3.10.7
Security and bug fixes.

Drop patch for gh-92036 which was merged in 3.10.5
Refresh 0017-setup.py-do-not-report-missing-dependencies-for-disa.pathc

Fixes:
* CVE-2020-10735
  https://nvd.nist.gov/vuln/detail/CVE-2020-10735
* CVE-2021-28861
  https://nvd.nist.gov/vuln/detail/CVE-2021-28861
* CVE-2018-25032
  https://nvd.nist.gov/vuln/detail/CVE-2018-25032

For a list of changes see:
https://docs.python.org/3.10/whatsnew/changelog.html#python-3-10-7-final
https://docs.python.org/3.10/whatsnew/changelog.html#python-3-10-6-final
https://docs.python.org/3.10/whatsnew/changelog.html#python-3-10-6-final

(From OE-Core rev: 3efae85283b19fa1b30af7fed7fa89d7a50337db)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-10-20 15:36:02 +01:00
Markus Volk
8fa95bb599 python3: Backport patch to fix an issue in subinterpreters
This adds a backport patch that fixes a problem in subinterpreters related
to the garbagecollector. Without the patch, there are random segfaults in
several Kodi addons that use python3-sqlite3. Presumably there are real world
issues in other programs as well.

(From OE-Core rev: 39d57ef7e341a048b94bc5dd9c29d58f57e06f19)

Signed-off-by: Markus Volk <f_l_k@t-online.de>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-07-25 15:11:46 +01:00
Paulo Neves
141de70a39 python: Avoid shebang overflow on python-config.py
The native path may be too big, leading to shebang
overflow. Just use the #!/usr/bin/env python3.

(From OE-Core rev: 8a86bd88f0b46b0f413b98df20891cb9aa84c271)

Signed-off-by: Paulo Neves <ptsneves@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 84783dee09e48cb930c7cd27944eaf3f03997237)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-24 23:57:42 +01:00
Richard Purdie
daa47a6171 python3: Ensure stale empty python module directories don't break the build
There are two issues inside importlib. Firstly, the modules are accessed in
on disk order. This means behaviour seen on one system might not reproduce
on another and is a real headache.

Secondly, empty directories left behind by previous modules might be looked
at. This has caused a long string of different issues for us.

As a result, patch this to a behaviour which works for us. Upstream discussion
can follow later, this is breaking builds for too many people to leave unpatched.

[YOCTO #14816]

(From OE-Core rev: cdb6879b49d4f6dc2bea8ff064a5b1e62db34781)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit e5944a38db513e033c3a3e9313267055f7254be7)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-24 23:57:42 +01:00
Alexander Kanavin
88c069b8bf python3: use built-in distutils for ptest, rather than setuptools' 'fork'
The setuptools version is now used by default when setuptools is installed,
but it  is incompatible with some of python's own tests.

(From OE-Core rev: 8e34686911269e461dc646068f7a4d7c0e5da53f)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit c0c1ee33781733d712cd983be460001cd7938014)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-06-24 23:57:42 +01:00
Khem Raj
dbe3a77e0d python3: Do not detect multiarch when cross compiling
This was a long standing problem seen on aarch64 build hosts when
compiling python3 with clang cross compiler. The issue is not seen with
gcc because native glibc headers are still compatible with gcc cross compiler

(From OE-Core rev: 407744b00d702e3133304e1b43064a5634ca02cf)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Ross Burton <ross.burton@arm.com>
Cc: Jon Mason <jdmason@kudzu.us>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-04-13 16:52:24 +01:00
Alexander Kanavin
0b1dc4e3d4 python3: update 3.10.1 -> 3.10.2
License-Update: copyright years

(From OE-Core rev: d6515a7f58d0405efea21e3be4158681ed9edbe6)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-20 11:57:28 +00:00
Alexander Kanavin
fa7dd5d046 python3: drop unneeded multiprocessing module patch
pthread has been merged into the main libc library
(and was never separate in musl), so separate linking
for it is no longer needed.

I ran the reproducing sequence on qemux86, qemux86_64 and same targets with musl,
and it went fine:

root@qemux86:~# python3
Python 3.10.0 (default, Oct  4 2021, 17:55:55) [GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import multiprocessing
>>> pool_sema = multiprocessing.BoundedSemaphore(value=1)
>>> pool_sema.acquire()
True
>>> pool_sema.release()
>>>

(From OE-Core rev: 2eabd3b611f4afa5eafa4490b6b0ef7578b742de)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-12 21:09:02 +00:00
Ross Burton
679cb095f2 python3: backport a fix so the test suite passes with OpenSSL 3.0.1
The test suite makes incorrect assumptions about OpenSSL versions post-
3.0, so backport the fix for the test suite.

(From OE-Core rev: 2b5e9cfd2c1914d606725029c59cd50cca3d5511)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-21 12:01:41 +00:00
Oleksandr Kravchuk
2faf8fe584 python3: udpate to 3.10.1
Refreshed patches.

(From OE-Core rev: b82ea986a492791716c3da07a7d728edd17654c9)

Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-12 11:27:24 +00:00
Alexander Kanavin
7f1f9d843b python3: mark patch as inappropriate, with better explanation
(From OE-Core rev: 3a21835e69dfcdedf74512aec14583e8762317e5)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-06 11:09:52 +00:00
Ross Burton
851be8baed python3: silence DeprecationWarnings in python3-config
Our patched python3-config uses distutils, but that will emit a
DeprecationWarning when imported.  This isn't useful when using the
output of python3-config to find include paths.

This isn't a huge problem typically as the warning goes to stderr, but
some build systems read both stdout and stderr.

(From OE-Core rev: e25b8f5af70a094307dc5c0a25f213ae9570f349)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-11-03 10:12:42 +00:00
Tim Orling
18f933d20d python3-manifest: -pprint RDEPENDS on -profile
python3-profile includes dataclasses.

pprint imports dataclasses:
https://github.com/python/cpython/blob/3.10/Lib/pprint.py#L38

(From OE-Core rev: 900d7c3a8f68e9ce751a0b5cc839b8838fdebf3f)

Signed-off-by: Tim Orling <timothy.t.orling@intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-27 09:46:41 +01:00
Alexander Kanavin
fae4ba632b python3: update 3.9.7 -> 3.10.0
native and target 0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch
replaced by native-only 0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch
which is more reboust against upstream changes, and keeps target code unmodified.

This however necessitated adding 0001-sysconfig.py-use-platlibdir-also-for-purelib.patch
to avoid hardcoding 'lib' on target builds as libdir.

Drop chunk from 0001-distutils-sysconfig-append-STAGING_LIBDIR-python-sys.patch as
upstream now uses sysconfig directly inside distutils.

Add 0001-Lib-pty.py-handle-stdin-I-O-errors-same-way-as-maste.patch and
0001-multiprocessing-disable-a-failing-test.patch to address ptest failures.

License-Update: copyright years, case corrections.

(From OE-Core rev: 72a75043a946f7db01d3ec04c8889e055f542cca)

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-14 11:57:38 +01:00
Joshua Watt
3115aa157d python3: Fix sysroot reproducibility
Fixes the reformatting of the sysconfigdata to be reproducible in the
sysroot as well as in the package. During this a bug was uncovered in
the way that the data was reformatted where it appears that python
cannot parse a single line of code over 40000 characters. To work around
this, pass a maximum with of "1" to pprint instead of sys.maxsize which
will cause it to wrap as often as possible and should keep it
reproducible.

(From OE-Core rev: 2def2c145c303f27d93ba73876d4c6b214f18166)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-10-01 14:51:45 +01:00
Richard Purdie
a4b94a7ff2 python3: Add a fix for a make install race
Add a fix for reproducibility issues where pyc files for python-config.py
may not always be generated.

(From OE-Core rev: d1c3a87c48b598b6e5624d0affe8bd89320631bf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-16 21:23:43 +01:00
zhengruoqin
ea29a3c116 python3: upgrade 3.9.5 -> 3.9.6
0001-Makefile-fix-Issue36464-parallel-build-race-problem.patch
removed since it is included in 3.9.6

(From OE-Core rev: 1a12d978f2046fc5d3abc96db3753e378f29ecae)

Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-07-02 23:14:32 +01:00
Tim Orling
721555184b python3: skip tests requiring tools-sdk
Conditionally skip test_ctypes.test_find unless
IMAGE_FEATURES contains 'tools-sdk' as these test
cases require full packagegroup-core-buildessential

Fixes:
  AssertionError: Failed ptests:
  {'python3': ['test_find_library_with_gcc', 'test_find_library_with_ld']}

(From OE-Core rev: 70e2fc066a18c35e42610d75eeaa1edd9aab7cf2)

(From OE-Core rev: c6567235cba55f50ca77d5db848c887232f3670c)

Signed-off-by: Tim Orling <timothy.t.orling@intel.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-21 11:09:56 +01:00
Tim Orling
f071b059a0 python3-manifest: add statistics subpackage
cpython/Lib/statistics.py contains common statistics functions

"""
Basic statistics module.
This module provides functions for calculating statistics of data, including
averages, variance, and standard deviation.
"""

(From OE-Core rev: cf1c49fea90e11bc037025e15e44f705a12385bf)

Signed-off-by: Tim Orling <timothy.t.orling@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-06-17 00:07:05 +01:00
Ross Burton
d686afb18f python3: update status on upstreamed patch
(From OE-Core rev: 319fb2d804b193d39d78010115e28a31b4f9f6e9)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-05-18 23:52:54 +01:00
Alejandro Enedino Hernandez Samaniego
a8ec0d8cfd python3: Upgrade 3.9.2 -> 3.9.4
- Rebased patch 0001-test_locale.py-correct-the-test-output-format
  Maintainer needs to sign CLA and resubmit
- configure now explicitly requires autoconf-archive to be present

(From OE-Core rev: 34cb8f2a2ed36ad929dca9055c96f2f843656b8f)

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18 11:37:26 +01:00
Alejandro Enedino Hernandez Samaniego
51b7ecfef3 python3: Improve logging, syntax and update deprecated modules to create_manifest
The imp module has een deprecated by upstream python, drop its usage
  (imp.get_tag) in favor of sys.implementation.cache_tag.

Avoid incorrectly getting dependencies for running script and
multiprocessing module.

Improve logging behavior of the create_manifest task:
- Use indentation.
- Logs on temp directory.
- Use a proper debug flag.
- Standarize syntax.

(From OE-Core rev: a3ac339f5b8549a050308ba94c4ef9093f10e303)

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-18 11:37:26 +01:00
Yi Fan Yu
d1b90dae19 python3: Skip failing ptests due to load variability
Skip tests until load issue is fixed,
most commonly seen on the arm64 builder.

[YOCTO #14296]

(From OE-Core rev: 7c67bc2476b784083acbc7a55ecf3627ec8f2b6b)

Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-04-05 15:29:02 +01:00
Martin Jansa
84e4c97835 python3: fix PACKAGECONFIG handling
* it was changed from sysconf_dis to mods_disabled in:
  https://git.openembedded.org/openembedded-core/diff/meta/recipes-devtools/python/python3/0017-setup.py-do-not-report-missing-dependencies-for-disa.patch?id=7347556b18b45c5f9afc2cade565a75c95876914

  but unfortunately this doesn't work as mods_disabled set by remove_configured_extensions
  can contain only extensions which were disabled, as this list:
  self.extensions: ['_struct', 'array', '_contextvars', 'math', 'cmath', 'time', '_datetime', '_zoneinfo', '_random', '_bisect', '_heapq', '_pickle', 'atexit', '_json', '_lsprof', 'unicodedata', '_opcode', '_asyncio', '_abc', '_queue', '_statistics', 'fcntl', 'pwd', 'grp', 'spwd', 'select', 'parser', 'mmap', 'syslog', '_xxsubinterpreters', 'audioop', '_csv', '_posixsubprocess', '_testcapi', '_testinternalcapi', '_testbuffer', '_testimportmultiple', '_testmultiphase', '_xxtestfuzz', '_curses', '_curses_panel', '_crypt', '_socket', '_ssl', '_hashlib', '_sha256', '_sha512', '_md5', '_sha1', '_blake2', '_sha3', '_sqlite3', 'termios', 'resource', 'ossaudiodev', 'nis', 'zlib', 'binascii', '_bz2', '_lzma', 'pyexpat', '_elementtree', '_multibytecodec', '_codecs_kr', '_codecs_jp', '_codecs_cn', '_codecs_tw', '_codecs_hk', '_codecs_iso2022', '_decimal', '_ctypes_test', '_posixshmem', '_multiprocessing', '_uuid', 'xxlimited', '_ctypes']

  while PACKAGECONFIG in python3 usually uses this to disable _dbm, _gdbm or runtime modules.

* without this change the do_install will fail (based on check_build_completeness.py log.do_compile) with:
  | ERROR: Execution of '/OE/build/oe-core/tmp-glibc/work/x86_64-linux/python3-native/3.9.0-r0/temp/run.do_install.69743' failed with exit code 1:
  | The necessary bits to build these optional modules were not found:
  | _dbm                  _gdbm                 readline

(From OE-Core rev: fa5243693e35e1e0dc3247e2178f181051f68e77)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-23 22:51:25 +00:00
Oleksandr Kravchuk
9f1e8ced83 python3: update to 3.9.2
Removed CVE patch was upstreamed.

License-Update: copyright years.

(From OE-Core rev: fafb8a88cd0365ff4327a1d6062d9f48b2927910)

Signed-off-by: Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-23 22:35:00 +00:00
Anuj Mittal
90ae075867 python3: fix CVE-2021-3177
(From OE-Core rev: 2ed4f61e9d694fef8ff72b8eeb2163634e96c3bb)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-03 21:45:49 +00:00
Alexander Kanavin
ec7bc4a26c python3: update 3.9.0 -> 3.9.1
(From OE-Core rev: 11935507525e9c5c0dd6dcb217bdfee0b07ebba9)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-30 14:01:07 +00:00
Lee Chee Yang
e05d37ec89 python3: fix CVE-2020-27619
(From OE-Core rev: ad6b184b5a87b8bcdd5e28f19be841a78f5e51df)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24 10:27:45 +00:00
Alejandro Hernandez Samaniego
82c9a7c82e python3: Update manifest
Update the python3-manifest to match the files installed by the
new version of python3.
- Kept tkinter the way it was although tk isnt part of OE-Core
- Made typing part of python3-core
- Update other packages with new dependencies such as filecmp and dataclasses.

(From OE-Core rev: 5933d7bae8103eaad5b204438704ea04ebc0d291)

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-11 10:08:12 +00:00
Alexander Kanavin
354f96bf78 python: update 3.8.5 -> 3.9.0
Drop 0001-Do-not-hardcode-lib-as-location-for-site-packages-an.patch,
0001-configure.ac-fix-LIBPL.patch and 0001-python3-Do-not-hardcode-lib-for-distutils.patch
as they are all replaced by the new --platlibdir option to ./configure

Rename 0001-Lib-sysconfig.py-fix-another-place-where-lib-is-hard.patch to
0001-Lib-sysconfig.py-use-libdir-values-from-configuratio.patch
and describe the changes better.

License-Update: documentation now dual license under PSF & BSD
(not relevant for the recipe.
(From OE-Core rev: 7347556b18b45c5f9afc2cade565a75c95876914)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-30 13:22:49 +00:00
Ross Burton
bb759f56f6 meta: add/fix invalid Upstream-Status tags
(From OE-Core rev: 630ce8130598e2bca7231ac28a7cc18b5b942544)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-23 20:54:03 +01:00