rpms/python/devel python-2.5.1-db47.patch, NONE, 1.1 python-2.5.1-listdir.patch, NONE, 1.1 python.spec, 1.132, 1.133

Tom Callaway (spot) fedora-extras-commits at redhat.com
Thu Jul 10 14:43:24 UTC 2008


Author: spot

Update of /cvs/pkgs/rpms/python/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23844

Modified Files:
	python.spec 
Added Files:
	python-2.5.1-db47.patch python-2.5.1-listdir.patch 
Log Message:
fix license tag, enable support for db4-4.7 (based on PLD patch)

python-2.5.1-db47.patch:

--- NEW FILE python-2.5.1-db47.patch ---
diff -up Python-2.5.1/Modules/_bsddb.c.db46 Python-2.5.1/Modules/_bsddb.c
--- Python-2.5.1/Modules/_bsddb.c.db46	2007-01-04 21:09:06.000000000 -0500
+++ Python-2.5.1/Modules/_bsddb.c	2008-07-10 09:58:55.000000000 -0400
@@ -5306,11 +5306,13 @@ static PyObject*
 DBEnv_getattr(DBEnvObject* self, char *name)
 {
     if (!strcmp(name, "db_home")) {
+	const char *home = NULL;
         CHECK_ENV_NOT_CLOSED(self);
-        if (self->db_env->db_home == NULL) {
+	self->db_env->get_home(self->db_env, &home);
+        if (home == NULL) {
             RETURN_NONE();
         }
-        return PyString_FromString(self->db_env->db_home);
+        return PyString_FromString(home);
     }
 
     return Py_FindMethod(DBEnv_methods, (PyObject* )self, name);
@@ -5932,22 +5934,37 @@ DL_EXPORT(void) init_bsddb(void)
     ADD_INT(d, DB_TIME_NOTGRANTED);
     ADD_INT(d, DB_TXN_NOT_DURABLE);
     ADD_INT(d, DB_TXN_WRITE_NOSYNC);
-    ADD_INT(d, DB_LOG_AUTOREMOVE);
-    ADD_INT(d, DB_DIRECT_LOG);
     ADD_INT(d, DB_DIRECT_DB);
     ADD_INT(d, DB_INIT_REP);
     ADD_INT(d, DB_ENCRYPT);
     ADD_INT(d, DB_CHKSUM);
 #endif
 
+#if (DBVER >= 42) && (DBVER < 47)
+    ADD_INT(d, DB_LOG_AUTOREMOVE);
+    ADD_INT(d, DB_DIRECT_LOG);
+#endif
+
+#if (DBVER >= 47)
+    ADD_INT(d, DB_LOG_DIRECT);
+    ADD_INT(d, DB_LOG_DSYNC);
+    ADD_INT(d, DB_LOG_IN_MEMORY);
+    ADD_INT(d, DB_LOG_AUTO_REMOVE);
+    ADD_INT(d, DB_LOG_ZERO);
+#endif
+
 #if (DBVER >= 43)
-    ADD_INT(d, DB_LOG_INMEMORY);
     ADD_INT(d, DB_BUFFER_SMALL);
     ADD_INT(d, DB_SEQ_DEC);
     ADD_INT(d, DB_SEQ_INC);
     ADD_INT(d, DB_SEQ_WRAP);
 #endif
 
+#if (DBVER >= 43) && (DBVER < 47)
+    ADD_INT(d, DB_LOG_INMEMORY);
+    ADD_INT(d, DB_DSYNC_LOG);
+#endif
+
 #if (DBVER >= 41)
     ADD_INT(d, DB_ENCRYPT_AES);
     ADD_INT(d, DB_AUTO_COMMIT);
diff -up Python-2.5.1/setup.py.db46 Python-2.5.1/setup.py
--- Python-2.5.1/setup.py.db46	2008-07-10 09:55:08.000000000 -0400
+++ Python-2.5.1/setup.py	2008-07-10 09:55:08.000000000 -0400
@@ -606,9 +606,9 @@ class PyBuildExt(build_ext):
         # a release.  Most open source OSes come with one or more
         # versions of BerkeleyDB already installed.
 
-        max_db_ver = (4, 5)
+        max_db_ver = (4, 7)
         min_db_ver = (3, 3)
-        db_setup_debug = False   # verbose debug prints from this script?
+        db_setup_debug = True    # verbose debug prints from this script?
 
         # construct a list of paths to look for the header file in on
         # top of the normal inc_dirs.
@@ -623,7 +623,7 @@ class PyBuildExt(build_ext):
             '/sw/include/db3',
         ]
         # 4.x minor number specific paths
-        for x in (0,1,2,3,4,5):
+        for x in (0,1,2,3,4,5,6,7):
             db_inc_paths.append('/usr/include/db4%d' % x)
             db_inc_paths.append('/usr/include/db4.%d' % x)
             db_inc_paths.append('/usr/local/BerkeleyDB.4.%d/include' % x)
@@ -646,7 +646,7 @@ class PyBuildExt(build_ext):
         for dn in inc_dirs:
             std_variants.append(os.path.join(dn, 'db3'))
             std_variants.append(os.path.join(dn, 'db4'))
-            for x in (0,1,2,3,4):
+            for x in (0,1,2,3,4,5,6,7):
                 std_variants.append(os.path.join(dn, "db4%d"%x))
                 std_variants.append(os.path.join(dn, "db4.%d"%x))
             for x in (2,3):

python-2.5.1-listdir.patch:

--- NEW FILE python-2.5.1-listdir.patch ---
--- Python-2.5.1/Modules/posixmodule.c.orig	2007-04-04 14:30:56.000000000 -0400
+++ Python-2.5.1/Modules/posixmodule.c	2008-06-14 17:35:47.000000000 -0400
@@ -2160,7 +2160,6 @@
 	struct dirent *ep;
 	int arg_is_unicode = 1;
 
-	errno = 0;
 	if (!PyArg_ParseTuple(args, "U:listdir", &v)) {
 		arg_is_unicode = 0;
 		PyErr_Clear();
@@ -2176,6 +2175,7 @@
 		return NULL;
 	}
 	for (;;) {
+		errno = 0;
 		Py_BEGIN_ALLOW_THREADS
 		ep = readdir(dirp);
 		Py_END_ALLOW_THREADS


Index: python.spec
===================================================================
RCS file: /cvs/pkgs/rpms/python/devel/python.spec,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -r1.132 -r1.133
--- python.spec	8 Apr 2008 05:14:21 -0000	1.132
+++ python.spec	10 Jul 2008 14:42:32 -0000	1.133
@@ -20,8 +20,8 @@
 Summary: An interpreted, interactive, object-oriented programming language.
 Name: %{python}
 Version: 2.5.1
-Release: 25%{?dist}
-License: Python Software Foundation License v2 
+Release: 27%{?dist}
+License: Python
 Group: Development/Languages
 Provides: python-abi = %{pybasever}
 Provides: python(abi) = %{pybasever}
@@ -42,13 +42,14 @@
 Patch12: python-2.5.1-pysqlite.patch
 Patch13: python-2.5.1-socketmodule-constants.patch
 Patch14: python-2.5.1-socketmodule-constants2.patch
+Patch15: python-2.5.1-listdir.patch
 
 # upstreamed
 
 Patch50: python-2.5-disable-egginfo.patch
 
 # new db version
-Patch60: python-2.5.1-db46.patch
+Patch60: python-2.5.1-db47.patch
 
 # lib64 patches
 Patch101: python-2.3.4-lib64-regex.patch
@@ -196,7 +197,7 @@
 
 # Try not disabling egg-infos, bz#414711
 #patch50 -p1 -b .egginfo
-%patch60 -p1 -b .db46
+%patch60 -p1 -b .db47
 
 %if %{_lib} == lib64
 %patch101 -p1 -b .lib64-regex
@@ -209,6 +210,7 @@
 %patch12 -p1 -b .pysqlite-2.3.3-minimal
 %patch13 -p1 -b .socketmodule
 %patch14 -p1 -b .socketmodule
+%patch15 -p1 -b .socketmodule
 
 %ifarch alpha ia64
 # 64bit, but not lib64 arches need this too...
@@ -506,6 +508,14 @@
 %{_libdir}/python%{pybasever}/lib-dynload/_testcapimodule.so
 
 %changelog
+* Thu Jul 10 2008 Tom "spot" Callaway <tcallawa at redhat.com> - 2.5.1-27
+- fix license tag
+- enable support for db4-4.7
+
+* Sun Jun 15 2008 James Antill <jantill at redhat.com> - 2.5.1-26
+- Fix sporadic listdir problem
+- Resolves: bug#451494
+
 * Mon Apr  7 2008 James Antill <jantill at redhat.com> - 2.5.1-25
 - Rebuild to re-gen autoconf file due to glibc change.
 - Resolves: bug#441003




More information about the fedora-extras-commits mailing list