diff --git a/systemtap-2.6-compressed-modules.patch b/systemtap-2.6-compressed-modules.patch new file mode 100644 index 0000000..6c854d6 --- /dev/null +++ b/systemtap-2.6-compressed-modules.patch @@ -0,0 +1,41 @@ +From 273d6c3a7f76e2c1c3f5634a1c1274323b12745c Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Tue, 7 Oct 2014 12:38:39 -0700 +Subject: [PATCH] RHBZ1150166: Handle the filename of compressed modules + +This allows filenames like ".ko.xz" in modname_from_path(). +--- + setupdwfl.cxx | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/setupdwfl.cxx b/setupdwfl.cxx +index fe44828f8bf1..33239fe67cb9 100644 +--- a/setupdwfl.cxx ++++ b/setupdwfl.cxx +@@ -114,11 +114,20 @@ static const string abrt_path = + string + modname_from_path(const string &path) + { +- size_t dot = path.rfind('.'); + size_t slash = path.rfind('/'); +- if (dot == string::npos || slash == string::npos || dot < slash) ++ if (slash == string::npos) + return ""; +- string name = path.substr(slash + 1, dot - slash - 1); ++ string name = path.substr(slash + 1); ++ ++ // First look for .ko extension variants like ".ko" or ".ko.xz" ++ // If that fails, look for any ".*" extension at all. ++ size_t extension = name.rfind(".ko"); ++ if (extension == string::npos) ++ extension = name.rfind('.'); ++ if (extension == string::npos) ++ return ""; ++ ++ name.erase(extension); + replace_if(name.begin(), name.end(), is_comma_dash, '_'); + return name; + } +-- +1.9.3 + diff --git a/systemtap.spec b/systemtap.spec index f164919..bd028e3 100644 --- a/systemtap.spec +++ b/systemtap.spec @@ -68,7 +68,7 @@ Name: systemtap Version: 2.6 -Release: 2%{?dist} +Release: 3%{?dist} # for version, see also configure.ac @@ -104,6 +104,7 @@ URL: http://sourceware.org/systemtap/ Source: ftp://sourceware.org/pub/systemtap/releases/systemtap-%{version}.tar.gz Patch2: systemtap-2.6-dtrace-flexibility.patch +Patch3: systemtap-2.6-compressed-modules.patch # Build* BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -393,6 +394,7 @@ systemtap-runtime-virthost machine to execute systemtap scripts. %setup -q %{?setup_elfutils} %patch2 -p1 +%patch3 -p1 %if %{with_bundled_elfutils} cd elfutils-%{elfutils_version} @@ -1034,6 +1036,9 @@ done # http://sourceware.org/systemtap/wiki/SystemTapReleases %changelog +* Tue Oct 07 2014 Josh Stone - 2.6-3 +- Handle compressed module filenames (rhbz1150166) + * Thu Sep 25 2014 Josh Stone - 2.6-2 - Backport patches to improve dtrace's input flexibility - Let dtrace use its old method if pyparsing fails (rhbz1131586)