From f58b90d043ca0d4e4469d8cdbd1f983cfa8f7b7c1631cf12671157f4b74ed223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Fri, 20 Jul 2012 11:17:00 +0000 Subject: [PATCH] Accepting request 127048 from home:k0da:ppc - Fix failing test_dbm on ppc64 - Fix failing test_dbm on ppc64 OBS-URL: https://build.opensuse.org/request/show/127048 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:Factory/python?expand=0&rev=123 --- python-2.7.3-fix-dbm-64bit-bigendian.patch | 25 ++++++++++++++++++++++ python-base.changes | 5 +++++ python-base.spec | 2 ++ python-doc.spec | 2 ++ python.changes | 5 +++++ python.spec | 2 ++ 6 files changed, 41 insertions(+) create mode 100644 python-2.7.3-fix-dbm-64bit-bigendian.patch diff --git a/python-2.7.3-fix-dbm-64bit-bigendian.patch b/python-2.7.3-fix-dbm-64bit-bigendian.patch new file mode 100644 index 0000000..1583823 --- /dev/null +++ b/python-2.7.3-fix-dbm-64bit-bigendian.patch @@ -0,0 +1,25 @@ +Index: Python-2.7.3/Modules/dbmmodule.c +=================================================================== +--- Python-2.7.3.orig/Modules/dbmmodule.c ++++ Python-2.7.3/Modules/dbmmodule.c +@@ -168,12 +168,18 @@ static int + dbm_contains(register dbmobject *dp, PyObject *v) + { + datum key, val; ++ Py_ssize_t dsize; + +- if (PyString_AsStringAndSize(v, (char **)&key.dptr, +- (Py_ssize_t *)&key.dsize)) { ++ if (PyString_AsStringAndSize(v, (char **)&key.dptr, &dsize)) { + return -1; + } + ++ /* Coerce from Py_ssize_t down to int: */ ++ if (dsize > INT_MAX) { ++ return -1; ++ } ++ key.dsize = dsize; ++ + /* Expand check_dbmobject_open to return -1 */ + if (dp->di_dbm == NULL) { + PyErr_SetString(DbmError, "DBM object has already been closed"); diff --git a/python-base.changes b/python-base.changes index 017bd72..861cf01 100644 --- a/python-base.changes +++ b/python-base.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 26 11:54:22 UTC 2012 - dvaleev@suse.com + +- Fix failing test_dbm on ppc64 + ------------------------------------------------------------------- Thu May 17 17:49:31 UTC 2012 - jfunk@funktronics.ca diff --git a/python-base.spec b/python-base.spec index 0788801..fcea7b6 100644 --- a/python-base.spec +++ b/python-base.spec @@ -50,6 +50,7 @@ Patch16: pypirc-secure.diff Patch17: remove-static-libpython.diff # PATCH-FIX-OPENSUSE python-2.7.3-ssl_ca_path.patch [bnc#761501] -- Support directory-based certificate stores with the ca_certs parameter of SSL functions Patch18: python-2.7.3-ssl_ca_path.patch +Patch19: python-2.7.3-fix-dbm-64bit-bigendian.patch # COMMON-PATCH-END %define python_version %(echo %{tarversion} | head -c 3) BuildRequires: automake @@ -136,6 +137,7 @@ other applications. %patch16 -p1 %patch17 %patch18 +%patch19 -p1 # COMMON-PREP-END # drop Autoconf version requirement diff --git a/python-doc.spec b/python-doc.spec index 8b14d16..ef69e11 100644 --- a/python-doc.spec +++ b/python-doc.spec @@ -46,6 +46,7 @@ Patch16: pypirc-secure.diff Patch17: remove-static-libpython.diff # PATCH-FIX-OPENSUSE python-2.7.3-ssl_ca_path.patch [bnc#761501] -- Support directory-based certificate stores with the ca_certs parameter of SSL functions Patch18: python-2.7.3-ssl_ca_path.patch +Patch19: python-2.7.3-fix-dbm-64bit-bigendian.patch # COMMON-PATCH-END Provides: pyth_doc Provides: pyth_ps @@ -93,6 +94,7 @@ Python, and Macintosh Module Reference in PDF format. %patch16 -p1 %patch17 %patch18 +%patch19 -p1 # COMMON-PREP-END %build diff --git a/python.changes b/python.changes index 67a617d..5ec501c 100644 --- a/python.changes +++ b/python.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 26 11:54:22 UTC 2012 - dvaleev@suse.com + +- Fix failing test_dbm on ppc64 + ------------------------------------------------------------------- Thu May 17 17:49:31 UTC 2012 - jfunk@funktronics.ca diff --git a/python.spec b/python.spec index b3f965d..920e44c 100644 --- a/python.spec +++ b/python.spec @@ -54,6 +54,7 @@ Patch16: pypirc-secure.diff Patch17: remove-static-libpython.diff # PATCH-FIX-OPENSUSE python-2.7.3-ssl_ca_path.patch [bnc#761501] -- Support directory-based certificate stores with the ca_certs parameter of SSL functions Patch18: python-2.7.3-ssl_ca_path.patch +Patch19: python-2.7.3-fix-dbm-64bit-bigendian.patch # COMMON-PATCH-END BuildRequires: automake BuildRequires: db-devel @@ -176,6 +177,7 @@ implementation of the standard Unix DBM databases. %patch16 -p1 %patch17 %patch18 +%patch19 -p1 # COMMON-PREP-END # drop Autoconf version requirement