- add patch to fixup the new sysconfig.py for our multilib support on
64-bit (patch 103) Thu Jul 8 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-2 - add machinery for regenerating the "configure" script in the face of mismatching autoconf versions (patch 300) Tue Jul 6 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-1 - 2.7 final; drop alphatag - drop patch 117 (upstream), patch 120 (upstreamed) - fix the commented-out __python_ver from 26 to 27
This commit is contained in:
parent
500aee5ba1
commit
c6247fd398
|
@ -1 +1 @@
|
||||||
Python-2.6.5.tar.bz2
|
Python-2.7.tar.bz2
|
||||||
|
|
|
@ -1,135 +0,0 @@
|
||||||
Index: configure.in
|
|
||||||
===================================================================
|
|
||||||
--- configure.in (revision 61828)
|
|
||||||
+++ configure.in (working copy)
|
|
||||||
@@ -2232,6 +2232,19 @@ then
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT($with_pymalloc)
|
|
||||||
|
|
||||||
+# Check for Valgrind support
|
|
||||||
+AC_MSG_CHECKING([for --with-valgrind])
|
|
||||||
+AC_ARG_WITH([valgrind],
|
|
||||||
+ AC_HELP_STRING([--with-valgrind], [Enable Valgrind support]),,
|
|
||||||
+ with_valgrind=no)
|
|
||||||
+AC_MSG_RESULT([$with_valgrind])
|
|
||||||
+if test "$with_valgrind" != no; then
|
|
||||||
+ AC_CHECK_HEADER([valgrind/valgrind.h],
|
|
||||||
+ [AC_DEFINE([WITH_VALGRIND], 1, [Define if you want pymalloc to be disabled when running under valgrind])],
|
|
||||||
+ [AC_MSG_ERROR([Valgrind support requested but headers not available])]
|
|
||||||
+ )
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
# Check for --with-wctype-functions
|
|
||||||
AC_MSG_CHECKING(for --with-wctype-functions)
|
|
||||||
AC_ARG_WITH(wctype-functions,
|
|
||||||
Index: Objects/obmalloc.c
|
|
||||||
===================================================================
|
|
||||||
--- Objects/obmalloc.c (revision 61828)
|
|
||||||
+++ Objects/obmalloc.c (working copy)
|
|
||||||
@@ -2,6 +2,21 @@
|
|
||||||
|
|
||||||
#ifdef WITH_PYMALLOC
|
|
||||||
|
|
||||||
+#ifdef WITH_VALGRIND
|
|
||||||
+#include <valgrind/valgrind.h>
|
|
||||||
+
|
|
||||||
+/* If we're using GCC, use __builtin_expect() to reduce overhead of
|
|
||||||
+ the valgrind checks */
|
|
||||||
+#if defined(__GNUC__) && (__GNUC__ > 2) && defined(__OPTIMIZE__)
|
|
||||||
+# define UNLIKELY(value) __builtin_expect((value), 0)
|
|
||||||
+#else
|
|
||||||
+# define UNLIKELY(value) (value)
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+/* -1 indicates that we haven't checked that we're running on valgrind yet. */
|
|
||||||
+static int running_on_valgrind = -1;
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/* An object allocator for Python.
|
|
||||||
|
|
||||||
Here is an introduction to the layers of the Python memory architecture,
|
|
||||||
@@ -726,6 +741,13 @@ PyObject_Malloc(size_t nbytes)
|
|
||||||
poolp next;
|
|
||||||
uint size;
|
|
||||||
|
|
||||||
+#ifdef WITH_VALGRIND
|
|
||||||
+ if (UNLIKELY(running_on_valgrind == -1))
|
|
||||||
+ running_on_valgrind = RUNNING_ON_VALGRIND;
|
|
||||||
+ if (UNLIKELY(running_on_valgrind))
|
|
||||||
+ goto redirect;
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* This implicitly redirects malloc(0).
|
|
||||||
*/
|
|
||||||
@@ -916,6 +938,11 @@ PyObject_Free(void *p)
|
|
||||||
if (p == NULL) /* free(NULL) has no effect */
|
|
||||||
return;
|
|
||||||
|
|
||||||
+#ifdef WITH_VALGRIND
|
|
||||||
+ if (UNLIKELY(running_on_valgrind > 0))
|
|
||||||
+ goto redirect;
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
pool = POOL_ADDR(p);
|
|
||||||
if (Py_ADDRESS_IN_RANGE(p, pool)) {
|
|
||||||
/* We allocated this address. */
|
|
||||||
@@ -1110,6 +1137,7 @@ PyObject_Free(void *p)
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
+redirect:
|
|
||||||
/* We didn't allocate this address. */
|
|
||||||
free(p);
|
|
||||||
}
|
|
||||||
@@ -1130,6 +1158,12 @@ PyObject_Realloc(void *p, size_t nbytes)
|
|
||||||
if (p == NULL)
|
|
||||||
return PyObject_Malloc(nbytes);
|
|
||||||
|
|
||||||
+#ifdef WITH_VALGRIND
|
|
||||||
+ /* Treat running_on_valgrind == -1 the same as 0 */
|
|
||||||
+ if (UNLIKELY(running_on_valgrind > 0))
|
|
||||||
+ goto redirect;
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
pool = POOL_ADDR(p);
|
|
||||||
if (Py_ADDRESS_IN_RANGE(p, pool)) {
|
|
||||||
/* We're in charge of this block */
|
|
||||||
@@ -1157,6 +1191,7 @@ PyObject_Realloc(void *p, size_t nbytes)
|
|
||||||
}
|
|
||||||
return bp;
|
|
||||||
}
|
|
||||||
+ redirect:
|
|
||||||
/* We're not managing this block. If nbytes <=
|
|
||||||
* SMALL_REQUEST_THRESHOLD, it's tempting to try to take over this
|
|
||||||
* block. However, if we do, we need to copy the valid data from
|
|
||||||
Index: Misc/NEWS
|
|
||||||
===================================================================
|
|
||||||
--- Misc/NEWS (revision 61828)
|
|
||||||
+++ Misc/NEWS (working copy)
|
|
||||||
@@ -60,6 +60,11 @@ Core and builtins
|
|
||||||
|
|
||||||
- Issue #2143: Fix embedded readline() hang on SSL socket EOF.
|
|
||||||
|
|
||||||
+- Issue #2422: When compiled with the ``--with-valgrind`` option, the
|
|
||||||
+ pymalloc allocator will be automatically disabled when running under
|
|
||||||
+ Valgrind. This gives improved memory leak detection when running
|
|
||||||
+ under Valgrind, while taking advantage of pymalloc at other times.
|
|
||||||
+
|
|
||||||
Library
|
|
||||||
-------
|
|
||||||
|
|
||||||
Index: pyconfig.h.in
|
|
||||||
===================================================================
|
|
||||||
--- pyconfig.h.in (revision 61828)
|
|
||||||
+++ pyconfig.h.in (working copy)
|
|
||||||
@@ -958,6 +958,9 @@
|
|
||||||
/* Define to profile with the Pentium timestamp counter */
|
|
||||||
#undef WITH_TSC
|
|
||||||
|
|
||||||
+/* Define if you want pymalloc to be disabled when running under valgrind */
|
|
||||||
+#undef WITH_VALGRIND
|
|
||||||
+
|
|
||||||
|
|
||||||
/* Define to 1 if your processor stores words with the most significant byte
|
|
||||||
first (like Motorola and SPARC, unlike Intel and VAX).
|
|
|
@ -1,63 +0,0 @@
|
||||||
--- Python-2.5.1i-orig/Modules/socketmodule.c 2008-03-07 16:38:47.000000000 -0500
|
|
||||||
+++ Python-2.5.1/Modules/socketmodule.c 2008-03-07 16:41:09.000000000 -0500
|
|
||||||
@@ -4507,6 +4507,60 @@
|
|
||||||
#ifdef SO_TYPE
|
|
||||||
PyModule_AddIntConstant(m, "SO_TYPE", SO_TYPE);
|
|
||||||
#endif
|
|
||||||
+#ifdef SO_SNDBUFFORCE
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_SNDBUFFORCE", SO_SNDBUFFORCE);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_RCVBUFFORCE
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_RCVBUFFORCE", SO_RCVBUFFORCE);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_NO_CHECK
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_NO_CHECK", SO_NO_CHECK);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_PRIORITY
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_PRIORITY", SO_PRIORITY);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_BSDCOMPAT
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_BSDCOMPAT", SO_BSDCOMPAT);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_PASSCRED
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_PASSCRED", SO_PASSCRED);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_PEERCRED
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_PEERCRED", SO_PEERCRED);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_SECURITY_AUTHENTICATION
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_SECURITY_AUTHENTICATION", SO_SECURITY_AUTHENTICATION);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_SECURITY_ENCRYPTION_TRANSPORT
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_SECURITY_ENCRYPTION_TRANSPORT", SO_SECURITY_ENCRYPTION_TRANSPORT);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_SECURITY_ENCRYPTION_NETWORK
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_SECURITY_ENCRYPTION_NETWORK", SO_SECURITY_ENCRYPTION_NETWORK);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_BINDTODEVICE
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_BINDTODEVICE", SO_BINDTODEVICE);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_ATTACH_FILTER
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_ATTACH_FILTER", SO_ATTACH_FILTER);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_DETACH_FILTER
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_DETACH_FILTER", SO_DETACH_FILTER);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_PEERNAME
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_PEERNAME", SO_PEERNAME);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_TIMESTAMP
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_TIMESTAMP", SO_TIMESTAMP);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_PEERSEC
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_PEERSEC", SO_PEERSEC);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_PASSSEC
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_PASSSEC", SO_PASSSEC);
|
|
||||||
+#endif
|
|
||||||
+#ifdef SO_TIMESTAMPNS
|
|
||||||
+ PyModule_AddIntConstant(m, "SO_TIMESTAMPNS", SO_TIMESTAMPNS);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
/* Maximum number of connections for "listen" */
|
|
||||||
#ifdef SOMAXCONN
|
|
|
@ -1,20 +0,0 @@
|
||||||
diff -rup Python-2.5.1-orig/Modules/socketmodule.c Python-2.5.1/Modules/socketmodule.c
|
|
||||||
--- Python-2.5.1-orig/Modules/socketmodule.c 2008-03-25 09:59:38.000000000 -0400
|
|
||||||
+++ Python-2.5.1/Modules/socketmodule.c 2008-03-25 10:12:24.000000000 -0400
|
|
||||||
@@ -4977,6 +4977,15 @@ init_socket(void)
|
|
||||||
#ifdef TCP_QUICKACK
|
|
||||||
PyModule_AddIntConstant(m, "TCP_QUICKACK", TCP_QUICKACK);
|
|
||||||
#endif
|
|
||||||
+#ifdef TCP_CONGESTION
|
|
||||||
+ PyModule_AddIntConstant(m, "TCP_CONGESTION", TCP_CONGESTION);
|
|
||||||
+#endif
|
|
||||||
+#ifdef TCP_MD5SIG
|
|
||||||
+ PyModule_AddIntConstant(m, "TCP_MD5SIG", TCP_MD5SIG);
|
|
||||||
+#endif
|
|
||||||
+#ifdef TCP_MD5SIG_MAXKEYLEN
|
|
||||||
+ PyModule_AddIntConstant(m, "TCP_MD5SIG_MAXKEYLEN", TCP_MD5SIG_MAXKEYLEN);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
|
|
||||||
/* IPX options */
|
|
||||||
Only in Python-2.5.1/Modules: socketmodule.c~
|
|
|
@ -1,85 +0,0 @@
|
||||||
diff -ur Python-2.6~/Modules/_ctypes/callbacks.c Python-2.6/Modules/_ctypes/callbacks.c
|
|
||||||
--- Python-2.6~/Modules/_ctypes/callbacks.c 2008-06-09 00:58:54.000000000 -0400
|
|
||||||
+++ Python-2.6/Modules/_ctypes/callbacks.c 2009-03-17 00:08:38.424528546 -0400
|
|
||||||
@@ -21,8 +21,8 @@
|
|
||||||
Py_XDECREF(self->converters);
|
|
||||||
Py_XDECREF(self->callable);
|
|
||||||
Py_XDECREF(self->restype);
|
|
||||||
- if (self->pcl)
|
|
||||||
- FreeClosure(self->pcl);
|
|
||||||
+ if (self->pcl_write)
|
|
||||||
+ ffi_closure_free(self->pcl_write);
|
|
||||||
PyObject_GC_Del(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -373,7 +373,8 @@
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
- p->pcl = NULL;
|
|
||||||
+ p->pcl_exec = NULL;
|
|
||||||
+ p->pcl_write = NULL;
|
|
||||||
memset(&p->cif, 0, sizeof(p->cif));
|
|
||||||
p->converters = NULL;
|
|
||||||
p->callable = NULL;
|
|
||||||
@@ -402,8 +403,9 @@
|
|
||||||
|
|
||||||
assert(CThunk_CheckExact(p));
|
|
||||||
|
|
||||||
- p->pcl = MallocClosure();
|
|
||||||
- if (p->pcl == NULL) {
|
|
||||||
+ p->pcl_write = ffi_closure_alloc(sizeof(ffi_closure),
|
|
||||||
+ &p->pcl_exec);
|
|
||||||
+ if (p->pcl_write == NULL) {
|
|
||||||
PyErr_NoMemory();
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
@@ -448,7 +450,9 @@
|
|
||||||
"ffi_prep_cif failed with %d", result);
|
|
||||||
goto error;
|
|
||||||
}
|
|
||||||
- result = ffi_prep_closure(p->pcl, &p->cif, closure_fcn, p);
|
|
||||||
+ result = ffi_prep_closure_loc(p->pcl_write, &p->cif, closure_fcn,
|
|
||||||
+ p,
|
|
||||||
+ p->pcl_exec);
|
|
||||||
if (result != FFI_OK) {
|
|
||||||
PyErr_Format(PyExc_RuntimeError,
|
|
||||||
"ffi_prep_closure failed with %d", result);
|
|
||||||
diff -ur Python-2.6~/Modules/_ctypes/_ctypes.c Python-2.6/Modules/_ctypes/_ctypes.c
|
|
||||||
--- Python-2.6~/Modules/_ctypes/_ctypes.c 2008-08-19 15:40:23.000000000 -0400
|
|
||||||
+++ Python-2.6/Modules/_ctypes/_ctypes.c 2009-03-17 00:08:38.479530502 -0400
|
|
||||||
@@ -3438,7 +3438,7 @@
|
|
||||||
self->callable = callable;
|
|
||||||
|
|
||||||
self->thunk = thunk;
|
|
||||||
- *(void **)self->b_ptr = (void *)thunk->pcl;
|
|
||||||
+ *(void **)self->b_ptr = (void *)thunk->pcl_exec;
|
|
||||||
|
|
||||||
Py_INCREF((PyObject *)thunk); /* for KeepRef */
|
|
||||||
if (-1 == KeepRef((CDataObject *)self, 0, (PyObject *)thunk)) {
|
|
||||||
diff -ur Python-2.6~/Modules/_ctypes/ctypes.h Python-2.6/Modules/_ctypes/ctypes.h
|
|
||||||
--- Python-2.6~/Modules/_ctypes/ctypes.h 2008-07-24 07:16:45.000000000 -0400
|
|
||||||
+++ Python-2.6/Modules/_ctypes/ctypes.h 2009-03-17 00:08:38.480528344 -0400
|
|
||||||
@@ -95,7 +95,8 @@
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
PyObject_VAR_HEAD
|
|
||||||
- ffi_closure *pcl; /* the C callable */
|
|
||||||
+ ffi_closure *pcl_write; /* the C callable, writeable */
|
|
||||||
+ void *pcl_exec; /* the C callable, executable */
|
|
||||||
ffi_cif cif;
|
|
||||||
int flags;
|
|
||||||
PyObject *converters;
|
|
||||||
diff -ur Python-2.6~/setup.py Python-2.6/setup.py
|
|
||||||
--- Python-2.6~/setup.py 2009-03-17 00:07:54.771651851 -0400
|
|
||||||
+++ Python-2.6/setup.py 2009-03-17 00:08:19.792558478 -0400
|
|
||||||
@@ -1701,8 +1701,7 @@
|
|
||||||
'_ctypes/callbacks.c',
|
|
||||||
'_ctypes/callproc.c',
|
|
||||||
'_ctypes/stgdict.c',
|
|
||||||
- '_ctypes/cfield.c',
|
|
||||||
- '_ctypes/malloc_closure.c']
|
|
||||||
+ '_ctypes/cfield.c']
|
|
||||||
depends = ['_ctypes/ctypes.h']
|
|
||||||
|
|
||||||
if sys.platform == 'darwin':
|
|
|
@ -1,137 +0,0 @@
|
||||||
diff -up Python-2.6.2/Doc/c-api/init.rst.CVE-2008-5983 Python-2.6.2/Doc/c-api/init.rst
|
|
||||||
--- Python-2.6.2/Doc/c-api/init.rst.CVE-2008-5983 2009-04-05 17:26:31.000000000 -0400
|
|
||||||
+++ Python-2.6.2/Doc/c-api/init.rst 2010-06-04 11:19:30.750199971 -0400
|
|
||||||
@@ -22,6 +22,7 @@ Initialization, Finalization, and Thread
|
|
||||||
module: sys
|
|
||||||
triple: module; search; path
|
|
||||||
single: PySys_SetArgv()
|
|
||||||
+ single: PySys_SetArgvEx()
|
|
||||||
single: Py_Finalize()
|
|
||||||
|
|
||||||
Initialize the Python interpreter. In an application embedding Python, this
|
|
||||||
@@ -31,7 +32,7 @@ Initialization, Finalization, and Thread
|
|
||||||
the table of loaded modules (``sys.modules``), and creates the fundamental
|
|
||||||
modules :mod:`__builtin__`, :mod:`__main__` and :mod:`sys`. It also initializes
|
|
||||||
the module search path (``sys.path``). It does not set ``sys.argv``; use
|
|
||||||
- :cfunc:`PySys_SetArgv` for that. This is a no-op when called for a second time
|
|
||||||
+ :cfunc:`PySys_SetArgvEx` for that. This is a no-op when called for a second time
|
|
||||||
(without calling :cfunc:`Py_Finalize` first). There is no return value; it is a
|
|
||||||
fatal error if the initialization fails.
|
|
||||||
|
|
||||||
@@ -346,7 +347,7 @@ Initialization, Finalization, and Thread
|
|
||||||
``sys.version``.
|
|
||||||
|
|
||||||
|
|
||||||
-.. cfunction:: void PySys_SetArgv(int argc, char **argv)
|
|
||||||
+.. cfunction:: void PySys_SetArgvEx(int argc, char **argv, int updatepath)
|
|
||||||
|
|
||||||
.. index::
|
|
||||||
single: main()
|
|
||||||
@@ -361,14 +362,41 @@ Initialization, Finalization, and Thread
|
|
||||||
string. If this function fails to initialize :data:`sys.argv`, a fatal
|
|
||||||
condition is signalled using :cfunc:`Py_FatalError`.
|
|
||||||
|
|
||||||
- This function also prepends the executed script's path to :data:`sys.path`.
|
|
||||||
- If no script is executed (in the case of calling ``python -c`` or just the
|
|
||||||
- interactive interpreter), the empty string is used instead.
|
|
||||||
+ If *updatepath* is zero, this is all the function does. If *updatepath*
|
|
||||||
+ is non-zero, the function also modifies :data:`sys.path` according to the
|
|
||||||
+ following algorithm:
|
|
||||||
+
|
|
||||||
+ - If the name of an existing script is passed in ``argv[0]``, the absolute
|
|
||||||
+ path of the directory where the script is located is prepended to
|
|
||||||
+ :data:`sys.path`.
|
|
||||||
+ - Otherwise (that is, if *argc* is 0 or ``argv[0]`` doesn't point
|
|
||||||
+ to an existing file name), an empty string is prepended to
|
|
||||||
+ :data:`sys.path`, which is the same as prepending the current working
|
|
||||||
+ directory (``"."``).
|
|
||||||
+
|
|
||||||
+ .. note::
|
|
||||||
+ It is recommended that applications embedding the Python interpreter
|
|
||||||
+ for purposes other than executing a single script pass 0 as *updatepath*,
|
|
||||||
+ and update :data:`sys.path` themselves if desired.
|
|
||||||
+ See `CVE-2008-5983 <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
|
|
||||||
+
|
|
||||||
+ On versions before 2.6.6, you can achieve the same effect by manually
|
|
||||||
+ popping the first :data:`sys.path` element after having called
|
|
||||||
+ :cfunc:`PySys_SetArgv`, for example using::
|
|
||||||
+
|
|
||||||
+ PyRun_SimpleString("import sys; sys.path.pop(0)\n");
|
|
||||||
+
|
|
||||||
+ .. versionadded:: 2.6.6
|
|
||||||
|
|
||||||
.. XXX impl. doesn't seem consistent in allowing 0/NULL for the params;
|
|
||||||
check w/ Guido.
|
|
||||||
|
|
||||||
|
|
||||||
+.. cfunction:: void PySys_SetArgv(int argc, char **argv)
|
|
||||||
+
|
|
||||||
+ This function works like :cfunc:`PySys_SetArgv` with *updatepath* set to 1.
|
|
||||||
+
|
|
||||||
+
|
|
||||||
.. cfunction:: void Py_SetPythonHome(char *home)
|
|
||||||
|
|
||||||
Set the default "home" directory, that is, the location of the standard
|
|
||||||
diff -up Python-2.6.2/Include/sysmodule.h.CVE-2008-5983 Python-2.6.2/Include/sysmodule.h
|
|
||||||
--- Python-2.6.2/Include/sysmodule.h.CVE-2008-5983 2008-04-12 19:44:07.000000000 -0400
|
|
||||||
+++ Python-2.6.2/Include/sysmodule.h 2010-06-04 11:19:30.747199764 -0400
|
|
||||||
@@ -11,6 +11,7 @@ PyAPI_FUNC(PyObject *) PySys_GetObject(c
|
|
||||||
PyAPI_FUNC(int) PySys_SetObject(char *, PyObject *);
|
|
||||||
PyAPI_FUNC(FILE *) PySys_GetFile(char *, FILE *);
|
|
||||||
PyAPI_FUNC(void) PySys_SetArgv(int, char **);
|
|
||||||
+PyAPI_FUNC(void) PySys_SetArgvEx(int, char **, int);
|
|
||||||
PyAPI_FUNC(void) PySys_SetPath(char *);
|
|
||||||
|
|
||||||
PyAPI_FUNC(void) PySys_WriteStdout(const char *format, ...)
|
|
||||||
diff -up Python-2.6.2/Misc/NEWS.CVE-2008-5983 Python-2.6.2/Misc/NEWS
|
|
||||||
--- Python-2.6.2/Misc/NEWS.CVE-2008-5983 2010-06-04 11:19:30.730199353 -0400
|
|
||||||
+++ Python-2.6.2/Misc/NEWS 2010-06-04 11:19:30.749199965 -0400
|
|
||||||
@@ -111,6 +111,14 @@ Core and Builtins
|
|
||||||
Valgrind. This gives improved memory leak detection when running
|
|
||||||
under Valgrind, while taking advantage of pymalloc at other times.
|
|
||||||
|
|
||||||
+C-API
|
|
||||||
+-----
|
|
||||||
+
|
|
||||||
+- Issue #5753: A new C API function, :cfunc:`PySys_SetArgvEx`, allows
|
|
||||||
+ embedders of the interpreter to set sys.argv without also modifying
|
|
||||||
+ sys.path. This helps fix `CVE-2008-5983
|
|
||||||
+ <http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-5983>`_.
|
|
||||||
+
|
|
||||||
Library
|
|
||||||
-------
|
|
||||||
|
|
||||||
diff -up Python-2.6.2/Python/sysmodule.c.CVE-2008-5983 Python-2.6.2/Python/sysmodule.c
|
|
||||||
--- Python-2.6.2/Python/sysmodule.c.CVE-2008-5983 2009-01-13 19:08:09.000000000 -0500
|
|
||||||
+++ Python-2.6.2/Python/sysmodule.c 2010-06-04 11:20:18.931825713 -0400
|
|
||||||
@@ -1528,7 +1528,7 @@ makeargvobject(int argc, char **argv)
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
-PySys_SetArgv(int argc, char **argv)
|
|
||||||
+PySys_SetArgvEx(int argc, char **argv, int updatepath)
|
|
||||||
{
|
|
||||||
#if defined(HAVE_REALPATH)
|
|
||||||
char fullpath[MAXPATHLEN];
|
|
||||||
@@ -1541,7 +1541,7 @@ PySys_SetArgv(int argc, char **argv)
|
|
||||||
Py_FatalError("no mem for sys.argv");
|
|
||||||
if (PySys_SetObject("argv", av) != 0)
|
|
||||||
Py_FatalError("can't assign sys.argv");
|
|
||||||
- if (path != NULL) {
|
|
||||||
+ if (updatepath && path != NULL) {
|
|
||||||
char *argv0 = argv[0];
|
|
||||||
char *p = NULL;
|
|
||||||
Py_ssize_t n = 0;
|
|
||||||
@@ -1631,6 +1631,12 @@ PySys_SetArgv(int argc, char **argv)
|
|
||||||
Py_DECREF(av);
|
|
||||||
}
|
|
||||||
|
|
||||||
+void
|
|
||||||
+PySys_SetArgv(int argc, char **argv)
|
|
||||||
+{
|
|
||||||
+ PySys_SetArgvEx(argc, argv, 1);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
|
|
||||||
/* APIs to write to sys.stdout or sys.stderr using a printf-like interface.
|
|
||||||
Adapted from code submitted by Just van Rossum.
|
|
|
@ -1,210 +0,0 @@
|
||||||
diff -up Python-2.6.2/Modules/audioop.c.CVE-2010-1634 Python-2.6.2/Modules/audioop.c
|
|
||||||
--- Python-2.6.2/Modules/audioop.c.CVE-2010-1634 2008-07-07 13:02:59.000000000 -0400
|
|
||||||
+++ Python-2.6.2/Modules/audioop.c 2010-06-04 11:02:45.743200233 -0400
|
|
||||||
@@ -829,7 +829,7 @@ static PyObject *
|
|
||||||
audioop_tostereo(PyObject *self, PyObject *args)
|
|
||||||
{
|
|
||||||
signed char *cp, *ncp;
|
|
||||||
- int len, new_len, size, val1, val2, val = 0;
|
|
||||||
+ int len, size, val1, val2, val = 0;
|
|
||||||
double fac1, fac2, fval, maxval;
|
|
||||||
PyObject *rv;
|
|
||||||
int i;
|
|
||||||
@@ -846,14 +846,13 @@ audioop_tostereo(PyObject *self, PyObjec
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- new_len = len*2;
|
|
||||||
- if (new_len < 0) {
|
|
||||||
+ if (len > INT_MAX/2) {
|
|
||||||
PyErr_SetString(PyExc_MemoryError,
|
|
||||||
"not enough memory for output buffer");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- rv = PyString_FromStringAndSize(NULL, new_len);
|
|
||||||
+ rv = PyString_FromStringAndSize(NULL, len*2);
|
|
||||||
if ( rv == 0 )
|
|
||||||
return 0;
|
|
||||||
ncp = (signed char *)PyString_AsString(rv);
|
|
||||||
@@ -1016,7 +1015,7 @@ audioop_lin2lin(PyObject *self, PyObject
|
|
||||||
{
|
|
||||||
signed char *cp;
|
|
||||||
unsigned char *ncp;
|
|
||||||
- int len, new_len, size, size2, val = 0;
|
|
||||||
+ int len, size, size2, val = 0;
|
|
||||||
PyObject *rv;
|
|
||||||
int i, j;
|
|
||||||
|
|
||||||
@@ -1030,13 +1029,12 @@ audioop_lin2lin(PyObject *self, PyObject
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- new_len = (len/size)*size2;
|
|
||||||
- if (new_len < 0) {
|
|
||||||
+ if (len/size > INT_MAX/size2) {
|
|
||||||
PyErr_SetString(PyExc_MemoryError,
|
|
||||||
"not enough memory for output buffer");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
- rv = PyString_FromStringAndSize(NULL, new_len);
|
|
||||||
+ rv = PyString_FromStringAndSize(NULL, (len/size)*size2);
|
|
||||||
if ( rv == 0 )
|
|
||||||
return 0;
|
|
||||||
ncp = (unsigned char *)PyString_AsString(rv);
|
|
||||||
@@ -1072,7 +1070,6 @@ audioop_ratecv(PyObject *self, PyObject
|
|
||||||
int chan, d, *prev_i, *cur_i, cur_o;
|
|
||||||
PyObject *state, *samps, *str, *rv = NULL;
|
|
||||||
int bytes_per_frame;
|
|
||||||
- size_t alloc_size;
|
|
||||||
|
|
||||||
weightA = 1;
|
|
||||||
weightB = 0;
|
|
||||||
@@ -1115,14 +1112,13 @@ audioop_ratecv(PyObject *self, PyObject
|
|
||||||
inrate /= d;
|
|
||||||
outrate /= d;
|
|
||||||
|
|
||||||
- alloc_size = sizeof(int) * (unsigned)nchannels;
|
|
||||||
- if (alloc_size < nchannels) {
|
|
||||||
+ if ((size_t)nchannels > PY_SIZE_MAX/sizeof(int)) {
|
|
||||||
PyErr_SetString(PyExc_MemoryError,
|
|
||||||
"not enough memory for output buffer");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
- prev_i = (int *) malloc(alloc_size);
|
|
||||||
- cur_i = (int *) malloc(alloc_size);
|
|
||||||
+ prev_i = (int *) malloc(nchannels * sizeof(int));
|
|
||||||
+ cur_i = (int *) malloc(nchannels * sizeof(int));
|
|
||||||
if (prev_i == NULL || cur_i == NULL) {
|
|
||||||
(void) PyErr_NoMemory();
|
|
||||||
goto exit;
|
|
||||||
@@ -1159,25 +1155,16 @@ audioop_ratecv(PyObject *self, PyObject
|
|
||||||
ceiling(len*outrate/inrate) output frames, and each frame
|
|
||||||
requires bytes_per_frame bytes. Computing this
|
|
||||||
without spurious overflow is the challenge; we can
|
|
||||||
- settle for a reasonable upper bound, though. */
|
|
||||||
- int ceiling; /* the number of output frames */
|
|
||||||
- int nbytes; /* the number of output bytes needed */
|
|
||||||
- int q = len / inrate;
|
|
||||||
- /* Now len = q * inrate + r exactly (with r = len % inrate),
|
|
||||||
- and this is less than q * inrate + inrate = (q+1)*inrate.
|
|
||||||
- So a reasonable upper bound on len*outrate/inrate is
|
|
||||||
- ((q+1)*inrate)*outrate/inrate =
|
|
||||||
- (q+1)*outrate.
|
|
||||||
- */
|
|
||||||
- ceiling = (q+1) * outrate;
|
|
||||||
- nbytes = ceiling * bytes_per_frame;
|
|
||||||
- /* See whether anything overflowed; if not, get the space. */
|
|
||||||
- if (q+1 < 0 ||
|
|
||||||
- ceiling / outrate != q+1 ||
|
|
||||||
- nbytes / bytes_per_frame != ceiling)
|
|
||||||
+ settle for a reasonable upper bound, though, in this
|
|
||||||
+ case ceiling(len/inrate) * outrate. */
|
|
||||||
+
|
|
||||||
+ /* compute ceiling(len/inrate) without overflow */
|
|
||||||
+ int q = len > 0 ? 1 + (len - 1) / inrate : 0;
|
|
||||||
+ if (outrate > INT_MAX / q / bytes_per_frame)
|
|
||||||
str = NULL;
|
|
||||||
else
|
|
||||||
- str = PyString_FromStringAndSize(NULL, nbytes);
|
|
||||||
+ str = PyString_FromStringAndSize(NULL,
|
|
||||||
+ q * outrate * bytes_per_frame);
|
|
||||||
|
|
||||||
if (str == NULL) {
|
|
||||||
PyErr_SetString(PyExc_MemoryError,
|
|
||||||
@@ -1296,7 +1283,7 @@ audioop_ulaw2lin(PyObject *self, PyObjec
|
|
||||||
unsigned char *cp;
|
|
||||||
unsigned char cval;
|
|
||||||
signed char *ncp;
|
|
||||||
- int len, new_len, size, val;
|
|
||||||
+ int len, size, val;
|
|
||||||
PyObject *rv;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
@@ -1309,18 +1296,17 @@ audioop_ulaw2lin(PyObject *self, PyObjec
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- new_len = len*size;
|
|
||||||
- if (new_len < 0) {
|
|
||||||
+ if (len > INT_MAX/size) {
|
|
||||||
PyErr_SetString(PyExc_MemoryError,
|
|
||||||
"not enough memory for output buffer");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
- rv = PyString_FromStringAndSize(NULL, new_len);
|
|
||||||
+ rv = PyString_FromStringAndSize(NULL, len*size);
|
|
||||||
if ( rv == 0 )
|
|
||||||
return 0;
|
|
||||||
ncp = (signed char *)PyString_AsString(rv);
|
|
||||||
|
|
||||||
- for ( i=0; i < new_len; i += size ) {
|
|
||||||
+ for ( i=0; i < len*size; i += size ) {
|
|
||||||
cval = *cp++;
|
|
||||||
val = st_ulaw2linear16(cval);
|
|
||||||
|
|
||||||
@@ -1370,7 +1356,7 @@ audioop_alaw2lin(PyObject *self, PyObjec
|
|
||||||
unsigned char *cp;
|
|
||||||
unsigned char cval;
|
|
||||||
signed char *ncp;
|
|
||||||
- int len, new_len, size, val;
|
|
||||||
+ int len, size, val;
|
|
||||||
PyObject *rv;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
@@ -1383,18 +1369,17 @@ audioop_alaw2lin(PyObject *self, PyObjec
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- new_len = len*size;
|
|
||||||
- if (new_len < 0) {
|
|
||||||
+ if (len > INT_MAX/size) {
|
|
||||||
PyErr_SetString(PyExc_MemoryError,
|
|
||||||
"not enough memory for output buffer");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
- rv = PyString_FromStringAndSize(NULL, new_len);
|
|
||||||
+ rv = PyString_FromStringAndSize(NULL, len*size);
|
|
||||||
if ( rv == 0 )
|
|
||||||
return 0;
|
|
||||||
ncp = (signed char *)PyString_AsString(rv);
|
|
||||||
|
|
||||||
- for ( i=0; i < new_len; i += size ) {
|
|
||||||
+ for ( i=0; i < len*size; i += size ) {
|
|
||||||
cval = *cp++;
|
|
||||||
val = st_alaw2linear16(cval);
|
|
||||||
|
|
||||||
@@ -1519,7 +1504,7 @@ audioop_adpcm2lin(PyObject *self, PyObje
|
|
||||||
{
|
|
||||||
signed char *cp;
|
|
||||||
signed char *ncp;
|
|
||||||
- int len, new_len, size, valpred, step, delta, index, sign, vpdiff;
|
|
||||||
+ int len, size, valpred, step, delta, index, sign, vpdiff;
|
|
||||||
PyObject *rv, *str, *state;
|
|
||||||
int i, inputbuffer = 0, bufferstep;
|
|
||||||
|
|
||||||
@@ -1541,13 +1526,12 @@ audioop_adpcm2lin(PyObject *self, PyObje
|
|
||||||
} else if ( !PyArg_ParseTuple(state, "ii", &valpred, &index) )
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
- new_len = len*size*2;
|
|
||||||
- if (new_len < 0) {
|
|
||||||
+ if (len > (INT_MAX/2)/size) {
|
|
||||||
PyErr_SetString(PyExc_MemoryError,
|
|
||||||
"not enough memory for output buffer");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
- str = PyString_FromStringAndSize(NULL, new_len);
|
|
||||||
+ str = PyString_FromStringAndSize(NULL, len*size*2);
|
|
||||||
if ( str == 0 )
|
|
||||||
return 0;
|
|
||||||
ncp = (signed char *)PyString_AsString(str);
|
|
||||||
@@ -1555,7 +1539,7 @@ audioop_adpcm2lin(PyObject *self, PyObje
|
|
||||||
step = stepsizeTable[index];
|
|
||||||
bufferstep = 0;
|
|
||||||
|
|
||||||
- for ( i=0; i < new_len; i += size ) {
|
|
||||||
+ for ( i=0; i < len*size*2; i += size ) {
|
|
||||||
/* Step 1 - get the delta value and compute next index */
|
|
||||||
if ( bufferstep ) {
|
|
||||||
delta = inputbuffer & 0xf;
|
|
|
@ -1,349 +0,0 @@
|
||||||
From ddc63ebe9b52c0ab4ba033301e70fac89f610704 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Victor Stinner <victor.stinner@haypocalc.com>
|
|
||||||
Date: Sun, 10 Jan 2010 21:10:01 +0100
|
|
||||||
Subject: [PATCH] audioop: check that length is a multiple the size
|
|
||||||
|
|
||||||
Most functions of audioop takes as input a byte string (audio data) and a size
|
|
||||||
argument (number of bytes of a sample). Functions don't check that the byte
|
|
||||||
string length is a multiple of the size. It leads to read and write from/to
|
|
||||||
uninitialised memory and might crash.
|
|
||||||
|
|
||||||
Example on writing into uninitilized memory:
|
|
||||||
|
|
||||||
$ python -c "import audioop; audioop.reverse('X', 2)"
|
|
||||||
Fatal Python error: Inconsistent interned string state.
|
|
||||||
Abandon
|
|
||||||
|
|
||||||
It allocates a string of 1 byte and write 2 bytes into this string => memory
|
|
||||||
corruption.
|
|
||||||
|
|
||||||
Attached patch creates audioop_check_size() and audioop_check_parameters()
|
|
||||||
functions.
|
|
||||||
---
|
|
||||||
Modules/audioop.c | 153 ++++++++++++++++++++++++----------------------------
|
|
||||||
1 files changed, 71 insertions(+), 82 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Modules/audioop.c b/Modules/audioop.c
|
|
||||||
index 42daf9b..ebb992a 100644
|
|
||||||
--- a/Modules/audioop.c
|
|
||||||
+++ b/Modules/audioop.c
|
|
||||||
@@ -295,6 +295,29 @@ static int stepsizeTable[89] = {
|
|
||||||
|
|
||||||
static PyObject *AudioopError;
|
|
||||||
|
|
||||||
+static int
|
|
||||||
+audioop_check_size(int size)
|
|
||||||
+{
|
|
||||||
+ if ( size != 1 && size != 2 && size != 4 ) {
|
|
||||||
+ PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
+ return 0;
|
|
||||||
+ } else {
|
|
||||||
+ return 1;
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int
|
|
||||||
+audioop_check_parameters(int len, int size)
|
|
||||||
+{
|
|
||||||
+ if (!audioop_check_size(size))
|
|
||||||
+ return 0;
|
|
||||||
+ if ( len % size != 0 ) {
|
|
||||||
+ PyErr_SetString(AudioopError, "not a whole number of frames");
|
|
||||||
+ return 0;
|
|
||||||
+ }
|
|
||||||
+ return 1;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
static PyObject *
|
|
||||||
audioop_getsample(PyObject *self, PyObject *args)
|
|
||||||
{
|
|
||||||
@@ -304,10 +327,8 @@ audioop_getsample(PyObject *self, PyObject *args)
|
|
||||||
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#ii:getsample", &cp, &len, &size, &i) )
|
|
||||||
return 0;
|
|
||||||
- if ( size != 1 && size != 2 && size != 4 ) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
if ( i < 0 || i >= len/size ) {
|
|
||||||
PyErr_SetString(AudioopError, "Index out of range");
|
|
||||||
return 0;
|
|
||||||
@@ -328,10 +349,8 @@ audioop_max(PyObject *self, PyObject *args)
|
|
||||||
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#i:max", &cp, &len, &size) )
|
|
||||||
return 0;
|
|
||||||
- if ( size != 1 && size != 2 && size != 4 ) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
for ( i=0; i<len; i+= size) {
|
|
||||||
if ( size == 1 ) val = (int)*CHARP(cp, i);
|
|
||||||
else if ( size == 2 ) val = (int)*SHORTP(cp, i);
|
|
||||||
@@ -352,10 +371,8 @@ audioop_minmax(PyObject *self, PyObject *args)
|
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "s#i:minmax", &cp, &len, &size))
|
|
||||||
return NULL;
|
|
||||||
- if (size != 1 && size != 2 && size != 4) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
return NULL;
|
|
||||||
- }
|
|
||||||
for (i = 0; i < len; i += size) {
|
|
||||||
if (size == 1) val = (int) *CHARP(cp, i);
|
|
||||||
else if (size == 2) val = (int) *SHORTP(cp, i);
|
|
||||||
@@ -376,10 +393,8 @@ audioop_avg(PyObject *self, PyObject *args)
|
|
||||||
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#i:avg", &cp, &len, &size) )
|
|
||||||
return 0;
|
|
||||||
- if ( size != 1 && size != 2 && size != 4 ) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
for ( i=0; i<len; i+= size) {
|
|
||||||
if ( size == 1 ) val = (int)*CHARP(cp, i);
|
|
||||||
else if ( size == 2 ) val = (int)*SHORTP(cp, i);
|
|
||||||
@@ -403,10 +418,8 @@ audioop_rms(PyObject *self, PyObject *args)
|
|
||||||
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#i:rms", &cp, &len, &size) )
|
|
||||||
return 0;
|
|
||||||
- if ( size != 1 && size != 2 && size != 4 ) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
for ( i=0; i<len; i+= size) {
|
|
||||||
if ( size == 1 ) val = (int)*CHARP(cp, i);
|
|
||||||
else if ( size == 2 ) val = (int)*SHORTP(cp, i);
|
|
||||||
@@ -614,10 +627,8 @@ audioop_avgpp(PyObject *self, PyObject *args)
|
|
||||||
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#i:avgpp", &cp, &len, &size) )
|
|
||||||
return 0;
|
|
||||||
- if ( size != 1 && size != 2 && size != 4 ) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
/* Compute first delta value ahead. Also automatically makes us
|
|
||||||
** skip the first extreme value
|
|
||||||
*/
|
|
||||||
@@ -671,10 +682,8 @@ audioop_maxpp(PyObject *self, PyObject *args)
|
|
||||||
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#i:maxpp", &cp, &len, &size) )
|
|
||||||
return 0;
|
|
||||||
- if ( size != 1 && size != 2 && size != 4 ) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
/* Compute first delta value ahead. Also automatically makes us
|
|
||||||
** skip the first extreme value
|
|
||||||
*/
|
|
||||||
@@ -722,10 +731,8 @@ audioop_cross(PyObject *self, PyObject *args)
|
|
||||||
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#i:cross", &cp, &len, &size) )
|
|
||||||
return 0;
|
|
||||||
- if ( size != 1 && size != 2 && size != 4 ) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
ncross = -1;
|
|
||||||
prevval = 17; /* Anything <> 0,1 */
|
|
||||||
for ( i=0; i<len; i+= size) {
|
|
||||||
@@ -750,6 +757,8 @@ audioop_mul(PyObject *self, PyObject *args)
|
|
||||||
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#id:mul", &cp, &len, &size, &factor ) )
|
|
||||||
return 0;
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
|
|
||||||
if ( size == 1 ) maxval = (double) 0x7f;
|
|
||||||
else if ( size == 2 ) maxval = (double) 0x7fff;
|
|
||||||
@@ -792,6 +801,12 @@ audioop_tomono(PyObject *self, PyObject *args)
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#idd:tomono",
|
|
||||||
&cp, &len, &size, &fac1, &fac2 ) )
|
|
||||||
return 0;
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
+ if ( ((len / size) & 1) != 0 ) {
|
|
||||||
+ PyErr_SetString(AudioopError, "not a whole number of frames");
|
|
||||||
+ return NULL;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if ( size == 1 ) maxval = (double) 0x7f;
|
|
||||||
else if ( size == 2 ) maxval = (double) 0x7fff;
|
|
||||||
@@ -837,6 +852,8 @@ audioop_tostereo(PyObject *self, PyObject *args)
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#idd:tostereo",
|
|
||||||
&cp, &len, &size, &fac1, &fac2 ) )
|
|
||||||
return 0;
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
|
|
||||||
if ( size == 1 ) maxval = (double) 0x7f;
|
|
||||||
else if ( size == 2 ) maxval = (double) 0x7fff;
|
|
||||||
@@ -896,7 +913,8 @@ audioop_add(PyObject *self, PyObject *args)
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#s#i:add",
|
|
||||||
&cp1, &len1, &cp2, &len2, &size ) )
|
|
||||||
return 0;
|
|
||||||
-
|
|
||||||
+ if (!audioop_check_parameters(len1, size))
|
|
||||||
+ return NULL;
|
|
||||||
if ( len1 != len2 ) {
|
|
||||||
PyErr_SetString(AudioopError, "Lengths should be the same");
|
|
||||||
return 0;
|
|
||||||
@@ -950,11 +968,8 @@ audioop_bias(PyObject *self, PyObject *args)
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#ii:bias",
|
|
||||||
&cp, &len, &size , &bias) )
|
|
||||||
return 0;
|
|
||||||
-
|
|
||||||
- if ( size != 1 && size != 2 && size != 4) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
|
|
||||||
rv = PyString_FromStringAndSize(NULL, len);
|
|
||||||
if ( rv == 0 )
|
|
||||||
@@ -986,12 +1001,9 @@ audioop_reverse(PyObject *self, PyObject *args)
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#i:reverse",
|
|
||||||
&cp, &len, &size) )
|
|
||||||
return 0;
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
|
|
||||||
- if ( size != 1 && size != 2 && size != 4 ) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
rv = PyString_FromStringAndSize(NULL, len);
|
|
||||||
if ( rv == 0 )
|
|
||||||
return 0;
|
|
||||||
@@ -1023,12 +1035,10 @@ audioop_lin2lin(PyObject *self, PyObject *args)
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#ii:lin2lin",
|
|
||||||
&cp, &len, &size, &size2) )
|
|
||||||
return 0;
|
|
||||||
-
|
|
||||||
- if ( (size != 1 && size != 2 && size != 4) ||
|
|
||||||
- (size2 != 1 && size2 != 2 && size2 != 4)) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
+ if (!audioop_check_size(size2))
|
|
||||||
+ return NULL;
|
|
||||||
|
|
||||||
new_len = (len/size)*size2;
|
|
||||||
if (new_len < 0) {
|
|
||||||
@@ -1080,10 +1090,8 @@ audioop_ratecv(PyObject *self, PyObject *args)
|
|
||||||
&nchannels, &inrate, &outrate, &state,
|
|
||||||
&weightA, &weightB))
|
|
||||||
return NULL;
|
|
||||||
- if (size != 1 && size != 2 && size != 4) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
+ if (!audioop_check_size(size))
|
|
||||||
return NULL;
|
|
||||||
- }
|
|
||||||
if (nchannels < 1) {
|
|
||||||
PyErr_SetString(AudioopError, "# of channels should be >= 1");
|
|
||||||
return NULL;
|
|
||||||
@@ -1269,11 +1277,8 @@ audioop_lin2ulaw(PyObject *self, PyObject *args)
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#i:lin2ulaw",
|
|
||||||
&cp, &len, &size) )
|
|
||||||
return 0 ;
|
|
||||||
-
|
|
||||||
- if ( size != 1 && size != 2 && size != 4) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
|
|
||||||
rv = PyString_FromStringAndSize(NULL, len/size);
|
|
||||||
if ( rv == 0 )
|
|
||||||
@@ -1303,11 +1308,8 @@ audioop_ulaw2lin(PyObject *self, PyObject *args)
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#i:ulaw2lin",
|
|
||||||
&cp, &len, &size) )
|
|
||||||
return 0;
|
|
||||||
-
|
|
||||||
- if ( size != 1 && size != 2 && size != 4) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ if (!audioop_check_size(size))
|
|
||||||
+ return NULL;
|
|
||||||
|
|
||||||
new_len = len*size;
|
|
||||||
if (new_len < 0) {
|
|
||||||
@@ -1343,11 +1345,8 @@ audioop_lin2alaw(PyObject *self, PyObject *args)
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#i:lin2alaw",
|
|
||||||
&cp, &len, &size) )
|
|
||||||
return 0;
|
|
||||||
-
|
|
||||||
- if ( size != 1 && size != 2 && size != 4) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
|
|
||||||
rv = PyString_FromStringAndSize(NULL, len/size);
|
|
||||||
if ( rv == 0 )
|
|
||||||
@@ -1377,11 +1376,8 @@ audioop_alaw2lin(PyObject *self, PyObject *args)
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#i:alaw2lin",
|
|
||||||
&cp, &len, &size) )
|
|
||||||
return 0;
|
|
||||||
-
|
|
||||||
- if ( size != 1 && size != 2 && size != 4) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ if (!audioop_check_size(size))
|
|
||||||
+ return NULL;
|
|
||||||
|
|
||||||
new_len = len*size;
|
|
||||||
if (new_len < 0) {
|
|
||||||
@@ -1418,12 +1414,8 @@ audioop_lin2adpcm(PyObject *self, PyObject *args)
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#iO:lin2adpcm",
|
|
||||||
&cp, &len, &size, &state) )
|
|
||||||
return 0;
|
|
||||||
-
|
|
||||||
-
|
|
||||||
- if ( size != 1 && size != 2 && size != 4) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ if (!audioop_check_parameters(len, size))
|
|
||||||
+ return NULL;
|
|
||||||
|
|
||||||
str = PyString_FromStringAndSize(NULL, len/(size*2));
|
|
||||||
if ( str == 0 )
|
|
||||||
@@ -1526,11 +1518,8 @@ audioop_adpcm2lin(PyObject *self, PyObject *args)
|
|
||||||
if ( !PyArg_ParseTuple(args, "s#iO:adpcm2lin",
|
|
||||||
&cp, &len, &size, &state) )
|
|
||||||
return 0;
|
|
||||||
-
|
|
||||||
- if ( size != 1 && size != 2 && size != 4) {
|
|
||||||
- PyErr_SetString(AudioopError, "Size should be 1, 2 or 4");
|
|
||||||
- return 0;
|
|
||||||
- }
|
|
||||||
+ if (!audioop_check_size(size))
|
|
||||||
+ return NULL;
|
|
||||||
|
|
||||||
/* Decode state, should have (value, step) */
|
|
||||||
if ( state == Py_None ) {
|
|
||||||
--
|
|
||||||
1.6.0.4
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
diff -ru Python-2.6.2-orig/Lib/ctypes/util.py Python-2.6.2/Lib/ctypes/util.py
|
|
||||||
--- Python-2.6.2-orig/Lib/ctypes/util.py 2009-01-10 12:11:11.000000000 -0500
|
|
||||||
+++ Python-2.6.2/Lib/ctypes/util.py 2009-07-30 15:17:39.000000000 -0400
|
|
||||||
@@ -133,7 +133,9 @@
|
|
||||||
dump = f.read()
|
|
||||||
rv = f.close()
|
|
||||||
if rv == 10:
|
|
||||||
- raise OSError, 'objdump command not found'
|
|
||||||
+ return os.path.basename(f) # This is good for GLibc, I think,
|
|
||||||
+ # and a dep on binutils is big (for
|
|
||||||
+ # live CDs).
|
|
||||||
res = re.search(r'\sSONAME\s+([^\s]+)', os.popen(cmd).read())
|
|
||||||
if not res:
|
|
||||||
return None
|
|
||||||
Only in Python-2.6.2/Lib/ctypes: util.py~
|
|
|
@ -1,67 +0,0 @@
|
||||||
diff -up Python-2.6.2/configure.in.expat Python-2.6.2/configure.in
|
|
||||||
--- Python-2.6.2/configure.in.expat 2010-01-25 21:46:42.700858981 -0500
|
|
||||||
+++ Python-2.6.2/configure.in 2010-01-25 21:46:54.710857387 -0500
|
|
||||||
@@ -1898,6 +1898,13 @@ LIBS="$withval $LIBS"
|
|
||||||
],
|
|
||||||
[AC_MSG_RESULT(no)])
|
|
||||||
|
|
||||||
+# Check for use of the system expat library
|
|
||||||
+AC_MSG_CHECKING(for --with-system-expat)
|
|
||||||
+AC_ARG_WITH(system_expat,
|
|
||||||
+ AC_HELP_STRING(--with-system-expat, build pyexpat module using an installed expat library))
|
|
||||||
+
|
|
||||||
+AC_MSG_RESULT($with_system_expat)
|
|
||||||
+
|
|
||||||
# Check for use of the system libffi library
|
|
||||||
AC_MSG_CHECKING(for --with-system-ffi)
|
|
||||||
AC_ARG_WITH(system_ffi,
|
|
||||||
diff -up Python-2.6.2/setup.py.expat Python-2.6.2/setup.py
|
|
||||||
--- Python-2.6.2/setup.py.expat 2010-01-25 21:46:48.490911125 -0500
|
|
||||||
+++ Python-2.6.2/setup.py 2010-01-25 21:46:54.711857933 -0500
|
|
||||||
@@ -1196,19 +1196,26 @@ class PyBuildExt(build_ext):
|
|
||||||
#
|
|
||||||
# More information on Expat can be found at www.libexpat.org.
|
|
||||||
#
|
|
||||||
- expatinc = os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')
|
|
||||||
- define_macros = [
|
|
||||||
- ('HAVE_EXPAT_CONFIG_H', '1'),
|
|
||||||
- ]
|
|
||||||
+ if '--with-system-expat' in sysconfig.get_config_var("CONFIG_ARGS"):
|
|
||||||
+ expat_inc = []
|
|
||||||
+ define_macros = []
|
|
||||||
+ expat_lib = ['expat']
|
|
||||||
+ expat_sources = []
|
|
||||||
+ else:
|
|
||||||
+ expat_inc = [os.path.join(os.getcwd(), srcdir, 'Modules', 'expat')]
|
|
||||||
+ define_macros = [
|
|
||||||
+ ('HAVE_EXPAT_CONFIG_H', '1'),
|
|
||||||
+ ]
|
|
||||||
+ expat_lib = []
|
|
||||||
+ expat_sources = ['expat/xmlparse.c',
|
|
||||||
+ 'expat/xmlrole.c',
|
|
||||||
+ 'expat/xmltok.c']
|
|
||||||
|
|
||||||
exts.append(Extension('pyexpat',
|
|
||||||
define_macros = define_macros,
|
|
||||||
- include_dirs = [expatinc],
|
|
||||||
- sources = ['pyexpat.c',
|
|
||||||
- 'expat/xmlparse.c',
|
|
||||||
- 'expat/xmlrole.c',
|
|
||||||
- 'expat/xmltok.c',
|
|
||||||
- ],
|
|
||||||
+ include_dirs = expat_inc,
|
|
||||||
+ libraries = expat_lib,
|
|
||||||
+ sources = ['pyexpat.c'] + expat_sources
|
|
||||||
))
|
|
||||||
|
|
||||||
# Fredrik Lundh's cElementTree module. Note that this also
|
|
||||||
@@ -1218,7 +1225,8 @@ class PyBuildExt(build_ext):
|
|
||||||
define_macros.append(('USE_PYEXPAT_CAPI', None))
|
|
||||||
exts.append(Extension('_elementtree',
|
|
||||||
define_macros = define_macros,
|
|
||||||
- include_dirs = [expatinc],
|
|
||||||
+ include_dirs = expat_inc,
|
|
||||||
+ libraries = expat_lib,
|
|
||||||
sources = ['_elementtree.c'],
|
|
||||||
))
|
|
||||||
else:
|
|
|
@ -1,167 +0,0 @@
|
||||||
Index: setup.py
|
|
||||||
===================================================================
|
|
||||||
--- setup.py (revision 78973)
|
|
||||||
+++ setup.py (revision 78974)
|
|
||||||
@@ -707,7 +707,7 @@
|
|
||||||
# a release. Most open source OSes come with one or more
|
|
||||||
# versions of BerkeleyDB already installed.
|
|
||||||
|
|
||||||
- max_db_ver = (4, 7)
|
|
||||||
+ max_db_ver = (4, 8)
|
|
||||||
min_db_ver = (3, 3)
|
|
||||||
db_setup_debug = False # verbose debug prints from this script?
|
|
||||||
|
|
||||||
Index: Lib/bsddb/test/test_basics.py
|
|
||||||
===================================================================
|
|
||||||
--- Lib/bsddb/test/test_basics.py (revision 78973)
|
|
||||||
+++ Lib/bsddb/test/test_basics.py (revision 78974)
|
|
||||||
@@ -1000,11 +1000,12 @@
|
|
||||||
# # See http://bugs.python.org/issue3307
|
|
||||||
# self.assertRaises(db.DBInvalidArgError, db.DB, None, 65535)
|
|
||||||
|
|
||||||
- def test02_DBEnv_dealloc(self):
|
|
||||||
- # http://bugs.python.org/issue3885
|
|
||||||
- import gc
|
|
||||||
- self.assertRaises(db.DBInvalidArgError, db.DBEnv, ~db.DB_RPCCLIENT)
|
|
||||||
- gc.collect()
|
|
||||||
+ if db.version() < (4, 8) :
|
|
||||||
+ def test02_DBEnv_dealloc(self):
|
|
||||||
+ # http://bugs.python.org/issue3885
|
|
||||||
+ import gc
|
|
||||||
+ self.assertRaises(db.DBInvalidArgError, db.DBEnv, ~db.DB_RPCCLIENT)
|
|
||||||
+ gc.collect()
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------
|
|
||||||
Index: Lib/bsddb/test/test_distributed_transactions.py
|
|
||||||
===================================================================
|
|
||||||
--- Lib/bsddb/test/test_distributed_transactions.py (revision 78973)
|
|
||||||
+++ Lib/bsddb/test/test_distributed_transactions.py (revision 78974)
|
|
||||||
@@ -35,7 +35,7 @@
|
|
||||||
db.DB_INIT_TXN | db.DB_INIT_LOG | db.DB_INIT_MPOOL |
|
|
||||||
db.DB_INIT_LOCK, 0666)
|
|
||||||
self.db = db.DB(self.dbenv)
|
|
||||||
- self.db.set_re_len(db.DB_XIDDATASIZE)
|
|
||||||
+ self.db.set_re_len(db.DB_GID_SIZE)
|
|
||||||
if must_open_db :
|
|
||||||
if db.version() > (4,1) :
|
|
||||||
txn=self.dbenv.txn_begin()
|
|
||||||
@@ -76,7 +76,7 @@
|
|
||||||
# let them be garbage collected.
|
|
||||||
for i in xrange(self.num_txns) :
|
|
||||||
txn = self.dbenv.txn_begin()
|
|
||||||
- gid = "%%%dd" %db.DB_XIDDATASIZE
|
|
||||||
+ gid = "%%%dd" %db.DB_GID_SIZE
|
|
||||||
gid = adapt(gid %i)
|
|
||||||
self.db.put(i, gid, txn=txn, flags=db.DB_APPEND)
|
|
||||||
txns.add(gid)
|
|
||||||
Index: Modules/_bsddb.c
|
|
||||||
===================================================================
|
|
||||||
--- Modules/_bsddb.c (revision 78973)
|
|
||||||
+++ Modules/_bsddb.c (revision 78974)
|
|
||||||
@@ -215,7 +215,11 @@
|
|
||||||
#define DB_BUFFER_SMALL ENOMEM
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#if (DBVER < 48)
|
|
||||||
+#define DB_GID_SIZE DB_XIDDATASIZE
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
+
|
|
||||||
/* --------------------------------------------------------------------- */
|
|
||||||
/* Structure definitions */
|
|
||||||
|
|
||||||
@@ -4501,7 +4505,11 @@
|
|
||||||
DBTxnObject *txn;
|
|
||||||
#define PREPLIST_LEN 16
|
|
||||||
DB_PREPLIST preplist[PREPLIST_LEN];
|
|
||||||
+#if (DBVER < 48)
|
|
||||||
long retp;
|
|
||||||
+#else
|
|
||||||
+ u_int32_t retp;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
CHECK_ENV_NOT_CLOSED(self);
|
|
||||||
|
|
||||||
@@ -4522,7 +4530,7 @@
|
|
||||||
flags=DB_NEXT; /* Prepare for next loop pass */
|
|
||||||
for (i=0; i<retp; i++) {
|
|
||||||
gid=PyBytes_FromStringAndSize((char *)(preplist[i].gid),
|
|
||||||
- DB_XIDDATASIZE);
|
|
||||||
+ DB_GID_SIZE);
|
|
||||||
if (!gid) {
|
|
||||||
Py_DECREF(list);
|
|
||||||
return NULL;
|
|
||||||
@@ -5047,6 +5055,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
+#if (DBVER < 48)
|
|
||||||
static PyObject*
|
|
||||||
DBEnv_set_rpc_server(DBEnvObject* self, PyObject* args, PyObject* kwargs)
|
|
||||||
{
|
|
||||||
@@ -5068,6 +5077,7 @@
|
|
||||||
RETURN_IF_ERR();
|
|
||||||
RETURN_NONE();
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
static PyObject*
|
|
||||||
DBEnv_set_verbose(DBEnvObject* self, PyObject* args)
|
|
||||||
@@ -5949,9 +5959,9 @@
|
|
||||||
if (!PyArg_ParseTuple(args, "s#:prepare", &gid, &gid_size))
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
- if (gid_size != DB_XIDDATASIZE) {
|
|
||||||
+ if (gid_size != DB_GID_SIZE) {
|
|
||||||
PyErr_SetString(PyExc_TypeError,
|
|
||||||
- "gid must be DB_XIDDATASIZE bytes long");
|
|
||||||
+ "gid must be DB_GID_SIZE bytes long");
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -6541,8 +6551,10 @@
|
|
||||||
#endif
|
|
||||||
{"set_get_returns_none",(PyCFunction)DBEnv_set_get_returns_none, METH_VARARGS},
|
|
||||||
{"txn_recover", (PyCFunction)DBEnv_txn_recover, METH_NOARGS},
|
|
||||||
+#if (DBVER < 48)
|
|
||||||
{"set_rpc_server", (PyCFunction)DBEnv_set_rpc_server,
|
|
||||||
METH_VARARGS||METH_KEYWORDS},
|
|
||||||
+#endif
|
|
||||||
{"set_verbose", (PyCFunction)DBEnv_set_verbose, METH_VARARGS},
|
|
||||||
#if (DBVER >= 42)
|
|
||||||
{"get_verbose", (PyCFunction)DBEnv_get_verbose, METH_VARARGS},
|
|
||||||
@@ -7091,6 +7103,7 @@
|
|
||||||
ADD_INT(d, DB_MAX_PAGES);
|
|
||||||
ADD_INT(d, DB_MAX_RECORDS);
|
|
||||||
|
|
||||||
+#if (DBVER < 48)
|
|
||||||
#if (DBVER >= 42)
|
|
||||||
ADD_INT(d, DB_RPCCLIENT);
|
|
||||||
#else
|
|
||||||
@@ -7098,7 +7111,11 @@
|
|
||||||
/* allow apps to be written using DB_RPCCLIENT on older Berkeley DB */
|
|
||||||
_addIntToDict(d, "DB_RPCCLIENT", DB_CLIENT);
|
|
||||||
#endif
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+#if (DBVER < 48)
|
|
||||||
ADD_INT(d, DB_XA_CREATE);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
ADD_INT(d, DB_CREATE);
|
|
||||||
ADD_INT(d, DB_NOMMAP);
|
|
||||||
@@ -7115,7 +7132,13 @@
|
|
||||||
ADD_INT(d, DB_INIT_TXN);
|
|
||||||
ADD_INT(d, DB_JOINENV);
|
|
||||||
|
|
||||||
+#if (DBVER >= 48)
|
|
||||||
+ ADD_INT(d, DB_GID_SIZE);
|
|
||||||
+#else
|
|
||||||
ADD_INT(d, DB_XIDDATASIZE);
|
|
||||||
+ /* Allow new code to work in old BDB releases */
|
|
||||||
+ _addIntToDict(d, "DB_GID_SIZE", DB_XIDDATASIZE);
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
ADD_INT(d, DB_RECOVER);
|
|
||||||
ADD_INT(d, DB_RECOVER_FATAL);
|
|
|
@ -1,14 +0,0 @@
|
||||||
Index: Objects/exceptions.c
|
|
||||||
===================================================================
|
|
||||||
--- Objects/exceptions.c (revision 82153)
|
|
||||||
+++ Objects/exceptions.c (working copy)
|
|
||||||
@@ -1784,9 +1784,6 @@
|
|
||||||
const char *encoding, const char *object, Py_ssize_t length,
|
|
||||||
Py_ssize_t start, Py_ssize_t end, const char *reason)
|
|
||||||
{
|
|
||||||
- assert(length < INT_MAX);
|
|
||||||
- assert(start < INT_MAX);
|
|
||||||
- assert(end < INT_MAX);
|
|
||||||
return PyObject_CallFunction(PyExc_UnicodeDecodeError, "ss#nns",
|
|
||||||
encoding, object, length, start, end, reason);
|
|
||||||
}
|
|
|
@ -1,62 +0,0 @@
|
||||||
From 21fda4c78000d78cb1824fdf0373031d07f5325a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Peter Jones <pjones@redhat.com>
|
|
||||||
Date: Wed, 6 Jan 2010 15:22:38 -0500
|
|
||||||
Subject: [PATCH] Add flags for statvfs.f_flag to constant list.
|
|
||||||
|
|
||||||
You really need these to figure out what statvfs is trying to say to
|
|
||||||
you, so add them here.
|
|
||||||
---
|
|
||||||
Modules/posixmodule.c | 37 +++++++++++++++++++++++++++++++++++++
|
|
||||||
1 files changed, 37 insertions(+), 0 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
|
|
||||||
index ebdbc8d..d79013b 100644
|
|
||||||
--- a/Modules/posixmodule.c
|
|
||||||
+++ b/Modules/posixmodule.c
|
|
||||||
@@ -8990,6 +8990,43 @@ all_ins(PyObject *d)
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+ /* These came from statvfs.h */
|
|
||||||
+#ifdef ST_RDONLY
|
|
||||||
+ if (ins(d, "ST_RDONLY", (long)ST_RDONLY)) return -1;
|
|
||||||
+#endif /* ST_RDONLY */
|
|
||||||
+#ifdef ST_NOSUID
|
|
||||||
+ if (ins(d, "ST_NOSUID", (long)ST_NOSUID)) return -1;
|
|
||||||
+#endif /* ST_NOSUID */
|
|
||||||
+
|
|
||||||
+ /* GNU extensions */
|
|
||||||
+#ifdef ST_NODEV
|
|
||||||
+ if (ins(d, "ST_NODEV", (long)ST_NODEV)) return -1;
|
|
||||||
+#endif /* ST_NODEV */
|
|
||||||
+#ifdef ST_NOEXEC
|
|
||||||
+ if (ins(d, "ST_NOEXEC", (long)ST_NOEXEC)) return -1;
|
|
||||||
+#endif /* ST_NOEXEC */
|
|
||||||
+#ifdef ST_SYNCHRONOUS
|
|
||||||
+ if (ins(d, "ST_SYNCHRONOUS", (long)ST_SYNCHRONOUS)) return -1;
|
|
||||||
+#endif /* ST_SYNCHRONOUS */
|
|
||||||
+#ifdef ST_MANDLOCK
|
|
||||||
+ if (ins(d, "ST_MANDLOCK", (long)ST_MANDLOCK)) return -1;
|
|
||||||
+#endif /* ST_MANDLOCK */
|
|
||||||
+#ifdef ST_WRITE
|
|
||||||
+ if (ins(d, "ST_WRITE", (long)ST_WRITE)) return -1;
|
|
||||||
+#endif /* ST_WRITE */
|
|
||||||
+#ifdef ST_APPEND
|
|
||||||
+ if (ins(d, "ST_APPEND", (long)ST_APPEND)) return -1;
|
|
||||||
+#endif /* ST_APPEND */
|
|
||||||
+#ifdef ST_NOATIME
|
|
||||||
+ if (ins(d, "ST_NOATIME", (long)ST_NOATIME)) return -1;
|
|
||||||
+#endif /* ST_NOATIME */
|
|
||||||
+#ifdef ST_NODIRATIME
|
|
||||||
+ if (ins(d, "ST_NODIRATIME", (long)ST_NODIRATIME)) return -1;
|
|
||||||
+#endif /* ST_NODIRATIME */
|
|
||||||
+#ifdef ST_RELATIME
|
|
||||||
+ if (ins(d, "ST_RELATIME", (long)ST_RELATIME)) return -1;
|
|
||||||
+#endif /* ST_RELATIME */
|
|
||||||
+
|
|
||||||
#if defined(PYOS_OS2)
|
|
||||||
if (insertvalues(d)) return -1;
|
|
||||||
#endif
|
|
||||||
--
|
|
||||||
1.6.6
|
|
||||||
|
|
|
@ -0,0 +1,223 @@
|
||||||
|
diff -up ./configure.autotool-intermediates ./configure
|
||||||
|
--- ./configure.autotool-intermediates 2010-07-08 13:12:59.973249048 -0400
|
||||||
|
+++ ./configure 2010-07-08 13:13:00.827247975 -0400
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
#! /bin/sh
|
||||||
|
-# From configure.in Revision: 81509 .
|
||||||
|
+# From configure.in Revision: 81582 .
|
||||||
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
|
# Generated by GNU Autoconf 2.65 for python 2.7.
|
||||||
|
#
|
||||||
|
@@ -611,6 +611,8 @@ TRUE
|
||||||
|
MACHDEP_OBJS
|
||||||
|
DYNLOADFILE
|
||||||
|
DLINCLDIR
|
||||||
|
+DTRACEHDRS
|
||||||
|
+DTRACEOBJS
|
||||||
|
THREADOBJ
|
||||||
|
LDLAST
|
||||||
|
USE_THREAD_MODULE
|
||||||
|
@@ -631,6 +633,8 @@ OTHER_LIBTOOL_OPT
|
||||||
|
UNIVERSAL_ARCH_FLAGS
|
||||||
|
BASECFLAGS
|
||||||
|
OPT
|
||||||
|
+DEBUG_SUFFIX
|
||||||
|
+DEBUG_EXT
|
||||||
|
LN
|
||||||
|
INSTALL_DATA
|
||||||
|
INSTALL_SCRIPT
|
||||||
|
@@ -748,8 +752,11 @@ with_pth
|
||||||
|
enable_ipv6
|
||||||
|
with_doc_strings
|
||||||
|
with_tsc
|
||||||
|
+with_count_allocs
|
||||||
|
+with_call_profile
|
||||||
|
with_pymalloc
|
||||||
|
with_valgrind
|
||||||
|
+with_dtrace
|
||||||
|
with_wctype_functions
|
||||||
|
with_fpectl
|
||||||
|
with_libm
|
||||||
|
@@ -1422,8 +1429,11 @@ Optional Packages:
|
||||||
|
--with-pth use GNU pth threading libraries
|
||||||
|
--with(out)-doc-strings disable/enable documentation strings
|
||||||
|
--with(out)-tsc enable/disable timestamp counter profile
|
||||||
|
+ --with(out)count-allocs enable/disable per-type instance accounting
|
||||||
|
+ --with(out)-call-profile enable/disable statistics on function call invocation
|
||||||
|
--with(out)-pymalloc disable/enable specialized mallocs
|
||||||
|
--with-valgrind Enable Valgrind support
|
||||||
|
+ --with(out)-dtrace disable/enable dtrace support
|
||||||
|
--with-wctype-functions use wctype.h functions
|
||||||
|
--with-fpectl enable SIGFPE catching
|
||||||
|
--with-libm=STRING math library
|
||||||
|
@@ -4739,7 +4749,7 @@ esac
|
||||||
|
$as_echo_n "checking LIBRARY... " >&6; }
|
||||||
|
if test -z "$LIBRARY"
|
||||||
|
then
|
||||||
|
- LIBRARY='libpython$(VERSION).a'
|
||||||
|
+ LIBRARY='libpython$(VERSION)$(DEBUG_EXT).a'
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
|
||||||
|
$as_echo "$LIBRARY" >&6; }
|
||||||
|
@@ -4913,8 +4923,8 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
|
||||||
|
INSTSONAME="$LDLIBRARY".$SOVERSION
|
||||||
|
;;
|
||||||
|
Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
|
||||||
|
- LDLIBRARY='libpython$(VERSION).so'
|
||||||
|
- BLDLIBRARY='-L. -lpython$(VERSION)'
|
||||||
|
+ LDLIBRARY='libpython$(VERSION)$(DEBUG_EXT).so'
|
||||||
|
+ BLDLIBRARY='-L. -lpython$(VERSION)$(DEBUG_EXT)'
|
||||||
|
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
|
||||||
|
case $ac_sys_system in
|
||||||
|
FreeBSD*)
|
||||||
|
@@ -4937,7 +4947,7 @@ $as_echo "#define Py_ENABLE_SHARED 1" >>
|
||||||
|
;;
|
||||||
|
OSF*)
|
||||||
|
LDLIBRARY='libpython$(VERSION).so'
|
||||||
|
- BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
|
||||||
|
+ BLDLIBRARY='-L. -lpython$(VERSION)'
|
||||||
|
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
|
||||||
|
;;
|
||||||
|
atheos*)
|
||||||
|
@@ -5314,6 +5324,14 @@ $as_echo "no" >&6; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
+if test "$Py_DEBUG" = 'true'
|
||||||
|
+then
|
||||||
|
+ DEBUG_EXT=_d
|
||||||
|
+ DEBUG_SUFFIX=-debug
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
|
||||||
|
# merged with this chunk of code?
|
||||||
|
|
||||||
|
@@ -9326,6 +9344,50 @@ $as_echo "no" >&6; }
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-count-allocs" >&5
|
||||||
|
+$as_echo_n "checking for --with-count-allocs... " >&6; }
|
||||||
|
+
|
||||||
|
+# Check whether --with-count-allocs was given.
|
||||||
|
+if test "${with_count_allocs+set}" = set; then :
|
||||||
|
+ withval=$with_count_allocs;
|
||||||
|
+if test "$withval" != no
|
||||||
|
+then
|
||||||
|
+
|
||||||
|
+$as_echo "#define COUNT_ALLOCS 1" >>confdefs.h
|
||||||
|
+
|
||||||
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
+$as_echo "yes" >&6; }
|
||||||
|
+else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
+$as_echo "no" >&6; }
|
||||||
|
+fi
|
||||||
|
+else
|
||||||
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
+$as_echo "no" >&6; }
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-call-profile" >&5
|
||||||
|
+$as_echo_n "checking for --with-call-profile... " >&6; }
|
||||||
|
+
|
||||||
|
+# Check whether --with-call-profile was given.
|
||||||
|
+if test "${with_call_profile+set}" = set; then :
|
||||||
|
+ withval=$with_call_profile;
|
||||||
|
+if test "$withval" != no
|
||||||
|
+then
|
||||||
|
+
|
||||||
|
+$as_echo "#define CALL_PROFILE 1" >>confdefs.h
|
||||||
|
+
|
||||||
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||||
|
+$as_echo "yes" >&6; }
|
||||||
|
+else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
+$as_echo "no" >&6; }
|
||||||
|
+fi
|
||||||
|
+else
|
||||||
|
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||||
|
+$as_echo "no" >&6; }
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+
|
||||||
|
# Check for Python-specific malloc support
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
|
||||||
|
$as_echo_n "checking for --with-pymalloc... " >&6; }
|
||||||
|
@@ -9375,6 +9437,46 @@ fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
+# Check for dtrace support
|
||||||
|
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dtrace" >&5
|
||||||
|
+$as_echo_n "checking for --with-dtrace... " >&6; }
|
||||||
|
+
|
||||||
|
+# Check whether --with-dtrace was given.
|
||||||
|
+if test "${with_dtrace+set}" = set; then :
|
||||||
|
+ withval=$with_dtrace;
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+if test ! -z "$with_dtrace"
|
||||||
|
+then
|
||||||
|
+ if dtrace -G -o /dev/null -s $srcdir/Include/pydtrace.d 2>/dev/null
|
||||||
|
+ then
|
||||||
|
+
|
||||||
|
+$as_echo "#define WITH_DTRACE 1" >>confdefs.h
|
||||||
|
+
|
||||||
|
+ with_dtrace="Sun"
|
||||||
|
+ DTRACEOBJS="Python/dtrace.o"
|
||||||
|
+ DTRADEHDRS=""
|
||||||
|
+ elif dtrace -h -o /dev/null -s $srcdir/Include/pydtrace.d
|
||||||
|
+ then
|
||||||
|
+
|
||||||
|
+$as_echo "#define WITH_DTRACE 1" >>confdefs.h
|
||||||
|
+
|
||||||
|
+ with_dtrace="Apple"
|
||||||
|
+ DTRACEOBJS=""
|
||||||
|
+ DTRADEHDRS="pydtrace.h"
|
||||||
|
+ else
|
||||||
|
+ with_dtrace="no"
|
||||||
|
+ fi
|
||||||
|
+else
|
||||||
|
+ with_dtrace="no"
|
||||||
|
+fi
|
||||||
|
+
|
||||||
|
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dtrace" >&5
|
||||||
|
+$as_echo "$with_dtrace" >&6; }
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
# Check for --with-wctype-functions
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
|
||||||
|
$as_echo_n "checking for --with-wctype-functions... " >&6; }
|
||||||
|
diff -up ./pyconfig.h.in.autotool-intermediates ./pyconfig.h.in
|
||||||
|
--- ./pyconfig.h.in.autotool-intermediates 2010-07-08 13:12:59.970252469 -0400
|
||||||
|
+++ ./pyconfig.h.in 2010-07-08 13:13:01.066127223 -0400
|
||||||
|
@@ -18,6 +18,12 @@
|
||||||
|
/* Define this if you have BeOS threads. */
|
||||||
|
#undef BEOS_THREADS
|
||||||
|
|
||||||
|
+/* Define to keep records on function call invocation */
|
||||||
|
+#undef CALL_PROFILE
|
||||||
|
+
|
||||||
|
+/* Define to keep records of the number of instances of each type */
|
||||||
|
+#undef COUNT_ALLOCS
|
||||||
|
+
|
||||||
|
/* Define if you have the Mach cthreads package */
|
||||||
|
#undef C_THREADS
|
||||||
|
|
||||||
|
@@ -1098,12 +1104,6 @@
|
||||||
|
/* Define to profile with the Pentium timestamp counter */
|
||||||
|
#undef WITH_TSC
|
||||||
|
|
||||||
|
-/* Define to keep records of the number of instances of each type */
|
||||||
|
-#undef COUNT_ALLOCS
|
||||||
|
-
|
||||||
|
-/* Define to keep records on function call invocation */
|
||||||
|
-#undef CALL_PROFILE
|
||||||
|
-
|
||||||
|
/* Define if you want pymalloc to be disabled when running under valgrind */
|
||||||
|
#undef WITH_VALGRIND
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
diff -up Python-2.7/Lib/sysconfig.py.lib64-sysconfig Python-2.7/Lib/sysconfig.py
|
||||||
|
--- Python-2.7/Lib/sysconfig.py.lib64-sysconfig 2010-07-08 14:18:41.386898476 -0400
|
||||||
|
+++ Python-2.7/Lib/sysconfig.py 2010-07-08 14:22:02.837896461 -0400
|
||||||
|
@@ -7,20 +7,20 @@ from os.path import pardir, realpath
|
||||||
|
|
||||||
|
_INSTALL_SCHEMES = {
|
||||||
|
'posix_prefix': {
|
||||||
|
- 'stdlib': '{base}/lib/python{py_version_short}',
|
||||||
|
- 'platstdlib': '{platbase}/lib/python{py_version_short}',
|
||||||
|
+ 'stdlib': '{base}/lib64/python{py_version_short}',
|
||||||
|
+ 'platstdlib': '{platbase}/lib64/python{py_version_short}',
|
||||||
|
'purelib': '{base}/lib/python{py_version_short}/site-packages',
|
||||||
|
- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
|
||||||
|
+ 'platlib': '{platbase}/lib64/python{py_version_short}/site-packages',
|
||||||
|
'include': '{base}/include/python{py_version_short}',
|
||||||
|
'platinclude': '{platbase}/include/python{py_version_short}',
|
||||||
|
'scripts': '{base}/bin',
|
||||||
|
'data': '{base}',
|
||||||
|
},
|
||||||
|
'posix_home': {
|
||||||
|
- 'stdlib': '{base}/lib/python',
|
||||||
|
- 'platstdlib': '{base}/lib/python',
|
||||||
|
+ 'stdlib': '{base}/lib64/python',
|
||||||
|
+ 'platstdlib': '{base}/lib64/python',
|
||||||
|
'purelib': '{base}/lib/python',
|
||||||
|
- 'platlib': '{base}/lib/python',
|
||||||
|
+ 'platlib': '{base}/lib64/python',
|
||||||
|
'include': '{base}/include/python',
|
||||||
|
'platinclude': '{base}/include/python',
|
||||||
|
'scripts': '{base}/bin',
|
||||||
|
@@ -65,10 +65,10 @@ _INSTALL_SCHEMES = {
|
||||||
|
'data' : '{userbase}',
|
||||||
|
},
|
||||||
|
'posix_user': {
|
||||||
|
- 'stdlib': '{userbase}/lib/python{py_version_short}',
|
||||||
|
- 'platstdlib': '{userbase}/lib/python{py_version_short}',
|
||||||
|
+ 'stdlib': '{userbase}/lib64/python{py_version_short}',
|
||||||
|
+ 'platstdlib': '{userbase}/lib64/python{py_version_short}',
|
||||||
|
'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
|
||||||
|
- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
|
||||||
|
+ 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages',
|
||||||
|
'include': '{userbase}/include/python{py_version_short}',
|
||||||
|
'scripts': '{userbase}/bin',
|
||||||
|
'data' : '{userbase}',
|
|
@ -0,0 +1,14 @@
|
||||||
|
diff -up Python-2.7rc1/Lib/ctypes/util.py.binutils-no-dep Python-2.7rc1/Lib/ctypes/util.py
|
||||||
|
--- Python-2.7rc1/Lib/ctypes/util.py.binutils-no-dep 2010-03-15 09:42:23.000000000 -0400
|
||||||
|
+++ Python-2.7rc1/Lib/ctypes/util.py 2010-06-06 05:03:02.155975210 -0400
|
||||||
|
@@ -140,7 +140,9 @@ elif os.name == "posix":
|
||||||
|
dump = f.read()
|
||||||
|
rv = f.close()
|
||||||
|
if rv == 10:
|
||||||
|
- raise OSError, 'objdump command not found'
|
||||||
|
+ return os.path.basename(f) # This is good for GLibc, I think,
|
||||||
|
+ # and a dep on binutils is big (for
|
||||||
|
+ # live CDs).
|
||||||
|
f = os.popen(cmd)
|
||||||
|
try:
|
||||||
|
data = f.read()
|
|
@ -1,6 +1,6 @@
|
||||||
diff -rup Python-2.5.1-orig/Python/codecs.c Python-2.5.1/Python/codecs.c
|
diff -up Python-2.7rc1/Python/codecs.c.ascii-tolower Python-2.7rc1/Python/codecs.c
|
||||||
--- Python-2.5.1-orig/Python/codecs.c 2006-06-23 17:16:18.000000000 -0400
|
--- Python-2.7rc1/Python/codecs.c.ascii-tolower 2010-05-09 10:46:46.000000000 -0400
|
||||||
+++ Python-2.5.1/Python/codecs.c 2007-10-30 12:51:10.000000000 -0400
|
+++ Python-2.7rc1/Python/codecs.c 2010-06-06 05:06:15.373100357 -0400
|
||||||
@@ -45,6 +45,11 @@ int PyCodec_Register(PyObject *search_fu
|
@@ -45,6 +45,11 @@ int PyCodec_Register(PyObject *search_fu
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,6 @@ diff -rup Python-2.5.1-orig/Python/codecs.c Python-2.5.1/Python/codecs.c
|
||||||
else
|
else
|
||||||
- ch = tolower(Py_CHARMASK(ch));
|
- ch = tolower(Py_CHARMASK(ch));
|
||||||
+ ch = ascii_tolower(Py_CHARMASK(ch));
|
+ ch = ascii_tolower(Py_CHARMASK(ch));
|
||||||
p[i] = ch;
|
p[i] = ch;
|
||||||
}
|
}
|
||||||
return v;
|
return v;
|
||||||
Only in Python-2.5.1/Python: codecs.c~
|
|
|
@ -1,6 +1,6 @@
|
||||||
diff -up Python-2.6.2/Modules/Setup.dist.rhconfig Python-2.6.2/Modules/Setup.dist
|
diff -up Python-2.7rc1/Modules/Setup.dist.rhconfig Python-2.7rc1/Modules/Setup.dist
|
||||||
--- Python-2.6.2/Modules/Setup.dist.rhconfig 2008-11-27 05:15:12.000000000 -0500
|
--- Python-2.7rc1/Modules/Setup.dist.rhconfig 2009-12-21 10:22:00.000000000 -0500
|
||||||
+++ Python-2.6.2/Modules/Setup.dist 2010-01-25 21:11:01.508867242 -0500
|
+++ Python-2.7rc1/Modules/Setup.dist 2010-06-05 23:51:30.579225134 -0400
|
||||||
@@ -152,7 +152,7 @@ GLHACK=-Dclear=__GLclear
|
@@ -152,7 +152,7 @@ GLHACK=-Dclear=__GLclear
|
||||||
# modules are to be built as shared libraries (see above for more
|
# modules are to be built as shared libraries (see above for more
|
||||||
# detail; also note that *static* reverses this effect):
|
# detail; also note that *static* reverses this effect):
|
||||||
|
@ -21,8 +21,8 @@ diff -up Python-2.6.2/Modules/Setup.dist.rhconfig Python-2.6.2/Modules/Setup.dis
|
||||||
# Modules that should always be present (non UNIX dependent):
|
# Modules that should always be present (non UNIX dependent):
|
||||||
|
|
||||||
-#array arraymodule.c # array objects
|
-#array arraymodule.c # array objects
|
||||||
-#cmath cmathmodule.c # -lm # complex math library functions
|
-#cmath cmathmodule.c _math.c # -lm # complex math library functions
|
||||||
-#math mathmodule.c # -lm # math library functions, e.g. sin()
|
-#math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
|
||||||
-#_struct _struct.c # binary structure packing/unpacking
|
-#_struct _struct.c # binary structure packing/unpacking
|
||||||
-#time timemodule.c # -lm # time operations and variables
|
-#time timemodule.c # -lm # time operations and variables
|
||||||
-#operator operator.c # operator.add() and similar goodies
|
-#operator operator.c # operator.add() and similar goodies
|
||||||
|
@ -34,8 +34,8 @@ diff -up Python-2.6.2/Modules/Setup.dist.rhconfig Python-2.6.2/Modules/Setup.dis
|
||||||
-#strop stropmodule.c # String manipulations
|
-#strop stropmodule.c # String manipulations
|
||||||
-#_functools _functoolsmodule.c # Tools for working with functions and callable objects
|
-#_functools _functoolsmodule.c # Tools for working with functions and callable objects
|
||||||
+array arraymodule.c # array objects
|
+array arraymodule.c # array objects
|
||||||
+cmath cmathmodule.c # -lm # complex math library functions
|
+cmath cmathmodule.c _math.c # -lm # complex math library functions
|
||||||
+math mathmodule.c # -lm # math library functions, e.g. sin()
|
+math mathmodule.c _math.c # -lm # math library functions, e.g. sin()
|
||||||
+_struct _struct.c # binary structure packing/unpacking
|
+_struct _struct.c # binary structure packing/unpacking
|
||||||
+time timemodule.c # -lm # time operations and variables
|
+time timemodule.c # -lm # time operations and variables
|
||||||
+operator operator.c # operator.add() and similar goodies
|
+operator operator.c # operator.add() and similar goodies
|
||||||
|
@ -101,7 +101,7 @@ diff -up Python-2.6.2/Modules/Setup.dist.rhconfig Python-2.6.2/Modules/Setup.dis
|
||||||
# First, look at Setup.config; configure may have set this for you.
|
# First, look at Setup.config; configure may have set this for you.
|
||||||
|
|
||||||
-#crypt cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems
|
-#crypt cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems
|
||||||
+crypt cryptmodule.c -lcrypt # crypt(3); needs -lcrypt on some systems
|
+crypt cryptmodule.c # -lcrypt # crypt(3); needs -lcrypt on some systems
|
||||||
|
|
||||||
|
|
||||||
# Some more UNIX dependent modules -- off by default, since these
|
# Some more UNIX dependent modules -- off by default, since these
|
|
@ -0,0 +1,85 @@
|
||||||
|
diff -up Python-2.7rc1/Modules/_ctypes/callbacks.c.selinux Python-2.7rc1/Modules/_ctypes/callbacks.c
|
||||||
|
--- Python-2.7rc1/Modules/_ctypes/callbacks.c.selinux 2010-05-09 10:46:46.000000000 -0400
|
||||||
|
+++ Python-2.7rc1/Modules/_ctypes/callbacks.c 2010-06-08 08:44:18.357366200 -0400
|
||||||
|
@@ -21,8 +21,8 @@ CThunkObject_dealloc(PyObject *_self)
|
||||||
|
Py_XDECREF(self->converters);
|
||||||
|
Py_XDECREF(self->callable);
|
||||||
|
Py_XDECREF(self->restype);
|
||||||
|
- if (self->pcl)
|
||||||
|
- _ctypes_free_closure(self->pcl);
|
||||||
|
+ if (self->pcl_write)
|
||||||
|
+ ffi_closure_free(self->pcl_write);
|
||||||
|
PyObject_GC_Del(self);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -391,7 +391,8 @@ static CThunkObject* CThunkObject_new(Py
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
- p->pcl = NULL;
|
||||||
|
+ p->pcl_exec = NULL;
|
||||||
|
+ p->pcl_write = NULL;
|
||||||
|
memset(&p->cif, 0, sizeof(p->cif));
|
||||||
|
p->converters = NULL;
|
||||||
|
p->callable = NULL;
|
||||||
|
@@ -421,8 +422,9 @@ CThunkObject *_ctypes_alloc_callback(PyO
|
||||||
|
|
||||||
|
assert(CThunk_CheckExact(p));
|
||||||
|
|
||||||
|
- p->pcl = _ctypes_alloc_closure();
|
||||||
|
- if (p->pcl == NULL) {
|
||||||
|
+ p->pcl_write = ffi_closure_alloc(sizeof(ffi_closure),
|
||||||
|
+ &p->pcl_exec);
|
||||||
|
+ if (p->pcl_write == NULL) {
|
||||||
|
PyErr_NoMemory();
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
@@ -467,7 +469,9 @@ CThunkObject *_ctypes_alloc_callback(PyO
|
||||||
|
"ffi_prep_cif failed with %d", result);
|
||||||
|
goto error;
|
||||||
|
}
|
||||||
|
- result = ffi_prep_closure(p->pcl, &p->cif, closure_fcn, p);
|
||||||
|
+ result = ffi_prep_closure_loc(p->pcl_write, &p->cif, closure_fcn,
|
||||||
|
+ p,
|
||||||
|
+ p->pcl_exec);
|
||||||
|
if (result != FFI_OK) {
|
||||||
|
PyErr_Format(PyExc_RuntimeError,
|
||||||
|
"ffi_prep_closure failed with %d", result);
|
||||||
|
diff -up Python-2.7rc1/Modules/_ctypes/_ctypes.c.selinux Python-2.7rc1/Modules/_ctypes/_ctypes.c
|
||||||
|
--- Python-2.7rc1/Modules/_ctypes/_ctypes.c.selinux 2010-05-09 10:46:46.000000000 -0400
|
||||||
|
+++ Python-2.7rc1/Modules/_ctypes/_ctypes.c 2010-06-07 23:19:39.950146038 -0400
|
||||||
|
@@ -3463,7 +3463,7 @@ PyCFuncPtr_new(PyTypeObject *type, PyObj
|
||||||
|
self->callable = callable;
|
||||||
|
|
||||||
|
self->thunk = thunk;
|
||||||
|
- *(void **)self->b_ptr = (void *)thunk->pcl;
|
||||||
|
+ *(void **)self->b_ptr = (void *)thunk->pcl_exec;
|
||||||
|
|
||||||
|
Py_INCREF((PyObject *)thunk); /* for KeepRef */
|
||||||
|
if (-1 == KeepRef((CDataObject *)self, 0, (PyObject *)thunk)) {
|
||||||
|
diff -up Python-2.7rc1/Modules/_ctypes/ctypes.h.selinux Python-2.7rc1/Modules/_ctypes/ctypes.h
|
||||||
|
--- Python-2.7rc1/Modules/_ctypes/ctypes.h.selinux 2010-05-09 10:46:46.000000000 -0400
|
||||||
|
+++ Python-2.7rc1/Modules/_ctypes/ctypes.h 2010-06-07 23:19:39.950146038 -0400
|
||||||
|
@@ -95,7 +95,8 @@ struct tagCDataObject {
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
PyObject_VAR_HEAD
|
||||||
|
- ffi_closure *pcl; /* the C callable */
|
||||||
|
+ ffi_closure *pcl_write; /* the C callable, writeable */
|
||||||
|
+ void *pcl_exec; /* the C callable, executable */
|
||||||
|
ffi_cif cif;
|
||||||
|
int flags;
|
||||||
|
PyObject *converters;
|
||||||
|
diff -up Python-2.7rc1/setup.py.selinux Python-2.7rc1/setup.py
|
||||||
|
--- Python-2.7rc1/setup.py.selinux 2010-06-07 23:19:39.922147795 -0400
|
||||||
|
+++ Python-2.7rc1/setup.py 2010-06-07 23:19:39.951145942 -0400
|
||||||
|
@@ -1864,8 +1864,7 @@ class PyBuildExt(build_ext):
|
||||||
|
'_ctypes/callbacks.c',
|
||||||
|
'_ctypes/callproc.c',
|
||||||
|
'_ctypes/stgdict.c',
|
||||||
|
- '_ctypes/cfield.c',
|
||||||
|
- '_ctypes/malloc_closure.c']
|
||||||
|
+ '_ctypes/cfield.c']
|
||||||
|
depends = ['_ctypes/ctypes.h']
|
||||||
|
|
||||||
|
if sys.platform == 'darwin':
|
|
@ -1,7 +1,7 @@
|
||||||
diff -up Python-2.6.5/configure.in.debug-build Python-2.6.5/configure.in
|
diff -up Python-2.7rc2/configure.in.debug-build Python-2.7rc2/configure.in
|
||||||
--- Python-2.6.5/configure.in.debug-build 2010-05-19 17:09:31.975902056 -0400
|
--- Python-2.7rc2/configure.in.debug-build 2010-06-24 12:59:28.166319997 -0400
|
||||||
+++ Python-2.6.5/configure.in 2010-05-19 17:09:31.986901987 -0400
|
+++ Python-2.7rc2/configure.in 2010-06-24 12:59:28.179376823 -0400
|
||||||
@@ -620,7 +620,7 @@ AC_SUBST(LIBRARY)
|
@@ -641,7 +641,7 @@ AC_SUBST(LIBRARY)
|
||||||
AC_MSG_CHECKING(LIBRARY)
|
AC_MSG_CHECKING(LIBRARY)
|
||||||
if test -z "$LIBRARY"
|
if test -z "$LIBRARY"
|
||||||
then
|
then
|
||||||
|
@ -10,7 +10,7 @@ diff -up Python-2.6.5/configure.in.debug-build Python-2.6.5/configure.in
|
||||||
fi
|
fi
|
||||||
AC_MSG_RESULT($LIBRARY)
|
AC_MSG_RESULT($LIBRARY)
|
||||||
|
|
||||||
@@ -748,8 +748,8 @@ if test $enable_shared = "yes"; then
|
@@ -786,8 +786,8 @@ if test $enable_shared = "yes"; then
|
||||||
INSTSONAME="$LDLIBRARY".$SOVERSION
|
INSTSONAME="$LDLIBRARY".$SOVERSION
|
||||||
;;
|
;;
|
||||||
Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
|
Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
|
||||||
|
@ -21,7 +21,7 @@ diff -up Python-2.6.5/configure.in.debug-build Python-2.6.5/configure.in
|
||||||
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
|
RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
|
||||||
case $ac_sys_system in
|
case $ac_sys_system in
|
||||||
FreeBSD*)
|
FreeBSD*)
|
||||||
@@ -847,6 +847,14 @@ else AC_MSG_RESULT(no); Py_DEBUG='false'
|
@@ -892,6 +892,14 @@ else AC_MSG_RESULT(no); Py_DEBUG='false'
|
||||||
fi],
|
fi],
|
||||||
[AC_MSG_RESULT(no)])
|
[AC_MSG_RESULT(no)])
|
||||||
|
|
||||||
|
@ -36,13 +36,13 @@ diff -up Python-2.6.5/configure.in.debug-build Python-2.6.5/configure.in
|
||||||
# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
|
# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
|
||||||
# merged with this chunk of code?
|
# merged with this chunk of code?
|
||||||
|
|
||||||
diff -up Python-2.6.5/Lib/distutils/command/build_ext.py.debug-build Python-2.6.5/Lib/distutils/command/build_ext.py
|
diff -up Python-2.7rc2/Lib/distutils/command/build_ext.py.debug-build Python-2.7rc2/Lib/distutils/command/build_ext.py
|
||||||
--- Python-2.6.5/Lib/distutils/command/build_ext.py.debug-build 2009-10-13 17:17:34.000000000 -0400
|
--- Python-2.7rc2/Lib/distutils/command/build_ext.py.debug-build 2010-04-01 14:17:09.000000000 -0400
|
||||||
+++ Python-2.6.5/Lib/distutils/command/build_ext.py 2010-05-19 18:17:14.678196678 -0400
|
+++ Python-2.7rc2/Lib/distutils/command/build_ext.py 2010-06-24 12:59:28.179376823 -0400
|
||||||
@@ -677,7 +677,10 @@ class build_ext (Command):
|
@@ -677,7 +677,10 @@ class build_ext (Command):
|
||||||
so_ext = get_config_var('SO')
|
so_ext = get_config_var('SO')
|
||||||
if os.name == 'nt' and self.debug:
|
if os.name == 'nt' and self.debug:
|
||||||
return apply(os.path.join, ext_path) + '_d' + so_ext
|
return os.path.join(*ext_path) + '_d' + so_ext
|
||||||
- return os.path.join(*ext_path) + so_ext
|
- return os.path.join(*ext_path) + so_ext
|
||||||
+
|
+
|
||||||
+ # Similarly, extensions in debug mode are named 'module_d.so', to
|
+ # Similarly, extensions in debug mode are named 'module_d.so', to
|
||||||
|
@ -60,20 +60,20 @@ diff -up Python-2.6.5/Lib/distutils/command/build_ext.py.debug-build Python-2.6.
|
||||||
return ext.libraries + [pythonlib]
|
return ext.libraries + [pythonlib]
|
||||||
else:
|
else:
|
||||||
return ext.libraries
|
return ext.libraries
|
||||||
diff -up Python-2.6.5/Lib/distutils/sysconfig.py.debug-build Python-2.6.5/Lib/distutils/sysconfig.py
|
diff -up Python-2.7rc2/Lib/distutils/sysconfig.py.debug-build Python-2.7rc2/Lib/distutils/sysconfig.py
|
||||||
--- Python-2.6.5/Lib/distutils/sysconfig.py.debug-build 2010-05-19 17:09:31.926155519 -0400
|
--- Python-2.7rc2/Lib/distutils/sysconfig.py.debug-build 2010-06-24 12:59:28.145319202 -0400
|
||||||
+++ Python-2.6.5/Lib/distutils/sysconfig.py 2010-05-19 17:09:31.987902863 -0400
|
+++ Python-2.7rc2/Lib/distutils/sysconfig.py 2010-06-24 12:59:28.180381519 -0400
|
||||||
@@ -81,7 +81,8 @@ def get_python_inc(plat_specific=0, pref
|
@@ -85,7 +85,8 @@ def get_python_inc(plat_specific=0, pref
|
||||||
if not os.path.exists(inc_dir):
|
# Include is located in the srcdir
|
||||||
inc_dir = os.path.join(os.path.dirname(base), "Include")
|
inc_dir = os.path.join(srcdir, "Include")
|
||||||
return inc_dir
|
return inc_dir
|
||||||
- return os.path.join(prefix, "include", "python" + get_python_version())
|
- return os.path.join(prefix, "include", "python" + get_python_version())
|
||||||
+ return os.path.join(prefix, "include",
|
+ return os.path.join(prefix, "include",
|
||||||
+ "python" + get_python_version() + (sys.pydebug and '-debug' or ''))
|
+ "python" + get_python_version() + (sys.pydebug and '-debug' or ''))
|
||||||
elif os.name == "nt":
|
elif os.name == "nt":
|
||||||
return os.path.join(prefix, "include")
|
return os.path.join(prefix, "include")
|
||||||
elif os.name == "mac":
|
elif os.name == "os2":
|
||||||
@@ -224,7 +225,7 @@ def get_makefile_filename():
|
@@ -211,7 +212,7 @@ def get_makefile_filename():
|
||||||
if python_build:
|
if python_build:
|
||||||
return os.path.join(os.path.dirname(sys.executable), "Makefile")
|
return os.path.join(os.path.dirname(sys.executable), "Makefile")
|
||||||
lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
|
lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
|
||||||
|
@ -82,10 +82,10 @@ diff -up Python-2.6.5/Lib/distutils/sysconfig.py.debug-build Python-2.6.5/Lib/di
|
||||||
|
|
||||||
|
|
||||||
def parse_config_h(fp, g=None):
|
def parse_config_h(fp, g=None):
|
||||||
diff -up Python-2.6.5/Makefile.pre.in.debug-build Python-2.6.5/Makefile.pre.in
|
diff -up Python-2.7rc2/Makefile.pre.in.debug-build Python-2.7rc2/Makefile.pre.in
|
||||||
--- Python-2.6.5/Makefile.pre.in.debug-build 2010-05-19 17:09:31.984901988 -0400
|
--- Python-2.7rc2/Makefile.pre.in.debug-build 2010-06-24 12:59:28.175377249 -0400
|
||||||
+++ Python-2.6.5/Makefile.pre.in 2010-05-19 17:09:31.987902863 -0400
|
+++ Python-2.7rc2/Makefile.pre.in 2010-06-24 13:01:24.559945307 -0400
|
||||||
@@ -96,8 +96,8 @@ SCRIPTDIR= $(prefix)/lib64
|
@@ -99,8 +99,8 @@ SCRIPTDIR= $(prefix)/lib64
|
||||||
# Detailed destination directories
|
# Detailed destination directories
|
||||||
BINLIBDEST= $(LIBDIR)/python$(VERSION)
|
BINLIBDEST= $(LIBDIR)/python$(VERSION)
|
||||||
LIBDEST= $(SCRIPTDIR)/python$(VERSION)
|
LIBDEST= $(SCRIPTDIR)/python$(VERSION)
|
||||||
|
@ -96,7 +96,7 @@ diff -up Python-2.6.5/Makefile.pre.in.debug-build Python-2.6.5/Makefile.pre.in
|
||||||
LIBP= $(LIBDIR)/python$(VERSION)
|
LIBP= $(LIBDIR)/python$(VERSION)
|
||||||
|
|
||||||
# Symbols used for using shared libraries
|
# Symbols used for using shared libraries
|
||||||
@@ -110,6 +110,12 @@ DESTSHARED= $(BINLIBDEST)/lib-dynload
|
@@ -114,6 +114,12 @@ DESTSHARED= $(BINLIBDEST)/lib-dynload
|
||||||
EXE= @EXEEXT@
|
EXE= @EXEEXT@
|
||||||
BUILDEXE= @BUILDEXEEXT@
|
BUILDEXE= @BUILDEXEEXT@
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ diff -up Python-2.6.5/Makefile.pre.in.debug-build Python-2.6.5/Makefile.pre.in
|
||||||
# Short name and location for Mac OS X Python framework
|
# Short name and location for Mac OS X Python framework
|
||||||
UNIVERSALSDK=@UNIVERSALSDK@
|
UNIVERSALSDK=@UNIVERSALSDK@
|
||||||
PYTHONFRAMEWORK= @PYTHONFRAMEWORK@
|
PYTHONFRAMEWORK= @PYTHONFRAMEWORK@
|
||||||
@@ -173,8 +179,8 @@ LIBOBJDIR= Python/
|
@@ -177,8 +183,8 @@ LIBOBJDIR= Python/
|
||||||
LIBOBJS= @LIBOBJS@
|
LIBOBJS= @LIBOBJS@
|
||||||
UNICODE_OBJS= @UNICODE_OBJS@
|
UNICODE_OBJS= @UNICODE_OBJS@
|
||||||
|
|
||||||
|
@ -120,8 +120,8 @@ diff -up Python-2.6.5/Makefile.pre.in.debug-build Python-2.6.5/Makefile.pre.in
|
||||||
|
|
||||||
# The task to run while instrument when building the profile-opt target
|
# The task to run while instrument when building the profile-opt target
|
||||||
PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
|
PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
|
||||||
@@ -399,7 +405,7 @@ sharedmods: $(BUILDPYTHON)
|
@@ -409,7 +415,7 @@ sharedmods: $(BUILDPYTHON)
|
||||||
*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
|
*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
|
||||||
esac
|
esac
|
||||||
|
|
||||||
-libpython$(VERSION).so: $(LIBRARY_OBJS)
|
-libpython$(VERSION).so: $(LIBRARY_OBJS)
|
||||||
|
@ -129,7 +129,7 @@ diff -up Python-2.6.5/Makefile.pre.in.debug-build Python-2.6.5/Makefile.pre.in
|
||||||
if test $(INSTSONAME) != $(LDLIBRARY); then \
|
if test $(INSTSONAME) != $(LDLIBRARY); then \
|
||||||
$(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
|
$(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
|
||||||
$(LN) -f $(INSTSONAME) $@; \
|
$(LN) -f $(INSTSONAME) $@; \
|
||||||
@@ -761,9 +767,9 @@ bininstall: altbininstall
|
@@ -788,9 +794,9 @@ bininstall: altbininstall
|
||||||
then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
|
then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \
|
||||||
else true; \
|
else true; \
|
||||||
fi
|
fi
|
||||||
|
@ -139,10 +139,10 @@ diff -up Python-2.6.5/Makefile.pre.in.debug-build Python-2.6.5/Makefile.pre.in
|
||||||
+ (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(DEBUG_SUFFIX)$(EXE) $(PYTHON))
|
+ (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(DEBUG_SUFFIX)$(EXE) $(PYTHON))
|
||||||
+ -rm -f $(DESTDIR)$(BINDIR)/python$(DEBUG_SUFFIX)-config
|
+ -rm -f $(DESTDIR)$(BINDIR)/python$(DEBUG_SUFFIX)-config
|
||||||
+ (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(DEBUG_SUFFIX)-config python$(DEBUG_SUFFIX)-config)
|
+ (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(DEBUG_SUFFIX)-config python$(DEBUG_SUFFIX)-config)
|
||||||
|
-test -d $(DESTDIR)$(LIBPC) || $(INSTALL) -d -m $(DIRMODE) $(DESTDIR)$(LIBPC)
|
||||||
# Install the interpreter with $(VERSION) affixed
|
-rm -f $(DESTDIR)$(LIBPC)/python.pc
|
||||||
# This goes into $(exec_prefix)
|
(cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python.pc)
|
||||||
@@ -776,7 +782,7 @@ altbininstall: $(BUILDPYTHON)
|
@@ -806,7 +812,7 @@ altbininstall: $(BUILDPYTHON)
|
||||||
else true; \
|
else true; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
@ -151,7 +151,21 @@ diff -up Python-2.6.5/Makefile.pre.in.debug-build Python-2.6.5/Makefile.pre.in
|
||||||
if test -f $(LDLIBRARY); then \
|
if test -f $(LDLIBRARY); then \
|
||||||
if test -n "$(DLLLIBRARY)" ; then \
|
if test -n "$(DLLLIBRARY)" ; then \
|
||||||
$(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \
|
$(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \
|
||||||
@@ -935,8 +941,8 @@ inclinstall:
|
@@ -951,10 +957,11 @@ $(srcdir)/Lib/$(PLATDIR):
|
||||||
|
export EXE; EXE="$(BUILDEXE)"; \
|
||||||
|
cd $(srcdir)/Lib/$(PLATDIR); $(RUNSHARED) ./regen
|
||||||
|
|
||||||
|
-python-config: $(srcdir)/Misc/python-config.in
|
||||||
|
+python$(DEBUG_SUFFIX)-config: $(srcdir)/Misc/python-config.in
|
||||||
|
# Substitution happens here, as the completely-expanded BINDIR
|
||||||
|
# is not available in configure
|
||||||
|
- sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
|
||||||
|
+ sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(DEBUG_SUFFIX)$(EXE)," < $(srcdir)/Misc/python-config.in >python$(DEBUG_SUFFIX)-config
|
||||||
|
+
|
||||||
|
|
||||||
|
# Install the include files
|
||||||
|
INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
|
||||||
|
@@ -975,13 +982,13 @@ inclinstall:
|
||||||
$(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
|
$(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h
|
||||||
|
|
||||||
# Install the library and miscellaneous stuff needed for extending/embedding
|
# Install the library and miscellaneous stuff needed for extending/embedding
|
||||||
|
@ -159,37 +173,40 @@ diff -up Python-2.6.5/Makefile.pre.in.debug-build Python-2.6.5/Makefile.pre.in
|
||||||
-LIBPL= $(LIBP)/config
|
-LIBPL= $(LIBP)/config
|
||||||
+# This goes into $(exec_prefix)$(DEBUG_SUFFIX)
|
+# This goes into $(exec_prefix)$(DEBUG_SUFFIX)
|
||||||
+LIBPL= $(LIBP)/config$(DEBUG_SUFFIX)
|
+LIBPL= $(LIBP)/config$(DEBUG_SUFFIX)
|
||||||
libainstall: all
|
|
||||||
@for i in $(LIBDIR) $(LIBP) $(LIBPL); \
|
# pkgconfig directory
|
||||||
|
LIBPC= $(LIBDIR)/pkgconfig
|
||||||
|
|
||||||
|
-libainstall: all python-config
|
||||||
|
+libainstall: all python$(DEBUG_SUFFIX)-config
|
||||||
|
@for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \
|
||||||
do \
|
do \
|
||||||
@@ -957,9 +963,9 @@ libainstall: all
|
if test ! -d $(DESTDIR)$$i; then \
|
||||||
|
@@ -1000,8 +1007,7 @@ libainstall: all python-config
|
||||||
|
$(INSTALL_DATA) Misc/python.pc $(DESTDIR)$(LIBPC)/python-$(VERSION).pc
|
||||||
|
$(INSTALL_SCRIPT) $(srcdir)/Modules/makesetup $(DESTDIR)$(LIBPL)/makesetup
|
||||||
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
|
$(INSTALL_SCRIPT) $(srcdir)/install-sh $(DESTDIR)$(LIBPL)/install-sh
|
||||||
# Substitution happens here, as the completely-expanded BINDIR
|
|
||||||
# is not available in configure
|
|
||||||
- sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(EXE)," < $(srcdir)/Misc/python-config.in >python-config
|
|
||||||
- $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config
|
- $(INSTALL_SCRIPT) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config
|
||||||
- rm python-config
|
- rm python-config
|
||||||
+ sed -e "s,@EXENAME@,$(BINDIR)/python$(VERSION)$(DEBUG_SUFFIX)$(EXE)," < $(srcdir)/Misc/python-config.in >python$(DEBUG_SUFFIX)-config
|
|
||||||
+ $(INSTALL_SCRIPT) python$(DEBUG_SUFFIX)-config $(DESTDIR)$(BINDIR)/python$(VERSION)$(DEBUG_SUFFIX)-config
|
+ $(INSTALL_SCRIPT) python$(DEBUG_SUFFIX)-config $(DESTDIR)$(BINDIR)/python$(VERSION)$(DEBUG_SUFFIX)-config
|
||||||
+ rm python$(DEBUG_SUFFIX)-config
|
|
||||||
@if [ -s Modules/python.exp -a \
|
@if [ -s Modules/python.exp -a \
|
||||||
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
|
"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
|
||||||
echo; echo "Installing support files for building shared extension modules on AIX:"; \
|
echo; echo "Installing support files for building shared extension modules on AIX:"; \
|
||||||
diff -up Python-2.6.5/Misc/python-config.in.debug-build Python-2.6.5/Misc/python-config.in
|
diff -up Python-2.7rc2/Misc/python-config.in.debug-build Python-2.7rc2/Misc/python-config.in
|
||||||
--- Python-2.6.5/Misc/python-config.in.debug-build 2007-03-31 14:56:11.000000000 -0400
|
--- Python-2.7rc2/Misc/python-config.in.debug-build 2010-03-18 20:08:44.000000000 -0400
|
||||||
+++ Python-2.6.5/Misc/python-config.in 2010-05-19 17:09:31.987902863 -0400
|
+++ Python-2.7rc2/Misc/python-config.in 2010-06-24 12:59:28.182375371 -0400
|
||||||
@@ -44,7 +44,7 @@ elif opt in ('--includes', '--cflags'):
|
@@ -45,7 +45,7 @@ for opt in opt_flags:
|
||||||
|
|
||||||
elif opt in ('--libs', '--ldflags'):
|
elif opt in ('--libs', '--ldflags'):
|
||||||
libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
|
libs = getvar('LIBS').split() + getvar('SYSLIBS').split()
|
||||||
- libs.append('-lpython'+pyver)
|
- libs.append('-lpython'+pyver)
|
||||||
+ libs.append('-lpython' + pyver + (sys.pydebug and "_d" or ""))
|
+ libs.append('-lpython' + pyver + (sys.pydebug and "_d" or ""))
|
||||||
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
|
# add the prefix/lib/pythonX.Y/config dir, but only if there is no
|
||||||
# shared library in prefix/lib/.
|
# shared library in prefix/lib/.
|
||||||
if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'):
|
if opt == '--ldflags':
|
||||||
diff -up Python-2.6.5/Modules/makesetup.debug-build Python-2.6.5/Modules/makesetup
|
diff -up Python-2.7rc2/Modules/makesetup.debug-build Python-2.7rc2/Modules/makesetup
|
||||||
--- Python-2.6.5/Modules/makesetup.debug-build 2007-09-05 07:47:34.000000000 -0400
|
--- Python-2.7rc2/Modules/makesetup.debug-build 2007-09-05 07:47:34.000000000 -0400
|
||||||
+++ Python-2.6.5/Modules/makesetup 2010-05-19 17:09:31.987902863 -0400
|
+++ Python-2.7rc2/Modules/makesetup 2010-06-24 12:59:28.182375371 -0400
|
||||||
@@ -233,7 +233,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
|
@@ -233,7 +233,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' |
|
||||||
*$mod.o*) base=$mod;;
|
*$mod.o*) base=$mod;;
|
||||||
*) base=${mod}module;;
|
*) base=${mod}module;;
|
||||||
|
@ -199,19 +216,19 @@ diff -up Python-2.6.5/Modules/makesetup.debug-build Python-2.6.5/Modules/makeset
|
||||||
case $doconfig in
|
case $doconfig in
|
||||||
no) SHAREDMODS="$SHAREDMODS $file";;
|
no) SHAREDMODS="$SHAREDMODS $file";;
|
||||||
esac
|
esac
|
||||||
diff -up Python-2.6.5/Python/dynload_shlib.c.debug-build Python-2.6.5/Python/dynload_shlib.c
|
diff -up Python-2.7rc2/Python/dynload_shlib.c.debug-build Python-2.7rc2/Python/dynload_shlib.c
|
||||||
--- Python-2.6.5/Python/dynload_shlib.c.debug-build 2006-01-03 20:30:17.000000000 -0500
|
--- Python-2.7rc2/Python/dynload_shlib.c.debug-build 2010-05-09 10:46:46.000000000 -0400
|
||||||
+++ Python-2.6.5/Python/dynload_shlib.c 2010-05-19 17:09:31.988902536 -0400
|
+++ Python-2.7rc2/Python/dynload_shlib.c 2010-06-24 12:59:28.183377733 -0400
|
||||||
@@ -46,11 +46,16 @@ const struct filedescr _PyImport_DynLoad
|
@@ -46,11 +46,16 @@ const struct filedescr _PyImport_DynLoad
|
||||||
{"module.exe", "rb", C_EXTENSION},
|
{"module.exe", "rb", C_EXTENSION},
|
||||||
{"MODULE.EXE", "rb", C_EXTENSION},
|
{"MODULE.EXE", "rb", C_EXTENSION},
|
||||||
#else
|
#else
|
||||||
+#ifdef Py_DEBUG
|
+#ifdef Py_DEBUG
|
||||||
+ {"_d.so", "rb", C_EXTENSION},
|
+ {"_d.so", "rb", C_EXTENSION},
|
||||||
+ {"module_d.so", "rb", C_EXTENSION},
|
+ {"module_d.so", "rb", C_EXTENSION},
|
||||||
+#else
|
+#else
|
||||||
{".so", "rb", C_EXTENSION},
|
{".so", "rb", C_EXTENSION},
|
||||||
{"module.so", "rb", C_EXTENSION},
|
{"module.so", "rb", C_EXTENSION},
|
||||||
-#endif
|
-#endif
|
||||||
-#endif
|
-#endif
|
||||||
-#endif
|
-#endif
|
||||||
|
@ -219,15 +236,15 @@ diff -up Python-2.6.5/Python/dynload_shlib.c.debug-build Python-2.6.5/Python/dyn
|
||||||
+#endif /* __VMS */
|
+#endif /* __VMS */
|
||||||
+#endif /* defined(PYOS_OS2) && defined(PYCC_GCC) */
|
+#endif /* defined(PYOS_OS2) && defined(PYCC_GCC) */
|
||||||
+#endif /* __CYGWIN__ */
|
+#endif /* __CYGWIN__ */
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
diff -up Python-2.6.5/Python/sysmodule.c.debug-build Python-2.6.5/Python/sysmodule.c
|
diff -up Python-2.7rc2/Python/sysmodule.c.debug-build Python-2.7rc2/Python/sysmodule.c
|
||||||
--- Python-2.6.5/Python/sysmodule.c.debug-build 2010-03-03 07:31:33.000000000 -0500
|
--- Python-2.7rc2/Python/sysmodule.c.debug-build 2010-05-21 13:12:38.000000000 -0400
|
||||||
+++ Python-2.6.5/Python/sysmodule.c 2010-05-19 17:09:31.988902536 -0400
|
+++ Python-2.7rc2/Python/sysmodule.c 2010-06-24 12:59:28.184375034 -0400
|
||||||
@@ -1436,6 +1436,12 @@ _PySys_Init(void)
|
@@ -1557,6 +1557,12 @@ _PySys_Init(void)
|
||||||
FlagsType.tp_init = NULL;
|
PyString_FromString("legacy"));
|
||||||
FlagsType.tp_new = NULL;
|
#endif
|
||||||
|
|
||||||
+#ifdef Py_DEBUG
|
+#ifdef Py_DEBUG
|
||||||
+ PyDict_SetItemString(sysdict, "pydebug", Py_True);
|
+ PyDict_SetItemString(sysdict, "pydebug", Py_True);
|
||||||
|
@ -236,5 +253,5 @@ diff -up Python-2.6.5/Python/sysmodule.c.debug-build Python-2.6.5/Python/sysmodu
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
#undef SET_SYS_FROM_STRING
|
#undef SET_SYS_FROM_STRING
|
||||||
if (PyErr_Occurred())
|
if (PyErr_Occurred())
|
||||||
return NULL;
|
return NULL;
|
|
@ -1,7 +1,7 @@
|
||||||
diff -up Python-2.6.4/configure.in.systemtap Python-2.6.4/configure.in
|
diff -up Python-2.7rc1/configure.in.systemtap Python-2.7rc1/configure.in
|
||||||
--- Python-2.6.4/configure.in.systemtap 2009-12-18 15:37:15.632242686 -0500
|
--- Python-2.7rc1/configure.in.systemtap 2010-06-06 10:53:15.514975012 -0400
|
||||||
+++ Python-2.6.4/configure.in 2009-12-18 15:37:15.713244483 -0500
|
+++ Python-2.7rc1/configure.in 2010-06-06 10:53:15.520974361 -0400
|
||||||
@@ -2481,6 +2481,38 @@ if test "$with_valgrind" != no; then
|
@@ -2616,6 +2616,38 @@ if test "$with_valgrind" != no; then
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -40,9 +40,9 @@ diff -up Python-2.6.4/configure.in.systemtap Python-2.6.4/configure.in
|
||||||
# Check for --with-wctype-functions
|
# Check for --with-wctype-functions
|
||||||
AC_MSG_CHECKING(for --with-wctype-functions)
|
AC_MSG_CHECKING(for --with-wctype-functions)
|
||||||
AC_ARG_WITH(wctype-functions,
|
AC_ARG_WITH(wctype-functions,
|
||||||
diff -up Python-2.6.4/Include/pydtrace.d.systemtap Python-2.6.4/Include/pydtrace.d
|
diff -up Python-2.7rc1/Include/pydtrace.d.systemtap Python-2.7rc1/Include/pydtrace.d
|
||||||
--- Python-2.6.4/Include/pydtrace.d.systemtap 2009-12-18 15:37:15.697243772 -0500
|
--- Python-2.7rc1/Include/pydtrace.d.systemtap 2010-06-06 10:53:15.520974361 -0400
|
||||||
+++ Python-2.6.4/Include/pydtrace.d 2009-12-18 15:37:15.697243772 -0500
|
+++ Python-2.7rc1/Include/pydtrace.d 2010-06-06 10:53:15.520974361 -0400
|
||||||
@@ -0,0 +1,10 @@
|
@@ -0,0 +1,10 @@
|
||||||
+provider python {
|
+provider python {
|
||||||
+ probe function__entry(const char *, const char *, int);
|
+ probe function__entry(const char *, const char *, int);
|
||||||
|
@ -54,10 +54,10 @@ diff -up Python-2.6.4/Include/pydtrace.d.systemtap Python-2.6.4/Include/pydtrace
|
||||||
+#pragma D attributes Private/Private/Common provider python function
|
+#pragma D attributes Private/Private/Common provider python function
|
||||||
+#pragma D attributes Evolving/Evolving/Common provider python name
|
+#pragma D attributes Evolving/Evolving/Common provider python name
|
||||||
+#pragma D attributes Evolving/Evolving/Common provider python args
|
+#pragma D attributes Evolving/Evolving/Common provider python args
|
||||||
diff -up Python-2.6.4/Makefile.pre.in.systemtap Python-2.6.4/Makefile.pre.in
|
diff -up Python-2.7rc1/Makefile.pre.in.systemtap Python-2.7rc1/Makefile.pre.in
|
||||||
--- Python-2.6.4/Makefile.pre.in.systemtap 2009-12-18 15:37:15.399242581 -0500
|
--- Python-2.7rc1/Makefile.pre.in.systemtap 2010-06-06 10:53:15.488978775 -0400
|
||||||
+++ Python-2.6.4/Makefile.pre.in 2009-12-18 15:37:15.715242573 -0500
|
+++ Python-2.7rc1/Makefile.pre.in 2010-06-06 11:05:30.411100568 -0400
|
||||||
@@ -290,6 +290,7 @@ PYTHON_OBJS= \
|
@@ -298,6 +298,7 @@ PYTHON_OBJS= \
|
||||||
Python/formatter_unicode.o \
|
Python/formatter_unicode.o \
|
||||||
Python/formatter_string.o \
|
Python/formatter_string.o \
|
||||||
Python/$(DYNLOADFILE) \
|
Python/$(DYNLOADFILE) \
|
||||||
|
@ -65,7 +65,7 @@ diff -up Python-2.6.4/Makefile.pre.in.systemtap Python-2.6.4/Makefile.pre.in
|
||||||
$(LIBOBJS) \
|
$(LIBOBJS) \
|
||||||
$(MACHDEP_OBJS) \
|
$(MACHDEP_OBJS) \
|
||||||
$(THREADOBJ)
|
$(THREADOBJ)
|
||||||
@@ -577,6 +578,18 @@ Python/formatter_unicode.o: $(srcdir)/Py
|
@@ -599,6 +600,18 @@ Python/formatter_unicode.o: $(srcdir)/Py
|
||||||
Python/formatter_string.o: $(srcdir)/Python/formatter_string.c \
|
Python/formatter_string.o: $(srcdir)/Python/formatter_string.c \
|
||||||
$(STRINGLIB_HEADERS)
|
$(STRINGLIB_HEADERS)
|
||||||
|
|
||||||
|
@ -84,18 +84,19 @@ diff -up Python-2.6.4/Makefile.pre.in.systemtap Python-2.6.4/Makefile.pre.in
|
||||||
############################################################################
|
############################################################################
|
||||||
# Header files
|
# Header files
|
||||||
|
|
||||||
@@ -1213,6 +1231,6 @@ Python/thread.o: @THREADHEADERS@
|
@@ -1251,7 +1264,7 @@ Python/thread.o: @THREADHEADERS@
|
||||||
.PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
|
.PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure
|
||||||
.PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
|
.PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools
|
||||||
.PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean
|
.PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean
|
||||||
-.PHONY: smelly funny patchcheck
|
-.PHONY: smelly funny patchcheck
|
||||||
+.PHONY: smelly funny patchcheck buildinclude
|
+.PHONY: smelly funny patchcheck buildinclude
|
||||||
|
.PHONY: gdbhooks
|
||||||
|
|
||||||
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
|
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
|
||||||
diff -up Python-2.6.4/pyconfig.h.in.systemtap Python-2.6.4/pyconfig.h.in
|
diff -up Python-2.7rc1/pyconfig.h.in.systemtap Python-2.7rc1/pyconfig.h.in
|
||||||
--- Python-2.6.4/pyconfig.h.in.systemtap 2009-12-18 15:37:15.649243175 -0500
|
--- Python-2.7rc1/pyconfig.h.in.systemtap 2010-05-08 07:04:18.000000000 -0400
|
||||||
+++ Python-2.6.4/pyconfig.h.in 2009-12-18 15:37:15.719242803 -0500
|
+++ Python-2.7rc1/pyconfig.h.in 2010-06-06 10:53:15.521974070 -0400
|
||||||
@@ -964,6 +989,9 @@
|
@@ -1074,6 +1074,9 @@
|
||||||
/* Define if you want documentation strings in extension modules */
|
/* Define if you want documentation strings in extension modules */
|
||||||
#undef WITH_DOC_STRINGS
|
#undef WITH_DOC_STRINGS
|
||||||
|
|
||||||
|
@ -105,9 +106,9 @@ diff -up Python-2.6.4/pyconfig.h.in.systemtap Python-2.6.4/pyconfig.h.in
|
||||||
/* Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic
|
/* Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic
|
||||||
linker (dyld) instead of the old-style (NextStep) dynamic linker (rld).
|
linker (dyld) instead of the old-style (NextStep) dynamic linker (rld).
|
||||||
Dyld is necessary to support frameworks. */
|
Dyld is necessary to support frameworks. */
|
||||||
diff -up Python-2.6.4/Python/ceval.c.systemtap Python-2.6.4/Python/ceval.c
|
diff -up Python-2.7rc1/Python/ceval.c.systemtap Python-2.7rc1/Python/ceval.c
|
||||||
--- Python-2.6.4/Python/ceval.c.systemtap 2009-05-30 17:43:48.000000000 -0400
|
--- Python-2.7rc1/Python/ceval.c.systemtap 2010-05-09 10:46:46.000000000 -0400
|
||||||
+++ Python-2.6.4/Python/ceval.c 2009-12-18 15:37:15.723242474 -0500
|
+++ Python-2.7rc1/Python/ceval.c 2010-06-06 11:08:40.683100500 -0400
|
||||||
@@ -19,6 +19,10 @@
|
@@ -19,6 +19,10 @@
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
@ -119,51 +120,51 @@ diff -up Python-2.6.4/Python/ceval.c.systemtap Python-2.6.4/Python/ceval.c
|
||||||
#ifndef WITH_TSC
|
#ifndef WITH_TSC
|
||||||
|
|
||||||
#define READ_TIMESTAMP(var)
|
#define READ_TIMESTAMP(var)
|
||||||
@@ -527,6 +531,55 @@ PyEval_EvalCode(PyCodeObject *co, PyObje
|
@@ -671,6 +675,55 @@ PyEval_EvalCode(PyCodeObject *co, PyObje
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
+#ifdef WITH_DTRACE
|
+#ifdef WITH_DTRACE
|
||||||
+static void
|
+static void
|
||||||
+dtrace_entry(PyFrameObject *f)
|
+dtrace_entry(PyFrameObject *f)
|
||||||
+{
|
+{
|
||||||
+ const char *filename;
|
+ const char *filename;
|
||||||
+ const char *fname;
|
+ const char *fname;
|
||||||
+ int lineno;
|
+ int lineno;
|
||||||
+
|
|
||||||
+ filename = PyString_AsString(f->f_code->co_filename);
|
|
||||||
+ fname = PyString_AsString(f->f_code->co_name);
|
|
||||||
+ lineno = PyCode_Addr2Line(f->f_code, f->f_lasti);
|
|
||||||
+
|
+
|
||||||
+ PYTHON_FUNCTION_ENTRY((char *)filename, (char *)fname, lineno);
|
+ filename = PyString_AsString(f->f_code->co_filename);
|
||||||
|
+ fname = PyString_AsString(f->f_code->co_name);
|
||||||
|
+ lineno = PyCode_Addr2Line(f->f_code, f->f_lasti);
|
||||||
+
|
+
|
||||||
+ /*
|
+ PYTHON_FUNCTION_ENTRY((char *)filename, (char *)fname, lineno);
|
||||||
+ * Currently a USDT tail-call will not receive the correct arguments.
|
+
|
||||||
+ * Disable the tail call here.
|
+ /*
|
||||||
+ */
|
+ * Currently a USDT tail-call will not receive the correct arguments.
|
||||||
|
+ * Disable the tail call here.
|
||||||
|
+ */
|
||||||
+#if defined(__sparc)
|
+#if defined(__sparc)
|
||||||
+ asm("nop");
|
+ asm("nop");
|
||||||
+#endif
|
+#endif
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static void
|
+static void
|
||||||
+dtrace_return(PyFrameObject *f)
|
+dtrace_return(PyFrameObject *f)
|
||||||
+{
|
+{
|
||||||
+ const char *filename;
|
+ const char *filename;
|
||||||
+ const char *fname;
|
+ const char *fname;
|
||||||
+ int lineno;
|
+ int lineno;
|
||||||
+
|
|
||||||
+ filename = PyString_AsString(f->f_code->co_filename);
|
|
||||||
+ fname = PyString_AsString(f->f_code->co_name);
|
|
||||||
+ lineno = PyCode_Addr2Line(f->f_code, f->f_lasti);
|
|
||||||
+ PYTHON_FUNCTION_RETURN((char *)filename, (char *)fname, lineno);
|
|
||||||
+
|
+
|
||||||
+ /*
|
+ filename = PyString_AsString(f->f_code->co_filename);
|
||||||
+ * Currently a USDT tail-call will not receive the correct arguments.
|
+ fname = PyString_AsString(f->f_code->co_name);
|
||||||
+ * Disable the tail call here.
|
+ lineno = PyCode_Addr2Line(f->f_code, f->f_lasti);
|
||||||
+ */
|
+ PYTHON_FUNCTION_RETURN((char *)filename, (char *)fname, lineno);
|
||||||
|
+
|
||||||
|
+ /*
|
||||||
|
+ * Currently a USDT tail-call will not receive the correct arguments.
|
||||||
|
+ * Disable the tail call here.
|
||||||
|
+ */
|
||||||
+#if defined(__sparc)
|
+#if defined(__sparc)
|
||||||
+ asm("nop");
|
+ asm("nop");
|
||||||
+#endif
|
+#endif
|
||||||
+}
|
+}
|
||||||
+#else
|
+#else
|
||||||
|
@ -175,22 +176,23 @@ diff -up Python-2.6.4/Python/ceval.c.systemtap Python-2.6.4/Python/ceval.c
|
||||||
|
|
||||||
/* Interpreter main loop */
|
/* Interpreter main loop */
|
||||||
|
|
||||||
@@ -763,6 +891,9 @@ PyEval_EvalFrameEx(PyFrameObject *f, int
|
@@ -909,6 +962,9 @@ PyEval_EvalFrameEx(PyFrameObject *f, int
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if (PYTHON_FUNCTION_ENTRY_ENABLED())
|
+ if (PYTHON_FUNCTION_ENTRY_ENABLED())
|
||||||
+ dtrace_entry(f);
|
+ dtrace_entry(f);
|
||||||
+
|
+
|
||||||
co = f->f_code;
|
co = f->f_code;
|
||||||
names = co->co_names;
|
names = co->co_names;
|
||||||
consts = co->co_consts;
|
consts = co->co_consts;
|
||||||
@@ -2723,6 +2863,8 @@ fast_yield:
|
@@ -3000,6 +3056,9 @@ fast_yield:
|
||||||
|
|
||||||
/* pop frame */
|
/* pop frame */
|
||||||
exit_eval_frame:
|
exit_eval_frame:
|
||||||
+ if (PYTHON_FUNCTION_RETURN_ENABLED())
|
+ if (PYTHON_FUNCTION_RETURN_ENABLED())
|
||||||
+ dtrace_return(f);
|
+ dtrace_return(f);
|
||||||
Py_LeaveRecursiveCall();
|
+
|
||||||
tstate->frame = f->f_back;
|
Py_LeaveRecursiveCall();
|
||||||
|
tstate->frame = f->f_back;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
diff -up Python-2.6/Lib/distutils/command/install.py.lib64 Python-2.6/Lib/distutils/command/install.py
|
diff -up Python-2.7rc1/Lib/distutils/command/install.py.lib64 Python-2.7rc1/Lib/distutils/command/install.py
|
||||||
--- Python-2.6/Lib/distutils/command/install.py.lib64 2008-05-06 18:41:46.000000000 -0400
|
--- Python-2.7rc1/Lib/distutils/command/install.py.lib64 2010-05-05 15:09:31.000000000 -0400
|
||||||
+++ Python-2.6/Lib/distutils/command/install.py 2008-11-24 02:34:04.000000000 -0500
|
+++ Python-2.7rc1/Lib/distutils/command/install.py 2010-06-05 23:53:24.802224367 -0400
|
||||||
@@ -42,14 +42,14 @@ else:
|
@@ -42,14 +42,14 @@ else:
|
||||||
INSTALL_SCHEMES = {
|
INSTALL_SCHEMES = {
|
||||||
'unix_prefix': {
|
'unix_prefix': {
|
||||||
|
@ -18,10 +18,10 @@ diff -up Python-2.6/Lib/distutils/command/install.py.lib64 Python-2.6/Lib/distut
|
||||||
'headers': '$base/include/python/$dist_name',
|
'headers': '$base/include/python/$dist_name',
|
||||||
'scripts': '$base/bin',
|
'scripts': '$base/bin',
|
||||||
'data' : '$base',
|
'data' : '$base',
|
||||||
diff -up Python-2.6/Lib/distutils/sysconfig.py.lib64 Python-2.6/Lib/distutils/sysconfig.py
|
diff -up Python-2.7rc1/Lib/distutils/sysconfig.py.lib64 Python-2.7rc1/Lib/distutils/sysconfig.py
|
||||||
--- Python-2.6/Lib/distutils/sysconfig.py.lib64 2008-06-05 08:58:24.000000000 -0400
|
--- Python-2.7rc1/Lib/distutils/sysconfig.py.lib64 2010-05-05 15:09:31.000000000 -0400
|
||||||
+++ Python-2.6/Lib/distutils/sysconfig.py 2008-11-24 02:34:04.000000000 -0500
|
+++ Python-2.7rc1/Lib/distutils/sysconfig.py 2010-06-05 23:53:24.803224186 -0400
|
||||||
@@ -115,8 +115,12 @@ def get_python_lib(plat_specific=0, stan
|
@@ -114,8 +114,12 @@ def get_python_lib(plat_specific=0, stan
|
||||||
prefix = plat_specific and EXEC_PREFIX or PREFIX
|
prefix = plat_specific and EXEC_PREFIX or PREFIX
|
||||||
|
|
||||||
if os.name == "posix":
|
if os.name == "posix":
|
||||||
|
@ -35,35 +35,30 @@ diff -up Python-2.6/Lib/distutils/sysconfig.py.lib64 Python-2.6/Lib/distutils/sy
|
||||||
if standard_lib:
|
if standard_lib:
|
||||||
return libpython
|
return libpython
|
||||||
else:
|
else:
|
||||||
diff -up Python-2.6/Lib/site.py.lib64 Python-2.6/Lib/site.py
|
diff -up Python-2.7rc1/Lib/site.py.lib64 Python-2.7rc1/Lib/site.py
|
||||||
--- Python-2.6/Lib/site.py.lib64 2008-05-10 13:36:24.000000000 -0400
|
--- Python-2.7rc1/Lib/site.py.lib64 2010-06-03 17:21:03.000000000 -0400
|
||||||
+++ Python-2.6/Lib/site.py 2008-11-24 02:35:51.000000000 -0500
|
+++ Python-2.7rc1/Lib/site.py 2010-06-06 04:56:41.504986054 -0400
|
||||||
@@ -265,12 +265,16 @@ def addsitepackages(known_paths):
|
@@ -286,12 +286,16 @@ def getsitepackages():
|
||||||
if sys.platform in ('os2emx', 'riscos'):
|
if sys.platform in ('os2emx', 'riscos'):
|
||||||
sitedirs.append(os.path.join(prefix, "Lib", "site-packages"))
|
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
|
||||||
elif os.sep == '/':
|
elif os.sep == '/':
|
||||||
+ sitedirs.append(os.path.join(prefix, "lib64",
|
+ sitepackages.append(os.path.join(prefix, "lib64",
|
||||||
+ "python" + sys.version[:3],
|
+ "python" + sys.version[:3],
|
||||||
+ "site-packages"))
|
+ "site-packages"))
|
||||||
sitedirs.append(os.path.join(prefix, "lib",
|
sitepackages.append(os.path.join(prefix, "lib",
|
||||||
"python" + sys.version[:3],
|
"python" + sys.version[:3],
|
||||||
"site-packages"))
|
"site-packages"))
|
||||||
sitedirs.append(os.path.join(prefix, "lib", "site-python"))
|
sitepackages.append(os.path.join(prefix, "lib", "site-python"))
|
||||||
else:
|
else:
|
||||||
sitedirs.append(prefix)
|
sitepackages.append(prefix)
|
||||||
+ sitedirs.append(os.path.join(prefix, "lib64", "site-packages"))
|
+ sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
|
||||||
sitedirs.append(os.path.join(prefix, "lib", "site-packages"))
|
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
|
||||||
|
|
||||||
if sys.platform == "darwin":
|
if sys.platform == "darwin":
|
||||||
diff -up Python-2.6/Makefile.pre.in.lib64 Python-2.6/Makefile.pre.in
|
# for framework builds *only* we add the standard Apple
|
||||||
--- Python-2.6/Makefile.pre.in.lib64 2008-11-24 02:34:04.000000000 -0500
|
diff -up Python-2.7rc1/Makefile.pre.in.lib64 Python-2.7rc1/Makefile.pre.in
|
||||||
+++ Python-2.6/Makefile.pre.in 2008-11-24 02:34:04.000000000 -0500
|
--- Python-2.7rc1/Makefile.pre.in.lib64 2010-06-05 23:53:24.000000000 -0400
|
||||||
@@ -87,11 +87,11 @@ datarootdir= @datarootdir@
|
+++ Python-2.7rc1/Makefile.pre.in 2010-06-06 04:57:25.280017307 -0400
|
||||||
|
@@ -94,7 +94,7 @@ LIBDIR= @libdir@
|
||||||
# Expanded directories
|
|
||||||
BINDIR= $(exec_prefix)/bin
|
|
||||||
-LIBDIR= $(exec_prefix)/lib
|
|
||||||
+LIBDIR= $(exec_prefix)/lib64
|
|
||||||
MANDIR= @mandir@
|
MANDIR= @mandir@
|
||||||
INCLUDEDIR= @includedir@
|
INCLUDEDIR= @includedir@
|
||||||
CONFINCLUDEDIR= $(exec_prefix)/include
|
CONFINCLUDEDIR= $(exec_prefix)/include
|
||||||
|
@ -72,9 +67,9 @@ diff -up Python-2.6/Makefile.pre.in.lib64 Python-2.6/Makefile.pre.in
|
||||||
|
|
||||||
# Detailed destination directories
|
# Detailed destination directories
|
||||||
BINLIBDEST= $(LIBDIR)/python$(VERSION)
|
BINLIBDEST= $(LIBDIR)/python$(VERSION)
|
||||||
diff -up Python-2.6/Modules/getpath.c.lib64 Python-2.6/Modules/getpath.c
|
diff -up Python-2.7rc1/Modules/getpath.c.lib64 Python-2.7rc1/Modules/getpath.c
|
||||||
--- Python-2.6/Modules/getpath.c.lib64 2007-03-10 02:38:14.000000000 -0500
|
--- Python-2.7rc1/Modules/getpath.c.lib64 2010-05-09 10:46:46.000000000 -0400
|
||||||
+++ Python-2.6/Modules/getpath.c 2008-11-24 02:34:04.000000000 -0500
|
+++ Python-2.7rc1/Modules/getpath.c 2010-06-06 04:58:53.840226352 -0400
|
||||||
@@ -117,8 +117,8 @@
|
@@ -117,8 +117,8 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -101,7 +96,7 @@ diff -up Python-2.6/Modules/getpath.c.lib64 Python-2.6/Modules/getpath.c
|
||||||
strncpy(zip_path, PREFIX, MAXPATHLEN);
|
strncpy(zip_path, PREFIX, MAXPATHLEN);
|
||||||
- joinpath(zip_path, "lib/python00.zip");
|
- joinpath(zip_path, "lib/python00.zip");
|
||||||
+ joinpath(zip_path, "lib64/python00.zip");
|
+ joinpath(zip_path, "lib64/python00.zip");
|
||||||
bufsz = strlen(zip_path); /* Replace "00" with version */
|
bufsz = strlen(zip_path); /* Replace "00" with version */
|
||||||
zip_path[bufsz - 6] = VERSION[0];
|
zip_path[bufsz - 6] = VERSION[0];
|
||||||
zip_path[bufsz - 5] = VERSION[2];
|
zip_path[bufsz - 5] = VERSION[2];
|
||||||
@@ -534,7 +534,7 @@ calculate_path(void)
|
@@ -534,7 +534,7 @@ calculate_path(void)
|
||||||
|
@ -113,10 +108,10 @@ diff -up Python-2.6/Modules/getpath.c.lib64 Python-2.6/Modules/getpath.c
|
||||||
}
|
}
|
||||||
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
|
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
|
||||||
|
|
||||||
diff -up Python-2.6/Modules/Setup.dist.lib64 Python-2.6/Modules/Setup.dist
|
diff -up Python-2.7rc1/Modules/Setup.dist.lib64 Python-2.7rc1/Modules/Setup.dist
|
||||||
--- Python-2.6/Modules/Setup.dist.lib64 2008-11-24 02:34:04.000000000 -0500
|
--- Python-2.7rc1/Modules/Setup.dist.lib64 2010-06-05 23:53:24.792224061 -0400
|
||||||
+++ Python-2.6/Modules/Setup.dist 2008-11-24 02:34:04.000000000 -0500
|
+++ Python-2.7rc1/Modules/Setup.dist 2010-06-05 23:53:24.845009526 -0400
|
||||||
@@ -408,7 +408,7 @@ gdbm gdbmmodule.c -I/usr/local/include -
|
@@ -413,7 +413,7 @@ gdbm gdbmmodule.c -lgdbm
|
||||||
# and the subdirectory of PORT where you built it.
|
# and the subdirectory of PORT where you built it.
|
||||||
DBLIBVER=4.7
|
DBLIBVER=4.7
|
||||||
DBINC=/usr/include/db4
|
DBINC=/usr/include/db4
|
||||||
|
@ -125,7 +120,7 @@ diff -up Python-2.6/Modules/Setup.dist.lib64 Python-2.6/Modules/Setup.dist
|
||||||
_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
|
_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
|
||||||
|
|
||||||
# Historical Berkeley DB 1.85
|
# Historical Berkeley DB 1.85
|
||||||
@@ -454,7 +454,7 @@ cPickle cPickle.c
|
@@ -459,7 +459,7 @@ cPickle cPickle.c
|
||||||
# Andrew Kuchling's zlib module.
|
# Andrew Kuchling's zlib module.
|
||||||
# This require zlib 1.1.3 (or later).
|
# This require zlib 1.1.3 (or later).
|
||||||
# See http://www.gzip.org/zlib/
|
# See http://www.gzip.org/zlib/
|
||||||
|
@ -134,10 +129,10 @@ diff -up Python-2.6/Modules/Setup.dist.lib64 Python-2.6/Modules/Setup.dist
|
||||||
|
|
||||||
# Interface to the Expat XML parser
|
# Interface to the Expat XML parser
|
||||||
#
|
#
|
||||||
diff -up Python-2.6/setup.py.lib64 Python-2.6/setup.py
|
diff -up Python-2.7rc1/setup.py.lib64 Python-2.7rc1/setup.py
|
||||||
--- Python-2.6/setup.py.lib64 2008-11-24 02:34:04.000000000 -0500
|
--- Python-2.7rc1/setup.py.lib64 2010-06-04 05:49:20.000000000 -0400
|
||||||
+++ Python-2.6/setup.py 2008-11-24 02:34:04.000000000 -0500
|
+++ Python-2.7rc1/setup.py 2010-06-06 05:00:36.653100371 -0400
|
||||||
@@ -310,7 +310,7 @@ class PyBuildExt(build_ext):
|
@@ -347,7 +347,7 @@ class PyBuildExt(build_ext):
|
||||||
|
|
||||||
def detect_modules(self):
|
def detect_modules(self):
|
||||||
# Ensure that /usr/local is always used
|
# Ensure that /usr/local is always used
|
||||||
|
@ -146,13 +141,13 @@ diff -up Python-2.6/setup.py.lib64 Python-2.6/setup.py
|
||||||
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
||||||
|
|
||||||
# Add paths specified in the environment variables LDFLAGS and
|
# Add paths specified in the environment variables LDFLAGS and
|
||||||
@@ -583,11 +583,11 @@ class PyBuildExt(build_ext):
|
@@ -643,11 +643,11 @@ class PyBuildExt(build_ext):
|
||||||
elif self.compiler.find_library_file(lib_dirs, 'curses'):
|
elif curses_library:
|
||||||
readline_libs.append('curses')
|
readline_libs.append(curses_library)
|
||||||
elif self.compiler.find_library_file(lib_dirs +
|
elif self.compiler.find_library_file(lib_dirs +
|
||||||
- ['/usr/lib/termcap'],
|
- ['/usr/lib/termcap'],
|
||||||
+ ['/usr/lib64/termcap'],
|
+ ['/usr/lib64/termcap'],
|
||||||
'termcap'):
|
'termcap'):
|
||||||
readline_libs.append('termcap')
|
readline_libs.append('termcap')
|
||||||
exts.append( Extension('readline', ['readline.c'],
|
exts.append( Extension('readline', ['readline.c'],
|
||||||
- library_dirs=['/usr/lib/termcap'],
|
- library_dirs=['/usr/lib/termcap'],
|
||||||
|
@ -160,7 +155,7 @@ diff -up Python-2.6/setup.py.lib64 Python-2.6/setup.py
|
||||||
extra_link_args=readline_extra_link_args,
|
extra_link_args=readline_extra_link_args,
|
||||||
libraries=readline_libs) )
|
libraries=readline_libs) )
|
||||||
else:
|
else:
|
||||||
@@ -624,8 +624,8 @@ class PyBuildExt(build_ext):
|
@@ -681,8 +681,8 @@ class PyBuildExt(build_ext):
|
||||||
if krb5_h:
|
if krb5_h:
|
||||||
ssl_incs += krb5_h
|
ssl_incs += krb5_h
|
||||||
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
|
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
|
|
@ -1,7 +1,7 @@
|
||||||
diff -up Python-2.6.4/Makefile.pre.in.no-static-lib Python-2.6.4/Makefile.pre.in
|
diff -up Python-2.7rc1/Makefile.pre.in.no-static-lib Python-2.7rc1/Makefile.pre.in
|
||||||
--- Python-2.6.4/Makefile.pre.in.no-static-lib 2010-01-18 13:11:10.975859689 -0500
|
--- Python-2.7rc1/Makefile.pre.in.no-static-lib 2010-06-06 14:47:52.929975429 -0400
|
||||||
+++ Python-2.6.4/Makefile.pre.in 2010-01-18 13:14:27.524859334 -0500
|
+++ Python-2.7rc1/Makefile.pre.in 2010-06-06 14:48:34.163350302 -0400
|
||||||
@@ -382,7 +382,7 @@ coverage:
|
@@ -393,7 +393,7 @@ coverage:
|
||||||
|
|
||||||
|
|
||||||
# Build the interpreter
|
# Build the interpreter
|
||||||
|
@ -10,26 +10,26 @@ diff -up Python-2.6.4/Makefile.pre.in.no-static-lib Python-2.6.4/Makefile.pre.in
|
||||||
$(LINKCC) $(CFLAGS) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
|
$(LINKCC) $(CFLAGS) $(LDFLAGS) $(LINKFORSHARED) -o $@ \
|
||||||
Modules/python.o \
|
Modules/python.o \
|
||||||
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
|
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
|
||||||
@@ -398,18 +398,6 @@ sharedmods: $(BUILDPYTHON)
|
@@ -409,18 +409,6 @@ sharedmods: $(BUILDPYTHON)
|
||||||
*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
|
*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
|
||||||
esac
|
esac
|
||||||
|
|
||||||
-# Build static library
|
-# Build static library
|
||||||
-# avoid long command lines, same as LIBRARY_OBJS
|
-# avoid long command lines, same as LIBRARY_OBJS
|
||||||
-$(LIBRARY): $(LIBRARY_OBJS)
|
-$(LIBRARY): $(LIBRARY_OBJS)
|
||||||
- -rm -f $@
|
- -rm -f $@
|
||||||
- $(AR) cr $@ Modules/getbuildinfo.o
|
- $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o
|
||||||
- $(AR) cr $@ $(PARSER_OBJS)
|
- $(AR) $(ARFLAGS) $@ $(PARSER_OBJS)
|
||||||
- $(AR) cr $@ $(OBJECT_OBJS)
|
- $(AR) $(ARFLAGS) $@ $(OBJECT_OBJS)
|
||||||
- $(AR) cr $@ $(PYTHON_OBJS)
|
- $(AR) $(ARFLAGS) $@ $(PYTHON_OBJS)
|
||||||
- $(AR) cr $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
|
- $(AR) $(ARFLAGS) $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
|
||||||
- $(AR) cr $@ $(MODOBJS)
|
- $(AR) $(ARFLAGS) $@ $(MODOBJS)
|
||||||
- $(RANLIB) $@
|
- $(RANLIB) $@
|
||||||
-
|
-
|
||||||
libpython$(VERSION).so: $(LIBRARY_OBJS)
|
libpython$(VERSION).so: $(LIBRARY_OBJS)
|
||||||
if test $(INSTSONAME) != $(LDLIBRARY); then \
|
if test $(INSTSONAME) != $(LDLIBRARY); then \
|
||||||
$(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
|
$(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \
|
||||||
@@ -945,18 +933,6 @@ libainstall: all
|
@@ -1002,18 +990,6 @@ libainstall: all python-config
|
||||||
else true; \
|
else true; \
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
|
@ -0,0 +1,64 @@
|
||||||
|
--- Python-2.7rc1/Modules/socketmodule.c.socketmodule 2010-05-09 10:46:46.000000000 -0400
|
||||||
|
+++ Python-2.7rc1/Modules/socketmodule.c 2010-06-07 23:04:19.374234780 -0400
|
||||||
|
@@ -4783,6 +4783,61 @@ init_socket(void)
|
||||||
|
PyModule_AddIntConstant(m, "SO_SETFIB", SO_SETFIB);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef SO_SNDBUFFORCE
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_SNDBUFFORCE", SO_SNDBUFFORCE);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_RCVBUFFORCE
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_RCVBUFFORCE", SO_RCVBUFFORCE);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_NO_CHECK
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_NO_CHECK", SO_NO_CHECK);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_PRIORITY
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_PRIORITY", SO_PRIORITY);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_BSDCOMPAT
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_BSDCOMPAT", SO_BSDCOMPAT);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_PASSCRED
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_PASSCRED", SO_PASSCRED);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_PEERCRED
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_PEERCRED", SO_PEERCRED);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_SECURITY_AUTHENTICATION
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_SECURITY_AUTHENTICATION", SO_SECURITY_AUTHENTICATION);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_SECURITY_ENCRYPTION_TRANSPORT
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_SECURITY_ENCRYPTION_TRANSPORT", SO_SECURITY_ENCRYPTION_TRANSPORT);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_SECURITY_ENCRYPTION_NETWORK
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_SECURITY_ENCRYPTION_NETWORK", SO_SECURITY_ENCRYPTION_NETWORK);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_BINDTODEVICE
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_BINDTODEVICE", SO_BINDTODEVICE);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_ATTACH_FILTER
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_ATTACH_FILTER", SO_ATTACH_FILTER);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_DETACH_FILTER
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_DETACH_FILTER", SO_DETACH_FILTER);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_PEERNAME
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_PEERNAME", SO_PEERNAME);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_TIMESTAMP
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_TIMESTAMP", SO_TIMESTAMP);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_PEERSEC
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_PEERSEC", SO_PEERSEC);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_PASSSEC
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_PASSSEC", SO_PASSSEC);
|
||||||
|
+#endif
|
||||||
|
+#ifdef SO_TIMESTAMPNS
|
||||||
|
+ PyModule_AddIntConstant(m, "SO_TIMESTAMPNS", SO_TIMESTAMPNS);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* Maximum number of connections for "listen" */
|
||||||
|
#ifdef SOMAXCONN
|
||||||
|
PyModule_AddIntConstant(m, "SOMAXCONN", SOMAXCONN);
|
|
@ -0,0 +1,19 @@
|
||||||
|
diff -up Python-2.7rc1/Modules/socketmodule.c.socketmodule2 Python-2.7rc1/Modules/socketmodule.c
|
||||||
|
--- Python-2.7rc1/Modules/socketmodule.c.socketmodule2 2010-06-07 23:06:59.133498087 -0400
|
||||||
|
+++ Python-2.7rc1/Modules/socketmodule.c 2010-06-07 23:11:51.249520087 -0400
|
||||||
|
@@ -5253,6 +5253,15 @@ init_socket(void)
|
||||||
|
#ifdef TCP_QUICKACK
|
||||||
|
PyModule_AddIntConstant(m, "TCP_QUICKACK", TCP_QUICKACK);
|
||||||
|
#endif
|
||||||
|
+#ifdef TCP_CONGESTION
|
||||||
|
+ PyModule_AddIntConstant(m, "TCP_CONGESTION", TCP_CONGESTION);
|
||||||
|
+#endif
|
||||||
|
+#ifdef TCP_MD5SIG
|
||||||
|
+ PyModule_AddIntConstant(m, "TCP_MD5SIG", TCP_MD5SIG);
|
||||||
|
+#endif
|
||||||
|
+#ifdef TCP_MD5SIG_MAXKEYLEN
|
||||||
|
+ PyModule_AddIntConstant(m, "TCP_MD5SIG_MAXKEYLEN", TCP_MD5SIG_MAXKEYLEN);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
|
||||||
|
/* IPX options */
|
|
@ -0,0 +1,47 @@
|
||||||
|
diff -up Python-2.7rc1/Modules/posixmodule.c.statvfs-f-flag-constants Python-2.7rc1/Modules/posixmodule.c
|
||||||
|
--- Python-2.7rc1/Modules/posixmodule.c.statvfs-f-flag-constants 2010-05-15 17:45:30.000000000 -0400
|
||||||
|
+++ Python-2.7rc1/Modules/posixmodule.c 2010-06-07 22:54:16.162068624 -0400
|
||||||
|
@@ -9174,6 +9174,43 @@ all_ins(PyObject *d)
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+ /* These came from statvfs.h */
|
||||||
|
+#ifdef ST_RDONLY
|
||||||
|
+ if (ins(d, "ST_RDONLY", (long)ST_RDONLY)) return -1;
|
||||||
|
+#endif /* ST_RDONLY */
|
||||||
|
+#ifdef ST_NOSUID
|
||||||
|
+ if (ins(d, "ST_NOSUID", (long)ST_NOSUID)) return -1;
|
||||||
|
+#endif /* ST_NOSUID */
|
||||||
|
+
|
||||||
|
+ /* GNU extensions */
|
||||||
|
+#ifdef ST_NODEV
|
||||||
|
+ if (ins(d, "ST_NODEV", (long)ST_NODEV)) return -1;
|
||||||
|
+#endif /* ST_NODEV */
|
||||||
|
+#ifdef ST_NOEXEC
|
||||||
|
+ if (ins(d, "ST_NOEXEC", (long)ST_NOEXEC)) return -1;
|
||||||
|
+#endif /* ST_NOEXEC */
|
||||||
|
+#ifdef ST_SYNCHRONOUS
|
||||||
|
+ if (ins(d, "ST_SYNCHRONOUS", (long)ST_SYNCHRONOUS)) return -1;
|
||||||
|
+#endif /* ST_SYNCHRONOUS */
|
||||||
|
+#ifdef ST_MANDLOCK
|
||||||
|
+ if (ins(d, "ST_MANDLOCK", (long)ST_MANDLOCK)) return -1;
|
||||||
|
+#endif /* ST_MANDLOCK */
|
||||||
|
+#ifdef ST_WRITE
|
||||||
|
+ if (ins(d, "ST_WRITE", (long)ST_WRITE)) return -1;
|
||||||
|
+#endif /* ST_WRITE */
|
||||||
|
+#ifdef ST_APPEND
|
||||||
|
+ if (ins(d, "ST_APPEND", (long)ST_APPEND)) return -1;
|
||||||
|
+#endif /* ST_APPEND */
|
||||||
|
+#ifdef ST_NOATIME
|
||||||
|
+ if (ins(d, "ST_NOATIME", (long)ST_NOATIME)) return -1;
|
||||||
|
+#endif /* ST_NOATIME */
|
||||||
|
+#ifdef ST_NODIRATIME
|
||||||
|
+ if (ins(d, "ST_NODIRATIME", (long)ST_NODIRATIME)) return -1;
|
||||||
|
+#endif /* ST_NODIRATIME */
|
||||||
|
+#ifdef ST_RELATIME
|
||||||
|
+ if (ins(d, "ST_RELATIME", (long)ST_RELATIME)) return -1;
|
||||||
|
+#endif /* ST_RELATIME */
|
||||||
|
+
|
||||||
|
#if defined(PYOS_OS2)
|
||||||
|
if (insertvalues(d)) return -1;
|
||||||
|
#endif
|
|
@ -0,0 +1,27 @@
|
||||||
|
Index: Misc/NEWS
|
||||||
|
===================================================================
|
||||||
|
--- Misc/NEWS (revision 79309)
|
||||||
|
+++ Misc/NEWS (revision 79310)
|
||||||
|
@@ -29,6 +29,9 @@
|
||||||
|
Library
|
||||||
|
-------
|
||||||
|
|
||||||
|
+- Issue #8205: Remove the "Modules" directory from sys.path when Python is
|
||||||
|
+ running from the build directory (POSIX only).
|
||||||
|
+
|
||||||
|
- Issue #7667: Fix doctest failures with non-ASCII paths.
|
||||||
|
|
||||||
|
- Issue #7512: shutil.copystat() could raise an OSError when the filesystem
|
||||||
|
Index: Lib/site.py
|
||||||
|
===================================================================
|
||||||
|
--- Lib/site.py (revision 79309)
|
||||||
|
+++ Lib/site.py (revision 79310)
|
||||||
|
@@ -118,7 +118,7 @@
|
||||||
|
s = "build/lib.%s-%.3s" % (get_platform(), sys.version)
|
||||||
|
if hasattr(sys, 'gettotalrefcount'):
|
||||||
|
s += '-pydebug'
|
||||||
|
- s = os.path.join(os.path.dirname(sys.path[-1]), s)
|
||||||
|
+ s = os.path.join(os.path.dirname(sys.path.pop()), s)
|
||||||
|
sys.path.append(s)
|
||||||
|
|
||||||
|
|
277
python.spec
277
python.spec
|
@ -1,5 +1,5 @@
|
||||||
%{!?__python_ver:%global __python_ver EMPTY}
|
%{!?__python_ver:%global __python_ver EMPTY}
|
||||||
#global __python_ver 26
|
#global __python_ver 27
|
||||||
%global unicode ucs4
|
%global unicode ucs4
|
||||||
|
|
||||||
%global _default_patch_fuzz 2
|
%global _default_patch_fuzz 2
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
%global tkinter tkinter
|
%global tkinter tkinter
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global pybasever 2.6
|
%global pybasever 2.7
|
||||||
%global pylibdir %{_libdir}/python%{pybasever}
|
%global pylibdir %{_libdir}/python%{pybasever}
|
||||||
%global tools_dir %{pylibdir}/Tools
|
%global tools_dir %{pylibdir}/Tools
|
||||||
%global demo_dir %{pylibdir}/Demo
|
%global demo_dir %{pylibdir}/Demo
|
||||||
|
@ -59,11 +59,39 @@
|
||||||
#
|
#
|
||||||
%global _python_bytecompile_errors_terminate_build 0
|
%global _python_bytecompile_errors_terminate_build 0
|
||||||
|
|
||||||
|
# We need to get a newer configure generated out of configure.in for the following
|
||||||
|
# patches:
|
||||||
|
# patch 4 (CFLAGS)
|
||||||
|
# patch 52 (valgrind)
|
||||||
|
# patch 55 (systemtap)
|
||||||
|
#
|
||||||
|
# For patch 55 (systemtap), we need to get a new header for configure to use
|
||||||
|
#
|
||||||
|
# configure.in requires autoconf-2.65, but the version in Fedora is currently
|
||||||
|
# autoconf-2.66
|
||||||
|
#
|
||||||
|
# For now, we'll generate a patch to the generated configure script and
|
||||||
|
# pyconfig.h.in on a machine that has a local copy of autoconf 2.65
|
||||||
|
#
|
||||||
|
# Instructions on obtaining such a copy can be seen at
|
||||||
|
# http://bugs.python.org/issue7997
|
||||||
|
#
|
||||||
|
# To make it easy to regenerate the patch, this specfile can be run in two
|
||||||
|
# ways:
|
||||||
|
# (i) regenerate_autotooling_patch 0 : the normal approach: prep the
|
||||||
|
# source tree using a pre-generated patch to the "configure" script, and do a
|
||||||
|
# full build
|
||||||
|
# (ii) regenerate_autotooling_patch 1 : intended to be run on a developer's
|
||||||
|
# workstation: prep the source tree without patching configure, then rerun a
|
||||||
|
# local copy of autoconf-2.65, regenerate the patch, then exit, without doing
|
||||||
|
# the rest of the build
|
||||||
|
%global regenerate_autotooling_patch 0
|
||||||
|
|
||||||
Summary: An interpreted, interactive, object-oriented programming language
|
Summary: An interpreted, interactive, object-oriented programming language
|
||||||
Name: %{python}
|
Name: %{python}
|
||||||
# Remember to also rebase python-docs when changing this:
|
# Remember to also rebase python-docs when changing this:
|
||||||
Version: 2.6.5
|
Version: 2.7
|
||||||
Release: 17%{?dist}
|
Release: 3%{?dist}
|
||||||
License: Python
|
License: Python
|
||||||
Group: Development/Languages
|
Group: Development/Languages
|
||||||
Provides: python-abi = %{pybasever}
|
Provides: python-abi = %{pybasever}
|
||||||
|
@ -71,23 +99,6 @@ Provides: python(abi) = %{pybasever}
|
||||||
Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
|
Source: http://www.python.org/ftp/python/%{version}/Python-%{version}.tar.bz2
|
||||||
|
|
||||||
|
|
||||||
# We install a collection of hooks for gdb that make it easier to debug
|
|
||||||
# executables linked against libpython (such as /usr/lib/python itself)
|
|
||||||
#
|
|
||||||
# These hooks are implemented in Python itself
|
|
||||||
#
|
|
||||||
# gdb-archer looks for them in the same path as the ELF file, with a -gdb.py suffix.
|
|
||||||
# We put them in the debuginfo package by installing them to e.g.:
|
|
||||||
# /usr/lib/debug/usr/lib/libpython2.6.so.1.0.debug-gdb.py
|
|
||||||
#
|
|
||||||
# See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more
|
|
||||||
# information
|
|
||||||
#
|
|
||||||
# Downloaded from:
|
|
||||||
# http://bugs.python.org/issue8032
|
|
||||||
# This is Tools/gdb/libpython.py from v5 of the patch
|
|
||||||
Source1: python-gdb.py
|
|
||||||
|
|
||||||
# Work around bug 562906 until it's fixed in rpm-build by providing a fixed
|
# Work around bug 562906 until it's fixed in rpm-build by providing a fixed
|
||||||
# version of pythondeps.sh:
|
# version of pythondeps.sh:
|
||||||
Source2: pythondeps.sh
|
Source2: pythondeps.sh
|
||||||
|
@ -173,7 +184,7 @@ Source5: pyfuntop.stp
|
||||||
# - _codecs_jp cjkcodecs/_codecs_jp.c
|
# - _codecs_jp cjkcodecs/_codecs_jp.c
|
||||||
# - _codecs_kr cjkcodecs/_codecs_kr.c
|
# - _codecs_kr cjkcodecs/_codecs_kr.c
|
||||||
# - _codecs_tw cjkcodecs/_codecs_tw.c
|
# - _codecs_tw cjkcodecs/_codecs_tw.c
|
||||||
Patch0: python-2.6.2-config.patch
|
Patch0: python-2.7rc1-config.patch
|
||||||
|
|
||||||
# Removes the "-g" option from "pydoc", for some reason; I believe
|
# Removes the "-g" option from "pydoc", for some reason; I believe
|
||||||
# (dmalcolm 2010-01-29) that this was introduced in this change:
|
# (dmalcolm 2010-01-29) that this was introduced in this change:
|
||||||
|
@ -183,10 +194,6 @@ Patch0: python-2.6.2-config.patch
|
||||||
# Not upstream
|
# Not upstream
|
||||||
Patch1: Python-2.2.1-pydocnogui.patch
|
Patch1: Python-2.2.1-pydocnogui.patch
|
||||||
|
|
||||||
# Fixup configure.in and setup.py to build against system expat library.
|
|
||||||
# Adapted from http://svn.python.org/view?view=rev&revision=77169
|
|
||||||
Patch3: python-2.6.2-with-system-expat.patch
|
|
||||||
|
|
||||||
# Add $(CFLAGS) to the linker arguments when linking the "python" binary
|
# Add $(CFLAGS) to the linker arguments when linking the "python" binary
|
||||||
# since some architectures (sparc64) need this (rhbz:199373).
|
# since some architectures (sparc64) need this (rhbz:199373).
|
||||||
# Not yet filed upstream
|
# Not yet filed upstream
|
||||||
|
@ -224,19 +231,19 @@ Patch7: python-2.5.1-sqlite-encoding.patch
|
||||||
# SONAME from a library; we avoid this, apparently to minimize space
|
# SONAME from a library; we avoid this, apparently to minimize space
|
||||||
# requirements on the live CD:
|
# requirements on the live CD:
|
||||||
# (rhbz:307221)
|
# (rhbz:307221)
|
||||||
Patch10: python-2.6.2-binutils-no-dep.patch
|
Patch10: python-2.7rc1-binutils-no-dep.patch
|
||||||
|
|
||||||
# FIXME: appears to relate to:
|
# FIXME: appears to relate to:
|
||||||
#* Tue Oct 30 2007 James Antill <jantill@redhat.com> - 2.5.1-15
|
#* Tue Oct 30 2007 James Antill <jantill@redhat.com> - 2.5.1-15
|
||||||
#- Do codec lowercase in C Locale.
|
#- Do codec lowercase in C Locale.
|
||||||
#- Resolves: 207134 191096
|
#- Resolves: 207134 191096
|
||||||
Patch11: python-2.5.1-codec-ascii-tolower.patch
|
Patch11: python-2.7rc1-codec-ascii-tolower.patch
|
||||||
|
|
||||||
# Add various constants to the socketmodule (rhbz#436560):
|
# Add various constants to the socketmodule (rhbz#436560):
|
||||||
# TODO: these patches were added in 2.5.1-22 and 2.5.1-24 but appear not to
|
# TODO: these patches were added in 2.5.1-22 and 2.5.1-24 but appear not to
|
||||||
# have been sent upstream yet:
|
# have been sent upstream yet:
|
||||||
Patch13: python-2.5.1-socketmodule-constants.patch
|
Patch13: python-2.7rc1-socketmodule-constants.patch
|
||||||
Patch14: python-2.5.1-socketmodule-constants2.patch
|
Patch14: python-2.7rc1-socketmodule-constants2.patch
|
||||||
|
|
||||||
# Remove an "-rpath $(LIBDIR)" argument from the linkage args in configure.in:
|
# Remove an "-rpath $(LIBDIR)" argument from the linkage args in configure.in:
|
||||||
# FIXME: is this for OSF, not Linux?
|
# FIXME: is this for OSF, not Linux?
|
||||||
|
@ -247,28 +254,15 @@ Patch16: python-2.6-rpath.patch
|
||||||
# super() as it's an old-style class
|
# super() as it's an old-style class
|
||||||
Patch17: python-2.6.4-distutils-rpath.patch
|
Patch17: python-2.6.4-distutils-rpath.patch
|
||||||
|
|
||||||
# Fix distutils to follow the Fedora/RHEL/CentOS policies of having .pyo files
|
# Patch setup.py so that it links against db-4.8:
|
||||||
Patch51: python-2.6-distutils_rpm.patch
|
|
||||||
|
|
||||||
# Automatically disable arena allocator when run under valgrind:
|
|
||||||
# From http://bugs.python.org/issue2422
|
|
||||||
# http://bugs.python.org/file9872/disable-pymalloc-on-valgrind-py26.patch
|
|
||||||
# with the "configure" part removed; appears to be identical to the version committed to 2.7
|
|
||||||
Patch52: disable-pymalloc-on-valgrind-py26.patch
|
|
||||||
|
|
||||||
|
|
||||||
# Upstream patch to compile against db-4.8
|
|
||||||
# http://bugs.python.org/issue6949
|
|
||||||
# Based on http://svn.python.org/view?view=rev&revision=78974
|
|
||||||
Patch53: python-2.6.5-db48.patch
|
|
||||||
# ...and a further patch to setup.py so that it links against 4.8:
|
|
||||||
Patch54: python-2.6.4-setup-db48.patch
|
Patch54: python-2.6.4-setup-db48.patch
|
||||||
|
|
||||||
# Systemtap support: add statically-defined probe points
|
# Systemtap support: add statically-defined probe points
|
||||||
# Patch based on upstream bug: http://bugs.python.org/issue4111
|
# Patch based on upstream bug: http://bugs.python.org/issue4111
|
||||||
# fixed up by mjw and wcohen for 2.6.2, then fixed up by dmalcolm for 2.6.4
|
# fixed up by mjw and wcohen for 2.6.2, then fixed up by dmalcolm for 2.6.4
|
||||||
# then rewritten by mjw (attachment 390110 of rhbz 545179)
|
# then rewritten by mjw (attachment 390110 of rhbz 545179), then reformatted
|
||||||
Patch55: python-2.6.4-dtrace.patch
|
# for 2.7rc1 by dmalcolm:
|
||||||
|
Patch55: python-2.7rc1-dtrace.patch
|
||||||
|
|
||||||
# "lib64 patches"
|
# "lib64 patches"
|
||||||
# This patch seems to be associated with bug 122304, which was
|
# This patch seems to be associated with bug 122304, which was
|
||||||
|
@ -289,7 +283,13 @@ Patch101: python-2.3.4-lib64-regex.patch
|
||||||
# and add the /usr/lib64/pythonMAJOR.MINOR/site-packages to sitedirs, in front of
|
# and add the /usr/lib64/pythonMAJOR.MINOR/site-packages to sitedirs, in front of
|
||||||
# /usr/lib/pythonMAJOR.MINOR/site-packages
|
# /usr/lib/pythonMAJOR.MINOR/site-packages
|
||||||
# Not upstream
|
# Not upstream
|
||||||
Patch102: python-2.6-lib64.patch
|
Patch102: python-2.7rc1-lib64.patch
|
||||||
|
|
||||||
|
# Python 2.7 split out much of the path-handling from distutils/sysconfig.py to
|
||||||
|
# a new sysconfig.py (in r77704).
|
||||||
|
# We need to make equivalent changes to that new file to ensure that the stdlib
|
||||||
|
# and platform-specific code go to /usr/lib64 not /usr/lib, on 64-bit archs:
|
||||||
|
Patch103: python-2.7-lib64-sysconfig.patch
|
||||||
|
|
||||||
# rhbz#488396: rework the ctypes module to use ffi_closure_alloc and
|
# rhbz#488396: rework the ctypes module to use ffi_closure_alloc and
|
||||||
# ffi_closure_free, rather than malloc_closure.c, since the latter tries to
|
# ffi_closure_free, rather than malloc_closure.c, since the latter tries to
|
||||||
|
@ -299,13 +299,14 @@ Patch102: python-2.6-lib64.patch
|
||||||
# a rebasing of the upstream copy of libffi to one containing the
|
# a rebasing of the upstream copy of libffi to one containing the
|
||||||
# memory-management hooks.
|
# memory-management hooks.
|
||||||
#
|
#
|
||||||
# This appears to be the same as that patch, but without the rebasing of libffi
|
# This is the same as that patch, but without the rebasing of libffi
|
||||||
# (since we use the system copy of libffi):
|
# (since we use the system copy of libffi), and rebased against 2.7 (which
|
||||||
Patch110: python-2.6-ctypes-noexecmem.patch
|
# has had a whitespace cleanup):
|
||||||
|
Patch110: python-2.7rc1-ctypes-noexecmem.patch
|
||||||
|
|
||||||
# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build
|
# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build
|
||||||
# a libpythonMAJOR.MINOR.a (bug 550692):
|
# a libpythonMAJOR.MINOR.a (bug 550692):
|
||||||
Patch111: python-2.6.4-no-static-lib.patch
|
Patch111: python-2.7rc1-no-static-lib.patch
|
||||||
|
|
||||||
# Patch to support building both optimized vs debug stacks DSO ABIs, sharing
|
# Patch to support building both optimized vs debug stacks DSO ABIs, sharing
|
||||||
# the same .py and .pyc files, using "_d.so" to signify a debug build of an
|
# the same .py and .pyc files, using "_d.so" to signify a debug build of an
|
||||||
|
@ -366,7 +367,7 @@ Patch111: python-2.6.4-no-static-lib.patch
|
||||||
# python$(VERSION)-config, so that the two configuration get different paths
|
# python$(VERSION)-config, so that the two configuration get different paths
|
||||||
# for these.
|
# for these.
|
||||||
|
|
||||||
Patch112: python-2.6.5-debug-build.patch
|
Patch112: python-2.7rc1-debug-build.patch
|
||||||
|
|
||||||
|
|
||||||
# Add configure-time support for the COUNT_ALLOCS and CALL_PROFILE options
|
# Add configure-time support for the COUNT_ALLOCS and CALL_PROFILE options
|
||||||
|
@ -377,34 +378,37 @@ Patch113: python-2.6.5-more-configuration-flags.patch
|
||||||
|
|
||||||
# Add flags for statvfs.f_flag to the constant list in posixmodule (i.e. "os")
|
# Add flags for statvfs.f_flag to the constant list in posixmodule (i.e. "os")
|
||||||
# (rhbz:553020); partially upstream as http://bugs.python.org/issue7647
|
# (rhbz:553020); partially upstream as http://bugs.python.org/issue7647
|
||||||
Patch114: python-2.6.5-statvfs-f_flag-constants.patch
|
Patch114: python-2.7rc1-statvfs-f_flag-constants.patch
|
||||||
|
|
||||||
# Make "pydoc -k" more robust in the face of broken modules
|
# Make "pydoc -k" more robust in the face of broken modules
|
||||||
# (rhbz:461419; patch sent upstream as http://bugs.python.org/issue7425 )
|
# (rhbz:461419; patch sent upstream as http://bugs.python.org/issue7425 )
|
||||||
Patch115: make-pydoc-more-robust-001.patch
|
Patch115: make-pydoc-more-robust-001.patch
|
||||||
|
|
||||||
# CVE-2010-1634: fix various integer overflow checks in the audioop module
|
|
||||||
# This is the difference from r81031 to r81080 (i.e r81046 and r81080), but
|
|
||||||
# backported to the old layout before the whitespeace cleanup to
|
|
||||||
# release26-maint (in r81031):
|
|
||||||
Patch116: python-2.6.2-CVE-2010-1634.patch
|
|
||||||
|
|
||||||
# CVE-2010-2089: verify sizes/lengths within audioop module:
|
|
||||||
Patch117: python-2.6.2-CVE-2010-2089.patch
|
|
||||||
|
|
||||||
# CVE-2008-5983: the new PySys_SetArgvEx entry point from r81399 (backported to
|
|
||||||
# the old layout before the whitespeace cleanup of release26-maint in r81031):
|
|
||||||
Patch118: python-2.6.2-CVE-2008-5983.patch
|
|
||||||
|
|
||||||
# Fix an incompatibility between pyexpat and the system expat-2.0.1 that led to
|
# Fix an incompatibility between pyexpat and the system expat-2.0.1 that led to
|
||||||
# a segfault running test_pyexpat.py (rhbz:583931)
|
# a segfault running test_pyexpat.py (rhbz:583931)
|
||||||
# Sent upstream as http://bugs.python.org/issue9054
|
# Sent upstream as http://bugs.python.org/issue9054
|
||||||
Patch119: python-2.6.5-fix-expat-issue9054.patch
|
Patch119: python-2.6.5-fix-expat-issue9054.patch
|
||||||
|
|
||||||
# Stop python bailing out with an assertion failure when UnicodeDecodeErrors
|
# Upstream r79310 removed the "Modules" directory from sys.path when Python is
|
||||||
# occur on very large buffers (rhbz:540518)
|
# running from the build directory on POSIX to fix a unit test (issue #8205).
|
||||||
# Sent upstream as http://bugs.python.org/issue9058
|
# This seems to have broken the compileall.py done in "make install": it cannot
|
||||||
Patch120: python-2.6.5-remove-PyUnicodeDecodeError_Create-assertions-issue9058.patch
|
# find shared library extension modules at this point in the build (sys.path
|
||||||
|
# does not contain DESTDIR/usr/lib(64)/python-2.7/lib-dynload for some reason),
|
||||||
|
# leading to the build failing with:
|
||||||
|
# Traceback (most recent call last):
|
||||||
|
# File "/home/david/rpmbuild/BUILDROOT/python-2.7-0.1.rc2.fc14.x86_64/usr/lib64/python2.7/compileall.py", line 17, in <module>
|
||||||
|
# import struct
|
||||||
|
# File "/home/david/rpmbuild/BUILDROOT/python-2.7-0.1.rc2.fc14.x86_64/usr/lib64/python2.7/struct.py", line 1, in <module>
|
||||||
|
# from _struct import *
|
||||||
|
# ImportError: No module named _struct
|
||||||
|
#
|
||||||
|
# For now, revert this patch:
|
||||||
|
Patch121: python-2.7rc2-r79310.patch
|
||||||
|
|
||||||
|
# This is the generated patch to "configure"; see the description of
|
||||||
|
# %{regenerate_autotooling_patch}
|
||||||
|
# above:
|
||||||
|
Patch300: python-2.7-autotool-intermediates.patch
|
||||||
|
|
||||||
%if %{main_python}
|
%if %{main_python}
|
||||||
Obsoletes: Distutils
|
Obsoletes: Distutils
|
||||||
|
@ -475,6 +479,7 @@ provides the libraries needed for this.
|
||||||
Summary: The libraries and header files needed for Python development
|
Summary: The libraries and header files needed for Python development
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
Requires: %{python}%{?_isa} = %{version}-%{release}
|
Requires: %{python}%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: pkgconfig
|
||||||
# Needed here because of the migration of Makefile from -devel to the main
|
# Needed here because of the migration of Makefile from -devel to the main
|
||||||
# package
|
# package
|
||||||
Conflicts: %{python} < %{version}-%{release}
|
Conflicts: %{python} < %{version}-%{release}
|
||||||
|
@ -600,7 +605,6 @@ rm -r Modules/zlib || exit 1
|
||||||
# Apply patches:
|
# Apply patches:
|
||||||
#
|
#
|
||||||
%patch0 -p1 -b .rhconfig
|
%patch0 -p1 -b .rhconfig
|
||||||
%patch3 -p1 -b .expat
|
|
||||||
%patch1 -p1 -b .no_gui
|
%patch1 -p1 -b .no_gui
|
||||||
%patch4 -p1 -b .cflags
|
%patch4 -p1 -b .cflags
|
||||||
%patch6 -p1 -b .plural
|
%patch6 -p1 -b .plural
|
||||||
|
@ -612,6 +616,7 @@ rm -r Modules/zlib || exit 1
|
||||||
%patch101 -p1 -b .lib64-regex
|
%patch101 -p1 -b .lib64-regex
|
||||||
%if "%{_lib}" == "lib64"
|
%if "%{_lib}" == "lib64"
|
||||||
%patch102 -p1 -b .lib64
|
%patch102 -p1 -b .lib64
|
||||||
|
%patch103 -p1 -b .lib64-sysconfig
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%patch10 -p1 -b .binutils-no-dep
|
%patch10 -p1 -b .binutils-no-dep
|
||||||
|
@ -621,9 +626,6 @@ rm -r Modules/zlib || exit 1
|
||||||
%patch16 -p1 -b .rpath
|
%patch16 -p1 -b .rpath
|
||||||
%patch17 -p1 -b .distutils-rpath
|
%patch17 -p1 -b .distutils-rpath
|
||||||
|
|
||||||
%patch51 -p1 -b .brprpm
|
|
||||||
%patch52 -p0 -b .valgrind
|
|
||||||
%patch53 -p0 -b .db48
|
|
||||||
%patch54 -p1 -b .setup-db48
|
%patch54 -p1 -b .setup-db48
|
||||||
%if 0%{?with_systemtap}
|
%if 0%{?with_systemtap}
|
||||||
%patch55 -p1 -b .systemtap
|
%patch55 -p1 -b .systemtap
|
||||||
|
@ -641,15 +643,18 @@ rm -r Modules/zlib || exit 1
|
||||||
|
|
||||||
%patch115 -p0
|
%patch115 -p0
|
||||||
|
|
||||||
%patch116 -p1 -b .CVE-2010-1634
|
|
||||||
%patch117 -p1 -b .CVE-2010-2089
|
|
||||||
%patch118 -p1 -b .CVE-2008-5983
|
|
||||||
%patch119 -p0 -b .fix-expat-issue9054
|
%patch119 -p0 -b .fix-expat-issue9054
|
||||||
%patch120 -p0 -b .remove-unicode-decode-error-assertions-issue9058
|
%patch121 -p0 -R
|
||||||
|
|
||||||
# This shouldn't be necesarry, but is right now (2.2a3)
|
# This shouldn't be necesarry, but is right now (2.2a3)
|
||||||
find -name "*~" |xargs rm -f
|
find -name "*~" |xargs rm -f
|
||||||
|
|
||||||
|
%if ! 0%{regenerate_autotooling_patch}
|
||||||
|
# Normally we apply the patch to "configure"
|
||||||
|
# We don't apply the patch if we're working towards regenerating it
|
||||||
|
%patch300 -p0 -b .autotool-intermediates
|
||||||
|
%endif
|
||||||
|
|
||||||
%build
|
%build
|
||||||
topdir=$(pwd)
|
topdir=$(pwd)
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
|
export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv"
|
||||||
|
@ -664,17 +669,30 @@ fi
|
||||||
# Force CC
|
# Force CC
|
||||||
export CC=gcc
|
export CC=gcc
|
||||||
|
|
||||||
# We need to get a newer configure generated out of configure.in for the following
|
%if 0%{regenerate_autotooling_patch}
|
||||||
# patches:
|
# If enabled, this code regenerates the patch to "configure", using a
|
||||||
# patch 4 (CFLAGS)
|
# local copy of autoconf-2.65, then exits the build
|
||||||
# patch 52 (valgrind)
|
#
|
||||||
# patch 55 (systemtap)
|
# The following assumes that the copy is installed to ~/autoconf-2.65/bin
|
||||||
# Rerun autoconf:
|
# as per these instructions:
|
||||||
autoconf
|
# http://bugs.python.org/issue7997
|
||||||
|
|
||||||
# For patch 55 (systemtap), we need to get a new header for configure to use:
|
for f in pyconfig.h.in configure ; do
|
||||||
|
cp $f $f.autotool-intermediates ;
|
||||||
|
done
|
||||||
|
|
||||||
|
# Rerun the autotools:
|
||||||
|
PATH=~/autoconf-2.65/bin:$PATH autoconf
|
||||||
autoheader
|
autoheader
|
||||||
|
|
||||||
|
# Regenerate the patch:
|
||||||
|
gendiff . .autotool-intermediates > %{PATCH300}
|
||||||
|
|
||||||
|
|
||||||
|
# Exit the build
|
||||||
|
exit 1
|
||||||
|
%endif
|
||||||
|
|
||||||
# Define a function, for how to perform a "build" of python for a given
|
# Define a function, for how to perform a "build" of python for a given
|
||||||
# configuration:
|
# configuration:
|
||||||
BuildPython() {
|
BuildPython() {
|
||||||
|
@ -781,11 +799,18 @@ InstallPython() {
|
||||||
|
|
||||||
make install DESTDIR=%{buildroot}
|
make install DESTDIR=%{buildroot}
|
||||||
|
|
||||||
# Copy up the gdb hooks into place; the python file will be autoloaded by gdb
|
# We install a collection of hooks for gdb that make it easier to debug
|
||||||
# when visiting libpython.so, provided that the python file is installed to the
|
# executables linked against libpython (such as /usr/lib/python itself)
|
||||||
# same path as the library (or its .debug file) plus a "-gdb.py" suffix, e.g:
|
#
|
||||||
# /usr/lib/debug/usr/lib64/libpython2.6.so.1.0.debug-gdb.py
|
# These hooks are implemented in Python itself
|
||||||
|
#
|
||||||
|
# gdb-archer looks for them in the same path as the ELF file, with a -gdb.py suffix.
|
||||||
|
# We put them in the debuginfo package by installing them to e.g.:
|
||||||
|
# /usr/lib/debug/usr/lib/libpython2.6.so.1.0.debug-gdb.py
|
||||||
# (note that the debug path is /usr/lib/debug for both 32/64 bit)
|
# (note that the debug path is /usr/lib/debug for both 32/64 bit)
|
||||||
|
#
|
||||||
|
# See https://fedoraproject.org/wiki/Features/EasierPythonDebugging for more
|
||||||
|
# information
|
||||||
#
|
#
|
||||||
# Initially I tried:
|
# Initially I tried:
|
||||||
# /usr/lib/libpython2.6.so.1.0-gdb.py
|
# /usr/lib/libpython2.6.so.1.0-gdb.py
|
||||||
|
@ -796,7 +821,7 @@ DirHoldingGdbPy=%{_prefix}/lib/debug/%{_libdir}
|
||||||
PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName.debug-gdb.py
|
PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName.debug-gdb.py
|
||||||
|
|
||||||
mkdir -p %{buildroot}$DirHoldingGdbPy
|
mkdir -p %{buildroot}$DirHoldingGdbPy
|
||||||
cp %{SOURCE1} %{buildroot}$PathOfGdbPy
|
cp $topdir/Tools/gdb/libpython.py %{buildroot}$PathOfGdbPy
|
||||||
|
|
||||||
# Manually byte-compile the file, in case find-debuginfo.sh is run before
|
# Manually byte-compile the file, in case find-debuginfo.sh is run before
|
||||||
# brp-python-bytecompile, so that the .pyc/.pyo files are properly listed in
|
# brp-python-bytecompile, so that the .pyc/.pyo files are properly listed in
|
||||||
|
@ -869,15 +894,6 @@ mv %{buildroot}/%{_mandir}/man1/python.1 %{buildroot}/%{_mandir}/man1/python%{py
|
||||||
|
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{site_packages}
|
mkdir -p ${RPM_BUILD_ROOT}%{site_packages}
|
||||||
|
|
||||||
#modulator
|
|
||||||
cat > ${RPM_BUILD_ROOT}%{_bindir}/modulator << EOF
|
|
||||||
#!/bin/bash
|
|
||||||
exec %{site_packages}/modulator/modulator.py
|
|
||||||
EOF
|
|
||||||
chmod 755 ${RPM_BUILD_ROOT}%{_bindir}/modulator
|
|
||||||
cp -r Tools/modulator \
|
|
||||||
${RPM_BUILD_ROOT}%{site_packages}/
|
|
||||||
|
|
||||||
#pynche
|
#pynche
|
||||||
cat > ${RPM_BUILD_ROOT}%{_bindir}/pynche << EOF
|
cat > ${RPM_BUILD_ROOT}%{_bindir}/pynche << EOF
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
@ -888,7 +904,6 @@ rm -f Tools/pynche/*.pyw
|
||||||
cp -r Tools/pynche \
|
cp -r Tools/pynche \
|
||||||
${RPM_BUILD_ROOT}%{site_packages}/
|
${RPM_BUILD_ROOT}%{site_packages}/
|
||||||
|
|
||||||
mv Tools/modulator/README Tools/modulator/README.modulator
|
|
||||||
mv Tools/pynche/README Tools/pynche/README.pynche
|
mv Tools/pynche/README Tools/pynche/README.pynche
|
||||||
|
|
||||||
#gettext
|
#gettext
|
||||||
|
@ -915,8 +930,6 @@ find %{buildroot}/ -name "*.bat"|xargs rm -f
|
||||||
find . -name "*~"|xargs rm -f
|
find . -name "*~"|xargs rm -f
|
||||||
find . -name ".cvsignore"|xargs rm -f
|
find . -name ".cvsignore"|xargs rm -f
|
||||||
#zero length
|
#zero length
|
||||||
rm -f %{buildroot}%{site_packages}/modulator/Templates/copyright
|
|
||||||
|
|
||||||
rm -f %{buildroot}%{pylibdir}/LICENSE.txt
|
rm -f %{buildroot}%{pylibdir}/LICENSE.txt
|
||||||
|
|
||||||
|
|
||||||
|
@ -924,7 +937,6 @@ rm -f %{buildroot}%{pylibdir}/LICENSE.txt
|
||||||
%if !%{main_python}
|
%if !%{main_python}
|
||||||
pushd %{buildroot}%{_bindir}
|
pushd %{buildroot}%{_bindir}
|
||||||
mv idle idle%{__python_ver}
|
mv idle idle%{__python_ver}
|
||||||
mv modulator modulator%{__python_ver}
|
|
||||||
mv pynche pynche%{__python_ver}
|
mv pynche pynche%{__python_ver}
|
||||||
mv pygettext.py pygettext%{__python_ver}.py
|
mv pygettext.py pygettext%{__python_ver}.py
|
||||||
mv msgfmt.py msgfmt%{__python_ver}.py
|
mv msgfmt.py msgfmt%{__python_ver}.py
|
||||||
|
@ -1050,7 +1062,6 @@ rm -fr %{buildroot}
|
||||||
%{dynload_dir}/Python-%{version}-py%{pybasever}.egg-info
|
%{dynload_dir}/Python-%{version}-py%{pybasever}.egg-info
|
||||||
%{dynload_dir}/_bisectmodule.so
|
%{dynload_dir}/_bisectmodule.so
|
||||||
%{dynload_dir}/_bsddb.so
|
%{dynload_dir}/_bsddb.so
|
||||||
%{dynload_dir}/_bytesio.so
|
|
||||||
%{dynload_dir}/_codecs_cn.so
|
%{dynload_dir}/_codecs_cn.so
|
||||||
%{dynload_dir}/_codecs_hk.so
|
%{dynload_dir}/_codecs_hk.so
|
||||||
%{dynload_dir}/_codecs_iso2022.so
|
%{dynload_dir}/_codecs_iso2022.so
|
||||||
|
@ -1063,11 +1074,11 @@ rm -fr %{buildroot}
|
||||||
%{dynload_dir}/_curses.so
|
%{dynload_dir}/_curses.so
|
||||||
%{dynload_dir}/_curses_panel.so
|
%{dynload_dir}/_curses_panel.so
|
||||||
%{dynload_dir}/_elementtree.so
|
%{dynload_dir}/_elementtree.so
|
||||||
%{dynload_dir}/_fileio.so
|
|
||||||
%{dynload_dir}/_functoolsmodule.so
|
%{dynload_dir}/_functoolsmodule.so
|
||||||
%{dynload_dir}/_hashlib.so
|
%{dynload_dir}/_hashlib.so
|
||||||
%{dynload_dir}/_heapq.so
|
%{dynload_dir}/_heapq.so
|
||||||
%{dynload_dir}/_hotshot.so
|
%{dynload_dir}/_hotshot.so
|
||||||
|
%{dynload_dir}/_io.so
|
||||||
%{dynload_dir}/_json.so
|
%{dynload_dir}/_json.so
|
||||||
%{dynload_dir}/_localemodule.so
|
%{dynload_dir}/_localemodule.so
|
||||||
%{dynload_dir}/_lsprof.so
|
%{dynload_dir}/_lsprof.so
|
||||||
|
@ -1101,7 +1112,7 @@ rm -fr %{buildroot}
|
||||||
%{dynload_dir}/imageop.so
|
%{dynload_dir}/imageop.so
|
||||||
%{dynload_dir}/itertoolsmodule.so
|
%{dynload_dir}/itertoolsmodule.so
|
||||||
%{dynload_dir}/linuxaudiodev.so
|
%{dynload_dir}/linuxaudiodev.so
|
||||||
%{dynload_dir}/mathmodule.so
|
%{dynload_dir}/math.so
|
||||||
%{dynload_dir}/mmapmodule.so
|
%{dynload_dir}/mmapmodule.so
|
||||||
%{dynload_dir}/nismodule.so
|
%{dynload_dir}/nismodule.so
|
||||||
%{dynload_dir}/operator.so
|
%{dynload_dir}/operator.so
|
||||||
|
@ -1144,17 +1155,20 @@ rm -fr %{buildroot}
|
||||||
%{pylibdir}/encodings
|
%{pylibdir}/encodings
|
||||||
%{pylibdir}/hotshot
|
%{pylibdir}/hotshot
|
||||||
%{pylibdir}/idlelib
|
%{pylibdir}/idlelib
|
||||||
|
%{pylibdir}/importlib
|
||||||
%dir %{pylibdir}/json
|
%dir %{pylibdir}/json
|
||||||
%{pylibdir}/json/*.py*
|
%{pylibdir}/json/*.py*
|
||||||
%{pylibdir}/lib2to3
|
%{pylibdir}/lib2to3
|
||||||
%{pylibdir}/logging
|
%{pylibdir}/logging
|
||||||
%{pylibdir}/multiprocessing
|
%{pylibdir}/multiprocessing
|
||||||
%{pylibdir}/plat-linux2
|
%{pylibdir}/plat-linux2
|
||||||
|
%{pylibdir}/pydoc_data
|
||||||
%dir %{pylibdir}/sqlite3
|
%dir %{pylibdir}/sqlite3
|
||||||
%{pylibdir}/sqlite3/*.py*
|
%{pylibdir}/sqlite3/*.py*
|
||||||
%dir %{pylibdir}/test
|
%dir %{pylibdir}/test
|
||||||
%{pylibdir}/test/test_support.py*
|
%{pylibdir}/test/test_support.py*
|
||||||
%{pylibdir}/test/__init__.py*
|
%{pylibdir}/test/__init__.py*
|
||||||
|
%{pylibdir}/unittest
|
||||||
%{pylibdir}/wsgiref
|
%{pylibdir}/wsgiref
|
||||||
%{pylibdir}/xml
|
%{pylibdir}/xml
|
||||||
%if "%{_lib}" == "lib64"
|
%if "%{_lib}" == "lib64"
|
||||||
|
@ -1181,6 +1195,8 @@ rm -fr %{buildroot}
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
|
%{_libdir}/pkgconfig/python-%{pybasever}.pc
|
||||||
|
%{_libdir}/pkgconfig/python.pc
|
||||||
%{pylibdir}/config/*
|
%{pylibdir}/config/*
|
||||||
%exclude %{pylibdir}/config/Makefile
|
%exclude %{pylibdir}/config/Makefile
|
||||||
%{pylibdir}/distutils/command/wininst-*.exe
|
%{pylibdir}/distutils/command/wininst-*.exe
|
||||||
|
@ -1195,14 +1211,11 @@ rm -fr %{buildroot}
|
||||||
|
|
||||||
%files tools
|
%files tools
|
||||||
%defattr(-,root,root,755)
|
%defattr(-,root,root,755)
|
||||||
%doc Tools/modulator/README.modulator
|
|
||||||
%doc Tools/pynche/README.pynche
|
%doc Tools/pynche/README.pynche
|
||||||
%{site_packages}/modulator
|
|
||||||
%{site_packages}/pynche
|
%{site_packages}/pynche
|
||||||
%{_bindir}/smtpd*.py*
|
%{_bindir}/smtpd*.py*
|
||||||
%{_bindir}/2to3*
|
%{_bindir}/2to3*
|
||||||
%{_bindir}/idle*
|
%{_bindir}/idle*
|
||||||
%{_bindir}/modulator*
|
|
||||||
%{_bindir}/pynche*
|
%{_bindir}/pynche*
|
||||||
%{_bindir}/pygettext*.py*
|
%{_bindir}/pygettext*.py*
|
||||||
%{_bindir}/msgfmt*.py*
|
%{_bindir}/msgfmt*.py*
|
||||||
|
@ -1251,7 +1264,6 @@ rm -fr %{buildroot}
|
||||||
# ...with debug builds of the built-in "extension" modules:
|
# ...with debug builds of the built-in "extension" modules:
|
||||||
%{dynload_dir}/_bisectmodule_d.so
|
%{dynload_dir}/_bisectmodule_d.so
|
||||||
%{dynload_dir}/_bsddb_d.so
|
%{dynload_dir}/_bsddb_d.so
|
||||||
%{dynload_dir}/_bytesio_d.so
|
|
||||||
%{dynload_dir}/_codecs_cn_d.so
|
%{dynload_dir}/_codecs_cn_d.so
|
||||||
%{dynload_dir}/_codecs_hk_d.so
|
%{dynload_dir}/_codecs_hk_d.so
|
||||||
%{dynload_dir}/_codecs_iso2022_d.so
|
%{dynload_dir}/_codecs_iso2022_d.so
|
||||||
|
@ -1264,11 +1276,11 @@ rm -fr %{buildroot}
|
||||||
%{dynload_dir}/_curses_d.so
|
%{dynload_dir}/_curses_d.so
|
||||||
%{dynload_dir}/_curses_panel_d.so
|
%{dynload_dir}/_curses_panel_d.so
|
||||||
%{dynload_dir}/_elementtree_d.so
|
%{dynload_dir}/_elementtree_d.so
|
||||||
%{dynload_dir}/_fileio_d.so
|
|
||||||
%{dynload_dir}/_functoolsmodule_d.so
|
%{dynload_dir}/_functoolsmodule_d.so
|
||||||
%{dynload_dir}/_hashlib_d.so
|
%{dynload_dir}/_hashlib_d.so
|
||||||
%{dynload_dir}/_heapq_d.so
|
%{dynload_dir}/_heapq_d.so
|
||||||
%{dynload_dir}/_hotshot_d.so
|
%{dynload_dir}/_hotshot_d.so
|
||||||
|
%{dynload_dir}/_io_d.so
|
||||||
%{dynload_dir}/_json_d.so
|
%{dynload_dir}/_json_d.so
|
||||||
%{dynload_dir}/_localemodule_d.so
|
%{dynload_dir}/_localemodule_d.so
|
||||||
%{dynload_dir}/_lsprof_d.so
|
%{dynload_dir}/_lsprof_d.so
|
||||||
|
@ -1302,7 +1314,7 @@ rm -fr %{buildroot}
|
||||||
%{dynload_dir}/imageop_d.so
|
%{dynload_dir}/imageop_d.so
|
||||||
%{dynload_dir}/itertoolsmodule_d.so
|
%{dynload_dir}/itertoolsmodule_d.so
|
||||||
%{dynload_dir}/linuxaudiodev_d.so
|
%{dynload_dir}/linuxaudiodev_d.so
|
||||||
%{dynload_dir}/mathmodule_d.so
|
%{dynload_dir}/math_d.so
|
||||||
%{dynload_dir}/mmapmodule_d.so
|
%{dynload_dir}/mmapmodule_d.so
|
||||||
%{dynload_dir}/nismodule_d.so
|
%{dynload_dir}/nismodule_d.so
|
||||||
%{dynload_dir}/operator_d.so
|
%{dynload_dir}/operator_d.so
|
||||||
|
@ -1370,6 +1382,43 @@ rm -fr %{buildroot}
|
||||||
# payload file would be unpackaged)
|
# payload file would be unpackaged)
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 8 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-3
|
||||||
|
- add patch to fixup the new sysconfig.py for our multilib support on
|
||||||
|
64-bit (patch 103)
|
||||||
|
|
||||||
|
* Thu Jul 8 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-2
|
||||||
|
- add machinery for regenerating the "configure" script in the face of
|
||||||
|
mismatching autoconf versions (patch 300)
|
||||||
|
|
||||||
|
* Tue Jul 6 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-1
|
||||||
|
- 2.7 final; drop alphatag
|
||||||
|
- drop patch 117 (upstream), patch 120 (upstreamed)
|
||||||
|
- fix the commented-out __python_ver from 26 to 27
|
||||||
|
|
||||||
|
* Tue Jun 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-0.1.rc2
|
||||||
|
- 2.7rc2
|
||||||
|
- revert r79310 (patch 121)
|
||||||
|
- remove modulator: upstream removed it in r78338
|
||||||
|
- rename mathmodule(_d).so to math(_d).so in manifests (appears to be changed
|
||||||
|
by r76861)
|
||||||
|
- _bytesio(_d).so and _filesio(_d).so were consolidated into _io(_d).so in
|
||||||
|
r73394 (upstream issue 6215)
|
||||||
|
- use the gdb hooks from the upstream tarball, rather than keeping our own
|
||||||
|
copy. The upstream version has some whitespace changes, a new write_repr for
|
||||||
|
unicode objects, and various bulletproofings for being run on older gdbs
|
||||||
|
|
||||||
|
* Tue Jun 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.7-0.1.rc1
|
||||||
|
- 2.7rc1:
|
||||||
|
- rework patches to apply against 2.7 (which among other changes has had a
|
||||||
|
whitespace cleanup of the .c code): .rhconfig (patch0), .binutils-no-dep
|
||||||
|
(patch10), .ascii-tolower (patch11), .socketmodule (patch13), .socketmodule2
|
||||||
|
(patch14), .systemtap (patch55), .lib64 (patch102), .selinux (patch110),
|
||||||
|
.no-static-lib (patch111), .debug-build (patch112), .statvfs-f-flag-constants
|
||||||
|
(patch114), ..CVE-2010-2089 (patch117)
|
||||||
|
- drop upstream patches: .expat (patch3), .brprpm (patch51), .valgrind
|
||||||
|
(patch52), .db48 (patch53), .CVE-2010-1634 (patch 116), .CVE-2008-5983 (patch
|
||||||
|
118)
|
||||||
|
|
||||||
* Tue Jun 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-17
|
* Tue Jun 22 2010 David Malcolm <dmalcolm@redhat.com> - 2.6.5-17
|
||||||
- Stop python bailing out with an assertion failure when UnicodeDecodeErrors
|
- Stop python bailing out with an assertion failure when UnicodeDecodeErrors
|
||||||
occur on very large buffers (patch 120, upstream issue 9058)
|
occur on very large buffers (patch 120, upstream issue 9058)
|
||||||
|
|
Loading…
Reference in New Issue