From 96a7bd540e8e742d856027cad62d3ecdeece2c4e Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Aug 31 2017 12:26:42 +0000 Subject: Run autotools to generate the configure script before building Partially fixes https://bugzilla.redhat.com/show_bug.cgi?id=1377240 --- diff --git a/00055-systemtap.patch b/00055-systemtap.patch index 0ab0387..a48fe7c 100644 --- a/00055-systemtap.patch +++ b/00055-systemtap.patch @@ -25,66 +25,6 @@ diff -up Python-3.3.0rc2/configure.ac.systemtap Python-3.3.0rc2/configure.ac # -I${DLINCLDIR} is added to the compile rule for importdl.o AC_SUBST(DLINCLDIR) DLINCLDIR=. -diff -up Python-3.3.0rc2/configure.systemtap Python-3.3.0rc2/configure ---- Python-3.3.0rc2/configure.systemtap 2012-09-09 05:11:14.000000000 -0400 -+++ Python-3.3.0rc2/configure 2012-09-10 09:17:21.116511780 -0400 -@@ -618,6 +618,8 @@ TRUE - MACHDEP_OBJS - DYNLOADFILE - DLINCLDIR -+SYSTEMTAPDEPS -+SYSTEMTAPOBJS - THREADOBJ - LDLAST - USE_THREAD_MODULE -@@ -779,6 +781,7 @@ with_doc_strings - with_tsc - with_pymalloc - with_valgrind -+with_systemtap - with_fpectl - with_libm - with_libc -@@ -1456,6 +1459,7 @@ Optional Packages: - --with(out)-tsc enable/disable timestamp counter profile - --with(out)-pymalloc disable/enable specialized mallocs - --with-valgrind Enable Valgrind support -+ --with(out)-systemtap disable/enable SystemTap support - --with-fpectl enable SIGFPE catching - --with-libm=STRING math library - --with-libc=STRING C library -@@ -10065,6 +10069,31 @@ fi - OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT" - fi - -+# Check for systemtap support -+# On Linux, /usr/bin/dtrace is in fact a shim to SystemTap -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-systemtap" >&5 -+$as_echo_n "checking for --with-systemtap... " >&6; } -+ -+# Check whether --with-systemtap was given. -+if test "${with_systemtap+set}" = set; then : -+ withval=$with_systemtap; -+else -+ with_systemtap=no -+fi -+ -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_systemtap" >&5 -+$as_echo "$with_systemtap" >&6; } -+if test "$with_systemtap" != no; then -+ -+$as_echo "#define WITH_SYSTEMTAP 1" >>confdefs.h -+ -+ SYSTEMTAPOBJS="Python/pysystemtap.o" -+ SYSTEMTAPDEPS="\$(srcdir)/Python/pysystemtap.h" -+fi -+ -+ -+ -+ - # -I${DLINCLDIR} is added to the compile rule for importdl.o - - DLINCLDIR=. diff -up Python-3.3.0rc2/Doc/howto/index.rst.systemtap Python-3.3.0rc2/Doc/howto/index.rst --- Python-3.3.0rc2/Doc/howto/index.rst.systemtap 2012-09-09 05:10:51.000000000 -0400 +++ Python-3.3.0rc2/Doc/howto/index.rst 2012-09-10 09:17:21.117511779 -0400 diff --git a/python3.spec b/python3.spec index e78a343..03dae44 100644 --- a/python3.spec +++ b/python3.spec @@ -733,11 +733,21 @@ sed --in-place \ %patch5001 -p1 +# Remove files that should be generated by the build +# (This is after patching, so that we can use patches directly from upstream) +rm configure pyconfig.h.in + + # ====================================================== # Configuring and building the code: # ====================================================== %build + +# Regenerate the configure script and pyconfig.h.in +autoconf +autoheader + topdir=$(pwd) export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv" export CXXFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -fPIC -fwrapv" @@ -1669,6 +1679,7 @@ fi %changelog * Mon Aug 28 2017 Petr Viktorin - 3.6.2-13 - Rename patch files to be consistent +- Run autotools to generate the configure script before building * Mon Aug 28 2017 Michal Cyprian - 3.6.2-12 - Use python3 style of calling super() without arguments in rpath