diff --git a/.cvsignore b/.cvsignore index 19932b2..4a2f615 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -Python-2.6.5.tar.bz2 +Python-2.7.tar.bz2 diff --git a/disable-pymalloc-on-valgrind-py26.patch b/disable-pymalloc-on-valgrind-py26.patch deleted file mode 100644 index de56bdc..0000000 --- a/disable-pymalloc-on-valgrind-py26.patch +++ /dev/null @@ -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 -+ -+/* 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). diff --git a/python-2.5.1-codec-ascii-tolower.patch b/python-2.5.1-codec-ascii-tolower.patch deleted file mode 100644 index 81a123d..0000000 --- a/python-2.5.1-codec-ascii-tolower.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -rup Python-2.5.1-orig/Python/codecs.c Python-2.5.1/Python/codecs.c ---- Python-2.5.1-orig/Python/codecs.c 2006-06-23 17:16:18.000000000 -0400 -+++ Python-2.5.1/Python/codecs.c 2007-10-30 12:51:10.000000000 -0400 -@@ -45,6 +45,11 @@ int PyCodec_Register(PyObject *search_fu - return -1; - } - -+/* isupper() forced into the ASCII Locale */ -+#define ascii_isupper(x) (((x) >= 0x41) && ((x) <= 0x5A)) -+/* tolower() forced into the ASCII Locale */ -+#define ascii_tolower(x) (ascii_isupper(x) ? ((x) + 0x20) : (x)) -+ - /* Convert a string to a normalized Python string: all characters are - converted to lower case, spaces are replaced with underscores. */ - -@@ -70,7 +75,7 @@ PyObject *normalizestring(const char *st - if (ch == ' ') - ch = '-'; - else -- ch = tolower(Py_CHARMASK(ch)); -+ ch = ascii_tolower(Py_CHARMASK(ch)); - p[i] = ch; - } - return v; -Only in Python-2.5.1/Python: codecs.c~ diff --git a/python-2.5.1-socketmodule-constants.patch b/python-2.5.1-socketmodule-constants.patch deleted file mode 100644 index 9dd1579..0000000 --- a/python-2.5.1-socketmodule-constants.patch +++ /dev/null @@ -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 diff --git a/python-2.5.1-socketmodule-constants2.patch b/python-2.5.1-socketmodule-constants2.patch deleted file mode 100644 index 93008b9..0000000 --- a/python-2.5.1-socketmodule-constants2.patch +++ /dev/null @@ -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~ diff --git a/python-2.6-ctypes-noexecmem.patch b/python-2.6-ctypes-noexecmem.patch deleted file mode 100644 index 8d2890e..0000000 --- a/python-2.6-ctypes-noexecmem.patch +++ /dev/null @@ -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': diff --git a/python-2.6-lib64.patch b/python-2.6-lib64.patch deleted file mode 100644 index a9812e7..0000000 --- a/python-2.6-lib64.patch +++ /dev/null @@ -1,173 +0,0 @@ -diff -up Python-2.6/Lib/distutils/command/install.py.lib64 Python-2.6/Lib/distutils/command/install.py ---- Python-2.6/Lib/distutils/command/install.py.lib64 2008-05-06 18:41:46.000000000 -0400 -+++ Python-2.6/Lib/distutils/command/install.py 2008-11-24 02:34:04.000000000 -0500 -@@ -42,14 +42,14 @@ else: - INSTALL_SCHEMES = { - 'unix_prefix': { - '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', - 'headers': '$base/include/python$py_version_short/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', - }, - 'unix_home': { - 'purelib': '$base/lib/python', -- 'platlib': '$base/lib/python', -+ 'platlib': '$base/lib64/python', - 'headers': '$base/include/python/$dist_name', - 'scripts': '$base/bin', - 'data' : '$base', -diff -up Python-2.6/Lib/distutils/sysconfig.py.lib64 Python-2.6/Lib/distutils/sysconfig.py ---- Python-2.6/Lib/distutils/sysconfig.py.lib64 2008-06-05 08:58:24.000000000 -0400 -+++ Python-2.6/Lib/distutils/sysconfig.py 2008-11-24 02:34:04.000000000 -0500 -@@ -115,8 +115,12 @@ def get_python_lib(plat_specific=0, stan - prefix = plat_specific and EXEC_PREFIX or PREFIX - - if os.name == "posix": -+ if plat_specific or standard_lib: -+ lib = "lib64" -+ else: -+ lib = "lib" - libpython = os.path.join(prefix, -- "lib", "python" + get_python_version()) -+ lib, "python" + get_python_version()) - if standard_lib: - return libpython - else: -diff -up Python-2.6/Lib/site.py.lib64 Python-2.6/Lib/site.py ---- Python-2.6/Lib/site.py.lib64 2008-05-10 13:36:24.000000000 -0400 -+++ Python-2.6/Lib/site.py 2008-11-24 02:35:51.000000000 -0500 -@@ -265,12 +265,16 @@ def addsitepackages(known_paths): - if sys.platform in ('os2emx', 'riscos'): - sitedirs.append(os.path.join(prefix, "Lib", "site-packages")) - elif os.sep == '/': -+ sitedirs.append(os.path.join(prefix, "lib64", -+ "python" + sys.version[:3], -+ "site-packages")) - sitedirs.append(os.path.join(prefix, "lib", - "python" + sys.version[:3], - "site-packages")) - sitedirs.append(os.path.join(prefix, "lib", "site-python")) - else: - sitedirs.append(prefix) -+ sitedirs.append(os.path.join(prefix, "lib64", "site-packages")) - sitedirs.append(os.path.join(prefix, "lib", "site-packages")) - - if sys.platform == "darwin": -diff -up Python-2.6/Makefile.pre.in.lib64 Python-2.6/Makefile.pre.in ---- Python-2.6/Makefile.pre.in.lib64 2008-11-24 02:34:04.000000000 -0500 -+++ Python-2.6/Makefile.pre.in 2008-11-24 02:34:04.000000000 -0500 -@@ -87,11 +87,11 @@ datarootdir= @datarootdir@ - - # Expanded directories - BINDIR= $(exec_prefix)/bin --LIBDIR= $(exec_prefix)/lib -+LIBDIR= $(exec_prefix)/lib64 - MANDIR= @mandir@ - INCLUDEDIR= @includedir@ - CONFINCLUDEDIR= $(exec_prefix)/include --SCRIPTDIR= $(prefix)/lib -+SCRIPTDIR= $(prefix)/lib64 - - # Detailed destination directories - BINLIBDEST= $(LIBDIR)/python$(VERSION) -diff -up Python-2.6/Modules/getpath.c.lib64 Python-2.6/Modules/getpath.c ---- Python-2.6/Modules/getpath.c.lib64 2007-03-10 02:38:14.000000000 -0500 -+++ Python-2.6/Modules/getpath.c 2008-11-24 02:34:04.000000000 -0500 -@@ -117,8 +117,8 @@ - #endif - - #ifndef PYTHONPATH --#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ -- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" -+#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \ -+ EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload" - #endif - - #ifndef LANDMARK -@@ -129,7 +129,7 @@ static char prefix[MAXPATHLEN+1]; - static char exec_prefix[MAXPATHLEN+1]; - static char progpath[MAXPATHLEN+1]; - static char *module_search_path = NULL; --static char lib_python[] = "lib/python" VERSION; -+static char lib_python[] = "lib64/python" VERSION; - - static void - reduce(char *dir) -@@ -524,7 +524,7 @@ calculate_path(void) - } - else - strncpy(zip_path, PREFIX, MAXPATHLEN); -- joinpath(zip_path, "lib/python00.zip"); -+ joinpath(zip_path, "lib64/python00.zip"); - bufsz = strlen(zip_path); /* Replace "00" with version */ - zip_path[bufsz - 6] = VERSION[0]; - zip_path[bufsz - 5] = VERSION[2]; -@@ -534,7 +534,7 @@ calculate_path(void) - fprintf(stderr, - "Could not find platform dependent libraries \n"); - strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN); -- joinpath(exec_prefix, "lib/lib-dynload"); -+ joinpath(exec_prefix, "lib64/lib-dynload"); - } - /* 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 ---- Python-2.6/Modules/Setup.dist.lib64 2008-11-24 02:34:04.000000000 -0500 -+++ Python-2.6/Modules/Setup.dist 2008-11-24 02:34:04.000000000 -0500 -@@ -408,7 +408,7 @@ gdbm gdbmmodule.c -I/usr/local/include - - # and the subdirectory of PORT where you built it. - DBLIBVER=4.7 - DBINC=/usr/include/db4 --DBLIB=/usr/lib -+DBLIB=/usr/lib64 - _bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER) - - # Historical Berkeley DB 1.85 -@@ -454,7 +454,7 @@ cPickle cPickle.c - # Andrew Kuchling's zlib module. - # This require zlib 1.1.3 (or later). - # See http://www.gzip.org/zlib/ --zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz -+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz - - # Interface to the Expat XML parser - # -diff -up Python-2.6/setup.py.lib64 Python-2.6/setup.py ---- Python-2.6/setup.py.lib64 2008-11-24 02:34:04.000000000 -0500 -+++ Python-2.6/setup.py 2008-11-24 02:34:04.000000000 -0500 -@@ -310,7 +310,7 @@ class PyBuildExt(build_ext): - - def detect_modules(self): - # Ensure that /usr/local is always used -- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') -+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64') - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') - - # Add paths specified in the environment variables LDFLAGS and -@@ -583,11 +583,11 @@ class PyBuildExt(build_ext): - elif self.compiler.find_library_file(lib_dirs, 'curses'): - readline_libs.append('curses') - elif self.compiler.find_library_file(lib_dirs + -- ['/usr/lib/termcap'], -+ ['/usr/lib64/termcap'], - 'termcap'): - readline_libs.append('termcap') - exts.append( Extension('readline', ['readline.c'], -- library_dirs=['/usr/lib/termcap'], -+ library_dirs=['/usr/lib64/termcap'], - extra_link_args=readline_extra_link_args, - libraries=readline_libs) ) - else: -@@ -624,8 +624,8 @@ class PyBuildExt(build_ext): - if krb5_h: - ssl_incs += krb5_h - ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, -- ['/usr/local/ssl/lib', -- '/usr/contrib/ssl/lib/' -+ ['/usr/local/ssl/lib64', -+ '/usr/contrib/ssl/lib64/' - ] ) - - if (ssl_incs is not None and diff --git a/python-2.6.2-CVE-2008-5983.patch b/python-2.6.2-CVE-2008-5983.patch deleted file mode 100644 index de640cb..0000000 --- a/python-2.6.2-CVE-2008-5983.patch +++ /dev/null @@ -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 `_. -+ -+ 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 -+ `_. -+ - 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. diff --git a/python-2.6.2-CVE-2010-1634.patch b/python-2.6.2-CVE-2010-1634.patch deleted file mode 100644 index a4144eb..0000000 --- a/python-2.6.2-CVE-2010-1634.patch +++ /dev/null @@ -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; diff --git a/python-2.6.2-CVE-2010-2089.patch b/python-2.6.2-CVE-2010-2089.patch deleted file mode 100644 index 92efafd..0000000 --- a/python-2.6.2-CVE-2010-2089.patch +++ /dev/null @@ -1,349 +0,0 @@ -From ddc63ebe9b52c0ab4ba033301e70fac89f610704 Mon Sep 17 00:00:00 2001 -From: Victor Stinner -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 0,1 */ - for ( i=0; i= 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 - diff --git a/python-2.6.2-binutils-no-dep.patch b/python-2.6.2-binutils-no-dep.patch deleted file mode 100644 index 57cd07c..0000000 --- a/python-2.6.2-binutils-no-dep.patch +++ /dev/null @@ -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~ diff --git a/python-2.6.2-config.patch b/python-2.6.2-config.patch deleted file mode 100644 index 48461ee..0000000 --- a/python-2.6.2-config.patch +++ /dev/null @@ -1,283 +0,0 @@ -diff -up Python-2.6.2/Modules/Setup.dist.rhconfig Python-2.6.2/Modules/Setup.dist ---- Python-2.6.2/Modules/Setup.dist.rhconfig 2008-11-27 05:15:12.000000000 -0500 -+++ Python-2.6.2/Modules/Setup.dist 2010-01-25 21:11:01.508867242 -0500 -@@ -152,7 +152,7 @@ GLHACK=-Dclear=__GLclear - # modules are to be built as shared libraries (see above for more - # detail; also note that *static* reverses this effect): - --#*shared* -+*shared* - - # GNU readline. Unlike previous Python incarnations, GNU readline is - # now incorporated in an optional module, configured in the Setup file -@@ -162,74 +162,74 @@ GLHACK=-Dclear=__GLclear - # it, depending on your system -- see the GNU readline instructions. - # It's okay for this to be a shared library, too. - --#readline readline.c -lreadline -ltermcap -+readline readline.c -lreadline -ltermcap - - - # Modules that should always be present (non UNIX dependent): - --#array arraymodule.c # array objects --#cmath cmathmodule.c # -lm # complex math library functions --#math mathmodule.c # -lm # math library functions, e.g. sin() --#_struct _struct.c # binary structure packing/unpacking --#time timemodule.c # -lm # time operations and variables --#operator operator.c # operator.add() and similar goodies --#_weakref _weakref.c # basic weak reference support --#_testcapi _testcapimodule.c # Python C API test module --#_random _randommodule.c # Random number generator --#_collections _collectionsmodule.c # Container types --#itertools itertoolsmodule.c # Functions creating iterators for efficient looping --#strop stropmodule.c # String manipulations --#_functools _functoolsmodule.c # Tools for working with functions and callable objects -+array arraymodule.c # array objects -+cmath cmathmodule.c # -lm # complex math library functions -+math mathmodule.c # -lm # math library functions, e.g. sin() -+_struct _struct.c # binary structure packing/unpacking -+time timemodule.c # -lm # time operations and variables -+operator operator.c # operator.add() and similar goodies -+_weakref _weakref.c # basic weak reference support -+_testcapi _testcapimodule.c # Python C API test module -+_random _randommodule.c # Random number generator -+_collections _collectionsmodule.c # Container types -+itertools itertoolsmodule.c # Functions creating iterators for efficient looping -+strop stropmodule.c # String manipulations -+_functools _functoolsmodule.c # Tools for working with functions and callable objects - #_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator - #_pickle _pickle.c # pickle accelerator - #datetime datetimemodule.c # date/time type --#_bisect _bisectmodule.c # Bisection algorithms -+_bisect _bisectmodule.c # Bisection algorithms - --#unicodedata unicodedata.c # static Unicode character database -+unicodedata unicodedata.c # static Unicode character database - - # access to ISO C locale support --#_locale _localemodule.c # -lintl -+_locale _localemodule.c # -lintl - - - # Modules with some UNIX dependencies -- on by default: - # (If you have a really backward UNIX, select and socket may not be - # supported...) - --#fcntl fcntlmodule.c # fcntl(2) and ioctl(2) --#spwd spwdmodule.c # spwd(3) --#grp grpmodule.c # grp(3) --#select selectmodule.c # select(2); not on ancient System V -+fcntl fcntlmodule.c # fcntl(2) and ioctl(2) -+spwd spwdmodule.c # spwd(3) -+grp grpmodule.c # grp(3) -+select selectmodule.c # select(2); not on ancient System V - - # Memory-mapped files (also works on Win32). --#mmap mmapmodule.c -+mmap mmapmodule.c - - # CSV file helper --#_csv _csv.c -+_csv _csv.c - - # Socket module helper for socket(2) --#_socket socketmodule.c -+_socket socketmodule.c - - # Socket module helper for SSL support; you must comment out the other - # socket line above, and possibly edit the SSL variable: - #SSL=/usr/local/ssl --#_ssl _ssl.c \ --# -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ --# -L$(SSL)/lib -lssl -lcrypto -+_ssl _ssl.c \ -+ -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ -+ -L$(SSL)/lib -lssl -lcrypto - - # The crypt module is now disabled by default because it breaks builds - # on many systems (where -lcrypt is needed), e.g. Linux (I believe). - # - # 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 - - - # Some more UNIX dependent modules -- off by default, since these - # are not supported by all UNIX systems: - --#nis nismodule.c -lnsl # Sun yellow pages -- not everywhere --#termios termios.c # Steen Lumholt's termios module --#resource resource.c # Jeremy Hylton's rlimit interface -+nis nismodule.c -lnsl # Sun yellow pages -- not everywhere -+termios termios.c # Steen Lumholt's termios module -+resource resource.c # Jeremy Hylton's rlimit interface - - - # Multimedia modules -- off by default. -@@ -237,8 +237,8 @@ GLHACK=-Dclear=__GLclear - # #993173 says audioop works on 64-bit platforms, though. - # These represent audio samples or images as strings: - --#audioop audioop.c # Operations on audio samples --#imageop imageop.c # Operations on images -+audioop audioop.c # Operations on audio samples -+imageop imageop.c # Operations on images - - - # Note that the _md5 and _sha modules are normally only built if the -@@ -248,14 +248,14 @@ GLHACK=-Dclear=__GLclear - # Message-Digest Algorithm, described in RFC 1321. The necessary files - # md5.c and md5.h are included here. - --#_md5 md5module.c md5.c -+_md5 md5module.c md5.c - - - # The _sha module implements the SHA checksum algorithms. - # (NIST's Secure Hash Algorithms.) --#_sha shamodule.c --#_sha256 sha256module.c --#_sha512 sha512module.c -+_sha shamodule.c -+_sha256 sha256module.c -+_sha512 sha512module.c - - - # SGI IRIX specific modules -- off by default. -@@ -302,12 +302,12 @@ GLHACK=-Dclear=__GLclear - # A Linux specific module -- off by default; this may also work on - # some *BSDs. - --#linuxaudiodev linuxaudiodev.c -+linuxaudiodev linuxaudiodev.c - - - # George Neville-Neil's timing module: - --#timing timingmodule.c -+timing timingmodule.c - - - # The _tkinter module. -@@ -322,7 +322,7 @@ GLHACK=-Dclear=__GLclear - # every system. - - # *** Always uncomment this (leave the leading underscore in!): --# _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ -+_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ - # *** Uncomment and edit to reflect where your Tcl/Tk libraries are: - # -L/usr/local/lib \ - # *** Uncomment and edit to reflect where your Tcl/Tk headers are: -@@ -332,7 +332,7 @@ GLHACK=-Dclear=__GLclear - # *** Or uncomment this for Solaris: - # -I/usr/openwin/include \ - # *** Uncomment and edit for Tix extension only: --# -DWITH_TIX -ltix8.1.8.2 \ -+ -DWITH_TIX -ltix \ - # *** Uncomment and edit for BLT extension only: - # -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \ - # *** Uncomment and edit for PIL (TkImaging) extension only: -@@ -341,7 +341,7 @@ GLHACK=-Dclear=__GLclear - # *** Uncomment and edit for TOGL extension only: - # -DWITH_TOGL togl.c \ - # *** Uncomment and edit to reflect your Tcl/Tk versions: --# -ltk8.2 -ltcl8.2 \ -+ -ltk -ltcl \ - # *** Uncomment and edit to reflect where your X11 libraries are: - # -L/usr/X11R6/lib \ - # *** Or uncomment this for Solaris: -@@ -351,7 +351,7 @@ GLHACK=-Dclear=__GLclear - # *** Uncomment for AIX: - # -lld \ - # *** Always uncomment this; X11 libraries to link with: --# -lX11 -+ -lX11 - - # Lance Ellinghaus's syslog module - #syslog syslogmodule.c # syslog daemon interface -@@ -373,7 +373,7 @@ GLHACK=-Dclear=__GLclear - # it is a highly experimental and dangerous device for calling - # *arbitrary* C functions in *arbitrary* shared libraries: - --#dl dlmodule.c -+dl dlmodule.c - - - # Modules that provide persistent dictionary-like semantics. You will -@@ -396,7 +396,7 @@ GLHACK=-Dclear=__GLclear - # - # First, look at Setup.config; configure may have set this for you. - --#gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm -+gdbm gdbmmodule.c -lgdbm - - - # Sleepycat Berkeley DB interface. -@@ -411,11 +411,10 @@ GLHACK=-Dclear=__GLclear - # - # Edit the variables DB and DBLIBVERto point to the db top directory - # and the subdirectory of PORT where you built it. --#DB=/usr/local/BerkeleyDB.4.0 --#DBLIBVER=4.0 --#DBINC=$(DB)/include --#DBLIB=$(DB)/lib --#_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER) -+DBLIBVER=4.7 -+DBINC=/usr/include/db4 -+DBLIB=/usr/lib -+_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER) - - # Historical Berkeley DB 1.85 - # -@@ -430,14 +429,14 @@ GLHACK=-Dclear=__GLclear - - - # Helper module for various ascii-encoders --#binascii binascii.c -+binascii binascii.c - - # Fred Drake's interface to the Python parser --#parser parsermodule.c -+parser parsermodule.c - - # cStringIO and cPickle --#cStringIO cStringIO.c --#cPickle cPickle.c -+cStringIO cStringIO.c -+cPickle cPickle.c - - - # Lee Busby's SIGFPE modules. -@@ -460,7 +459,7 @@ GLHACK=-Dclear=__GLclear - # Andrew Kuchling's zlib module. - # This require zlib 1.1.3 (or later). - # See http://www.gzip.org/zlib/ --#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz -+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz - - # Interface to the Expat XML parser - # -@@ -479,14 +478,14 @@ GLHACK=-Dclear=__GLclear - # Hye-Shik Chang's CJKCodecs - - # multibytecodec is required for all the other CJK codec modules --#_multibytecodec cjkcodecs/multibytecodec.c -+_multibytecodec cjkcodecs/multibytecodec.c - --#_codecs_cn cjkcodecs/_codecs_cn.c --#_codecs_hk cjkcodecs/_codecs_hk.c --#_codecs_iso2022 cjkcodecs/_codecs_iso2022.c --#_codecs_jp cjkcodecs/_codecs_jp.c --#_codecs_kr cjkcodecs/_codecs_kr.c --#_codecs_tw cjkcodecs/_codecs_tw.c -+_codecs_cn cjkcodecs/_codecs_cn.c -+_codecs_hk cjkcodecs/_codecs_hk.c -+_codecs_iso2022 cjkcodecs/_codecs_iso2022.c -+_codecs_jp cjkcodecs/_codecs_jp.c -+_codecs_kr cjkcodecs/_codecs_kr.c -+_codecs_tw cjkcodecs/_codecs_tw.c - - # Example -- included for reference only: - # xx xxmodule.c diff --git a/python-2.6.2-with-system-expat.patch b/python-2.6.2-with-system-expat.patch deleted file mode 100644 index 2510aef..0000000 --- a/python-2.6.2-with-system-expat.patch +++ /dev/null @@ -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: diff --git a/python-2.6.4-dtrace.patch b/python-2.6.4-dtrace.patch deleted file mode 100644 index bab99d8..0000000 --- a/python-2.6.4-dtrace.patch +++ /dev/null @@ -1,196 +0,0 @@ -diff -up Python-2.6.4/configure.in.systemtap Python-2.6.4/configure.in ---- Python-2.6.4/configure.in.systemtap 2009-12-18 15:37:15.632242686 -0500 -+++ Python-2.6.4/configure.in 2009-12-18 15:37:15.713244483 -0500 -@@ -2481,6 +2481,38 @@ if test "$with_valgrind" != no; then - ) - fi - -+# Check for dtrace support -+AC_MSG_CHECKING(for --with-dtrace) -+AC_ARG_WITH(dtrace, -+ AC_HELP_STRING(--with(out)-dtrace, disable/enable dtrace support)) -+ -+if test ! -z "$with_dtrace" -+then -+ if dtrace -G -o /dev/null -s $srcdir/Include/pydtrace.d 2>/dev/null -+ then -+ AC_DEFINE(WITH_DTRACE, 1, -+ [Define if you want to compile in Dtrace support]) -+ with_dtrace="Sun" -+ DTRACEOBJS="Python/dtrace.o" -+ DTRADEHDRS="" -+ elif dtrace -h -o /dev/null -s $srcdir/Include/pydtrace.d -+ then -+ AC_DEFINE(WITH_DTRACE, 1, -+ [Define if you want to compile in Dtrace support]) -+ with_dtrace="Apple" -+ DTRACEOBJS="" -+ DTRADEHDRS="pydtrace.h" -+ else -+ with_dtrace="no" -+ fi -+else -+ with_dtrace="no" -+fi -+ -+AC_MSG_RESULT($with_dtrace) -+AC_SUBST(DTRACEOBJS) -+AC_SUBST(DTRACEHDRS) -+ - # Check for --with-wctype-functions - AC_MSG_CHECKING(for --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 ---- Python-2.6.4/Include/pydtrace.d.systemtap 2009-12-18 15:37:15.697243772 -0500 -+++ Python-2.6.4/Include/pydtrace.d 2009-12-18 15:37:15.697243772 -0500 -@@ -0,0 +1,10 @@ -+provider python { -+ probe function__entry(const char *, const char *, int); -+ probe function__return(const char *, const char *, int); -+}; -+ -+#pragma D attributes Evolving/Evolving/Common provider python provider -+#pragma D attributes Private/Private/Common provider python module -+#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 args -diff -up Python-2.6.4/Makefile.pre.in.systemtap Python-2.6.4/Makefile.pre.in ---- Python-2.6.4/Makefile.pre.in.systemtap 2009-12-18 15:37:15.399242581 -0500 -+++ Python-2.6.4/Makefile.pre.in 2009-12-18 15:37:15.715242573 -0500 -@@ -290,6 +290,7 @@ PYTHON_OBJS= \ - Python/formatter_unicode.o \ - Python/formatter_string.o \ - Python/$(DYNLOADFILE) \ -+ @DTRACEOBJS@ \ - $(LIBOBJS) \ - $(MACHDEP_OBJS) \ - $(THREADOBJ) -@@ -577,6 +578,18 @@ Python/formatter_unicode.o: $(srcdir)/Py - Python/formatter_string.o: $(srcdir)/Python/formatter_string.c \ - $(STRINGLIB_HEADERS) - -+# Only needed with --with-dtrace -+buildinclude: -+ mkdir -p Include -+ -+Include/pydtrace.h: buildinclude $(srcdir)/Include/pydtrace.d -+ dtrace -o $@ $(DFLAGS) -C -h -s $(srcdir)/Include/pydtrace.d -+ -+Python/ceval.o: Include/pydtrace.h -+ -+Python/dtrace.o: buildinclude $(srcdir)/Include/pydtrace.d Python/ceval.o -+ dtrace -o $@ $(DFLAGS) -C -G -s $(srcdir)/Include/pydtrace.d Python/ceval.o -+ - ############################################################################ - # Header files - -@@ -1213,6 +1231,6 @@ Python/thread.o: @THREADHEADERS@ - .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure - .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools - .PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean --.PHONY: smelly funny patchcheck -+.PHONY: smelly funny patchcheck buildinclude - - # 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 ---- Python-2.6.4/pyconfig.h.in.systemtap 2009-12-18 15:37:15.649243175 -0500 -+++ Python-2.6.4/pyconfig.h.in 2009-12-18 15:37:15.719242803 -0500 -@@ -964,6 +989,9 @@ - /* Define if you want documentation strings in extension modules */ - #undef WITH_DOC_STRINGS - -+/* Define if you want to compile in Dtrace support */ -+#undef WITH_DTRACE -+ - /* Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic - linker (dyld) instead of the old-style (NextStep) dynamic linker (rld). - Dyld is necessary to support frameworks. */ -diff -up Python-2.6.4/Python/ceval.c.systemtap Python-2.6.4/Python/ceval.c ---- Python-2.6.4/Python/ceval.c.systemtap 2009-05-30 17:43:48.000000000 -0400 -+++ Python-2.6.4/Python/ceval.c 2009-12-18 15:37:15.723242474 -0500 -@@ -19,6 +19,10 @@ - - #include - -+#ifdef WITH_DTRACE -+#include "pydtrace.h" -+#endif -+ - #ifndef WITH_TSC - - #define READ_TIMESTAMP(var) -@@ -527,6 +531,55 @@ PyEval_EvalCode(PyCodeObject *co, PyObje - NULL); - } - -+#ifdef WITH_DTRACE -+static void -+dtrace_entry(PyFrameObject *f) -+{ -+ const char *filename; -+ const char *fname; -+ 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); -+ -+ /* -+ * Currently a USDT tail-call will not receive the correct arguments. -+ * Disable the tail call here. -+ */ -+#if defined(__sparc) -+ asm("nop"); -+#endif -+} -+ -+static void -+dtrace_return(PyFrameObject *f) -+{ -+ const char *filename; -+ const char *fname; -+ 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); -+ -+ /* -+ * Currently a USDT tail-call will not receive the correct arguments. -+ * Disable the tail call here. -+ */ -+#if defined(__sparc) -+ asm("nop"); -+#endif -+} -+#else -+#define PYTHON_FUNCTION_ENTRY_ENABLED() 0 -+#define PYTHON_FUNCTION_RETURN_ENABLED() 0 -+#define dtrace_entry(f) -+#define dtrace_return(f) -+#endif - - /* Interpreter main loop */ - -@@ -763,6 +891,9 @@ PyEval_EvalFrameEx(PyFrameObject *f, int - } - } - -+ if (PYTHON_FUNCTION_ENTRY_ENABLED()) -+ dtrace_entry(f); -+ - co = f->f_code; - names = co->co_names; - consts = co->co_consts; -@@ -2723,6 +2863,8 @@ fast_yield: - - /* pop frame */ - exit_eval_frame: -+ if (PYTHON_FUNCTION_RETURN_ENABLED()) -+ dtrace_return(f); - Py_LeaveRecursiveCall(); - tstate->frame = f->f_back; - diff --git a/python-2.6.4-no-static-lib.patch b/python-2.6.4-no-static-lib.patch deleted file mode 100644 index 57caafc..0000000 --- a/python-2.6.4-no-static-lib.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -up Python-2.6.4/Makefile.pre.in.no-static-lib Python-2.6.4/Makefile.pre.in ---- Python-2.6.4/Makefile.pre.in.no-static-lib 2010-01-18 13:11:10.975859689 -0500 -+++ Python-2.6.4/Makefile.pre.in 2010-01-18 13:14:27.524859334 -0500 -@@ -382,7 +382,7 @@ coverage: - - - # Build the interpreter --$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) -+$(BUILDPYTHON): Modules/python.o $(LDLIBRARY) - $(LINKCC) $(CFLAGS) $(LDFLAGS) $(LINKFORSHARED) -o $@ \ - Modules/python.o \ - $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) -@@ -398,18 +398,6 @@ sharedmods: $(BUILDPYTHON) - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ - esac - --# Build static library --# avoid long command lines, same as LIBRARY_OBJS --$(LIBRARY): $(LIBRARY_OBJS) -- -rm -f $@ -- $(AR) cr $@ Modules/getbuildinfo.o -- $(AR) cr $@ $(PARSER_OBJS) -- $(AR) cr $@ $(OBJECT_OBJS) -- $(AR) cr $@ $(PYTHON_OBJS) -- $(AR) cr $@ $(MODULE_OBJS) $(SIGNAL_OBJS) -- $(AR) cr $@ $(MODOBJS) -- $(RANLIB) $@ -- - libpython$(VERSION).so: $(LIBRARY_OBJS) - if test $(INSTSONAME) != $(LDLIBRARY); then \ - $(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ -@@ -945,18 +933,6 @@ libainstall: all - else true; \ - fi; \ - done -- @if test -d $(LIBRARY); then :; else \ -- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ -- if test "$(SO)" = .dll; then \ -- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ -- else \ -- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ -- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ -- fi; \ -- else \ -- echo Skip install of $(LIBRARY) - use make frameworkinstall; \ -- fi; \ -- fi - $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c - $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o - $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in diff --git a/python-2.6.5-db48.patch b/python-2.6.5-db48.patch deleted file mode 100644 index d07a42a..0000000 --- a/python-2.6.5-db48.patch +++ /dev/null @@ -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= 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); diff --git a/python-2.6.5-debug-build.patch b/python-2.6.5-debug-build.patch deleted file mode 100644 index 6310e3d..0000000 --- a/python-2.6.5-debug-build.patch +++ /dev/null @@ -1,240 +0,0 @@ -diff -up Python-2.6.5/configure.in.debug-build Python-2.6.5/configure.in ---- Python-2.6.5/configure.in.debug-build 2010-05-19 17:09:31.975902056 -0400 -+++ Python-2.6.5/configure.in 2010-05-19 17:09:31.986901987 -0400 -@@ -620,7 +620,7 @@ AC_SUBST(LIBRARY) - AC_MSG_CHECKING(LIBRARY) - if test -z "$LIBRARY" - then -- LIBRARY='libpython$(VERSION).a' -+ LIBRARY='libpython$(VERSION)$(DEBUG_EXT).a' - fi - AC_MSG_RESULT($LIBRARY) - -@@ -748,8 +748,8 @@ if test $enable_shared = "yes"; then - 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*) -@@ -847,6 +847,14 @@ else AC_MSG_RESULT(no); Py_DEBUG='false' - fi], - [AC_MSG_RESULT(no)]) - -+if test "$Py_DEBUG" = 'true' -+then -+ DEBUG_EXT=_d -+ DEBUG_SUFFIX=-debug -+fi -+AC_SUBST(DEBUG_EXT) -+AC_SUBST(DEBUG_SUFFIX) -+ - # XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be - # 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 ---- Python-2.6.5/Lib/distutils/command/build_ext.py.debug-build 2009-10-13 17:17:34.000000000 -0400 -+++ Python-2.6.5/Lib/distutils/command/build_ext.py 2010-05-19 18:17:14.678196678 -0400 -@@ -677,7 +677,10 @@ class build_ext (Command): - so_ext = get_config_var('SO') - if os.name == 'nt' and self.debug: - return apply(os.path.join, ext_path) + '_d' + so_ext -- return os.path.join(*ext_path) + so_ext -+ -+ # Similarly, extensions in debug mode are named 'module_d.so', to -+ # avoid adding the _d to the SO config variable: -+ return os.path.join(*ext_path) + (sys.pydebug and "_d" or "") + so_ext - - def get_export_symbols (self, ext): - """Return the list of symbols that a shared extension has to -@@ -760,6 +763,8 @@ class build_ext (Command): - template = "python%d.%d" - pythonlib = (template % - (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) -+ if sys.pydebug: -+ pythonlib += '_d' - return ext.libraries + [pythonlib] - else: - return ext.libraries -diff -up Python-2.6.5/Lib/distutils/sysconfig.py.debug-build Python-2.6.5/Lib/distutils/sysconfig.py ---- Python-2.6.5/Lib/distutils/sysconfig.py.debug-build 2010-05-19 17:09:31.926155519 -0400 -+++ Python-2.6.5/Lib/distutils/sysconfig.py 2010-05-19 17:09:31.987902863 -0400 -@@ -81,7 +81,8 @@ def get_python_inc(plat_specific=0, pref - if not os.path.exists(inc_dir): - inc_dir = os.path.join(os.path.dirname(base), "Include") - return inc_dir -- return os.path.join(prefix, "include", "python" + get_python_version()) -+ return os.path.join(prefix, "include", -+ "python" + get_python_version() + (sys.pydebug and '-debug' or '')) - elif os.name == "nt": - return os.path.join(prefix, "include") - elif os.name == "mac": -@@ -224,7 +225,7 @@ def get_makefile_filename(): - if python_build: - return os.path.join(os.path.dirname(sys.executable), "Makefile") - lib_dir = get_python_lib(plat_specific=1, standard_lib=1) -- return os.path.join(lib_dir, "config", "Makefile") -+ return os.path.join(lib_dir, "config" + (sys.pydebug and "-debug" or ""), "Makefile") - - - 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 ---- Python-2.6.5/Makefile.pre.in.debug-build 2010-05-19 17:09:31.984901988 -0400 -+++ Python-2.6.5/Makefile.pre.in 2010-05-19 17:09:31.987902863 -0400 -@@ -96,8 +96,8 @@ SCRIPTDIR= $(prefix)/lib64 - # Detailed destination directories - BINLIBDEST= $(LIBDIR)/python$(VERSION) - LIBDEST= $(SCRIPTDIR)/python$(VERSION) --INCLUDEPY= $(INCLUDEDIR)/python$(VERSION) --CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION) -+INCLUDEPY= $(INCLUDEDIR)/python$(VERSION)$(DEBUG_SUFFIX) -+CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION)$(DEBUG_SUFFIX) - LIBP= $(LIBDIR)/python$(VERSION) - - # Symbols used for using shared libraries -@@ -110,6 +110,12 @@ DESTSHARED= $(BINLIBDEST)/lib-dynload - EXE= @EXEEXT@ - BUILDEXE= @BUILDEXEEXT@ - -+# DEBUG_EXT is used by ELF files (names and SONAMEs); it will be "_d" for a debug build -+# DEBUG_SUFFIX is used by filesystem paths; it will be "-debug" for a debug build -+# Both will be empty in an optimized build -+DEBUG_EXT= @DEBUG_EXT@ -+DEBUG_SUFFIX= @DEBUG_SUFFIX@ -+ - # Short name and location for Mac OS X Python framework - UNIVERSALSDK=@UNIVERSALSDK@ - PYTHONFRAMEWORK= @PYTHONFRAMEWORK@ -@@ -173,8 +179,8 @@ LIBOBJDIR= Python/ - LIBOBJS= @LIBOBJS@ - UNICODE_OBJS= @UNICODE_OBJS@ - --PYTHON= python$(EXE) --BUILDPYTHON= python$(BUILDEXE) -+PYTHON= python$(DEBUG_SUFFIX)$(EXE) -+BUILDPYTHON= python$(DEBUG_SUFFIX)$(BUILDEXE) - - # 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 -@@ -399,7 +405,7 @@ sharedmods: $(BUILDPYTHON) - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ - esac - --libpython$(VERSION).so: $(LIBRARY_OBJS) -+libpython$(VERSION)$(DEBUG_EXT).so: $(LIBRARY_OBJS) - if test $(INSTSONAME) != $(LDLIBRARY); then \ - $(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ - $(LN) -f $(INSTSONAME) $@; \ -@@ -761,9 +767,9 @@ bininstall: altbininstall - then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \ - else true; \ - fi -- (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)) -- -rm -f $(DESTDIR)$(BINDIR)/python-config -- (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config) -+ (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(DEBUG_SUFFIX)$(EXE) $(PYTHON)) -+ -rm -f $(DESTDIR)$(BINDIR)/python$(DEBUG_SUFFIX)-config -+ (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)$(DEBUG_SUFFIX)-config python$(DEBUG_SUFFIX)-config) - - # Install the interpreter with $(VERSION) affixed - # This goes into $(exec_prefix) -@@ -776,7 +782,7 @@ altbininstall: $(BUILDPYTHON) - else true; \ - fi; \ - done -- $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE) -+ $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(DEBUG_SUFFIX)$(EXE) - if test -f $(LDLIBRARY); then \ - if test -n "$(DLLLIBRARY)" ; then \ - $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \ -@@ -935,8 +941,8 @@ inclinstall: - $(INSTALL_DATA) pyconfig.h $(DESTDIR)$(CONFINCLUDEPY)/pyconfig.h - - # Install the library and miscellaneous stuff needed for extending/embedding --# This goes into $(exec_prefix) --LIBPL= $(LIBP)/config -+# This goes into $(exec_prefix)$(DEBUG_SUFFIX) -+LIBPL= $(LIBP)/config$(DEBUG_SUFFIX) - libainstall: all - @for i in $(LIBDIR) $(LIBP) $(LIBPL); \ - do \ -@@ -957,9 +963,9 @@ libainstall: all - $(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 -- 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 -+ rm python$(DEBUG_SUFFIX)-config - @if [ -s Modules/python.exp -a \ - "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \ - 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 ---- Python-2.6.5/Misc/python-config.in.debug-build 2007-03-31 14:56:11.000000000 -0400 -+++ Python-2.6.5/Misc/python-config.in 2010-05-19 17:09:31.987902863 -0400 -@@ -44,7 +44,7 @@ elif opt in ('--includes', '--cflags'): - - elif opt in ('--libs', '--ldflags'): - libs = getvar('LIBS').split() + getvar('SYSLIBS').split() -- libs.append('-lpython'+pyver) -+ libs.append('-lpython' + pyver + (sys.pydebug and "_d" or "")) - # add the prefix/lib/pythonX.Y/config dir, but only if there is no - # shared library in prefix/lib/. - if opt == '--ldflags' and not getvar('Py_ENABLE_SHARED'): -diff -up Python-2.6.5/Modules/makesetup.debug-build Python-2.6.5/Modules/makesetup ---- Python-2.6.5/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 -@@ -233,7 +233,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' | - *$mod.o*) base=$mod;; - *) base=${mod}module;; - esac -- file="$srcdir/$base\$(SO)" -+ file="$srcdir/$base\$(DEBUG_EXT)\$(SO)" - case $doconfig in - no) SHAREDMODS="$SHAREDMODS $file";; - esac -diff -up Python-2.6.5/Python/dynload_shlib.c.debug-build Python-2.6.5/Python/dynload_shlib.c ---- Python-2.6.5/Python/dynload_shlib.c.debug-build 2006-01-03 20:30:17.000000000 -0500 -+++ Python-2.6.5/Python/dynload_shlib.c 2010-05-19 17:09:31.988902536 -0400 -@@ -46,11 +46,16 @@ const struct filedescr _PyImport_DynLoad - {"module.exe", "rb", C_EXTENSION}, - {"MODULE.EXE", "rb", C_EXTENSION}, - #else -+#ifdef Py_DEBUG -+ {"_d.so", "rb", C_EXTENSION}, -+ {"module_d.so", "rb", C_EXTENSION}, -+#else - {".so", "rb", C_EXTENSION}, - {"module.so", "rb", C_EXTENSION}, --#endif --#endif --#endif -+#endif /* Py_DEBUG */ -+#endif /* __VMS */ -+#endif /* defined(PYOS_OS2) && defined(PYCC_GCC) */ -+#endif /* __CYGWIN__ */ - {0, 0} - }; - -diff -up Python-2.6.5/Python/sysmodule.c.debug-build Python-2.6.5/Python/sysmodule.c ---- Python-2.6.5/Python/sysmodule.c.debug-build 2010-03-03 07:31:33.000000000 -0500 -+++ Python-2.6.5/Python/sysmodule.c 2010-05-19 17:09:31.988902536 -0400 -@@ -1436,6 +1436,12 @@ _PySys_Init(void) - FlagsType.tp_init = NULL; - FlagsType.tp_new = NULL; - -+#ifdef Py_DEBUG -+ PyDict_SetItemString(sysdict, "pydebug", Py_True); -+#else -+ PyDict_SetItemString(sysdict, "pydebug", Py_False); -+#endif -+ - #undef SET_SYS_FROM_STRING - if (PyErr_Occurred()) - return NULL; diff --git a/python-2.6.5-remove-PyUnicodeDecodeError_Create-assertions-issue9058.patch b/python-2.6.5-remove-PyUnicodeDecodeError_Create-assertions-issue9058.patch deleted file mode 100644 index 113305a..0000000 --- a/python-2.6.5-remove-PyUnicodeDecodeError_Create-assertions-issue9058.patch +++ /dev/null @@ -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); - } diff --git a/python-2.6.5-statvfs-f_flag-constants.patch b/python-2.6.5-statvfs-f_flag-constants.patch deleted file mode 100644 index 4b3390d..0000000 --- a/python-2.6.5-statvfs-f_flag-constants.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 21fda4c78000d78cb1824fdf0373031d07f5325a Mon Sep 17 00:00:00 2001 -From: Peter Jones -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 - diff --git a/python-2.7-autotool-intermediates.patch b/python-2.7-autotool-intermediates.patch new file mode 100644 index 0000000..8f83847 --- /dev/null +++ b/python-2.7-autotool-intermediates.patch @@ -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 + diff --git a/python-2.7-lib64-sysconfig.patch b/python-2.7-lib64-sysconfig.patch new file mode 100644 index 0000000..0cef361 --- /dev/null +++ b/python-2.7-lib64-sysconfig.patch @@ -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}', diff --git a/python-2.7rc1-binutils-no-dep.patch b/python-2.7rc1-binutils-no-dep.patch new file mode 100644 index 0000000..ee6157c --- /dev/null +++ b/python-2.7rc1-binutils-no-dep.patch @@ -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() diff --git a/python-2.7rc1-codec-ascii-tolower.patch b/python-2.7rc1-codec-ascii-tolower.patch new file mode 100644 index 0000000..bd70c40 --- /dev/null +++ b/python-2.7rc1-codec-ascii-tolower.patch @@ -0,0 +1,24 @@ +diff -up Python-2.7rc1/Python/codecs.c.ascii-tolower Python-2.7rc1/Python/codecs.c +--- Python-2.7rc1/Python/codecs.c.ascii-tolower 2010-05-09 10:46:46.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 + return -1; + } + ++/* isupper() forced into the ASCII Locale */ ++#define ascii_isupper(x) (((x) >= 0x41) && ((x) <= 0x5A)) ++/* tolower() forced into the ASCII Locale */ ++#define ascii_tolower(x) (ascii_isupper(x) ? ((x) + 0x20) : (x)) ++ + /* Convert a string to a normalized Python string: all characters are + converted to lower case, spaces are replaced with underscores. */ + +@@ -70,7 +75,7 @@ PyObject *normalizestring(const char *st + if (ch == ' ') + ch = '-'; + else +- ch = tolower(Py_CHARMASK(ch)); ++ ch = ascii_tolower(Py_CHARMASK(ch)); + p[i] = ch; + } + return v; diff --git a/python-2.7rc1-config.patch b/python-2.7rc1-config.patch new file mode 100644 index 0000000..6d8daf3 --- /dev/null +++ b/python-2.7rc1-config.patch @@ -0,0 +1,283 @@ +diff -up Python-2.7rc1/Modules/Setup.dist.rhconfig Python-2.7rc1/Modules/Setup.dist +--- Python-2.7rc1/Modules/Setup.dist.rhconfig 2009-12-21 10:22:00.000000000 -0500 ++++ Python-2.7rc1/Modules/Setup.dist 2010-06-05 23:51:30.579225134 -0400 +@@ -152,7 +152,7 @@ GLHACK=-Dclear=__GLclear + # modules are to be built as shared libraries (see above for more + # detail; also note that *static* reverses this effect): + +-#*shared* ++*shared* + + # GNU readline. Unlike previous Python incarnations, GNU readline is + # now incorporated in an optional module, configured in the Setup file +@@ -162,74 +162,74 @@ GLHACK=-Dclear=__GLclear + # it, depending on your system -- see the GNU readline instructions. + # It's okay for this to be a shared library, too. + +-#readline readline.c -lreadline -ltermcap ++readline readline.c -lreadline -ltermcap + + + # Modules that should always be present (non UNIX dependent): + +-#array arraymodule.c # array objects +-#cmath cmathmodule.c _math.c # -lm # complex math library functions +-#math mathmodule.c _math.c # -lm # math library functions, e.g. sin() +-#_struct _struct.c # binary structure packing/unpacking +-#time timemodule.c # -lm # time operations and variables +-#operator operator.c # operator.add() and similar goodies +-#_weakref _weakref.c # basic weak reference support +-#_testcapi _testcapimodule.c # Python C API test module +-#_random _randommodule.c # Random number generator +-#_collections _collectionsmodule.c # Container types +-#itertools itertoolsmodule.c # Functions creating iterators for efficient looping +-#strop stropmodule.c # String manipulations +-#_functools _functoolsmodule.c # Tools for working with functions and callable objects ++array arraymodule.c # array objects ++cmath cmathmodule.c _math.c # -lm # complex math library functions ++math mathmodule.c _math.c # -lm # math library functions, e.g. sin() ++_struct _struct.c # binary structure packing/unpacking ++time timemodule.c # -lm # time operations and variables ++operator operator.c # operator.add() and similar goodies ++_weakref _weakref.c # basic weak reference support ++_testcapi _testcapimodule.c # Python C API test module ++_random _randommodule.c # Random number generator ++_collections _collectionsmodule.c # Container types ++itertools itertoolsmodule.c # Functions creating iterators for efficient looping ++strop stropmodule.c # String manipulations ++_functools _functoolsmodule.c # Tools for working with functions and callable objects + #_elementtree -I$(srcdir)/Modules/expat -DHAVE_EXPAT_CONFIG_H -DUSE_PYEXPAT_CAPI _elementtree.c # elementtree accelerator + #_pickle _pickle.c # pickle accelerator + #datetime datetimemodule.c # date/time type +-#_bisect _bisectmodule.c # Bisection algorithms ++_bisect _bisectmodule.c # Bisection algorithms + +-#unicodedata unicodedata.c # static Unicode character database ++unicodedata unicodedata.c # static Unicode character database + + # access to ISO C locale support +-#_locale _localemodule.c # -lintl ++_locale _localemodule.c # -lintl + + + # Modules with some UNIX dependencies -- on by default: + # (If you have a really backward UNIX, select and socket may not be + # supported...) + +-#fcntl fcntlmodule.c # fcntl(2) and ioctl(2) +-#spwd spwdmodule.c # spwd(3) +-#grp grpmodule.c # grp(3) +-#select selectmodule.c # select(2); not on ancient System V ++fcntl fcntlmodule.c # fcntl(2) and ioctl(2) ++spwd spwdmodule.c # spwd(3) ++grp grpmodule.c # grp(3) ++select selectmodule.c # select(2); not on ancient System V + + # Memory-mapped files (also works on Win32). +-#mmap mmapmodule.c ++mmap mmapmodule.c + + # CSV file helper +-#_csv _csv.c ++_csv _csv.c + + # Socket module helper for socket(2) +-#_socket socketmodule.c ++_socket socketmodule.c + + # Socket module helper for SSL support; you must comment out the other + # socket line above, and possibly edit the SSL variable: + #SSL=/usr/local/ssl +-#_ssl _ssl.c \ +-# -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ +-# -L$(SSL)/lib -lssl -lcrypto ++_ssl _ssl.c \ ++ -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ ++ -L$(SSL)/lib -lssl -lcrypto + + # The crypt module is now disabled by default because it breaks builds + # on many systems (where -lcrypt is needed), e.g. Linux (I believe). + # + # 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 + + + # Some more UNIX dependent modules -- off by default, since these + # are not supported by all UNIX systems: + +-#nis nismodule.c -lnsl # Sun yellow pages -- not everywhere +-#termios termios.c # Steen Lumholt's termios module +-#resource resource.c # Jeremy Hylton's rlimit interface ++nis nismodule.c -lnsl # Sun yellow pages -- not everywhere ++termios termios.c # Steen Lumholt's termios module ++resource resource.c # Jeremy Hylton's rlimit interface + + + # Multimedia modules -- off by default. +@@ -237,8 +237,8 @@ GLHACK=-Dclear=__GLclear + # #993173 says audioop works on 64-bit platforms, though. + # These represent audio samples or images as strings: + +-#audioop audioop.c # Operations on audio samples +-#imageop imageop.c # Operations on images ++audioop audioop.c # Operations on audio samples ++imageop imageop.c # Operations on images + + + # Note that the _md5 and _sha modules are normally only built if the +@@ -248,14 +248,14 @@ GLHACK=-Dclear=__GLclear + # Message-Digest Algorithm, described in RFC 1321. The necessary files + # md5.c and md5.h are included here. + +-#_md5 md5module.c md5.c ++_md5 md5module.c md5.c + + + # The _sha module implements the SHA checksum algorithms. + # (NIST's Secure Hash Algorithms.) +-#_sha shamodule.c +-#_sha256 sha256module.c +-#_sha512 sha512module.c ++_sha shamodule.c ++_sha256 sha256module.c ++_sha512 sha512module.c + + + # SGI IRIX specific modules -- off by default. +@@ -302,12 +302,12 @@ GLHACK=-Dclear=__GLclear + # A Linux specific module -- off by default; this may also work on + # some *BSDs. + +-#linuxaudiodev linuxaudiodev.c ++linuxaudiodev linuxaudiodev.c + + + # George Neville-Neil's timing module: + +-#timing timingmodule.c ++timing timingmodule.c + + + # The _tkinter module. +@@ -322,7 +322,7 @@ GLHACK=-Dclear=__GLclear + # every system. + + # *** Always uncomment this (leave the leading underscore in!): +-# _tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ ++_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT \ + # *** Uncomment and edit to reflect where your Tcl/Tk libraries are: + # -L/usr/local/lib \ + # *** Uncomment and edit to reflect where your Tcl/Tk headers are: +@@ -332,7 +332,7 @@ GLHACK=-Dclear=__GLclear + # *** Or uncomment this for Solaris: + # -I/usr/openwin/include \ + # *** Uncomment and edit for Tix extension only: +-# -DWITH_TIX -ltix8.1.8.2 \ ++ -DWITH_TIX -ltix \ + # *** Uncomment and edit for BLT extension only: + # -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \ + # *** Uncomment and edit for PIL (TkImaging) extension only: +@@ -341,7 +341,7 @@ GLHACK=-Dclear=__GLclear + # *** Uncomment and edit for TOGL extension only: + # -DWITH_TOGL togl.c \ + # *** Uncomment and edit to reflect your Tcl/Tk versions: +-# -ltk8.2 -ltcl8.2 \ ++ -ltk -ltcl \ + # *** Uncomment and edit to reflect where your X11 libraries are: + # -L/usr/X11R6/lib \ + # *** Or uncomment this for Solaris: +@@ -351,7 +351,7 @@ GLHACK=-Dclear=__GLclear + # *** Uncomment for AIX: + # -lld \ + # *** Always uncomment this; X11 libraries to link with: +-# -lX11 ++ -lX11 + + # Lance Ellinghaus's syslog module + #syslog syslogmodule.c # syslog daemon interface +@@ -373,7 +373,7 @@ GLHACK=-Dclear=__GLclear + # it is a highly experimental and dangerous device for calling + # *arbitrary* C functions in *arbitrary* shared libraries: + +-#dl dlmodule.c ++dl dlmodule.c + + + # Modules that provide persistent dictionary-like semantics. You will +@@ -396,7 +396,7 @@ GLHACK=-Dclear=__GLclear + # + # First, look at Setup.config; configure may have set this for you. + +-#gdbm gdbmmodule.c -I/usr/local/include -L/usr/local/lib -lgdbm ++gdbm gdbmmodule.c -lgdbm + + + # Sleepycat Berkeley DB interface. +@@ -411,11 +411,10 @@ GLHACK=-Dclear=__GLclear + # + # Edit the variables DB and DBLIBVERto point to the db top directory + # and the subdirectory of PORT where you built it. +-#DB=/usr/local/BerkeleyDB.4.0 +-#DBLIBVER=4.0 +-#DBINC=$(DB)/include +-#DBLIB=$(DB)/lib +-#_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER) ++DBLIBVER=4.7 ++DBINC=/usr/include/db4 ++DBLIB=/usr/lib ++_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER) + + # Historical Berkeley DB 1.85 + # +@@ -430,14 +429,14 @@ GLHACK=-Dclear=__GLclear + + + # Helper module for various ascii-encoders +-#binascii binascii.c ++binascii binascii.c + + # Fred Drake's interface to the Python parser +-#parser parsermodule.c ++parser parsermodule.c + + # cStringIO and cPickle +-#cStringIO cStringIO.c +-#cPickle cPickle.c ++cStringIO cStringIO.c ++cPickle cPickle.c + + + # Lee Busby's SIGFPE modules. +@@ -460,7 +459,7 @@ GLHACK=-Dclear=__GLclear + # Andrew Kuchling's zlib module. + # This require zlib 1.1.3 (or later). + # See http://www.gzip.org/zlib/ +-#zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz ++zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz + + # Interface to the Expat XML parser + # +@@ -479,14 +478,14 @@ GLHACK=-Dclear=__GLclear + # Hye-Shik Chang's CJKCodecs + + # multibytecodec is required for all the other CJK codec modules +-#_multibytecodec cjkcodecs/multibytecodec.c ++_multibytecodec cjkcodecs/multibytecodec.c + +-#_codecs_cn cjkcodecs/_codecs_cn.c +-#_codecs_hk cjkcodecs/_codecs_hk.c +-#_codecs_iso2022 cjkcodecs/_codecs_iso2022.c +-#_codecs_jp cjkcodecs/_codecs_jp.c +-#_codecs_kr cjkcodecs/_codecs_kr.c +-#_codecs_tw cjkcodecs/_codecs_tw.c ++_codecs_cn cjkcodecs/_codecs_cn.c ++_codecs_hk cjkcodecs/_codecs_hk.c ++_codecs_iso2022 cjkcodecs/_codecs_iso2022.c ++_codecs_jp cjkcodecs/_codecs_jp.c ++_codecs_kr cjkcodecs/_codecs_kr.c ++_codecs_tw cjkcodecs/_codecs_tw.c + + # Example -- included for reference only: + # xx xxmodule.c diff --git a/python-2.7rc1-ctypes-noexecmem.patch b/python-2.7rc1-ctypes-noexecmem.patch new file mode 100644 index 0000000..ccc2e68 --- /dev/null +++ b/python-2.7rc1-ctypes-noexecmem.patch @@ -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': diff --git a/python-2.7rc1-debug-build.patch b/python-2.7rc1-debug-build.patch new file mode 100644 index 0000000..e3cc3ac --- /dev/null +++ b/python-2.7rc1-debug-build.patch @@ -0,0 +1,257 @@ +diff -up Python-2.7rc2/configure.in.debug-build Python-2.7rc2/configure.in +--- Python-2.7rc2/configure.in.debug-build 2010-06-24 12:59:28.166319997 -0400 ++++ Python-2.7rc2/configure.in 2010-06-24 12:59:28.179376823 -0400 +@@ -641,7 +641,7 @@ AC_SUBST(LIBRARY) + AC_MSG_CHECKING(LIBRARY) + if test -z "$LIBRARY" + then +- LIBRARY='libpython$(VERSION).a' ++ LIBRARY='libpython$(VERSION)$(DEBUG_EXT).a' + fi + AC_MSG_RESULT($LIBRARY) + +@@ -786,8 +786,8 @@ if test $enable_shared = "yes"; then + 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*) +@@ -892,6 +892,14 @@ else AC_MSG_RESULT(no); Py_DEBUG='false' + fi], + [AC_MSG_RESULT(no)]) + ++if test "$Py_DEBUG" = 'true' ++then ++ DEBUG_EXT=_d ++ DEBUG_SUFFIX=-debug ++fi ++AC_SUBST(DEBUG_EXT) ++AC_SUBST(DEBUG_SUFFIX) ++ + # XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be + # merged with this chunk of code? + +diff -up Python-2.7rc2/Lib/distutils/command/build_ext.py.debug-build Python-2.7rc2/Lib/distutils/command/build_ext.py +--- Python-2.7rc2/Lib/distutils/command/build_ext.py.debug-build 2010-04-01 14:17:09.000000000 -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): + so_ext = get_config_var('SO') + if os.name == 'nt' and self.debug: + return os.path.join(*ext_path) + '_d' + so_ext +- return os.path.join(*ext_path) + so_ext ++ ++ # Similarly, extensions in debug mode are named 'module_d.so', to ++ # avoid adding the _d to the SO config variable: ++ return os.path.join(*ext_path) + (sys.pydebug and "_d" or "") + so_ext + + def get_export_symbols (self, ext): + """Return the list of symbols that a shared extension has to +@@ -760,6 +763,8 @@ class build_ext (Command): + template = "python%d.%d" + pythonlib = (template % + (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) ++ if sys.pydebug: ++ pythonlib += '_d' + return ext.libraries + [pythonlib] + else: + return ext.libraries +diff -up Python-2.7rc2/Lib/distutils/sysconfig.py.debug-build Python-2.7rc2/Lib/distutils/sysconfig.py +--- Python-2.7rc2/Lib/distutils/sysconfig.py.debug-build 2010-06-24 12:59:28.145319202 -0400 ++++ Python-2.7rc2/Lib/distutils/sysconfig.py 2010-06-24 12:59:28.180381519 -0400 +@@ -85,7 +85,8 @@ def get_python_inc(plat_specific=0, pref + # Include is located in the srcdir + inc_dir = os.path.join(srcdir, "Include") + return inc_dir +- return os.path.join(prefix, "include", "python" + get_python_version()) ++ return os.path.join(prefix, "include", ++ "python" + get_python_version() + (sys.pydebug and '-debug' or '')) + elif os.name == "nt": + return os.path.join(prefix, "include") + elif os.name == "os2": +@@ -211,7 +212,7 @@ def get_makefile_filename(): + if python_build: + return os.path.join(os.path.dirname(sys.executable), "Makefile") + lib_dir = get_python_lib(plat_specific=1, standard_lib=1) +- return os.path.join(lib_dir, "config", "Makefile") ++ return os.path.join(lib_dir, "config" + (sys.pydebug and "-debug" or ""), "Makefile") + + + def parse_config_h(fp, g=None): +diff -up Python-2.7rc2/Makefile.pre.in.debug-build Python-2.7rc2/Makefile.pre.in +--- Python-2.7rc2/Makefile.pre.in.debug-build 2010-06-24 12:59:28.175377249 -0400 ++++ Python-2.7rc2/Makefile.pre.in 2010-06-24 13:01:24.559945307 -0400 +@@ -99,8 +99,8 @@ SCRIPTDIR= $(prefix)/lib64 + # Detailed destination directories + BINLIBDEST= $(LIBDIR)/python$(VERSION) + LIBDEST= $(SCRIPTDIR)/python$(VERSION) +-INCLUDEPY= $(INCLUDEDIR)/python$(VERSION) +-CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION) ++INCLUDEPY= $(INCLUDEDIR)/python$(VERSION)$(DEBUG_SUFFIX) ++CONFINCLUDEPY= $(CONFINCLUDEDIR)/python$(VERSION)$(DEBUG_SUFFIX) + LIBP= $(LIBDIR)/python$(VERSION) + + # Symbols used for using shared libraries +@@ -114,6 +114,12 @@ DESTSHARED= $(BINLIBDEST)/lib-dynload + EXE= @EXEEXT@ + BUILDEXE= @BUILDEXEEXT@ + ++# DEBUG_EXT is used by ELF files (names and SONAMEs); it will be "_d" for a debug build ++# DEBUG_SUFFIX is used by filesystem paths; it will be "-debug" for a debug build ++# Both will be empty in an optimized build ++DEBUG_EXT= @DEBUG_EXT@ ++DEBUG_SUFFIX= @DEBUG_SUFFIX@ ++ + # Short name and location for Mac OS X Python framework + UNIVERSALSDK=@UNIVERSALSDK@ + PYTHONFRAMEWORK= @PYTHONFRAMEWORK@ +@@ -177,8 +183,8 @@ LIBOBJDIR= Python/ + LIBOBJS= @LIBOBJS@ + UNICODE_OBJS= @UNICODE_OBJS@ + +-PYTHON= python$(EXE) +-BUILDPYTHON= python$(BUILDEXE) ++PYTHON= python$(DEBUG_SUFFIX)$(EXE) ++BUILDPYTHON= python$(DEBUG_SUFFIX)$(BUILDEXE) + + # 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 +@@ -409,7 +415,7 @@ sharedmods: $(BUILDPYTHON) + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ + esac + +-libpython$(VERSION).so: $(LIBRARY_OBJS) ++libpython$(VERSION)$(DEBUG_EXT).so: $(LIBRARY_OBJS) + if test $(INSTSONAME) != $(LDLIBRARY); then \ + $(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ + $(LN) -f $(INSTSONAME) $@; \ +@@ -788,9 +794,9 @@ bininstall: altbininstall + then rm -f $(DESTDIR)$(BINDIR)/$(PYTHON); \ + else true; \ + fi +- (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON)) +- -rm -f $(DESTDIR)$(BINDIR)/python-config +- (cd $(DESTDIR)$(BINDIR); $(LN) -s python$(VERSION)-config python-config) ++ (cd $(DESTDIR)$(BINDIR); $(LN) python$(VERSION)$(DEBUG_SUFFIX)$(EXE) $(PYTHON)) ++ -rm -f $(DESTDIR)$(BINDIR)/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) + -rm -f $(DESTDIR)$(LIBPC)/python.pc + (cd $(DESTDIR)$(LIBPC); $(LN) -s python-$(VERSION).pc python.pc) +@@ -806,7 +812,7 @@ altbininstall: $(BUILDPYTHON) + else true; \ + fi; \ + done +- $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(EXE) ++ $(INSTALL_PROGRAM) $(BUILDPYTHON) $(DESTDIR)$(BINDIR)/python$(VERSION)$(DEBUG_SUFFIX)$(EXE) + if test -f $(LDLIBRARY); then \ + if test -n "$(DLLLIBRARY)" ; then \ + $(INSTALL_SHARED) $(DLLLIBRARY) $(DESTDIR)$(BINDIR); \ +@@ -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 the library and miscellaneous stuff needed for extending/embedding +-# This goes into $(exec_prefix) +-LIBPL= $(LIBP)/config ++# This goes into $(exec_prefix)$(DEBUG_SUFFIX) ++LIBPL= $(LIBP)/config$(DEBUG_SUFFIX) + + # pkgconfig directory + LIBPC= $(LIBDIR)/pkgconfig + +-libainstall: all python-config ++libainstall: all python$(DEBUG_SUFFIX)-config + @for i in $(LIBDIR) $(LIBP) $(LIBPL) $(LIBPC); \ + do \ + 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) python-config $(DESTDIR)$(BINDIR)/python$(VERSION)-config +- rm python-config ++ $(INSTALL_SCRIPT) python$(DEBUG_SUFFIX)-config $(DESTDIR)$(BINDIR)/python$(VERSION)$(DEBUG_SUFFIX)-config + @if [ -s Modules/python.exp -a \ + "`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \ + echo; echo "Installing support files for building shared extension modules on AIX:"; \ +diff -up Python-2.7rc2/Misc/python-config.in.debug-build Python-2.7rc2/Misc/python-config.in +--- Python-2.7rc2/Misc/python-config.in.debug-build 2010-03-18 20:08:44.000000000 -0400 ++++ Python-2.7rc2/Misc/python-config.in 2010-06-24 12:59:28.182375371 -0400 +@@ -45,7 +45,7 @@ for opt in opt_flags: + + elif opt in ('--libs', '--ldflags'): + libs = getvar('LIBS').split() + getvar('SYSLIBS').split() +- libs.append('-lpython'+pyver) ++ libs.append('-lpython' + pyver + (sys.pydebug and "_d" or "")) + # add the prefix/lib/pythonX.Y/config dir, but only if there is no + # shared library in prefix/lib/. + if opt == '--ldflags': +diff -up Python-2.7rc2/Modules/makesetup.debug-build Python-2.7rc2/Modules/makesetup +--- Python-2.7rc2/Modules/makesetup.debug-build 2007-09-05 07:47:34.000000000 -0400 ++++ Python-2.7rc2/Modules/makesetup 2010-06-24 12:59:28.182375371 -0400 +@@ -233,7 +233,7 @@ sed -e 's/[ ]*#.*//' -e '/^[ ]*$/d' | + *$mod.o*) base=$mod;; + *) base=${mod}module;; + esac +- file="$srcdir/$base\$(SO)" ++ file="$srcdir/$base\$(DEBUG_EXT)\$(SO)" + case $doconfig in + no) SHAREDMODS="$SHAREDMODS $file";; + esac +diff -up Python-2.7rc2/Python/dynload_shlib.c.debug-build Python-2.7rc2/Python/dynload_shlib.c +--- Python-2.7rc2/Python/dynload_shlib.c.debug-build 2010-05-09 10:46:46.000000000 -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 + {"module.exe", "rb", C_EXTENSION}, + {"MODULE.EXE", "rb", C_EXTENSION}, + #else ++#ifdef Py_DEBUG ++ {"_d.so", "rb", C_EXTENSION}, ++ {"module_d.so", "rb", C_EXTENSION}, ++#else + {".so", "rb", C_EXTENSION}, + {"module.so", "rb", C_EXTENSION}, +-#endif +-#endif +-#endif ++#endif /* Py_DEBUG */ ++#endif /* __VMS */ ++#endif /* defined(PYOS_OS2) && defined(PYCC_GCC) */ ++#endif /* __CYGWIN__ */ + {0, 0} + }; + +diff -up Python-2.7rc2/Python/sysmodule.c.debug-build Python-2.7rc2/Python/sysmodule.c +--- Python-2.7rc2/Python/sysmodule.c.debug-build 2010-05-21 13:12:38.000000000 -0400 ++++ Python-2.7rc2/Python/sysmodule.c 2010-06-24 12:59:28.184375034 -0400 +@@ -1557,6 +1557,12 @@ _PySys_Init(void) + PyString_FromString("legacy")); + #endif + ++#ifdef Py_DEBUG ++ PyDict_SetItemString(sysdict, "pydebug", Py_True); ++#else ++ PyDict_SetItemString(sysdict, "pydebug", Py_False); ++#endif ++ + #undef SET_SYS_FROM_STRING + if (PyErr_Occurred()) + return NULL; diff --git a/python-2.7rc1-dtrace.patch b/python-2.7rc1-dtrace.patch new file mode 100644 index 0000000..8c81e9d --- /dev/null +++ b/python-2.7rc1-dtrace.patch @@ -0,0 +1,198 @@ +diff -up Python-2.7rc1/configure.in.systemtap Python-2.7rc1/configure.in +--- Python-2.7rc1/configure.in.systemtap 2010-06-06 10:53:15.514975012 -0400 ++++ Python-2.7rc1/configure.in 2010-06-06 10:53:15.520974361 -0400 +@@ -2616,6 +2616,38 @@ if test "$with_valgrind" != no; then + ) + fi + ++# Check for dtrace support ++AC_MSG_CHECKING(for --with-dtrace) ++AC_ARG_WITH(dtrace, ++ AC_HELP_STRING(--with(out)-dtrace, disable/enable dtrace support)) ++ ++if test ! -z "$with_dtrace" ++then ++ if dtrace -G -o /dev/null -s $srcdir/Include/pydtrace.d 2>/dev/null ++ then ++ AC_DEFINE(WITH_DTRACE, 1, ++ [Define if you want to compile in Dtrace support]) ++ with_dtrace="Sun" ++ DTRACEOBJS="Python/dtrace.o" ++ DTRADEHDRS="" ++ elif dtrace -h -o /dev/null -s $srcdir/Include/pydtrace.d ++ then ++ AC_DEFINE(WITH_DTRACE, 1, ++ [Define if you want to compile in Dtrace support]) ++ with_dtrace="Apple" ++ DTRACEOBJS="" ++ DTRADEHDRS="pydtrace.h" ++ else ++ with_dtrace="no" ++ fi ++else ++ with_dtrace="no" ++fi ++ ++AC_MSG_RESULT($with_dtrace) ++AC_SUBST(DTRACEOBJS) ++AC_SUBST(DTRACEHDRS) ++ + # Check for --with-wctype-functions + AC_MSG_CHECKING(for --with-wctype-functions) + AC_ARG_WITH(wctype-functions, +diff -up Python-2.7rc1/Include/pydtrace.d.systemtap Python-2.7rc1/Include/pydtrace.d +--- Python-2.7rc1/Include/pydtrace.d.systemtap 2010-06-06 10:53:15.520974361 -0400 ++++ Python-2.7rc1/Include/pydtrace.d 2010-06-06 10:53:15.520974361 -0400 +@@ -0,0 +1,10 @@ ++provider python { ++ probe function__entry(const char *, const char *, int); ++ probe function__return(const char *, const char *, int); ++}; ++ ++#pragma D attributes Evolving/Evolving/Common provider python provider ++#pragma D attributes Private/Private/Common provider python module ++#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 args +diff -up Python-2.7rc1/Makefile.pre.in.systemtap Python-2.7rc1/Makefile.pre.in +--- Python-2.7rc1/Makefile.pre.in.systemtap 2010-06-06 10:53:15.488978775 -0400 ++++ Python-2.7rc1/Makefile.pre.in 2010-06-06 11:05:30.411100568 -0400 +@@ -298,6 +298,7 @@ PYTHON_OBJS= \ + Python/formatter_unicode.o \ + Python/formatter_string.o \ + Python/$(DYNLOADFILE) \ ++ @DTRACEOBJS@ \ + $(LIBOBJS) \ + $(MACHDEP_OBJS) \ + $(THREADOBJ) +@@ -599,6 +600,18 @@ Python/formatter_unicode.o: $(srcdir)/Py + Python/formatter_string.o: $(srcdir)/Python/formatter_string.c \ + $(STRINGLIB_HEADERS) + ++# Only needed with --with-dtrace ++buildinclude: ++ mkdir -p Include ++ ++Include/pydtrace.h: buildinclude $(srcdir)/Include/pydtrace.d ++ dtrace -o $@ $(DFLAGS) -C -h -s $(srcdir)/Include/pydtrace.d ++ ++Python/ceval.o: Include/pydtrace.h ++ ++Python/dtrace.o: buildinclude $(srcdir)/Include/pydtrace.d Python/ceval.o ++ dtrace -o $@ $(DFLAGS) -C -G -s $(srcdir)/Include/pydtrace.d Python/ceval.o ++ + ############################################################################ + # Header files + +@@ -1251,7 +1264,7 @@ Python/thread.o: @THREADHEADERS@ + .PHONY: frameworkinstall frameworkinstallframework frameworkinstallstructure + .PHONY: frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools + .PHONY: frameworkaltinstallunixtools recheck autoconf clean clobber distclean +-.PHONY: smelly funny patchcheck ++.PHONY: smelly funny patchcheck buildinclude + .PHONY: gdbhooks + + # IF YOU PUT ANYTHING HERE IT WILL GO AWAY +diff -up Python-2.7rc1/pyconfig.h.in.systemtap Python-2.7rc1/pyconfig.h.in +--- Python-2.7rc1/pyconfig.h.in.systemtap 2010-05-08 07:04:18.000000000 -0400 ++++ Python-2.7rc1/pyconfig.h.in 2010-06-06 10:53:15.521974070 -0400 +@@ -1074,6 +1074,9 @@ + /* Define if you want documentation strings in extension modules */ + #undef WITH_DOC_STRINGS + ++/* Define if you want to compile in Dtrace support */ ++#undef WITH_DTRACE ++ + /* Define if you want to use the new-style (Openstep, Rhapsody, MacOS) dynamic + linker (dyld) instead of the old-style (NextStep) dynamic linker (rld). + Dyld is necessary to support frameworks. */ +diff -up Python-2.7rc1/Python/ceval.c.systemtap Python-2.7rc1/Python/ceval.c +--- Python-2.7rc1/Python/ceval.c.systemtap 2010-05-09 10:46:46.000000000 -0400 ++++ Python-2.7rc1/Python/ceval.c 2010-06-06 11:08:40.683100500 -0400 +@@ -19,6 +19,10 @@ + + #include + ++#ifdef WITH_DTRACE ++#include "pydtrace.h" ++#endif ++ + #ifndef WITH_TSC + + #define READ_TIMESTAMP(var) +@@ -671,6 +675,55 @@ PyEval_EvalCode(PyCodeObject *co, PyObje + NULL); + } + ++#ifdef WITH_DTRACE ++static void ++dtrace_entry(PyFrameObject *f) ++{ ++ const char *filename; ++ const char *fname; ++ 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); ++ ++ /* ++ * Currently a USDT tail-call will not receive the correct arguments. ++ * Disable the tail call here. ++ */ ++#if defined(__sparc) ++ asm("nop"); ++#endif ++} ++ ++static void ++dtrace_return(PyFrameObject *f) ++{ ++ const char *filename; ++ const char *fname; ++ 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); ++ ++ /* ++ * Currently a USDT tail-call will not receive the correct arguments. ++ * Disable the tail call here. ++ */ ++#if defined(__sparc) ++ asm("nop"); ++#endif ++} ++#else ++#define PYTHON_FUNCTION_ENTRY_ENABLED() 0 ++#define PYTHON_FUNCTION_RETURN_ENABLED() 0 ++#define dtrace_entry(f) ++#define dtrace_return(f) ++#endif + + /* Interpreter main loop */ + +@@ -909,6 +962,9 @@ PyEval_EvalFrameEx(PyFrameObject *f, int + } + } + ++ if (PYTHON_FUNCTION_ENTRY_ENABLED()) ++ dtrace_entry(f); ++ + co = f->f_code; + names = co->co_names; + consts = co->co_consts; +@@ -3000,6 +3056,9 @@ fast_yield: + + /* pop frame */ + exit_eval_frame: ++ if (PYTHON_FUNCTION_RETURN_ENABLED()) ++ dtrace_return(f); ++ + Py_LeaveRecursiveCall(); + tstate->frame = f->f_back; + diff --git a/python-2.7rc1-lib64.patch b/python-2.7rc1-lib64.patch new file mode 100644 index 0000000..9462e82 --- /dev/null +++ b/python-2.7rc1-lib64.patch @@ -0,0 +1,168 @@ +diff -up Python-2.7rc1/Lib/distutils/command/install.py.lib64 Python-2.7rc1/Lib/distutils/command/install.py +--- Python-2.7rc1/Lib/distutils/command/install.py.lib64 2010-05-05 15:09:31.000000000 -0400 ++++ Python-2.7rc1/Lib/distutils/command/install.py 2010-06-05 23:53:24.802224367 -0400 +@@ -42,14 +42,14 @@ else: + INSTALL_SCHEMES = { + 'unix_prefix': { + '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', + 'headers': '$base/include/python$py_version_short/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', + }, + 'unix_home': { + 'purelib': '$base/lib/python', +- 'platlib': '$base/lib/python', ++ 'platlib': '$base/lib64/python', + 'headers': '$base/include/python/$dist_name', + 'scripts': '$base/bin', + 'data' : '$base', +diff -up Python-2.7rc1/Lib/distutils/sysconfig.py.lib64 Python-2.7rc1/Lib/distutils/sysconfig.py +--- Python-2.7rc1/Lib/distutils/sysconfig.py.lib64 2010-05-05 15:09:31.000000000 -0400 ++++ Python-2.7rc1/Lib/distutils/sysconfig.py 2010-06-05 23:53:24.803224186 -0400 +@@ -114,8 +114,12 @@ def get_python_lib(plat_specific=0, stan + prefix = plat_specific and EXEC_PREFIX or PREFIX + + if os.name == "posix": ++ if plat_specific or standard_lib: ++ lib = "lib64" ++ else: ++ lib = "lib" + libpython = os.path.join(prefix, +- "lib", "python" + get_python_version()) ++ lib, "python" + get_python_version()) + if standard_lib: + return libpython + else: +diff -up Python-2.7rc1/Lib/site.py.lib64 Python-2.7rc1/Lib/site.py +--- Python-2.7rc1/Lib/site.py.lib64 2010-06-03 17:21:03.000000000 -0400 ++++ Python-2.7rc1/Lib/site.py 2010-06-06 04:56:41.504986054 -0400 +@@ -286,12 +286,16 @@ def getsitepackages(): + if sys.platform in ('os2emx', 'riscos'): + sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) + elif os.sep == '/': ++ sitepackages.append(os.path.join(prefix, "lib64", ++ "python" + sys.version[:3], ++ "site-packages")) + sitepackages.append(os.path.join(prefix, "lib", + "python" + sys.version[:3], + "site-packages")) + sitepackages.append(os.path.join(prefix, "lib", "site-python")) + else: + sitepackages.append(prefix) ++ sitepackages.append(os.path.join(prefix, "lib64", "site-packages")) + sitepackages.append(os.path.join(prefix, "lib", "site-packages")) + if sys.platform == "darwin": + # for framework builds *only* we add the standard Apple +diff -up Python-2.7rc1/Makefile.pre.in.lib64 Python-2.7rc1/Makefile.pre.in +--- Python-2.7rc1/Makefile.pre.in.lib64 2010-06-05 23:53:24.000000000 -0400 ++++ Python-2.7rc1/Makefile.pre.in 2010-06-06 04:57:25.280017307 -0400 +@@ -94,7 +94,7 @@ LIBDIR= @libdir@ + MANDIR= @mandir@ + INCLUDEDIR= @includedir@ + CONFINCLUDEDIR= $(exec_prefix)/include +-SCRIPTDIR= $(prefix)/lib ++SCRIPTDIR= $(prefix)/lib64 + + # Detailed destination directories + BINLIBDEST= $(LIBDIR)/python$(VERSION) +diff -up Python-2.7rc1/Modules/getpath.c.lib64 Python-2.7rc1/Modules/getpath.c +--- Python-2.7rc1/Modules/getpath.c.lib64 2010-05-09 10:46:46.000000000 -0400 ++++ Python-2.7rc1/Modules/getpath.c 2010-06-06 04:58:53.840226352 -0400 +@@ -117,8 +117,8 @@ + #endif + + #ifndef PYTHONPATH +-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ +- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" ++#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \ ++ EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload" + #endif + + #ifndef LANDMARK +@@ -129,7 +129,7 @@ static char prefix[MAXPATHLEN+1]; + static char exec_prefix[MAXPATHLEN+1]; + static char progpath[MAXPATHLEN+1]; + static char *module_search_path = NULL; +-static char lib_python[] = "lib/python" VERSION; ++static char lib_python[] = "lib64/python" VERSION; + + static void + reduce(char *dir) +@@ -524,7 +524,7 @@ calculate_path(void) + } + else + strncpy(zip_path, PREFIX, MAXPATHLEN); +- joinpath(zip_path, "lib/python00.zip"); ++ joinpath(zip_path, "lib64/python00.zip"); + bufsz = strlen(zip_path); /* Replace "00" with version */ + zip_path[bufsz - 6] = VERSION[0]; + zip_path[bufsz - 5] = VERSION[2]; +@@ -534,7 +534,7 @@ calculate_path(void) + fprintf(stderr, + "Could not find platform dependent libraries \n"); + strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN); +- joinpath(exec_prefix, "lib/lib-dynload"); ++ joinpath(exec_prefix, "lib64/lib-dynload"); + } + /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */ + +diff -up Python-2.7rc1/Modules/Setup.dist.lib64 Python-2.7rc1/Modules/Setup.dist +--- Python-2.7rc1/Modules/Setup.dist.lib64 2010-06-05 23:53:24.792224061 -0400 ++++ Python-2.7rc1/Modules/Setup.dist 2010-06-05 23:53:24.845009526 -0400 +@@ -413,7 +413,7 @@ gdbm gdbmmodule.c -lgdbm + # and the subdirectory of PORT where you built it. + DBLIBVER=4.7 + DBINC=/usr/include/db4 +-DBLIB=/usr/lib ++DBLIB=/usr/lib64 + _bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER) + + # Historical Berkeley DB 1.85 +@@ -459,7 +459,7 @@ cPickle cPickle.c + # Andrew Kuchling's zlib module. + # This require zlib 1.1.3 (or later). + # See http://www.gzip.org/zlib/ +-zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz ++zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz + + # Interface to the Expat XML parser + # +diff -up Python-2.7rc1/setup.py.lib64 Python-2.7rc1/setup.py +--- Python-2.7rc1/setup.py.lib64 2010-06-04 05:49:20.000000000 -0400 ++++ Python-2.7rc1/setup.py 2010-06-06 05:00:36.653100371 -0400 +@@ -347,7 +347,7 @@ class PyBuildExt(build_ext): + + def detect_modules(self): + # Ensure that /usr/local is always used +- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') ++ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64') + add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') + + # Add paths specified in the environment variables LDFLAGS and +@@ -643,11 +643,11 @@ class PyBuildExt(build_ext): + elif curses_library: + readline_libs.append(curses_library) + elif self.compiler.find_library_file(lib_dirs + +- ['/usr/lib/termcap'], ++ ['/usr/lib64/termcap'], + 'termcap'): + readline_libs.append('termcap') + exts.append( Extension('readline', ['readline.c'], +- library_dirs=['/usr/lib/termcap'], ++ library_dirs=['/usr/lib64/termcap'], + extra_link_args=readline_extra_link_args, + libraries=readline_libs) ) + else: +@@ -681,8 +681,8 @@ class PyBuildExt(build_ext): + if krb5_h: + ssl_incs += krb5_h + ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs, +- ['/usr/local/ssl/lib', +- '/usr/contrib/ssl/lib/' ++ ['/usr/local/ssl/lib64', ++ '/usr/contrib/ssl/lib64/' + ] ) + + if (ssl_incs is not None and diff --git a/python-2.7rc1-no-static-lib.patch b/python-2.7rc1-no-static-lib.patch new file mode 100644 index 0000000..61375b3 --- /dev/null +++ b/python-2.7rc1-no-static-lib.patch @@ -0,0 +1,50 @@ +diff -up Python-2.7rc1/Makefile.pre.in.no-static-lib Python-2.7rc1/Makefile.pre.in +--- Python-2.7rc1/Makefile.pre.in.no-static-lib 2010-06-06 14:47:52.929975429 -0400 ++++ Python-2.7rc1/Makefile.pre.in 2010-06-06 14:48:34.163350302 -0400 +@@ -393,7 +393,7 @@ coverage: + + + # Build the interpreter +-$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) ++$(BUILDPYTHON): Modules/python.o $(LDLIBRARY) + $(LINKCC) $(CFLAGS) $(LDFLAGS) $(LINKFORSHARED) -o $@ \ + Modules/python.o \ + $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) +@@ -409,18 +409,6 @@ sharedmods: $(BUILDPYTHON) + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ + esac + +-# Build static library +-# avoid long command lines, same as LIBRARY_OBJS +-$(LIBRARY): $(LIBRARY_OBJS) +- -rm -f $@ +- $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o +- $(AR) $(ARFLAGS) $@ $(PARSER_OBJS) +- $(AR) $(ARFLAGS) $@ $(OBJECT_OBJS) +- $(AR) $(ARFLAGS) $@ $(PYTHON_OBJS) +- $(AR) $(ARFLAGS) $@ $(MODULE_OBJS) $(SIGNAL_OBJS) +- $(AR) $(ARFLAGS) $@ $(MODOBJS) +- $(RANLIB) $@ +- + libpython$(VERSION).so: $(LIBRARY_OBJS) + if test $(INSTSONAME) != $(LDLIBRARY); then \ + $(LDSHARED) $(LDFLAGS) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ +@@ -1002,18 +990,6 @@ libainstall: all python-config + else true; \ + fi; \ + done +- @if test -d $(LIBRARY); then :; else \ +- if test "$(PYTHONFRAMEWORKDIR)" = no-framework; then \ +- if test "$(SO)" = .dll; then \ +- $(INSTALL_DATA) $(LDLIBRARY) $(DESTDIR)$(LIBPL) ; \ +- else \ +- $(INSTALL_DATA) $(LIBRARY) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ +- $(RANLIB) $(DESTDIR)$(LIBPL)/$(LIBRARY) ; \ +- fi; \ +- else \ +- echo Skip install of $(LIBRARY) - use make frameworkinstall; \ +- fi; \ +- fi + $(INSTALL_DATA) Modules/config.c $(DESTDIR)$(LIBPL)/config.c + $(INSTALL_DATA) Modules/python.o $(DESTDIR)$(LIBPL)/python.o + $(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(DESTDIR)$(LIBPL)/config.c.in diff --git a/python-2.7rc1-socketmodule-constants.patch b/python-2.7rc1-socketmodule-constants.patch new file mode 100644 index 0000000..c32e103 --- /dev/null +++ b/python-2.7rc1-socketmodule-constants.patch @@ -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); diff --git a/python-2.7rc1-socketmodule-constants2.patch b/python-2.7rc1-socketmodule-constants2.patch new file mode 100644 index 0000000..896ac88 --- /dev/null +++ b/python-2.7rc1-socketmodule-constants2.patch @@ -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 */ diff --git a/python-2.7rc1-statvfs-f_flag-constants.patch b/python-2.7rc1-statvfs-f_flag-constants.patch new file mode 100644 index 0000000..83e7b59 --- /dev/null +++ b/python-2.7rc1-statvfs-f_flag-constants.patch @@ -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 diff --git a/python-2.7rc2-r79310.patch b/python-2.7rc2-r79310.patch new file mode 100644 index 0000000..ee92932 --- /dev/null +++ b/python-2.7rc2-r79310.patch @@ -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) + + diff --git a/python.spec b/python.spec index 1d6b674..9a442e3 100644 --- a/python.spec +++ b/python.spec @@ -1,5 +1,5 @@ %{!?__python_ver:%global __python_ver EMPTY} -#global __python_ver 26 +#global __python_ver 27 %global unicode ucs4 %global _default_patch_fuzz 2 @@ -14,7 +14,7 @@ %global tkinter tkinter %endif -%global pybasever 2.6 +%global pybasever 2.7 %global pylibdir %{_libdir}/python%{pybasever} %global tools_dir %{pylibdir}/Tools %global demo_dir %{pylibdir}/Demo @@ -59,11 +59,39 @@ # %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 Name: %{python} # Remember to also rebase python-docs when changing this: -Version: 2.6.5 -Release: 17%{?dist} +Version: 2.7 +Release: 3%{?dist} License: Python Group: Development/Languages Provides: python-abi = %{pybasever} @@ -71,23 +99,6 @@ Provides: python(abi) = %{pybasever} 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 # version of pythondeps.sh: Source2: pythondeps.sh @@ -173,7 +184,7 @@ Source5: pyfuntop.stp # - _codecs_jp cjkcodecs/_codecs_jp.c # - _codecs_kr cjkcodecs/_codecs_kr.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 # (dmalcolm 2010-01-29) that this was introduced in this change: @@ -183,10 +194,6 @@ Patch0: python-2.6.2-config.patch # Not upstream 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 # since some architectures (sparc64) need this (rhbz:199373). # 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 # requirements on the live CD: # (rhbz:307221) -Patch10: python-2.6.2-binutils-no-dep.patch +Patch10: python-2.7rc1-binutils-no-dep.patch # FIXME: appears to relate to: #* Tue Oct 30 2007 James Antill - 2.5.1-15 #- Do codec lowercase in C Locale. #- 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): # TODO: these patches were added in 2.5.1-22 and 2.5.1-24 but appear not to # have been sent upstream yet: -Patch13: python-2.5.1-socketmodule-constants.patch -Patch14: python-2.5.1-socketmodule-constants2.patch +Patch13: python-2.7rc1-socketmodule-constants.patch +Patch14: python-2.7rc1-socketmodule-constants2.patch # Remove an "-rpath $(LIBDIR)" argument from the linkage args in configure.in: # 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 Patch17: python-2.6.4-distutils-rpath.patch -# Fix distutils to follow the Fedora/RHEL/CentOS policies of having .pyo files -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: +# Patch setup.py so that it links against db-4.8: Patch54: python-2.6.4-setup-db48.patch # Systemtap support: add statically-defined probe points # 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 -# then rewritten by mjw (attachment 390110 of rhbz 545179) -Patch55: python-2.6.4-dtrace.patch +# then rewritten by mjw (attachment 390110 of rhbz 545179), then reformatted +# for 2.7rc1 by dmalcolm: +Patch55: python-2.7rc1-dtrace.patch # "lib64 patches" # 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 # /usr/lib/pythonMAJOR.MINOR/site-packages # 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 # 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 # memory-management hooks. # -# This appears to be the same as that patch, but without the rebasing of libffi -# (since we use the system copy of libffi): -Patch110: python-2.6-ctypes-noexecmem.patch +# This is the same as that patch, but without the rebasing of libffi +# (since we use the system copy of libffi), and rebased against 2.7 (which +# 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 # 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 # 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 # 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 @@ -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") # (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 # (rhbz:461419; patch sent upstream as http://bugs.python.org/issue7425 ) 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 # a segfault running test_pyexpat.py (rhbz:583931) # Sent upstream as http://bugs.python.org/issue9054 Patch119: python-2.6.5-fix-expat-issue9054.patch -# Stop python bailing out with an assertion failure when UnicodeDecodeErrors -# occur on very large buffers (rhbz:540518) -# Sent upstream as http://bugs.python.org/issue9058 -Patch120: python-2.6.5-remove-PyUnicodeDecodeError_Create-assertions-issue9058.patch +# Upstream r79310 removed the "Modules" directory from sys.path when Python is +# running from the build directory on POSIX to fix a unit test (issue #8205). +# This seems to have broken the compileall.py done in "make install": it cannot +# 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 +# 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 +# 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} Obsoletes: Distutils @@ -475,6 +479,7 @@ provides the libraries needed for this. Summary: The libraries and header files needed for Python development Group: Development/Libraries Requires: %{python}%{?_isa} = %{version}-%{release} +Requires: pkgconfig # Needed here because of the migration of Makefile from -devel to the main # package Conflicts: %{python} < %{version}-%{release} @@ -600,7 +605,6 @@ rm -r Modules/zlib || exit 1 # Apply patches: # %patch0 -p1 -b .rhconfig -%patch3 -p1 -b .expat %patch1 -p1 -b .no_gui %patch4 -p1 -b .cflags %patch6 -p1 -b .plural @@ -612,6 +616,7 @@ rm -r Modules/zlib || exit 1 %patch101 -p1 -b .lib64-regex %if "%{_lib}" == "lib64" %patch102 -p1 -b .lib64 +%patch103 -p1 -b .lib64-sysconfig %endif %patch10 -p1 -b .binutils-no-dep @@ -621,9 +626,6 @@ rm -r Modules/zlib || exit 1 %patch16 -p1 -b .rpath %patch17 -p1 -b .distutils-rpath -%patch51 -p1 -b .brprpm -%patch52 -p0 -b .valgrind -%patch53 -p0 -b .db48 %patch54 -p1 -b .setup-db48 %if 0%{?with_systemtap} %patch55 -p1 -b .systemtap @@ -641,15 +643,18 @@ rm -r Modules/zlib || exit 1 %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 -%patch120 -p0 -b .remove-unicode-decode-error-assertions-issue9058 +%patch121 -p0 -R # This shouldn't be necesarry, but is right now (2.2a3) 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 topdir=$(pwd) export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv" @@ -664,17 +669,30 @@ fi # Force CC export CC=gcc -# 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) -# Rerun autoconf: -autoconf +%if 0%{regenerate_autotooling_patch} +# If enabled, this code regenerates the patch to "configure", using a +# local copy of autoconf-2.65, then exits the build +# +# The following assumes that the copy is installed to ~/autoconf-2.65/bin +# as per these instructions: +# http://bugs.python.org/issue7997 + +for f in pyconfig.h.in configure ; do + cp $f $f.autotool-intermediates ; +done -# For patch 55 (systemtap), we need to get a new header for configure to use: +# Rerun the autotools: +PATH=~/autoconf-2.65/bin:$PATH autoconf 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 # configuration: BuildPython() { @@ -781,11 +799,18 @@ InstallPython() { make install DESTDIR=%{buildroot} -# Copy up the gdb hooks into place; the python file will be autoloaded by gdb -# when visiting libpython.so, provided that the python file is installed to the -# 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 +# 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 # (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: # /usr/lib/libpython2.6.so.1.0-gdb.py @@ -796,7 +821,7 @@ DirHoldingGdbPy=%{_prefix}/lib/debug/%{_libdir} PathOfGdbPy=$DirHoldingGdbPy/$PyInstSoName.debug-gdb.py 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 # 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} -#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 cat > ${RPM_BUILD_ROOT}%{_bindir}/pynche << EOF #!/bin/bash @@ -888,7 +904,6 @@ rm -f Tools/pynche/*.pyw cp -r Tools/pynche \ ${RPM_BUILD_ROOT}%{site_packages}/ -mv Tools/modulator/README Tools/modulator/README.modulator mv Tools/pynche/README Tools/pynche/README.pynche #gettext @@ -915,8 +930,6 @@ find %{buildroot}/ -name "*.bat"|xargs rm -f find . -name "*~"|xargs rm -f find . -name ".cvsignore"|xargs rm -f #zero length -rm -f %{buildroot}%{site_packages}/modulator/Templates/copyright - rm -f %{buildroot}%{pylibdir}/LICENSE.txt @@ -924,7 +937,6 @@ rm -f %{buildroot}%{pylibdir}/LICENSE.txt %if !%{main_python} pushd %{buildroot}%{_bindir} mv idle idle%{__python_ver} -mv modulator modulator%{__python_ver} mv pynche pynche%{__python_ver} mv pygettext.py pygettext%{__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}/_bisectmodule.so %{dynload_dir}/_bsddb.so -%{dynload_dir}/_bytesio.so %{dynload_dir}/_codecs_cn.so %{dynload_dir}/_codecs_hk.so %{dynload_dir}/_codecs_iso2022.so @@ -1063,11 +1074,11 @@ rm -fr %{buildroot} %{dynload_dir}/_curses.so %{dynload_dir}/_curses_panel.so %{dynload_dir}/_elementtree.so -%{dynload_dir}/_fileio.so %{dynload_dir}/_functoolsmodule.so %{dynload_dir}/_hashlib.so %{dynload_dir}/_heapq.so %{dynload_dir}/_hotshot.so +%{dynload_dir}/_io.so %{dynload_dir}/_json.so %{dynload_dir}/_localemodule.so %{dynload_dir}/_lsprof.so @@ -1101,7 +1112,7 @@ rm -fr %{buildroot} %{dynload_dir}/imageop.so %{dynload_dir}/itertoolsmodule.so %{dynload_dir}/linuxaudiodev.so -%{dynload_dir}/mathmodule.so +%{dynload_dir}/math.so %{dynload_dir}/mmapmodule.so %{dynload_dir}/nismodule.so %{dynload_dir}/operator.so @@ -1144,17 +1155,20 @@ rm -fr %{buildroot} %{pylibdir}/encodings %{pylibdir}/hotshot %{pylibdir}/idlelib +%{pylibdir}/importlib %dir %{pylibdir}/json %{pylibdir}/json/*.py* %{pylibdir}/lib2to3 %{pylibdir}/logging %{pylibdir}/multiprocessing %{pylibdir}/plat-linux2 +%{pylibdir}/pydoc_data %dir %{pylibdir}/sqlite3 %{pylibdir}/sqlite3/*.py* %dir %{pylibdir}/test %{pylibdir}/test/test_support.py* %{pylibdir}/test/__init__.py* +%{pylibdir}/unittest %{pylibdir}/wsgiref %{pylibdir}/xml %if "%{_lib}" == "lib64" @@ -1181,6 +1195,8 @@ rm -fr %{buildroot} %files devel %defattr(-,root,root,-) +%{_libdir}/pkgconfig/python-%{pybasever}.pc +%{_libdir}/pkgconfig/python.pc %{pylibdir}/config/* %exclude %{pylibdir}/config/Makefile %{pylibdir}/distutils/command/wininst-*.exe @@ -1195,14 +1211,11 @@ rm -fr %{buildroot} %files tools %defattr(-,root,root,755) -%doc Tools/modulator/README.modulator %doc Tools/pynche/README.pynche -%{site_packages}/modulator %{site_packages}/pynche %{_bindir}/smtpd*.py* %{_bindir}/2to3* %{_bindir}/idle* -%{_bindir}/modulator* %{_bindir}/pynche* %{_bindir}/pygettext*.py* %{_bindir}/msgfmt*.py* @@ -1251,7 +1264,6 @@ rm -fr %{buildroot} # ...with debug builds of the built-in "extension" modules: %{dynload_dir}/_bisectmodule_d.so %{dynload_dir}/_bsddb_d.so -%{dynload_dir}/_bytesio_d.so %{dynload_dir}/_codecs_cn_d.so %{dynload_dir}/_codecs_hk_d.so %{dynload_dir}/_codecs_iso2022_d.so @@ -1264,11 +1276,11 @@ rm -fr %{buildroot} %{dynload_dir}/_curses_d.so %{dynload_dir}/_curses_panel_d.so %{dynload_dir}/_elementtree_d.so -%{dynload_dir}/_fileio_d.so %{dynload_dir}/_functoolsmodule_d.so %{dynload_dir}/_hashlib_d.so %{dynload_dir}/_heapq_d.so %{dynload_dir}/_hotshot_d.so +%{dynload_dir}/_io_d.so %{dynload_dir}/_json_d.so %{dynload_dir}/_localemodule_d.so %{dynload_dir}/_lsprof_d.so @@ -1302,7 +1314,7 @@ rm -fr %{buildroot} %{dynload_dir}/imageop_d.so %{dynload_dir}/itertoolsmodule_d.so %{dynload_dir}/linuxaudiodev_d.so -%{dynload_dir}/mathmodule_d.so +%{dynload_dir}/math_d.so %{dynload_dir}/mmapmodule_d.so %{dynload_dir}/nismodule_d.so %{dynload_dir}/operator_d.so @@ -1370,6 +1382,43 @@ rm -fr %{buildroot} # payload file would be unpackaged) %changelog +* Thu Jul 8 2010 David Malcolm - 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 - 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 - 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 - 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 - 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 - 2.6.5-17 - Stop python bailing out with an assertion failure when UnicodeDecodeErrors occur on very large buffers (patch 120, upstream issue 9058) diff --git a/sources b/sources index 488aa1f..2c0d3aa 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -6bef0417e71a1a1737ccf5750420fdb3 Python-2.6.5.tar.bz2 +0e8c9ec32abf5b732bea7d91b38c3339 Python-2.7.tar.bz2