d/p/big-endian.patch: Cherry pick fix from upstream VCS to resolve issues on big endian architectures.
This commit is contained in:
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -2,6 +2,8 @@ python-pyeclib (1.0.8-3) UNRELEASED; urgency=medium
|
|||||||
|
|
||||||
* Drop BD's on gf-complete and jerasure dev packages; not required
|
* Drop BD's on gf-complete and jerasure dev packages; not required
|
||||||
due to the runtime nature of backend loading in liberasurecode.
|
due to the runtime nature of backend loading in liberasurecode.
|
||||||
|
* d/p/big-endian.patch: Cherry pick fix from upstream VCS to resolve
|
||||||
|
issues on big endian architectures.
|
||||||
|
|
||||||
-- James Page <james.page@ubuntu.com> Wed, 09 Sep 2015 13:24:15 +0100
|
-- James Page <james.page@ubuntu.com> Wed, 09 Sep 2015 13:24:15 +0100
|
||||||
|
|
||||||
|
|||||||
54
debian/patches/big-endian.patch
vendored
Normal file
54
debian/patches/big-endian.patch
vendored
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
From 8c825a8e2a39beefc4a73116f381de45e3615638 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kevin Greenan <kmg@box.com>
|
||||||
|
Date: Tue, 11 Aug 2015 09:32:12 -0700
|
||||||
|
Subject: [PATCH] Fix integer truncation issue with PyBuildValue on Big Endian
|
||||||
|
systems by explicitly casting the size argument passed in to Py_ssize_t.
|
||||||
|
|
||||||
|
Also fix import issue with the API test where older versions of Python fail to
|
||||||
|
import.
|
||||||
|
---
|
||||||
|
src/c/pyeclib_c/pyeclib_c.c | 4 ++--
|
||||||
|
test/test_pyeclib_api.py | 5 ++++-
|
||||||
|
2 files changed, 6 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/c/pyeclib_c/pyeclib_c.c b/src/c/pyeclib_c/pyeclib_c.c
|
||||||
|
index 6ba83a9..e2d98c3 100644
|
||||||
|
--- a/src/c/pyeclib_c/pyeclib_c.c
|
||||||
|
+++ b/src/c/pyeclib_c/pyeclib_c.c
|
||||||
|
@@ -46,7 +46,7 @@
|
||||||
|
PyModuleDef_HEAD_INIT, name, doc, -1, methods, }; \
|
||||||
|
ob = PyModule_Create(&moduledef);
|
||||||
|
#define PY_BUILDVALUE_OBJ_LEN(obj, objlen) \
|
||||||
|
- Py_BuildValue("y#", obj, objlen)
|
||||||
|
+ Py_BuildValue("y#", obj, (Py_ssize_t)objlen)
|
||||||
|
#define PyInt_FromLong PyLong_FromLong
|
||||||
|
#define PyString_FromString PyUnicode_FromString
|
||||||
|
#define ENCODE_ARGS "Oy#"
|
||||||
|
@@ -58,7 +58,7 @@
|
||||||
|
#define MOD_DEF(ob, name, doc, methods) \
|
||||||
|
ob = Py_InitModule3(name, methods, doc);
|
||||||
|
#define PY_BUILDVALUE_OBJ_LEN(obj, objlen) \
|
||||||
|
- Py_BuildValue("s#", obj, objlen)
|
||||||
|
+ Py_BuildValue("s#", obj, (Py_ssize_t)objlen)
|
||||||
|
#define ENCODE_ARGS "Os#"
|
||||||
|
#define GET_METADATA_ARGS "Os#i"
|
||||||
|
#endif
|
||||||
|
diff --git a/test/test_pyeclib_api.py b/test/test_pyeclib_api.py
|
||||||
|
index 45d7d5b..78c482e 100644
|
||||||
|
--- a/test/test_pyeclib_api.py
|
||||||
|
+++ b/test/test_pyeclib_api.py
|
||||||
|
@@ -31,7 +31,10 @@ from pyeclib.ec_iface import ECDriverError
|
||||||
|
from pyeclib.ec_iface import ECInsufficientFragments
|
||||||
|
|
||||||
|
from pyeclib.ec_iface import ECDriver, PyECLib_EC_Types
|
||||||
|
-from .test_pyeclib_c import _available_backends
|
||||||
|
+if sys.version < '3':
|
||||||
|
+ from test_pyeclib_c import _available_backends
|
||||||
|
+else:
|
||||||
|
+ from .test_pyeclib_c import _available_backends
|
||||||
|
|
||||||
|
if sys.version < '3':
|
||||||
|
def b2i(b):
|
||||||
|
--
|
||||||
|
2.1.1
|
||||||
|
|
||||||
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@@ -1,3 +1,4 @@
|
|||||||
disable-check-for-liberasure-code.patch
|
disable-check-for-liberasure-code.patch
|
||||||
remove-rpath-tweak.patch
|
remove-rpath-tweak.patch
|
||||||
more-rpath-tweak-removal.patch
|
more-rpath-tweak-removal.patch
|
||||||
|
big-endian.patch
|
||||||
|
|||||||
Reference in New Issue
Block a user