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
This commit is contained in:
Ismail Dönmez 2012-07-20 11:17:00 +00:00 committed by Git OBS Bridge
parent 86253c9ef6
commit f58b90d043
6 changed files with 41 additions and 0 deletions

View File

@ -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");

View File

@ -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 Thu May 17 17:49:31 UTC 2012 - jfunk@funktronics.ca

View File

@ -50,6 +50,7 @@ Patch16: pypirc-secure.diff
Patch17: remove-static-libpython.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 # 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 Patch18: python-2.7.3-ssl_ca_path.patch
Patch19: python-2.7.3-fix-dbm-64bit-bigendian.patch
# COMMON-PATCH-END # COMMON-PATCH-END
%define python_version %(echo %{tarversion} | head -c 3) %define python_version %(echo %{tarversion} | head -c 3)
BuildRequires: automake BuildRequires: automake
@ -136,6 +137,7 @@ other applications.
%patch16 -p1 %patch16 -p1
%patch17 %patch17
%patch18 %patch18
%patch19 -p1
# COMMON-PREP-END # COMMON-PREP-END
# drop Autoconf version requirement # drop Autoconf version requirement

View File

@ -46,6 +46,7 @@ Patch16: pypirc-secure.diff
Patch17: remove-static-libpython.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 # 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 Patch18: python-2.7.3-ssl_ca_path.patch
Patch19: python-2.7.3-fix-dbm-64bit-bigendian.patch
# COMMON-PATCH-END # COMMON-PATCH-END
Provides: pyth_doc Provides: pyth_doc
Provides: pyth_ps Provides: pyth_ps
@ -93,6 +94,7 @@ Python, and Macintosh Module Reference in PDF format.
%patch16 -p1 %patch16 -p1
%patch17 %patch17
%patch18 %patch18
%patch19 -p1
# COMMON-PREP-END # COMMON-PREP-END
%build %build

View File

@ -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 Thu May 17 17:49:31 UTC 2012 - jfunk@funktronics.ca

View File

@ -54,6 +54,7 @@ Patch16: pypirc-secure.diff
Patch17: remove-static-libpython.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 # 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 Patch18: python-2.7.3-ssl_ca_path.patch
Patch19: python-2.7.3-fix-dbm-64bit-bigendian.patch
# COMMON-PATCH-END # COMMON-PATCH-END
BuildRequires: automake BuildRequires: automake
BuildRequires: db-devel BuildRequires: db-devel
@ -176,6 +177,7 @@ implementation of the standard Unix DBM databases.
%patch16 -p1 %patch16 -p1
%patch17 %patch17
%patch18 %patch18
%patch19 -p1
# COMMON-PREP-END # COMMON-PREP-END
# drop Autoconf version requirement # drop Autoconf version requirement