From af1b222b2b840bbfc8679baf99a0a23631320b73 Mon Sep 17 00:00:00 2001 From: Charalampos Stratakis Date: Dec 09 2016 15:15:44 +0000 Subject: Enable --with-dtrace configure flag (upstream issue21590) Add patch to fix out of tree --with-dtrace build (upstream issue28787) --- diff --git a/00249-fix-out-of-tree-dtrace-builds.patch b/00249-fix-out-of-tree-dtrace-builds.patch new file mode 100644 index 0000000..d5de53c --- /dev/null +++ b/00249-fix-out-of-tree-dtrace-builds.patch @@ -0,0 +1,12 @@ +diff --git a/Makefile.pre.in b/Makefile.pre.in +index 28df0e1..42f811c 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -867,6 +867,7 @@ Python/frozen.o: Python/importlib.h Python/importlib_external.h + # follow our naming conventions. dtrace(1) uses the output filename to generate + # an include guard, so we can't use a pipeline to transform its output. + Include/pydtrace_probes.h: $(srcdir)/Include/pydtrace.d ++ @$(MKDIR_P) Include + $(DTRACE) $(DFLAGS) -o $@ -h -s $< + : sed in-place edit with POSIX-only tools + sed 's/PYTHON_/PyDTrace_/' $@ > $@.tmp diff --git a/python3.spec b/python3.spec index 459ab56..cb177ab 100644 --- a/python3.spec +++ b/python3.spec @@ -155,12 +155,11 @@ BuildRequires: pkgconfig BuildRequires: readline-devel BuildRequires: sqlite-devel -%if 0%{?with_systemtap} BuildRequires: systemtap-sdt-devel +BuildRequires: systemtap-devel # (this introduces a dependency on "python", in that systemtap-sdt-devel's # /usr/bin/dtrace is a python 2 script) %global tapsetdir /usr/share/systemtap/tapset -%endif # with_systemtap BuildRequires: tar BuildRequires: tcl-devel @@ -389,6 +388,12 @@ Patch206: 00206-remove-hf-from-arm-triplet.patch # Fedora needs the default mips64-linux-gnu Patch243: 00243-fix-mips64-triplet.patch +# 00249 # +# Fix builds using the --with-dtrace flag as the rpmbuild +# of python is an out of tree build +# Not yet fixed upstream: http://bugs.python.org/issue28787 +Patch249: 00249-fix-out-of-tree-dtrace-builds.patch + # (New patches go here ^^^) # # When adding new patches to "python" and "python3" in Fedora, EL, etc., @@ -625,6 +630,7 @@ sed -r -i s/'_PIP_VERSION = "[0-9.]+"'/'_PIP_VERSION = "%{pip_version}"'/ Lib/en %patch205 -p1 %patch206 -p1 %patch243 -p1 +%patch249 -p1 # 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. @@ -681,6 +687,7 @@ BuildPython() { --with-system-expat \ --with-system-ffi \ --enable-loadable-sqlite-extensions \ + --with-dtrace \ %if 0%{?with_systemtap} --with-systemtap \ %endif