From d414f9c050f55fc9ba878519ded7ef1c4ab71b91 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 19 Nov 2012 13:54:46 -0800 Subject: [PATCH] Rebuild for the final dyninst 8.0. - As with rawhide, disable docs due to bz864730 --- systemtap-2.0-dyninst-fixes.patch | 46 +++++++++++++++++++++++++++++++ systemtap.spec | 18 ++++++++++-- 2 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 systemtap-2.0-dyninst-fixes.patch diff --git a/systemtap-2.0-dyninst-fixes.patch b/systemtap-2.0-dyninst-fixes.patch new file mode 100644 index 0000000..4be8f43 --- /dev/null +++ b/systemtap-2.0-dyninst-fixes.patch @@ -0,0 +1,46 @@ +commit b057e43ca01471715901d41448f303080d6a6ba0 +Author: Josh Stone +Date: Fri Nov 16 13:48:26 2012 -0800 + + stapdyn: Backport fixes for dyninst 8.0 + + Applying these two changes back to systemtap 2.0: + + commit 744aac4dc3e066dcd92f31d7d89a47a7de65def8 + stapdyn: Remove the 8-arg register workaround + + commit 7ff8e006809c1544ec61658c21da3795a4212041 + stapdyn: loadLibrary now returns BPatch_object + +diff --git a/stapdyn/stapdyn.cxx b/stapdyn/stapdyn.cxx +index 8e84ee9..ca73dde 100644 +--- a/stapdyn/stapdyn.cxx ++++ b/stapdyn/stapdyn.cxx +@@ -190,10 +190,6 @@ get_dwarf_registers(BPatch_process *app, + // O(m*n) loop, but neither array is very large + for (const char* const* name = names; *name; ++name) + { +- // XXX Dyninst is currently limited in how many individual function +- // arguments it can pass, so we'll have to cut this short... +- if (registers.size() > 8) break; +- + size_t i; + for (i = 0; i < bpregs.size(); ++i) + if (bpregs[i].name() == *name) +@@ -588,14 +584,13 @@ main(int argc, char * const argv[]) + + // Load the stap module into the target process. + g_child_process = app; +- BPatch_module* stap_mod = app->loadLibrary(module); +- if (!app) ++ g_stap_dso = app->loadLibrary(module); ++ if (!g_stap_dso) + { + staperror() << "Couldn't load " << module + << " into the target process" << endl; + return 1; + } +- g_stap_dso = stap_mod->getObject(); + + // Find and instrument uprobes in the target + if ((rc = find_uprobes(dlmodule, g_targets))) diff --git a/systemtap.spec b/systemtap.spec index a30fc45..3470e27 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -1,3 +1,7 @@ +# XXX docs override, bz864730 +%{!?with_docs: %global with_docs 0} +%{!?with_publican: %global with_publican 0} +# XXX end docs override %{!?with_sqlite: %global with_sqlite 1} %{!?with_docs: %global with_docs 1} # crash is not available @@ -29,7 +33,7 @@ Name: systemtap Version: 2.0 -Release: 3%{?dist} +Release: 4%{?dist} # for version, see also configure.ac @@ -67,8 +71,7 @@ BuildRequires: gcc-c++ BuildRequires: gettext-devel BuildRequires: nss-devel avahi-devel pkgconfig %if %{with_dyninst} -# include the prerelease version for now, but really this is >= 8.0 -BuildRequires: dyninst-devel >= 7.99 +BuildRequires: dyninst-devel >= 8.0 BuildRequires: libdwarf-devel BuildRequires: libselinux-devel %endif @@ -105,6 +108,9 @@ BuildRequires: /usr/share/publican/Common_Content/%{publican_brand}/defaults.cfg %endif %endif +# fix minor changes for dyninst 8.0 final +Patch2: systemtap-2.0-dyninst-fixes.patch + # Install requirements Requires: systemtap-client = %{version}-%{release} Requires: systemtap-devel = %{version}-%{release} @@ -269,6 +275,8 @@ find . \( -name configure -o -name config.h.in \) -print | xargs touch cd .. %endif +%patch2 -p1 + %build %if %{with_bundled_elfutils} @@ -613,6 +621,10 @@ exit 0 # ------------------------------------------------------------------------ %changelog +* Mon Nov 19 2012 Josh Stone 2.0-4 +- Rebuild for the final dyninst 8.0. +- As with rawhide, disable docs due to bz864730 + * Mon Nov 19 2012 Karsten Hopp 2.0-3 - systemtap got compiled with an old dyninst library on ppc, bump release and rebuild