forked from pool/rpmlint
OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=514
This commit is contained in:
parent
12c3f3df1b
commit
946eb5c616
@ -11,11 +11,11 @@ info message alongside that gives a better rationale.
|
|||||||
FilesCheck.py | 32 ++++++++++++++++++++++++++------
|
FilesCheck.py | 32 ++++++++++++++++++++++++++------
|
||||||
1 file changed, 26 insertions(+), 6 deletions(-)
|
1 file changed, 26 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
diff --git a/FilesCheck.py b/FilesCheck.py
|
Index: rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
index 0b93e73..6a97601 100644
|
===================================================================
|
||||||
--- a/FilesCheck.py
|
--- rpmlint-rpmlint-1.10.orig/FilesCheck.py
|
||||||
+++ b/FilesCheck.py
|
+++ rpmlint-rpmlint-1.10/FilesCheck.py
|
||||||
@@ -848,12 +848,15 @@ class FilesCheck(AbstractCheck.AbstractCheck):
|
@@ -863,12 +863,15 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
elif interpreter or mode_is_exec or script_regex.search(f):
|
elif interpreter or mode_is_exec or script_regex.search(f):
|
||||||
if interpreter:
|
if interpreter:
|
||||||
res = interpreter_regex.search(interpreter)
|
res = interpreter_regex.search(interpreter)
|
||||||
@ -37,13 +37,8 @@ index 0b93e73..6a97601 100644
|
|||||||
elif not nonexec_file and not \
|
elif not nonexec_file and not \
|
||||||
(lib_path_regex.search(f) and
|
(lib_path_regex.search(f) and
|
||||||
f.endswith('.la')):
|
f.endswith('.la')):
|
||||||
@@ -1280,10 +1283,27 @@ executed.''',
|
@@ -1303,6 +1306,22 @@ Alternatively, if the file isn't suppose
|
||||||
'wrong-script-interpreter',
|
it is not marked as being executable.
|
||||||
'''This script uses an interpreter which is either an inappropriate one
|
|
||||||
or located in an inappropriate directory for packaged system software.
|
|
||||||
+
|
|
||||||
Alternatively, if the file should not be executed, then ensure that
|
|
||||||
it is not marked as executable.
|
|
||||||
''',
|
''',
|
||||||
|
|
||||||
+'env-script-interpreter',
|
+'env-script-interpreter',
|
||||||
@ -65,6 +60,3 @@ index 0b93e73..6a97601 100644
|
|||||||
'non-executable-script',
|
'non-executable-script',
|
||||||
'''This text file contains a shebang or is located in a path dedicated for
|
'''This text file contains a shebang or is located in a path dedicated for
|
||||||
executables, but lacks the executable bits and cannot thus be executed. If
|
executables, but lacks the executable bits and cannot thus be executed. If
|
||||||
--
|
|
||||||
2.14.1
|
|
||||||
|
|
||||||
|
@ -51,3 +51,35 @@ index f26c0c3..bfffda5 100644
|
|||||||
--
|
--
|
||||||
2.14.1
|
2.14.1
|
||||||
|
|
||||||
|
diff --git a/FilesCheck.py b/FilesCheck.py
|
||||||
|
index 6a97601..abb3fa7 100644
|
||||||
|
--- a/FilesCheck.py
|
||||||
|
+++ b/FilesCheck.py
|
||||||
|
@@ -196,7 +196,7 @@ devel_regex = re.compile(r'(.*)-(debug(info|source)?|devel|headers|source|static
|
||||||
|
debuginfo_package_regex = re.compile(r'-debug(info)?$')
|
||||||
|
debugsource_package_regex = re.compile(r'-debugsource$')
|
||||||
|
use_debugsource = Config.getOption('UseDebugSource', False)
|
||||||
|
-lib_regex = re.compile(r'lib(?:64)?/lib[^/]*(?:\.so\.[\d\.]+|\.so)$')
|
||||||
|
+lib_regex = re.compile(r'/lib(?:64)?/lib[^/]+(?:\.so\.[\d\.]+|-[\d\.]+\.so)$')
|
||||||
|
ldconfig_regex = re.compile(r'^[^#]*ldconfig', re.MULTILINE)
|
||||||
|
depmod_regex = re.compile(r'^[^#]*depmod', re.MULTILINE)
|
||||||
|
install_info_regex = re.compile(r'^[^#]*install-info', re.MULTILINE)
|
||||||
|
diff --git a/test/test_files.py b/test/test_files.py
|
||||||
|
index bfffda5..0192c13 100644
|
||||||
|
--- a/test/test_files.py
|
||||||
|
+++ b/test/test_files.py
|
||||||
|
@@ -71,11 +71,13 @@ def test_lib_regex():
|
||||||
|
assert all(
|
||||||
|
lib_regex.search(x) for x in
|
||||||
|
('/lib/libnsl-2.26.so',
|
||||||
|
- '/lib64/libSegFault.so',
|
||||||
|
+ '/usr/lib64/libgnomeui.so.3',
|
||||||
|
'/lib64/libgcc_s.so.1'))
|
||||||
|
|
||||||
|
# false positives
|
||||||
|
assert not any(
|
||||||
|
lib_regex.search(x) for x in
|
||||||
|
('/usr/share/gdb/auto-load/usr/lib/libglib-2.0.so.0.4600.1-gdb.py',
|
||||||
|
+ '/usr/share/doc/findlib/lib-1.0.so',
|
||||||
|
+ '/usr/lib64/libvulkan_radeon.so',
|
||||||
|
'/usr/lib64/rsocket/binary',))
|
||||||
|
Loading…
Reference in New Issue
Block a user