forked from pool/rpmlint
- update to 1.5:
* New Homepage * Plenty of new checks - add compressed-backup-regex.diff - remove python3_magic_number_fix.diff OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=189
This commit is contained in:
parent
740e73a400
commit
15bad7fc73
@ -2,7 +2,7 @@ Index: Pkg.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- Pkg.py.orig
|
--- Pkg.py.orig
|
||||||
+++ Pkg.py
|
+++ Pkg.py
|
||||||
@@ -426,6 +426,10 @@ class Pkg:
|
@@ -424,6 +424,10 @@ class Pkg:
|
||||||
self._missingok_files = None
|
self._missingok_files = None
|
||||||
self._files = None
|
self._files = None
|
||||||
self._requires = None
|
self._requires = None
|
||||||
@ -13,7 +13,7 @@ Index: Pkg.py
|
|||||||
self._req_names = -1
|
self._req_names = -1
|
||||||
|
|
||||||
if header:
|
if header:
|
||||||
@@ -673,6 +677,22 @@ class Pkg:
|
@@ -670,6 +674,22 @@ class Pkg:
|
||||||
self._gatherDepInfo()
|
self._gatherDepInfo()
|
||||||
return self._requires
|
return self._requires
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ Index: Pkg.py
|
|||||||
def prereq(self):
|
def prereq(self):
|
||||||
"""Get package PreReqs as list of
|
"""Get package PreReqs as list of
|
||||||
(name, flags, (epoch, version, release)) tuples."""
|
(name, flags, (epoch, version, release)) tuples."""
|
||||||
@@ -709,7 +729,7 @@ class Pkg:
|
@@ -706,7 +726,7 @@ class Pkg:
|
||||||
|
|
||||||
# internal function to gather dependency info used by the above ones
|
# internal function to gather dependency info used by the above ones
|
||||||
def _gather_aux(self, header, list, nametag, flagstag, versiontag,
|
def _gather_aux(self, header, list, nametag, flagstag, versiontag,
|
||||||
@ -45,7 +45,7 @@ Index: Pkg.py
|
|||||||
names = header[nametag]
|
names = header[nametag]
|
||||||
flags = header[flagstag]
|
flags = header[flagstag]
|
||||||
versions = header[versiontag]
|
versions = header[versiontag]
|
||||||
@@ -720,7 +740,11 @@ class Pkg:
|
@@ -717,7 +737,11 @@ class Pkg:
|
||||||
if prereq is not None and flags[loop] & PREREQ_FLAG:
|
if prereq is not None and flags[loop] & PREREQ_FLAG:
|
||||||
prereq.append((names[loop], flags[loop] & (~PREREQ_FLAG),
|
prereq.append((names[loop], flags[loop] & (~PREREQ_FLAG),
|
||||||
evr))
|
evr))
|
||||||
@ -58,7 +58,7 @@ Index: Pkg.py
|
|||||||
list.append((names[loop], flags[loop], evr))
|
list.append((names[loop], flags[loop], evr))
|
||||||
|
|
||||||
def _gatherDepInfo(self):
|
def _gatherDepInfo(self):
|
||||||
@@ -730,6 +754,10 @@ class Pkg:
|
@@ -727,6 +751,10 @@ class Pkg:
|
||||||
self._provides = []
|
self._provides = []
|
||||||
self._conflicts = []
|
self._conflicts = []
|
||||||
self._obsoletes = []
|
self._obsoletes = []
|
||||||
@ -69,7 +69,7 @@ Index: Pkg.py
|
|||||||
|
|
||||||
self._gather_aux(self.header, self._requires,
|
self._gather_aux(self.header, self._requires,
|
||||||
rpm.RPMTAG_REQUIRENAME,
|
rpm.RPMTAG_REQUIRENAME,
|
||||||
@@ -748,6 +776,30 @@ class Pkg:
|
@@ -745,6 +773,30 @@ class Pkg:
|
||||||
rpm.RPMTAG_OBSOLETENAME,
|
rpm.RPMTAG_OBSOLETENAME,
|
||||||
rpm.RPMTAG_OBSOLETEFLAGS,
|
rpm.RPMTAG_OBSOLETEFLAGS,
|
||||||
rpm.RPMTAG_OBSOLETEVERSION)
|
rpm.RPMTAG_OBSOLETEVERSION)
|
||||||
@ -100,7 +100,7 @@ Index: Pkg.py
|
|||||||
|
|
||||||
def scriptprog(self, which):
|
def scriptprog(self, which):
|
||||||
"""Get the specified script interpreter as a string.
|
"""Get the specified script interpreter as a string.
|
||||||
@@ -761,6 +813,7 @@ class Pkg:
|
@@ -758,6 +810,7 @@ class Pkg:
|
||||||
prog = " ".join(prog)
|
prog = " ".join(prog)
|
||||||
return prog
|
return prog
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -654,7 +654,7 @@ buildconfig_rpath_regex = re.compile('(?
|
@@ -607,7 +607,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
|
||||||
@@ -1697,7 +1697,10 @@ executed.''',
|
@@ -1667,7 +1667,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
|
||||||
@@ -631,7 +631,7 @@ versions you can ignore this warning.'''
|
@@ -647,7 +647,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
|
||||||
|
@ -2,7 +2,7 @@ Index: SpecCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- SpecCheck.py.orig
|
--- SpecCheck.py.orig
|
||||||
+++ SpecCheck.py
|
+++ SpecCheck.py
|
||||||
@@ -224,7 +224,9 @@ class SpecCheck(AbstractCheck.AbstractCh
|
@@ -234,7 +234,9 @@ class SpecCheck(AbstractCheck.AbstractCh
|
||||||
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
13
compressed-backup-regex.diff
Normal file
13
compressed-backup-regex.diff
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Index: FilesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- FilesCheck.py.orig
|
||||||
|
+++ FilesCheck.py
|
||||||
|
@@ -591,7 +591,7 @@ DEFAULT_STANDARD_GROUPS = ('root', 'bin'
|
||||||
|
|
||||||
|
tmp_regex = re.compile('^(/var|/usr)?/tmp/')
|
||||||
|
sub_bin_regex = re.compile('^(/usr)?/s?bin/\S+/')
|
||||||
|
-backup_regex = re.compile('(~|\#[^/]+\#|\.orig|\.rej)$')
|
||||||
|
+backup_regex = re.compile('(~|\#[^/]+\#|\.orig|\.orig\.gz|\.rej)$')
|
||||||
|
compr_regex = re.compile('\.(gz|z|Z|zip|bz2|lzma|xz)$')
|
||||||
|
absolute_regex = re.compile('^/([^/]+)')
|
||||||
|
absolute2_regex = re.compile('^/?([^/]+)')
|
@ -1,10 +1,10 @@
|
|||||||
# Confusing message. The problem is not that the file does not end
|
# Confusing message. The problem is not that the file does not end
|
||||||
# with ".spec", but that there is a mismatch of specname and pkg name.
|
# with ".spec", but that there is a mismatch of specname and pkg name.
|
||||||
Index: rpmlint-1.4/SpecCheck.py
|
Index: rpmlint-1.5/SpecCheck.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- rpmlint-1.4.orig/SpecCheck.py
|
--- rpmlint-1.5.orig/SpecCheck.py
|
||||||
+++ rpmlint-1.4/SpecCheck.py
|
+++ rpmlint-1.5/SpecCheck.py
|
||||||
@@ -605,8 +605,8 @@ addDetails(
|
@@ -621,8 +621,8 @@ addDetails(
|
||||||
SPEC file to build a valid RPM package.''',
|
SPEC file to build a valid RPM package.''',
|
||||||
|
|
||||||
'invalid-spec-name',
|
'invalid-spec-name',
|
||||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- TagsCheck.py.orig
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -704,6 +704,9 @@ class TagsCheck(AbstractCheck.AbstractCh
|
@@ -705,6 +705,9 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
if not description:
|
if not description:
|
||||||
printError(pkg, 'no-description-tag')
|
printError(pkg, 'no-description-tag')
|
||||||
else:
|
else:
|
||||||
@ -12,7 +12,7 @@ Index: TagsCheck.py
|
|||||||
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:
|
||||||
@@ -987,6 +990,10 @@ Name tag.''',
|
@@ -988,6 +991,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
|
||||||
@@ -842,6 +842,10 @@ class FilesCheck(AbstractCheck.AbstractC
|
@@ -806,6 +806,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
|
||||||
@@ -648,6 +648,7 @@ bin_regex = re.compile('^/(?:usr/(?:s?bi
|
@@ -601,6 +601,7 @@ bin_regex = re.compile('^/(?:usr/(?:s?bi
|
||||||
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$')
|
||||||
@@ -1199,7 +1200,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
@@ -1158,7 +1159,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/') and f not in config_files and \
|
elif f.startswith('/etc/') and f not in config_files and \
|
||||||
f not in ghost_files:
|
f not in ghost_files:
|
||||||
@@ -1571,7 +1572,10 @@ included in your package.''',
|
@@ -1541,7 +1542,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: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -1217,7 +1217,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
@@ -1176,7 +1176,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
if nonexec_file and not docdir_examples_regex.search(f):
|
if nonexec_file and not docdir_examples_regex.search(f):
|
||||||
printWarning(pkg, 'spurious-executable-perm', f)
|
printWarning(pkg, 'spurious-executable-perm', f)
|
||||||
elif f.startswith('/etc/') and f not in config_files and \
|
elif f.startswith('/etc/') and f not in config_files and \
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- Filter.py
|
Index: Filter.py
|
||||||
|
===================================================================
|
||||||
|
--- Filter.py.orig
|
||||||
+++ Filter.py
|
+++ Filter.py
|
||||||
@@ -24,12 +24,8 @@
|
@@ -23,14 +23,8 @@ _diagnostic = list()
|
||||||
_badness_score = 0
|
_badness_score = 0
|
||||||
printed_messages = { "I": 0, "W": 0, "E": 0 }
|
printed_messages = { "I": 0, "W": 0, "E": 0 }
|
||||||
|
|
||||||
@ -9,7 +11,9 @@
|
|||||||
- print(s)
|
- print(s)
|
||||||
-else:
|
-else:
|
||||||
- def __print(s):
|
- def __print(s):
|
||||||
- print(s.encode(locale.getpreferredencoding(), "replace"))
|
- if isinstance(s, unicode):
|
||||||
|
- s = s.encode(locale.getpreferredencoding(), "replace")
|
||||||
|
- print(s)
|
||||||
+def __print(s):
|
+def __print(s):
|
||||||
+ print(s)
|
+ print(s)
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- TagsCheck.py.orig
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -421,6 +421,7 @@ invalid_version_regex = re.compile('([0-
|
@@ -420,6 +420,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,17 +10,17 @@ Index: TagsCheck.py
|
|||||||
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)
|
||||||
max_line_len = Config.getOption('MaxLineLength', 79)
|
max_line_len = Config.getOption('MaxLineLength', 79)
|
||||||
@@ -603,6 +604,9 @@ class TagsCheck(AbstractCheck.AbstractCh
|
@@ -602,6 +603,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])
|
||||||
|
|
||||||
+ if d[0].startswith('/') and not valid_filedep_regex.search(d[0]):
|
+ if d[0].startswith('/') and not valid_filedep_regex.search(d[0]):
|
||||||
+ printWarning(pkg, 'invalid-filepath-dependency', d[0])
|
+ printWarning(pkg, 'invalid-filepath-dependency', d[0])
|
||||||
+
|
+
|
||||||
if not devel_depend and not is_devel and not is_source and \
|
if is_source:
|
||||||
FilesCheck.devel_regex.search(d[0]):
|
if lib_devel_number_regex.search(d[0]):
|
||||||
printError(pkg, 'devel-dependency', d[0])
|
printError(pkg, 'invalid-build-requires', d[0])
|
||||||
@@ -1089,6 +1093,12 @@ explicit Requires: tags.''',
|
@@ -1090,6 +1094,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,12 +2,12 @@ Index: BinariesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- BinariesCheck.py.orig
|
--- BinariesCheck.py.orig
|
||||||
+++ BinariesCheck.py
|
+++ BinariesCheck.py
|
||||||
@@ -253,8 +253,19 @@ class BinariesCheck(AbstractCheck.Abstra
|
@@ -309,8 +309,19 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
is_elf = 'ELF' in pkgfile.magic
|
|
||||||
is_ar = 'current ar archive' in pkgfile.magic
|
is_ar = 'current ar archive' in pkgfile.magic
|
||||||
is_ocaml_native = 'Objective caml native' in pkgfile.magic
|
is_ocaml_native = 'Objective caml native' in pkgfile.magic
|
||||||
|
is_lua_bytecode = 'Lua bytecode' in pkgfile.magic
|
||||||
+ is_shell = "shell script" in pkgfile.magic
|
+ is_shell = "shell script" in pkgfile.magic
|
||||||
is_binary = is_elf or is_ar or is_ocaml_native
|
is_binary = is_elf or is_ar or is_ocaml_native or is_lua_bytecode
|
||||||
|
|
||||||
+ if is_shell:
|
+ if is_shell:
|
||||||
+ count= 0
|
+ count= 0
|
||||||
@ -22,7 +22,7 @@ Index: BinariesCheck.py
|
|||||||
if not is_binary:
|
if not is_binary:
|
||||||
if reference_regex.search(fname):
|
if reference_regex.search(fname):
|
||||||
lines = pkg.grep(invalid_dir_ref_regex, fname)
|
lines = pkg.grep(invalid_dir_ref_regex, fname)
|
||||||
@@ -502,6 +513,15 @@ recompiled separately from the static li
|
@@ -568,6 +579,15 @@ recompiled separately from the static li
|
||||||
Another common mistake that causes this problem is linking with
|
Another common mistake that causes this problem is linking with
|
||||||
``gcc -Wl,-shared'' instead of ``gcc -shared''.''',
|
``gcc -Wl,-shared'' instead of ``gcc -shared''.''',
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: Filter.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- Filter.py.orig
|
--- Filter.py.orig
|
||||||
+++ Filter.py
|
+++ Filter.py
|
||||||
@@ -112,7 +112,7 @@ def printAllReasons():
|
@@ -113,7 +113,7 @@ def printAllReasons():
|
||||||
if len(last_reason):
|
if len(last_reason):
|
||||||
printDescriptions(last_reason)
|
printDescriptions(last_reason)
|
||||||
last_reason = reason
|
last_reason = reason
|
||||||
@ -15,7 +15,7 @@ Index: rpmlint
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- rpmlint.orig
|
--- rpmlint.orig
|
||||||
+++ rpmlint
|
+++ rpmlint
|
||||||
@@ -212,7 +212,7 @@ def main():
|
@@ -211,7 +211,7 @@ def main():
|
||||||
% (packages_checked, specfiles_checked,
|
% (packages_checked, specfiles_checked,
|
||||||
printed_messages["E"], printed_messages["W"])
|
printed_messages["E"], printed_messages["W"])
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -859,7 +859,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
@@ -823,7 +823,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
debuginfo_srcs = False
|
debuginfo_srcs = False
|
||||||
debuginfo_debugs = False
|
debuginfo_debugs = False
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: BinariesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- BinariesCheck.py.orig
|
--- BinariesCheck.py.orig
|
||||||
+++ BinariesCheck.py
|
+++ BinariesCheck.py
|
||||||
@@ -234,6 +234,7 @@ class BinariesCheck(AbstractCheck.Abstra
|
@@ -289,6 +289,7 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
binary = False
|
binary = False
|
||||||
binary_in_usr_lib = False
|
binary_in_usr_lib = False
|
||||||
has_usr_lib_file = False
|
has_usr_lib_file = False
|
||||||
@ -10,7 +10,7 @@ Index: BinariesCheck.py
|
|||||||
|
|
||||||
multi_pkg = False
|
multi_pkg = False
|
||||||
res = srcname_regex.search(pkg[rpm.RPMTAG_SOURCERPM] or '')
|
res = srcname_regex.search(pkg[rpm.RPMTAG_SOURCERPM] or '')
|
||||||
@@ -250,6 +251,10 @@ class BinariesCheck(AbstractCheck.Abstra
|
@@ -305,6 +306,10 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
# only-non-binary-in-usr-lib false positives
|
# only-non-binary-in-usr-lib false positives
|
||||||
binary_in_usr_lib = True
|
binary_in_usr_lib = True
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ Index: BinariesCheck.py
|
|||||||
is_elf = 'ELF' in pkgfile.magic
|
is_elf = 'ELF' in pkgfile.magic
|
||||||
is_ar = 'current ar archive' in pkgfile.magic
|
is_ar = 'current ar archive' in pkgfile.magic
|
||||||
is_ocaml_native = 'Objective caml native' in pkgfile.magic
|
is_ocaml_native = 'Objective caml native' in pkgfile.magic
|
||||||
@@ -464,9 +469,12 @@ class BinariesCheck(AbstractCheck.Abstra
|
@@ -530,9 +535,12 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
if version and version != -1 and version not in pkg.name:
|
if version and version != -1 and version not in pkg.name:
|
||||||
printError(pkg, 'incoherent-version-in-name', version)
|
printError(pkg, 'incoherent-version-in-name', version)
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ Index: BinariesCheck.py
|
|||||||
if has_usr_lib_file and not binary_in_usr_lib:
|
if has_usr_lib_file and not binary_in_usr_lib:
|
||||||
printWarning(pkg, 'only-non-binary-in-usr-lib')
|
printWarning(pkg, 'only-non-binary-in-usr-lib')
|
||||||
|
|
||||||
@@ -490,6 +498,11 @@ FHS and the FSSTND forbid this.''',
|
@@ -556,6 +564,11 @@ FHS and the FSSTND forbid this.''',
|
||||||
# 'non-sparc32-binary',
|
# 'non-sparc32-binary',
|
||||||
# '',
|
# '',
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: InitScriptCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- InitScriptCheck.py.orig
|
--- InitScriptCheck.py.orig
|
||||||
+++ InitScriptCheck.py
|
+++ InitScriptCheck.py
|
||||||
@@ -18,7 +18,7 @@ from Filter import addDetails, printErro
|
@@ -17,7 +17,7 @@ from Filter import addDetails, printErro
|
||||||
import AbstractCheck
|
import AbstractCheck
|
||||||
import Config
|
import Config
|
||||||
import Pkg
|
import Pkg
|
||||||
@ -11,7 +11,7 @@ Index: InitScriptCheck.py
|
|||||||
|
|
||||||
chkconfig_content_regex = re.compile('^\s*#\s*chkconfig:\s*([-0-9]+)\s+[-0-9]+\s+[-0-9]+')
|
chkconfig_content_regex = re.compile('^\s*#\s*chkconfig:\s*([-0-9]+)\s+[-0-9]+\s+[-0-9]+')
|
||||||
subsys_regex = re.compile('/var/lock/subsys/([^/"\'\n\s;&|]+)', re.MULTILINE)
|
subsys_regex = re.compile('/var/lock/subsys/([^/"\'\n\s;&|]+)', re.MULTILINE)
|
||||||
@@ -64,6 +64,9 @@ class InitScriptCheck(AbstractCheck.Abst
|
@@ -63,6 +63,9 @@ class InitScriptCheck(AbstractCheck.Abst
|
||||||
not fname.startswith('/etc/rc.d/init.d/'):
|
not fname.startswith('/etc/rc.d/init.d/'):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -1,22 +0,0 @@
|
|||||||
Index: FilesCheck.py
|
|
||||||
===================================================================
|
|
||||||
--- FilesCheck.py.orig
|
|
||||||
+++ FilesCheck.py
|
|
||||||
@@ -753,7 +753,7 @@ def peek(filename, pkg, length=1024):
|
|
||||||
istext = float(len(t))/len(chunk) <= 0.30
|
|
||||||
return (chunk, istext)
|
|
||||||
|
|
||||||
-# See Python/import.c (in the trunk and py3k branches) for a full list of
|
|
||||||
+# See Python/import.c (in the default and 2.x branches) for a full list of
|
|
||||||
# the values here.
|
|
||||||
_python_magic_values = {
|
|
||||||
'2.2': 60717,
|
|
||||||
@@ -765,7 +765,7 @@ _python_magic_values = {
|
|
||||||
'3.0': 3130,
|
|
||||||
'3.1': 3150,
|
|
||||||
'3.2': 3180,
|
|
||||||
- '3.3': 3190,
|
|
||||||
+ '3.3': 3230,
|
|
||||||
}
|
|
||||||
|
|
||||||
def get_expected_pyc_magic(path):
|
|
@ -8,7 +8,7 @@ Index: TagsCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- TagsCheck.py.orig
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -433,15 +433,6 @@ so_dep_regex = re.compile(r'\.so(\.[0-9a
|
@@ -432,15 +432,6 @@ so_dep_regex = re.compile(r'\.so(\.[0-9a
|
||||||
# we assume that no rpm packages existed before rpm itself existed...
|
# we assume that no rpm packages existed before rpm itself existed...
|
||||||
oldest_changelog_timestamp = calendar.timegm(time.strptime("1995-01-01", "%Y-%m-%d"))
|
oldest_changelog_timestamp = calendar.timegm(time.strptime("1995-01-01", "%Y-%m-%d"))
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ Index: TagsCheck.py
|
|||||||
_enchant_checkers = {}
|
_enchant_checkers = {}
|
||||||
def spell_check(pkg, str, fmt, lang, ignored):
|
def spell_check(pkg, str, fmt, lang, ignored):
|
||||||
|
|
||||||
@@ -856,30 +847,12 @@ class TagsCheck(AbstractCheck.AbstractCh
|
@@ -857,30 +848,12 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
(apply(Pkg.formatRequire, obs),
|
(apply(Pkg.formatRequire, obs),
|
||||||
apply(Pkg.formatRequire, prov)))
|
apply(Pkg.formatRequire, prov)))
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- TagsCheck.py.orig
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -714,6 +714,8 @@ class TagsCheck(AbstractCheck.AbstractCh
|
@@ -715,6 +715,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')
|
||||||
@ -11,7 +11,7 @@ Index: TagsCheck.py
|
|||||||
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)
|
||||||
|
|
||||||
@@ -1026,6 +1028,10 @@ won't fool the specfile parser, and rebu
|
@@ -1027,6 +1029,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,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:af4e4e8304c7209e95b9100f7592aca0d713b542dcb6c0629395655716a287f6
|
|
||||||
size 116600
|
|
3
rpmlint-1.5.tar.xz
Normal file
3
rpmlint-1.5.tar.xz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8268cede9397b263e51933a514db0f9a8426867274d495d1e87ef4c81b2c1e18
|
||||||
|
size 126048
|
@ -2,7 +2,7 @@ Index: Pkg.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- Pkg.py.orig
|
--- Pkg.py.orig
|
||||||
+++ Pkg.py
|
+++ Pkg.py
|
||||||
@@ -493,7 +493,7 @@ class Pkg:
|
@@ -490,7 +490,7 @@ class Pkg:
|
||||||
dir = self.dirname)
|
dir = self.dirname)
|
||||||
# TODO: better shell escaping or sequence based command invocation
|
# TODO: better shell escaping or sequence based command invocation
|
||||||
command_str = \
|
command_str = \
|
||||||
|
@ -15,7 +15,7 @@ Index: I18NCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- I18NCheck.py.orig
|
--- I18NCheck.py.orig
|
||||||
+++ I18NCheck.py
|
+++ I18NCheck.py
|
||||||
@@ -31,7 +31,7 @@ INCORRECT_LOCALES = {
|
@@ -30,7 +30,7 @@ INCORRECT_LOCALES = {
|
||||||
'en_UK': 'en_GB'}
|
'en_UK': 'en_GB'}
|
||||||
|
|
||||||
package_regex = re.compile('-(' + '|'.join(LANGUAGES) + ')$')
|
package_regex = re.compile('-(' + '|'.join(LANGUAGES) + ')$')
|
||||||
|
@ -18,6 +18,14 @@ Thu May 30 11:32:57 UTC 2013 - tchvatal@suse.com
|
|||||||
|
|
||||||
- Add group 'locate' for mlocate package
|
- Add group 'locate' for mlocate package
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 28 12:10:33 UTC 2013 - dmueller@suse.com
|
||||||
|
|
||||||
|
- update to 1.5:
|
||||||
|
* New Homepage
|
||||||
|
* Plenty of new checks
|
||||||
|
- add compressed-backup-regex.diff
|
||||||
|
- remove python3_magic_number_fix.diff
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon May 20 19:48:39 UTC 2013 - andreas.stieger@gmx.de
|
Mon May 20 19:48:39 UTC 2013 - andreas.stieger@gmx.de
|
||||||
|
|
||||||
|
11
rpmlint.spec
11
rpmlint.spec
@ -25,9 +25,9 @@ BuildRequires: xz
|
|||||||
Summary: Rpm correctness checker
|
Summary: Rpm correctness checker
|
||||||
License: GPL-2.0+
|
License: GPL-2.0+
|
||||||
Group: System/Packages
|
Group: System/Packages
|
||||||
Version: 1.4
|
Version: 1.5
|
||||||
Release: 0
|
Release: 0
|
||||||
Source0: http://rpmlint.zarb.org/download/rpmlint-%{version}.tar.xz
|
Source0: https://downloads.sourceforge.net/project/rpmlint/rpmlint-%{version}.tar.xz
|
||||||
Source1: rpmlint-checks-master.tar.gz
|
Source1: rpmlint-checks-master.tar.gz
|
||||||
Source2: config
|
Source2: config
|
||||||
Source3: config.in
|
Source3: config.in
|
||||||
@ -35,7 +35,7 @@ Source10: rpmgroups.config
|
|||||||
Source11: pie.config
|
Source11: pie.config
|
||||||
Source12: licenses.config
|
Source12: licenses.config
|
||||||
Source100: syntax-validator.py
|
Source100: syntax-validator.py
|
||||||
Url: http://rpmlint.zarb.org/
|
Url: https://sourceforge.net/projects/rpmlint/
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Requires: /usr/bin/readelf
|
Requires: /usr/bin/readelf
|
||||||
Requires: bash
|
Requires: bash
|
||||||
@ -114,10 +114,10 @@ Patch81: suse-whitelist-opensuse.diff
|
|||||||
Patch84: extend-suse-conffiles-check.diff
|
Patch84: extend-suse-conffiles-check.diff
|
||||||
Patch85: suse-changelog.patch
|
Patch85: suse-changelog.patch
|
||||||
Patch86: suse-rclink-check.diff
|
Patch86: suse-rclink-check.diff
|
||||||
|
Patch87: compressed-backup-regex.diff
|
||||||
# accepted upstream
|
# accepted upstream
|
||||||
Patch88: suse-speccheck-utf8.diff
|
Patch88: suse-speccheck-utf8.diff
|
||||||
Patch89: suse-python-abi-check.diff
|
Patch89: suse-python-abi-check.diff
|
||||||
Patch90: python3_magic_number_fix.diff
|
|
||||||
# PATCH-FIX-OPENSUSE: saschpe@suse.de - Don't complain about missing man-pages for rc-scripts
|
# PATCH-FIX-OPENSUSE: saschpe@suse.de - Don't complain about missing man-pages for rc-scripts
|
||||||
Patch91: suse-manpages-for-rc-scripts.patch
|
Patch91: suse-manpages-for-rc-scripts.patch
|
||||||
|
|
||||||
@ -191,10 +191,9 @@ source packages can be checked.
|
|||||||
%patch84
|
%patch84
|
||||||
%patch85
|
%patch85
|
||||||
%patch86
|
%patch86
|
||||||
#patch87 -p1
|
%patch87
|
||||||
%patch88
|
%patch88
|
||||||
%patch89
|
%patch89
|
||||||
%patch90
|
|
||||||
%patch91 -p1
|
%patch91 -p1
|
||||||
cp -p %{SOURCE2} .
|
cp -p %{SOURCE2} .
|
||||||
# Only move top-level python files
|
# Only move top-level python files
|
||||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -1249,7 +1249,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
@@ -1219,7 +1219,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
elif interpreter or mode & 0111 != 0 or \
|
elif interpreter or mode & 0111 != 0 or \
|
||||||
script_regex.search(f):
|
script_regex.search(f):
|
||||||
if interpreter:
|
if interpreter:
|
||||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- TagsCheck.py.orig
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -819,6 +819,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
@@ -820,6 +820,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
|
|
||||||
obs_names = [x[0] for x in pkg.obsoletes()]
|
obs_names = [x[0] for x in pkg.obsoletes()]
|
||||||
prov_names = [x[0].split(':/')[0] for x in pkg.provides()]
|
prov_names = [x[0].split(':/')[0] for x in pkg.provides()]
|
||||||
@ -10,7 +10,7 @@ Index: TagsCheck.py
|
|||||||
|
|
||||||
for o in (x for x in obs_names if x not in prov_names):
|
for o in (x for x in obs_names if x not in prov_names):
|
||||||
printWarning(pkg, 'obsolete-not-provided', o)
|
printWarning(pkg, 'obsolete-not-provided', o)
|
||||||
@@ -830,6 +831,8 @@ class TagsCheck(AbstractCheck.AbstractCh
|
@@ -831,6 +832,8 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
# https://bugzilla.redhat.com/460872
|
# https://bugzilla.redhat.com/460872
|
||||||
useless_provides = []
|
useless_provides = []
|
||||||
for p in prov_names:
|
for p in prov_names:
|
||||||
@ -19,7 +19,7 @@ Index: TagsCheck.py
|
|||||||
if prov_names.count(p) != 1 and p not in useless_provides:
|
if prov_names.count(p) != 1 and p not in useless_provides:
|
||||||
useless_provides.append(p)
|
useless_provides.append(p)
|
||||||
for p in useless_provides:
|
for p in useless_provides:
|
||||||
@@ -970,6 +973,10 @@ the Release tag.''',
|
@@ -971,6 +974,10 @@ the Release tag.''',
|
||||||
'''There is no Name tag in your package. You have to specify a name using the
|
'''There is no Name tag in your package. You have to specify a name using the
|
||||||
Name tag.''',
|
Name tag.''',
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -681,7 +681,7 @@ manifest_perl_regex = re.compile('^/usr/
|
@@ -634,7 +634,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)))/')
|
||||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -1272,7 +1272,8 @@ class FilesCheck(AbstractCheck.AbstractC
|
@@ -1242,7 +1242,8 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
f.endswith('.la')):
|
f.endswith('.la')):
|
||||||
printError(pkg, 'script-without-shebang', f)
|
printError(pkg, 'script-without-shebang', f)
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- BinariesCheck.py
|
Index: BinariesCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- BinariesCheck.py.orig
|
||||||
+++ BinariesCheck.py
|
+++ BinariesCheck.py
|
||||||
@@ -10,13 +10,15 @@
|
@@ -9,13 +9,15 @@
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import stat
|
import stat
|
||||||
@ -17,17 +19,17 @@
|
|||||||
|
|
||||||
|
|
||||||
DEFAULT_SYSTEM_LIB_PATHS = (
|
DEFAULT_SYSTEM_LIB_PATHS = (
|
||||||
@@ -37,6 +39,9 @@
|
@@ -42,6 +44,9 @@ 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 = create_regexp_call('_?exit')
|
||||||
fork_call_regex = re.compile('\s+FUNC\s+.*?\s+(fork(?:@\S+)?)(?:\s|$)')
|
fork_call_regex = create_regexp_call('fork')
|
||||||
+ debuginfo_regex=re.compile('^\s+\[\s*\d+\]\s+\.debug_.*\s+')
|
+ debuginfo_regex=re.compile('^\s+\[\s*\d+\]\s+\.debug_.*\s+')
|
||||||
+ symtab_regex=re.compile('^\s+\[\s*\d+\]\s+\.symtab\s+')
|
+ symtab_regex=re.compile('^\s+\[\s*\d+\]\s+\.symtab\s+')
|
||||||
+ gethostbyname_call_regex = re.compile('\s+FUNC\s+.*?\s+(gethostbyname(?:@\S+)?)(?:\s|$)')
|
+ gethostbyname_call_regex = re.compile('\s+FUNC\s+.*?\s+(gethostbyname(?:@\S+)?)(?:\s|$)')
|
||||||
|
# regexp for setgid setegid setresgid set(?:res|e)?gid
|
||||||
def __init__(self, pkg, path, file, is_ar, is_shlib):
|
setgid_call_regex = create_regexp_call(['setresgid','setegid','setgid'])
|
||||||
self.readelf_error = False
|
setuid_call_regex = create_regexp_call(['setresuid','seteuid','setuid'])
|
||||||
@@ -50,7 +55,10 @@
|
@@ -62,7 +67,10 @@ class BinaryInfo:
|
||||||
self.stack = False
|
self.stack = False
|
||||||
self.exec_stack = False
|
self.exec_stack = False
|
||||||
self.exit_calls = []
|
self.exit_calls = []
|
||||||
@ -37,8 +39,8 @@
|
|||||||
+ self.symtab=0
|
+ self.symtab=0
|
||||||
self.tail = ''
|
self.tail = ''
|
||||||
|
|
||||||
is_debug = path.endswith('.debug')
|
self.setgid = False
|
||||||
@@ -93,6 +101,11 @@
|
@@ -131,6 +139,11 @@ class BinaryInfo:
|
||||||
self.exec_stack = True
|
self.exec_stack = True
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -50,7 +52,7 @@
|
|||||||
if is_shlib:
|
if is_shlib:
|
||||||
r = BinaryInfo.exit_call_regex.search(l)
|
r = BinaryInfo.exit_call_regex.search(l)
|
||||||
if r:
|
if r:
|
||||||
@@ -103,6 +116,14 @@
|
@@ -141,6 +154,14 @@ class BinaryInfo:
|
||||||
fork_called = True
|
fork_called = True
|
||||||
continue
|
continue
|
||||||
|
|
||||||
@ -65,7 +67,7 @@
|
|||||||
if self.non_pic:
|
if self.non_pic:
|
||||||
self.non_pic = 'TEXTREL' in res[1]
|
self.non_pic = 'TEXTREL' in res[1]
|
||||||
|
|
||||||
@@ -274,13 +295,26 @@
|
@@ -330,13 +351,26 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# stripped ?
|
# stripped ?
|
||||||
@ -93,7 +95,7 @@
|
|||||||
if is_shlib:
|
if is_shlib:
|
||||||
has_lib = True
|
has_lib = True
|
||||||
|
|
||||||
@@ -330,6 +364,10 @@
|
@@ -386,6 +420,10 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
for ec in bin_info.exit_calls:
|
for ec in bin_info.exit_calls:
|
||||||
printWarning(pkg, 'shared-lib-calls-exit', fname, ec)
|
printWarning(pkg, 'shared-lib-calls-exit', fname, ec)
|
||||||
|
|
||||||
@ -104,7 +106,7 @@
|
|||||||
# rpath ?
|
# rpath ?
|
||||||
if bin_info.rpath:
|
if bin_info.rpath:
|
||||||
for p in bin_info.rpath:
|
for p in bin_info.rpath:
|
||||||
@@ -524,6 +562,14 @@
|
@@ -590,6 +628,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.''',
|
||||||
|
|
||||||
@ -119,7 +121,7 @@
|
|||||||
'executable-stack',
|
'executable-stack',
|
||||||
'''The binary declares the stack as executable. Executable stack is usually an
|
'''The binary declares the stack as executable. Executable stack is usually an
|
||||||
error as it is only needed if the code contains GCC trampolines or similar
|
error as it is only needed if the code contains GCC trampolines or similar
|
||||||
@@ -536,6 +582,10 @@
|
@@ -602,6 +648,10 @@ don\'t define a proper .note.GNU-stack s
|
||||||
make the stack executable. Usual suspects include use of a non-GNU linker or
|
make the stack executable. Usual suspects include use of a non-GNU linker or
|
||||||
an old GNU linker version.''',
|
an old GNU linker version.''',
|
||||||
|
|
||||||
@ -130,7 +132,7 @@
|
|||||||
'shared-lib-calls-exit',
|
'shared-lib-calls-exit',
|
||||||
'''This library package calls exit() or _exit(), probably in a non-fork()
|
'''This library package calls exit() or _exit(), probably in a non-fork()
|
||||||
context. Doing so from a library is strongly discouraged - when a library
|
context. Doing so from a library is strongly discouraged - when a library
|
||||||
@@ -554,6 +604,12 @@
|
@@ -620,6 +670,12 @@ that use prelink, make sure that prelink
|
||||||
placing a blacklist file in /etc/prelink.conf.d. For more information, see
|
placing a blacklist file in /etc/prelink.conf.d. For more information, see
|
||||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900#49''',
|
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900#49''',
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- TagsCheck.py.orig
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -1024,8 +1024,8 @@ Development/''',
|
@@ -1025,8 +1025,8 @@ Development/''',
|
||||||
"%s".''' % '", "'.join(VALID_GROUPS),
|
"%s".''' % '", "'.join(VALID_GROUPS),
|
||||||
|
|
||||||
'no-changelogname-tag',
|
'no-changelogname-tag',
|
||||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -948,6 +948,16 @@ class FilesCheck(AbstractCheck.AbstractC
|
@@ -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)
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ Index: FilesCheck.py
|
|||||||
if link != '':
|
if link != '':
|
||||||
ext = compr_regex.search(link)
|
ext = compr_regex.search(link)
|
||||||
if ext:
|
if ext:
|
||||||
@@ -1757,6 +1767,24 @@ consequences), or other compiler flags w
|
@@ -1727,6 +1737,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.''',
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: Config.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- Config.py.orig
|
--- Config.py.orig
|
||||||
+++ Config.py
|
+++ Config.py
|
||||||
@@ -17,14 +17,13 @@ try:
|
@@ -16,14 +16,13 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
__version__ = 'devel'
|
__version__ = 'devel'
|
||||||
|
|
||||||
|
@ -2,147 +2,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -29,65 +29,112 @@ STANDARD_DIRS = (
|
@@ -103,24 +103,415 @@ STANDARD_DIRS = (
|
||||||
'/',
|
|
||||||
'/bin',
|
|
||||||
'/boot',
|
|
||||||
+ '/dev',
|
|
||||||
'/etc',
|
|
||||||
'/etc/X11',
|
|
||||||
+ '/etc/aliases.d',
|
|
||||||
+ '/etc/cron.d',
|
|
||||||
+ '/etc/cron.daily',
|
|
||||||
+ '/etc/cron.hourly',
|
|
||||||
+ '/etc/cron.monthly',
|
|
||||||
+ '/etc/cron.weekly',
|
|
||||||
+ '/etc/cups',
|
|
||||||
+ '/etc/default',
|
|
||||||
+ '/etc/init.d',
|
|
||||||
+ '/etc/init.d/boot.d',
|
|
||||||
+ '/etc/init.d/rc0.d',
|
|
||||||
+ '/etc/init.d/rc1.d',
|
|
||||||
+ '/etc/init.d/rc2.d',
|
|
||||||
+ '/etc/init.d/rc3.d',
|
|
||||||
+ '/etc/init.d/rc4.d',
|
|
||||||
+ '/etc/init.d/rc5.d',
|
|
||||||
+ '/etc/init.d/rc6.d',
|
|
||||||
+ '/etc/init.d/rcS.d',
|
|
||||||
+ '/etc/java',
|
|
||||||
+ '/etc/ld.so.conf.d',
|
|
||||||
+ '/etc/logrotate.d',
|
|
||||||
+ '/etc/news',
|
|
||||||
'/etc/opt',
|
|
||||||
+ '/etc/permissions.d',
|
|
||||||
+ '/etc/ppp',
|
|
||||||
+ '/etc/ppp/ip-down.d',
|
|
||||||
+ '/etc/ppp/ip-up.d',
|
|
||||||
'/etc/profile.d',
|
|
||||||
+ '/etc/rc.d',
|
|
||||||
'/etc/skel',
|
|
||||||
+ '/etc/susehelp.d',
|
|
||||||
+ '/etc/susehelp.d/htdig',
|
|
||||||
+ '/etc/sysconfig',
|
|
||||||
+ '/etc/sysconfig/SuSEfirewall2.d',
|
|
||||||
+ '/etc/sysconfig/SuSEfirewall2.d/services',
|
|
||||||
+ '/etc/sysconfig/network',
|
|
||||||
+ '/etc/sysconfig/network/if-down.d',
|
|
||||||
+ '/etc/sysconfig/network/if-up.d',
|
|
||||||
+ '/etc/sysconfig/network/providers',
|
|
||||||
+ '/etc/sysconfig/network/scripts',
|
|
||||||
+ '/etc/sysconfig/scripts',
|
|
||||||
+ '/etc/uucp',
|
|
||||||
+ '/etc/xdg',
|
|
||||||
+ '/etc/xdg/autostart',
|
|
||||||
'/etc/xinetd.d',
|
|
||||||
'/home',
|
|
||||||
'/lib',
|
|
||||||
+ '/lib/YaST',
|
|
||||||
+ '/lib/firmware',
|
|
||||||
+ '/lib/lsb',
|
|
||||||
'/lib/modules',
|
|
||||||
'/lib64',
|
|
||||||
+ '/lib64/YaST',
|
|
||||||
+ '/lib64/firmware',
|
|
||||||
+ '/lib64/lsb',
|
|
||||||
+ '/lib64/modules',
|
|
||||||
'/media',
|
|
||||||
+ '/media/cdrom',
|
|
||||||
+ '/media/floppy',
|
|
||||||
'/mnt',
|
|
||||||
- '/mnt/cdrom',
|
|
||||||
- '/mnt/disk',
|
|
||||||
- '/mnt/floppy',
|
|
||||||
'/opt',
|
|
||||||
'/proc',
|
|
||||||
'/root',
|
|
||||||
+ '/root/.gnupg',
|
|
||||||
+ '/root/bin',
|
|
||||||
'/sbin',
|
|
||||||
- '/selinux',
|
|
||||||
'/srv',
|
|
||||||
+ '/srv/ftp',
|
|
||||||
+ '/srv/www',
|
|
||||||
+ '/srv/www/cgi-bin',
|
|
||||||
+ '/srv/www/htdocs',
|
|
||||||
'/sys',
|
|
||||||
'/tmp',
|
|
||||||
+ '/tmp/.ICE-unix',
|
|
||||||
+ '/tmp/.X11-unix',
|
|
||||||
'/usr',
|
|
||||||
'/usr/X11R6',
|
|
||||||
'/usr/X11R6/bin',
|
|
||||||
- '/usr/X11R6/doc',
|
|
||||||
- '/usr/X11R6/include',
|
|
||||||
'/usr/X11R6/lib',
|
|
||||||
- '/usr/X11R6/lib64',
|
|
||||||
- '/usr/X11R6/man',
|
|
||||||
- '/usr/X11R6/man/man1',
|
|
||||||
- '/usr/X11R6/man/man2',
|
|
||||||
- '/usr/X11R6/man/man3',
|
|
||||||
- '/usr/X11R6/man/man4',
|
|
||||||
- '/usr/X11R6/man/man5',
|
|
||||||
- '/usr/X11R6/man/man6',
|
|
||||||
- '/usr/X11R6/man/man7',
|
|
||||||
- '/usr/X11R6/man/man8',
|
|
||||||
- '/usr/X11R6/man/man9',
|
|
||||||
- '/usr/X11R6/man/mann',
|
|
||||||
'/usr/bin',
|
|
||||||
- '/usr/bin/X11',
|
|
||||||
- '/usr/etc',
|
|
||||||
'/usr/games',
|
|
||||||
+ '/usr/i586-suse-linux',
|
|
||||||
+ '/usr/i586-suse-linux/bin',
|
|
||||||
+ '/usr/i586-suse-linux/include',
|
|
||||||
+ '/usr/i586-suse-linux/lib',
|
|
||||||
'/usr/include',
|
|
||||||
+ '/usr/include/X11',
|
|
||||||
'/usr/lib',
|
|
||||||
'/usr/lib/X11',
|
|
||||||
- '/usr/lib/games',
|
|
||||||
- '/usr/lib/gcc-lib',
|
|
||||||
- '/usr/lib/menu',
|
|
||||||
+ '/usr/lib/browser-plugins',
|
|
||||||
+ '/usr/lib/lsb',
|
|
||||||
+ '/usr/lib/news',
|
|
||||||
+ '/usr/lib/pkgconfig',
|
|
||||||
'/usr/lib64',
|
|
||||||
- '/usr/lib64/gcc-lib',
|
|
||||||
+ '/usr/lib64/X11',
|
|
||||||
+ '/usr/lib64/browser-plugins',
|
|
||||||
+ '/usr/lib64/lsb',
|
|
||||||
+ '/usr/lib64/news',
|
|
||||||
+ '/usr/lib64/pkgconfig',
|
|
||||||
'/usr/local',
|
|
||||||
'/usr/local/bin',
|
|
||||||
- '/usr/local/doc',
|
|
||||||
- '/usr/local/etc',
|
|
||||||
'/usr/local/games',
|
|
||||||
- '/usr/local/info',
|
|
||||||
+ '/usr/local/include',
|
|
||||||
'/usr/local/lib',
|
|
||||||
'/usr/local/lib64',
|
|
||||||
'/usr/local/man',
|
|
||||||
@@ -103,24 +150,415 @@ STANDARD_DIRS = (
|
|
||||||
'/usr/local/man/mann',
|
'/usr/local/man/mann',
|
||||||
'/usr/local/sbin',
|
'/usr/local/sbin',
|
||||||
'/usr/local/share',
|
'/usr/local/share',
|
||||||
@ -569,7 +429,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',
|
||||||
@@ -132,28 +570,57 @@ STANDARD_DIRS = (
|
@@ -132,28 +523,57 @@ 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',
|
||||||
|
@ -2,7 +2,7 @@ Index: Config.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- Config.py.orig
|
--- Config.py.orig
|
||||||
+++ Config.py
|
+++ Config.py
|
||||||
@@ -103,11 +103,23 @@ def getOption(name, default = ""):
|
@@ -102,11 +102,23 @@ def getOption(name, default = ""):
|
||||||
_filters = []
|
_filters = []
|
||||||
_filters_re = None
|
_filters_re = None
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ Index: Config.py
|
|||||||
|
|
||||||
def removeFilter(s):
|
def removeFilter(s):
|
||||||
global _filters_re
|
global _filters_re
|
||||||
@@ -122,19 +134,38 @@ def removeFilter(s):
|
@@ -121,19 +133,38 @@ def removeFilter(s):
|
||||||
_scoring = {}
|
_scoring = {}
|
||||||
|
|
||||||
def setBadness(s, score):
|
def setBadness(s, score):
|
||||||
@ -71,7 +71,7 @@ Index: Config.py
|
|||||||
_filters_re = '(?:' + _filters[0] + ')'
|
_filters_re = '(?:' + _filters[0] + ')'
|
||||||
|
|
||||||
for idx in range(1, len(_filters)):
|
for idx in range(1, len(_filters)):
|
||||||
@@ -146,9 +177,27 @@ def isFiltered(s):
|
@@ -145,9 +176,27 @@ def isFiltered(s):
|
||||||
_filters_re = _filters_re + '|(?:' + _filters[idx] +')'
|
_filters_re = _filters_re + '|(?:' + _filters[idx] +')'
|
||||||
_filters_re = re.compile(_filters_re)
|
_filters_re = re.compile(_filters_re)
|
||||||
|
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- Config.py
|
Index: Config.py
|
||||||
|
===================================================================
|
||||||
|
--- Config.py.orig
|
||||||
+++ Config.py
|
+++ Config.py
|
||||||
@@ -11,6 +11,7 @@
|
@@ -10,6 +10,7 @@
|
||||||
import locale
|
import locale
|
||||||
import os.path
|
import os.path
|
||||||
import re
|
import re
|
||||||
@ -8,7 +10,7 @@
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
from __version__ import __version__
|
from __version__ import __version__
|
||||||
@@ -163,7 +164,17 @@
|
@@ -162,7 +163,17 @@ def isFiltered(s):
|
||||||
if '(' in _filters_non_except[idx]:
|
if '(' in _filters_non_except[idx]:
|
||||||
_non_named_group_re.subn('(:?', _filters_non_except[idx])
|
_non_named_group_re.subn('(:?', _filters_non_except[idx])
|
||||||
_filters_non_except_re = _filters_non_except_re + '|(?:' + _filters_non_except[idx] +')'
|
_filters_non_except_re = _filters_non_except_re + '|(?:' + _filters_non_except[idx] +')'
|
||||||
@ -27,7 +29,7 @@
|
|||||||
|
|
||||||
if _filters_re == None and len(_filters):
|
if _filters_re == None and len(_filters):
|
||||||
_filters_re = '(?:' + _filters[0] + ')'
|
_filters_re = '(?:' + _filters[0] + ')'
|
||||||
@@ -175,7 +186,17 @@
|
@@ -174,7 +185,17 @@ def isFiltered(s):
|
||||||
if '(' in _filters[idx]:
|
if '(' in _filters[idx]:
|
||||||
_non_named_group_re.subn('(:?', _filters[idx])
|
_non_named_group_re.subn('(:?', _filters[idx])
|
||||||
_filters_re = _filters_re + '|(?:' + _filters[idx] +')'
|
_filters_re = _filters_re + '|(?:' + _filters[idx] +')'
|
||||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -646,7 +646,7 @@ points_regex = re.compile('^\.\./(.*)')
|
@@ -599,7 +599,7 @@ points_regex = re.compile('^\.\./(.*)')
|
||||||
doc_regex = re.compile('^/usr(/share|/X11R6)?/(doc|man|info)/|^/opt/kde3/share/doc|^/usr/share/gnome/help')
|
doc_regex = re.compile('^/usr(/share|/X11R6)?/(doc|man|info)/|^/opt/kde3/share/doc|^/usr/share/gnome/help')
|
||||||
bin_regex = re.compile('^/(?:usr/(?:s?bin|games)|s?bin)/(.*)')
|
bin_regex = re.compile('^/(?:usr/(?:s?bin|games)|s?bin)/(.*)')
|
||||||
includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE)
|
includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
Index: rpmlint-1.4/FilesCheck.py
|
Index: rpmlint-1.5/FilesCheck.py
|
||||||
===================================================================
|
===================================================================
|
||||||
--- rpmlint-1.4.orig/FilesCheck.py
|
--- rpmlint-1.5.orig/FilesCheck.py
|
||||||
+++ rpmlint-1.4/FilesCheck.py
|
+++ rpmlint-1.5/FilesCheck.py
|
||||||
@@ -1434,7 +1434,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
@@ -1404,7 +1404,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
for exe, paths in bindir_exes.items():
|
for exe, paths in bindir_exes.items():
|
||||||
if len(paths) > 1:
|
if len(paths) > 1:
|
||||||
printWarning(pkg, "duplicate-executable", exe, paths)
|
printWarning(pkg, "duplicate-executable", exe, paths)
|
||||||
|
@ -2,7 +2,7 @@ Index: SpecCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- SpecCheck.py.orig
|
--- SpecCheck.py.orig
|
||||||
+++ SpecCheck.py
|
+++ SpecCheck.py
|
||||||
@@ -414,6 +414,10 @@ class SpecCheck(AbstractCheck.AbstractCh
|
@@ -424,6 +424,10 @@ class SpecCheck(AbstractCheck.AbstractCh
|
||||||
printWarning(pkg, 'comparison-operator-in-deptoken',
|
printWarning(pkg, 'comparison-operator-in-deptoken',
|
||||||
conf)
|
conf)
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ Index: SpecCheck.py
|
|||||||
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)
|
||||||
@@ -732,6 +736,14 @@ may break short circuit builds.''',
|
@@ -748,6 +752,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.''',
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- TagsCheck.py.orig
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -416,6 +416,7 @@ lib_devel_number_regex = re.compile('^li
|
@@ -415,6 +415,7 @@ lib_devel_number_regex = re.compile('^li
|
||||||
invalid_url_regex = re.compile(Config.getOption('InvalidURL'), re.IGNORECASE)
|
invalid_url_regex = re.compile(Config.getOption('InvalidURL'), re.IGNORECASE)
|
||||||
lib_package_regex = re.compile('(?:^(?:compat-)?lib.*?(\.so.*)?|libs?[\d-]*)$', re.IGNORECASE)
|
lib_package_regex = re.compile('(?:^(?:compat-)?lib.*?(\.so.*)?|libs?[\d-]*)$', re.IGNORECASE)
|
||||||
leading_space_regex = re.compile('^\s+')
|
leading_space_regex = re.compile('^\s+')
|
||||||
@ -10,7 +10,7 @@ Index: TagsCheck.py
|
|||||||
license_regex = re.compile('\(([^)]+)\)|\s(?:and|or)\s')
|
license_regex = re.compile('\(([^)]+)\)|\s(?:and|or)\s')
|
||||||
invalid_version_regex = re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE)
|
invalid_version_regex = re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE)
|
||||||
# () are here for grouping purpose in the regexp
|
# () are here for grouping purpose in the regexp
|
||||||
@@ -629,10 +630,12 @@ class TagsCheck(AbstractCheck.AbstractCh
|
@@ -630,10 +631,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
|
||||||
@ -24,7 +24,7 @@ Index: TagsCheck.py
|
|||||||
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)")
|
||||||
@@ -669,6 +672,15 @@ class TagsCheck(AbstractCheck.AbstractCh
|
@@ -670,6 +673,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)
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ Index: TagsCheck.py
|
|||||||
# List of words to ignore in spell check
|
# List of words to ignore in spell check
|
||||||
ignored_words = set()
|
ignored_words = set()
|
||||||
for pf in pkg.files():
|
for pf in pkg.files():
|
||||||
@@ -1108,6 +1120,11 @@ instead or require a file in bin or /etc
|
@@ -1109,6 +1121,11 @@ instead or require a file in bin or /etc
|
||||||
'no-url-tag',
|
'no-url-tag',
|
||||||
'''The URL tag is missing. Please add a http or ftp link to the project location.''',
|
'''The URL tag is missing. Please add a http or ftp link to the project location.''',
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -1148,8 +1148,11 @@ class FilesCheck(AbstractCheck.AbstractC
|
@@ -1107,8 +1107,11 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||||
if res and not (pkg.check_versioned_dep('python-base',
|
if res and not (pkg.check_versioned_dep('python-base',
|
||||||
res.group(1)) or
|
res.group(1)) or
|
||||||
pkg.check_versioned_dep('python',
|
pkg.check_versioned_dep('python',
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
--- NamingPolicyCheck.py
|
Index: NamingPolicyCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- NamingPolicyCheck.py.orig
|
||||||
+++ NamingPolicyCheck.py
|
+++ NamingPolicyCheck.py
|
||||||
@@ -91,7 +91,7 @@
|
@@ -90,7 +90,7 @@ check = NamingPolicyCheck()
|
||||||
|
|
||||||
|
|
||||||
check.add_check('xmms', '^xmms(-|$)', '^/usr/lib(64)?/xmms/')
|
check.add_check('xmms', '^xmms(-|$)', '^/usr/lib(64)?/xmms/')
|
||||||
|
@ -2,7 +2,7 @@ Index: InitScriptCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- InitScriptCheck.py.orig
|
--- InitScriptCheck.py.orig
|
||||||
+++ InitScriptCheck.py
|
+++ InitScriptCheck.py
|
||||||
@@ -51,7 +51,7 @@ class InitScriptCheck(AbstractCheck.Abst
|
@@ -50,7 +50,7 @@ class InitScriptCheck(AbstractCheck.Abst
|
||||||
return
|
return
|
||||||
|
|
||||||
initscript_list = []
|
initscript_list = []
|
||||||
@ -11,7 +11,7 @@ Index: InitScriptCheck.py
|
|||||||
|
|
||||||
# check chkconfig call in %post and %preun
|
# check chkconfig call in %post and %preun
|
||||||
postin = pkg[rpm.RPMTAG_POSTIN] or pkg.scriptprog(pkg[rpm.RPMTAG_POSTINPROG])
|
postin = pkg[rpm.RPMTAG_POSTIN] or pkg.scriptprog(pkg[rpm.RPMTAG_POSTINPROG])
|
||||||
@@ -60,6 +60,10 @@ class InitScriptCheck(AbstractCheck.Abst
|
@@ -59,6 +59,10 @@ class InitScriptCheck(AbstractCheck.Abst
|
||||||
|
|
||||||
for fname, pkgfile in pkg.files().items():
|
for fname, pkgfile in pkg.files().items():
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ Index: InitScriptCheck.py
|
|||||||
if not fname.startswith('/etc/init.d/') and \
|
if not fname.startswith('/etc/init.d/') and \
|
||||||
not fname.startswith('/etc/rc.d/init.d/'):
|
not fname.startswith('/etc/rc.d/init.d/'):
|
||||||
continue
|
continue
|
||||||
@@ -199,6 +203,12 @@ class InitScriptCheck(AbstractCheck.Abst
|
@@ -198,6 +202,12 @@ class InitScriptCheck(AbstractCheck.Abst
|
||||||
elif subsys_regex_found and not use_subsys:
|
elif subsys_regex_found and not use_subsys:
|
||||||
printError(pkg, 'subsys-unsupported', fname)
|
printError(pkg, 'subsys-unsupported', fname)
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ Index: InitScriptCheck.py
|
|||||||
if len(initscript_list) == 1:
|
if len(initscript_list) == 1:
|
||||||
pkgname = re.sub("-sysvinit$", "", pkg.name.lower())
|
pkgname = re.sub("-sysvinit$", "", pkg.name.lower())
|
||||||
goodnames = (pkgname, pkgname + 'd')
|
goodnames = (pkgname, pkgname + 'd')
|
||||||
@@ -223,6 +233,10 @@ a call to chkconfig.''',
|
@@ -222,6 +232,10 @@ a call to chkconfig.''',
|
||||||
'''The package contains an init script but doesn't contain a %preun with
|
'''The package contains an init script but doesn't contain a %preun with
|
||||||
a call to chkconfig.''',
|
a call to chkconfig.''',
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- TagsCheck.py.orig
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -637,10 +637,10 @@ class TagsCheck(AbstractCheck.AbstractCh
|
@@ -638,10 +638,10 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
if pkg_config_regex.match(fname) and 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:
|
||||||
|
@ -2,7 +2,7 @@ Index: SpecCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- SpecCheck.py.orig
|
--- SpecCheck.py.orig
|
||||||
+++ SpecCheck.py
|
+++ SpecCheck.py
|
||||||
@@ -609,8 +609,8 @@ SPEC file to build a valid RPM package.'
|
@@ -625,8 +625,8 @@ SPEC file to build a valid RPM package.'
|
||||||
("Name:" tag). Either rename your package or the specfile.''',
|
("Name:" tag). Either rename your package or the specfile.''',
|
||||||
|
|
||||||
'non-utf8-spec-file',
|
'non-utf8-spec-file',
|
||||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- TagsCheck.py.orig
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -780,7 +780,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
@@ -781,7 +781,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
if not valid_license:
|
if not valid_license:
|
||||||
self._unexpanded_macros(pkg, 'License', rpm_license)
|
self._unexpanded_macros(pkg, 'License', rpm_license)
|
||||||
|
|
||||||
@ -11,7 +11,7 @@ Index: TagsCheck.py
|
|||||||
if hasattr(rpm, 'RPMTAG_%s' % tag.upper()):
|
if hasattr(rpm, 'RPMTAG_%s' % tag.upper()):
|
||||||
url = pkg[getattr(rpm, 'RPMTAG_%s' % tag.upper())]
|
url = pkg[getattr(rpm, 'RPMTAG_%s' % tag.upper())]
|
||||||
self._unexpanded_macros(pkg, tag, url, is_url = True)
|
self._unexpanded_macros(pkg, tag, url, is_url = True)
|
||||||
@@ -1096,7 +1096,7 @@ once.''',
|
@@ -1097,7 +1097,7 @@ once.''',
|
||||||
'''This rpm requires a specific release of another package.''',
|
'''This rpm requires a specific release of another package.''',
|
||||||
|
|
||||||
'no-url-tag',
|
'no-url-tag',
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
--- SpecCheck.py
|
Index: SpecCheck.py
|
||||||
|
===================================================================
|
||||||
|
--- SpecCheck.py.orig
|
||||||
+++ SpecCheck.py
|
+++ SpecCheck.py
|
||||||
@@ -57,6 +57,7 @@
|
@@ -66,6 +66,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')
|
||||||
+suse_version_regex = re.compile('%suse_version\s*[<>=]+\s*(\d+)')
|
+suse_version_regex = re.compile('%suse_version\s*[<>=]+\s*(\d+)')
|
||||||
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',
|
||||||
@@ -359,6 +360,12 @@
|
@@ -369,6 +370,12 @@ class SpecCheck(AbstractCheck.AbstractCh
|
||||||
if not res.group(1).startswith('%'):
|
if not res.group(1).startswith('%'):
|
||||||
printWarning(pkg, 'hardcoded-prefix-tag', res.group(1))
|
printWarning(pkg, 'hardcoded-prefix-tag', res.group(1))
|
||||||
|
|
||||||
@ -21,7 +23,7 @@
|
|||||||
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))
|
||||||
@@ -774,6 +781,15 @@
|
@@ -790,6 +797,15 @@ in the resulting binary package dependin
|
||||||
version (typically < 4.4). Add default attributes using %defattr before it in
|
version (typically < 4.4). Add default attributes using %defattr before it in
|
||||||
the %files section, or use per entry %attr's.''',
|
the %files section, or use per entry %attr's.''',
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- TagsCheck.py.orig
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -883,7 +883,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
@@ -884,7 +884,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||||
spell_check(pkg, utf8summary, 'Summary(%s)', lang, ignored_words)
|
spell_check(pkg, utf8summary, 'Summary(%s)', lang, ignored_words)
|
||||||
if '\n' in summary:
|
if '\n' in summary:
|
||||||
printError(pkg, 'summary-on-multiple-lines', lang)
|
printError(pkg, 'summary-on-multiple-lines', lang)
|
||||||
|
@ -2,7 +2,7 @@ Index: InitScriptCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- InitScriptCheck.py.orig
|
--- InitScriptCheck.py.orig
|
||||||
+++ InitScriptCheck.py
|
+++ InitScriptCheck.py
|
||||||
@@ -30,6 +30,10 @@ lsb_tags_regex = re.compile('^# ([\w-]+)
|
@@ -29,6 +29,10 @@ lsb_tags_regex = re.compile('^# ([\w-]+)
|
||||||
lsb_cont_regex = re.compile('^#(?:\t| )(.*?)\s*$')
|
lsb_cont_regex = re.compile('^#(?:\t| )(.*?)\s*$')
|
||||||
use_subsys = Config.getOption('UseVarLockSubsys', True)
|
use_subsys = Config.getOption('UseVarLockSubsys', True)
|
||||||
|
|
||||||
@ -13,7 +13,7 @@ Index: InitScriptCheck.py
|
|||||||
LSB_KEYWORDS = ('Provides', 'Required-Start', 'Required-Stop', 'Should-Start',
|
LSB_KEYWORDS = ('Provides', 'Required-Start', 'Required-Stop', 'Should-Start',
|
||||||
'Should-Stop', 'Default-Start', 'Default-Stop',
|
'Should-Stop', 'Default-Start', 'Default-Stop',
|
||||||
'Short-Description', 'Description')
|
'Short-Description', 'Description')
|
||||||
@@ -47,6 +51,13 @@ class InitScriptCheck(AbstractCheck.Abst
|
@@ -46,6 +50,13 @@ class InitScriptCheck(AbstractCheck.Abst
|
||||||
return
|
return
|
||||||
|
|
||||||
initscript_list = []
|
initscript_list = []
|
||||||
@ -27,7 +27,7 @@ Index: InitScriptCheck.py
|
|||||||
for fname, pkgfile in pkg.files().items():
|
for fname, pkgfile in pkg.files().items():
|
||||||
|
|
||||||
if not fname.startswith('/etc/init.d/') and \
|
if not fname.startswith('/etc/init.d/') and \
|
||||||
@@ -61,20 +72,16 @@ class InitScriptCheck(AbstractCheck.Abst
|
@@ -60,20 +71,16 @@ class InitScriptCheck(AbstractCheck.Abst
|
||||||
if "." in basename:
|
if "." in basename:
|
||||||
printError(pkg, 'init-script-name-with-dot', fname)
|
printError(pkg, 'init-script-name-with-dot', fname)
|
||||||
|
|
||||||
@ -56,7 +56,7 @@ Index: InitScriptCheck.py
|
|||||||
|
|
||||||
status_found = False
|
status_found = False
|
||||||
reload_found = False
|
reload_found = False
|
||||||
@@ -275,6 +282,17 @@ of chkconfig don't work as expected with
|
@@ -274,6 +281,17 @@ of chkconfig don't work as expected with
|
||||||
'init-script-non-executable',
|
'init-script-non-executable',
|
||||||
'''The init script should have at least the execution bit set for root
|
'''The init script should have at least the execution bit set for root
|
||||||
in order for it to run at boot time.''',
|
in order for it to run at boot time.''',
|
||||||
|
@ -2,7 +2,7 @@ Index: BinariesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- BinariesCheck.py.orig
|
--- BinariesCheck.py.orig
|
||||||
+++ BinariesCheck.py
|
+++ BinariesCheck.py
|
||||||
@@ -208,6 +208,7 @@ usr_lib_exception_regex = re.compile(Con
|
@@ -263,6 +263,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$')
|
||||||
@ -10,7 +10,7 @@ Index: BinariesCheck.py
|
|||||||
|
|
||||||
def dir_base(path):
|
def dir_base(path):
|
||||||
res = path_regex.search(path)
|
res = path_regex.search(path)
|
||||||
@@ -280,7 +281,7 @@ class BinariesCheck(AbstractCheck.Abstra
|
@@ -336,7 +337,7 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||||
# arch dependent packages only from here on
|
# arch dependent packages only from here on
|
||||||
|
|
||||||
# in /usr/share ?
|
# in /usr/share ?
|
||||||
|
@ -3,7 +3,7 @@ Index: FilesCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- FilesCheck.py.orig
|
--- FilesCheck.py.orig
|
||||||
+++ FilesCheck.py
|
+++ FilesCheck.py
|
||||||
@@ -659,7 +659,7 @@ ldconfig_regex = re.compile('^[^#]*ldcon
|
@@ -612,7 +612,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)$')
|
||||||
|
@ -2,12 +2,12 @@ Index: MenuXDGCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- MenuXDGCheck.py.orig
|
--- MenuXDGCheck.py.orig
|
||||||
+++ MenuXDGCheck.py
|
+++ MenuXDGCheck.py
|
||||||
@@ -18,7 +18,7 @@ class MenuXDGCheck(AbstractCheck.Abstrac
|
@@ -21,7 +21,7 @@ class MenuXDGCheck(AbstractCheck.Abstrac
|
||||||
# $ echo $XDG_DATA_DIRS/applications
|
|
||||||
# /var/lib/menu-xdg:/usr/share
|
# /var/lib/menu-xdg:/usr/share
|
||||||
|
self.cfp = RawConfigParser()
|
||||||
AbstractCheck.AbstractFilesCheck.__init__(
|
AbstractCheck.AbstractFilesCheck.__init__(
|
||||||
- self, "MenuXDGCheck", "/usr/share/applications/.*\.desktop$")
|
- self, "MenuXDGCheck", "/usr/share/applications/.*\.desktop$")
|
||||||
+ self, "MenuXDGCheck", "(?:/usr/share|/etc/opt/.*/share|/opt/.*)/applications/.*\.desktop$")
|
+ self, "MenuXDGCheck", "(?:/usr/share|/etc/opt/.*/share|/opt/.*)/applications/.*\.desktop$")
|
||||||
|
|
||||||
def check_file(self, pkg, filename):
|
def check_file(self, pkg, filename):
|
||||||
f = pkg.dirName() + filename
|
root = pkg.dirName()
|
||||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- TagsCheck.py.orig
|
--- TagsCheck.py.orig
|
||||||
+++ TagsCheck.py
|
+++ TagsCheck.py
|
||||||
@@ -813,7 +813,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
@@ -814,7 +814,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