From bbbca2ccff122d4e4920f2db11c91f80dcb38063 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Sep 10 2011 12:24:34 +0000 Subject: minor fixes to reduce python/python3 delta Rename patch 300 to the name used in python3.spec --- diff --git a/autotool-intermediates.patch b/autotool-intermediates.patch new file mode 100644 index 0000000..68eefe9 --- /dev/null +++ b/autotool-intermediates.patch @@ -0,0 +1,236 @@ +diff -up ./configure.autotool-intermediates ./configure +--- ./configure.autotool-intermediates 2011-06-13 15:27:20.710308004 -0400 ++++ ./configure 2011-06-13 15:27:22.862308004 -0400 +@@ -619,6 +619,8 @@ TRUE + MACHDEP_OBJS + DYNLOADFILE + DLINCLDIR ++DTRACEHDRS ++DTRACEOBJS + THREADOBJ + LDLAST + USE_THREAD_MODULE +@@ -639,6 +641,8 @@ OTHER_LIBTOOL_OPT + UNIVERSAL_ARCH_FLAGS + BASECFLAGS + OPT ++DEBUG_SUFFIX ++DEBUG_EXT + LN + INSTALL_DATA + INSTALL_SCRIPT +@@ -760,8 +764,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 +@@ -777,7 +784,8 @@ CFLAGS + LDFLAGS + LIBS + CPPFLAGS +-CPP' ++CPP ++CPPFLAGS' + + + # Initialize some variables set by options. +@@ -1435,8 +1443,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 +@@ -4754,7 +4765,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; } +@@ -4928,8 +4939,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*) +@@ -4952,7 +4963,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*) +@@ -5391,6 +5402,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? + +@@ -9403,6 +9422,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; } +@@ -9452,6 +9515,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 2011-06-13 15:27:20.702308004 -0400 ++++ ./pyconfig.h.in 2011-06-13 15:27:23.433308006 -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 + +@@ -1104,12 +1110,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 + +@@ -1146,6 +1146,9 @@ + /* This must be defined on some systems to enable large file support. */ + #undef _LARGEFILE_SOURCE + ++/* This must be defined on AIX systems to enable large file support. */ ++#undef _LARGE_FILES ++ + /* Define to 1 if on MINIX. */ + #undef _MINIX + diff --git a/python-2.7-autotool-intermediates.patch b/python-2.7-autotool-intermediates.patch deleted file mode 100644 index 68eefe9..0000000 --- a/python-2.7-autotool-intermediates.patch +++ /dev/null @@ -1,236 +0,0 @@ -diff -up ./configure.autotool-intermediates ./configure ---- ./configure.autotool-intermediates 2011-06-13 15:27:20.710308004 -0400 -+++ ./configure 2011-06-13 15:27:22.862308004 -0400 -@@ -619,6 +619,8 @@ TRUE - MACHDEP_OBJS - DYNLOADFILE - DLINCLDIR -+DTRACEHDRS -+DTRACEOBJS - THREADOBJ - LDLAST - USE_THREAD_MODULE -@@ -639,6 +641,8 @@ OTHER_LIBTOOL_OPT - UNIVERSAL_ARCH_FLAGS - BASECFLAGS - OPT -+DEBUG_SUFFIX -+DEBUG_EXT - LN - INSTALL_DATA - INSTALL_SCRIPT -@@ -760,8 +764,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 -@@ -777,7 +784,8 @@ CFLAGS - LDFLAGS - LIBS - CPPFLAGS --CPP' -+CPP -+CPPFLAGS' - - - # Initialize some variables set by options. -@@ -1435,8 +1443,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 -@@ -4754,7 +4765,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; } -@@ -4928,8 +4939,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*) -@@ -4952,7 +4963,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*) -@@ -5391,6 +5402,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? - -@@ -9403,6 +9422,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; } -@@ -9452,6 +9515,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 2011-06-13 15:27:20.702308004 -0400 -+++ ./pyconfig.h.in 2011-06-13 15:27:23.433308006 -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 - -@@ -1104,12 +1110,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 - -@@ -1146,6 +1146,9 @@ - /* This must be defined on some systems to enable large file support. */ - #undef _LARGEFILE_SOURCE - -+/* This must be defined on AIX systems to enable large file support. */ -+#undef _LARGE_FILES -+ - /* Define to 1 if on MINIX. */ - #undef _MINIX - diff --git a/python.spec b/python.spec index 30eb36a..c2b6cb9 100644 --- a/python.spec +++ b/python.spec @@ -580,7 +580,7 @@ Patch142: 00142-skip-failing-pty-tests-in-rpmbuild.patch # This is the generated patch to "configure"; see the description of # %{regenerate_autotooling_patch} # above: -Patch300: python-2.7-autotool-intermediates.patch +Patch300: autotool-intermediates.patch # ====================================================== # Additional metadata, and subpackages @@ -1285,7 +1285,7 @@ CheckPython() { fi %endif - # Actually invoke regrtest.py, setting "WITHIN_PYTHON_RPM_BUILD" so that the + # Run the upstream test suite, setting "WITHIN_PYTHON_RPM_BUILD" so that the # our non-standard decorators take effect on the relevant tests: # @unittest._skipInRpmBuild(reason) # @unittest._expectedFailureInRpmBuild @@ -1645,7 +1645,6 @@ rm -fr %{buildroot} %endif # with_debug_build - # We put the debug-gdb.py file inside /usr/lib/debug to avoid noise from # ldconfig (rhbz:562980). #