SHA256
1
0
forked from pool/rpmlint
Dirk Mueller 2016-01-30 19:44:17 +00:00 committed by Git OBS Bridge
parent f9197f6e6d
commit 17e6a65a1a
2 changed files with 31 additions and 12 deletions

View File

@ -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:

View File

@ -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