Python: Upgrade from 2.7.3 to 2.7.9
v2 cover Python: Upgrade from 2.7.3 to 2.7.9
I tested build locally on my machine, on a Minnowboard MAX build and on the Autobuilder using archs qemux86, qemux86-64, qemuarm, qemuppc, qemumips.
Also ran some personal python programs to test runtime behavior everything seemed to work fine.
v2 is now rebased due to some changes in the manifest file and a backported patch made in the last few weeks.
- Based on Paul Eggletons work to partially upgrade to Python 2.7.6
The following changes since commit 51bdf3ba5f229f2a6ff60661b82912bb95591381:
ref-manual: Review edits to the AUTOREV variable. (2015-02-17 15:17:03 +0000)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib hsalejandro/py2uprebased
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=hsalejandro/py2uprebased
Alejandro Hernandez (1):
Python: Upgrade from 2.7.3 to 2.7.9:
meta/conf/distro/include/default-versions.inc | 4 +-
.../python/python-2.7-manifest.inc | 8 +-
.../python/python-native/multilib.patch | 104 +-
.../python/python-native/nohostlibs.patch | 49 +-
...thon-native_2.7.3.bb => python-native_2.7.9.bb} | 6 +-
meta/recipes-devtools/python/python.inc | 10 +-
.../01-use-proper-tools-for-cross-build.patch | 137 +-
.../python/python/03-fix-tkinter-detection.patch | 26 +-
.../python/05-enable-ctypes-cross-build.patch | 17 +-
.../06-avoid_usr_lib_termcap_path_in_linking.patch | 16 +-
.../python/06-ctypes-libffi-fix-configure.patch | 44 -
.../python/python/CVE-2013-4073_py27.patch | 251 ----
.../python/avoid_warning_about_tkinter.patch | 15 +-
meta/recipes-devtools/python/python/builddir.patch | 27 +-
.../python/fix_for_using_different_libdir.patch | 63 +-
.../python/gcc-4.8-fix-configure-Wformat.patch | 20 -
.../python/python/host_include_contamination.patch | 23 +-
.../python/python/json-flaw-fix.patch | 27 -
meta/recipes-devtools/python/python/multilib.patch | 205 +--
.../python/python/posix_close.patch | 43 -
.../python/python/pypirc-secure.patch | 35 -
.../python/python/python-2.7.3-CVE-2012-2135.patch | 73 -
.../python-2.7.3-CVE-2013-1752-smtplib-fix.patch | 101 --
.../python/python/python-2.7.3-CVE-2014-1912.patch | 26 -
.../python/python/python-2.7.3-CVE-2014-7185.patch | 75 -
.../python/python-2.7.3-berkeley-db-5.3.patch | 1572 --------------------
.../python-fix-build-error-with-Readline-6.3.patch | 62 -
.../python/python/python2.7.3-nossl3.patch | 37 -
.../python/python/remove-BOM-insection-code.patch | 24 -
.../python/python/remove_sqlite_rpath.patch | 19 -
...search_db_h_in_inc_dirs_and_avoid_warning.patch | 23 +-
.../use_sysroot_ncurses_instead_of_host.patch | 20 +
.../python/{python_2.7.3.bb => python_2.7.9.bb} | 22 +-
scripts/contrib/python/generate-manifest-2.7.py | 4 +-
34 files changed, 368 insertions(+), 2820 deletions(-)
rename meta/recipes-devtools/python/{python-native_2.7.3.bb => python-native_2.7.9.bb} (90%)
delete mode 100644 meta/recipes-devtools/python/python/06-ctypes-libffi-fix-configure.patch
delete mode 100644 meta/recipes-devtools/python/python/CVE-2013-4073_py27.patch
delete mode 100644 meta/recipes-devtools/python/python/gcc-4.8-fix-configure-Wformat.patch
delete mode 100644 meta/recipes-devtools/python/python/json-flaw-fix.patch
delete mode 100644 meta/recipes-devtools/python/python/posix_close.patch
delete mode 100644 meta/recipes-devtools/python/python/pypirc-secure.patch
delete mode 100644 meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch
delete mode 100644 meta/recipes-devtools/python/python/python-2.7.3-CVE-2013-1752-smtplib-fix.patch
delete mode 100644 meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-1912.patch
delete mode 100644 meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch
delete mode 100644 meta/recipes-devtools/python/python/python-2.7.3-berkeley-db-5.3.patch
delete mode 100644 meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch
delete mode 100644 meta/recipes-devtools/python/python/python2.7.3-nossl3.patch
delete mode 100644 meta/recipes-devtools/python/python/remove-BOM-insection-code.patch
delete mode 100644 meta/recipes-devtools/python/python/remove_sqlite_rpath.patch
create mode 100644 meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch
rename meta/recipes-devtools/python/{python_2.7.3.bb => python_2.7.9.bb} (89%)Signature · 1 line
1.9.1
PATCH v2 1/1 Python: Upgrade from 2.7.3 to 2.7.9:
- Based on Paul Eggletons work to partially upgrade to Python 2.7.6
Modified:
default-versions.inc: switched to python 2.7.9 generate-manifest-2.7.py: fixed _sysconfigdata python-2.7-manifest.inc: fixed _sysconfigdata
python.inc: Updated checksums and source, no LICENSE
change just updated some dates
python-native_2.7.3 -> python-native_2.7.9 and updated patches python_2.7.3 -> python_2.7.9, and added ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no in EXTRA_OECONF to solve python
issue #3754, only needed when cross compiling, also updated patches use_sysroot_ncurses_instead_of_host.patch: New patch to use ncursesw from sysroot instead of hosts, introduced by fix for python issue #15268
Rebased:
01-use-proper-tools-for-cross-build.patch
03-fix-tkinter-detection.patch
05-enable-ctypes-cross-build.patch
06-avoid_usr_lib_termcap_path_in_linking.patch
avoid_warning_about_tkinter.patch
builddir.patch
fix_for_using_different_libdir.patch
host_include_contamination.patch
multilib.patch
nohostlibs.patch
search_db_h_in_inc_dirs_and_avoid_warning.patch
Deleted (fixed on upstream):
06-ctypes-libffi-fix-configure.patch
CVE-2013-4073_py27.patch
gcc-4.8-fix-configure-Wformat.patch
json-flaw-fix.patch
posix_close.patch
pypirc-secure.patch
python-2.7.3-CVE-2012-2135.patch
python-2.7.3-CVE-2013-1752-smtplib-fix.patch
python-2.7.3-CVE-2014-1912.patch
python-2.7.3-CVE-2014-7185.patch
python-2.7.3-berkeley-db-5.3.patch
python-fix-build-error-with-Readline-6.3.patch
remove-BOM-insection-code.patch
remove_sqlite_rpath.patch
python2.7.3-nossl3.patch
[YOCTO #7059]
---
meta/conf/distro/include/default-versions.inc | 4 +-
.../python/python-2.7-manifest.inc | 8 +-
.../python/python-native/multilib.patch | 104 +-
.../python/python-native/nohostlibs.patch | 49 +-
...thon-native_2.7.3.bb => python-native_2.7.9.bb} | 6 +-
meta/recipes-devtools/python/python.inc | 10 +-
.../01-use-proper-tools-for-cross-build.patch | 137 +-
.../python/python/03-fix-tkinter-detection.patch | 26 +-
.../python/05-enable-ctypes-cross-build.patch | 17 +-
.../06-avoid_usr_lib_termcap_path_in_linking.patch | 16 +-
.../python/06-ctypes-libffi-fix-configure.patch | 44 -
.../python/python/CVE-2013-4073_py27.patch | 251 ----
.../python/avoid_warning_about_tkinter.patch | 15 +-
meta/recipes-devtools/python/python/builddir.patch | 27 +-
.../python/fix_for_using_different_libdir.patch | 63 +-
.../python/gcc-4.8-fix-configure-Wformat.patch | 20 -
.../python/python/host_include_contamination.patch | 23 +-
.../python/python/json-flaw-fix.patch | 27 -
meta/recipes-devtools/python/python/multilib.patch | 205 +--
.../python/python/posix_close.patch | 43 -
.../python/python/pypirc-secure.patch | 35 -
.../python/python/python-2.7.3-CVE-2012-2135.patch | 73 -
.../python-2.7.3-CVE-2013-1752-smtplib-fix.patch | 101 --
.../python/python/python-2.7.3-CVE-2014-1912.patch | 26 -
.../python/python/python-2.7.3-CVE-2014-7185.patch | 75 -
.../python/python-2.7.3-berkeley-db-5.3.patch | 1572 --------------------
.../python-fix-build-error-with-Readline-6.3.patch | 62 -
.../python/python/python2.7.3-nossl3.patch | 37 -
.../python/python/remove-BOM-insection-code.patch | 24 -
.../python/python/remove_sqlite_rpath.patch | 19 -
...search_db_h_in_inc_dirs_and_avoid_warning.patch | 23 +-
.../use_sysroot_ncurses_instead_of_host.patch | 20 +
.../python/{python_2.7.3.bb => python_2.7.9.bb} | 22 +-
scripts/contrib/python/generate-manifest-2.7.py | 4 +-
34 files changed, 368 insertions(+), 2820 deletions(-)
rename meta/recipes-devtools/python/{python-native_2.7.3.bb => python-native_2.7.9.bb} (90%)
delete mode 100644 meta/recipes-devtools/python/python/06-ctypes-libffi-fix-configure.patch
delete mode 100644 meta/recipes-devtools/python/python/CVE-2013-4073_py27.patch
delete mode 100644 meta/recipes-devtools/python/python/gcc-4.8-fix-configure-Wformat.patch
delete mode 100644 meta/recipes-devtools/python/python/json-flaw-fix.patch
delete mode 100644 meta/recipes-devtools/python/python/posix_close.patch
delete mode 100644 meta/recipes-devtools/python/python/pypirc-secure.patch
delete mode 100644 meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch
delete mode 100644 meta/recipes-devtools/python/python/python-2.7.3-CVE-2013-1752-smtplib-fix.patch
delete mode 100644 meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-1912.patch
delete mode 100644 meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch
delete mode 100644 meta/recipes-devtools/python/python/python-2.7.3-berkeley-db-5.3.patch
delete mode 100644 meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch
delete mode 100644 meta/recipes-devtools/python/python/python2.7.3-nossl3.patch
delete mode 100644 meta/recipes-devtools/python/python/remove-BOM-insection-code.patch
delete mode 100644 meta/recipes-devtools/python/python/remove_sqlite_rpath.patch
create mode 100644 meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch
rename meta/recipes-devtools/python/{python_2.7.3.bb => python_2.7.9.bb} (89%)meta/conf/distro/include/default-versions.inc +2 -2
@@ -4,8 +4,8 @@ # Force the python versions in one place PYTHON_BASEVERSION ?= "2.7" -PREFERRED_VERSION_python ?= "2.7.3" -PREFERRED_VERSION_python-native ?= "2.7.3" +PREFERRED_VERSION_python ?= "2.7.9" +PREFERRED_VERSION_python-native ?= "2.7.9" # Force the older version of liberation-fonts until we fix the fontforge issue PREFERRED_VERSION_liberation-fonts ?= "1.04"
meta/recipes-devtools/python/python-2.7-manifest.inc +4 -4
@@ -1,6 +1,6 @@ # WARNING: This file is AUTO GENERATED: Manual edits will be lost next time I regenerate the file. -# Generator: 'scripts/contrib/python/generate-manifest-2.7.py' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <[email protected]> +# Generator: '../../../scripts/contrib/python/generate-manifest-2.7.py' Version 20110222.2 (C) 2002-2010 Michael 'Mickey' Lauer <[email protected]> # Visit the Python for Embedded Systems Site => http://www.Vanille.de/projects/python.spy
@@ -41,13 +41,13 @@ SUMMARY_${PN}-compression="Python high-level compression support" RDEPENDS_${PN}-compression="${PN}-core ${PN}-zlib" FILES_${PN}-compression="${libdir}/python2.7/gzip.* ${libdir}/python2.7/zipfile.* ${libdir}/python2.7/tarfile.* ${libdir}/python2.7/lib-dynload/bz2.so " -SUMMARY_${PN}-contextlib="Python utilities for with-statementcontexts. See PEP 343." +SUMMARY_${PN}-contextlib="Python utilities for with-statementcontexts." RDEPENDS_${PN}-contextlib="${PN}-core" -FILES_${PN}-contextlib="${libdir}/python${PYTHON_MAJMIN}/contextlib.py* " +FILES_${PN}-contextlib="${libdir}/python${PYTHON_MAJMIN}/contextlib.* " SUMMARY_${PN}-core="Python interpreter and core modules" RDEPENDS_${PN}-core="${PN}-lang ${PN}-re" -FILES_${PN}-core="${libdir}/python2.7/__future__.* ${libdir}/python2.7/_abcoll.* ${libdir}/python2.7/abc.* ${libdir}/python2.7/copy.* ${libdir}/python2.7/copy_reg.* ${libdir}/python2.7/ConfigParser.* ${libdir}/python2.7/genericpath.* ${libdir}/python2.7/getopt.* ${libdir}/python2.7/linecache.* ${libdir}/python2.7/new.* ${libdir}/python2.7/os.* ${libdir}/python2.7/posixpath.* ${libdir}/python2.7/struct.* ${libdir}/python2.7/warnings.* ${libdir}/python2.7/site.* ${libdir}/python2.7/stat.* ${libdir}/python2.7/UserDict.* ${libdir}/python2.7/UserList.* ${libdir}/python2.7/UserString.* ${libdir}/python2.7/lib-dynload/binascii.so ${libdir}/python2.7/lib-dynload/_struct.so ${libdir}/python2.7/lib-dynload/time.so ${libdir}/python2.7/lib-dynload/xreadlines.so ${libdir}/python2.7/types.* ${libdir}/python2.7/platform.* ${bindir}/python* ${libdir}/python2.7/_weakrefset.* ${libdir}/python2.7/sysconfig.* ${libdir}/python2.7/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py " +FILES_${PN}-core="${libdir}/python2.7/__future__.* ${libdir}/python2.7/_abcoll.* ${libdir}/python2.7/abc.* ${libdir}/python2.7/copy.* ${libdir}/python2.7/copy_reg.* ${libdir}/python2.7/ConfigParser.* ${libdir}/python2.7/genericpath.* ${libdir}/python2.7/getopt.* ${libdir}/python2.7/linecache.* ${libdir}/python2.7/new.* ${libdir}/python2.7/os.* ${libdir}/python2.7/posixpath.* ${libdir}/python2.7/struct.* ${libdir}/python2.7/warnings.* ${libdir}/python2.7/site.* ${libdir}/python2.7/stat.* ${libdir}/python2.7/UserDict.* ${libdir}/python2.7/UserList.* ${libdir}/python2.7/UserString.* ${libdir}/python2.7/lib-dynload/binascii.so ${libdir}/python2.7/lib-dynload/_struct.so ${libdir}/python2.7/lib-dynload/time.so ${libdir}/python2.7/lib-dynload/xreadlines.so ${libdir}/python2.7/types.* ${libdir}/python2.7/platform.* ${bindir}/python* ${libdir}/python2.7/_weakrefset.* ${libdir}/python2.7/sysconfig.* ${libdir}/python2.7/_sysconfigdata.* ${libdir}/python2.7/config/Makefile ${includedir}/python${PYTHON_MAJMIN}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py " SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support" RDEPENDS_${PN}-crypt="${PN}-core"
meta/recipes-devtools/python/python-native/multilib.patch +48 -56
208 lines not on this page · raw message
meta/recipes-devtools/python/python-native/nohostlibs.patch +18 -31
72 lines not on this page · raw message
meta/recipes-devtools/python/python-native_2.7.9.bb renamed from meta/recipes-devtools/python/python-native_2.7.3.bb +1 -5
@@ -6,7 +6,6 @@ PR = "${INC_PR}.1" SRC_URI += "\ file://05-enable-ctypes-cross-build.patch \ - file://06-ctypes-libffi-fix-configure.patch \ file://10-distutils-fix-swig-parameter.patch \ file://11-distutils-never-modify-shebang-line.patch \ file://12-distutils-prefix-is-inside-staging-area.patch \
@@ -17,9 +16,6 @@ SRC_URI += "\ file://add-md5module-support.patch \ file://builddir.patch \ file://parallel-makeinst-create-bindir.patch \ - file://python-fix-build-error-with-Readline-6.3.patch \ - file://gcc-4.8-fix-configure-Wformat.patch \ - file://json-flaw-fix.patch \ " S = "${WORKDIR}/Python-${PV}"
@@ -58,7 +54,7 @@ do_install() { # (these often end up too long for the #! parser in the kernel as the # buffer is 128 bytes long). ln -s python-native/python ${D}${bindir}/nativepython - + # We don't want modules in ~/.local being used in preference to those # installed in the native sysroot, so disable user site support. sed -i -e 's,^\(ENABLE_USER_SITE = \).*,\1False,' ${D}${libdir}/python${PYTHON_MAJMIN}/site.py
meta/recipes-devtools/python/python.inc +5 -5
@@ -5,12 +5,12 @@ SECTION = "devel/python" # bump this on every change in contrib/python/generate-manifest-2.7.py INC_PR = "r1" -LIC_FILES_CHKSUM = "file://LICENSE;md5=ed3abfd1059e2d3a36a8cff3986f9bb6" +LIC_FILES_CHKSUM = "file://LICENSE;md5=dff3d00f049545862992d2d097831a13" -SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.bz2" - -SRC_URI[md5sum] = "c57477edd6d18bd9eeca2f21add73919" -SRC_URI[sha256sum] = "726457e11cb153adc3f428aaf1901fc561a374c30e5e7da6742c0742a338663c" +SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz" + +SRC_URI[md5sum] = "38d530f7efc373d64a8fb1637e3baaa7" +SRC_URI[sha256sum] = "90d27e14ea7e03570026850e2e50ba71ad20b7eb31035aada1cf3def8f8d4916" PYTHON_MAJMIN = "2.7"
meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +48 -89
182 lines not on this page · raw message
meta/recipes-devtools/python/python/03-fix-tkinter-detection.patch +15 -11
@@ -1,14 +1,18 @@ Upstream-Status: Inappropriate [embedded specific] -# We need to supply STAGING_INCDIR here, otherwise the Tk headers -# will not be found. -# Signed-Off: Michael 'Mickey' Lauer <[email protected]> +We need to supply STAGING_INCDIR here, otherwise the Tk headers +will not be found. -Index: Python-2.6.1/setup.py -=================================================================== ---- Python-2.6.1.orig/setup.py -+++ Python-2.6.1/setup.py -@@ -1543,7 +1543,7 @@ class PyBuildExt(build_ext): +Signed-off-by: Michael 'Mickey' Lauer <[email protected]> +Signed-off-by: Paul Eggleton <[email protected]> + +Rebased for python-2.7.9 + +diff --git a/setup.py b/setup.py +index 8fe1fb8..67eda74 100644 +--- a/setup.py ++++ b/setup.py +@@ -1892,7 +1892,7 @@ class PyBuildExt(build_ext): dotversion = dotversion[:-1] + '.' + dotversion[-1] tcl_include_sub = [] tk_include_sub = []
@@ -17,12 +21,12 @@ Index: Python-2.6.1/setup.py tcl_include_sub += [dir + os.sep + "tcl" + dotversion] tk_include_sub += [dir + os.sep + "tk" + dotversion] tk_include_sub += tcl_include_sub -@@ -1562,22 +1562,6 @@ class PyBuildExt(build_ext): +@@ -1911,22 +1911,6 @@ class PyBuildExt(build_ext): if dir not in include_dirs: include_dirs.append(dir) - # Check for various platform-specific directories -- if platform == 'sunos5': +- if host_platform == 'sunos5': - include_dirs.append('/usr/openwin/include') - added_lib_dirs.append('/usr/openwin/lib') - elif os.path.exists('/usr/X11R6/include'):
@@ -38,5 +42,5 @@ Index: Python-2.6.1/setup.py - added_lib_dirs.append('/usr/X11/lib') - # If Cygwin, then verify that X is installed before proceeding - if platform == 'cygwin': + if host_platform == 'cygwin': x11_inc = find_file('X11/Xlib.h', [], include_dirs)
meta/recipes-devtools/python/python/05-enable-ctypes-cross-build.patch +7 -10
@@ -1,25 +1,22 @@ +Rebased for python 2.7.9 + Upstream-Status: Inappropriate [embedded specific] # CTypes need to know the actual host we are building on. # Signed-Off: Michael Dietrich <[email protected]> -Index: Python-2.6.1/setup.py +Index: Python-2.7.9/setup.py =================================================================== ---- Python-2.6.1.orig/setup.py -+++ Python-2.6.1/setup.py -@@ -1656,16 +1656,16 @@ class PyBuildExt(build_ext): - ffi_configfile): - from distutils.dir_util import mkpath - mkpath(ffi_builddir) -- config_args = [] -+ config_args = ['--host=%s' % os.environ["HOST_SYS"], ] +--- Python-2.7.9.orig/setup.py ++++ Python-2.7.9/setup.py +@@ -2028,12 +2028,12 @@ class PyBuildExt(build_ext): # Pass empty CFLAGS because we'll just append the resulting # CFLAGS to Python's; -g or -O2 is to be avoided. - cmd = "cd %s && env CFLAGS='' '%s/configure' %s" \ - % (ffi_builddir, ffi_srcdir, " ".join(config_args)) + cmd = "(cd %s && autoconf -W cross) && (cd %s && env CFLAGS='' '%s/configure' %s)" \ -+ % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args)) ++ % (ffi_srcdir, ffi_builddir, ffi_srcdir, " ".join(config_args)) res = os.system(cmd) if res or not os.path.exists(ffi_configfile):
meta/recipes-devtools/python/python/06-avoid_usr_lib_termcap_path_in_linking.patch +9 -7
@@ -13,18 +13,20 @@ Nitin A Kamble <[email protected]> Rebased for python 2.7.2 Signed-Off-By: Nitin A Kamble <[email protected]> -Index: Python-2.7.2/setup.py -=================================================================== ---- Python-2.7.2.orig/setup.py -+++ Python-2.7.2/setup.py -@@ -680,12 +680,10 @@ class PyBuildExt(build_ext): +Signed-off-by: Paul Eggleton <[email protected]> + +diff --git a/setup.py b/setup.py +index 67eda74..59c537e 100644 +--- a/setup.py ++++ b/setup.py +@@ -761,12 +761,10 @@ class PyBuildExt(build_ext): pass # Issue 7384: Already linked against curses or tinfo. elif curses_library: readline_libs.append(curses_library) - elif self.compiler.find_library_file(lib_dirs + -- ['/usr/lib/termcap'], +- ['/usr/lib/termcap'], + elif self.compiler.find_library_file(lib_dirs, - 'termcap'): + 'termcap'): readline_libs.append('termcap') exts.append( Extension('readline', ['readline.c'], - library_dirs=['/usr/lib/termcap'],
meta/recipes-devtools/python/python/06-ctypes-libffi-fix-configure.patch deleted +0 -44
44 lines not on this page · raw message
meta/recipes-devtools/python/python/CVE-2013-4073_py27.patch deleted +0 -251
251 lines not on this page · raw message
meta/recipes-devtools/python/python/avoid_warning_about_tkinter.patch +5 -10
@@ -2,22 +2,17 @@ _tkinter module needs tk module along with tcl. tk is not yet integrated in yocto so we skip the check for this module. Avoid a warning by not adding this module to missing variable. -Also simply disable the tk module since its not in DEPENDS. - Upstream-Status: Inappropriate [distribution] Signed-off-by: Andrei Gherzan <[email protected]> -Index: Python-2.7.3/setup.py +Index: Python-2.7.2/setup.py =================================================================== ---- Python-2.7.3.orig/setup.py 2014-07-07 13:45:15.056233820 +0000 -+++ Python-2.7.3/setup.py 2014-07-16 16:06:37.145656284 +0000 -@@ -1639,10 +1639,12 @@ - self.extensions.extend(exts) - +--- Python-2.7.2.orig/setup.py 2012-04-05 23:18:38.500136647 +0300 ++++ Python-2.7.2/setup.py 2012-04-05 23:19:35.888134969 +0300 +@@ -1634,8 +1634,10 @@ # Call the method for detecting whether _tkinter can be compiled -- self.detect_tkinter(inc_dirs, lib_dirs) -+ #self.detect_tkinter(inc_dirs, lib_dirs) + self.detect_tkinter(inc_dirs, lib_dirs) - if '_tkinter' not in [e.name for e in self.extensions]: - missing.append('_tkinter')
meta/recipes-devtools/python/python/builddir.patch +9 -18
@@ -7,11 +7,11 @@ python recipe. Upstream-Status: Inappropriate RP 2012/11/13 -Index: Python-2.7.3/Lib/sysconfig.py +Index: Python-2.7.9/Lib/sysconfig.py =================================================================== ---- Python-2.7.3.orig/Lib/sysconfig.py 2012-11-13 14:36:08.429167199 +0000 -+++ Python-2.7.3/Lib/sysconfig.py 2012-11-13 21:58:31.788551800 +0000 -@@ -93,6 +93,7 @@ +--- Python-2.7.9.orig/Lib/sysconfig.py ++++ Python-2.7.9/Lib/sysconfig.py +@@ -93,6 +93,7 @@ _PREFIX = os.path.normpath(sys.prefix) _EXEC_PREFIX = os.path.normpath(sys.exec_prefix) _CONFIG_VARS = None _USER_BASE = None
@@ -19,7 +19,7 @@ Index: Python-2.7.3/Lib/sysconfig.py def _safe_realpath(path): try: -@@ -100,7 +102,9 @@ +@@ -100,7 +101,9 @@ def _safe_realpath(path): except OSError: return path
@@ -30,11 +30,11 @@ Index: Python-2.7.3/Lib/sysconfig.py _PROJECT_BASE = os.path.dirname(_safe_realpath(sys.executable)) else: # sys.executable can be empty if argv[0] has been changed and Python is -Index: Python-2.7.3/Lib/distutils/sysconfig.py +Index: Python-2.7.9/Lib/distutils/sysconfig.py =================================================================== ---- Python-2.7.3.orig/Lib/distutils/sysconfig.py 2012-11-13 14:36:08.005167209 +0000 -+++ Python-2.7.3/Lib/distutils/sysconfig.py 2012-11-13 22:07:05.644540695 +0000 -@@ -26,6 +26,9 @@ +--- Python-2.7.9.orig/Lib/distutils/sysconfig.py ++++ Python-2.7.9/Lib/distutils/sysconfig.py +@@ -26,6 +26,9 @@ EXEC_PREFIX = os.path.normpath(sys.exec_ # live in project/PCBuild9. If we're dealing with an x64 Windows build, # it'll live in project/PCbuild/amd64. project_base = os.path.dirname(os.path.abspath(sys.executable))
@@ -44,12 +44,3 @@ Index: Python-2.7.3/Lib/distutils/sysconfig.py if os.name == "nt" and "pcbuild" in project_base[-8:].lower(): project_base = os.path.abspath(os.path.join(project_base, os.path.pardir)) # PC/VS7.1 -@@ -247,7 +250,7 @@ - def get_makefile_filename(): - """Return full pathname of installed Makefile from the Python build.""" - if python_build: -- return os.path.join(os.path.dirname(sys.executable), "Makefile") -+ return os.path.join(project_base, "Makefile") - lib_dir = get_python_lib(plat_specific=1, standard_lib=1) - return os.path.join(lib_dir, "config", "Makefile") -
meta/recipes-devtools/python/python/fix_for_using_different_libdir.patch +29 -34
101 lines not on this page · raw message
meta/recipes-devtools/python/python/gcc-4.8-fix-configure-Wformat.patch deleted +0 -20
@@ -1,20 +0,0 @@ -backport bug 17547 from http://hg.python.org/cpython/rev/9d50af4c482f/ - --Wformat is needed by gcc 4.8 - -Signed-off-by: Khem Raj <[email protected]> - -Upstream-Status: Backport -Index: Python-2.7.3/configure.in -=================================================================== ---- Python-2.7.3.orig/configure.in 2013-06-11 02:22:04.186529212 -0700 -+++ Python-2.7.3/configure.in 2013-06-13 02:17:06.324403327 -0700 -@@ -1196,7 +1196,7 @@ - then - AC_MSG_CHECKING(whether gcc supports ParseTuple __format__) - save_CFLAGS=$CFLAGS -- CFLAGS="$CFLAGS -Werror" -+ CFLAGS="$CFLAGS -Werror -Wformat" - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));]], [[]]) - ],[
meta/recipes-devtools/python/python/host_include_contamination.patch +12 -11
@@ -12,16 +12,17 @@ so we add a check here. Signed-off-by: Khem Raj <[email protected]> Upstream-Status: Pending -Index: Python-2.7.2/setup.py -=================================================================== ---- Python-2.7.2.orig/setup.py 2012-02-03 12:10:42.307057756 -0800 -+++ Python-2.7.2/setup.py 2012-02-03 12:11:12.363059210 -0800 -@@ -360,6 +360,8 @@ - # https://wiki.ubuntu.com/MultiarchSpec + +diff --git a/setup.py b/setup.py +index ba2d242..bf859be 100644 +--- a/setup.py ++++ b/setup.py +@@ -393,6 +393,8 @@ class PyBuildExt(build_ext): + if not find_executable('dpkg-architecture'): return -+ if os.environ.get('CROSS_COMPILE') is not None: -+ return - tmpfile = os.path.join(self.build_temp, 'multiarch') - if not os.path.exists(self.build_temp): - os.makedirs(self.build_temp) ++ if os.environ.get('CROSS_COMPILE') is not None: ++ return + opt = '' + if cross_compiling: + opt = '-t' + sysconfig.get_config_var('HOST_GNU_TYPE')
meta/recipes-devtools/python/python/json-flaw-fix.patch deleted +0 -27
@@ -1,27 +0,0 @@ - -python: fix _json module arbitrary process memory read vulnerability - -Upstream-Status: submitted - -Signed-off-by: Daniel BORNAZ <[email protected]> - ---- a/Modules/_json.c 2014-07-15 15:37:17.151046356 +0200 -+++ b/Modules/_json.c 2014-07-15 15:38:37.335605042 +0200 -@@ -1491,7 +1491,7 @@ scan_once_str(PyScannerObject *s, PyObje - PyObject *res; - char *str = PyString_AS_STRING(pystr); - Py_ssize_t length = PyString_GET_SIZE(pystr); -- if (idx >= length) { -+ if ( idx < 0 || idx >= length) { - PyErr_SetNone(PyExc_StopIteration); - return NULL; - } -@@ -1578,7 +1578,7 @@ scan_once_unicode(PyScannerObject *s, Py - PyObject *res; - Py_UNICODE *str = PyUnicode_AS_UNICODE(pystr); - Py_ssize_t length = PyUnicode_GET_SIZE(pystr); -- if (idx >= length) { -+ if ( idx < 0 || idx >= length) { - PyErr_SetNone(PyExc_StopIteration); - return NULL; - }
meta/recipes-devtools/python/python/multilib.patch +122 -83
309 lines not on this page · raw message
meta/recipes-devtools/python/python/posix_close.patch deleted +0 -43
43 lines not on this page · raw message
meta/recipes-devtools/python/python/pypirc-secure.patch deleted +0 -35
@@ -1,35 +0,0 @@ -# HG changeset patch -# User Philip Jenvey <[email protected]> -# Date 1322701507 28800 -# Branch 2.7 -# Node ID e7c20a8476a0e2ca18f8040864cbc400818d8f24 -# Parent 3ecddf168f1f554a17a047384fe0b02f2d688277 -create the .pypirc securely - -Upstream-Status: Backport - -Signed-off-by: Saul Wold <[email protected]> - - -diff -r 3ecddf168f1f -r e7c20a8476a0 Lib/distutils/config.py ---- a/Lib/distutils/config.py Tue Nov 29 00:53:09 2011 +0100 -+++ b/Lib/distutils/config.py Wed Nov 30 17:05:07 2011 -0800 -@@ -42,16 +42,8 @@ - def _store_pypirc(self, username, password): - """Creates a default .pypirc file.""" - rc = self._get_rc_file() -- f = open(rc, 'w') -- try: -- f.write(DEFAULT_PYPIRC % (username, password)) -- finally: -- f.close() -- try: -- os.chmod(rc, 0600) -- except OSError: -- # should do something better here -- pass -+ with os.fdopen(os.open(rc, os.O_CREAT | os.O_WRONLY, 0600), 'w') as fp: -+ fp.write(DEFAULT_PYPIRC % (username, password)) - - def _read_pypirc(self): - """Reads the .pypirc file."""
meta/recipes-devtools/python/python/python-2.7.3-CVE-2012-2135.patch deleted +0 -73
73 lines not on this page · raw message
meta/recipes-devtools/python/python/python-2.7.3-CVE-2013-1752-smtplib-fix.patch deleted +0 -101
101 lines not on this page · raw message
meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-1912.patch deleted +0 -26
@@ -1,26 +0,0 @@ -Upstream-Status: Backport - -Reference: http://bugs.python.org/issue20246 - -CVE-2014-1912: Python buffer overflow in socket.recvfrom_into() -lets remote users execute arbitrary code.Original patch by Benjamin Peterson - -Signed-off-by: Maxin B. John <[email protected]> ---- -diff -r 40fb60df4755 Modules/socketmodule.c ---- a/Modules/socketmodule.c Sun Jan 12 12:11:47 2014 +0200 -+++ b/Modules/socketmodule.c Mon Jan 13 16:36:35 2014 -0800 -@@ -2744,6 +2744,13 @@ - recvlen = buflen; - } - -+ /* Check if the buffer is large enough */ -+ if (buflen < recvlen) { -+ PyErr_SetString(PyExc_ValueError, -+ "buffer too small for requested bytes"); -+ goto error; -+ } -+ - readlen = sock_recvfrom_guts(s, buf.buf, recvlen, flags, &addr); - if (readlen < 0) { - /* Return an error */
meta/recipes-devtools/python/python/python-2.7.3-CVE-2014-7185.patch deleted +0 -75
75 lines not on this page · raw message
meta/recipes-devtools/python/python/python-2.7.3-berkeley-db-5.3.patch deleted +0 -1572
1,149 lines not on this page · raw message
meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch deleted +0 -62
62 lines not on this page · raw message
meta/recipes-devtools/python/python/python2.7.3-nossl3.patch deleted +0 -37
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/python/python/remove-BOM-insection-code.patch deleted +0 -24
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/python/python/remove_sqlite_rpath.patch deleted +0 -19
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/python/python/search_db_h_in_inc_dirs_and_avoid_warning.patch +9 -14
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/python/python/use_sysroot_ncurses_instead_of_host.patch new file +20 -0
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/python/python_2.7.9.bb renamed from meta/recipes-devtools/python/python_2.7.3.bb +3 -19
Lines of this file are not shown. View the raw message.
scripts/contrib/python/generate-manifest-2.7.py +2 -2
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.9.1
Part of the diff is not shown here. View the raw message.
Re: [PATCH v2 1/1] Python: Upgrade from 2.7.3 to 2.7.9:
Quoted 45 lines · Alejandro Hernandez
- Based on Paul Eggletons work to partially upgrade to Python 2.7.6
Modified:
default-versions.inc: switched to python 2.7.9generate-manifest-2.7.py: fixed_sysconfigdatapython-2.7-manifest.inc: fixed_sysconfigdata
python.inc: Updated checksums and source, no LICENSE
change just updated some dates
python-native_2.7.3 -> python-native_2.7.9 and updated patches python_2.7.3 -> python_2.7.9, and added ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no inEXTRA_OECONFto solve python
issue #3754, only needed when cross compiling, also updated patches use_sysroot_ncurses_instead_of_host.patch: New patch to use ncursesw from sysroot instead of hosts, introduced by fix for python issue #15268Rebased:
01-use-proper-tools-for-cross-build.patch
03-fix-tkinter-detection.patch
05-enable-ctypes-cross-build.patch
06-avoid_usr_lib_termcap_path_in_linking.patch
avoid_warning_about_tkinter.patch
builddir.patch
fix_for_using_different_libdir.patch
host_include_contamination.patch
multilib.patch
nohostlibs.patch
search_db_h_in_inc_dirs_and_avoid_warning.patchDeleted (fixed on upstream):
06-ctypes-libffi-fix-configure.patch
CVE-2013-4073_py27.patch
gcc-4.8-fix-configure-Wformat.patch
json-flaw-fix.patch
posix_close.patch
pypirc-secure.patch
python-2.7.3-CVE-2012-2135.patch
python-2.7.3-CVE-2013-1752-smtplib-fix.patch
python-2.7.3-CVE-2014-1912.patch
python-2.7.3-CVE-2014-7185.patch
python-2.7.3-berkeley-db-5.3.patch
python-fix-build-error-with-Readline-6.3.patch
remove-BOM-insection-code.patch
remove_sqlite_rpath.patch
python2.7.3-nossl3.patch
Quoted 1 line
[YOCTO #7059]
The autobuilder highlkighted some issues which look to be from this patch:
Specifically the perf and python-smartpm failures.
Cheers,
Richard
Just a couple of observations on this upgrade:
1. Python 2.7.9 now does strict SSL certificate checking as per http://www.python.org/dev/peps/pep-0476/ and as a result I had at least one package break due to:
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)
I managed to fix that issue by switching the source URL from https:// to http:// Although this change in behaviour is desirable in the grand scheme of things, it is likely to cause some pains along the way.
2. python-imaging build just locks up for me. I don't know what's wrong. I tried an strace but all I can see is a python process waiting on a futex.
I think it may be a good idea to keep python 2.7.3 packages in oe-core because a move from 2.7.3 to 2.7.9 is likely to break some systems. At least in terms of item 1, we have a large potential for breakage, since the SSL cert checking will break anything that uses self-signed SSL certs for HTTPS without deploying the correct CA to the client systems. As far as I can tell, there is no system wide override for this behaviour.
Quoted 6 lines · Peter Urbanec
I think it may be a good idea to keep python 2.7.3 packages in oe-core because a move from 2.7.3 to 2.7.9 is likely to break some systems. At least in terms of item 1, we have a large potential for breakage, since the SSL cert checking will break anything that uses self-signed SSL certs for HTTPS without deploying the correct CA to the client systems. As far as I can tell, there is no system wide override for this behaviour.
IIRC the general argument is if that if you're assuming a self-signed certification is valid, you've lost so much security. We're in the middle of a development cycle so this will only impact people using or moving to 1.8.
I've just verified that python-imaging works for me (and works on the autobuilders), so if you can replicate the failure on demand that filing a bug would be useful.
Ross
Quoted 4 lines · Ross
IIRC the general argument is if that if you're assuming a self-signed certification is valid, you've lost so much security. We're in the middle of a development cycle so this will only impact people using or moving to 1.8.
I'm completely in favour of this change from the security point of view. However, it is likely to trip up a few people, so the change in behaviour should be prominently highlighted in the release notes. I also think that it may be a good idea to keep 2.7.3 around so that it is possible to move to new oe-core and keep the old python around. I would not be surprised if there were other differences between 2.7.3 and 2.7.9 that complicate life. My main rationale for keeping both 2.7.3 and 2.7.9 would be that 2.7.9 can not be made backwards compatible when it comes to the SSL certificates. The only fix is at the source code level for every application that uses SSL based protocols or alternatively convincing the server operators to use certificates issued by well known CAs. For my use case scenario, that's not workable because the user of the device can download packages from third party feeds, including closed source plugins. Yes, 2.7.9 is doing the right thing, but in this case doing the right thing breaks too much stuff.
Quoted 3 lines
I've just verified that python-imaging works for me (and works on the autobuilders), so if you can replicate the failure on demand that filing a bug would be useful.
Good to know that is is something that is specific to my setup. I'll look into it again when I have a little bit of time on my hands. Right now I've put python 2.7.3 in my local overlay and am using it to get work done.
Quoted 5 lines · Peter Urbanec
I'm completely in favour of this change from the security point of view. However, it is likely to trip up a few people, so the change in behaviour should be prominently highlighted in the release notes. I also think that it may be a good idea to keep 2.7.3 around so that it is possible to move to new oe-core and keep the old python around.
Yes, this is an important change and I'll ensure it's in the release notes.
Ross