diff --git a/LibraryPolicyCheck.py b/LibraryPolicyCheck.py index 1db5506..ef2b43d 100644 --- a/LibraryPolicyCheck.py +++ b/LibraryPolicyCheck.py @@ -589,12 +589,13 @@ class LibraryPolicyCheck(AbstractCheck.AbstractCheck): if os.path.isdir(pkg.dirName()+f): dirs.add(f) - # Verify it doesn't have hard dependency on non-lib packages - for dep in pkg.requires(): - if (dep[0].startswith('rpmlib(')): - continue - if (dep[2] & (rpm.RPMSENSE_GREATER | rpm.RPMSENSE_EQUAL)) == rpm.RPMSENSE_EQUAL: - printWarning(pkg, "shlib-fixed-dependency", Pkg.formatRequire(dep[0], dep[1], dep[2])) + # Verify shared lib policy package doesn't have hard dependency on non-lib packages + if std_lib_package: + for dep in pkg.requires(): + if (dep[0].startswith('rpmlib(')): + continue + if (dep[2] & (rpm.RPMSENSE_GREATER | rpm.RPMSENSE_EQUAL)) == rpm.RPMSENSE_EQUAL: + printWarning(pkg, "shlib-fixed-dependency", Pkg.formatRequire(dep[0], dep[1], dep[2])) # Verify non-lib stuff does not add dependencies if libs: diff --git a/avoid-mismatched-libregex.diff b/avoid-mismatched-libregex.diff index a8b81bc..d0a4212 100644 --- a/avoid-mismatched-libregex.diff +++ b/avoid-mismatched-libregex.diff @@ -1,6 +1,8 @@ ---- FilesCheck.py +Index: FilesCheck.py +=================================================================== +--- FilesCheck.py.orig +++ FilesCheck.py -@@ -184,7 +184,7 @@ +@@ -658,7 +658,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 47d275c..f38115b 100644 --- a/better-wrong-script.diff +++ b/better-wrong-script.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -1470,7 +1470,10 @@ customize an executable, make it for exa +@@ -1617,7 +1617,10 @@ executed.''', executed.''', 'wrong-script-interpreter', diff --git a/buildroot-doc.diff b/buildroot-doc.diff index 883f314..4b6b363 100644 --- a/buildroot-doc.diff +++ b/buildroot-doc.diff @@ -2,7 +2,7 @@ Index: SpecCheck.py =================================================================== --- SpecCheck.py.orig +++ SpecCheck.py -@@ -539,7 +539,7 @@ allow building the package as non root o +@@ -612,7 +612,7 @@ versions you can ignore this warning.''' 'hardcoded-path-in-buildroot-tag', '''A path is hardcoded in your Buildroot tag. It should be replaced diff --git a/buildroot-in-scripts.diff b/buildroot-in-scripts.diff index cd0a771..0728c15 100644 --- a/buildroot-in-scripts.diff +++ b/buildroot-in-scripts.diff @@ -1,6 +1,8 @@ ---- SpecCheck.py +Index: SpecCheck.py +=================================================================== +--- SpecCheck.py.orig +++ SpecCheck.py -@@ -59,7 +59,10 @@ +@@ -60,7 +60,10 @@ suse_version_regex = re.compile('%suse_v section_regexs = dict( ([x, re.compile('^%' + x + '(?:\s|$)')] for x in ('build', 'changelog', 'check', 'clean', 'description', 'files', @@ -12,7 +14,7 @@ # Only check for /lib, /usr/lib, /usr/X11R6/lib # TODO: better handling of X libraries and modules. -@@ -264,7 +267,9 @@ +@@ -265,7 +268,9 @@ class SpecCheck(AbstractCheck.AbstractCh continue diff --git a/dependency-parsing.diff b/dependency-parsing.diff index 94d490c..2438857 100644 --- a/dependency-parsing.diff +++ b/dependency-parsing.diff @@ -2,7 +2,7 @@ Index: SpecCheck.py =================================================================== --- SpecCheck.py.orig +++ SpecCheck.py -@@ -112,7 +112,7 @@ def deptokens(line): +@@ -117,7 +117,7 @@ def deptokens(line): elif wantmore: tmp += ' ' + tok wantmore = False diff --git a/description-check.diff b/description-check.diff index 0b4d60e..394c90a 100644 --- a/description-check.diff +++ b/description-check.diff @@ -1,6 +1,8 @@ ---- TagsCheck.py +Index: TagsCheck.py +=================================================================== +--- TagsCheck.py.orig +++ TagsCheck.py -@@ -660,6 +660,9 @@ +@@ -676,6 +676,9 @@ class TagsCheck(AbstractCheck.AbstractCh if not description: printError(pkg, 'no-description-tag') else: @@ -10,7 +12,7 @@ if not pkg[rpm.RPMTAG_HEADERI18NTABLE]: self._unexpanded_macros(pkg, '%description', description) else: -@@ -928,6 +931,10 @@ +@@ -946,6 +949,10 @@ Name tag.''', '''The major number of the library isn't included in the package's name. ''', diff --git a/devel-provide-is-devel-package.diff b/devel-provide-is-devel-package.diff index e4f472b..fb8fa90 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 -@@ -761,6 +761,10 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -813,6 +813,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 65420cd..68394fb 100644 --- a/docdata-examples.diff +++ b/docdata-examples.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -651,6 +651,7 @@ bin_regex = re.compile('^(/usr)?/s?bin/' +@@ -652,6 +652,7 @@ bin_regex = re.compile('^(/usr)?/s?bin/' includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE) 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$') -@@ -1035,7 +1036,7 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -1151,7 +1152,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/'): if f not in config_files and f not in ghost_files: -@@ -1346,7 +1347,10 @@ included in your package.''', +@@ -1491,7 +1492,10 @@ included in your package.''', 'spurious-executable-perm', '''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/fix-buildroot-test.diff b/fix-buildroot-test.diff index 1c82d63..18f7c7f 100644 --- a/fix-buildroot-test.diff +++ b/fix-buildroot-test.diff @@ -2,7 +2,7 @@ Index: SpecCheck.py =================================================================== --- SpecCheck.py.orig +++ SpecCheck.py -@@ -29,7 +29,7 @@ applied_patch_regex = re.compile("^%patc +@@ -35,7 +35,7 @@ applied_patch_regex = re.compile("^%patc applied_patch_p_regex = re.compile("\s-P\s+(\d+)\\b") source_dir_regex = re.compile("^[^#]*(\$RPM_SOURCE_DIR|%{?_sourcedir}?)") obsolete_tags_regex = re.compile("^(Copyright|Serial)\s*:\s*([^\s]+)") diff --git a/invalid-filerequires.diff b/invalid-filerequires.diff index 00cefdf..691f1a9 100644 --- a/invalid-filerequires.diff +++ b/invalid-filerequires.diff @@ -2,7 +2,7 @@ Index: TagsCheck.py =================================================================== --- TagsCheck.py.orig +++ TagsCheck.py -@@ -402,6 +402,7 @@ invalid_version_regex = re.compile('([0- +@@ -419,6 +419,7 @@ invalid_version_regex = re.compile('([0- # () are here for grouping purpose in the regexp forbidden_words_regex = re.compile('(' + Config.getOption('ForbiddenWords') + ')', re.IGNORECASE) valid_buildhost_regex = re.compile(Config.getOption('ValidBuildHost')) @@ -10,7 +10,7 @@ Index: TagsCheck.py epoch_regex = re.compile('^[0-9]+:') use_epoch = Config.getOption('UseEpoch', False) use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT) -@@ -484,6 +485,9 @@ class TagsCheck(AbstractCheck.AbstractCh +@@ -580,6 +581,9 @@ class TagsCheck(AbstractCheck.AbstractCh if d[0].startswith('/usr/local/'): printError(pkg, 'invalid-dependency', d[0]) @@ -20,7 +20,7 @@ Index: TagsCheck.py if not devel_depend and not is_devel and not is_source: if FilesCheck.devel_regex.search(d[0]): printError(pkg, 'devel-dependency', d[0]) -@@ -902,6 +906,12 @@ explicit Requires: tags.''', +@@ -1040,6 +1044,12 @@ explicit Requires: tags.''', '''This package provides 2 times the same capacity. It should only provide it once.''', diff --git a/no-doc-for-lib.diff b/no-doc-for-lib.diff index 8080a84..db5102e 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 -@@ -778,7 +778,7 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -830,7 +830,7 @@ class FilesCheck(AbstractCheck.AbstractC debuginfo_srcs = False debuginfo_debugs = False diff --git a/rpmgroup-checks.diff b/rpmgroup-checks.diff index 64727ae..1122f79 100644 --- a/rpmgroup-checks.diff +++ b/rpmgroup-checks.diff @@ -1,6 +1,8 @@ ---- TagsCheck.py +Index: TagsCheck.py +=================================================================== +--- TagsCheck.py.orig +++ TagsCheck.py -@@ -653,6 +653,8 @@ +@@ -686,6 +686,8 @@ class TagsCheck(AbstractCheck.AbstractCh self._unexpanded_macros(pkg, 'Group', group) if not group: printError(pkg, 'no-group-tag') @@ -9,7 +11,7 @@ elif VALID_GROUPS and group not in VALID_GROUPS: printWarning(pkg, 'non-standard-group', group) -@@ -949,6 +951,10 @@ +@@ -985,6 +987,10 @@ won't fool the specfile parser, and rebu '''There is no Group tag in your package. You have to specify a valid group in your spec file using the Group tag.''', diff --git a/rpmlint-suse.diff b/rpmlint-suse.diff index ca02dc2..4c84ec9 100644 --- a/rpmlint-suse.diff +++ b/rpmlint-suse.diff @@ -1,6 +1,8 @@ ---- FilesCheck.py +Index: FilesCheck.py +=================================================================== +--- FilesCheck.py.orig +++ FilesCheck.py -@@ -174,7 +174,7 @@ +@@ -175,7 +175,7 @@ compr_regex = re.compile('\.(gz|z|Z|zip| absolute_regex = re.compile('^/([^/]+)') absolute2_regex = re.compile('^/?([^/]+)') points_regex = re.compile('^\.\./(.*)') @@ -9,9 +11,11 @@ bin_regex = re.compile('^(/usr)?/s?bin/') includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE) develfile_regex = re.compile('\.(a|cmxa?|mli?)$') ---- I18NCheck.py +Index: I18NCheck.py +=================================================================== +--- I18NCheck.py.orig +++ I18NCheck.py -@@ -67,7 +67,7 @@ +@@ -67,7 +67,7 @@ CORRECT_SUBDIRS = ( ) package_regex = re.compile('-(' + '|'.join((x[0:2] for x in CORRECT_SUBDIRS)) + ')$') diff --git a/rpmlint.changes b/rpmlint.changes index 3f01a42..2326016 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Wed Apr 28 11:16:25 CEST 2010 - dmueller@suse.de + +- fix exception in interpreter check +- restrict shlib-fixed-dependency to shlib-policy packages +- allow files in /tmp to be listed as %ghost + +------------------------------------------------------------------- +Tue Apr 27 17:00:08 CEST 2010 - dmueller@suse.de + +- tighten pkg-config check + ------------------------------------------------------------------- Mon Apr 26 11:09:53 CEST 2010 - dmueller@suse.de diff --git a/rpmlint.spec b/rpmlint.spec index 3f45a8c..0190503 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -23,7 +23,7 @@ Name: rpmlint BuildRequires: rpm-python Summary: Rpm correctness checker Version: 0.95 -Release: 4 +Release: 5 Source0: %{name}-%{version}.tar.bz2 Source1: config Source1001: config.in diff --git a/script-interpreter-only-for-exec-scripts.diff b/script-interpreter-only-for-exec-scripts.diff index 73c56d1..5ca28de 100644 --- a/script-interpreter-only-for-exec-scripts.diff +++ b/script-interpreter-only-for-exec-scripts.diff @@ -1,6 +1,8 @@ ---- FilesCheck.py +Index: FilesCheck.py +=================================================================== +--- FilesCheck.py.orig +++ FilesCheck.py -@@ -818,7 +818,7 @@ +@@ -1292,7 +1292,7 @@ class FilesCheck(AbstractCheck.AbstractC interpreter = None if res: interpreter = res.group(1) diff --git a/sourced-dirs.diff b/sourced-dirs.diff index 3a99ae8..d86fcd3 100644 --- a/sourced-dirs.diff +++ b/sourced-dirs.diff @@ -1,6 +1,8 @@ ---- FilesCheck.py +Index: FilesCheck.py +=================================================================== +--- FilesCheck.py.orig +++ FilesCheck.py -@@ -212,7 +212,7 @@ +@@ -684,7 +684,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 6ab9d7b..582a690 100644 --- a/stricter-interpreter-check.diff +++ b/stricter-interpreter-check.diff @@ -1,11 +1,12 @@ --- FilesCheck.py +++ FilesCheck.py -@@ -826,7 +826,7 @@ +@@ -826,7 +826,8 @@ f.endswith('.la')): printError(pkg, 'script-without-shebang', f) - if mode & 0111 == 0 and not is_doc: -+ if mode & 0111 == 0 and not is_doc and interpreter.startswith("/"): ++ if mode & 0111 == 0 and not is_doc and \ ++ interpreter and interpreter.startswith("/"): printError(pkg, 'non-executable-script', f, oct(perm), interpreter) if line.endswith('\r\n') or line.endswith('\r'): diff --git a/suse-check-optional-dependencies.diff b/suse-check-optional-dependencies.diff index 772828a..ccefcd4 100644 --- a/suse-check-optional-dependencies.diff +++ b/suse-check-optional-dependencies.diff @@ -1,6 +1,8 @@ ---- FilesCheck.py +Index: FilesCheck.py +=================================================================== +--- FilesCheck.py.orig +++ FilesCheck.py -@@ -428,6 +428,16 @@ +@@ -907,6 +907,16 @@ class FilesCheck(AbstractCheck.AbstractC if res.group(1) != pkg.name: printError(pkg, 'incoherent-logrotate-file', f) @@ -17,7 +19,7 @@ if link != '': ext = compr_regex.search(link) if ext: -@@ -1186,6 +1196,24 @@ +@@ -1677,6 +1687,24 @@ consequences), or other compiler flags w extraction not working as expected. Verify that the binaries are not unexpectedly stripped and that the intended compiler flags are used.''', diff --git a/suse-debuginfo.diff b/suse-debuginfo.diff index b8c003e..cbe4940 100644 --- a/suse-debuginfo.diff +++ b/suse-debuginfo.diff @@ -1,6 +1,8 @@ ---- BinariesCheck.py +Index: BinariesCheck.py +=================================================================== +--- BinariesCheck.py.orig +++ BinariesCheck.py -@@ -37,6 +37,8 @@ +@@ -37,6 +37,8 @@ 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|$)') @@ -9,7 +11,7 @@ def __init__(self, pkg, path, file, is_ar, is_shlib): self.readelf_error = False -@@ -51,6 +53,8 @@ +@@ -51,6 +53,8 @@ class BinaryInfo: self.exec_stack = False self.exit_calls = [] fork_called = False @@ -18,7 +20,7 @@ self.tail = '' is_debug = path.endswith('.debug') -@@ -103,6 +107,14 @@ +@@ -103,6 +107,14 @@ class BinaryInfo: fork_called = True continue @@ -33,7 +35,7 @@ if self.non_pic: self.non_pic = 'TEXTREL' in res[1] -@@ -254,6 +266,17 @@ +@@ -259,6 +271,17 @@ class BinariesCheck(AbstractCheck.Abstra bin_info = BinaryInfo( pkg, pkgfile.path, fname, is_ar, is_shlib) @@ -51,7 +53,7 @@ # so name in library if is_shlib: has_lib = True -@@ -485,6 +508,14 @@ +@@ -509,6 +532,14 @@ with the intended shared libraries only. 'ldd-failed', '''Executing ldd on this file failed, all checks could not be run.''', diff --git a/suse-file-var-run.diff b/suse-file-var-run.diff index 332a2d9..5aacdbb 100644 --- a/suse-file-var-run.diff +++ b/suse-file-var-run.diff @@ -1,5 +1,14 @@ --- FilesCheck.py +++ FilesCheck.py +@@ -392,7 +392,7 @@ + is_kernel_package: + printError(pkg, "kernel-modules-not-in-kernel-packages", f) + +- if tmp_regex.search(f): ++ if tmp_regex.search(f) and f not in ghost_files: + printError(pkg, 'dir-or-file-in-tmp', f) + elif f.startswith('/mnt/'): + printError(pkg, 'dir-or-file-in-mnt', f) @@ -402,6 +402,8 @@ printError(pkg, 'dir-or-file-in-usr-local', f) elif f.startswith('/var/local/'): @@ -9,7 +18,7 @@ elif sub_bin_regex.search(f): printError(pkg, 'subdir-in-bin', f) elif f.startswith('/home/'): -@@ -945,6 +947,12 @@ +@@ -945,6 +948,12 @@ '''A file in the package is located in /var/local. It's not permitted for packages to install files in this directory.''', diff --git a/suse-filesystem.diff b/suse-filesystem.diff index 6021fb3..4b165f3 100644 --- a/suse-filesystem.diff +++ b/suse-filesystem.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -27,65 +27,114 @@ STANDARD_DIRS = ( +@@ -28,65 +28,114 @@ STANDARD_DIRS = ( '/', '/bin', '/boot', @@ -144,7 +144,7 @@ Index: FilesCheck.py '/usr/local/lib', '/usr/local/lib64', '/usr/local/man', -@@ -101,24 +150,415 @@ STANDARD_DIRS = ( +@@ -102,24 +151,415 @@ STANDARD_DIRS = ( '/usr/local/man/mann', '/usr/local/sbin', '/usr/local/share', @@ -571,7 +571,7 @@ Index: FilesCheck.py '/usr/share/man', '/usr/share/man/man1', '/usr/share/man/man2', -@@ -130,28 +570,60 @@ STANDARD_DIRS = ( +@@ -131,28 +571,60 @@ STANDARD_DIRS = ( '/usr/share/man/man8', '/usr/share/man/man9', '/usr/share/man/mann', diff --git a/suse-hide-unstripped-outside-build.diff b/suse-hide-unstripped-outside-build.diff index a351906..ec0a7e1 100644 --- a/suse-hide-unstripped-outside-build.diff +++ b/suse-hide-unstripped-outside-build.diff @@ -1,4 +1,6 @@ ---- BinariesCheck.py +Index: BinariesCheck.py +=================================================================== +--- BinariesCheck.py.orig +++ BinariesCheck.py @@ -10,6 +10,7 @@ @@ -8,7 +10,7 @@ import rpm -@@ -247,7 +248,9 @@ +@@ -264,7 +265,9 @@ class BinariesCheck(AbstractCheck.Abstra # stripped ? if not is_ocaml_native and not unstrippable.search(fname): diff --git a/suse-no-run-ldconfig.diff b/suse-no-run-ldconfig.diff index 13c3e91..096a1c7 100644 --- a/suse-no-run-ldconfig.diff +++ b/suse-no-run-ldconfig.diff @@ -1,6 +1,8 @@ ---- SpecCheck.py +Index: SpecCheck.py +=================================================================== +--- SpecCheck.py.orig +++ SpecCheck.py -@@ -421,6 +421,10 @@ +@@ -444,6 +444,10 @@ class SpecCheck(AbstractCheck.AbstractCh printWarning(pkg, 'comparison-operator-in-deptoken', conf) @@ -11,7 +13,7 @@ if current_section == 'changelog': for match in AbstractCheck.macro_regex.findall(line): res = re.match('%+', match) -@@ -684,6 +688,14 @@ +@@ -711,6 +715,14 @@ may break short circuit builds.''', '''Make check or other automated regression test should be run in %check, as they can be disabled with a rpm macro for short circuiting purposes.''', diff --git a/suse-pkg-config-check.diff b/suse-pkg-config-check.diff index 2baf36f..801bea6 100644 --- a/suse-pkg-config-check.diff +++ b/suse-pkg-config-check.diff @@ -1,6 +1,16 @@ ---- TagsCheck.py +Index: TagsCheck.py +=================================================================== +--- TagsCheck.py.orig +++ TagsCheck.py -@@ -603,10 +603,12 @@ +@@ -414,6 +414,7 @@ lib_devel_number_regex = re.compile('^li + invalid_url_regex = re.compile(Config.getOption('InvalidURL'), re.IGNORECASE) + lib_package_regex = re.compile('(?:^(?:compat-)?lib.*?(\.so.*)?|libs?[\d-]*)$', re.IGNORECASE) + leading_space_regex = re.compile('^\s+') ++pkg_config_regex = re.compile('^/usr/(?:lib\d*|share)/pkgconfig/') + license_regex = re.compile('\(([^)]+)\)|\s(?:and|or)\s') + invalid_version_regex = re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE) + # () are here for grouping purpose in the regexp +@@ -607,10 +608,12 @@ class TagsCheck(AbstractCheck.AbstractCh base = is_devel.group(1) dep = None has_so = False @@ -9,12 +19,12 @@ if fname.endswith('.so'): has_so = True - break -+ if fname.endswith('.pc'): ++ if pkg_config_regex.match(fname) and fname.endswith('.pc'): + has_pc = True if has_so: base_or_libs = base + '/' + base + '-libs/lib' + base # try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)") -@@ -643,6 +645,15 @@ +@@ -647,6 +650,15 @@ class TagsCheck(AbstractCheck.AbstractCh if prov not in (x[0] for x in pkg.provides()): printWarning(pkg, 'no-provides', prov) @@ -30,7 +40,7 @@ # List of words to ignore in spell check ignored_words = [x.split('/')[-1] for x in pkg.files()] -@@ -1049,6 +1060,11 @@ +@@ -1059,6 +1071,11 @@ instead or require a file in bin or /etc 'no-url-tag', '''The URL tag is missing.''', diff --git a/suse-shlib-devel-dependency.diff b/suse-shlib-devel-dependency.diff index 2017e52..301ce53 100644 --- a/suse-shlib-devel-dependency.diff +++ b/suse-shlib-devel-dependency.diff @@ -1,7 +1,9 @@ ---- TagsCheck.py +Index: TagsCheck.py +=================================================================== +--- TagsCheck.py.orig +++ TagsCheck.py -@@ -610,10 +610,10 @@ - if fname.endswith('.pc'): +@@ -615,10 +615,10 @@ class TagsCheck(AbstractCheck.AbstractCh + if pkg_config_regex.match(fname) and fname.endswith('.pc'): has_pc = True if has_so: - base_or_libs = base + '/' + base + '-libs/lib' + base diff --git a/suse-version.diff b/suse-version.diff index 81dfa53..6d572f8 100644 --- a/suse-version.diff +++ b/suse-version.diff @@ -1,8 +1,8 @@ Index: SpecCheck.py =================================================================== ---- SpecCheck.py.orig 2010-02-19 12:02:55.000000000 +0100 -+++ SpecCheck.py 2010-02-19 12:05:18.000000000 +0100 -@@ -50,6 +50,7 @@ libdir_regex = re.compile('%{?_lib(?:dir +--- SpecCheck.py.orig ++++ SpecCheck.py +@@ -56,6 +56,7 @@ libdir_regex = re.compile('%{?_lib(?:dir comment_or_empty_regex = re.compile('^\s*(#|$)') defattr_regex = re.compile('^\s*%defattr\\b') attr_regex = re.compile('^\s*%attr\\b') @@ -10,7 +10,7 @@ Index: SpecCheck.py section_regexs = dict( ([x, re.compile('^%' + x + '(?:\s|$)')] for x in ('build', 'changelog', 'check', 'clean', 'description', 'files', -@@ -362,6 +363,12 @@ class SpecCheck(AbstractCheck.AbstractCh +@@ -386,6 +387,12 @@ class SpecCheck(AbstractCheck.AbstractCh if res: package_noarch[current_package] = True @@ -23,7 +23,7 @@ Index: SpecCheck.py res = prereq_regex.search(line) if res: printError(pkg, 'prereq-use', res.group(2)) -@@ -677,6 +684,15 @@ set which may result in security issues +@@ -749,6 +756,15 @@ set which may result in security issues depending on the system where the package is built. Add default attributes using %defattr before it in the %files section, or use per line %attr's.''', diff --git a/usr-arch.diff b/usr-arch.diff index b42c426..19ee94f 100644 --- a/usr-arch.diff +++ b/usr-arch.diff @@ -1,6 +1,8 @@ ---- BinariesCheck.py +Index: BinariesCheck.py +=================================================================== +--- BinariesCheck.py.orig +++ BinariesCheck.py -@@ -178,6 +178,7 @@ +@@ -190,6 +190,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$') @@ -8,7 +10,7 @@ def dir_base(path): res = path_regex.search(path) -@@ -238,7 +239,7 @@ +@@ -250,7 +251,7 @@ class BinariesCheck(AbstractCheck.Abstra fname) else: # in /usr/share ? diff --git a/version-control-internal-file.diff b/version-control-internal-file.diff index 8f86904..3ae3ced 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 -@@ -662,7 +662,7 @@ ldconfig_regex = re.compile('^[^#]*ldcon +@@ -663,7 +663,7 @@ ldconfig_regex = re.compile('^[^#]*ldcon depmod_regex = re.compile('^[^#]*depmod', re.MULTILINE) install_info_regex = re.compile('^[^#]*install-info', re.MULTILINE) perl_temp_file_regex = re.compile('.*perl.*/(\.packlist|perllocal\.pod)$') diff --git a/yast-provides.diff b/yast-provides.diff index 50cf3fc..db75c5c 100644 --- a/yast-provides.diff +++ b/yast-provides.diff @@ -1,6 +1,8 @@ ---- TagsCheck.py +Index: TagsCheck.py +=================================================================== +--- TagsCheck.py.orig +++ TagsCheck.py -@@ -739,7 +739,7 @@ +@@ -774,7 +774,7 @@ class TagsCheck(AbstractCheck.AbstractCh printWarning(pkg, 'no-url-tag') obs_names = [x[0] for x in pkg.obsoletes()]