summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python
AgeCommit message (Collapse)Author
2019-08-10python3: fix CVE-2019-9740Anuj Mittal
CVE-2019-9947 is same as CVE-2019-9740 and mark it as such. See: https://bugs.python.org/issue30458 Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-08-09python: fix CVE-2019-9740Anuj Mittal
(From OE-Core rev: 8eddac3305b7b428565103cde88cba444e3f0dd0) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-07-29python3: fix CVE-2018-20852 CVE-2019-9636Anuj Mittal
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-06-01python: add a fix for CVE-2019-9948 and CVE-2019-9636Martin Jansa
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-06-01python: update to 2.7.16Alexander Kanavin
Drop backported patches License-update: copyright years Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-05-02python3: Drop ptest hackRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-05-02Adding back wrapper and using OEPYTHON3HOME variable for python3Jaewon Lee
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] 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> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-05-02python3: add another multilib fixAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
2019-04-12python3: add a tr-tr locale for test_locale ptestAlexander Kanavin
With this change, the ptests do not fail anymore, except for the three failures caused by the 5.0 kernel regression: - test_ssl and test_httplib lock up, and are skipped (there is a separate patch for it) - test_asyncio fails but does not lock up Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-11python3: Fix ptest output parsingRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-11python3: Avoid hanging testsRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-09openssh/util-linux/python*: Ensure ptest output is unbufferedRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-04-01python: improve ptestRoss Burton
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. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-24python: fix CVE-2018-14647 in python-native tooRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-03-09python: time.tzset missingArmin Kuster
import time time.tzset() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: module 'time' has no attribute 'tzset' enable tzset in both python versions Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-28python3: depend on qemu-native, not qemu-helper-nativeAlexander Kanavin
qemu-helper-native would erroneously pull in the qemu system parts, where we only want usermode parts for pgo. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-20python3-six: upgrade 1.11.0 -> 1.12.0Richard Purdie
The license checksum changed due to a change in copyright years only. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-20python3-setuptools: upgrade 40.0.0 -> 40.8.0Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-20python3-pip: upgrade 18.0 -> 19.0.2Richard Purdie
The license checksum changed due to copyright year changes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-20python3-pbr: upgrade 5.1.1 -> 5.1.2Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-20python3-gitdb: upgrade 2.0.4 -> 2.0.5Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-20python3: fix INCLDIRSTOMAKE in _sysconfigdata.pyChangqing Li
recipe glade do_configure failed after python upgrade to 3.7.2, it will do runtime check of python headers with native python3 under recipe-sysroot-native, it will check under path INCLDIRSTOMAKE, but this value is '/usr/include /usr/include /usr/include/python3.7m /usr/include/python3.7m', which will cause below error: ERROR: This autoconf log indicates errors, it looked at host include and/or library paths while determining system capabilities. fix it by replace /usr/include to STAGING_INCDIR Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-08python3: tweaks to achieve 100% pass rate in ptestAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-08python: make the python 3.x version of 2to3 utility the default oneAlexander Kanavin
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-02-08python3: upgrade to 3.7.2Alexander Kanavin
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. Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-31python2-manifest: Add missing xmlrpclib.pyRichard Purdie
The manifest creation bug that was masking this file was fixed, rerun and add the missing file to fix: File "/usr/lib64/python2.7/SimpleXMLRPCServer.py", line 102, in <module> import xmlrpclib ImportError: No module named xmlrpclib [YOCTO #12814] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-20python3: use ncursesw, not ncursesAlexander Kanavin
So that wide-char functions are accssible. [YOCTO #13142] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-14meta: remove True option to getVar calls (again)André Draszik
A couple have still been missed in the past despite multiple attempts at doing so (or simply have re-appeared?). Search & replace made using the following command: sed -e 's|\(d\.getVar \?\)( \?\([^,()]*\), \?True)|\1(\2)|g' \ -i $(git grep -E 'getVar ?\( ?([^,()]*), ?True\)' \ | cut -d':' -f1 \ | sort -u) Signed-off-by: André Draszik <andre.draszik@jci.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-14python3-pbr: Move src uri checksums out of .inc fileKhem Raj
python2 version of pbr is in meta-python and uses the same inc file but is not updated synchronously, which ends up breaking it, either we move py2 version into OE-core as well and then ensure that both recipes are updated atomically, or we move the checksums into recipe files Fixes errors like http://errors.yoctoproject.org/Errors/Details/216253/ Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-14python3-smmap: upgrade to 2.0.5Ross Burton
The maintainer lost access to the smmap PyPi account so as with gitdb, set the PyPi name to smmap2. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-11python3-pbr:Upgrade to 5.1.1Hong Liu
Upgrade python3-pbr from 4.2.0 to 5.1.1. Signed-off-by: Hong Liu <hongl.fnst@cn.fujitsu.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2019-01-07python-native: fix one do_populate_sysroot warningChangqing Li
Fix below warning: WARNING: Skipping RPATH /usr/lib64 as is a standard search path for work/x86_64-linux/python-native/2.7.15-r1.1/recipe-sysroot-native/ usr/lib/python2.7/lib-dynload/_bsddb.so setup.py will check db.h under include_dirs, for native build, /usr/lib64 will be insert to postion 0 of include_dirs, so it's priority is higher then our sysroot, cause db.h sysroot is ignored, and rpath set to /usr/lib64. and this cause warning when do_populate_sysroot. use append to fix it. Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-07python/python3: use cc_basename to replace CC for checking compilerChangqing Li
When working path contains "clang"/"gcc"/"icc", it might be part of $CC because of the "--sysroot" parameter. That could cause judgement error about clang/gcc/icc compilers. eg: if build under /yocto/builds/xicc/, bitbake python, $CC will contains xicc, will make $CC match *icc, but actuall xicc just folder name. When "*icc" is matched, below errors are reported when compiling python/python3: x86_64-wrs-linux-gcc: error: strict: No such file or directory x86_64-wrs-linux-gcc: error: unrecognized command line option '-fp-model' Here use cc_basename to replace CC for checking compiler to avoid such kind of issue. 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>
2018-12-15python3: Fix do_configure check platform triplet error (2)Serhey Popovych
When building for powerpc 32bit with musl following error triggered from do_configure: checking for the platform triplet based on compiler characteristics... powerpc-linux-gnu configure: error: internal configure error for the platform triplet, please file a bug report This is caused by PLATFORM_TRIPLET != MULTIARCH mismatch since MULTIARCH in case of musl is powerpc-linux-musl. Since triplet is used as part module name as described in PEP-3149 to make fix less intrusive alias powerpc-linux-musl to powerpc-linux-gnu to avoid possible runtime (e.g. tests) incompatibilities later. Fix was inspired by commit cda0ef61d373 ("python3: fix do_configure check platform triplet error"). Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13create_manifest2: Dont match filenames which contain the directory name for ↵Alejandro Enedino Hernandez Samaniego
new manifest When creating a new python2 manifest, there is a corner case on which the filepath for a certain dependency that was found, could contain the path of an existing folder, e.g. ${libdir}/python2.7/xmlrpclib.py module path contains ${libdir}/python2.7/xml, this causes an issue where the dependency doesnt get eventually added on FILES for that module. This patch checks if the dependency that was found is a directory, if it is, it checks if it matches one of the existing directories on the manifest, if it is not, then it checks if the dependency's path (without the filename) matches one of the directories. Also some misc indentation fixes. Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-09create_manifest3: Dont match filenames which contain the directory name for ↵Alejandro Enedino Hernandez Samaniego
new manifest When creating a new python3 manifest, there is a corner case on which the filepath for a certain dependency that was found, could contain the path of an existing folder, e.g. ${libdir}/python3/xmlrpclib.py module path contains ${libdir}/python3/xml, this causes an issue where the dependency doesnt get eventually added on FILES for that module. This patch checks if the dependency that was found is a directory, if it is, it checks if it matches one of the existing directories on the manifest, if it is not, then it checks if the dependency's path (without the filename) matches one of the directories. Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05python3: drop redundant patchRoss Burton
This patch altered the clean target's behaviour to skip the ipkg-install directory. However this directory isn't created by opkg, opkg-utils, or the package_ipk class; and we don't invoke the clean target as we perform out-of-tree builds. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-05python3: don't cripple target distutilsRoss Burton
We stop distutils for *native* Python from rewriting hashbangs when installing (so installed scripts don't have a hashbang that refers to sysroot paths), but this isn't needed nor desirable for the *target* Python. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01python: Adds instructions to the manifest fileAlejandro Enedino Hernandez Samaniego
While there is a bit of documentation regarding building a new manifest file for python, it seems that users usually only read the manifest file. The manifest file is in JSON format which doesn't allow comments, hence why instructions were initially put elsewhere. This patch hacks the call to open the JSON manifest file by using a marker to trick it into reading only part of the file as the manifest itself, and keep the other part as comments, which contain instructions for the user to run the create_manifest task after an upgrade or when adding a new package. Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-01python3: Adds instructions to the manifest fileAlejandro Enedino Hernandez Samaniego
While there is a bit of documentation regarding building a new manifest file for python, it seems that users usually only read the manifest file. The manifest file is in JSON format which doesn't allow comments, hence why instructions were initially put elsewhere. This patch hacks the call to open the JSON manifest file by using a marker to trick it into reading only part of the file as the manifest itself, and keep the other part as comments, which contain instructions for the user to run the create_manifest task after an upgrade or when adding a new package. Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandr@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23python: let more modules build in nativeRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23python: add tk supportMingli Yu
Add support to enable tk via PACKGECONFIG. before the patch: # python Python 2.7.15 (default, Nov 8 2018, 04:53:50) [GCC 8.2.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Tkinter Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python2.7/lib-tk/Tkinter.py", line 39, in <module> import _tkinter # If this fails your Python may not be configured for Tk ImportError: No module named _tkinter >>> After the patch, if enable tk in PACKGECONFIG, then # python Python 2.7.15 (default, Oct 25 2018, 08:12:45) [GCC 8.2.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Tkinter >>> Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23python3: add tk supportMingli Yu
Add support to enable tk via PACKAGECONFIG. before this patch: # python3 Python 3.5.6 (default, Nov 8 2018, 04:53:45) [GCC 8.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.5/tkinter/__init__.py", line 35, in <module> import _tkinter # If this fails your Python may not be configured for Tk ImportError: No module named '_tkinter' >>> After this patch, if enable tk in PACKAGECONFIG, then # python3 Python 3.5.6 (default, Nov 8 2018, 03:15:52) [GCC 8.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import tkinter >>> Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-23recipes: Remove tab indentations in python codeRobert Yang
Use 4 spaces to replace a tab. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-06python3: add python3-venv to the python3-modules RDEPENDSRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-06python3: Fix python3-pyvenv run-time dependencyHugues Kamba
Pyvenv is just a small script that uses venv to create virtual environments. https://www.python.org/dev/peps/pep-0405/#creating-virtual-environments This patch adds the python3-venv module as a self-contained package which python3-pyvenv must depend on at run-time. The patch also provides the package python3-pyvenv from the pyhton3-venv package.This is good for future-proofing since python3-pyvenv has been deprecated and only python3-venv is now available in Python 3.6. https://docs.python.org/3/library/venv.html. Without this patch python3-pyvenv is broken because it is missing the venv module at run-time. This patch specifies the newly created python3-venv as a run-time dependency of python3-pyvenv. Signed-off-by: Hugues Kamba <hugues.kamba@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-29python: add missing CVE tag to patchesRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-20python: backport patch to fix CVE-2018-14647Chen Qi
Backport patch to fix the following CVE. CVE: CVE-2018-14647 Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-20python: backport patch to fix CVE-2018-1000802Chen Qi
Backport a patch to fix the following CVE. CVE: CVE-2018-1000802 Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-15python: remove the PN package entirelyRoss Burton
Nothing should be in this package, so remove it entirely to be sure nothing does end up in there. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>