diff --git a/srcpkgs/systemtap/patches/systemtap-2.6-compressed-modules.patch b/srcpkgs/systemtap/patches/systemtap-2.6-compressed-modules.patch new file mode 100644 index 00000000000..d64c1ff3342 --- /dev/null +++ b/srcpkgs/systemtap/patches/systemtap-2.6-compressed-modules.patch @@ -0,0 +1,39 @@ +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(-) + +--- setupdwfl.cxx ++++ 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/srcpkgs/systemtap/template b/srcpkgs/systemtap/template index 874ea33d7d2..9d09eea6584 100644 --- a/srcpkgs/systemtap/template +++ b/srcpkgs/systemtap/template @@ -1,7 +1,7 @@ # Template file for 'systemtap' pkgname=systemtap version=2.6 -revision=1 +revision=2 build_style=gnu-configure makedepends="elfutils-devel" short_desc="Infrastructure to simplify the gathering of information"