diff options
author | Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | 2015-05-12 15:09:50 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-05-15 17:44:59 +0100 |
commit | 79a2fc2f6c84265baefcdb6bb74c4da3b8b600d4 (patch) | |
tree | eb57ba6cbcac9168cd726154346db009dbdde6f0 /meta/recipes-devtools/python/python3_3.4.3.bb | |
parent | 1237db6ee335f5b4cbdad98da3fff5284afb603b (diff) | |
download | poky-79a2fc2f6c84265baefcdb6bb74c4da3b8b600d4.tar.gz |
python3: Upgrade from 3.4.2 to 3.4.3
Modifies:
python3-native_3.4.2.bb -> python3-native_3.4.3.bb: Updates checksums, LICENSE did not change,
dates were updated.
python3_3.4.2.bb -> python3_3.4.3.bb: Updates checksums, LICENSE did not change,
dates were updated.
generate-manifest-3.4.py: fixes asyncio and net-tools.
python-3.4-manifest.inc: fixes asyncio and net-tools.
This upgrade contains a fix for CVE-2014-9365.
(From OE-Core rev: 94fc3b199c169b1da850c0aade530ddcf1544d81)
Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3_3.4.3.bb')
-rw-r--r-- | meta/recipes-devtools/python/python3_3.4.3.bb | 218 |
1 files changed, 218 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3_3.4.3.bb b/meta/recipes-devtools/python/python3_3.4.3.bb new file mode 100644 index 0000000000..bee9e6f8ec --- /dev/null +++ b/meta/recipes-devtools/python/python3_3.4.3.bb | |||
@@ -0,0 +1,218 @@ | |||
1 | require recipes-devtools/python/python.inc | ||
2 | |||
3 | DEPENDS = "python3-native libffi bzip2 db gdbm openssl readline sqlite3 zlib virtual/libintl xz" | ||
4 | PR = "${INC_PR}.0" | ||
5 | PYTHON_MAJMIN = "3.4" | ||
6 | PYTHON_BINABI= "${PYTHON_MAJMIN}m" | ||
7 | DISTRO_SRC_URI ?= "file://sitecustomize.py" | ||
8 | DISTRO_SRC_URI_linuxstdbase = "" | ||
9 | SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \ | ||
10 | file://12-distutils-prefix-is-inside-staging-area.patch \ | ||
11 | file://python-config.patch \ | ||
12 | file://000-cross-compile.patch \ | ||
13 | file://020-dont-compile-python-files.patch \ | ||
14 | file://030-fixup-include-dirs.patch \ | ||
15 | file://070-dont-clean-ipkg-install.patch \ | ||
16 | file://080-distutils-dont_adjust_files.patch \ | ||
17 | file://110-enable-zlib.patch \ | ||
18 | file://130-readline-setup.patch \ | ||
19 | file://150-fix-setupterm.patch \ | ||
20 | file://0001-h2py-Fix-issue-13032-where-it-fails-with-UnicodeDeco.patch \ | ||
21 | file://makerace.patch \ | ||
22 | ${DISTRO_SRC_URI} \ | ||
23 | " | ||
24 | |||
25 | SRC_URI += "\ | ||
26 | file://03-fix-tkinter-detection.patch \ | ||
27 | file://04-default-is-optimized.patch \ | ||
28 | file://avoid_warning_about_tkinter.patch \ | ||
29 | file://cgi_py.patch \ | ||
30 | file://host_include_contamination.patch \ | ||
31 | file://python-3.3-multilib.patch \ | ||
32 | file://shutil-follow-symlink-fix.patch \ | ||
33 | file://sysroot-include-headers.patch \ | ||
34 | file://unixccompiler.patch \ | ||
35 | file://avoid-ncursesw-include-path.patch \ | ||
36 | file://python3-use-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \ | ||
37 | file://python3-setup.py-no-host-headers-libs.patch \ | ||
38 | file://sysconfig.py-add-_PYTHON_PROJECT_SRC.patch \ | ||
39 | file://setup.py-check-cross_compiling-when-get-FLAGS.patch \ | ||
40 | " | ||
41 | SRC_URI[md5sum] = "7d092d1bba6e17f0d9bd21b49e441dd5" | ||
42 | SRC_URI[sha256sum] = "b5b3963533768d5fc325a4d7a6bd6f666726002d696f1d399ec06b043ea996b8" | ||
43 | |||
44 | LIC_FILES_CHKSUM = "file://LICENSE;md5=dd98d01d471fac8d8dbdd975229dba03" | ||
45 | |||
46 | S = "${WORKDIR}/Python-${PV}" | ||
47 | |||
48 | inherit autotools multilib_header python3native pkgconfig | ||
49 | |||
50 | CONFIGUREOPTS += " --with-system-ffi " | ||
51 | |||
52 | CACHED_CONFIGUREVARS = "ac_cv_have_chflags=no \ | ||
53 | ac_cv_have_lchflags=no \ | ||
54 | ac_cv_have_long_long_format=yes \ | ||
55 | ac_cv_buggy_getaddrinfo=no \ | ||
56 | ac_cv_file__dev_ptmx=yes \ | ||
57 | ac_cv_file__dev_ptc=no \ | ||
58 | " | ||
59 | # The 3 lines below are copied from the libffi recipe, ctypes ships its own copy of the libffi sources | ||
60 | #Somehow gcc doesn't set __SOFTFP__ when passing -mfloatabi=softp :( | ||
61 | TARGET_CC_ARCH_append_armv6 = " -D__SOFTFP__" | ||
62 | TARGET_CC_ARCH_append_armv7a = " -D__SOFTFP__" | ||
63 | TARGET_CC_ARCH += "-DNDEBUG -fno-inline" | ||
64 | EXTRA_OEMAKE += "CROSS_COMPILE=yes" | ||
65 | EXTRA_OECONF += "CROSSPYTHONPATH=${STAGING_LIBDIR_NATIVE}/python${PYTHON_MAJMIN}/lib-dynload/ --without-ensurepip" | ||
66 | |||
67 | export CROSS_COMPILE = "${TARGET_PREFIX}" | ||
68 | export _PYTHON_PROJECT_BASE = "${B}" | ||
69 | export _PYTHON_PROJECT_SRC = "${S}" | ||
70 | |||
71 | # No ctypes option for python 3 | ||
72 | PYTHONLSBOPTS = "" | ||
73 | |||
74 | do_configure_append() { | ||
75 | rm -f ${S}/Makefile.orig | ||
76 | autoreconf -Wcross --verbose --install --force --exclude=autopoint ../Python-${PV}/Modules/_ctypes/libffi | ||
77 | } | ||
78 | |||
79 | do_compile() { | ||
80 | # regenerate platform specific files, because they depend on system headers | ||
81 | cd ${S}/Lib/plat-linux* | ||
82 | include=${STAGING_INCDIR} ${STAGING_BINDIR_NATIVE}/python3-native/python3 \ | ||
83 | ${S}/Tools/scripts/h2py.py -i '(u_long)' \ | ||
84 | ${STAGING_INCDIR}/dlfcn.h \ | ||
85 | ${STAGING_INCDIR}/linux/cdrom.h \ | ||
86 | ${STAGING_INCDIR}/netinet/in.h \ | ||
87 | ${STAGING_INCDIR}/sys/types.h | ||
88 | sed -e 's,${STAGING_DIR_HOST},,g' -i *.py | ||
89 | cd - | ||
90 | |||
91 | # remove hardcoded ccache, see http://bugs.openembedded.net/show_bug.cgi?id=4144 | ||
92 | sed -i -e s,ccache\ ,'$(CCACHE) ', Makefile | ||
93 | |||
94 | # remove any bogus LD_LIBRARY_PATH | ||
95 | sed -i -e s,RUNSHARED=.*,RUNSHARED=, Makefile | ||
96 | |||
97 | if [ ! -f Makefile.orig ]; then | ||
98 | install -m 0644 Makefile Makefile.orig | ||
99 | fi | ||
100 | sed -i -e 's,^CONFIGURE_LDFLAGS=.*,CONFIGURE_LDFLAGS=-L. -L${STAGING_LIBDIR},g' \ | ||
101 | -e 's,libdir=${libdir},libdir=${STAGING_LIBDIR},g' \ | ||
102 | -e 's,libexecdir=${libexecdir},libexecdir=${STAGING_DIR_HOST}${libexecdir},g' \ | ||
103 | -e 's,^LIBDIR=.*,LIBDIR=${STAGING_LIBDIR},g' \ | ||
104 | -e 's,includedir=${includedir},includedir=${STAGING_INCDIR},g' \ | ||
105 | -e 's,^INCLUDEDIR=.*,INCLUDE=${STAGING_INCDIR},g' \ | ||
106 | -e 's,^CONFINCLUDEDIR=.*,CONFINCLUDE=${STAGING_INCDIR},g' \ | ||
107 | Makefile | ||
108 | # save copy of it now, because if we do it in do_install and | ||
109 | # then call do_install twice we get Makefile.orig == Makefile.sysroot | ||
110 | install -m 0644 Makefile Makefile.sysroot | ||
111 | |||
112 | oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ | ||
113 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ | ||
114 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | ||
115 | STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ | ||
116 | STAGING_INCDIR=${STAGING_INCDIR} \ | ||
117 | BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | ||
118 | LIB=${baselib} \ | ||
119 | ARCH=${TARGET_ARCH} \ | ||
120 | OPT="${CFLAGS}" libpython3.so | ||
121 | |||
122 | oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ | ||
123 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ | ||
124 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | ||
125 | STAGING_INCDIR=${STAGING_INCDIR} \ | ||
126 | STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ | ||
127 | BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | ||
128 | LIB=${baselib} \ | ||
129 | ARCH=${TARGET_ARCH} \ | ||
130 | OPT="${CFLAGS}" | ||
131 | } | ||
132 | |||
133 | do_install() { | ||
134 | # make install needs the original Makefile, or otherwise the inclues would | ||
135 | # go to ${D}${STAGING...}/... | ||
136 | install -m 0644 Makefile.orig Makefile | ||
137 | |||
138 | install -d ${D}${libdir}/pkgconfig | ||
139 | install -d ${D}${libdir}/python${PYTHON_MAJMIN}/config | ||
140 | |||
141 | # rerun the build once again with original makefile this time | ||
142 | # run install in a separate step to avoid compile/install race | ||
143 | oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ | ||
144 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ | ||
145 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | ||
146 | STAGING_INCDIR=${STAGING_INCDIR} \ | ||
147 | STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ | ||
148 | BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | ||
149 | LIB=${baselib} \ | ||
150 | ARCH=${TARGET_ARCH} \ | ||
151 | DESTDIR=${D} LIBDIR=${libdir} | ||
152 | |||
153 | oe_runmake HOSTPGEN=${STAGING_BINDIR_NATIVE}/python3-native/pgen \ | ||
154 | HOSTPYTHON=${STAGING_BINDIR_NATIVE}/python3-native/python3 \ | ||
155 | STAGING_LIBDIR=${STAGING_LIBDIR} \ | ||
156 | STAGING_INCDIR=${STAGING_INCDIR} \ | ||
157 | STAGING_BASELIBDIR=${STAGING_BASELIBDIR} \ | ||
158 | BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ | ||
159 | LIB=${baselib} \ | ||
160 | ARCH=${TARGET_ARCH} \ | ||
161 | DESTDIR=${D} LIBDIR=${libdir} install | ||
162 | |||
163 | install -m 0644 Makefile.sysroot ${D}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile | ||
164 | |||
165 | if [ -e ${WORKDIR}/sitecustomize.py ]; then | ||
166 | install -m 0644 ${WORKDIR}/sitecustomize.py ${D}/${libdir}/python${PYTHON_MAJMIN} | ||
167 | fi | ||
168 | |||
169 | oe_multilib_header python${PYTHON_BINABI}/pyconfig.h | ||
170 | } | ||
171 | |||
172 | do_install_append_class-nativesdk () { | ||
173 | create_wrapper ${D}${bindir}/python${PYTHON_MAJMIN} TERMINFO_DIRS='${sysconfdir}/terminfo:/etc/terminfo:/usr/share/terminfo:/usr/share/misc/terminfo:/lib/terminfo' | ||
174 | } | ||
175 | |||
176 | SSTATE_SCAN_FILES += "Makefile" | ||
177 | PACKAGE_PREPROCESS_FUNCS += "py_package_preprocess" | ||
178 | |||
179 | py_package_preprocess () { | ||
180 | # copy back the old Makefile to fix target package | ||
181 | install -m 0644 Makefile.orig ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile | ||
182 | # Remove references to buildmachine paths in target Makefile | ||
183 | sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g ${PKGD}/${libdir}/python${PYTHON_MAJMIN}/config/Makefile | ||
184 | } | ||
185 | |||
186 | require python-${PYTHON_MAJMIN}-manifest.inc | ||
187 | |||
188 | # manual dependency additions | ||
189 | RPROVIDES_${PN}-core = "${PN}" | ||
190 | RRECOMMENDS_${PN}-core = "${PN}-readline" | ||
191 | RRECOMMENDS_${PN}-crypt = "openssl" | ||
192 | RRECOMMENDS_${PN}-crypt_class-nativesdk = "nativesdk-openssl" | ||
193 | |||
194 | FILES_${PN}-2to3 += "${bindir}/2to3-${PYTHON_MAJMIN}" | ||
195 | FILES_${PN}-pydoc += "${bindir}/pydoc${PYTHON_MAJMIN} ${bindir}/pydoc3" | ||
196 | FILES_${PN}-idle += "${bindir}/idle3 ${bindir}/idle${PYTHON_MAJMIN}" | ||
197 | |||
198 | PACKAGES =+ "${PN}-pyvenv" | ||
199 | FILES_${PN}-pyvenv += "${bindir}/pyvenv-${PYTHON_MAJMIN} ${bindir}/pyvenv" | ||
200 | |||
201 | # package libpython3 | ||
202 | PACKAGES =+ "libpython3 libpython3-staticdev" | ||
203 | FILES_libpython3 = "${libdir}/libpython*.so.*" | ||
204 | FILES_libpython3-staticdev += "${libdir}/python${PYTHON_MAJMIN}/config-${PYTHON_BINABI}/libpython${PYTHON_BINABI}.a" | ||
205 | |||
206 | # catch debug extensions (isn't that already in python-core-dbg?) | ||
207 | FILES_${PN}-dbg += "${libdir}/python${PYTHON_MAJMIN}/lib-dynload/.debug" | ||
208 | |||
209 | # catch all the rest (unsorted) | ||
210 | PACKAGES += "${PN}-misc" | ||
211 | RDEPENDS_${PN}-misc += "${PN}-core" | ||
212 | FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}" | ||
213 | |||
214 | # catch manpage | ||
215 | PACKAGES += "${PN}-man" | ||
216 | FILES_${PN}-man = "${datadir}/man" | ||
217 | |||
218 | BBCLASSEXTEND = "nativesdk" | ||