Commit Graph

17 Commits

Author SHA1 Message Date
Christopher Larson ccbdac5d97 python, python-native: fix PARALLEL_MAKEINST failure
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 master rev: 54da47f3ddc1c009594744793060ffd09db3ad11)

(From OE-Core rev: 4766c03a208f37276b4778a4edc20e1e19faebeb)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-09 11:04:13 +00:00
Yue Tao 2ab41dfb60 python: do not replace ccache in the middle of a path
Python recipe did a sed s/ccache/$(CCACHE) on the Makefile, which
replaces all "ccache" including ones that consist of a full path.
This leads to build error when building in a project path with
"ccache" in its name. Fix it by only replacing "ccache " with
"$(CCACHE) ".

(From OE-Core master rev: 1181112cf65bc0186807fc59399c5dddcb9f9449)

(From OE-Core rev: 3081a1d16d2e1928f11c221c02d92b2c23fa1d85)

Signed-off-by: Lei Liu <lei.liu2@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-09 11:04:13 +00:00
Richard Purdie 0c7b734f96 python: Ensure build completes before install
At the start of install, python swizzles the makefiles around, leading
to chunks of do_compile running again. These race against the install
target, leading to errors if pieces are being recompiled whilst others
are being installed.

For now, workaround this by running the compile target with the new
makefile, then running install ensuring a parallel make race doesn't
happen.

(From OE-Core rev: 72938a8631cfe5be5ac88ad67f2db595e2487e86)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-10-07 09:37:32 +01:00
Saul Wold 36fcb616b0 python: Backport 2 CVE from upstream
These are back ports of 2 patches from upstream to address
CVE-2011-4944
CVE-2013-4238

(From OE-Core rev: 4606eab53e8eff57d6369ea20a5ea63916ea3ea7)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-30 18:06:32 +01:00
Tudor Florea de52f892db python: Add ptest
Install python test suite and run it as ptest
(From OE-Core rev: a768047cb8fc00ecf13f4db08117c348a9312c47)

Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-07-24 11:35:34 +01:00
Richard Purdie c281cd149b python: Add nativesdk wrapper to handle terminfo
Currently if you build nativesdk-python, install it and try and run it,
you see it search in the default nativesdk path for terminfo files
when the readline module is used.

If terminfo files cannot be found, or if the ones found are incorrect,
the system may emit control characters which confuse commandline
processing.

This patch sets the TERMINFO_DIRS variable to ensure the correct locations
are searched for terminfo files, starting with the nativesdk terminfo files
and falling back to the host systtem's.

(From OE-Core rev: 682861166f39fbdcd0c9b923139faab2d40362cf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-18 17:33:14 +01:00
Khem Raj 8d3397b2f1 python: -Wformat is needed by gcc 4.8
This fixes errors in packages using python( build with gcc 4.8)

|
/home/jenkins/oe/shr-core-branches/shr-core/tmp-eglibc/sysroots/qemuarm/usr/include/python2.7/modsupport.h:27:1:
error: 'PyArg_ParseTuple' is an unrecognized format function type
[-Werror=format=]
|  PyAPI_FUNC(int) PyArg_ParseTuple(PyObject *, const char *, ...)
Py_FORMAT_PARSETUPLE(PyArg_ParseTuple, 2, 3);
|  ^
| cc1: all warnings being treated as errors
| cc1: all warnings being treated as errors

(From OE-Core rev: 5745a482a85c064a1eec960aff104cf8ce588e30)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-14 12:44:37 +01:00
Robert Yang 2f7c588c5a python: remove the default optimization
We had hard coded python-native and python's default optimization to 1,
which made the "assert" statement didn't work, and removed the "-O/-OO"
(optimization options), the target python had a "-N" option to disable
the default optimization, but the native python didn't.

I think that we can set the environment variable PYTHONOPTIMIZE or use
"python -O" if we need to optimize, but I'm not sure whether we need to
set it by default, it would confuse the user or cause/hide unexpected
problems if the "assert" doesn't work.

[YOCTO #4427]

(From OE-Core rev: 165ed464bbb9bf985dde9d8c15d000809901fff6)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-05-10 11:43:12 +01:00
Koen Kooi 683abbce58 python: fix on-target use of distutils/setuptools by removing references to buildpaths
Running 'python setup.py build' would fail due to the python Makefile having

CC=             i586-angstrom-linux-gcc  -m32    -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/home/koen/v2012.12/build/tmp-angstrom_v2012_12-eglibc/sysroots/fri2
CXX=            i586-angstrom-linux-g++  -m32    -march=core2 -msse3 -mtune=generic -mfpmath=sse --sysroot=/home/koen/v2012.12/build/tmp-angstrom_v2012_12-eglibc/sysroots/fri2
'--with-libtool-sysroot=/home/koen/v2012.12/build/tmp-angstrom_v2012_12-eglibc/sysroots/fri2'

And more

Multiple users have reported this problem:

http://hipstercircuits.com/?p=499
http://www.gigamegablog.com/2012/09/09/beaglebone-coding-101-spi-output/

(From OE-Core rev: 5704dfa690a625abcface432cf5f9c9bc3ee8abd)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-19 11:54:22 +00:00
yanjun.zhu 96d0ef130d Python: Fix for CVE-2012-2135
Reference:http://bugs.python.org/issue14579

The utf-16 decoder in Python 3.1 through 3.3 does not update the
aligned_end variable after calling the unicode_decode_call_errorhandler
function, which allows remote attackers to obtain sensitive information
(process memory) or cause a denial of service (memory corruption and crash)
via unspecified vectors.

http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2012-2135

[YOCTO #3450]

(From OE-Core rev: f60d3efe93323b7056a9400a483e625a3fed4491)

Signed-off-by: yanjun.zhu <yanjun.zhu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-04 09:58:17 +00:00
Richard Purdie 89bc43e1b2 python: Resolve intermediate staging issues
Its bad practise to poke into the sysroot without knowledge of sstate.

This adds a patch to python allowing us to account for cross compiling
and allow it to find the Makefile/pyconfig.h files without needing them
in the sysroot for do_compile/do_install to complete.

Tested on two architectures and compared with buildhistory with no
significant delta.

(From OE-Core rev: 16da4f75a75dc8020803df9ea73a2a7ead88cc5a)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-18 16:42:07 +00:00
Robert Yang aea2d8c02c recipes-devtools: replace virtclass-native(sdk) with class-native(sdk)
The overrides virtclass-native and virtclass-nativesdk are deprecated,
which should be replaced by class-native and class-nativesdk.

[YOCTO #3297]

(From OE-Core rev: bb67ddeb2eed3e25c626a279ef53a7e8c7bfe6f2)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-11-02 16:18:29 +00:00
Richard Purdie ad23395cd1 nativesdk: Switch to using nativesdk as a prefix, not a suffix
As discussed on the mailing lists, using a suffix to package names is
hard and has lead to many recipes having to do PKGSUFFIX games. Its
looking extremely hard to scale nativesdk much further without hacking
many recipes.

By comparison, using a prefix like multilib does works much better and
doesn't involve "hacking" as many recipes. This change converts nativesdk
to use a prefix using the existing multilib infrastructure.

(From OE-Core rev: 81813c0e322dc04ce4b069117188d8a54dfddb8c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-02 05:52:06 -07:00
Jackie Huang 77625e728b python: Fix to support the python module _bsddb built with db 5.3
_bsddb module in python 2.7 could be built only with db version
between 4.1 and 4.7. A patch was added to avoid build warning
about this for [YOCTO #1937] but not actually fixed it.

This patch enable _bsddb module be built with db 5.3, and remove
--disable-statistics from the DB5_CONFIG to fix segmentation fault
when using _bsddb module in python.

[YOCTO #2749]

(From OE-Core rev: 11267f8a1ccf65142988b095351a84b0fa0fcbcf)

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-06 15:18:47 +01:00
Morgan Little 75b7c51fed python: Update for python-native changes
Add pythonnative onto the list of inherits and update the paths to the binaries
referenced in the recipe to the new paths.

(From OE-Core rev: 284a65d55f0ffad0f4f7f32d72da0f9410578643)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-22 11:42:20 +01:00
Richard Purdie a09d55fbfd python: Fix python-nativesdk variable contamination issue
Without this, python-nativesdk-crypt can depend on openssl which is incorrect.

(From OE-Core rev: 5740696c81a9143504c1cb93e94c54add27896e4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-17 10:53:57 +01:00
Nitin A Kamble 7b08f6a9a1 python: upgrade from 2.7.2 to 2.7.3
bin/python2 link is provided by the python install process,
so no need to create it.

rebase these patches to the newer code:
 fix_for_using_different_libdir.patch
 04-default-is-optimized.patch
remove this patch as it is upstream now:
 sys_platform_is_now_always_linux2.patch

Change default python version to 2.7.3 in the distro config

(From OE-Core rev: 5d92a95ea9b480235b7c9ca5949a681376eba725)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-03 15:48:04 +01:00