forked from pool/rpmlint
refresh patches
OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=23
This commit is contained in:
parent
bdde37252c
commit
2e4e338fbc
@ -380,7 +380,8 @@ class LibraryPolicyCheck(AbstractCheck.AbstractCheck):
|
||||
if len(libs) == 1:
|
||||
soname = libs.copy().pop()
|
||||
libname = libname_from_soname (soname)
|
||||
if libname.startswith('lib') and pkg.name != libname:
|
||||
if libname.startswith('lib') and pkg.name != libname and \
|
||||
not (pkg.name in (libname + "-mini"), ):
|
||||
if libname in _policy_legacy_exceptions:
|
||||
printWarning(pkg, 'shlib-legacy-policy-name-error', libname)
|
||||
else:
|
||||
|
@ -2,7 +2,7 @@ Index: Pkg.py
|
||||
===================================================================
|
||||
--- Pkg.py.orig
|
||||
+++ Pkg.py
|
||||
@@ -429,6 +429,10 @@ class Pkg:
|
||||
@@ -425,6 +425,10 @@ class Pkg:
|
||||
self._missingok_files = None
|
||||
self._files = None
|
||||
self._requires = None
|
||||
@ -13,7 +13,7 @@ Index: Pkg.py
|
||||
self._req_names = -1
|
||||
|
||||
if header:
|
||||
@@ -666,6 +670,22 @@ class Pkg:
|
||||
@@ -672,6 +676,22 @@ class Pkg:
|
||||
self._gatherDepInfo()
|
||||
return self._requires
|
||||
|
||||
@ -36,7 +36,7 @@ Index: Pkg.py
|
||||
def prereq(self):
|
||||
"""Get package PreReqs as list of
|
||||
(name, flags, (epoch, version, release)) tuples."""
|
||||
@@ -702,7 +722,7 @@ class Pkg:
|
||||
@@ -708,7 +728,7 @@ class Pkg:
|
||||
|
||||
# internal function to gather dependency info used by the above ones
|
||||
def _gather_aux(self, header, list, nametag, flagstag, versiontag,
|
||||
@ -45,7 +45,7 @@ Index: Pkg.py
|
||||
names = header[nametag]
|
||||
flags = header[flagstag]
|
||||
versions = header[versiontag]
|
||||
@@ -713,7 +733,11 @@ class Pkg:
|
||||
@@ -719,7 +739,11 @@ class Pkg:
|
||||
if prereq is not None and flags[loop] & PREREQ_FLAG:
|
||||
prereq.append((names[loop], flags[loop] & (~PREREQ_FLAG),
|
||||
evr))
|
||||
@ -58,7 +58,7 @@ Index: Pkg.py
|
||||
list.append((names[loop], flags[loop], evr))
|
||||
|
||||
def _gatherDepInfo(self):
|
||||
@@ -723,6 +747,10 @@ class Pkg:
|
||||
@@ -729,6 +753,10 @@ class Pkg:
|
||||
self._provides = []
|
||||
self._conflicts = []
|
||||
self._obsoletes = []
|
||||
@ -69,7 +69,7 @@ Index: Pkg.py
|
||||
|
||||
self._gather_aux(self.header, self._requires,
|
||||
rpm.RPMTAG_REQUIRENAME,
|
||||
@@ -742,6 +770,32 @@ class Pkg:
|
||||
@@ -748,6 +776,32 @@ class Pkg:
|
||||
rpm.RPMTAG_OBSOLETEFLAGS,
|
||||
rpm.RPMTAG_OBSOLETEVERSION)
|
||||
|
||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
||||
===================================================================
|
||||
--- FilesCheck.py.orig
|
||||
+++ FilesCheck.py
|
||||
@@ -1679,7 +1679,10 @@ executed.''',
|
||||
@@ -1700,7 +1700,10 @@ executed.''',
|
||||
executed.''',
|
||||
|
||||
'wrong-script-interpreter',
|
||||
|
@ -2,7 +2,7 @@ Index: SpecCheck.py
|
||||
===================================================================
|
||||
--- SpecCheck.py.orig
|
||||
+++ SpecCheck.py
|
||||
@@ -619,7 +619,7 @@ versions you can ignore this warning.'''
|
||||
@@ -620,7 +620,7 @@ versions you can ignore this warning.'''
|
||||
|
||||
'hardcoded-path-in-buildroot-tag',
|
||||
'''A path is hardcoded in your Buildroot tag. It should be replaced
|
||||
|
@ -1,10 +1,10 @@
|
||||
# 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.
|
||||
Index: rpmlint-1.1/SpecCheck.py
|
||||
Index: rpmlint-1.2/SpecCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-1.1.orig/SpecCheck.py
|
||||
+++ rpmlint-1.1/SpecCheck.py
|
||||
@@ -593,8 +593,8 @@ addDetails(
|
||||
--- rpmlint-1.2.orig/SpecCheck.py
|
||||
+++ rpmlint-1.2/SpecCheck.py
|
||||
@@ -594,8 +594,8 @@ addDetails(
|
||||
SPEC file to build a valid RPM package.''',
|
||||
|
||||
'invalid-spec-name',
|
||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
||||
===================================================================
|
||||
--- TagsCheck.py.orig
|
||||
+++ TagsCheck.py
|
||||
@@ -702,6 +702,9 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
@@ -704,6 +704,9 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
if not description:
|
||||
printError(pkg, 'no-description-tag')
|
||||
else:
|
||||
@ -12,7 +12,7 @@ Index: TagsCheck.py
|
||||
if not pkg[rpm.RPMTAG_HEADERI18NTABLE]:
|
||||
self._unexpanded_macros(pkg, '%description', description)
|
||||
else:
|
||||
@@ -983,6 +986,10 @@ Name tag.''',
|
||||
@@ -985,6 +988,10 @@ Name tag.''',
|
||||
'''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
|
||||
@@ -842,6 +842,10 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
@@ -846,6 +846,10 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
# Check if the package is a development package
|
||||
devel_pkg = devel_regex.search(pkg.name)
|
||||
|
||||
|
@ -10,7 +10,7 @@ Index: FilesCheck.py
|
||||
# room for improvement with catching more -R, but also for false positives...
|
||||
buildconfig_rpath_regex = re.compile('(?:-rpath|Wl,-R)\\b')
|
||||
sofile_regex = re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$')
|
||||
@@ -1188,7 +1189,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
@@ -1202,7 +1203,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
includefile_regex.search(f) or \
|
||||
develfile_regex.search(f) or \
|
||||
logrotate_regex.search(f)
|
||||
@ -19,7 +19,7 @@ Index: FilesCheck.py
|
||||
printWarning(pkg, 'spurious-executable-perm', f)
|
||||
elif f.startswith('/etc/') and f not in config_files and \
|
||||
f not in ghost_files:
|
||||
@@ -1553,7 +1554,10 @@ included in your package.''',
|
||||
@@ -1574,7 +1575,10 @@ included in your package.''',
|
||||
'spurious-executable-perm',
|
||||
'''The file is installed with executable permissions, but was identified as one
|
||||
that probably should not be executable. Verify if the executable bits are
|
||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
||||
===================================================================
|
||||
--- FilesCheck.py.orig
|
||||
+++ FilesCheck.py
|
||||
@@ -1206,7 +1206,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
@@ -1220,7 +1220,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
if nonexec_file and not docdir_examples_regex.search(f):
|
||||
printWarning(pkg, 'spurious-executable-perm', f)
|
||||
elif f.startswith('/etc/') and f not in config_files and \
|
||||
|
@ -10,7 +10,7 @@ Index: TagsCheck.py
|
||||
use_epoch = Config.getOption('UseEpoch', False)
|
||||
use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT)
|
||||
max_line_len = Config.getOption('MaxLineLength', 79)
|
||||
@@ -601,6 +602,9 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
@@ -603,6 +604,9 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
if d[0].startswith('/usr/local/'):
|
||||
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 and \
|
||||
FilesCheck.devel_regex.search(d[0]):
|
||||
printError(pkg, 'devel-dependency', d[0])
|
||||
@@ -1085,6 +1089,12 @@ explicit Requires: tags.''',
|
||||
@@ -1087,6 +1091,12 @@ explicit Requires: tags.''',
|
||||
'''This package provides 2 times the same capacity. It should only provide it
|
||||
once.''',
|
||||
|
||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
||||
===================================================================
|
||||
--- FilesCheck.py.orig
|
||||
+++ FilesCheck.py
|
||||
@@ -859,7 +859,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
@@ -863,7 +863,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
debuginfo_srcs = False
|
||||
debuginfo_debugs = False
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
--- BinariesCheck.py
|
||||
Index: BinariesCheck.py
|
||||
===================================================================
|
||||
--- BinariesCheck.py.orig
|
||||
+++ BinariesCheck.py
|
||||
@@ -223,6 +223,7 @@
|
||||
@@ -232,6 +232,7 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||
binary = False
|
||||
binary_in_usr_lib = False
|
||||
has_usr_lib_file = False
|
||||
@ -8,7 +10,7 @@
|
||||
|
||||
multi_pkg = False
|
||||
res = srcname_regex.search(pkg[rpm.RPMTAG_SOURCERPM] or '')
|
||||
@@ -239,6 +240,10 @@
|
||||
@@ -248,6 +249,10 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||
# only-non-binary-in-usr-lib false positives
|
||||
binary_in_usr_lib = True
|
||||
|
||||
@ -19,7 +21,7 @@
|
||||
is_elf = 'ELF' in pkgfile.magic
|
||||
is_ar = 'current ar archive' in pkgfile.magic
|
||||
is_ocaml_native = 'Objective caml native' in pkgfile.magic
|
||||
@@ -433,9 +438,12 @@
|
||||
@@ -442,9 +447,12 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||
if version and version != -1 and version not in pkg.name:
|
||||
printError(pkg, 'incoherent-version-in-name', version)
|
||||
|
||||
@ -33,7 +35,7 @@
|
||||
if has_usr_lib_file and not binary_in_usr_lib:
|
||||
printWarning(pkg, 'only-non-binary-in-usr-lib')
|
||||
|
||||
@@ -459,6 +467,11 @@
|
||||
@@ -468,6 +476,11 @@ FHS and the FSSTND forbid this.''',
|
||||
# 'non-sparc32-binary',
|
||||
# '',
|
||||
|
||||
|
@ -11,7 +11,7 @@ Index: InitScriptCheck.py
|
||||
|
||||
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)
|
||||
@@ -64,6 +64,9 @@ class InitScriptCheck(AbstractCheck.Abst
|
||||
@@ -63,6 +63,9 @@ class InitScriptCheck(AbstractCheck.Abst
|
||||
not fname.startswith('/etc/rc.d/init.d/'):
|
||||
continue
|
||||
|
||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
||||
===================================================================
|
||||
--- TagsCheck.py.orig
|
||||
+++ TagsCheck.py
|
||||
@@ -712,6 +712,8 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
@@ -714,6 +714,8 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
self._unexpanded_macros(pkg, 'Group', group)
|
||||
if not group:
|
||||
printError(pkg, 'no-group-tag')
|
||||
@ -11,7 +11,7 @@ Index: TagsCheck.py
|
||||
elif VALID_GROUPS and group not in VALID_GROUPS:
|
||||
printWarning(pkg, 'non-standard-group', group)
|
||||
|
||||
@@ -1022,6 +1024,10 @@ won't fool the specfile parser, and rebu
|
||||
@@ -1024,6 +1026,10 @@ won't fool the specfile parser, and rebu
|
||||
'''There is no Group tag in your package. You have to specify a valid group
|
||||
in your spec file using the Group tag.''',
|
||||
|
||||
|
@ -2,7 +2,7 @@ Index: Pkg.py
|
||||
===================================================================
|
||||
--- Pkg.py.orig
|
||||
+++ Pkg.py
|
||||
@@ -496,7 +496,7 @@ class Pkg:
|
||||
@@ -492,7 +492,7 @@ class Pkg:
|
||||
dir = self.dirname)
|
||||
# TODO: better shell escaping or sequence based command invocation
|
||||
command_str = \
|
||||
|
@ -8,11 +8,11 @@ git-svn-id: http://rpmlint.zarb.org/svn/trunk@1862 9bc8b190-ac0f-0410-8968-dc7d1
|
||||
Filter.py | 2 +-
|
||||
1 files changed, 1 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/Filter.py b/Filter.py
|
||||
index 5f076cd..6549131 100644
|
||||
--- a/Filter.py
|
||||
+++ b/Filter.py
|
||||
@@ -49,7 +49,7 @@ def _print(msgtype, pkg, reason, details):
|
||||
Index: rpmlint-1.2/Filter.py
|
||||
===================================================================
|
||||
--- rpmlint-1.2.orig/Filter.py
|
||||
+++ rpmlint-1.2/Filter.py
|
||||
@@ -44,7 +44,7 @@ def _print(msgtype, pkg, reason, details
|
||||
badness = Config.badness(reason)
|
||||
# anything with badness is an error
|
||||
if badness:
|
||||
@ -21,6 +21,3 @@ index 5f076cd..6549131 100644
|
||||
# errors without badness become warnings
|
||||
elif msgtype == 'E':
|
||||
msgtype = 'W'
|
||||
--
|
||||
1.7.3.4
|
||||
|
||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
||||
===================================================================
|
||||
--- FilesCheck.py.orig
|
||||
+++ FilesCheck.py
|
||||
@@ -1238,7 +1238,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
@@ -1252,7 +1252,7 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
elif interpreter or mode & 0111 != 0 or \
|
||||
script_regex.search(f):
|
||||
if interpreter:
|
||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
||||
===================================================================
|
||||
--- TagsCheck.py.orig
|
||||
+++ TagsCheck.py
|
||||
@@ -815,6 +815,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
@@ -817,6 +817,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
|
||||
obs_names = [x[0] for x in pkg.obsoletes()]
|
||||
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):
|
||||
printWarning(pkg, 'obsolete-not-provided', o)
|
||||
@@ -826,6 +827,8 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
@@ -828,6 +829,8 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
# https://bugzilla.redhat.com/460872
|
||||
useless_provides = []
|
||||
for p in prov_names:
|
||||
@ -19,7 +19,7 @@ Index: TagsCheck.py
|
||||
if prov_names.count(p) != 1 and p not in useless_provides:
|
||||
useless_provides.append(p)
|
||||
for p in useless_provides:
|
||||
@@ -966,6 +969,10 @@ the Release tag.''',
|
||||
@@ -968,6 +971,10 @@ the Release tag.''',
|
||||
'''There is no Name tag in your package. You have to specify a name using the
|
||||
Name tag.''',
|
||||
|
||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
||||
===================================================================
|
||||
--- FilesCheck.py.orig
|
||||
+++ FilesCheck.py
|
||||
@@ -1261,7 +1261,8 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
@@ -1275,7 +1275,8 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
f.endswith('.la')):
|
||||
printError(pkg, 'script-without-shebang', f)
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
--- BinariesCheck.py
|
||||
Index: BinariesCheck.py
|
||||
===================================================================
|
||||
--- BinariesCheck.py.orig
|
||||
+++ BinariesCheck.py
|
||||
@@ -10,13 +10,15 @@
|
||||
|
||||
@ -17,7 +19,7 @@
|
||||
|
||||
|
||||
DEFAULT_SYSTEM_LIB_PATHS = (
|
||||
@@ -37,6 +39,9 @@
|
||||
@@ -37,6 +39,9 @@ class BinaryInfo:
|
||||
unused_regex = re.compile('^\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|$)')
|
||||
@ -27,7 +29,7 @@
|
||||
|
||||
def __init__(self, pkg, path, file, is_ar, is_shlib):
|
||||
self.readelf_error = False
|
||||
@@ -50,7 +55,10 @@
|
||||
@@ -50,7 +55,10 @@ class BinaryInfo:
|
||||
self.stack = False
|
||||
self.exec_stack = False
|
||||
self.exit_calls = []
|
||||
@ -38,7 +40,7 @@
|
||||
self.tail = ''
|
||||
|
||||
is_debug = path.endswith('.debug')
|
||||
@@ -93,6 +101,11 @@
|
||||
@@ -93,6 +101,11 @@ class BinaryInfo:
|
||||
self.exec_stack = True
|
||||
continue
|
||||
|
||||
@ -50,7 +52,7 @@
|
||||
if is_shlib:
|
||||
r = BinaryInfo.exit_call_regex.search(l)
|
||||
if r:
|
||||
@@ -103,6 +116,14 @@
|
||||
@@ -103,6 +116,14 @@ class BinaryInfo:
|
||||
fork_called = True
|
||||
continue
|
||||
|
||||
@ -65,7 +67,7 @@
|
||||
if self.non_pic:
|
||||
self.non_pic = 'TEXTREL' in res[1]
|
||||
|
||||
@@ -263,13 +284,26 @@
|
||||
@@ -272,13 +293,26 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||
continue
|
||||
|
||||
# stripped ?
|
||||
@ -93,7 +95,7 @@
|
||||
if is_shlib:
|
||||
has_lib = True
|
||||
|
||||
@@ -319,6 +353,10 @@
|
||||
@@ -328,6 +362,10 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||
for ec in bin_info.exit_calls:
|
||||
printWarning(pkg, 'shared-lib-calls-exit', fname, ec)
|
||||
|
||||
@ -104,7 +106,7 @@
|
||||
# rpath ?
|
||||
if bin_info.rpath:
|
||||
for p in bin_info.rpath:
|
||||
@@ -504,6 +542,14 @@
|
||||
@@ -513,6 +551,14 @@ with the intended shared libraries only.
|
||||
'ldd-failed',
|
||||
'''Executing ldd on this file failed, all checks could not be run.''',
|
||||
|
||||
@ -119,7 +121,7 @@
|
||||
'executable-stack',
|
||||
'''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
|
||||
@@ -516,6 +562,10 @@
|
||||
@@ -525,6 +571,10 @@ don\'t define a proper .note.GNU-stack s
|
||||
make the stack executable. Usual suspects include use of a non-GNU linker or
|
||||
an old GNU linker version.''',
|
||||
|
||||
@ -130,7 +132,7 @@
|
||||
'shared-lib-calls-exit',
|
||||
'''This library package calls exit() or _exit(), probably in a non-fork()
|
||||
context. Doing so from a library is strongly discouraged - when a library
|
||||
@@ -533,6 +583,12 @@
|
||||
@@ -542,6 +592,12 @@ form, make sure that rpmbuild does not s
|
||||
that use prelink, make sure that prelink does not strip it either, usually by
|
||||
placing a blacklist file in /etc/prelink.conf.d. For more information, see
|
||||
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256900#49''',
|
||||
|
@ -2,7 +2,7 @@ Index: FilesCheck.py
|
||||
===================================================================
|
||||
--- FilesCheck.py.orig
|
||||
+++ FilesCheck.py
|
||||
@@ -944,6 +944,16 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
@@ -952,6 +952,16 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
if res.group(1) != pkg.name:
|
||||
printError(pkg, 'incoherent-logrotate-file', f)
|
||||
|
||||
@ -19,7 +19,7 @@ Index: FilesCheck.py
|
||||
if link != '':
|
||||
ext = compr_regex.search(link)
|
||||
if ext:
|
||||
@@ -1739,6 +1749,24 @@ consequences), or other compiler flags w
|
||||
@@ -1760,6 +1770,24 @@ consequences), or other compiler flags w
|
||||
extraction not working as expected. Verify that the binaries are not
|
||||
unexpectedly stripped and that the intended compiler flags are used.''',
|
||||
|
||||
|
@ -8,11 +8,11 @@ git-svn-id: http://rpmlint.zarb.org/svn/trunk@1863 9bc8b190-ac0f-0410-8968-dc7d1
|
||||
FilesCheck.py | 16 ++++++++++++++++
|
||||
1 files changed, 16 insertions(+), 0 deletions(-)
|
||||
|
||||
Index: rpmlint-1.1/FilesCheck.py
|
||||
Index: rpmlint-1.2/FilesCheck.py
|
||||
===================================================================
|
||||
--- rpmlint-1.1.orig/FilesCheck.py
|
||||
+++ rpmlint-1.1/FilesCheck.py
|
||||
@@ -911,6 +911,12 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
--- rpmlint-1.2.orig/FilesCheck.py
|
||||
+++ rpmlint-1.2/FilesCheck.py
|
||||
@@ -915,6 +915,12 @@ class FilesCheck(AbstractCheck.AbstractC
|
||||
printError(pkg, 'dir-or-file-in-usr-local', f)
|
||||
elif f.startswith('/var/local/'):
|
||||
printError(pkg, 'dir-or-file-in-var-local', f)
|
||||
@ -25,7 +25,7 @@ Index: rpmlint-1.1/FilesCheck.py
|
||||
elif sub_bin_regex.search(f):
|
||||
printError(pkg, 'subdir-in-bin', f)
|
||||
elif f.startswith('/home/'):
|
||||
@@ -1478,6 +1484,16 @@ for packages to install files in this di
|
||||
@@ -1491,6 +1497,16 @@ for packages to install files in this di
|
||||
'''A file in the package is located in /var/local. It's not permitted
|
||||
for packages to install files in this directory.''',
|
||||
|
||||
|
@ -1,15 +1,34 @@
|
||||
--- Config.py
|
||||
Index: Config.py
|
||||
===================================================================
|
||||
--- Config.py.orig
|
||||
+++ Config.py
|
||||
@@ -115,6 +115,8 @@
|
||||
# List of filters
|
||||
@@ -116,12 +116,23 @@ def getOption(name, default = ""):
|
||||
_filters = []
|
||||
_filters_re = None
|
||||
|
||||
+_filters_non_except = []
|
||||
+_filters_non_except_re = None
|
||||
+
|
||||
+_filters_except = []
|
||||
+_filters_except_re = None
|
||||
|
||||
+
|
||||
def addFilter(s):
|
||||
global _filters
|
||||
@@ -137,8 +139,14 @@
|
||||
global _filters_re
|
||||
+ global _filters_except
|
||||
|
||||
- _filters.append(s)
|
||||
- _filters_re = None
|
||||
+ if len(_filters_except):
|
||||
+ _filters.append(s)
|
||||
+ _filters_re = None
|
||||
+ else:
|
||||
+ _filters_non_except.append(s)
|
||||
+ _filters_non_except_re = None
|
||||
|
||||
def removeFilter(s):
|
||||
global _filters
|
||||
@@ -137,8 +148,14 @@ def removeFilter(s):
|
||||
_scoring = {}
|
||||
|
||||
def setBadness(s, score):
|
||||
@ -24,16 +43,36 @@
|
||||
def badness(s):
|
||||
return _scoring.get(s, 0)
|
||||
|
||||
@@ -146,6 +154,8 @@
|
||||
@@ -146,11 +163,24 @@ _non_named_group_re = re.compile('[^\\](
|
||||
def isFiltered(s):
|
||||
global _filters
|
||||
global _filters_re
|
||||
+ global _filters_except
|
||||
+ global _filters_except_re
|
||||
+ global _filters_non_except
|
||||
+ global _filters_non_except_re
|
||||
|
||||
if _filters_re == None:
|
||||
# no filter
|
||||
@@ -162,7 +172,21 @@
|
||||
- if _filters_re == None:
|
||||
- # no filter
|
||||
- if len(_filters) == 0:
|
||||
- return False
|
||||
+ if _filters_non_except_re == None and len(_filters_non_except):
|
||||
+ _filters_non_except_re = '(?:' + _filters_non_except[0] + ')'
|
||||
+
|
||||
+ for idx in range(1, len(_filters_non_except)):
|
||||
+ # to prevent named group overflow that happen when there is too
|
||||
+ # many () in a single regexp: AssertionError: sorry, but this
|
||||
+ # version only supports 100 named groups
|
||||
+ if '(' in _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 = re.compile(_filters_non_except_re)
|
||||
+
|
||||
+ if _filters_re == None and len(_filters):
|
||||
_filters_re = '(?:' + _filters[0] + ')'
|
||||
|
||||
for idx in range(1, len(_filters)):
|
||||
@@ -162,7 +192,24 @@ def isFiltered(s):
|
||||
_filters_re = _filters_re + '|(?:' + _filters[idx] +')'
|
||||
_filters_re = re.compile(_filters_re)
|
||||
|
||||
@ -50,6 +89,9 @@
|
||||
+ _filters_except_re = re.compile(_filters_except_re)
|
||||
+
|
||||
if not no_exception:
|
||||
+
|
||||
+ if _filters_non_except_re and _filters_non_except_re.search(s):
|
||||
+ return True
|
||||
+ if _filters_except_re and _filters_except_re.search(s):
|
||||
+ return False
|
||||
if _filters_re.search(s):
|
||||
|
@ -13,7 +13,7 @@ Index: SpecCheck.py
|
||||
if current_section == 'changelog':
|
||||
for match in AbstractCheck.macro_regex.findall(line):
|
||||
res = re.match('%+', match)
|
||||
@@ -715,6 +719,14 @@ may break short circuit builds.''',
|
||||
@@ -716,6 +720,14 @@ may break short circuit builds.''',
|
||||
'''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.''',
|
||||
|
||||
|
@ -10,7 +10,7 @@ Index: TagsCheck.py
|
||||
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
|
||||
@@ -627,10 +628,12 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
@@ -629,10 +630,12 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
base = is_devel.group(1)
|
||||
dep = None
|
||||
has_so = False
|
||||
@ -24,7 +24,7 @@ Index: TagsCheck.py
|
||||
if has_so:
|
||||
base_or_libs = base + '/' + base + '-libs/lib' + base
|
||||
# try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)")
|
||||
@@ -667,6 +670,15 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
@@ -669,6 +672,15 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
if prov not in (x[0] for x in pkg.provides()):
|
||||
printWarning(pkg, 'no-provides', prov)
|
||||
|
||||
@ -40,7 +40,7 @@ Index: TagsCheck.py
|
||||
# List of words to ignore in spell check
|
||||
ignored_words = set()
|
||||
for pf in pkg.files():
|
||||
@@ -1104,6 +1116,11 @@ instead or require a file in bin or /etc
|
||||
@@ -1106,6 +1118,11 @@ instead or require a file in bin or /etc
|
||||
'no-url-tag',
|
||||
'''The URL tag is missing. Please add a http or ftp link to the project location.''',
|
||||
|
||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
||||
===================================================================
|
||||
--- TagsCheck.py.orig
|
||||
+++ TagsCheck.py
|
||||
@@ -635,10 +635,10 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
@@ -637,10 +637,10 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
if pkg_config_regex.match(fname) and fname.endswith('.pc'):
|
||||
has_pc = True
|
||||
if has_so:
|
||||
|
@ -1,6 +1,8 @@
|
||||
--- SpecCheck.py
|
||||
Index: SpecCheck.py
|
||||
===================================================================
|
||||
--- SpecCheck.py.orig
|
||||
+++ SpecCheck.py
|
||||
@@ -597,8 +597,8 @@
|
||||
@@ -598,8 +598,8 @@ SPEC file to build a valid RPM package.'
|
||||
("Name:" tag). Either rename your package or the specfile.''',
|
||||
|
||||
'non-utf8-spec-file',
|
||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
||||
===================================================================
|
||||
--- TagsCheck.py.orig
|
||||
+++ TagsCheck.py
|
||||
@@ -776,7 +776,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
@@ -778,7 +778,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
if not valid_license:
|
||||
self._unexpanded_macros(pkg, 'License', rpm_license)
|
||||
|
||||
@ -11,7 +11,7 @@ Index: TagsCheck.py
|
||||
if hasattr(rpm, 'RPMTAG_%s' % tag.upper()):
|
||||
url = pkg[getattr(rpm, 'RPMTAG_%s' % tag.upper())]
|
||||
self._unexpanded_macros(pkg, tag, url, is_url = True)
|
||||
@@ -1092,7 +1092,7 @@ once.''',
|
||||
@@ -1094,7 +1094,7 @@ once.''',
|
||||
'''This rpm requires a specific release of another package.''',
|
||||
|
||||
'no-url-tag',
|
||||
|
@ -2,7 +2,7 @@ Index: BinariesCheck.py
|
||||
===================================================================
|
||||
--- BinariesCheck.py.orig
|
||||
+++ BinariesCheck.py
|
||||
@@ -197,6 +197,7 @@ usr_lib_exception_regex = re.compile(Con
|
||||
@@ -206,6 +206,7 @@ usr_lib_exception_regex = re.compile(Con
|
||||
srcname_regex = re.compile('(.*?)-[0-9]')
|
||||
invalid_dir_ref_regex = re.compile('/(home|tmp)(\W|$)')
|
||||
ocaml_mixed_regex = re.compile('^Caml1999X0\d\d$')
|
||||
@ -10,7 +10,7 @@ Index: BinariesCheck.py
|
||||
|
||||
def dir_base(path):
|
||||
res = path_regex.search(path)
|
||||
@@ -269,7 +270,7 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||
@@ -278,7 +279,7 @@ class BinariesCheck(AbstractCheck.Abstra
|
||||
# arch dependent packages only from here on
|
||||
|
||||
# in /usr/share ?
|
||||
|
@ -2,7 +2,7 @@ Index: TagsCheck.py
|
||||
===================================================================
|
||||
--- TagsCheck.py.orig
|
||||
+++ TagsCheck.py
|
||||
@@ -809,7 +809,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
@@ -811,7 +811,7 @@ class TagsCheck(AbstractCheck.AbstractCh
|
||||
printWarning(pkg, 'no-url-tag')
|
||||
|
||||
obs_names = [x[0] for x in pkg.obsoletes()]
|
||||
|
Loading…
Reference in New Issue
Block a user