From 17e6a65a1acb56bbba82f359a75920a621ef1eb13ad3c765bfd8a0c3f9ee306c Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sat, 30 Jan 2016 19:44:17 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=366 --- binaryinfo-speedup.diff | 40 ++++++++++++++++++++++++++++++---------- rpmlint.spec | 3 +-- 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/binaryinfo-speedup.diff b/binaryinfo-speedup.diff index 723e8e3..f0e228b 100644 --- a/binaryinfo-speedup.diff +++ b/binaryinfo-speedup.diff @@ -10,10 +10,10 @@ the regexes will match, continue with the next line. BinariesCheck.py | 53 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 21 deletions(-) -diff --git a/BinariesCheck.py b/BinariesCheck.py -index d2ed87a..52a7aae 100644 ---- a/BinariesCheck.py -+++ b/BinariesCheck.py +Index: rpmlint-rpmlint-1.8/BinariesCheck.py +=================================================================== +--- rpmlint-rpmlint-1.8.orig/BinariesCheck.py ++++ rpmlint-rpmlint-1.8/BinariesCheck.py @@ -28,14 +28,14 @@ DEFAULT_SYSTEM_LIB_PATHS = ( def create_regexp_call(call): if type(call) == type([]): @@ -38,8 +38,8 @@ index d2ed87a..52a7aae 100644 + call_regex = re.compile('\s0\s+FUNC\s+(.*)') exit_call_regex = create_regexp_call('_?exit') fork_call_regex = create_regexp_call('fork') - # regexp for setgid setegid setresgid set(?:res|e)?gid -@@ -103,25 +104,8 @@ class BinaryInfo: + debuginfo_regex=re.compile('^\s+\[\s*\d+\]\s+\.debug_.*\s+') +@@ -109,25 +110,8 @@ class BinaryInfo: cmd.append(path) res = Pkg.getstatusoutput(cmd) if not res[0]: @@ -67,10 +67,18 @@ index d2ed87a..52a7aae 100644 r = BinaryInfo.needed_regex.search(l) if r: self.needed.append(r.group(1)) -@@ -154,6 +138,33 @@ class BinaryInfo: +@@ -160,6 +144,41 @@ class BinaryInfo: self.exec_stack = True continue ++ if BinaryInfo.debuginfo_regex.search(l): ++ self.debuginfo=1 ++ continue ++ ++ if BinaryInfo.symtab_regex.search(l): ++ self.symtab=1 ++ continue ++ + if l.startswith("Symbol table"): + break + @@ -101,6 +109,18 @@ index d2ed87a..52a7aae 100644 if BinaryInfo.forbidden_functions: for r_name, func in BinaryInfo.forbidden_functions.items(): ret = func['f_regex'].search(l) --- -2.7.0 - +@@ -181,14 +200,6 @@ class BinaryInfo: + fork_called = True + continue + +- if BinaryInfo.debuginfo_regex.search(l): +- self.debuginfo=1 +- continue +- +- if BinaryInfo.symtab_regex.search(l): +- self.symtab=1 +- continue +- + # check if we don't have a string that will automatically + # waive the presence of a forbidden call + if self.forbidden_calls: diff --git a/rpmlint.spec b/rpmlint.spec index dae77c1..54fd963 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -109,8 +109,7 @@ Patch50: fix-shared-library-matching.diff # https://github.com/rpm-software-management/rpmlint/commit/1436dd7bc41115af658cf8f36a3149ab90a61fcf.patch Patch51: postin-speedup.diff # https://github.com/rpm-software-management/rpmlint/commit/37fe9d4f237c2cb29fcb3b60d1ece189e578eeaf.patch and followup regression fixes - -### Patch52: binaryinfo-speedup.diff +Patch52: binaryinfo-speedup.diff # PATCHLIST END # BuildArch must at the end. is a bug: https://bugzilla.suse.com/show_bug.cgi?id=926766 BuildArch: noarch