summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-devtools/python
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-devtools/python')
-rw-r--r--poky/meta/recipes-devtools/python/python-native_2.7.15.bb (renamed from poky/meta/recipes-devtools/python/python-native_2.7.14.bb)1
-rw-r--r--poky/meta/recipes-devtools/python/python.inc10
-rw-r--r--poky/meta/recipes-devtools/python/python/0001-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch98
-rw-r--r--poky/meta/recipes-devtools/python/python/0001-closes-bpo-34540-Convert-shutil._call_external_zip-t.patch69
-rw-r--r--poky/meta/recipes-devtools/python/python/CVE-2018-1000030-1.patch138
-rw-r--r--poky/meta/recipes-devtools/python/python/CVE-2018-1000030-2.patch306
-rw-r--r--poky/meta/recipes-devtools/python/python/fix-gc-alignment.patch43
-rw-r--r--poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch34
-rw-r--r--poky/meta/recipes-devtools/python/python/float-endian.patch216
-rw-r--r--poky/meta/recipes-devtools/python/python/run-ptest4
-rw-r--r--poky/meta/recipes-devtools/python/python_2.7.15.bb (renamed from poky/meta/recipes-devtools/python/python_2.7.14.bb)29
11 files changed, 393 insertions, 555 deletions
diff --git a/poky/meta/recipes-devtools/python/python-native_2.7.14.bb b/poky/meta/recipes-devtools/python/python-native_2.7.15.bb
index b822583c5..7c491fa3e 100644
--- a/poky/meta/recipes-devtools/python/python-native_2.7.14.bb
+++ b/poky/meta/recipes-devtools/python/python-native_2.7.15.bb
@@ -16,7 +16,6 @@ SRC_URI += "\
file://builddir.patch \
file://parallel-makeinst-create-bindir.patch \
file://revert_use_of_sysconfigdata.patch \
- file://fix-gc-alignment.patch \
"
S = "${WORKDIR}/Python-${PV}"
diff --git a/poky/meta/recipes-devtools/python/python.inc b/poky/meta/recipes-devtools/python/python.inc
index 69542c96c..062a20f68 100644
--- a/poky/meta/recipes-devtools/python/python.inc
+++ b/poky/meta/recipes-devtools/python/python.inc
@@ -5,14 +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=f741e51de91d4eeea5930b9c3c7fa69d"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=f257cc14f81685691652a3d3e1b5d754"
-SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
- file://CVE-2018-1000030-1.patch \
- file://CVE-2018-1000030-2.patch"
+SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz"
-SRC_URI[md5sum] = "1f6db41ad91d9eb0a6f0c769b8613c5b"
-SRC_URI[sha256sum] = "71ffb26e09e78650e424929b2b457b9c912ac216576e6bd9e7d204ed03296a66"
+SRC_URI[md5sum] = "a80ae3cc478460b922242f43a1b4094d"
+SRC_URI[sha256sum] = "22d9b1ac5b26135ad2b8c2901a9413537e08749a753356ee913c84dbd2df5574"
# python recipe is actually python 2.x
# also, exclude pre-releases for both python 2.x and 3.x
diff --git a/poky/meta/recipes-devtools/python/python/0001-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch b/poky/meta/recipes-devtools/python/python/0001-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch
new file mode 100644
index 000000000..42c64caae
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python/0001-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch
@@ -0,0 +1,98 @@
+From 3ffc80959f01f9fde548f1632694b9f950c2dd7c Mon Sep 17 00:00:00 2001
+From: Christian Heimes <christian@python.org>
+Date: Tue, 18 Sep 2018 15:13:09 +0200
+Subject: [PATCH] [2.7] bpo-34623: Use XML_SetHashSalt in _elementtree
+ (GH-9146) (GH-9394)
+
+The C accelerated _elementtree module now initializes hash randomization
+salt from _Py_HashSecret instead of libexpat's default CPRNG.
+
+Signed-off-by: Christian Heimes <christian@python.org>
+
+https://bugs.python.org/issue34623.
+(cherry picked from commit cb5778f00ce48631c7140f33ba242496aaf7102b)
+
+Co-authored-by: Christian Heimes <christian@python.org>
+
+
+
+https://bugs.python.org/issue34623
+
+Upstream-Status: Backport
+
+Fix CVE-2018-14647
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ Include/pyexpat.h | 4 +++-
+ Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst | 2 ++
+ Modules/_elementtree.c | 5 +++++
+ Modules/pyexpat.c | 5 +++++
+ 4 files changed, 15 insertions(+), 1 deletion(-)
+ create mode 100644 Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
+
+diff --git a/Include/pyexpat.h b/Include/pyexpat.h
+index 5340ef5..3fc5fa5 100644
+--- a/Include/pyexpat.h
++++ b/Include/pyexpat.h
+@@ -3,7 +3,7 @@
+
+ /* note: you must import expat.h before importing this module! */
+
+-#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.0"
++#define PyExpat_CAPI_MAGIC "pyexpat.expat_CAPI 1.1"
+ #define PyExpat_CAPSULE_NAME "pyexpat.expat_CAPI"
+
+ struct PyExpat_CAPI
+@@ -43,6 +43,8 @@ struct PyExpat_CAPI
+ XML_Parser parser, XML_UnknownEncodingHandler handler,
+ void *encodingHandlerData);
+ void (*SetUserData)(XML_Parser parser, void *userData);
++ /* might be none for expat < 2.1.0 */
++ int (*SetHashSalt)(XML_Parser parser, unsigned long hash_salt);
+ /* always add new stuff to the end! */
+ };
+
+diff --git a/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
+new file mode 100644
+index 0000000..31ad92e
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2018-09-10-16-05-39.bpo-34623.Ua9jMv.rst
+@@ -0,0 +1,2 @@
++The C accelerated _elementtree module now initializes hash randomization
++salt from _Py_HashSecret instead of libexpat's default CSPRNG.
+diff --git a/Modules/_elementtree.c b/Modules/_elementtree.c
+index 1d316a1..a19cbf7 100644
+--- a/Modules/_elementtree.c
++++ b/Modules/_elementtree.c
+@@ -2574,6 +2574,11 @@ xmlparser(PyObject* self_, PyObject* args, PyObject* kw)
+ PyErr_NoMemory();
+ return NULL;
+ }
++ /* expat < 2.1.0 has no XML_SetHashSalt() */
++ if (EXPAT(SetHashSalt) != NULL) {
++ EXPAT(SetHashSalt)(self->parser,
++ (unsigned long)_Py_HashSecret.prefix);
++ }
+
+ ALLOC(sizeof(XMLParserObject), "create expatparser");
+
+diff --git a/Modules/pyexpat.c b/Modules/pyexpat.c
+index 2b4d312..1f8c0d7 100644
+--- a/Modules/pyexpat.c
++++ b/Modules/pyexpat.c
+@@ -2042,6 +2042,11 @@ MODULE_INITFUNC(void)
+ capi.SetProcessingInstructionHandler = XML_SetProcessingInstructionHandler;
+ capi.SetUnknownEncodingHandler = XML_SetUnknownEncodingHandler;
+ capi.SetUserData = XML_SetUserData;
++#if XML_COMBINED_VERSION >= 20100
++ capi.SetHashSalt = XML_SetHashSalt;
++#else
++ capi.SetHashSalt = NULL;
++#endif
+
+ /* export using capsule */
+ capi_object = PyCapsule_New(&capi, PyExpat_CAPSULE_NAME, NULL);
+--
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/python/python/0001-closes-bpo-34540-Convert-shutil._call_external_zip-t.patch b/poky/meta/recipes-devtools/python/python/0001-closes-bpo-34540-Convert-shutil._call_external_zip-t.patch
new file mode 100644
index 000000000..e6fe5f2cc
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python/0001-closes-bpo-34540-Convert-shutil._call_external_zip-t.patch
@@ -0,0 +1,69 @@
+From c7e692c61dc091d07dee573f5f424b6b427ff056 Mon Sep 17 00:00:00 2001
+From: Benjamin Peterson <benjamin@python.org>
+Date: Wed, 29 Aug 2018 21:59:21 -0700
+Subject: [PATCH] closes bpo-34540: Convert shutil._call_external_zip to use
+ subprocess rather than distutils.spawn. (GH-8985)
+
+Upstream-Status: Backport
+
+Fix CVE-2018-1000802
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ Lib/shutil.py | 16 ++++++++++------
+ .../Security/2018-08-28-22-11-54.bpo-34540.gfQ0TM.rst | 3 +++
+ 2 files changed, 13 insertions(+), 6 deletions(-)
+ create mode 100644 Misc/NEWS.d/next/Security/2018-08-28-22-11-54.bpo-34540.gfQ0TM.rst
+
+diff --git a/Lib/shutil.py b/Lib/shutil.py
+index 3462f7c..0ab1a06 100644
+--- a/Lib/shutil.py
++++ b/Lib/shutil.py
+@@ -413,17 +413,21 @@ def _make_tarball(base_name, base_dir, compress="gzip", verbose=0, dry_run=0,
+
+ return archive_name
+
+-def _call_external_zip(base_dir, zip_filename, verbose=False, dry_run=False):
++def _call_external_zip(base_dir, zip_filename, verbose, dry_run, logger):
+ # XXX see if we want to keep an external call here
+ if verbose:
+ zipoptions = "-r"
+ else:
+ zipoptions = "-rq"
+- from distutils.errors import DistutilsExecError
+- from distutils.spawn import spawn
++ cmd = ["zip", zipoptions, zip_filename, base_dir]
++ if logger is not None:
++ logger.info(' '.join(cmd))
++ if dry_run:
++ return
++ import subprocess
+ try:
+- spawn(["zip", zipoptions, zip_filename, base_dir], dry_run=dry_run)
+- except DistutilsExecError:
++ subprocess.check_call(cmd)
++ except subprocess.CalledProcessError:
+ # XXX really should distinguish between "couldn't find
+ # external 'zip' command" and "zip failed".
+ raise ExecError, \
+@@ -458,7 +462,7 @@ def _make_zipfile(base_name, base_dir, verbose=0, dry_run=0, logger=None):
+ zipfile = None
+
+ if zipfile is None:
+- _call_external_zip(base_dir, zip_filename, verbose, dry_run)
++ _call_external_zip(base_dir, zip_filename, verbose, dry_run, logger)
+ else:
+ if logger is not None:
+ logger.info("creating '%s' and adding '%s' to it",
+diff --git a/Misc/NEWS.d/next/Security/2018-08-28-22-11-54.bpo-34540.gfQ0TM.rst b/Misc/NEWS.d/next/Security/2018-08-28-22-11-54.bpo-34540.gfQ0TM.rst
+new file mode 100644
+index 0000000..4f68696
+--- /dev/null
++++ b/Misc/NEWS.d/next/Security/2018-08-28-22-11-54.bpo-34540.gfQ0TM.rst
+@@ -0,0 +1,3 @@
++When ``shutil.make_archive`` falls back to the external ``zip`` problem, it
++uses :mod:`subprocess` to invoke it rather than :mod:`distutils.spawn`. This
++closes a possible shell injection vector.
+--
+2.7.4
+
diff --git a/poky/meta/recipes-devtools/python/python/CVE-2018-1000030-1.patch b/poky/meta/recipes-devtools/python/python/CVE-2018-1000030-1.patch
deleted file mode 100644
index 06ad4c695..000000000
--- a/poky/meta/recipes-devtools/python/python/CVE-2018-1000030-1.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From 6401e5671781eb217ee1afb4603cc0d1b0367ae6 Mon Sep 17 00:00:00 2001
-From: Serhiy Storchaka <storchaka@gmail.com>
-Date: Fri, 10 Nov 2017 12:58:55 +0200
-Subject: [PATCH] [2.7] bpo-31530: Stop crashes when iterating over a file on
- multiple threads. (#3672)
-
-CVE: CVE-2018-1000030
-Upstream-Status: Backport [https://github.com/python/cpython/commit/6401e5671781eb217ee1afb4603cc0d1b0367ae6]
-
-Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
----
- Lib/test/test_file2k.py | 32 ++++++++++++++++++++++
- .../2017-09-20-18-28-09.bpo-31530.CdLOM7.rst | 4 +++
- Objects/fileobject.c | 19 +++++++++++--
- 3 files changed, 52 insertions(+), 3 deletions(-)
- create mode 100644 Misc/NEWS.d/next/Core and Builtins/2017-09-20-18-28-09.bpo-31530.CdLOM7.rst
-
-diff --git a/Lib/test/test_file2k.py b/Lib/test/test_file2k.py
-index e39ef7042e..d8966e034e 100644
---- a/Lib/test/test_file2k.py
-+++ b/Lib/test/test_file2k.py
-@@ -652,6 +652,38 @@ class FileThreadingTests(unittest.TestCase):
- self.f.writelines('')
- self._test_close_open_io(io_func)
-
-+ def test_iteration_torture(self):
-+ # bpo-31530: Crash when concurrently iterate over a file.
-+ with open(self.filename, "wb") as fp:
-+ for i in xrange(2**20):
-+ fp.write(b"0"*50 + b"\n")
-+ with open(self.filename, "rb") as f:
-+ def iterate():
-+ try:
-+ for l in f:
-+ pass
-+ except IOError:
-+ pass
-+ self._run_workers(iterate, 10)
-+
-+ def test_iteration_seek(self):
-+ # bpo-31530: Crash when concurrently seek and iterate over a file.
-+ with open(self.filename, "wb") as fp:
-+ for i in xrange(10000):
-+ fp.write(b"0"*50 + b"\n")
-+ with open(self.filename, "rb") as f:
-+ it = iter([1] + [0]*10) # one thread reads, others seek
-+ def iterate():
-+ try:
-+ if next(it):
-+ for l in f:
-+ pass
-+ else:
-+ for i in range(100):
-+ f.seek(i*100, 0)
-+ except IOError:
-+ pass
-+ self._run_workers(iterate, 10)
-
- @unittest.skipUnless(os.name == 'posix', 'test requires a posix system.')
- class TestFileSignalEINTR(unittest.TestCase):
-diff --git a/Misc/NEWS.d/next/Core and Builtins/2017-09-20-18-28-09.bpo-31530.CdLOM7.rst b/Misc/NEWS.d/next/Core and Builtins/2017-09-20-18-28-09.bpo-31530.CdLOM7.rst
-new file mode 100644
-index 0000000000..a6cb6c9e9b
---- /dev/null
-+++ b/Misc/NEWS.d/next/Core and Builtins/2017-09-20-18-28-09.bpo-31530.CdLOM7.rst
-@@ -0,0 +1,4 @@
-+Fixed crashes when iterating over a file on multiple threads.
-+seek() and next() methods of file objects now raise an exception during
-+concurrent operation on the same file object.
-+A lock can be used to prevent the error.
-diff --git a/Objects/fileobject.c b/Objects/fileobject.c
-index 7e07a5376f..2f63c374d1 100644
---- a/Objects/fileobject.c
-+++ b/Objects/fileobject.c
-@@ -430,7 +430,7 @@ close_the_file(PyFileObject *f)
- if (f->ob_refcnt > 0) {
- PyErr_SetString(PyExc_IOError,
- "close() called during concurrent "
-- "operation on the same file object.");
-+ "operation on the same file object");
- } else {
- /* This should not happen unless someone is
- * carelessly playing with the PyFileObject
-@@ -438,7 +438,7 @@ close_the_file(PyFileObject *f)
- * pointer. */
- PyErr_SetString(PyExc_SystemError,
- "PyFileObject locking error in "
-- "destructor (refcnt <= 0 at close).");
-+ "destructor (refcnt <= 0 at close)");
- }
- return NULL;
- }
-@@ -762,6 +762,12 @@ file_seek(PyFileObject *f, PyObject *args)
-
- if (f->f_fp == NULL)
- return err_closed();
-+ if (f->unlocked_count > 0) {
-+ PyErr_SetString(PyExc_IOError,
-+ "seek() called during concurrent "
-+ "operation on the same file object");
-+ return NULL;
-+ }
- drop_readahead(f);
- whence = 0;
- if (!PyArg_ParseTuple(args, "O|i:seek", &offobj, &whence))
-@@ -2238,6 +2244,7 @@ readahead(PyFileObject *f, Py_ssize_t bufsize)
- {
- Py_ssize_t chunksize;
-
-+ assert(f->unlocked_count == 0);
- if (f->f_buf != NULL) {
- if( (f->f_bufend - f->f_bufptr) >= 1)
- return 0;
-@@ -2279,6 +2286,12 @@ readahead_get_line_skip(PyFileObject *f, Py_ssize_t skip, Py_ssize_t bufsize)
- char *buf;
- Py_ssize_t len;
-
-+ if (f->unlocked_count > 0) {
-+ PyErr_SetString(PyExc_IOError,
-+ "next() called during concurrent "
-+ "operation on the same file object");
-+ return NULL;
-+ }
- if (f->f_buf == NULL)
- if (readahead(f, bufsize) < 0)
- return NULL;
-@@ -2692,7 +2705,7 @@ int PyObject_AsFileDescriptor(PyObject *o)
- }
- else {
- PyErr_SetString(PyExc_TypeError,
-- "argument must be an int, or have a fileno() method.");
-+ "argument must be an int, or have a fileno() method");
- return -1;
- }
-
---
-2.13.3
-
diff --git a/poky/meta/recipes-devtools/python/python/CVE-2018-1000030-2.patch b/poky/meta/recipes-devtools/python/python/CVE-2018-1000030-2.patch
deleted file mode 100644
index 9b7713be8..000000000
--- a/poky/meta/recipes-devtools/python/python/CVE-2018-1000030-2.patch
+++ /dev/null
@@ -1,306 +0,0 @@
-From dbf52e02f18dac6f5f0a64f78932f3dc6efc056b Mon Sep 17 00:00:00 2001
-From: Benjamin Peterson <benjamin@python.org>
-Date: Tue, 2 Jan 2018 09:25:41 -0800
-Subject: [PATCH] bpo-31530: fix crash when multiple threads iterate over a
- file, round 2 (#5060)
-
-Multiple threads iterating over a file can corrupt the file's internal readahead
-buffer resulting in crashes. To fix this, cache buffer state thread-locally for
-the duration of a file_iternext call and only update the file's internal state
-after reading completes.
-
-No attempt is made to define or provide "reasonable" semantics for iterating
-over a file on multiple threads. (Non-crashing) races are still
-present. Duplicated, corrupt, and missing data will happen.
-
-This was originally fixed by 6401e5671781eb217ee1afb4603cc0d1b0367ae6, which
-raised an exception from seek() and next() when concurrent operations were
-detected. Alas, this simpler solution breaks legitimate use cases such as
-capturing the standard streams when multiple threads are logging.
-
-CVE: CVE-2018-1000030
-Upstream-Status: Backport [https://github.com/python/cpython/commit/dbf52e02f18dac6f5f0a64f78932f3dc6efc056b]
-
-Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
-
----
- Lib/test/test_file2k.py | 27 ++---
- .../2017-09-20-18-28-09.bpo-31530.CdLOM7.rst | 3 -
- Objects/fileobject.c | 118 ++++++++++++---------
- 3 files changed, 78 insertions(+), 70 deletions(-)
-
-diff --git a/Lib/test/test_file2k.py b/Lib/test/test_file2k.py
-index d8966e034e..c73e8d8dc4 100644
---- a/Lib/test/test_file2k.py
-+++ b/Lib/test/test_file2k.py
-@@ -653,18 +653,15 @@ class FileThreadingTests(unittest.TestCase):
- self._test_close_open_io(io_func)
-
- def test_iteration_torture(self):
-- # bpo-31530: Crash when concurrently iterate over a file.
-+ # bpo-31530
- with open(self.filename, "wb") as fp:
- for i in xrange(2**20):
- fp.write(b"0"*50 + b"\n")
- with open(self.filename, "rb") as f:
-- def iterate():
-- try:
-- for l in f:
-- pass
-- except IOError:
-+ def it():
-+ for l in f:
- pass
-- self._run_workers(iterate, 10)
-+ self._run_workers(it, 10)
-
- def test_iteration_seek(self):
- # bpo-31530: Crash when concurrently seek and iterate over a file.
-@@ -674,17 +671,15 @@ class FileThreadingTests(unittest.TestCase):
- with open(self.filename, "rb") as f:
- it = iter([1] + [0]*10) # one thread reads, others seek
- def iterate():
-- try:
-- if next(it):
-- for l in f:
-- pass
-- else:
-- for i in range(100):
-- f.seek(i*100, 0)
-- except IOError:
-- pass
-+ if next(it):
-+ for l in f:
-+ pass
-+ else:
-+ for i in xrange(100):
-+ f.seek(i*100, 0)
- self._run_workers(iterate, 10)
-
-+
- @unittest.skipUnless(os.name == 'posix', 'test requires a posix system.')
- class TestFileSignalEINTR(unittest.TestCase):
- def _test_reading(self, data_to_write, read_and_verify_code, method_name,
-diff --git a/Misc/NEWS.d/next/Core and Builtins/2017-09-20-18-28-09.bpo-31530.CdLOM7.rst b/Misc/NEWS.d/next/Core and Builtins/2017-09-20-18-28-09.bpo-31530.CdLOM7.rst
-index a6cb6c9e9b..beb09b5ae6 100644
---- a/Misc/NEWS.d/next/Core and Builtins/2017-09-20-18-28-09.bpo-31530.CdLOM7.rst
-+++ b/Misc/NEWS.d/next/Core and Builtins/2017-09-20-18-28-09.bpo-31530.CdLOM7.rst
-@@ -1,4 +1 @@
- Fixed crashes when iterating over a file on multiple threads.
--seek() and next() methods of file objects now raise an exception during
--concurrent operation on the same file object.
--A lock can be used to prevent the error.
-diff --git a/Objects/fileobject.c b/Objects/fileobject.c
-index 8d1c5812f0..270b28264a 100644
---- a/Objects/fileobject.c
-+++ b/Objects/fileobject.c
-@@ -609,7 +609,12 @@ err_iterbuffered(void)
- return NULL;
- }
-
--static void drop_readahead(PyFileObject *);
-+static void
-+drop_file_readahead(PyFileObject *f)
-+{
-+ PyMem_FREE(f->f_buf);
-+ f->f_buf = NULL;
-+}
-
- /* Methods */
-
-@@ -632,7 +637,7 @@ file_dealloc(PyFileObject *f)
- Py_XDECREF(f->f_mode);
- Py_XDECREF(f->f_encoding);
- Py_XDECREF(f->f_errors);
-- drop_readahead(f);
-+ drop_file_readahead(f);
- Py_TYPE(f)->tp_free((PyObject *)f);
- }
-
-@@ -767,13 +772,7 @@ file_seek(PyFileObject *f, PyObject *args)
-
- if (f->f_fp == NULL)
- return err_closed();
-- if (f->unlocked_count > 0) {
-- PyErr_SetString(PyExc_IOError,
-- "seek() called during concurrent "
-- "operation on the same file object");
-- return NULL;
-- }
-- drop_readahead(f);
-+ drop_file_readahead(f);
- whence = 0;
- if (!PyArg_ParseTuple(args, "O|i:seek", &offobj, &whence))
- return NULL;
-@@ -2242,12 +2241,16 @@ static PyGetSetDef file_getsetlist[] = {
- {0},
- };
-
-+typedef struct {
-+ char *buf, *bufptr, *bufend;
-+} readaheadbuffer;
-+
- static void
--drop_readahead(PyFileObject *f)
-+drop_readaheadbuffer(readaheadbuffer *rab)
- {
-- if (f->f_buf != NULL) {
-- PyMem_Free(f->f_buf);
-- f->f_buf = NULL;
-+ if (rab->buf != NULL) {
-+ PyMem_FREE(rab->buf);
-+ rab->buf = NULL;
- }
- }
-
-@@ -2255,36 +2258,34 @@ drop_readahead(PyFileObject *f)
- (unless at EOF) and no more than bufsize. Returns negative value on
- error, will set MemoryError if bufsize bytes cannot be allocated. */
- static int
--readahead(PyFileObject *f, Py_ssize_t bufsize)
-+readahead(PyFileObject *f, readaheadbuffer *rab, Py_ssize_t bufsize)
- {
- Py_ssize_t chunksize;
-
-- assert(f->unlocked_count == 0);
-- if (f->f_buf != NULL) {
-- if( (f->f_bufend - f->f_bufptr) >= 1)
-+ if (rab->buf != NULL) {
-+ if ((rab->bufend - rab->bufptr) >= 1)
- return 0;
- else
-- drop_readahead(f);
-+ drop_readaheadbuffer(rab);
- }
-- if ((f->f_buf = (char *)PyMem_Malloc(bufsize)) == NULL) {
-+ if ((rab->buf = PyMem_MALLOC(bufsize)) == NULL) {
- PyErr_NoMemory();
- return -1;
- }
- FILE_BEGIN_ALLOW_THREADS(f)
- errno = 0;
-- chunksize = Py_UniversalNewlineFread(
-- f->f_buf, bufsize, f->f_fp, (PyObject *)f);
-+ chunksize = Py_UniversalNewlineFread(rab->buf, bufsize, f->f_fp, (PyObject *)f);
- FILE_END_ALLOW_THREADS(f)
- if (chunksize == 0) {
- if (ferror(f->f_fp)) {
- PyErr_SetFromErrno(PyExc_IOError);
- clearerr(f->f_fp);
-- drop_readahead(f);
-+ drop_readaheadbuffer(rab);
- return -1;
- }
- }
-- f->f_bufptr = f->f_buf;
-- f->f_bufend = f->f_buf + chunksize;
-+ rab->bufptr = rab->buf;
-+ rab->bufend = rab->buf + chunksize;
- return 0;
- }
-
-@@ -2294,51 +2295,43 @@ readahead(PyFileObject *f, Py_ssize_t bufsize)
- logarithmic buffer growth to about 50 even when reading a 1gb line. */
-
- static PyStringObject *
--readahead_get_line_skip(PyFileObject *f, Py_ssize_t skip, Py_ssize_t bufsize)
-+readahead_get_line_skip(PyFileObject *f, readaheadbuffer *rab, Py_ssize_t skip, Py_ssize_t bufsize)
- {
- PyStringObject* s;
- char *bufptr;
- char *buf;
- Py_ssize_t len;
-
-- if (f->unlocked_count > 0) {
-- PyErr_SetString(PyExc_IOError,
-- "next() called during concurrent "
-- "operation on the same file object");
-- return NULL;
-- }
-- if (f->f_buf == NULL)
-- if (readahead(f, bufsize) < 0)
-+ if (rab->buf == NULL)
-+ if (readahead(f, rab, bufsize) < 0)
- return NULL;
-
-- len = f->f_bufend - f->f_bufptr;
-+ len = rab->bufend - rab->bufptr;
- if (len == 0)
-- return (PyStringObject *)
-- PyString_FromStringAndSize(NULL, skip);
-- bufptr = (char *)memchr(f->f_bufptr, '\n', len);
-+ return (PyStringObject *)PyString_FromStringAndSize(NULL, skip);
-+ bufptr = (char *)memchr(rab->bufptr, '\n', len);
- if (bufptr != NULL) {
- bufptr++; /* Count the '\n' */
-- len = bufptr - f->f_bufptr;
-- s = (PyStringObject *)
-- PyString_FromStringAndSize(NULL, skip + len);
-+ len = bufptr - rab->bufptr;
-+ s = (PyStringObject *)PyString_FromStringAndSize(NULL, skip + len);
- if (s == NULL)
- return NULL;
-- memcpy(PyString_AS_STRING(s) + skip, f->f_bufptr, len);
-- f->f_bufptr = bufptr;
-- if (bufptr == f->f_bufend)
-- drop_readahead(f);
-+ memcpy(PyString_AS_STRING(s) + skip, rab->bufptr, len);
-+ rab->bufptr = bufptr;
-+ if (bufptr == rab->bufend)
-+ drop_readaheadbuffer(rab);
- } else {
-- bufptr = f->f_bufptr;
-- buf = f->f_buf;
-- f->f_buf = NULL; /* Force new readahead buffer */
-+ bufptr = rab->bufptr;
-+ buf = rab->buf;
-+ rab->buf = NULL; /* Force new readahead buffer */
- assert(len <= PY_SSIZE_T_MAX - skip);
-- s = readahead_get_line_skip(f, skip + len, bufsize + (bufsize>>2));
-+ s = readahead_get_line_skip(f, rab, skip + len, bufsize + (bufsize>>2));
- if (s == NULL) {
-- PyMem_Free(buf);
-+ PyMem_FREE(buf);
- return NULL;
- }
- memcpy(PyString_AS_STRING(s) + skip, bufptr, len);
-- PyMem_Free(buf);
-+ PyMem_FREE(buf);
- }
- return s;
- }
-@@ -2356,7 +2349,30 @@ file_iternext(PyFileObject *f)
- if (!f->readable)
- return err_mode("reading");
-
-- l = readahead_get_line_skip(f, 0, READAHEAD_BUFSIZE);
-+ {
-+ /*
-+ Multiple threads can enter this method while the GIL is released
-+ during file read and wreak havoc on the file object's readahead
-+ buffer. To avoid dealing with cross-thread coordination issues, we
-+ cache the file buffer state locally and only set it back on the file
-+ object when we're done.
-+ */
-+ readaheadbuffer rab = {f->f_buf, f->f_bufptr, f->f_bufend};
-+ f->f_buf = NULL;
-+ l = readahead_get_line_skip(f, &rab, 0, READAHEAD_BUFSIZE);
-+ /*
-+ Make sure the file's internal read buffer is cleared out. This will
-+ only do anything if some other thread interleaved with us during
-+ readahead. We want to drop any changeling buffer, so we don't leak
-+ memory. We may lose data, but that's what you get for reading the same
-+ file object in multiple threads.
-+ */
-+ drop_file_readahead(f);
-+ f->f_buf = rab.buf;
-+ f->f_bufptr = rab.bufptr;
-+ f->f_bufend = rab.bufend;
-+ }
-+
- if (l == NULL || PyString_GET_SIZE(l) == 0) {
- Py_XDECREF(l);
- return NULL;
---
-2.13.3
-
diff --git a/poky/meta/recipes-devtools/python/python/fix-gc-alignment.patch b/poky/meta/recipes-devtools/python/python/fix-gc-alignment.patch
deleted file mode 100644
index b63cd0874..000000000
--- a/poky/meta/recipes-devtools/python/python/fix-gc-alignment.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Upstream-Status: Submitted
-Signed-off-by: Ross Burton <ross.burton@intel.com>
-
-Fix for over-aligned GC info
-Patch by Florian Weimer
-
-See: https://bugzilla.redhat.com/show_bug.cgi?id=1540316
-Upstream discussion: https://mail.python.org/pipermail/python-dev/2018-January/152000.html
-
-diff --git a/Include/objimpl.h b/Include/objimpl.h
-index 55e83eced6..aa906144dc 100644
---- a/Include/objimpl.h
-+++ b/Include/objimpl.h
-@@ -248,6 +248,18 @@ PyAPI_FUNC(PyVarObject *) _PyObject_GC_Resize(PyVarObject *, Py_ssize_t);
- /* for source compatibility with 2.2 */
- #define _PyObject_GC_Del PyObject_GC_Del
-
-+/* Former over-aligned definition of PyGC_Head, used to compute the
-+ size of the padding for the new version below. */
-+union _gc_head;
-+union _gc_head_old {
-+ struct {
-+ union _gc_head *gc_next;
-+ union _gc_head *gc_prev;
-+ Py_ssize_t gc_refs;
-+ } gc;
-+ long double dummy;
-+};
-+
- /* GC information is stored BEFORE the object structure. */
- typedef union _gc_head {
- struct {
-@@ -255,7 +267,8 @@ typedef union _gc_head {
- union _gc_head *gc_prev;
- Py_ssize_t gc_refs;
- } gc;
-- long double dummy; /* force worst-case alignment */
-+ double dummy; /* force worst-case alignment */
-+ char dummy_padding[sizeof(union _gc_head_old)];
- } PyGC_Head;
-
- extern PyGC_Head *_PyGC_generation0;
- \ No newline at end of file
diff --git a/poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch b/poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
deleted file mode 100644
index 60d782cd2..000000000
--- a/poky/meta/recipes-devtools/python/python/fix-makefile-for-ptest.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-Add 'build-test' and 'runtest-TESTS' targets to Makefile, to build and run tests
-cross-compiled.
-
-Signed-off-by: Tudor Florea <tudor.florea@enea.com>
-Upstream-Status: Pending
----
-Index: Python-2.7.14/Makefile.pre.in
-===================================================================
---- Python-2.7.14.orig/Makefile.pre.in
-+++ Python-2.7.14/Makefile.pre.in
-@@ -846,14 +846,19 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
-
- .PHONY: test testall testuniversal buildbottest pythoninfo
-
--TESTOPTS= -l $(EXTRATESTOPTS)
-+TESTOPTS= -l -v $(EXTRATESTOPTS)
- TESTPROG= $(srcdir)/Lib/test/regrtest.py
--TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
--test: @DEF_MAKE_RULE@ platform
-- -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
-+TESTPYTHON= $(RUNSHARED) $(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
-+test: build-test
-+ $(MAKE) runtest-TESTS
-+
-+runtest-TESTS:
-+ -find $(srcdir) -name '*.py[co]' -print | xargs rm -f
- -$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
- $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
-
-+build-test: @DEF_MAKE_RULE@ platform
-+
- testall: @DEF_MAKE_RULE@ platform
- -find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
- $(TESTPYTHON) $(srcdir)/Lib/compileall.py
diff --git a/poky/meta/recipes-devtools/python/python/float-endian.patch b/poky/meta/recipes-devtools/python/python/float-endian.patch
new file mode 100644
index 000000000..8a5c90aec
--- /dev/null
+++ b/poky/meta/recipes-devtools/python/python/float-endian.patch
@@ -0,0 +1,216 @@
+Python uses AC_RUN_IFELSE to determine the byte order for floats and doubles,
+and falls back onto "I don't know" if it can't run code. This results in
+crippled floating point numbers in Python, and the regression tests fail.
+
+Instead of running code, take a macro from autoconf-archive which compiles C
+with a special double in which has an ASCII representation, and then greps the
+binary to identify the format.
+
+Upstream-Status: Backport
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+From 253f47b28120c42cfe53a4e2f5ed0ab0ed469deb Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross@burtonini.com>
+Date: Wed, 19 Sep 2018 07:25:48 +0100
+Subject: [PATCH] closes bpo-34585: Don't do runtime test to get float byte
+ order. (GH-9085)
+
+Currently configure.ac uses AC_RUN_IFELSE to determine the byte order of doubles, but this silently fails under cross compilation and Python doesn't do floats properly.
+
+Instead, steal a macro from autoconf-archive which compiles code using magic doubles (which encode to ASCII) and grep for the representation in the binary.
+
+RFC because this doesn't yet handle the weird ancient ARMv4 OABI 'mixed-endian' encoding properly. This encoding is ancient and I don't believe the union of "Python 3.8 users" and "OABI users" has anything in. Should the support for this just be dropped too? Alternatively, someone will need to find an OABI toolchain to verify the encoding of the magic double.
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+---
+ .../Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst | 3 +
+ configure.ac | 76 ++++----------------
+ m4/ax_c_float_words_bigendian.m4 | 83 ++++++++++++++++++++++
+ 3 files changed, 99 insertions(+), 63 deletions(-)
+ create mode 100644 Misc/NEWS.d/next/Build/2018-09-18-16-28-31.bpo-34585.CGMu0h.rst
+ create mode 100644 m4/ax_c_float_words_bigendian.m4
+
+diff --git a/configure.ac b/configure.ac
+index 913d5469d0..7672735396 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -3835,74 +3835,24 @@ fi],
+ # * Check for various properties of floating point *
+ # **************************************************
+
+-AC_MSG_CHECKING(whether C doubles are little-endian IEEE 754 binary64)
+-AC_CACHE_VAL(ac_cv_little_endian_double, [
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-#include <string.h>
+-int main() {
+- double x = 9006104071832581.0;
+- if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
+- return 0;
+- else
+- return 1;
+-}
+-]])],
+-[ac_cv_little_endian_double=yes],
+-[ac_cv_little_endian_double=no],
+-[ac_cv_little_endian_double=no])])
+-AC_MSG_RESULT($ac_cv_little_endian_double)
+-if test "$ac_cv_little_endian_double" = yes
+-then
+- AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
+- [Define if C doubles are 64-bit IEEE 754 binary format, stored
+- with the least significant byte first])
+-fi
+-
+-AC_MSG_CHECKING(whether C doubles are big-endian IEEE 754 binary64)
+-AC_CACHE_VAL(ac_cv_big_endian_double, [
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-#include <string.h>
+-int main() {
+- double x = 9006104071832581.0;
+- if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
+- return 0;
+- else
+- return 1;
+-}
+-]])],
+-[ac_cv_big_endian_double=yes],
+-[ac_cv_big_endian_double=no],
+-[ac_cv_big_endian_double=no])])
+-AC_MSG_RESULT($ac_cv_big_endian_double)
+-if test "$ac_cv_big_endian_double" = yes
++AX_C_FLOAT_WORDS_BIGENDIAN
++if test "$ax_cv_c_float_words_bigendian" = "yes"
+ then
+ AC_DEFINE(DOUBLE_IS_BIG_ENDIAN_IEEE754, 1,
+ [Define if C doubles are 64-bit IEEE 754 binary format, stored
+ with the most significant byte first])
+-fi
+-
+-# Some ARM platforms use a mixed-endian representation for doubles.
+-# While Python doesn't currently have full support for these platforms
+-# (see e.g., issue 1762561), we can at least make sure that float <-> string
+-# conversions work.
+-AC_MSG_CHECKING(whether C doubles are ARM mixed-endian IEEE 754 binary64)
+-AC_CACHE_VAL(ac_cv_mixed_endian_double, [
+-AC_RUN_IFELSE([AC_LANG_SOURCE([[
+-#include <string.h>
+-int main() {
+- double x = 9006104071832581.0;
+- if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
+- return 0;
+- else
+- return 1;
+-}
+-]])],
+-[ac_cv_mixed_endian_double=yes],
+-[ac_cv_mixed_endian_double=no],
+-[ac_cv_mixed_endian_double=no])])
+-AC_MSG_RESULT($ac_cv_mixed_endian_double)
+-if test "$ac_cv_mixed_endian_double" = yes
++elif test "$ax_cv_c_float_words_bigendian" = "no"
+ then
++ AC_DEFINE(DOUBLE_IS_LITTLE_ENDIAN_IEEE754, 1,
++ [Define if C doubles are 64-bit IEEE 754 binary format, stored
++ with the least significant byte first])
++else
++ # Some ARM platforms use a mixed-endian representation for doubles.
++ # While Python doesn't currently have full support for these platforms
++ # (see e.g., issue 1762561), we can at least make sure that float <-> string
++ # conversions work.
++ # FLOAT_WORDS_BIGENDIAN doesnt actually detect this case, but if it's not big
++ # or little, then it must be this?
+ AC_DEFINE(DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754, 1,
+ [Define if C doubles are 64-bit IEEE 754 binary format, stored
+ in ARM mixed-endian order (byte order 45670123)])
+diff --git a/m4/ax_c_float_words_bigendian.m4 b/m4/ax_c_float_words_bigendian.m4
+new file mode 100644
+index 0000000000..216b90d803
+--- /dev/null
++++ b/m4/ax_c_float_words_bigendian.m4
+@@ -0,0 +1,83 @@
++# ===============================================================================
++# https://www.gnu.org/software/autoconf-archive/ax_c_float_words_bigendian.html
++# ===============================================================================
++#
++# SYNOPSIS
++#
++# AX_C_FLOAT_WORDS_BIGENDIAN([ACTION-IF-TRUE], [ACTION-IF-FALSE], [ACTION-IF-UNKNOWN])
++#
++# DESCRIPTION
++#
++# Checks the ordering of words within a multi-word float. This check is
++# necessary because on some systems (e.g. certain ARM systems), the float
++# word ordering can be different from the byte ordering. In a multi-word
++# float context, "big-endian" implies that the word containing the sign
++# bit is found in the memory location with the lowest address. This
++# implementation was inspired by the AC_C_BIGENDIAN macro in autoconf.
++#
++# The endianness is detected by first compiling C code that contains a
++# special double float value, then grepping the resulting object file for
++# certain strings of ASCII values. The double is specially crafted to have
++# a binary representation that corresponds with a simple string. In this
++# implementation, the string "noonsees" was selected because the
++# individual word values ("noon" and "sees") are palindromes, thus making
++# this test byte-order agnostic. If grep finds the string "noonsees" in
++# the object file, the target platform stores float words in big-endian
++# order. If grep finds "seesnoon", float words are in little-endian order.
++# If neither value is found, the user is instructed to specify the
++# ordering.
++#
++# LICENSE
++#
++# Copyright (c) 2008 Daniel Amelang <dan@amelang.net>
++#
++# Copying and distribution of this file, with or without modification, are
++# permitted in any medium without royalty provided the copyright notice
++# and this notice are preserved. This file is offered as-is, without any
++# warranty.
++
++#serial 11
++
++AC_DEFUN([AX_C_FLOAT_WORDS_BIGENDIAN],
++ [AC_CACHE_CHECK(whether float word ordering is bigendian,
++ ax_cv_c_float_words_bigendian, [
++
++ax_cv_c_float_words_bigendian=unknown
++AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
++
++double d = 90904234967036810337470478905505011476211692735615632014797120844053488865816695273723469097858056257517020191247487429516932130503560650002327564517570778480236724525140520121371739201496540132640109977779420565776568942592.0;
++
++]])], [
++
++if grep noonsees conftest.$ac_objext >/dev/null ; then
++ ax_cv_c_float_words_bigendian=yes
++fi
++if grep seesnoon conftest.$ac_objext >/dev/null ; then
++ if test "$ax_cv_c_float_words_bigendian" = unknown; then
++ ax_cv_c_float_words_bigendian=no
++ else
++ ax_cv_c_float_words_bigendian=unknown
++ fi
++fi
++
++])])
++
++case $ax_cv_c_float_words_bigendian in
++ yes)
++ m4_default([$1],
++ [AC_DEFINE([FLOAT_WORDS_BIGENDIAN], 1,
++ [Define to 1 if your system stores words within floats
++ with the most significant word first])]) ;;
++ no)
++ $2 ;;
++ *)
++ m4_default([$3],
++ [AC_MSG_ERROR([
++
++Unknown float word ordering. You need to manually preset
++ax_cv_c_float_words_bigendian=no (or yes) according to your system.
++
++ ])]) ;;
++esac
++
++])# AX_C_FLOAT_WORDS_BIGENDIAN
+--
+2.11.0
+
diff --git a/poky/meta/recipes-devtools/python/python/run-ptest b/poky/meta/recipes-devtools/python/python/run-ptest
index a2f9eed44..832551a12 100644
--- a/poky/meta/recipes-devtools/python/python/run-ptest
+++ b/poky/meta/recipes-devtools/python/python/run-ptest
@@ -1,5 +1,3 @@
#!/bin/sh
-#
-#This script is used to run python test suites
-make -f LIBDIR/python/ptest/Makefile -k runtest-TESTS srcdir=LIBDIR/python2.7 TESTPROG=LIBDIR/python2.7/test/regrtest.py | sed -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
+python -m test.regrtest -v | sed -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g'
diff --git a/poky/meta/recipes-devtools/python/python_2.7.14.bb b/poky/meta/recipes-devtools/python/python_2.7.15.bb
index ea54fb9e7..0b3958d41 100644
--- a/poky/meta/recipes-devtools/python/python_2.7.14.bb
+++ b/poky/meta/recipes-devtools/python/python_2.7.15.bb
@@ -23,19 +23,20 @@ SRC_URI += "\
file://avoid_warning_about_tkinter.patch \
file://avoid_warning_for_sunos_specific_module.patch \
file://python-2.7.3-remove-bsdb-rpath.patch \
- file://fix-makefile-for-ptest.patch \
file://run-ptest \
file://parallel-makeinst-create-bindir.patch \
file://use_sysroot_ncurses_instead_of_host.patch \
file://add-CROSSPYTHONPATH-for-PYTHON_FOR_BUILD.patch \
file://pass-missing-libraries-to-Extension-for-mul.patch \
file://support_SOURCE_DATE_EPOCH_in_py_compile_2.7.patch \
- file://fix-gc-alignment.patch \
+ file://float-endian.patch \
+ file://0001-closes-bpo-34540-Convert-shutil._call_external_zip-t.patch \
+ file://0001-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch \
"
S = "${WORKDIR}/Python-${PV}"
-inherit autotools multilib_header python-dir pythonnative
+inherit autotools multilib_header python-dir pythonnative ptest
CONFIGUREOPTS += " --with-system-ffi "
@@ -168,27 +169,7 @@ FILES_${PN}-misc = "${libdir}/python${PYTHON_MAJMIN}"
RDEPENDS_${PN}-modules += "${PN}-misc"
# ptest
-RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests"
-#inherit ptest after "require python-${PYTHON_MAJMIN}-manifest.inc" so PACKAGES doesn't get overwritten
-inherit ptest
-
-# This must come after inherit ptest for the override to take effect
-do_install_ptest() {
- cp ${B}/Makefile ${D}${PTEST_PATH}
- sed -e s:LIBDIR/python/ptest:${PTEST_PATH}:g \
- -e s:LIBDIR:${libdir}:g \
- -i ${D}${PTEST_PATH}/run-ptest
-
- #Remove build host references
- sed -i \
- -e 's:--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
- -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
- -e 's|${DEBUG_PREFIX_MAP}||g' \
- -e 's:${HOSTTOOLS_DIR}/::g' \
- -e 's:${RECIPE_SYSROOT}::g' \
- -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
- ${D}/${PTEST_PATH}/Makefile
-}
+RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip"
# catch manpage
PACKAGES += "${PN}-man"