diff --git a/avoid-mismatched-libregex.diff b/avoid-mismatched-libregex.diff index f6267ff..842ccaa 100644 --- a/avoid-mismatched-libregex.diff +++ b/avoid-mismatched-libregex.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -659,7 +659,7 @@ buildconfig_rpath_regex = re.compile('(? +@@ -654,7 +654,7 @@ buildconfig_rpath_regex = re.compile('(? sofile_regex = re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$') devel_regex = re.compile('(.*)-(debug(info)?|devel|headers|source|static)$') debuginfo_package_regex = re.compile('-debug(info)?$') diff --git a/better-wrong-script.diff b/better-wrong-script.diff index 27b77ab..6b31524 100644 --- a/better-wrong-script.diff +++ b/better-wrong-script.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -1702,7 +1702,10 @@ executed.''', +@@ -1697,7 +1697,10 @@ executed.''', executed.''', 'wrong-script-interpreter', diff --git a/devel-provide-is-devel-package.diff b/devel-provide-is-devel-package.diff index 4c0acd0..1ec356b 100644 --- a/devel-provide-is-devel-package.diff +++ b/devel-provide-is-devel-package.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -847,6 +847,10 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -842,6 +842,10 @@ class FilesCheck(AbstractCheck.AbstractC # Check if the package is a development package devel_pkg = devel_regex.search(pkg.name) diff --git a/docdata-examples.diff b/docdata-examples.diff index d79288a..5b13118 100644 --- a/docdata-examples.diff +++ b/docdata-examples.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -653,6 +653,7 @@ bin_regex = re.compile('^/(?:usr/(?:s?bi +@@ -648,6 +648,7 @@ bin_regex = re.compile('^/(?:usr/(?:s?bi includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE) develfile_regex = re.compile('\.(a|cmxa?|mli?)$') 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... buildconfig_rpath_regex = re.compile('(?:-rpath|Wl,-R)\\b') sofile_regex = re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$') -@@ -1204,7 +1205,7 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -1199,7 +1200,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: -@@ -1576,7 +1577,10 @@ included in your package.''', +@@ -1571,7 +1572,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 diff --git a/extend-suse-conffiles-check.diff b/extend-suse-conffiles-check.diff index 51f5471..4ffaaaa 100644 --- a/extend-suse-conffiles-check.diff +++ b/extend-suse-conffiles-check.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -1222,7 +1222,7 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -1217,7 +1217,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 \ diff --git a/no-badness-return.diff b/no-badness-return.diff index 0f0abe8..592046e 100644 --- a/no-badness-return.diff +++ b/no-badness-return.diff @@ -2,7 +2,7 @@ Index: Filter.py =================================================================== --- Filter.py.orig +++ Filter.py -@@ -109,7 +109,7 @@ def printAllReasons(): +@@ -112,7 +112,7 @@ def printAllReasons(): if len(last_reason): printDescriptions(last_reason) last_reason = reason @@ -15,7 +15,7 @@ Index: rpmlint =================================================================== --- rpmlint.orig +++ rpmlint -@@ -211,7 +211,7 @@ def main(): +@@ -212,7 +212,7 @@ def main(): % (packages_checked, specfiles_checked, printed_messages["E"], printed_messages["W"]) diff --git a/no-doc-for-lib.diff b/no-doc-for-lib.diff index 41a1f4f..7254762 100644 --- a/no-doc-for-lib.diff +++ b/no-doc-for-lib.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -864,7 +864,7 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -859,7 +859,7 @@ class FilesCheck(AbstractCheck.AbstractC debuginfo_srcs = False debuginfo_debugs = False diff --git a/python3_magic_number_fix.diff b/python3_magic_number_fix.diff index 952f728..183fccf 100644 --- a/python3_magic_number_fix.diff +++ b/python3_magic_number_fix.diff @@ -1,6 +1,8 @@ ---- FilesCheck.py +Index: FilesCheck.py +=================================================================== +--- FilesCheck.py.orig +++ FilesCheck.py -@@ -286,7 +286,7 @@ +@@ -753,7 +753,7 @@ def peek(filename, pkg, length=1024): istext = float(len(t))/len(chunk) <= 0.30 return (chunk, istext) @@ -9,7 +11,7 @@ # the values here. _python_magic_values = { '2.2': 60717, -@@ -298,7 +298,7 @@ +@@ -765,7 +765,7 @@ _python_magic_values = { '3.0': 3130, '3.1': 3150, '3.2': 3180, diff --git a/rpmlint.changes b/rpmlint.changes index 4c4d97b..5f398ce 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Feb 26 11:07:12 UTC 2013 - dmueller@suse.com + +- add suse-filter-more-verbose.diff: + * make it more obvious which rpmlintrc causes an exception (bnc#801192) + ------------------------------------------------------------------- Mon Feb 18 09:29:48 UTC 2013 - meissner@suse.com diff --git a/rpmlint.spec b/rpmlint.spec index 5dfcfbc..8839672 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -63,6 +63,7 @@ Patch7: suse-pkg-config-check.diff Patch8: suse-binarieschecks.diff Patch9: no-doc-for-lib.diff Patch10: add-scoring-support.diff +Patch11: suse-filter-more-verbose.diff Patch12: usr-arch.diff Patch13: script-interpreter-only-for-exec-scripts.diff Patch14: sourced-dirs.diff @@ -139,6 +140,7 @@ source packages can be checked. %patch8 %patch9 #%patch10 +%patch11 %patch12 %patch13 %patch14 diff --git a/script-interpreter-only-for-exec-scripts.diff b/script-interpreter-only-for-exec-scripts.diff index 3eae3d3..1052d8c 100644 --- a/script-interpreter-only-for-exec-scripts.diff +++ b/script-interpreter-only-for-exec-scripts.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -1254,7 +1254,7 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -1249,7 +1249,7 @@ class FilesCheck(AbstractCheck.AbstractC elif interpreter or mode & 0111 != 0 or \ script_regex.search(f): if interpreter: diff --git a/selfconflicts-provide.diff b/selfconflicts-provide.diff index 78689c9..bb1cd90 100644 --- a/selfconflicts-provide.diff +++ b/selfconflicts-provide.diff @@ -2,7 +2,7 @@ Index: TagsCheck.py =================================================================== --- TagsCheck.py.orig +++ TagsCheck.py -@@ -817,6 +817,7 @@ class TagsCheck(AbstractCheck.AbstractCh +@@ -819,6 +819,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) -@@ -828,6 +829,8 @@ class TagsCheck(AbstractCheck.AbstractCh +@@ -830,6 +831,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: -@@ -968,6 +971,10 @@ the Release tag.''', +@@ -970,6 +973,10 @@ the Release tag.''', '''There is no Name tag in your package. You have to specify a name using the Name tag.''', diff --git a/sourced-dirs.diff b/sourced-dirs.diff index 9f96761..93b9252 100644 --- a/sourced-dirs.diff +++ b/sourced-dirs.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -686,7 +686,7 @@ manifest_perl_regex = re.compile('^/usr/ +@@ -681,7 +681,7 @@ manifest_perl_regex = re.compile('^/usr/ shebang_regex = re.compile('^#!\s*(\S+)') 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)))/') diff --git a/stricter-interpreter-check.diff b/stricter-interpreter-check.diff index ea57521..d781be3 100644 --- a/stricter-interpreter-check.diff +++ b/stricter-interpreter-check.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -1277,7 +1277,8 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -1272,7 +1272,8 @@ class FilesCheck(AbstractCheck.AbstractC f.endswith('.la')): printError(pkg, 'script-without-shebang', f) diff --git a/suse-check-optional-dependencies.diff b/suse-check-optional-dependencies.diff index fc4c0e0..db7f5be 100644 --- a/suse-check-optional-dependencies.diff +++ b/suse-check-optional-dependencies.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -953,6 +953,16 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -948,6 +948,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: -@@ -1762,6 +1772,24 @@ consequences), or other compiler flags w +@@ -1757,6 +1767,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.''', diff --git a/suse-filter-more-verbose.diff b/suse-filter-more-verbose.diff new file mode 100644 index 0000000..fe9d4b0 --- /dev/null +++ b/suse-filter-more-verbose.diff @@ -0,0 +1,48 @@ +--- Config.py ++++ Config.py +@@ -11,6 +11,7 @@ + import locale + import os.path + import re ++import sys + + try: + from __version__ import __version__ +@@ -163,7 +164,17 @@ + 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) ++ try: ++ _filters_non_except_re = re.compile(_filters_non_except_re) ++ except Exception: ++ # Try to figure out which filter caused the error ++ for f in _filters_non_except[1:]: ++ try: ++ re.compile(f) ++ except Exception as e: ++ # can't use Pkg.error/warn here, as that would recurse ++ print >> sys.stderr, "(none): E: %s in filter '%s'" % (e.message, f) ++ sys.exit(2) + + if _filters_re == None and len(_filters): + _filters_re = '(?:' + _filters[0] + ')' +@@ -175,7 +186,17 @@ + if '(' in _filters[idx]: + _non_named_group_re.subn('(:?', _filters[idx]) + _filters_re = _filters_re + '|(?:' + _filters[idx] +')' +- _filters_re = re.compile(_filters_re) ++ try: ++ _filters_re = re.compile(_filters_re) ++ except Exception: ++ # Try to figure out which filter caused the error ++ for f in _filters[1:]: ++ try: ++ re.compile(f) ++ except Exception as e: ++ # can't use Pkg.error/warn here, as that would recurse ++ print >> sys.stderr, "(none): E: %s in filter '%s'" % (e.message, f) ++ sys.exit(2) + + if _filters_except_re == None and len(_filters_except): + _filters_except_re = '(?:' + _filters_except[0] + ')' diff --git a/suse-g-ir-chech.diff b/suse-g-ir-chech.diff index aab20b3..946586c 100644 --- a/suse-g-ir-chech.diff +++ b/suse-g-ir-chech.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -651,7 +651,7 @@ points_regex = re.compile('^\.\./(.*)') +@@ -646,7 +646,7 @@ points_regex = re.compile('^\.\./(.*)') 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)/(.*)') includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE) diff --git a/suse-manpages-for-rc-scripts.patch b/suse-manpages-for-rc-scripts.patch index 3e01918..007b9ac 100644 --- a/suse-manpages-for-rc-scripts.patch +++ b/suse-manpages-for-rc-scripts.patch @@ -1,7 +1,8 @@ -diff -ruN a/FilesCheck.py b/FilesCheck.py ---- a/FilesCheck.py 2011-12-04 17:22:02.000000000 +0100 -+++ b/FilesCheck.py 2012-12-07 13:48:46.544507295 +0100 -@@ -948,7 +948,7 @@ +Index: rpmlint-1.4/FilesCheck.py +=================================================================== +--- rpmlint-1.4.orig/FilesCheck.py ++++ rpmlint-1.4/FilesCheck.py +@@ -1434,7 +1434,7 @@ class FilesCheck(AbstractCheck.AbstractC for exe, paths in bindir_exes.items(): if len(paths) > 1: printWarning(pkg, "duplicate-executable", exe, paths) diff --git a/suse-python-abi-check.diff b/suse-python-abi-check.diff index 9a32400..557471a 100644 --- a/suse-python-abi-check.diff +++ b/suse-python-abi-check.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -1153,8 +1153,11 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -1148,8 +1148,11 @@ class FilesCheck(AbstractCheck.AbstractC if res and not (pkg.check_versioned_dep('python-base', res.group(1)) or pkg.check_versioned_dep('python', diff --git a/version-control-internal-file.diff b/version-control-internal-file.diff index 97261fd..15da5ce 100644 --- a/version-control-internal-file.diff +++ b/version-control-internal-file.diff @@ -3,7 +3,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -664,7 +664,7 @@ ldconfig_regex = re.compile('^[^#]*ldcon +@@ -659,7 +659,7 @@ ldconfig_regex = re.compile('^[^#]*ldcon depmod_regex = re.compile('^[^#]*depmod', re.MULTILINE) install_info_regex = re.compile('^[^#]*install-info', re.MULTILINE) perl_temp_file_regex = re.compile('.*perl.*/(\.packlist|perllocal\.pod)$')