diff --git a/00055-systemtap.patch b/00055-systemtap.patch new file mode 100644 index 0000000..f87fc60 --- /dev/null +++ b/00055-systemtap.patch @@ -0,0 +1,214 @@ +diff -up Python-3.2b2/configure.in.systemtap Python-3.2b2/configure.in +--- Python-3.2b2/configure.in.systemtap 2010-12-13 02:59:39.000000000 -0500 ++++ Python-3.2b2/configure.in 2010-12-28 17:01:58.044059433 -0500 +@@ -2470,6 +2470,38 @@ if test "$with_valgrind" != no; then + OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT" + 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) ++ + # -I${DLINCLDIR} is added to the compile rule for importdl.o + AC_SUBST(DLINCLDIR) + DLINCLDIR=. +diff -up Python-3.2b2/Include/pydtrace.d.systemtap Python-3.2b2/Include/pydtrace.d +--- Python-3.2b2/Include/pydtrace.d.systemtap 2010-12-28 16:58:41.762936379 -0500 ++++ Python-3.2b2/Include/pydtrace.d 2010-12-28 16:58:41.762936379 -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-3.2b2/Makefile.pre.in.systemtap Python-3.2b2/Makefile.pre.in +--- Python-3.2b2/Makefile.pre.in.systemtap 2010-12-28 16:58:41.000000000 -0500 ++++ Python-3.2b2/Makefile.pre.in 2010-12-28 17:00:58.607310089 -0500 +@@ -328,6 +328,7 @@ PYTHON_OBJS= \ + Python/formatter_unicode.o \ + Python/fileutils.o \ + Python/$(DYNLOADFILE) \ ++ @DTRACEOBJS@ \ + $(LIBOBJS) \ + $(MACHDEP_OBJS) \ + $(THREADOBJ) +@@ -632,6 +633,18 @@ Objects/typeobject.o: $(srcdir)/Objects/ + $(srcdir)/Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py + $(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > $(srcdir)/Objects/typeslots.inc + ++# 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 + +@@ -1282,7 +1295,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-3.2b2/pyconfig.h.in.systemtap Python-3.2b2/pyconfig.h.in +--- Python-3.2b2/pyconfig.h.in.systemtap 2010-11-20 05:29:12.000000000 -0500 ++++ Python-3.2b2/pyconfig.h.in 2010-12-28 16:58:41.765937360 -0500 +@@ -1092,6 +1092,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-3.2b2/Python/ceval.c.systemtap Python-3.2b2/Python/ceval.c +--- Python-3.2b2/Python/ceval.c.systemtap 2010-12-03 15:14:31.000000000 -0500 ++++ Python-3.2b2/Python/ceval.c 2010-12-28 16:58:41.768935588 -0500 +@@ -18,6 +18,10 @@ + + #include + ++#ifdef WITH_DTRACE ++#include "pydtrace.h" ++#endif ++ + #ifndef WITH_TSC + + #define READ_TIMESTAMP(var) +@@ -766,6 +770,70 @@ PyEval_EvalCode(PyObject *co, PyObject * + } + + ++#ifdef WITH_DTRACE ++struct frame_marker_info ++{ ++ char *filename; ++ char *name; ++ int lineno; ++ ++ PyObject *utf8_filename; ++ PyObject *utf8_name; ++}; ++ ++static void ++get_frame_marker_info(PyFrameObject *f, struct frame_marker_info *fmi) ++{ ++ fmi->utf8_filename = PyUnicode_AsUTF8String(f->f_code->co_filename); ++ if (fmi->utf8_filename) { ++ fmi->filename = PyBytes_AsString(fmi->utf8_filename); ++ } else { ++ fmi->filename = NULL; ++ /* FIXME: clear the exception? */ ++ } ++ ++ fmi->utf8_name = PyUnicode_AsUTF8String(f->f_code->co_name); ++ if (fmi->utf8_name) { ++ fmi->name = PyBytes_AsString(fmi->utf8_name); ++ } else { ++ fmi->name = NULL; ++ /* FIXME: clear the exception? */ ++ } ++ ++ fmi->lineno = PyCode_Addr2Line(f->f_code, f->f_lasti); ++} ++ ++static void ++release_frame_marker_info(struct frame_marker_info *fmi) ++{ ++ Py_XDECREF(fmi->utf8_filename); ++ Py_XDECREF(fmi->utf8_name); ++} ++ ++static void ++dtrace_entry(PyFrameObject *f) ++{ ++ struct frame_marker_info fmi; ++ get_frame_marker_info(f, &fmi); ++ PYTHON_FUNCTION_ENTRY(fmi.filename, fmi.name, fmi.lineno); ++ release_frame_marker_info(&fmi); ++} ++ ++static void ++dtrace_return(PyFrameObject *f) ++{ ++ struct frame_marker_info fmi; ++ get_frame_marker_info(f, &fmi); ++ PYTHON_FUNCTION_RETURN(fmi.filename, fmi.name, fmi.lineno); ++ release_frame_marker_info(&fmi); ++} ++#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 */ + + PyObject * +@@ -1183,6 +1251,10 @@ 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; +@@ -3048,6 +3120,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/00104-lib64-fix-for-test_install.patch b/00104-lib64-fix-for-test_install.patch new file mode 100644 index 0000000..7852bf6 --- /dev/null +++ b/00104-lib64-fix-for-test_install.patch @@ -0,0 +1,13 @@ +--- Python-2.7.2/Lib/distutils/tests/test_install.py.lib64 2011-09-08 17:51:57.851405376 -0400 ++++ Python-2.7.2/Lib/distutils/tests/test_install.py 2011-09-08 18:40:46.754205096 -0400 +@@ -41,8 +41,9 @@ class InstallTestCase(support.TempdirMan + self.assertEqual(got, expected) + + libdir = os.path.join(destination, "lib", "python") ++ platlibdir = os.path.join(destination, "lib64", "python") + check_path(cmd.install_lib, libdir) +- check_path(cmd.install_platlib, libdir) ++ check_path(cmd.install_platlib, platlibdir) + check_path(cmd.install_purelib, libdir) + check_path(cmd.install_headers, + os.path.join(destination, "include", "python", "foopkg")) diff --git a/00106-lib64-fix-for-test_install.patch b/00106-lib64-fix-for-test_install.patch deleted file mode 100644 index 7852bf6..0000000 --- a/00106-lib64-fix-for-test_install.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- Python-2.7.2/Lib/distutils/tests/test_install.py.lib64 2011-09-08 17:51:57.851405376 -0400 -+++ Python-2.7.2/Lib/distutils/tests/test_install.py 2011-09-08 18:40:46.754205096 -0400 -@@ -41,8 +41,9 @@ class InstallTestCase(support.TempdirMan - self.assertEqual(got, expected) - - libdir = os.path.join(destination, "lib", "python") -+ platlibdir = os.path.join(destination, "lib64", "python") - check_path(cmd.install_lib, libdir) -- check_path(cmd.install_platlib, libdir) -+ check_path(cmd.install_platlib, platlibdir) - check_path(cmd.install_purelib, libdir) - check_path(cmd.install_headers, - os.path.join(destination, "include", "python", "foopkg")) diff --git a/00111-no-static-lib.patch b/00111-no-static-lib.patch new file mode 100644 index 0000000..3a6ac8a --- /dev/null +++ b/00111-no-static-lib.patch @@ -0,0 +1,59 @@ +diff -up Python-3.2.1/Makefile.pre.in.no-static-lib Python-3.2.1/Makefile.pre.in +--- Python-3.2.1/Makefile.pre.in.no-static-lib 2011-07-09 02:58:52.000000000 -0400 ++++ Python-3.2.1/Makefile.pre.in 2011-07-11 11:46:27.381425999 -0400 +@@ -425,7 +425,7 @@ coverage: + + + # Build the interpreter +-$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) ++$(BUILDPYTHON): Modules/python.o $(LDLIBRARY) $(PY3LIBRARY) + $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) + + platform: $(BUILDPYTHON) +@@ -439,18 +439,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) $(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$(LDVERSION).so: $(LIBRARY_OBJS) + if test $(INSTSONAME) != $(LDLIBRARY); then \ + $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ +@@ -540,7 +528,7 @@ Modules/Setup: $(srcdir)/Modules/Setup.d + echo "-----------------------------------------------"; \ + fi + +-Modules/_testembed: Modules/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) ++Modules/_testembed: Modules/_testembed.o $(LDLIBRARY) $(PY3LIBRARY) + $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) + + ############################################################################ +@@ -1058,18 +1046,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/00113-more-configuration-flags.patch b/00113-more-configuration-flags.patch new file mode 100644 index 0000000..24df543 --- /dev/null +++ b/00113-more-configuration-flags.patch @@ -0,0 +1,50 @@ +diff -up Python-3.1.2/configure.in.more-configuration-flags Python-3.1.2/configure.in +--- Python-3.1.2/configure.in.more-configuration-flags 2010-05-25 12:16:48.602875960 -0400 ++++ Python-3.1.2/configure.in 2010-05-25 12:16:48.609879553 -0400 +@@ -2443,6 +2443,30 @@ else AC_MSG_RESULT(no) + fi], + [AC_MSG_RESULT(no)]) + ++AC_MSG_CHECKING(for --with-count-allocs) ++AC_ARG_WITH(count-allocs, ++[ --with(out)count-allocs enable/disable per-type instance accounting], [ ++if test "$withval" != no ++then ++ AC_DEFINE(COUNT_ALLOCS, 1, ++ [Define to keep records of the number of instances of each type]) ++ AC_MSG_RESULT(yes) ++else AC_MSG_RESULT(no) ++fi], ++[AC_MSG_RESULT(no)]) ++ ++AC_MSG_CHECKING(for --with-call-profile) ++AC_ARG_WITH(call-profile, ++[ --with(out)-call-profile enable/disable statistics on function call invocation], [ ++if test "$withval" != no ++then ++ AC_DEFINE(CALL_PROFILE, 1, ++ [Define to keep records on function call invocation]) ++ AC_MSG_RESULT(yes) ++else AC_MSG_RESULT(no) ++fi], ++[AC_MSG_RESULT(no)]) ++ + # Check for Python-specific malloc support + AC_MSG_CHECKING(for --with-pymalloc) + AC_ARG_WITH(pymalloc, +diff -up Python-3.1.2/pyconfig.h.in.more-configuration-flags Python-3.1.2/pyconfig.h.in +--- Python-3.1.2/pyconfig.h.in.more-configuration-flags 2010-05-25 12:16:48.000000000 -0400 ++++ Python-3.1.2/pyconfig.h.in 2010-05-25 12:17:54.428126399 -0400 +@@ -18,6 +18,12 @@ + /* Define if you have the Mach cthreads package */ + #undef C_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 C doubles are 64-bit IEEE 754 binary format, stored in ARM + mixed-endian order (byte order 45670123) */ + #undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 diff --git a/00114-statvfs-f_flag-constants.patch b/00114-statvfs-f_flag-constants.patch new file mode 100644 index 0000000..b666c1b --- /dev/null +++ b/00114-statvfs-f_flag-constants.patch @@ -0,0 +1,47 @@ +diff -up Python-3.2a1/Modules/posixmodule.c.statvfs-f-flag-constants Python-3.2a1/Modules/posixmodule.c +--- Python-3.2a1/Modules/posixmodule.c.statvfs-f-flag-constants 2010-07-23 09:53:51.000000000 -0400 ++++ Python-3.2a1/Modules/posixmodule.c 2010-08-02 16:39:38.756000423 -0400 +@@ -8173,6 +8173,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/00125-less-verbose-COUNT_ALLOCS.patch b/00125-less-verbose-COUNT_ALLOCS.patch new file mode 100644 index 0000000..8cef015 --- /dev/null +++ b/00125-less-verbose-COUNT_ALLOCS.patch @@ -0,0 +1,20 @@ +diff -up Python-2.7/Python/pythonrun.c.less-verbose-COUNT_ALLOCS Python-2.7/Python/pythonrun.c +--- Python-2.7/Python/pythonrun.c.less-verbose-COUNT_ALLOCS 2010-08-17 14:49:33.321913909 -0400 ++++ Python-2.7/Python/pythonrun.c 2010-08-17 14:54:48.750910403 -0400 +@@ -470,7 +470,15 @@ Py_Finalize(void) + + /* Debugging stuff */ + #ifdef COUNT_ALLOCS +- dump_counts(stdout); ++ /* This is a downstream Fedora modification. ++ The upstream default with COUNT_ALLOCS is to always dump the counts to ++ stdout on exit. For our debug builds its useful to have the info from ++ COUNT_ALLOCS available, but the stdout info here gets in the way, so ++ we make it optional, wrapping it in an environment variable (modelled ++ on the other PYTHONDUMP* env variables): ++ */ ++ if (Py_GETENV("PYTHONDUMPCOUNTS")) ++ dump_counts(stdout); + #endif + + PRINT_TOTAL_REFS(); diff --git a/00131-disable-tests-in-test_io.patch b/00131-disable-tests-in-test_io.patch new file mode 100644 index 0000000..d81a2d0 --- /dev/null +++ b/00131-disable-tests-in-test_io.patch @@ -0,0 +1,11 @@ +diff -up Python-2.7.2/Lib/test/test_io.py.disable-tests-in-test_io Python-2.7.2/Lib/test/test_io.py +--- Python-2.7.2/Lib/test/test_io.py.disable-tests-in-test_io 2011-09-01 14:18:45.963304089 -0400 ++++ Python-2.7.2/Lib/test/test_io.py 2011-09-01 15:08:53.796098413 -0400 +@@ -2669,6 +2669,7 @@ class SignalsTest(unittest.TestCase): + self.check_interrupted_read_retry(lambda x: x, + mode="r") + ++ @unittest.skip('rhbz#732998') + @unittest.skipUnless(threading, 'Threading required for this test.') + def check_interrupted_write_retry(self, item, **fdopen_kwargs): + """Check that a buffered write, when it gets interrupted (either diff --git a/00143-tsc-on-ppc.patch b/00143-tsc-on-ppc.patch new file mode 100644 index 0000000..447c6e3 --- /dev/null +++ b/00143-tsc-on-ppc.patch @@ -0,0 +1,58 @@ +diff -up Python-2.7.2/Python/ceval.c.tsc-on-ppc Python-2.7.2/Python/ceval.c +--- Python-2.7.2/Python/ceval.c.tsc-on-ppc 2011-08-23 14:59:48.051300849 -0400 ++++ Python-2.7.2/Python/ceval.c 2011-08-23 15:33:25.412162902 -0400 +@@ -37,24 +37,42 @@ typedef unsigned long long uint64; + */ + #if defined(__ppc__) || defined (__powerpc__) + +-#define READ_TIMESTAMP(var) ppc_getcounter(&var) ++#if defined( __powerpc64__) || defined(__LP64__) ++/* 64-bit PowerPC */ ++#define READ_TIMESTAMP(var) ppc64_getcounter(&var) ++static void ++ppc64_getcounter(uint64 *v) ++{ ++ /* On 64-bit PowerPC we can read the 64-bit timebase directly into a ++ 64-bit register */ ++ uint64 timebase; ++#ifdef _ARCH_PWR4 ++ asm volatile ("mfspr %0,268" : "=r" (timebase)); ++#else ++ asm volatile ("mftb %0" : "=r" (timebase)); ++#endif ++ *v = timebase; ++} ++ ++#else ++/* 32-bit PowerPC */ ++#define READ_TIMESTAMP(var) ppc32_getcounter(&var) + + static void +-ppc_getcounter(uint64 *v) ++ppc32_getcounter(uint64 *v) + { +- register unsigned long tbu, tb, tbu2; ++ union { long long ll; long ii[2]; } u; ++ long tmp; + + loop: +- asm volatile ("mftbu %0" : "=r" (tbu) ); +- asm volatile ("mftb %0" : "=r" (tb) ); +- asm volatile ("mftbu %0" : "=r" (tbu2)); +- if (__builtin_expect(tbu != tbu2, 0)) goto loop; +- +- /* The slightly peculiar way of writing the next lines is +- compiled better by GCC than any other way I tried. */ +- ((long*)(v))[0] = tbu; +- ((long*)(v))[1] = tb; ++ asm volatile ("mftbu %0" : "=r" (u.ii[0]) ); ++ asm volatile ("mftb %0" : "=r" (u.ii[1]) ); ++ asm volatile ("mftbu %0" : "=r" (tmp)); ++ if (__builtin_expect(u.ii[0] != tmp, 0)) goto loop; ++ ++ *v = u.ll; + } ++#endif /* powerpc 32/64 bit */ + + #elif defined(__i386__) + diff --git a/less-verbose-COUNT_ALLOCS.patch b/less-verbose-COUNT_ALLOCS.patch deleted file mode 100644 index 8cef015..0000000 --- a/less-verbose-COUNT_ALLOCS.patch +++ /dev/null @@ -1,20 +0,0 @@ -diff -up Python-2.7/Python/pythonrun.c.less-verbose-COUNT_ALLOCS Python-2.7/Python/pythonrun.c ---- Python-2.7/Python/pythonrun.c.less-verbose-COUNT_ALLOCS 2010-08-17 14:49:33.321913909 -0400 -+++ Python-2.7/Python/pythonrun.c 2010-08-17 14:54:48.750910403 -0400 -@@ -470,7 +470,15 @@ Py_Finalize(void) - - /* Debugging stuff */ - #ifdef COUNT_ALLOCS -- dump_counts(stdout); -+ /* This is a downstream Fedora modification. -+ The upstream default with COUNT_ALLOCS is to always dump the counts to -+ stdout on exit. For our debug builds its useful to have the info from -+ COUNT_ALLOCS available, but the stdout info here gets in the way, so -+ we make it optional, wrapping it in an environment variable (modelled -+ on the other PYTHONDUMP* env variables): -+ */ -+ if (Py_GETENV("PYTHONDUMPCOUNTS")) -+ dump_counts(stdout); - #endif - - PRINT_TOTAL_REFS(); diff --git a/python-2.7.2-disable-tests-in-test_io.patch b/python-2.7.2-disable-tests-in-test_io.patch deleted file mode 100644 index d81a2d0..0000000 --- a/python-2.7.2-disable-tests-in-test_io.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up Python-2.7.2/Lib/test/test_io.py.disable-tests-in-test_io Python-2.7.2/Lib/test/test_io.py ---- Python-2.7.2/Lib/test/test_io.py.disable-tests-in-test_io 2011-09-01 14:18:45.963304089 -0400 -+++ Python-2.7.2/Lib/test/test_io.py 2011-09-01 15:08:53.796098413 -0400 -@@ -2669,6 +2669,7 @@ class SignalsTest(unittest.TestCase): - self.check_interrupted_read_retry(lambda x: x, - mode="r") - -+ @unittest.skip('rhbz#732998') - @unittest.skipUnless(threading, 'Threading required for this test.') - def check_interrupted_write_retry(self, item, **fdopen_kwargs): - """Check that a buffered write, when it gets interrupted (either diff --git a/python-2.7.2-tsc-on-ppc.patch b/python-2.7.2-tsc-on-ppc.patch deleted file mode 100644 index 447c6e3..0000000 --- a/python-2.7.2-tsc-on-ppc.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff -up Python-2.7.2/Python/ceval.c.tsc-on-ppc Python-2.7.2/Python/ceval.c ---- Python-2.7.2/Python/ceval.c.tsc-on-ppc 2011-08-23 14:59:48.051300849 -0400 -+++ Python-2.7.2/Python/ceval.c 2011-08-23 15:33:25.412162902 -0400 -@@ -37,24 +37,42 @@ typedef unsigned long long uint64; - */ - #if defined(__ppc__) || defined (__powerpc__) - --#define READ_TIMESTAMP(var) ppc_getcounter(&var) -+#if defined( __powerpc64__) || defined(__LP64__) -+/* 64-bit PowerPC */ -+#define READ_TIMESTAMP(var) ppc64_getcounter(&var) -+static void -+ppc64_getcounter(uint64 *v) -+{ -+ /* On 64-bit PowerPC we can read the 64-bit timebase directly into a -+ 64-bit register */ -+ uint64 timebase; -+#ifdef _ARCH_PWR4 -+ asm volatile ("mfspr %0,268" : "=r" (timebase)); -+#else -+ asm volatile ("mftb %0" : "=r" (timebase)); -+#endif -+ *v = timebase; -+} -+ -+#else -+/* 32-bit PowerPC */ -+#define READ_TIMESTAMP(var) ppc32_getcounter(&var) - - static void --ppc_getcounter(uint64 *v) -+ppc32_getcounter(uint64 *v) - { -- register unsigned long tbu, tb, tbu2; -+ union { long long ll; long ii[2]; } u; -+ long tmp; - - loop: -- asm volatile ("mftbu %0" : "=r" (tbu) ); -- asm volatile ("mftb %0" : "=r" (tb) ); -- asm volatile ("mftbu %0" : "=r" (tbu2)); -- if (__builtin_expect(tbu != tbu2, 0)) goto loop; -- -- /* The slightly peculiar way of writing the next lines is -- compiled better by GCC than any other way I tried. */ -- ((long*)(v))[0] = tbu; -- ((long*)(v))[1] = tb; -+ asm volatile ("mftbu %0" : "=r" (u.ii[0]) ); -+ asm volatile ("mftb %0" : "=r" (u.ii[1]) ); -+ asm volatile ("mftbu %0" : "=r" (tmp)); -+ if (__builtin_expect(u.ii[0] != tmp, 0)) goto loop; -+ -+ *v = u.ll; - } -+#endif /* powerpc 32/64 bit */ - - #elif defined(__i386__) - diff --git a/python-3.1.2-more-configuration-flags.patch b/python-3.1.2-more-configuration-flags.patch deleted file mode 100644 index 24df543..0000000 --- a/python-3.1.2-more-configuration-flags.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -up Python-3.1.2/configure.in.more-configuration-flags Python-3.1.2/configure.in ---- Python-3.1.2/configure.in.more-configuration-flags 2010-05-25 12:16:48.602875960 -0400 -+++ Python-3.1.2/configure.in 2010-05-25 12:16:48.609879553 -0400 -@@ -2443,6 +2443,30 @@ else AC_MSG_RESULT(no) - fi], - [AC_MSG_RESULT(no)]) - -+AC_MSG_CHECKING(for --with-count-allocs) -+AC_ARG_WITH(count-allocs, -+[ --with(out)count-allocs enable/disable per-type instance accounting], [ -+if test "$withval" != no -+then -+ AC_DEFINE(COUNT_ALLOCS, 1, -+ [Define to keep records of the number of instances of each type]) -+ AC_MSG_RESULT(yes) -+else AC_MSG_RESULT(no) -+fi], -+[AC_MSG_RESULT(no)]) -+ -+AC_MSG_CHECKING(for --with-call-profile) -+AC_ARG_WITH(call-profile, -+[ --with(out)-call-profile enable/disable statistics on function call invocation], [ -+if test "$withval" != no -+then -+ AC_DEFINE(CALL_PROFILE, 1, -+ [Define to keep records on function call invocation]) -+ AC_MSG_RESULT(yes) -+else AC_MSG_RESULT(no) -+fi], -+[AC_MSG_RESULT(no)]) -+ - # Check for Python-specific malloc support - AC_MSG_CHECKING(for --with-pymalloc) - AC_ARG_WITH(pymalloc, -diff -up Python-3.1.2/pyconfig.h.in.more-configuration-flags Python-3.1.2/pyconfig.h.in ---- Python-3.1.2/pyconfig.h.in.more-configuration-flags 2010-05-25 12:16:48.000000000 -0400 -+++ Python-3.1.2/pyconfig.h.in 2010-05-25 12:17:54.428126399 -0400 -@@ -18,6 +18,12 @@ - /* Define if you have the Mach cthreads package */ - #undef C_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 C doubles are 64-bit IEEE 754 binary format, stored in ARM - mixed-endian order (byte order 45670123) */ - #undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 diff --git a/python-3.2.1-no-static-lib.patch b/python-3.2.1-no-static-lib.patch deleted file mode 100644 index 3a6ac8a..0000000 --- a/python-3.2.1-no-static-lib.patch +++ /dev/null @@ -1,59 +0,0 @@ -diff -up Python-3.2.1/Makefile.pre.in.no-static-lib Python-3.2.1/Makefile.pre.in ---- Python-3.2.1/Makefile.pre.in.no-static-lib 2011-07-09 02:58:52.000000000 -0400 -+++ Python-3.2.1/Makefile.pre.in 2011-07-11 11:46:27.381425999 -0400 -@@ -425,7 +425,7 @@ coverage: - - - # Build the interpreter --$(BUILDPYTHON): Modules/python.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) -+$(BUILDPYTHON): Modules/python.o $(LDLIBRARY) $(PY3LIBRARY) - $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/python.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) - - platform: $(BUILDPYTHON) -@@ -439,18 +439,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) $(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$(LDVERSION).so: $(LIBRARY_OBJS) - if test $(INSTSONAME) != $(LDLIBRARY); then \ - $(BLDSHARED) -Wl,-h$(INSTSONAME) -o $(INSTSONAME) $(LIBRARY_OBJS) $(MODLIBS) $(SHLIBS) $(LIBC) $(LIBM) $(LDLAST); \ -@@ -540,7 +528,7 @@ Modules/Setup: $(srcdir)/Modules/Setup.d - echo "-----------------------------------------------"; \ - fi - --Modules/_testembed: Modules/_testembed.o $(LIBRARY) $(LDLIBRARY) $(PY3LIBRARY) -+Modules/_testembed: Modules/_testembed.o $(LDLIBRARY) $(PY3LIBRARY) - $(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) -o $@ Modules/_testembed.o $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) - - ############################################################################ -@@ -1058,18 +1046,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-3.2a1-statvfs-f_flag-constants.patch b/python-3.2a1-statvfs-f_flag-constants.patch deleted file mode 100644 index b666c1b..0000000 --- a/python-3.2a1-statvfs-f_flag-constants.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff -up Python-3.2a1/Modules/posixmodule.c.statvfs-f-flag-constants Python-3.2a1/Modules/posixmodule.c ---- Python-3.2a1/Modules/posixmodule.c.statvfs-f-flag-constants 2010-07-23 09:53:51.000000000 -0400 -+++ Python-3.2a1/Modules/posixmodule.c 2010-08-02 16:39:38.756000423 -0400 -@@ -8173,6 +8173,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-3.2b2-systemtap.patch b/python-3.2b2-systemtap.patch deleted file mode 100644 index f87fc60..0000000 --- a/python-3.2b2-systemtap.patch +++ /dev/null @@ -1,214 +0,0 @@ -diff -up Python-3.2b2/configure.in.systemtap Python-3.2b2/configure.in ---- Python-3.2b2/configure.in.systemtap 2010-12-13 02:59:39.000000000 -0500 -+++ Python-3.2b2/configure.in 2010-12-28 17:01:58.044059433 -0500 -@@ -2470,6 +2470,38 @@ if test "$with_valgrind" != no; then - OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT" - 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) -+ - # -I${DLINCLDIR} is added to the compile rule for importdl.o - AC_SUBST(DLINCLDIR) - DLINCLDIR=. -diff -up Python-3.2b2/Include/pydtrace.d.systemtap Python-3.2b2/Include/pydtrace.d ---- Python-3.2b2/Include/pydtrace.d.systemtap 2010-12-28 16:58:41.762936379 -0500 -+++ Python-3.2b2/Include/pydtrace.d 2010-12-28 16:58:41.762936379 -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-3.2b2/Makefile.pre.in.systemtap Python-3.2b2/Makefile.pre.in ---- Python-3.2b2/Makefile.pre.in.systemtap 2010-12-28 16:58:41.000000000 -0500 -+++ Python-3.2b2/Makefile.pre.in 2010-12-28 17:00:58.607310089 -0500 -@@ -328,6 +328,7 @@ PYTHON_OBJS= \ - Python/formatter_unicode.o \ - Python/fileutils.o \ - Python/$(DYNLOADFILE) \ -+ @DTRACEOBJS@ \ - $(LIBOBJS) \ - $(MACHDEP_OBJS) \ - $(THREADOBJ) -@@ -632,6 +633,18 @@ Objects/typeobject.o: $(srcdir)/Objects/ - $(srcdir)/Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py - $(PYTHON) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h > $(srcdir)/Objects/typeslots.inc - -+# 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 - -@@ -1282,7 +1295,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-3.2b2/pyconfig.h.in.systemtap Python-3.2b2/pyconfig.h.in ---- Python-3.2b2/pyconfig.h.in.systemtap 2010-11-20 05:29:12.000000000 -0500 -+++ Python-3.2b2/pyconfig.h.in 2010-12-28 16:58:41.765937360 -0500 -@@ -1092,6 +1092,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-3.2b2/Python/ceval.c.systemtap Python-3.2b2/Python/ceval.c ---- Python-3.2b2/Python/ceval.c.systemtap 2010-12-03 15:14:31.000000000 -0500 -+++ Python-3.2b2/Python/ceval.c 2010-12-28 16:58:41.768935588 -0500 -@@ -18,6 +18,10 @@ - - #include - -+#ifdef WITH_DTRACE -+#include "pydtrace.h" -+#endif -+ - #ifndef WITH_TSC - - #define READ_TIMESTAMP(var) -@@ -766,6 +770,70 @@ PyEval_EvalCode(PyObject *co, PyObject * - } - - -+#ifdef WITH_DTRACE -+struct frame_marker_info -+{ -+ char *filename; -+ char *name; -+ int lineno; -+ -+ PyObject *utf8_filename; -+ PyObject *utf8_name; -+}; -+ -+static void -+get_frame_marker_info(PyFrameObject *f, struct frame_marker_info *fmi) -+{ -+ fmi->utf8_filename = PyUnicode_AsUTF8String(f->f_code->co_filename); -+ if (fmi->utf8_filename) { -+ fmi->filename = PyBytes_AsString(fmi->utf8_filename); -+ } else { -+ fmi->filename = NULL; -+ /* FIXME: clear the exception? */ -+ } -+ -+ fmi->utf8_name = PyUnicode_AsUTF8String(f->f_code->co_name); -+ if (fmi->utf8_name) { -+ fmi->name = PyBytes_AsString(fmi->utf8_name); -+ } else { -+ fmi->name = NULL; -+ /* FIXME: clear the exception? */ -+ } -+ -+ fmi->lineno = PyCode_Addr2Line(f->f_code, f->f_lasti); -+} -+ -+static void -+release_frame_marker_info(struct frame_marker_info *fmi) -+{ -+ Py_XDECREF(fmi->utf8_filename); -+ Py_XDECREF(fmi->utf8_name); -+} -+ -+static void -+dtrace_entry(PyFrameObject *f) -+{ -+ struct frame_marker_info fmi; -+ get_frame_marker_info(f, &fmi); -+ PYTHON_FUNCTION_ENTRY(fmi.filename, fmi.name, fmi.lineno); -+ release_frame_marker_info(&fmi); -+} -+ -+static void -+dtrace_return(PyFrameObject *f) -+{ -+ struct frame_marker_info fmi; -+ get_frame_marker_info(f, &fmi); -+ PYTHON_FUNCTION_RETURN(fmi.filename, fmi.name, fmi.lineno); -+ release_frame_marker_info(&fmi); -+} -+#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 */ - - PyObject * -@@ -1183,6 +1251,10 @@ 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; -@@ -3048,6 +3120,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/python3.spec b/python3.spec index 5550990..c7a839d 100644 --- a/python3.spec +++ b/python3.spec @@ -86,8 +86,7 @@ # We need to get a newer configure generated out of configure.in for the following # patches: # patch 55 (systemtap) -# patch 103 (debug build) -# patch 104 (more config flags) +# patch 113 (more config flags) # # For patch 55 (systemtap), we need to get a new header for configure to use # @@ -118,7 +117,7 @@ Summary: Version 3 of the Python programming language aka Python 3000 Name: python3 Version: %{pybasever}.2 -Release: 2%{?dist} +Release: 3%{?dist} License: Python Group: Development/Languages @@ -211,39 +210,42 @@ Patch1: Python-3.1.1-rpath.patch # It's simplest to remove them: Patch3: python-3.2b2-remove-mimeaudio-tests.patch -# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build -# a libpythonMAJOR.MINOR.a (bug 550692): -Patch6: python-3.2.1-no-static-lib.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); ported to 3.1.1 by # dmalcolm -Patch8: python-3.2b2-systemtap.patch +Patch55: 00055-systemtap.patch Patch102: python-3.2.1-lib64.patch +# Only used when "%{_lib}" == "lib64" +# Another lib64 fix, for distutils/tests/test_install.py; not upstream: +Patch104: 00104-lib64-fix-for-test_install.patch + +# Patch the Makefile.pre.in so that the generated Makefile doesn't try to build +# a libpythonMAJOR.MINOR.a (bug 550692): +Patch111: 00111-no-static-lib.patch + +# Patch112: python-2.7rc1-debug-build.patch: this is not relevant to Python 3, +# for 3.2 onwards + # Add configure-time support for the COUNT_ALLOCS and CALL_PROFILE options # described at http://svn.python.org/projects/python/trunk/Misc/SpecialBuilds.txt # so that if they are enabled, they will be in that build's pyconfig.h, so that # extension modules will reliably use them -Patch104: python-3.1.2-more-configuration-flags.patch +Patch113: 00113-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 -Patch105: python-3.2a1-statvfs-f_flag-constants.patch - -# Only used when "%{_lib}" == "lib64" -# Another lib64 fix, for distutils/tests/test_install.py; not upstream: -Patch106: 00106-lib64-fix-for-test_install.patch +Patch114: 00114-statvfs-f_flag-constants.patch # COUNT_ALLOCS is useful for debugging, but the upstream behaviour of always # emitting debug info to stdout on exit is too verbose and makes it harder to # use the debug build. Add a "PYTHONDUMPCOUNTS" environment variable which # must be set to enable the output on exit # Not yet sent upstream: -Patch125: less-verbose-COUNT_ALLOCS.patch +Patch125: 00125-less-verbose-COUNT_ALLOCS.patch # In my koji builds, /root/bin is in the PATH for some reason # This leads to test_subprocess.py failing, due to "test_leaking_fds_on_error" @@ -256,16 +258,15 @@ Patch125: less-verbose-COUNT_ALLOCS.patch # Not yet sent upstream Patch129: python-3.2.1-fix-test-subprocess-with-nonreadable-path-dir.patch -# Fix the --with-tsc option on ppc64, and rework it on 32-bit ppc to avoid -# aliasing violations (rhbz#698726) -# Sent upstream as http://bugs.python.org/issue12872 -Patch130: python-2.7.2-tsc-on-ppc.patch +# Python 2's: +# Patch130: python-2.7.2-add-extension-suffix-to-python-config.patch +# is not relevant to Python 3 (for 3.2 onwards) # The four tests in test_io built on top of check_interrupted_write_retry # fail when built in Koji, for ppc and ppc64; for some reason, the SIGALRM # handlers are never called, and the call to write runs to completion # (rhbz#732998) -Patch131: python-2.7.2-disable-tests-in-test_io.patch +Patch131: 00131-disable-tests-in-test_io.patch # Add non-standard hooks to unittest for use in the "check" phase below, when # running selftests within the build: @@ -315,6 +316,11 @@ Patch141: 00141-fix-test_gc_with_COUNT_ALLOCS.patch # Some pty tests fail when run in mock (rhbz#714627): Patch142: 00142-skip-failing-pty-tests-in-rpmbuild.patch +# Fix the --with-tsc option on ppc64, and rework it on 32-bit ppc to avoid +# aliasing violations (rhbz#698726) +# Sent upstream as http://bugs.python.org/issue12872 +Patch143: 00143-tsc-on-ppc.patch + # (New patches go here ^^^) # # When adding new patches to "python" and "python3" in Fedora 17 onwards, @@ -474,25 +480,25 @@ rm -r Modules/zlib || exit 1 # %patch1 -p1 %patch3 -p1 -b .remove-mimeaudio-tests -%patch6 -p1 -b .no-static-lib %if 0%{?with_systemtap} -%patch8 -p1 -b .systemtap +%patch55 -p1 -b .systemtap %endif %if "%{_lib}" == "lib64" %patch102 -p1 -%patch106 -p1 +%patch104 -p1 %endif -%patch104 -p1 -b .more-configuration-flags -%patch105 -p1 -b .statvfs-f-flag-constants +%patch111 -p1 +# 112: not for python3 +%patch113 -p1 +%patch114 -p1 %patch125 -p1 -b .less-verbose-COUNT_ALLOCS %patch129 -p1 -%patch130 -p1 -b .tsc-on-ppc %ifarch ppc ppc64 %patch131 -p1 @@ -511,6 +517,7 @@ rm -r Modules/zlib || exit 1 # 00140: not for python3 %patch141 -p1 %patch142 -p1 +%patch143 -p1 -b .tsc-on-ppc # Currently (2010-01-15), http://docs.python.org/library is for 2.6, and there # are many differences between 2.6 and the Python 3 library. @@ -1316,6 +1323,10 @@ rm -fr %{buildroot} # ====================================================== %changelog +* Mon Sep 12 2011 David Malcolm - 3.2.2-3 +- renumber and rename patches for consistency with python.spec (8 to 55, 106 +to 104, 6 to 111, 104 to 113, 105 to 114, 125, 131, 130 to 143) + * Sat Sep 10 2011 David Malcolm - 3.2.2-2 - rewrite of "check", introducing downstream-only hooks for skipping specific cases in an rpmbuild (patch 132), and fixing/skipping failing tests in a more