Commit Graph

137 Commits

Author SHA1 Message Date
Lee Chee Yang
12d767f88c python3: fix CVE-2021-23336
(From OE-Core rev: 4ae100fa8baf0f0dd6a16992644a20516b81107b)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-03-10 00:24:27 +00:00
Anuj Mittal
482b1fc4d9 python3: fix CVE-2021-3177
(From OE-Core rev: 25d1cae49e56797c4c9e91c01697c4de02dee046)

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-02-05 23:35:18 +00:00
Lee Chee Yang
f4ff33fd11 python3: fix CVE-2020-27619
(From OE-Core rev: 0edf9f32929c462b9b53f0cdc7e5ecf816fbb7b3)

Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-29 00:07:58 +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
Nathan Rossi
56fd64447c python3-manifest.json: Updates
- Regenerate using create_manifest
- Fix up some indentation compared to generated
- Add "secrets" module into netclient package (introduced in 3.6)
- Move "urllib" python package into core package, it is used more
  commonly than just netclient (e.g. email, xml, mimetypes, pydoc)
- Update compression package dependencies due to some modules moving
  into core package
- Update dependencies due to improvements to get_module_deps handling
  modules of a python package (e.g. ctypes.utils)

(From OE-Core rev: 892a8fb85a986a65e9ebef368ddab15068fb6d92)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-11 20:35:39 +01:00
Nathan Rossi
dc74b6e8d5 python3: Improve handling of python3 manifest generation
Specifically cover detection of modules within a python package that do
not import anything within their __init__.py. This is at least the case
with the xmlrpc package which is only used via its modules xmlrpc.server
and xmlrpc.client. Other important corner cases include ctypes.utils
which depends on some modules not used by ctypes.

This is implemented by generally assuming that importing all the modules
of a package (aka *.py within a package, excluding _*.py) will provide
enough information.

Also due to this change some modules import sysconfig, resulting in
sysconfigdata being imported. Handle the conversion of its path to a
wildcard based on the platform dependent name being replaced.

(From OE-Core rev: bef4be54e02df5f230d250487f85994a3b7bbd77)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-11 20:35:39 +01:00
Mingli Yu
3439ad8616 Revert "python3: define a profile directory path"
After ccache upgrade to 3.7.11, there is below logic introduced.
58895dc Add knowledge about -fprofile-{correction,reorder-functions,values}

And the python3 ccache build issue [1] is fixed in ccache 3.7.11, so there
is no need to define a profile directory path for python3 any more.

[1] https://github.com/ccache/ccache/issues/615

(From OE-Core rev: 6cd08bdf72c05982ba000b1186cf139382679e04)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-25 15:11:05 +01:00
Mingli Yu
9e856a0a1a python3: define a profile directory path
After ccache upgrade to 3.7.10, there comes below error when
enable ccache to build python3 and check [1] and [2] for more
details.
 | Python-3.8.3/Modules/_contextvarsmodule.c:43:1: error: source locations for function 'PyInit__contextvars' have changed, the profile data may be out of date [-Werror=coverage-mismatch]

That's because the logic for profile directory changes a little in
[3] after ccache upgrades to 3.7.10.

So define a profile directory path accordingly to fix the above error.

[1] https://github.com/ccache/ccache/issues/615
[2] https://lists.openembedded.org/g/openembedded-core/topic/75170448#140065
[3] 91a2954eb4

(From OE-Core rev: 0000d30fb82aafa5064051502a927c5fc447b63b)

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-12 12:21:48 +01:00
Alexander Kanavin
2d294c1127 python3: upgrade 3.8.2 -> 3.8.3
(From OE-Core rev: 01dafe1796a5c91ce12b344ee09e7179f6b4ccac)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-04 13:27:29 +01:00
Tim Orling
a1a7dec7a1 python3-manifest.json: add pathlib to core
The pathlib module is for Object-oriented filesystem paths

It also provides a lot of handy utilities for checking on
paths. This seems to justify adding it to the core package
along side os, sys, and the other *path libraries.

