diff --git a/add-weak-dependencies.diff b/add-weak-dependencies.diff index 8c77d9d..ae4f63a 100644 --- a/add-weak-dependencies.diff +++ b/add-weak-dependencies.diff @@ -2,7 +2,7 @@ Index: Pkg.py =================================================================== --- Pkg.py.orig +++ Pkg.py -@@ -170,6 +170,10 @@ class Pkg: +@@ -307,6 +307,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: -@@ -376,6 +380,22 @@ class Pkg: +@@ -513,6 +517,22 @@ class Pkg: self._gatherDepInfo() return self._requires @@ -36,7 +36,7 @@ Index: Pkg.py def prereq(self): self._gatherDepInfo() return self._prereq -@@ -406,7 +426,8 @@ class Pkg: +@@ -542,7 +562,8 @@ class Pkg: return self._provides # internal function to gather dependency info used by the above ones @@ -46,7 +46,7 @@ Index: Pkg.py names = header[nametag] versions = header[versiontag] flags = header[flagstag] -@@ -415,7 +436,11 @@ class Pkg: +@@ -551,7 +572,11 @@ class Pkg: for loop in range(len(versions)): if prereq is not None and flags[loop] & PREREQ_FLAG: prereq.append((names[loop], versions[loop], flags[loop] & (~PREREQ_FLAG))) @@ -59,7 +59,7 @@ Index: Pkg.py list.append((names[loop], versions[loop], flags[loop])) def _gatherDepInfo(self): -@@ -425,6 +450,10 @@ class Pkg: +@@ -561,6 +586,10 @@ class Pkg: self._provides = [] self._conflicts = [] self._obsoletes = [] @@ -70,7 +70,7 @@ Index: Pkg.py self._gather_aux(self.header, self._requires, rpm.RPMTAG_REQUIRENAME, -@@ -443,6 +472,27 @@ class Pkg: +@@ -579,6 +608,27 @@ class Pkg: rpm.RPMTAG_OBSOLETENAME, rpm.RPMTAG_OBSOLETEVERSION, rpm.RPMTAG_OBSOLETEFLAGS) diff --git a/better-wrong-script.diff b/better-wrong-script.diff index f439abb..47d275c 100644 --- a/better-wrong-script.diff +++ b/better-wrong-script.diff @@ -1,6 +1,8 @@ ---- FilesCheck.py +Index: FilesCheck.py +=================================================================== +--- FilesCheck.py.orig +++ FilesCheck.py -@@ -1403,7 +1403,10 @@ +@@ -1470,7 +1470,10 @@ customize an executable, make it for exa executed.''', 'wrong-script-interpreter', diff --git a/buildroot-doc.diff b/buildroot-doc.diff index 05f91d9..883f314 100644 --- a/buildroot-doc.diff +++ b/buildroot-doc.diff @@ -1,6 +1,8 @@ ---- SpecCheck.py +Index: SpecCheck.py +=================================================================== +--- SpecCheck.py.orig +++ SpecCheck.py -@@ -408,7 +408,7 @@ +@@ -539,7 +539,7 @@ allow building the package as non root o '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 05bc96a..8ab576f 100644 --- a/buildroot-in-scripts.diff +++ b/buildroot-in-scripts.diff @@ -14,7 +14,7 @@ Index: SpecCheck.py # Only check for /lib, /usr/lib, /usr/X11R6/lib # TODO: better handling of X libraries and modules. -@@ -262,7 +265,9 @@ class SpecCheck(AbstractCheck.AbstractCh +@@ -257,7 +260,9 @@ class SpecCheck(AbstractCheck.AbstractCh continue diff --git a/config b/config index d6e64dc..8d96cfb 100644 --- a/config +++ b/config @@ -46,6 +46,9 @@ addFilter(".*non-versioned-file-in-library-package.*") addFilter(".*incoherent-version-in-name.*") addFilter(".*invalid-vendor.*") addFilter(".*invalid-distribution.*") +addFilter(".*hardcoded-path-in-buildroot-tag.*") +addFilter(".*no-buildroot-tag.*") +addFilter(".*cross-directory-hard-link.*") # Configuration options used by the checks diff --git a/dependency-parsing.diff b/dependency-parsing.diff index 1d19609..94d490c 100644 --- a/dependency-parsing.diff +++ b/dependency-parsing.diff @@ -1,12 +1,13 @@ ---- SpecCheck.py +Index: SpecCheck.py +=================================================================== +--- SpecCheck.py.orig +++ SpecCheck.py -@@ -90,7 +90,7 @@ +@@ -112,7 +112,7 @@ def deptokens(line): elif wantmore: tmp += ' ' + tok - wantmore = 0 + wantmore = False - elif tok[0] in ('=', '<', '>'): + elif len(tok) and tok[0] in ('=', '<', '>'): tmp += ' ' + tok - wantmore = 1 + wantmore = True else: - diff --git a/description-check.diff b/description-check.diff index 86c082e..e25b529 100644 --- a/description-check.diff +++ b/description-check.diff @@ -1,16 +1,16 @@ --- TagsCheck.py +++ TagsCheck.py -@@ -594,6 +594,9 @@ class TagsCheck(AbstractCheck.AbstractCheck): - if use_utf8 and not Pkg.is_utf8_str(description): - printError(pkg, 'tag-not-utf8', '%description') - -+ if len(description.partition('Authors:')[0])-4 <= len(summary): -+ printWarning(pkg, 'description-shorter-than-summary') +@@ -576,6 +576,9 @@ + if not description: + printError(pkg, 'no-description-tag') + else: ++ if len(description.partition('Authors:')[0])-4 <= len(summary): ++ printWarning(pkg, 'description-shorter-than-summary') + - group=pkg[rpm.RPMTAG_GROUP] - if not group: - printError(pkg, 'no-group-tag') -@@ -769,6 +772,10 @@ Name tag.''', + spell_check(pkg, description, 'description') + for l in description.splitlines(): + utf8l = l +@@ -786,6 +789,10 @@ '''The major number of the library isn't included in the package's name. ''', diff --git a/detailed-desktop-file-check.diff b/detailed-desktop-file-check.diff index beb9c6e..450e518 100644 --- a/detailed-desktop-file-check.diff +++ b/detailed-desktop-file-check.diff @@ -1,15 +1,17 @@ --- MenuXDGCheck.py +++ MenuXDGCheck.py -@@ -21,7 +21,11 @@ +@@ -21,8 +21,12 @@ def check_file(self, pkg, filename): f = pkg.dirName() + filename -- if getstatusoutput(('desktop-file-validate', f), 1)[0]: -+ st = getstatusoutput(('desktop-file-validate', f), 1) +- if getstatusoutput(('desktop-file-validate', f), True)[0]: +- printError(pkg, 'invalid-desktopfile', filename) ++ st = getstatusoutput(('desktop-file-validate', f), True) + if st[0]: -+ if st[1].find('error:') != -1: -+ printError(pkg, 'invalid-desktopfile', filename, st[1].split('error: ')[1]) -+ else: - printError(pkg, 'invalid-desktopfile', filename) ++ if st[1].find('error:') != -1: ++ printError(pkg, 'invalid-desktopfile', filename, st[1].split('error: ')[1]) ++ else: ++ printError(pkg, 'invalid-desktopfile', filename) if not is_utf8(f): printError(pkg, 'non-utf8-desktopfile', filename) + diff --git a/devel-provide-is-devel-package.diff b/devel-provide-is-devel-package.diff index 8cf19eb..e4f472b 100644 --- a/devel-provide-is-devel-package.diff +++ b/devel-provide-is-devel-package.diff @@ -1,6 +1,8 @@ ---- FilesCheck.py +Index: FilesCheck.py +=================================================================== +--- FilesCheck.py.orig +++ FilesCheck.py -@@ -285,6 +285,10 @@ +@@ -761,6 +761,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 72fe167..65420cd 100644 --- a/docdata-examples.diff +++ b/docdata-examples.diff @@ -1,6 +1,8 @@ ---- FilesCheck.py +Index: FilesCheck.py +=================================================================== +--- FilesCheck.py.orig +++ FilesCheck.py -@@ -179,6 +179,7 @@ +@@ -651,6 +651,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)$') @@ -8,7 +10,7 @@ # 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$') -@@ -551,7 +552,7 @@ +@@ -1035,7 +1036,7 @@ class FilesCheck(AbstractCheck.AbstractC includefile_regex.search(f) or \ develfile_regex.search(f) or \ logrotate_regex.search(f) @@ -16,8 +18,8 @@ + if nonexec_file and not docdir_examples_regex.search(f): printWarning(pkg, 'spurious-executable-perm', f) elif f.startswith('/etc/'): - if not f in config_files and not f in ghost_files: -@@ -853,7 +854,10 @@ + if f not in config_files and f not in ghost_files: +@@ -1346,7 +1347,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/invalid-filerequires.diff b/invalid-filerequires.diff index a87d532..00cefdf 100644 --- a/invalid-filerequires.diff +++ b/invalid-filerequires.diff @@ -1,14 +1,16 @@ ---- TagsCheck.py +Index: TagsCheck.py +=================================================================== +--- TagsCheck.py.orig +++ TagsCheck.py -@@ -402,6 +402,7 @@ +@@ -402,6 +402,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')) +valid_filedep_regex=re.compile('(?:/s?bin/|^/etc/|^/usr/lib/sendmail$)') epoch_regex = re.compile('^[0-9]+:') - use_epoch = Config.getOption('UseEpoch', 0) + use_epoch = Config.getOption('UseEpoch', False) use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT) -@@ -484,6 +485,9 @@ +@@ -484,6 +485,9 @@ class TagsCheck(AbstractCheck.AbstractCh if d[0].startswith('/usr/local/'): printError(pkg, 'invalid-dependency', d[0]) @@ -18,9 +20,9 @@ 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]) -@@ -885,6 +889,12 @@ - 'obsolete-on-name', - '''A package should not obsolete itself, as it can cause weird errors in tools.''', +@@ -902,6 +906,12 @@ explicit Requires: tags.''', + '''This package provides 2 times the same capacity. It should only provide it + once.''', +'invalid-filepath-dependency', +'''A package has a file or path based dependency that is not resolveable for diff --git a/locale-update.diff b/locale-update.diff index 5747881..00ebc21 100644 --- a/locale-update.diff +++ b/locale-update.diff @@ -1,6 +1,8 @@ ---- I18NCheck.py +Index: I18NCheck.py +=================================================================== +--- I18NCheck.py.orig +++ I18NCheck.py -@@ -35,22 +35,22 @@ +@@ -38,22 +38,22 @@ INCORRECT_LOCALES = { # # 'en_RN' and 'en@IPA' are not real language bu funny variations on english CORRECT_SUBDIRS = ( diff --git a/no-badness-return.diff b/no-badness-return.diff index f40ce3c..63a3339 100644 --- a/no-badness-return.diff +++ b/no-badness-return.diff @@ -1,27 +1,3 @@ -Index: Filter.py -=================================================================== ---- Filter.py.orig -+++ Filter.py -@@ -101,10 +101,6 @@ def _diag_compare(x, y): - - - def printAllReasons(): -- threshold = badnessThreshold() -- if threshold < 0: -- return 0 -- - global _badness_score, _diagnostic - _diagnostic.sort(_diag_compare) - last_reason = '' -@@ -119,8 +115,6 @@ def printAllReasons(): - if Config.info and len(last_reason): - printDescriptions(last_reason) - _diagnostic = list() -- return _badness_score > threshold -- - - _details = {} - Index: rpmlint.py =================================================================== --- rpmlint.py.orig @@ -49,3 +25,27 @@ Index: rpmlint.py if printed_messages["E"] > 0: sys.exit(64) sys.exit(0) +Index: Filter.py +=================================================================== +--- Filter.py.orig ++++ Filter.py +@@ -101,10 +101,6 @@ def _diag_compare(x, y): + + + def printAllReasons(): +- threshold = badnessThreshold() +- if threshold < 0: +- return False +- + global _badness_score, _diagnostic + _diagnostic.sort(_diag_compare) + last_reason = '' +@@ -119,8 +115,6 @@ def printAllReasons(): + if Config.info and len(last_reason): + printDescriptions(last_reason) + _diagnostic = list() +- return _badness_score > threshold +- + + _details = {} + diff --git a/no-doc-for-lib.diff b/no-doc-for-lib.diff index 77ab3d5..8080a84 100644 --- a/no-doc-for-lib.diff +++ b/no-doc-for-lib.diff @@ -2,9 +2,9 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -772,7 +772,7 @@ class FilesCheck(AbstractCheck.AbstractC - log_file = 0 - logrotate_file = 0 +@@ -778,7 +778,7 @@ class FilesCheck(AbstractCheck.AbstractC + debuginfo_srcs = False + debuginfo_debugs = False - if not doc_files: + if not lib_package and not doc_files: diff --git a/rpmgroup-checks.diff b/rpmgroup-checks.diff index 5bce7fd..ae406c8 100644 --- a/rpmgroup-checks.diff +++ b/rpmgroup-checks.diff @@ -2,7 +2,7 @@ Index: TagsCheck.py =================================================================== --- TagsCheck.py.orig +++ TagsCheck.py -@@ -601,6 +601,8 @@ class TagsCheck(AbstractCheck.AbstractCh +@@ -602,6 +602,8 @@ class TagsCheck(AbstractCheck.AbstractCh else: if VALID_GROUPS and group not in VALID_GROUPS: printWarning(pkg, 'non-standard-group', group) diff --git a/rpmlint-0.87.tar.bz2 b/rpmlint-0.87.tar.bz2 deleted file mode 100644 index 01f6594..0000000 --- a/rpmlint-0.87.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:06789cdd18c87a180c93c2a1dc17c3a5b8cb704b1e121e162f0b3aedf09c17b4 -size 86223 diff --git a/rpmlint-0.90.tar.bz2 b/rpmlint-0.90.tar.bz2 new file mode 100644 index 0000000..bc4059c --- /dev/null +++ b/rpmlint-0.90.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:991cbd183ee5164eba39500cf55f741d8b5837a50c620f586ad50090992b4e8d +size 90070 diff --git a/rpmlint.changes b/rpmlint.changes index 0e3975d..42a7353 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,53 @@ +------------------------------------------------------------------- +Wed Sep 9 18:23:16 CEST 2009 - dmueller@suse.de + +- update to 0.90: + * Makefile: 0.90. + * rpmdiff: Add missing magic coding comment + (https://bugzilla.redhat.com/508683, Michal Nowak). + * TagsCheck.py: Fix incorrect info in self-obsoletion message. + * FilesCheck.py: Output interpreter in non-executable-script + warning, remove quotes from wrong-script-interpreter one. + * Pkg.py: Remove stale comments. + * TagsCheck.py: Code cleanup, NFC. + * TagsCheck.py: improve percent-in-* message details. + * TagsCheck.py: Remove obsolete-on-name check (superseded by + self-obsoletion). + * TagsCheck.py: Add check for self-obsoletion cases, + https://bugzilla.redhat.com/461610 + * Pkg.py: Borrow various utilities from yum's rpmUtils.miscutils. + * Makefile, rpmUtils: Revert previous commit. + * Makefile, rpmUtils, rpmUtils/miscutils.py, + rpmUtils/transaction.py: Borrow + rpmUtils/{miscutils,transaction}.py from yum. + * rpmdiff: Improve dependency formatting. + * rpmdiff: Take Epoch into account in self-provides filtering. + * Pkg.py: Improve legacy prereq tracking with new rpm versions. + * BinariesCheck.py: Don't output missing-PT_GNU_STACK-section + messages if readelf failed. + * FilesCheck.py: Add check for debuginfo packages without sources. + * FilesCheck.py: Allow more common files to be non-readable + (https://bugzilla.redhat.com/226412). + * FilesCheck.py: Revert relative symlink target normalization back + to more aggressive. + * BinariesCheck.py, Config.py, ConfigCheck.py, FHSCheck.py, + FilesCheck.py, I18NCheck.py, MenuCheck.py, Pkg.py, PostCheck.py, + TagsCheck.py, rpmdiff: Code cleanups. + * FilesCheck.py: Do not check existence of relative link targets on + the filesystem for consistency with absolute link target checks, + improve dangling-*symlink info messages. + * FilesCheck.py, Pkg.py: Be a bit stricter when normalizing link + targets, do it earlier. + * FilesCheck.py, Pkg.py: Improve link target normalization in + symlink checks. +- filter cross-directory-hard-link as it is duplicate to a suse + check + +------------------------------------------------------------------- +Mon Sep 7 15:14:41 CEST 2009 - dmueller@suse.de + +- filter buildroot related checks (bnc#536594) + ------------------------------------------------------------------- Fri Aug 28 10:45:02 UTC 2009 - mvyskocil@suse.cz diff --git a/rpmlint.spec b/rpmlint.spec index 1e49641..889ce42 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -1,5 +1,5 @@ # -# spec file for package rpmlint (Version 0.87) +# spec file for package rpmlint (Version 0.90) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -22,8 +22,8 @@ Name: rpmlint BuildRequires: rpm-python Summary: Rpm correctness checker -Version: 0.87 -Release: 3 +Version: 0.90 +Release: 1 Source0: %{name}-%{version}.tar.bz2 Source1: config Source1001: config.in @@ -103,11 +103,9 @@ Patch58: add-weak-dependencies.diff Patch60: selfconflicts-provide.diff Patch62: no-badness-return.diff Patch65: suse-shlib-devel-dependency.diff -Patch66: suse-no-python-base.diff Patch67: suse-required-lsb-tags.diff Patch68: more-verbose-lsb-check.diff Patch69: useless-requires-doc.diff -Patch70: subprocess-support.diff Patch71: suse-binary-info-compile-opts.diff Patch72: version-control-internal-file.diff %py_requires @@ -148,37 +146,36 @@ Authors: %patch23 # bogus, fails with aaa_base. disabled #patch24 -%patch26 +#%patch26 %patch27 %patch29 %patch30 -#patch31 -%patch33 -#patch34 -#patch35 +#%patch31 +# needs rediff +#%patch33 +#%patch34 +#%patch35 %patch37 -#patch39 -#patch41 -#patch42 -#patch46 -#patch47 -#patch49 +#%patch39 +#%patch41 +#%patch42 +#%patch46 +#%patch47 +#%patch49 %patch50 -#patch51 -#patch52 +%patch51 +#%patch52 %patch54 -#patch57 +#%patch57 %patch58 -#patch60 +#%patch60 %patch62 -#patch63 -#patch65 -#patch66 -#patch67 -#patch68 -#patch69 -#patch70 -#patch71 +#%patch63 +#%patch65 +#%patch67 +#%patch68 +#%patch69 +#%patch71 %patch72 cp -p %{SOURCE1} . cp -p %{SOURCE2} . diff --git a/script-interpreter-only-for-exec-scripts.diff b/script-interpreter-only-for-exec-scripts.diff index 9085b9e..f95afe5 100644 --- a/script-interpreter-only-for-exec-scripts.diff +++ b/script-interpreter-only-for-exec-scripts.diff @@ -1,11 +1,13 @@ ---- FilesCheck.py +Index: FilesCheck.py +=================================================================== +--- FilesCheck.py.orig +++ FilesCheck.py -@@ -1107,7 +1107,7 @@ - # ...but executed ones should - elif res or mode & 0111 != 0 or script_regex.search(f): +@@ -1162,7 +1162,7 @@ class FilesCheck(AbstractCheck.AbstractC + interpreter = None if res: -- if not interpreter_regex.search(res.group(1)): -+ if mode & 0111 != 0 and not interpreter_regex.search(res.group(1)): - printError(pkg, 'wrong-script-interpreter', f, '"' + res.group(1) + '"') + interpreter = res.group(1) +- if not interpreter_regex.search(interpreter): ++ if mode & 0111 != 0 and not interpreter_regex.search(interpreter): + printError(pkg, 'wrong-script-interpreter', f, interpreter) elif not nonexec_file and not (lib_path_regex.search(f) and f.endswith('.la')): printError(pkg, 'script-without-shebang', f) diff --git a/sourced-dirs.diff b/sourced-dirs.diff index f09c071..8f8eb74 100644 --- a/sourced-dirs.diff +++ b/sourced-dirs.diff @@ -1,6 +1,8 @@ ---- FilesCheck.py +Index: FilesCheck.py +=================================================================== +--- FilesCheck.py.orig +++ FilesCheck.py -@@ -211,7 +211,7 @@ +@@ -683,7 +683,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/subprocess-support.diff b/subprocess-support.diff deleted file mode 100644 index d2921e8..0000000 --- a/subprocess-support.diff +++ /dev/null @@ -1,52 +0,0 @@ ---- Pkg.py -+++ Pkg.py -@@ -13,13 +13,18 @@ import rpm - import os.path - import stat - import commands --import popen2 - import re - import string - import tempfile - import types - import sys - -+# popen2 is deprecated with 2.6 and newer -+if sys.version_info[0] > 2 or sys.version_info[1] >= 4: -+ import subprocess -+else: -+ import popen2 -+ - from Filter import printWarning - - RPMFILE_CONFIG=(1 << 0) -@@ -93,13 +98,23 @@ def substitute_shell_vars(val, script): - def getstatusoutput(cmd, stdoutonly=0): - '''A version of commands.getstatusoutput() which can take cmd as a - sequence, thus making it potentially more secure. See popen2.''' -- if stdoutonly: -- proc = popen2.Popen3(cmd) -+ if sys.version_info[0] > 2 or sys.version_info[1] >= 4: -+ if stdoutonly: -+ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, close_fds=True) -+ else: -+ proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True) -+ -+ text = proc.stdout.read() -+ sts = proc.wait() - else: -- proc = popen2.Popen4(cmd) -- proc.tochild.close() -- text = proc.fromchild.read() -- sts = proc.wait() -+ if stdoutonly: -+ proc = popen2.Popen3(cmd) -+ else: -+ proc = popen2.Popen4(cmd) -+ proc.tochild.close() -+ text = proc.fromchild.read() -+ sts = proc.wait() -+ - if sts is None: sts = 0 - if text[-1:] == '\n': text = text[:-1] - return sts, text diff --git a/suse-bzip-bigger-than-100k.diff b/suse-bzip-bigger-than-100k.diff index 83914f8..8cf4f8e 100644 --- a/suse-bzip-bigger-than-100k.diff +++ b/suse-bzip-bigger-than-100k.diff @@ -1,17 +1,15 @@ -Index: SourceCheck.py -=================================================================== ---- SourceCheck.py.orig +--- SourceCheck.py +++ SourceCheck.py -@@ -17,7 +17,7 @@ import Config +@@ -17,7 +17,7 @@ DEFAULT_VALID_SRC_PERMS = (0644, 0755) -source_regex = re.compile('\\.(tar|patch|tgz|diff)$') -+source_regex = re.compile('\\.(tar|patch|tar\.gz|tgz|diff)$') - use_bzip2 = Config.getOption('UseBzip2', 1) ++source_regex = re.compile('\\.(tar|patch|tgz|tar\.gz|diff)$') + use_bzip2 = Config.getOption('UseBzip2', True) valid_src_perms = Config.getOption("ValidSrcPerms", DEFAULT_VALID_SRC_PERMS) -@@ -40,7 +40,7 @@ class SourceCheck(AbstractCheck.Abstract +@@ -40,7 +40,7 @@ printError(pkg, 'multiple-specfiles', spec_file, fname) else: spec_file = fname @@ -20,7 +18,7 @@ Index: SourceCheck.py if use_bzip2: if not fname.endswith('.bz2'): printWarning(pkg, 'source-or-patch-not-bzipped', fname) -@@ -61,7 +61,9 @@ all your RPM information.''', +@@ -61,7 +61,9 @@ 'source-or-patch-not-bzipped', '''A source archive or file in your package is not bzipped (doesn't diff --git a/suse-debuginfo.diff b/suse-debuginfo.diff index 6b34191..de28682 100644 --- a/suse-debuginfo.diff +++ b/suse-debuginfo.diff @@ -1,8 +1,6 @@ -Index: BinariesCheck.py -=================================================================== ---- BinariesCheck.py.orig +--- BinariesCheck.py +++ BinariesCheck.py -@@ -39,6 +39,8 @@ class BinaryInfo: +@@ -39,6 +39,8 @@ debug_file_regex = re.compile('\.debug$') exit_call_regex = re.compile('\s+FUNC\s+.*?\s+(_?exit(?:@\S+)?)(?:\s|$)') fork_call_regex = re.compile('\s+FUNC\s+.*?\s+(fork(?:@\S+)?)(?:\s|$)') @@ -10,18 +8,18 @@ Index: BinariesCheck.py + symtab_regex=re.compile('^\s+\[\s*\d+\]\s+\.symtab\s+') def __init__(self, pkg, path, file, is_ar, is_shlib): - self.readelf_error = 0 -@@ -53,6 +55,8 @@ class BinaryInfo: - self.exec_stack = 0 + self.readelf_error = False +@@ -53,6 +55,8 @@ + self.exec_stack = False self.exit_calls = [] - fork_called = 0 + fork_called = False + self.debuginfo = 0 + self.symtab=0 self.tail = '' is_debug = BinaryInfo.debug_file_regex.search(path) -@@ -105,6 +109,14 @@ class BinaryInfo: - fork_called = 1 +@@ -105,6 +109,14 @@ + fork_called = True continue + if BinaryInfo.debuginfo_regex.search(l): @@ -35,7 +33,7 @@ Index: BinariesCheck.py if self.non_pic: self.non_pic = BinaryInfo.non_pic_regex.search(res[1]) -@@ -260,6 +272,17 @@ class BinariesCheck(AbstractCheck.Abstra +@@ -260,6 +272,17 @@ bin_info = BinaryInfo( pkg, pkgfile.path, fname, is_ar, is_shlib) @@ -53,7 +51,7 @@ Index: BinariesCheck.py # so name in library if is_shlib: has_lib = True -@@ -488,6 +511,14 @@ with the intended shared libraries only. +@@ -491,6 +514,14 @@ 'ldd-failed', '''Executing ldd on this file failed, all checks could not be run.''', diff --git a/suse-hide-unstripped-outside-build.diff b/suse-hide-unstripped-outside-build.diff index e4ea3c0..51f28c9 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,13 +10,13 @@ import rpm -@@ -252,7 +253,9 @@ +@@ -265,7 +266,9 @@ class BinariesCheck(AbstractCheck.Abstra # stripped ? - if not unstrippable.search(fname) and not is_ocaml_native: + if not is_ocaml_native and not unstrippable.search(fname): - if not_stripped.search(pkgfile.magic): + if not_stripped.search(pkgfile.magic) and \ -+ (os.environ.get('BUILD_IS_RUNNING', None) == None or \ ++ (os.environ.get('BUILD_IS_RUNNING', None) == None or \ + os.environ.get('BUILD_DEBUG_FLAGS','').find('-g') != -1): printWarning( pkg, 'unstripped-binary-or-object', fname) diff --git a/suse-no-python-base.diff b/suse-no-python-base.diff deleted file mode 100644 index 23f4354..0000000 --- a/suse-no-python-base.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- FilesCheck.py -+++ FilesCheck.py -@@ -989,7 +989,7 @@ class FilesCheck(AbstractCheck.AbstractCheck): - if res: - if not (pkg.check_versioned_dep('python-base', res.group(1)) or - pkg.check_versioned_dep('python', res.group(1))): -- printError(pkg, 'no-dependency-on', 'python-base', res.group(1)) -+ printError(pkg, 'no-dependency-on', 'python', res.group(1)) - python_dep_error=1 - - # normal executable check diff --git a/suse-no-run-ldconfig.diff b/suse-no-run-ldconfig.diff index 26788dd..b6b5077 100644 --- a/suse-no-run-ldconfig.diff +++ b/suse-no-run-ldconfig.diff @@ -2,9 +2,9 @@ Index: SpecCheck.py =================================================================== --- SpecCheck.py.orig +++ SpecCheck.py -@@ -387,6 +387,10 @@ class SpecCheck(AbstractCheck.AbstractCh - for obs in unversioned(deptokens(res.group(1))): - printWarning(pkg, 'unversioned-explicit-obsoletes', obs) +@@ -420,6 +420,10 @@ class SpecCheck(AbstractCheck.AbstractCh + printWarning(pkg, 'comparison-operator-in-deptoken', + conf) + if current_section in ('post', 'postun'): + if line.find('%run_ldconfig') != -1: @@ -13,7 +13,7 @@ Index: SpecCheck.py if current_section == 'changelog': res = macro_regex.search(line) if res and len(res.group(1)) % 2: -@@ -602,6 +606,14 @@ will break short circuiting.''', +@@ -635,6 +639,14 @@ will break short circuiting.''', '''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-version.diff b/suse-version.diff index 9641f93..ee15775 100644 --- a/suse-version.diff +++ b/suse-version.diff @@ -1,6 +1,8 @@ ---- SpecCheck.py +Index: SpecCheck.py +=================================================================== +--- SpecCheck.py.orig +++ SpecCheck.py -@@ -53,6 +53,7 @@ +@@ -53,6 +53,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') @@ -8,7 +10,7 @@ section_regexs = dict( ([x, re.compile('^%' + x + '(?:\s|$)')] for x in ('build', 'changelog', 'check', 'clean', 'description', 'files', -@@ -359,6 +360,12 @@ +@@ -363,6 +364,12 @@ class SpecCheck(AbstractCheck.AbstractCh if res: package_noarch[current_package] = True @@ -21,7 +23,7 @@ res = prereq_regex.search(line) if res: printError(pkg, 'prereq-use', res.group(2)) -@@ -645,6 +652,15 @@ +@@ -673,6 +680,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 921e7bb..5712ae7 100644 --- a/usr-arch.diff +++ b/usr-arch.diff @@ -1,6 +1,8 @@ ---- BinariesCheck.py +Index: BinariesCheck.py +=================================================================== +--- BinariesCheck.py.orig +++ BinariesCheck.py -@@ -165,6 +165,7 @@ +@@ -177,6 +177,7 @@ path_regex = re.compile('(.*/)([^/]+)') numeric_dir_regex = re.compile('/usr(?:/share)/man/man./(.*)\.[0-9](?:\.gz|\.bz2)') versioned_dir_regex = re.compile('[^.][0-9]') usr_share = re.compile('^/usr/share/') @@ -8,7 +10,7 @@ etc = re.compile('^/etc/') not_stripped = re.compile('not stripped') unstrippable = re.compile('\.o$|\.static$') -@@ -239,7 +240,7 @@ +@@ -251,7 +252,7 @@ class BinariesCheck(AbstractCheck.Abstra printError(pkg, 'arch-independent-package-contains-binary-or-object', fname) else: # in /usr/share ? diff --git a/xdg-paths-update.diff b/xdg-paths-update.diff index 200e286..10e6c6c 100644 --- a/xdg-paths-update.diff +++ b/xdg-paths-update.diff @@ -1,6 +1,8 @@ ---- MenuXDGCheck.py +Index: MenuXDGCheck.py +=================================================================== +--- MenuXDGCheck.py.orig +++ MenuXDGCheck.py -@@ -16,7 +16,8 @@ +@@ -17,7 +17,8 @@ class MenuXDGCheck(AbstractCheck.Abstrac # desktop file need to be in $XDG_DATA_DIRS # $ echo $XDG_DATA_DIRS/applications # /var/lib/menu-xdg:/usr/share diff --git a/yast-provides.diff b/yast-provides.diff index 27c7246..63546c5 100644 --- a/yast-provides.diff +++ b/yast-provides.diff @@ -1,11 +1,11 @@ ---- TagsCheck.py +--- TagsCheck.py.orig +++ TagsCheck.py -@@ -669,7 +669,7 @@ +@@ -674,7 +674,7 @@ class TagsCheck(AbstractCheck.AbstractCh printWarning(pkg, 'no-url-tag') obs_names = [x[0] for x in pkg.obsoletes()] - prov_names = [x[0] for x in pkg.provides()] + prov_names = [x[0].split(':/')[0] for x in pkg.provides()] - if pkg.name in obs_names: - printError(pkg, 'obsolete-on-name') + for o in obs_names: + if o not in prov_names: