diff options
| author | Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | 2017-01-24 00:55:06 -0600 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-01 23:27:06 +0000 |
| commit | 30b2044de65665470a95e33e934816c0caa91325 (patch) | |
| tree | ce7fdf9bda1aeb07dd362411152b23dc36375e40 /meta/recipes-devtools/python/python-native_2.7.13.bb | |
| parent | 1bd3e545bd14428e0695bafd80fe350a57463363 (diff) | |
| download | poky-30b2044de65665470a95e33e934816c0caa91325.tar.gz | |
python: Upgrade both python and python-native to 2.7.13
Rebased:
- python-native/multilib.patch
- python/multilib.patch
- python/01-use-proper-tools-for-cross-build.patch
Upstream:
- CVE-2016-1000110
(From OE-Core rev: 2eaadc5464e3340359b626026d80afb6bc01d3f1)
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python-native_2.7.13.bb')
| -rw-r--r-- | meta/recipes-devtools/python/python-native_2.7.13.bb | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python-native_2.7.13.bb b/meta/recipes-devtools/python/python-native_2.7.13.bb new file mode 100644 index 0000000000..9a6430dba5 --- /dev/null +++ b/meta/recipes-devtools/python/python-native_2.7.13.bb | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | require python.inc | ||
| 2 | |||
| 3 | EXTRANATIVEPATH += "bzip2-native" | ||
| 4 | DEPENDS = "openssl-native bzip2-replacement-native zlib-native readline-native sqlite3-native expat-native" | ||
| 5 | PR = "${INC_PR}.1" | ||
| 6 | |||
| 7 | SRC_URI += "\ | ||
| 8 | file://05-enable-ctypes-cross-build.patch \ | ||
| 9 | file://10-distutils-fix-swig-parameter.patch \ | ||
| 10 | file://11-distutils-never-modify-shebang-line.patch \ | ||
| 11 | file://0001-distutils-set-the-prefix-to-be-inside-staging-direct.patch \ | ||
| 12 | file://debug.patch \ | ||
| 13 | file://unixccompiler.patch \ | ||
| 14 | file://nohostlibs.patch \ | ||
| 15 | file://multilib.patch \ | ||
| 16 | file://add-md5module-support.patch \ | ||
| 17 | file://builddir.patch \ | ||
| 18 | file://parallel-makeinst-create-bindir.patch \ | ||
| 19 | file://revert_use_of_sysconfigdata.patch \ | ||
| 20 | " | ||
| 21 | |||
| 22 | S = "${WORKDIR}/Python-${PV}" | ||
| 23 | |||
| 24 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:" | ||
| 25 | |||
| 26 | inherit native | ||
| 27 | |||
| 28 | RPROVIDES += "python-distutils-native \ | ||
| 29 | python-compression-native \ | ||
| 30 | python-textutils-native \ | ||
| 31 | python-codecs-native \ | ||
| 32 | python-core-native \ | ||
| 33 | python-unittest-native \ | ||
| 34 | python-io-native \ | ||
| 35 | " | ||
| 36 | |||
| 37 | EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}" | ||
| 38 | |||
| 39 | EXTRA_OEMAKE = '\ | ||
| 40 | LIBC="" \ | ||
| 41 | STAGING_LIBDIR=${STAGING_LIBDIR_NATIVE} \ | ||
| 42 | STAGING_INCDIR=${STAGING_INCDIR_NATIVE} \ | ||
| 43 | ' | ||
| 44 | |||
| 45 | do_configure_append() { | ||
| 46 | autoreconf --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi | ||
| 47 | } | ||
| 48 | |||
| 49 | do_install() { | ||
| 50 | oe_runmake 'DESTDIR=${D}' install | ||
| 51 | install -d ${D}${bindir}/${PN} | ||
| 52 | install -m 0755 Parser/pgen ${D}${bindir}/${PN} | ||
| 53 | |||
| 54 | # Make sure we use /usr/bin/env python | ||
| 55 | for PYTHSCRIPT in `grep -rIl ${bindir}/${PN}/python ${D}${bindir}/${PN}`; do | ||
| 56 | sed -i -e '1s|^#!.*|#!/usr/bin/env python|' $PYTHSCRIPT | ||
| 57 | done | ||
| 58 | |||
| 59 | # Add a symlink to the native Python so that scripts can just invoke | ||
| 60 | # "nativepython" and get the right one without needing absolute paths | ||
| 61 | # (these often end up too long for the #! parser in the kernel as the | ||
| 62 | # buffer is 128 bytes long). | ||
| 63 | ln -s python-native/python ${D}${bindir}/nativepython | ||
| 64 | |||
| 65 | # We don't want modules in ~/.local being used in preference to those | ||
| 66 | # installed in the native sysroot, so disable user site support. | ||
| 67 | sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py | ||
| 68 | } | ||
