Accepting request 38983 from Base:System
Copy from Base:System/rpmlint based on submit request 38983 from user dirkmueller OBS-URL: https://build.opensuse.org/request/show/38983 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=59
This commit is contained in:
parent
ef72ae8a8c
commit
23044a1498
@ -589,12 +589,13 @@ class LibraryPolicyCheck(AbstractCheck.AbstractCheck):
|
|||||||
if os.path.isdir(pkg.dirName()+f):
|
if os.path.isdir(pkg.dirName()+f):
|
||||||
dirs.add(f)
|
dirs.add(f)
|
||||||
|
|
||||||
# Verify it doesn't have hard dependency on non-lib packages
|
# Verify shared lib policy package doesn't have hard dependency on non-lib packages
|
||||||
for dep in pkg.requires():
|
if std_lib_package:
|
||||||
if (dep[0].startswith('rpmlib(')):
|
for dep in pkg.requires():
|
||||||
continue
|
if (dep[0].startswith('rpmlib(')):
|
||||||
if (dep[2] & (rpm.RPMSENSE_GREATER | rpm.RPMSENSE_EQUAL)) == rpm.RPMSENSE_EQUAL:
|
continue
|
||||||
printWarning(pkg, "shlib-fixed-dependency", Pkg.formatRequire(dep[0], dep[1], dep[2]))
|
if (dep[2] & (rpm.RPMSENSE_GREATER | rpm.RPMSENSE_EQUAL)) == rpm.RPMSENSE_EQUAL:
|
||||||
|
printWarning(pkg, "shlib-fixed-dependency", Pkg.formatRequire(dep[0], dep[1], dep[2]))
|
||||||
|
|
||||||
# Verify non-lib stuff does not add dependencies
|
# Verify non-lib stuff does not add dependencies
|
||||||
if libs:
|
if libs:
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- FilesCheck.py
|
Index: FilesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -184,7 +184,7 @@
|
@@ -658,7 +658,7 @@ buildconfig_rpath_regex = re.compile('(?
|
||||||
sofile_regex = re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$')
|
sofile_regex = re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$')
|
||||||
devel_regex = re.compile('(.*)-(debug(info)?|devel|headers|source|static)$')
|
devel_regex = re.compile('(.*)-(debug(info)?|devel|headers|source|static)$')
|
||||||
debuginfo_package_regex = re.compile('-debug(info)?$')
|
debuginfo_package_regex = re.compile('-debug(info)?$')
|
||||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -1470,7 +1470,10 @@ customize an executable, make it for exa
|
@@ -1617,7 +1617,10 @@ executed.''',
|
||||||
executed.''',
|
executed.''',
|
||||||
|
|
||||||
'wrong-script-interpreter',
|
'wrong-script-interpreter',
|
||||||
|
@ -2,7 +2,7 @@ Index: SpecCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- SpecCheck.py.orig
|
--- SpecCheck.py.orig
|
||||||
+++ SpecCheck.py
|
+++ SpecCheck.py
|
||||||
@@ -539,7 +539,7 @@ allow building the package as non root o
|
@@ -612,7 +612,7 @@ versions you can ignore this warning.'''
|
||||||
|
|
||||||
'hardcoded-path-in-buildroot-tag',
|
'hardcoded-path-in-buildroot-tag',
|
||||||
'''A path is hardcoded in your Buildroot tag. It should be replaced
|
'''A path is hardcoded in your Buildroot tag. It should be replaced
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- SpecCheck.py
|
Index: SpecCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- SpecCheck.py.orig
|
||||||
+++ SpecCheck.py
|
+++ SpecCheck.py
|
||||||
@@ -59,7 +59,10 @@
|
@@ -60,7 +60,10 @@ suse_version_regex = re.compile('%suse_v
|
||||||
section_regexs = dict(
|
section_regexs = dict(
|
||||||
([x, re.compile('^%' + x + '(?:\s|$)')]
|
([x, re.compile('^%' + x + '(?:\s|$)')]
|
||||||
for x in ('build', 'changelog', 'check', 'clean', 'description', 'files',
|
for x in ('build', 'changelog', 'check', 'clean', 'description', 'files',
|
||||||
@ -12,7 +14,7 @@
|
|||||||
|
|
||||||
# Only check for /lib, /usr/lib, /usr/X11R6/lib
|
# Only check for /lib, /usr/lib, /usr/X11R6/lib
|
||||||
# TODO: better handling of X libraries and modules.
|
# TODO: better handling of X libraries and modules.
|
||||||
@@ -264,7 +267,9 @@
|
@@ -265,7 +268,9 @@ class SpecCheck(AbstractCheck.AbstractCh
|
||||||
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: SpecCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- SpecCheck.py.orig
|
--- SpecCheck.py.orig
|
||||||
+++ SpecCheck.py
|
+++ SpecCheck.py
|
||||||
@@ -112,7 +112,7 @@ def deptokens(line):
|
@@ -117,7 +117,7 @@ def deptokens(line):
|
||||||
elif wantmore:
|
elif wantmore:
|
||||||
tmp += ' ' + tok
|
tmp += ' ' + tok
|
||||||
wantmore = False
|
wantmore = False
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- TagsCheck.py
|
Index: TagsCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -660,6 +660,9 @@
|
@@ -676,6 +676,9 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
if not description:
|
if not description:
|
||||||
printError(pkg, 'no-description-tag')
|
printError(pkg, 'no-description-tag')
|
||||||
else:
|
else:
|
||||||
@ -10,7 +12,7 @@
|
|||||||
if not pkg[rpm.RPMTAG_HEADERI18NTABLE]:
|
if not pkg[rpm.RPMTAG_HEADERI18NTABLE]:
|
||||||
self._unexpanded_macros(pkg, '%description', description)
|
self._unexpanded_macros(pkg, '%description', description)
|
||||||
else:
|
else:
|
||||||
@@ -928,6 +931,10 @@
|
@@ -946,6 +949,10 @@ Name tag.''',
|
||||||
'''The major number of the library isn't included in the package's name.
|
'''The major number of the library isn't included in the package's name.
|
||||||
''',
|
''',
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -761,6 +761,10 @@ class FilesCheck(AbstractCheck.AbstractC
|
@@ -813,6 +813,10 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
# Check if the package is a development package
|
# Check if the package is a development package
|
||||||
devel_pkg = devel_regex.search(pkg.name)
|
devel_pkg = devel_regex.search(pkg.name)
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -651,6 +651,7 @@ bin_regex = re.compile('^(/usr)?/s?bin/'
|
@@ -652,6 +652,7 @@ bin_regex = re.compile('^(/usr)?/s?bin/'
|
||||||
includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE)
|
includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE)
|
||||||
develfile_regex = re.compile('\.(a|cmxa?|mli?)$')
|
develfile_regex = re.compile('\.(a|cmxa?|mli?)$')
|
||||||
buildconfigfile_regex = re.compile('(\.pc|/bin/.+-config)$')
|
buildconfigfile_regex = re.compile('(\.pc|/bin/.+-config)$')
|
||||||
@ -10,7 +10,7 @@ Index: FilesCheck.py
|
|||||||
# room for improvement with catching more -R, but also for false positives...
|
# room for improvement with catching more -R, but also for false positives...
|
||||||
buildconfig_rpath_regex = re.compile('(?:-rpath|Wl,-R)\\b')
|
buildconfig_rpath_regex = re.compile('(?:-rpath|Wl,-R)\\b')
|
||||||
sofile_regex = re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$')
|
sofile_regex = re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$')
|
||||||
@@ -1035,7 +1036,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
@@ -1151,7 +1152,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
includefile_regex.search(f) or \
|
includefile_regex.search(f) or \
|
||||||
develfile_regex.search(f) or \
|
develfile_regex.search(f) or \
|
||||||
logrotate_regex.search(f)
|
logrotate_regex.search(f)
|
||||||
@ -19,7 +19,7 @@ Index: FilesCheck.py
|
|||||||
printWarning(pkg, 'spurious-executable-perm', f)
|
printWarning(pkg, 'spurious-executable-perm', f)
|
||||||
elif f.startswith('/etc/'):
|
elif f.startswith('/etc/'):
|
||||||
if f not in config_files and f not in ghost_files:
|
if f not in config_files and f not in ghost_files:
|
||||||
@@ -1346,7 +1347,10 @@ included in your package.''',
|
@@ -1491,7 +1492,10 @@ included in your package.''',
|
||||||
'spurious-executable-perm',
|
'spurious-executable-perm',
|
||||||
'''The file is installed with executable permissions, but was identified as one
|
'''The file is installed with executable permissions, but was identified as one
|
||||||
that probably should not be executable. Verify if the executable bits are
|
that probably should not be executable. Verify if the executable bits are
|
||||||
|
@ -2,7 +2,7 @@ Index: SpecCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- SpecCheck.py.orig
|
--- SpecCheck.py.orig
|
||||||
+++ SpecCheck.py
|
+++ SpecCheck.py
|
||||||
@@ -29,7 +29,7 @@ applied_patch_regex = re.compile("^%patc
|
@@ -35,7 +35,7 @@ applied_patch_regex = re.compile("^%patc
|
||||||
applied_patch_p_regex = re.compile("\s-P\s+(\d+)\\b")
|
applied_patch_p_regex = re.compile("\s-P\s+(\d+)\\b")
|
||||||
source_dir_regex = re.compile("^[^#]*(\$RPM_SOURCE_DIR|%{?_sourcedir}?)")
|
source_dir_regex = re.compile("^[^#]*(\$RPM_SOURCE_DIR|%{?_sourcedir}?)")
|
||||||
obsolete_tags_regex = re.compile("^(Copyright|Serial)\s*:\s*([^\s]+)")
|
obsolete_tags_regex = re.compile("^(Copyright|Serial)\s*:\s*([^\s]+)")
|
||||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- TagsCheck.py.orig
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -402,6 +402,7 @@ invalid_version_regex = re.compile('([0-
|
@@ -419,6 +419,7 @@ invalid_version_regex = re.compile('([0-
|
||||||
# () are here for grouping purpose in the regexp
|
# () are here for grouping purpose in the regexp
|
||||||
forbidden_words_regex = re.compile('(' + Config.getOption('ForbiddenWords') + ')', re.IGNORECASE)
|
forbidden_words_regex = re.compile('(' + Config.getOption('ForbiddenWords') + ')', re.IGNORECASE)
|
||||||
valid_buildhost_regex = re.compile(Config.getOption('ValidBuildHost'))
|
valid_buildhost_regex = re.compile(Config.getOption('ValidBuildHost'))
|
||||||
@ -10,7 +10,7 @@ Index: TagsCheck.py
|
|||||||
epoch_regex = re.compile('^[0-9]+:')
|
epoch_regex = re.compile('^[0-9]+:')
|
||||||
use_epoch = Config.getOption('UseEpoch', False)
|
use_epoch = Config.getOption('UseEpoch', False)
|
||||||
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
|
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
|
||||||
@@ -484,6 +485,9 @@ class TagsCheck(AbstractCheck.AbstractCh
|
@@ -580,6 +581,9 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
if d[0].startswith('/usr/local/'):
|
if d[0].startswith('/usr/local/'):
|
||||||
printError(pkg, 'invalid-dependency', d[0])
|
printError(pkg, 'invalid-dependency', d[0])
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ Index: TagsCheck.py
|
|||||||
if not devel_depend and not is_devel and not is_source:
|
if not devel_depend and not is_devel and not is_source:
|
||||||
if FilesCheck.devel_regex.search(d[0]):
|
if FilesCheck.devel_regex.search(d[0]):
|
||||||
printError(pkg, 'devel-dependency', d[0])
|
printError(pkg, 'devel-dependency', d[0])
|
||||||
@@ -902,6 +906,12 @@ explicit Requires: tags.''',
|
@@ -1040,6 +1044,12 @@ explicit Requires: tags.''',
|
||||||
'''This package provides 2 times the same capacity. It should only provide it
|
'''This package provides 2 times the same capacity. It should only provide it
|
||||||
once.''',
|
once.''',
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -778,7 +778,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
@@ -830,7 +830,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
debuginfo_srcs = False
|
debuginfo_srcs = False
|
||||||
debuginfo_debugs = False
|
debuginfo_debugs = False
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- TagsCheck.py
|
Index: TagsCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -653,6 +653,8 @@
|
@@ -686,6 +686,8 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
self._unexpanded_macros(pkg, 'Group', group)
|
self._unexpanded_macros(pkg, 'Group', group)
|
||||||
if not group:
|
if not group:
|
||||||
printError(pkg, 'no-group-tag')
|
printError(pkg, 'no-group-tag')
|
||||||
@ -9,7 +11,7 @@
|
|||||||
elif VALID_GROUPS and group not in VALID_GROUPS:
|
elif VALID_GROUPS and group not in VALID_GROUPS:
|
||||||
printWarning(pkg, 'non-standard-group', group)
|
printWarning(pkg, 'non-standard-group', group)
|
||||||
|
|
||||||
@@ -949,6 +951,10 @@
|
@@ -985,6 +987,10 @@ won't fool the specfile parser, and rebu
|
||||||
'''There is no Group tag in your package. You have to specify a valid group
|
'''There is no Group tag in your package. You have to specify a valid group
|
||||||
in your spec file using the Group tag.''',
|
in your spec file using the Group tag.''',
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- FilesCheck.py
|
Index: FilesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -174,7 +174,7 @@
|
@@ -175,7 +175,7 @@ compr_regex = re.compile('\.(gz|z|Z|zip|
|
||||||
absolute_regex = re.compile('^/([^/]+)')
|
absolute_regex = re.compile('^/([^/]+)')
|
||||||
absolute2_regex = re.compile('^/?([^/]+)')
|
absolute2_regex = re.compile('^/?([^/]+)')
|
||||||
points_regex = re.compile('^\.\./(.*)')
|
points_regex = re.compile('^\.\./(.*)')
|
||||||
@ -9,9 +11,11 @@
|
|||||||
bin_regex = re.compile('^(/usr)?/s?bin/')
|
bin_regex = re.compile('^(/usr)?/s?bin/')
|
||||||
includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE)
|
includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE)
|
||||||
develfile_regex = re.compile('\.(a|cmxa?|mli?)$')
|
develfile_regex = re.compile('\.(a|cmxa?|mli?)$')
|
||||||
--- I18NCheck.py
|
Index: I18NCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- I18NCheck.py.orig
|
||||||
+++ I18NCheck.py
|
+++ I18NCheck.py
|
||||||
@@ -67,7 +67,7 @@
|
@@ -67,7 +67,7 @@ CORRECT_SUBDIRS = (
|
||||||
)
|
)
|
||||||
|
|
||||||
package_regex = re.compile('-(' + '|'.join((x[0:2] for x in CORRECT_SUBDIRS)) + ')$')
|
package_regex = re.compile('-(' + '|'.join((x[0:2] for x in CORRECT_SUBDIRS)) + ')$')
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 28 11:16:25 CEST 2010 - dmueller@suse.de
|
||||||
|
|
||||||
|
- fix exception in interpreter check
|
||||||
|
- restrict shlib-fixed-dependency to shlib-policy packages
|
||||||
|
- allow files in /tmp to be listed as %ghost
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 27 17:00:08 CEST 2010 - dmueller@suse.de
|
||||||
|
|
||||||
|
- tighten pkg-config check
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Apr 26 11:09:53 CEST 2010 - dmueller@suse.de
|
Mon Apr 26 11:09:53 CEST 2010 - dmueller@suse.de
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ Name: rpmlint
|
|||||||
BuildRequires: rpm-python
|
BuildRequires: rpm-python
|
||||||
Summary: Rpm correctness checker
|
Summary: Rpm correctness checker
|
||||||
Version: 0.95
|
Version: 0.95
|
||||||
Release: 4
|
Release: 5
|
||||||
Source0: %{name}-%{version}.tar.bz2
|
Source0: %{name}-%{version}.tar.bz2
|
||||||
Source1: config
|
Source1: config
|
||||||
Source1001: config.in
|
Source1001: config.in
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- FilesCheck.py
|
Index: FilesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -818,7 +818,7 @@
|
@@ -1292,7 +1292,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
interpreter = None
|
interpreter = None
|
||||||
if res:
|
if res:
|
||||||
interpreter = res.group(1)
|
interpreter = res.group(1)
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- FilesCheck.py
|
Index: FilesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -212,7 +212,7 @@
|
@@ -684,7 +684,7 @@ manifest_perl_regex = re.compile('^/usr/
|
||||||
shebang_regex = re.compile('^#!\s*(\S*)')
|
shebang_regex = re.compile('^#!\s*(\S*)')
|
||||||
interpreter_regex = re.compile('^/(usr/)?(s?bin|games|libexec(/.+)?|(lib(64)?|share)/.+)/[^/]+$')
|
interpreter_regex = re.compile('^/(usr/)?(s?bin|games|libexec(/.+)?|(lib(64)?|share)/.+)/[^/]+$')
|
||||||
script_regex = re.compile('^/((usr/)?s?bin|etc/(rc\.d/init\.d|X11/xinit\.d|cron\.(hourly|daily|monthly|weekly)))/')
|
script_regex = re.compile('^/((usr/)?s?bin|etc/(rc\.d/init\.d|X11/xinit\.d|cron\.(hourly|daily|monthly|weekly)))/')
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
--- FilesCheck.py
|
--- FilesCheck.py
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -826,7 +826,7 @@
|
@@ -826,7 +826,8 @@
|
||||||
f.endswith('.la')):
|
f.endswith('.la')):
|
||||||
printError(pkg, 'script-without-shebang', f)
|
printError(pkg, 'script-without-shebang', f)
|
||||||
|
|
||||||
- if mode & 0111 == 0 and not is_doc:
|
- if mode & 0111 == 0 and not is_doc:
|
||||||
+ if mode & 0111 == 0 and not is_doc and interpreter.startswith("/"):
|
+ if mode & 0111 == 0 and not is_doc and \
|
||||||
|
+ interpreter and interpreter.startswith("/"):
|
||||||
printError(pkg, 'non-executable-script', f,
|
printError(pkg, 'non-executable-script', f,
|
||||||
oct(perm), interpreter)
|
oct(perm), interpreter)
|
||||||
if line.endswith('\r\n') or line.endswith('\r'):
|
if line.endswith('\r\n') or line.endswith('\r'):
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- FilesCheck.py
|
Index: FilesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -428,6 +428,16 @@
|
@@ -907,6 +907,16 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
if res.group(1) != pkg.name:
|
if res.group(1) != pkg.name:
|
||||||
printError(pkg, 'incoherent-logrotate-file', f)
|
printError(pkg, 'incoherent-logrotate-file', f)
|
||||||
|
|
||||||
@ -17,7 +19,7 @@
|
|||||||
if link != '':
|
if link != '':
|
||||||
ext = compr_regex.search(link)
|
ext = compr_regex.search(link)
|
||||||
if ext:
|
if ext:
|
||||||
@@ -1186,6 +1196,24 @@
|
@@ -1677,6 +1687,24 @@ consequences), or other compiler flags w
|
||||||
extraction not working as expected. Verify that the binaries are not
|
extraction not working as expected. Verify that the binaries are not
|
||||||
unexpectedly stripped and that the intended compiler flags are used.''',
|
unexpectedly stripped and that the intended compiler flags are used.''',
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- BinariesCheck.py
|
Index: BinariesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- BinariesCheck.py.orig
|
||||||
+++ BinariesCheck.py
|
+++ BinariesCheck.py
|
||||||
@@ -37,6 +37,8 @@
|
@@ -37,6 +37,8 @@ class BinaryInfo:
|
||||||
unused_regex = re.compile('^\s+(\S+)')
|
unused_regex = re.compile('^\s+(\S+)')
|
||||||
exit_call_regex = re.compile('\s+FUNC\s+.*?\s+(_?exit(?:@\S+)?)(?:\s|$)')
|
exit_call_regex = re.compile('\s+FUNC\s+.*?\s+(_?exit(?:@\S+)?)(?:\s|$)')
|
||||||
fork_call_regex = re.compile('\s+FUNC\s+.*?\s+(fork(?:@\S+)?)(?:\s|$)')
|
fork_call_regex = re.compile('\s+FUNC\s+.*?\s+(fork(?:@\S+)?)(?:\s|$)')
|
||||||
@ -9,7 +11,7 @@
|
|||||||
|
|
||||||
def __init__(self, pkg, path, file, is_ar, is_shlib):
|
def __init__(self, pkg, path, file, is_ar, is_shlib):
|
||||||
self.readelf_error = False
|
self.readelf_error = False
|
||||||
@@ -51,6 +53,8 @@
|
@@ -51,6 +53,8 @@ class BinaryInfo:
|
||||||
self.exec_stack = False
|
self.exec_stack = False
|
||||||
self.exit_calls = []
|
self.exit_calls = []
|
||||||
fork_called = False
|
fork_called = False
|
||||||
@ -18,7 +20,7 @@
|
|||||||
self.tail = ''
|
self.tail = ''
|
||||||
|
|
||||||
is_debug = path.endswith('.debug')
|
is_debug = path.endswith('.debug')
|
||||||
@@ -103,6 +107,14 @@
|
@@ -103,6 +107,14 @@ class BinaryInfo:
|
||||||
fork_called = True
|
fork_called = True
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -33,7 +35,7 @@
|
|||||||
if self.non_pic:
|
if self.non_pic:
|
||||||
self.non_pic = 'TEXTREL' in res[1]
|
self.non_pic = 'TEXTREL' in res[1]
|
||||||
|
|
||||||
@@ -254,6 +266,17 @@
|
@@ -259,6 +271,17 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
bin_info = BinaryInfo(
|
bin_info = BinaryInfo(
|
||||||
pkg, pkgfile.path, fname, is_ar, is_shlib)
|
pkg, pkgfile.path, fname, is_ar, is_shlib)
|
||||||
|
|
||||||
@ -51,7 +53,7 @@
|
|||||||
# so name in library
|
# so name in library
|
||||||
if is_shlib:
|
if is_shlib:
|
||||||
has_lib = True
|
has_lib = True
|
||||||
@@ -485,6 +508,14 @@
|
@@ -509,6 +532,14 @@ with the intended shared libraries only.
|
||||||
'ldd-failed',
|
'ldd-failed',
|
||||||
'''Executing ldd on this file failed, all checks could not be run.''',
|
'''Executing ldd on this file failed, all checks could not be run.''',
|
||||||
|
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
--- FilesCheck.py
|
--- FilesCheck.py
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
|
@@ -392,7 +392,7 @@
|
||||||
|
is_kernel_package:
|
||||||
|
printError(pkg, "kernel-modules-not-in-kernel-packages", f)
|
||||||
|
|
||||||
|
- if tmp_regex.search(f):
|
||||||
|
+ if tmp_regex.search(f) and f not in ghost_files:
|
||||||
|
printError(pkg, 'dir-or-file-in-tmp', f)
|
||||||
|
elif f.startswith('/mnt/'):
|
||||||
|
printError(pkg, 'dir-or-file-in-mnt', f)
|
||||||
@@ -402,6 +402,8 @@
|
@@ -402,6 +402,8 @@
|
||||||
printError(pkg, 'dir-or-file-in-usr-local', f)
|
printError(pkg, 'dir-or-file-in-usr-local', f)
|
||||||
elif f.startswith('/var/local/'):
|
elif f.startswith('/var/local/'):
|
||||||
@ -9,7 +18,7 @@
|
|||||||
elif sub_bin_regex.search(f):
|
elif sub_bin_regex.search(f):
|
||||||
printError(pkg, 'subdir-in-bin', f)
|
printError(pkg, 'subdir-in-bin', f)
|
||||||
elif f.startswith('/home/'):
|
elif f.startswith('/home/'):
|
||||||
@@ -945,6 +947,12 @@
|
@@ -945,6 +948,12 @@
|
||||||
'''A file in the package is located in /var/local. It's not permitted
|
'''A file in the package is located in /var/local. It's not permitted
|
||||||
for packages to install files in this directory.''',
|
for packages to install files in this directory.''',
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -27,65 +27,114 @@ STANDARD_DIRS = (
|
@@ -28,65 +28,114 @@ STANDARD_DIRS = (
|
||||||
'/',
|
'/',
|
||||||
'/bin',
|
'/bin',
|
||||||
'/boot',
|
'/boot',
|
||||||
@ -144,7 +144,7 @@ Index: FilesCheck.py
|
|||||||
'/usr/local/lib',
|
'/usr/local/lib',
|
||||||
'/usr/local/lib64',
|
'/usr/local/lib64',
|
||||||
'/usr/local/man',
|
'/usr/local/man',
|
||||||
@@ -101,24 +150,415 @@ STANDARD_DIRS = (
|
@@ -102,24 +151,415 @@ STANDARD_DIRS = (
|
||||||
'/usr/local/man/mann',
|
'/usr/local/man/mann',
|
||||||
'/usr/local/sbin',
|
'/usr/local/sbin',
|
||||||
'/usr/local/share',
|
'/usr/local/share',
|
||||||
@ -571,7 +571,7 @@ Index: FilesCheck.py
|
|||||||
'/usr/share/man',
|
'/usr/share/man',
|
||||||
'/usr/share/man/man1',
|
'/usr/share/man/man1',
|
||||||
'/usr/share/man/man2',
|
'/usr/share/man/man2',
|
||||||
@@ -130,28 +570,60 @@ STANDARD_DIRS = (
|
@@ -131,28 +571,60 @@ STANDARD_DIRS = (
|
||||||
'/usr/share/man/man8',
|
'/usr/share/man/man8',
|
||||||
'/usr/share/man/man9',
|
'/usr/share/man/man9',
|
||||||
'/usr/share/man/mann',
|
'/usr/share/man/mann',
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
--- BinariesCheck.py
|
Index: BinariesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- BinariesCheck.py.orig
|
||||||
+++ BinariesCheck.py
|
+++ BinariesCheck.py
|
||||||
@@ -10,6 +10,7 @@
|
@@ -10,6 +10,7 @@
|
||||||
|
|
||||||
@ -8,7 +10,7 @@
|
|||||||
|
|
||||||
import rpm
|
import rpm
|
||||||
|
|
||||||
@@ -247,7 +248,9 @@
|
@@ -264,7 +265,9 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
|
|
||||||
# stripped ?
|
# stripped ?
|
||||||
if not is_ocaml_native and not unstrippable.search(fname):
|
if not is_ocaml_native and not unstrippable.search(fname):
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- SpecCheck.py
|
Index: SpecCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- SpecCheck.py.orig
|
||||||
+++ SpecCheck.py
|
+++ SpecCheck.py
|
||||||
@@ -421,6 +421,10 @@
|
@@ -444,6 +444,10 @@ class SpecCheck(AbstractCheck.AbstractCh
|
||||||
printWarning(pkg, 'comparison-operator-in-deptoken',
|
printWarning(pkg, 'comparison-operator-in-deptoken',
|
||||||
conf)
|
conf)
|
||||||
|
|
||||||
@ -11,7 +13,7 @@
|
|||||||
if current_section == 'changelog':
|
if current_section == 'changelog':
|
||||||
for match in AbstractCheck.macro_regex.findall(line):
|
for match in AbstractCheck.macro_regex.findall(line):
|
||||||
res = re.match('%+', match)
|
res = re.match('%+', match)
|
||||||
@@ -684,6 +688,14 @@
|
@@ -711,6 +715,14 @@ may break short circuit builds.''',
|
||||||
'''Make check or other automated regression test should be run in %check, as
|
'''Make check or other automated regression test should be run in %check, as
|
||||||
they can be disabled with a rpm macro for short circuiting purposes.''',
|
they can be disabled with a rpm macro for short circuiting purposes.''',
|
||||||
|
|
||||||
|
@ -1,6 +1,16 @@
|
|||||||
--- TagsCheck.py
|
Index: TagsCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -603,10 +603,12 @@
|
@@ -414,6 +414,7 @@ lib_devel_number_regex = re.compile('^li
|
||||||
|
invalid_url_regex = re.compile(Config.getOption('InvalidURL'), re.IGNORECASE)
|
||||||
|
lib_package_regex = re.compile('(?:^(?:compat-)?lib.*?(\.so.*)?|libs?[\d-]*)$', re.IGNORECASE)
|
||||||
|
leading_space_regex = re.compile('^\s+')
|
||||||
|
+pkg_config_regex = re.compile('^/usr/(?:lib\d*|share)/pkgconfig/')
|
||||||
|
license_regex = re.compile('\(([^)]+)\)|\s(?:and|or)\s')
|
||||||
|
invalid_version_regex = re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE)
|
||||||
|
# () are here for grouping purpose in the regexp
|
||||||
|
@@ -607,10 +608,12 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
base = is_devel.group(1)
|
base = is_devel.group(1)
|
||||||
dep = None
|
dep = None
|
||||||
has_so = False
|
has_so = False
|
||||||
@ -9,12 +19,12 @@
|
|||||||
if fname.endswith('.so'):
|
if fname.endswith('.so'):
|
||||||
has_so = True
|
has_so = True
|
||||||
- break
|
- break
|
||||||
+ if fname.endswith('.pc'):
|
+ if pkg_config_regex.match(fname) and fname.endswith('.pc'):
|
||||||
+ has_pc = True
|
+ has_pc = True
|
||||||
if has_so:
|
if has_so:
|
||||||
base_or_libs = base + '/' + base + '-libs/lib' + base
|
base_or_libs = base + '/' + base + '-libs/lib' + base
|
||||||
# try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)")
|
# try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)")
|
||||||
@@ -643,6 +645,15 @@
|
@@ -647,6 +650,15 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
if prov not in (x[0] for x in pkg.provides()):
|
if prov not in (x[0] for x in pkg.provides()):
|
||||||
printWarning(pkg, 'no-provides', prov)
|
printWarning(pkg, 'no-provides', prov)
|
||||||
|
|
||||||
@ -30,7 +40,7 @@
|
|||||||
# List of words to ignore in spell check
|
# List of words to ignore in spell check
|
||||||
ignored_words = [x.split('/')[-1] for x in pkg.files()]
|
ignored_words = [x.split('/')[-1] for x in pkg.files()]
|
||||||
|
|
||||||
@@ -1049,6 +1060,11 @@
|
@@ -1059,6 +1071,11 @@ instead or require a file in bin or /etc
|
||||||
'no-url-tag',
|
'no-url-tag',
|
||||||
'''The URL tag is missing.''',
|
'''The URL tag is missing.''',
|
||||||
|
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
--- TagsCheck.py
|
Index: TagsCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -610,10 +610,10 @@
|
@@ -615,10 +615,10 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
if fname.endswith('.pc'):
|
if pkg_config_regex.match(fname) and fname.endswith('.pc'):
|
||||||
has_pc = True
|
has_pc = True
|
||||||
if has_so:
|
if has_so:
|
||||||
- base_or_libs = base + '/' + base + '-libs/lib' + base
|
- base_or_libs = base + '/' + base + '-libs/lib' + base
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: SpecCheck.py
|
Index: SpecCheck.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- SpecCheck.py.orig 2010-02-19 12:02:55.000000000 +0100
|
--- SpecCheck.py.orig
|
||||||
+++ SpecCheck.py 2010-02-19 12:05:18.000000000 +0100
|
+++ SpecCheck.py
|
||||||
@@ -50,6 +50,7 @@ libdir_regex = re.compile('%{?_lib(?:dir
|
@@ -56,6 +56,7 @@ libdir_regex = re.compile('%{?_lib(?:dir
|
||||||
comment_or_empty_regex = re.compile('^\s*(#|$)')
|
comment_or_empty_regex = re.compile('^\s*(#|$)')
|
||||||
defattr_regex = re.compile('^\s*%defattr\\b')
|
defattr_regex = re.compile('^\s*%defattr\\b')
|
||||||
attr_regex = re.compile('^\s*%attr\\b')
|
attr_regex = re.compile('^\s*%attr\\b')
|
||||||
@ -10,7 +10,7 @@ Index: SpecCheck.py
|
|||||||
section_regexs = dict(
|
section_regexs = dict(
|
||||||
([x, re.compile('^%' + x + '(?:\s|$)')]
|
([x, re.compile('^%' + x + '(?:\s|$)')]
|
||||||
for x in ('build', 'changelog', 'check', 'clean', 'description', 'files',
|
for x in ('build', 'changelog', 'check', 'clean', 'description', 'files',
|
||||||
@@ -362,6 +363,12 @@ class SpecCheck(AbstractCheck.AbstractCh
|
@@ -386,6 +387,12 @@ class SpecCheck(AbstractCheck.AbstractCh
|
||||||
if res:
|
if res:
|
||||||
package_noarch[current_package] = True
|
package_noarch[current_package] = True
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ Index: SpecCheck.py
|
|||||||
res = prereq_regex.search(line)
|
res = prereq_regex.search(line)
|
||||||
if res:
|
if res:
|
||||||
printError(pkg, 'prereq-use', res.group(2))
|
printError(pkg, 'prereq-use', res.group(2))
|
||||||
@@ -677,6 +684,15 @@ set which may result in security issues
|
@@ -749,6 +756,15 @@ set which may result in security issues
|
||||||
depending on the system where the package is built. Add default attributes
|
depending on the system where the package is built. Add default attributes
|
||||||
using %defattr before it in the %files section, or use per line %attr's.''',
|
using %defattr before it in the %files section, or use per line %attr's.''',
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- BinariesCheck.py
|
Index: BinariesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- BinariesCheck.py.orig
|
||||||
+++ BinariesCheck.py
|
+++ BinariesCheck.py
|
||||||
@@ -178,6 +178,7 @@
|
@@ -190,6 +190,7 @@ usr_lib_exception_regex = re.compile(Con
|
||||||
srcname_regex = re.compile('(.*?)-[0-9]')
|
srcname_regex = re.compile('(.*?)-[0-9]')
|
||||||
invalid_dir_ref_regex = re.compile('/(home|tmp)(\W|$)')
|
invalid_dir_ref_regex = re.compile('/(home|tmp)(\W|$)')
|
||||||
ocaml_mixed_regex = re.compile('^Caml1999X0\d\d$')
|
ocaml_mixed_regex = re.compile('^Caml1999X0\d\d$')
|
||||||
@ -8,7 +10,7 @@
|
|||||||
|
|
||||||
def dir_base(path):
|
def dir_base(path):
|
||||||
res = path_regex.search(path)
|
res = path_regex.search(path)
|
||||||
@@ -238,7 +239,7 @@
|
@@ -250,7 +251,7 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
fname)
|
fname)
|
||||||
else:
|
else:
|
||||||
# in /usr/share ?
|
# in /usr/share ?
|
||||||
|
@ -3,7 +3,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -662,7 +662,7 @@ ldconfig_regex = re.compile('^[^#]*ldcon
|
@@ -663,7 +663,7 @@ ldconfig_regex = re.compile('^[^#]*ldcon
|
||||||
depmod_regex = re.compile('^[^#]*depmod', re.MULTILINE)
|
depmod_regex = re.compile('^[^#]*depmod', re.MULTILINE)
|
||||||
install_info_regex = re.compile('^[^#]*install-info', re.MULTILINE)
|
install_info_regex = re.compile('^[^#]*install-info', re.MULTILINE)
|
||||||
perl_temp_file_regex = re.compile('.*perl.*/(\.packlist|perllocal\.pod)$')
|
perl_temp_file_regex = re.compile('.*perl.*/(\.packlist|perllocal\.pod)$')
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- TagsCheck.py
|
Index: TagsCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -739,7 +739,7 @@
|
@@ -774,7 +774,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
printWarning(pkg, 'no-url-tag')
|
printWarning(pkg, 'no-url-tag')
|
||||||
|
|
||||||
obs_names = [x[0] for x in pkg.obsoletes()]
|
obs_names = [x[0] for x in pkg.obsoletes()]
|
||||||
|
Loading…
Reference in New Issue
Block a user