[YOCTO #13670]

(From OE-Core rev: e5d3a6b2fb1fad62dec6389b16fec258df0b573d)

Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-24 14:10:07 +01:00
Matthias Schoepfer
1aa01b21b5 python3: fixing bpo-36852 patch for builds on i686 architecture
The original patch "bpo-36852: proper detection of mips architecture
for soft float" uses AC_CANONICAL_TARGET to determine the platform
triplet. While AC_CANONICAL_TARGET exports i686 as target_cpu, gcc
is using i386 instead. We fall back here to i386, as it is conform
to the previous behavior.

Upstream Status: Submitted [https://github.com/python/cpython/pull/13196]

(From OE-Core rev: 6beab388e73b3ac6157650855a6c1fb1d71e8015)

Signed-off-by: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-31 13:58:01 +01:00
Jeremy Puhlman
400743867d python3-native: Should not search the system for headers/libraries.
The specific issue here is rpc/rpc.h, but its likely more general.
/usr/include is searched for rpc/rpc.h and if it exists on the
system, it changes behavior. If you are using the extended buildtools
tarball on a machine that has /usr/include/rpc/rpc.h, it will decide
that is good enough and not continue to search. nis fails to build
because /usr/include and /usr/lib are not part of the include/link
paths for the buildtools tarball compiler(nor should they be).

This makes it so python3-native will not build if you are using the
extended buildtools tarball, but from a larger issue perspective it
is building in likely different ways depending on what machine it
is building on.

libtirpc is already a depend so we shouldn't need the hosts rpc/rcp.h.

(From OE-Core rev: f37dfc7907ae7bac08d40468ddde2e5b8bba030c)

Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-06 08:19:18 +00:00
Alexander Kanavin
39970f583d python3: resolve ncurses host contamination
(From OE-Core rev: ee7be51444b609a5cc1fd223b9395e9642d3bfac)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-18 23:53:54 +00:00
Yi Zhao
59acf5e384 python3: install _tkinter.*.so to python3-tkinter package
When enable PACKAGECONFIG[tk], we should install _tkinter.*.so to
python3-tkinter package rather than python3-misc package.

Fixes:
ERROR: python3-3.8.1-r0 do_package_qa: QA Issue:
/usr/lib/python3.8/lib-dynload/_tkinter.cpython-38-x86_64-linux-gnu.so
contained in package python3-misc requires libtk8.6.so()(64bit), but no
providers found in RDEPENDS_python3-misc? [file-rdeps]

(From OE-Core rev: 991d7ced7262a1340878bada307c6d021ea9cb77)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-14 13:07:23 +00:00
Changqing Li
b7a5901dd6 python3: Do not hardcode "lib" for distutils
Get the sys.lib from python3 itself and do not use
hardcoded value of 'lib' for distutils.

Solve the error below that occurs when run "python3 setup.py
install"
on lib64 multilib platform:
[Errno 2] No such file or directory:
'/usr/lib/python3.7/site-packages/test-easy-install-1828.write-test'

(From OE-Core rev: fb33127de5d80f5bcb84edf6cf4007bca73fa863)

Signed-off-by: Li Zhou <li.zhou@windriver.com>

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08 13:20:02 +00:00
Changqing Li
e774c22381 python3: fix the installation path of libpython3.7m.a for multilib
Fix the installation path of libpython3.7m.a on mulitlib lib64
platform to lib64 instead of lib

(From OE-Core rev: 3081d3993095d2e4817bbef33c9c90dd814a45d7)

Signed-off-by: Li Zhou <li.zhou@windriver.com>
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-08 13:20:02 +00:00
Alexander Kanavin
b701120462 python3: correctly process ptest output with sed
Particularly:

[ERROR|FAIL] was matching characters rather than strings.

Using (ERROR|FAIL) requires -r option.

(From OE-Core rev: c041c326a1dbf1b128fc32d887acd73c6f5fb415)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-21 12:52:52 +00:00
Alexander Kanavin
c8bc4e9b66 python3: do not compile .pyc in parallel during do_install()
(From OE-Core rev: af7f5590dc49ec33268939b53879a6d011306114)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-21 12:52:52 +00:00
Alexander Kanavin
28c5a5033e python3: update to 3.8.1
Drop backports, rebase other patches.

0001-main.c-if-OEPYTHON3HOME-is-set-use-instead-of-PYTHON.patch
is removed as the use case (allowing python 2 and 3 to coexist
in SDKs) is no longer relevant with Python 2.x reaching end of line
and upstream has refactored the code making a rebase difficult.
If needed, please re-add the patch to py2, rather than py3.

Python 3.8 no longer adds "m" to "3.8" in paths, so adjust the recipes
and classes accordingly.

The manifest for the 3.8.0 version is updated; particularly pkgutil
module is now packaged in -core (as other things in core need it);
this also necessitates allowing empty -pkgutil package to avoid
breakage across layers.

(From OE-Core rev: e6ab9f16b92aa1abdae82c535c1a452a1341b0e2)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-21 12:52:52 +00:00
Ross Burton
6675b18433 python3: update patch status
(From OE-Core rev: 3bb0a089840caf51065d7f8b59b3e055bce31e1c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-25 17:57:23 +00:00
Adrian Bunk
8410fde8b9 python3: Upgrade 3.7.4 -> 3.7.5
Backported patches removed.

(From OE-Core rev: 87f77ac60f57e6b3bfb2b3f3f5877b8d90cf22b8)

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-11-05 10:37:12 +00:00
Chen Qi
423d32dae2 python3: fix CVE-2019-16935
(From OE-Core rev: 78846c823cbb662897ce85b061a745c1dd7deeab)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-28 05:31:42 +00:00
Ross Burton
52fe6a79d9 python3: ensure that all forms of python3-config are in python3-dev
In multilib builds python3-config gets renamed to eg python3-config-lib64 but
this ends up being packaged in python3-core not python3-dev.

The manifest uses an extended glob to package all python* binaries that are not
python-config into python3-core:

            "${bindir}/python*[!-config]",

However, this doesn't do what was intended, as [] is a range match.

Replace the globs with more verbose but precise matches, and clear out
FILES_${PN} to ensure that new binaries don't end up in ${PN} (which shouldn't
exist).

[ YOCTO #13592 ]

(From OE-Core rev: c780f21c33b0684dafff3421600cd1c11ddd0c48)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-23 16:30:35 +01:00
Ross Burton
7b87877600 python3: -dev should depend on distutils
python3-config uses distutils:

Traceback (most recent call last):
  File "/usr/bin/python3-config", line 9, in <module>
    from distutils import sysconfig
ModuleNotFoundError: No module named 'distutils'

Add the dependency so that distutils is always present.

[ YOCTO #13592 ]

(From OE-Core rev: 04136dbac48986dce5b2b872b2c0b46c673c44f2)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-19 23:18:33 +01:00
Chen Qi
4ac566250d python3: CVE-2019-16056
(From OE-Core rev: 328e3a1a3bb95cca60621f22cc500f9d24dbc590)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-15 14:16:10 +01:00
Alexander Kanavin
0aee3558f9 python3: make gdbm optional
The use case is building a gpl3-free image, without having
to rely on outdated recipes from meta-gplv2 layer.

(From OE-Core rev: 02eb487c8145e0f3d957c39cf16f6f805e95e536)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-15 14:16:10 +01:00
Ross Burton
059961ff69 python3: move runpy to core
The runpy module is used to implement 'python3 -m foo', so move it to
python3-core as it's an essential part of the CLI.

(From OE-Core rev: eba857d3e52f83d426e95fa8373799da058f9484)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-10-02 10:09:47 +01:00
Ross Burton
d5a00f509a python3: handle STAGING_LIBDIR/INCDIR being unset
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-16 23:02:44 +01:00
Khem Raj
52ba1a3d44 python3-manifest.json: Fix typo in summary
(From OE-Core rev: 15c279da465323cab86635e5b5cdb46bf254fa66)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-09-07 21:44:32 +01:00
Mingli Yu
cd86f35cf4 python3: fix the test_locale output format
Before this patch:
 # python3 -m test -v test_locale
 [snip]
 test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous) ... testing with ('tr_TR', 'ISO8859-9') ok
 [snip]

 After this patch:
 # python3 -m test -v test_locale
 [snip]
 test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous) ... testing with ('tr_TR', 'ISO8859-9')... ok
 [snip]

Make the test ended with "... ok" is common in python
unittest world, we should make it keep consistent
with other test cases in case it may be ignored to
record in the report if we use the common filter
"... ok".

[YOCTO #13298]

(From OE-Core rev: 4e698cf8f3a9c661f5b67c6001ad4d92b574d136)

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-21 21:52:59 +01:00
Ross Burton
dc1ab6482c python3: split out the Windows distutils installer stubs
Needing the Windows distutils installer stubs is quite a niche requirement, so
put them into a separate package and just recommend it.

This can save both space and legal pain, as the installers embed an old zlib
that has known CVEs.

(From OE-Core rev: 617331a42fc5bde0c2d8d0f4dd8df652daa28778)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-03 23:56:01 +01:00
Ross Burton
53f4ad18df python3: remove empty python3-distutils-staticdev
distutils doesn't ship any static libraries, and the files this should pick up
do not exist.  Copy/paste gone wrong maybe?

(From OE-Core rev: afbca8da4ddd6c3dd01bb44af43aee9e80cae512)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-03 23:56:00 +01:00
Ross Burton
8c53f5e956 perl: fix Upstream-Status tags
(From OE-Core rev: ec644192c758ce1ec90c487a0fff69d6de0ca55d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-07-02 08:13:07 +01:00
Joshua Watt
f473728b22 python3: Fix .pyc file reproduciblility
Applies a patch to python that makes the pre-compiled .pyc files
generated during the build reproducible.

(From OE-Core rev: 148d54f91f43147f31b16a7c2cb1ade385832366)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-28 13:28:38 +01:00
Joshua Watt
10ce84dd19 python3: Reformat sysconfig
Reformats the sysconfig file when packaging. This file is output by
using the python pprint function. This function will wrap long lines at
80 characters by default, and will even split strings at whitespace
boundaries to do so, e.g.:

 'A': 'B is really'
    ' long'

This causes a problem for reproducibility however because there might be
lines of differing lengths depending on the build path. These
non-reproducible paths are removed, but their effect on string wrapping
from pprint remains.

To correct this, reformat the entire sysconfig file by re-printing using
pprint with an (effectively) unlimited line length.

(From OE-Core rev: ec8a2b310d5f0b42f60898a5c6d239949842b34c)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-24 10:36:28 +01:00
Ricardo Ribalda Delgado
1d60af733c python3: python3: Fix build error x86->x86
When building x86->x86 the system will try to execute .so and related items
from the default PYTHONPATH.  This will fail if the target CPU contains
instructions that the host CPU does not have, add CROSSPYTHONPATH
into PYTHONPATH so we can prepend the list to find correct libs.

Fixes:

Illegal instruction (core dumped)
Makefile:625: recipe for target 'sharedmods' failed
make: *** [sharedmods] Error 132
make: *** Waiting for unfinished jobs....

(From OE-Core rev: 2106a567820bad438ff78d54a49e3d87da428dcf)

Signed-off-by: Ricardo Ribalda Delgado <ricardo@ribalda.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-19 22:13:42 +01:00
Matthias Schoepfer via Openembedded-core
c85b269416 python3: fix build on softfloat mips
This patch originally only meant to correct the python3 build for mips
with softfloat, as the original test only checked for mips hardfloat.

Replaced custom C Program for triplet detection with autotools triplet
detection.

(From OE-Core rev: 203336486c84528e8779db93f64cc28e4b372aab)

Signed-off-by: Matthias Schoepfer <matthias.schoepfer@ithinx.io>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-12 10:54:39 +01:00
Changqing Li
34b35a1275 python3: fix do_install fail for parallel buiild
When using make -j with the 'install' target, it's possible for altbininstall
(which normally creates BINDIR) and libainstall (which doesn't, though it
installs python-config there) to race, resulting in a failure due to
attempting to install python-config into a nonexistent BINDIR. Ensure it also
exists in the libainstall target.

(From OE-Core rev: 07aeaa4f3f88f575e4674145a7faab3ba8e97fad)

Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08 23:00:32 +01:00
Richard Purdie
ed5198463f openssh/systemd/python/qemu: Fix patch Upstream-Status
Fix some missing or corrupted patch Upstream-Status values.

(From OE-Core rev: 07bc5a5367e0dec45253fd849e0157094152fd31)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08 12:15:17 +01:00
Alex Kiernan
c499f55303 python3: Add ntpath.py to python core
The newer python3 recipe no longer includes ntpath.py in core, leading
to failures in pkg_resources:

  Traceback (most recent call last):
    File "/usr/bin/bmaptool", line 6, in <module>
      from pkg_resources import load_entry_point
    File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 42, in <module>
      import ntpath
  ModuleNotFoundError: No module named 'ntpath'

(From OE-Core rev: 9ff61fa83a0a4f2a7b5b0376b6c48fb1173c9ac7)

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-08 12:15:17 +01:00
Richard Purdie
120c082cc1 python3: Drop ptest hack
With the kernel TCP backlog queue coalescing bug fixed in the 5.0 kernels
we don't need this patch anymore and can run the tests.

(From OE-Core rev: 21bfbef23e1f4c90070017e19f70e488e6ff64be)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-29 14:16:31 +01:00
Jaewon Lee
4a42d6907a Adding back wrapper and using OEPYTHON3HOME variable for python3
Adding back the python wrapper and adding a patch to use OEPYTHON3HOME
instead of PYTHONHOME if set, for python3.

If we add back the wrapper as is, we would see the following error that
we also see in Thud:

ImportError: No module named site
OpenEmbedded requires 'python' to be python v2 (>= 2.7.3), not python
v3.
Please upgrade your python v2

This is because python3 would've set PYTHONHOME to use nativesdk
python3 libraries but when the oe-buildenv-internal script tries to call
python2 for the py_v27_check, there will be no python2 libraries in the
PYTHONHOME directory.
In other words, bitbake needs host python2 and the env variable set from
the wrapper contaminates the env and host python2 won't be able to find
its libraries

Creating another variable OEPYTHON3HOME and using this in the python3
wrapper to allow for a way to set a different paths for python3 and
python2

[YOCTO #13208]

(From OE-Core rev: 75d2a85e24ef9a2bf0e218521944523f0ff281e0)

Signed-off-by: Jaewon Lee <jaewon.lee@xilinx.com>
Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-29 14:16:30 +01:00
Alexander Kanavin
47f4ad9ff0 python3: add another multilib fix
(From OE-Core rev: 60502aa366f860b4f056da1bcd8fd5ee8f4495f5)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-23 23:30:20 +01:00
Alexander Kanavin
77e39cf412 python: update to 3.7.3
License-update: copyright years

(From OE-Core rev: a215296bb1b6a87da3692ef0e6176e56310b05f2)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-16 11:10:02 +01:00
Richard Purdie
890e0ab069 python3: Fix ptest output parsing
A previous fix to python added -W and removed -v. This reverts that part of the change
since we're no longer getting ptest results at all. This change back to more
verbose output means we start getting test results again.

(From OE-Core rev: d70c77e4d5ec1d7cb4f134377df11e6475f31062)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-11 21:12:48 +01:00
Richard Purdie
fb852a81fc python3: Avoid hanging tests
There are python tests which hang with recent kernels, 5.0 onwards. This causes
ptest to timeout for python3. Disable the problematic test until we better understand
the real cause and fix of the issue (discussions are happening with upstream).

See the patch for details/links.

(From OE-Core rev: 2a48df02a2871635f8235645bfd7f7a3ff0aef31)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-11 21:12:48 +01:00
Richard Purdie
57933bd958 openssh/util-linux/python*: Ensure ptest output is unbuffered
We need to run sed with the -u option to ensure the output is unbuffered else
ptest-runner may timeout thinkig things were idle. Busybox doesn't have the -u
option so we need to RDEPEND on sed (which is a good thing to do if we use it
anyway).

Alex Kanavin should get credit for discovering the problem.

(From OE-Core rev: d3ffbebf43c23faa43af81c9ecf6fcaef36d675b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-09 13:44:39 +01:00
Ross Burton
9dec37ceef python: improve ptest
Add missing runtime dependencies: the test suite needs proper chmod from
coreutils, and the Europe/Minsk timezone.

Also change run-ptest to use -W (run verbosely on failure) instead of -v (always
verbose) to hopefully reduce the noise in the ptest reports.

(From OE-Core rev: 7574f6850797fb7556d2f8077860b7c1d26ae8ec)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-02 15:24:11 +01:00
Alexander Kanavin
c92e780c85 python3: tweaks to achieve 100% pass rate in ptest
(From OE-Core rev: 22f4f1ef17219448416b7cf2a570c7acd7149a64)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-08 10:57:19 +00:00
Alexander Kanavin
e2c3247c23 python3: upgrade to 3.7.2
I took the same approach as the recent perl upgrade: write recipe from scratch,
taking the pieces from the old recipe only when they were proven to be necessary.

The pgo, manifest and ptest features are all preserved.

New features:

- native and target recipes are now unified into one recipe

- check_build_completeness.py runs right after do_compile() and verifies that
all optional modules have been built (a notorious source of regressions)

- a new approach to sysconfig.py and distutils/sysconfig.py returning values
appropriate for native or target builds: we copy the configuration file to a
separate folder, add that folder to sys.path (through environment variable
that differs between native and target builds), and point python to the file
through another environment variable.

There were a few other patches where it was difficult to decide if the patch
is still relevant, and how to test that it works correctly; please add those
as-needed by testing the new python.

(From OE-Core rev: 02714c105426b0d687620913c1a7401b386428b6)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-08 10:57:19 +00:00