From 3073721c60e025414aeca08a43352286e4303ceffe43f599f7e1d9f80a197fd3 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Thu, 13 Sep 2012 16:01:40 +0000 Subject: [PATCH] - update to 1.4: * rpmdiff: Teach rpmdiff about pretrans and posttrans * SpecCheck.py: merge patch from #97, using BuildArch with something else than Noarch is likely a error and causing issues. * FilesCheck.py: Add Python 3.3 magic number * FilesCheck.py, InitScriptCheck.py, MenuCheck.py, Pkg.py, PostCheck.py: Prepare for rpm-python possibly returning script progs as arrays. OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=133 --- add-weak-dependencies.diff | 16 ++++++------ better-wrong-script.diff | 2 +- buildroot-doc.diff | 2 +- buildroot-in-scripts.diff | 2 +- confusing-invalid-spec-name.patch | 8 +++--- description-check.diff | 2 +- devel-provide-is-devel-package.diff | 2 +- docdata-examples.diff | 4 +-- extend-suse-conffiles-check.diff | 2 +- invalid-filerequires.diff | 2 +- libtool-wrapper-check.diff | 8 +++--- no-doc-for-lib.diff | 2 +- noarch-lib64.diff | 8 +++--- only-reg-files-are-scripts.diff | 2 +- remove-expand-macros.diff | 2 +- rpmgroup-checks.diff | 2 +- rpmlint-1.3.tar.xz | 3 --- rpmlint-1.4.tar.xz | 3 +++ rpmlint-pkg-quoting.diff | 2 +- rpmlint.changes | 12 +++++++++ rpmlint.spec | 2 +- script-interpreter-only-for-exec-scripts.diff | 2 +- stricter-interpreter-check.diff | 2 +- suse-changelog.patch | 2 +- suse-check-optional-dependencies.diff | 4 +-- suse-filter-exception.diff | 10 +++++--- suse-no-run-ldconfig.diff | 4 +-- suse-pkg-config-check.diff | 2 +- suse-python-abi-check.diff | 6 +++-- suse-rclink-check.diff | 16 ++++++------ suse-speccheck-utf8.diff | 2 +- suse-url-check.diff | 4 +-- suse-version.diff | 14 +++++------ suse-whitelist-opensuse.diff | 2 +- sysv5-init-checks.diff | 25 ++++++++++--------- usr-arch.diff | 4 +-- yast-provides.diff | 2 +- 37 files changed, 103 insertions(+), 86 deletions(-) delete mode 100644 rpmlint-1.3.tar.xz create mode 100644 rpmlint-1.4.tar.xz diff --git a/add-weak-dependencies.diff b/add-weak-dependencies.diff index b42dc1f..73196b2 100644 --- a/add-weak-dependencies.diff +++ b/add-weak-dependencies.diff @@ -2,7 +2,7 @@ Index: Pkg.py =================================================================== --- Pkg.py.orig +++ Pkg.py -@@ -425,6 +425,10 @@ class Pkg: +@@ -426,6 +426,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: -@@ -672,6 +676,22 @@ class Pkg: +@@ -673,6 +677,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.""" -@@ -708,7 +728,7 @@ class Pkg: +@@ -709,7 +729,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] -@@ -719,7 +739,11 @@ class Pkg: +@@ -720,7 +740,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): -@@ -729,6 +753,10 @@ class Pkg: +@@ -730,6 +754,10 @@ class Pkg: self._provides = [] self._conflicts = [] self._obsoletes = [] @@ -69,9 +69,9 @@ Index: Pkg.py self._gather_aux(self.header, self._requires, rpm.RPMTAG_REQUIRENAME, -@@ -748,6 +776,32 @@ class Pkg: - rpm.RPMTAG_OBSOLETEFLAGS, - rpm.RPMTAG_OBSOLETEVERSION) +@@ -761,6 +789,32 @@ class Pkg: + prog = " ".join(prog) + return prog + try: + self._gather_aux(self.header, self._recommends, diff --git a/better-wrong-script.diff b/better-wrong-script.diff index 1aa0154..27b77ab 100644 --- a/better-wrong-script.diff +++ b/better-wrong-script.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -1700,7 +1700,10 @@ executed.''', +@@ -1702,7 +1702,10 @@ executed.''', executed.''', 'wrong-script-interpreter', diff --git a/buildroot-doc.diff b/buildroot-doc.diff index 1a8e565..d405b8b 100644 --- a/buildroot-doc.diff +++ b/buildroot-doc.diff @@ -2,7 +2,7 @@ Index: SpecCheck.py =================================================================== --- SpecCheck.py.orig +++ SpecCheck.py -@@ -620,7 +620,7 @@ versions you can ignore this warning.''' +@@ -631,7 +631,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 6cc08fb..1df600b 100644 --- a/buildroot-in-scripts.diff +++ b/buildroot-in-scripts.diff @@ -2,7 +2,7 @@ Index: SpecCheck.py =================================================================== --- SpecCheck.py.orig +++ SpecCheck.py -@@ -223,7 +223,9 @@ class SpecCheck(AbstractCheck.AbstractCh +@@ -224,7 +224,9 @@ class SpecCheck(AbstractCheck.AbstractCh continue diff --git a/confusing-invalid-spec-name.patch b/confusing-invalid-spec-name.patch index ec1719e..17a5145 100644 --- a/confusing-invalid-spec-name.patch +++ b/confusing-invalid-spec-name.patch @@ -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.2/SpecCheck.py +Index: rpmlint-1.4/SpecCheck.py =================================================================== ---- rpmlint-1.2.orig/SpecCheck.py -+++ rpmlint-1.2/SpecCheck.py -@@ -594,8 +594,8 @@ addDetails( +--- rpmlint-1.4.orig/SpecCheck.py ++++ rpmlint-1.4/SpecCheck.py +@@ -605,8 +605,8 @@ addDetails( SPEC file to build a valid RPM package.''', 'invalid-spec-name', diff --git a/description-check.diff b/description-check.diff index 319f2db..5085bdc 100644 --- a/description-check.diff +++ b/description-check.diff @@ -12,7 +12,7 @@ Index: TagsCheck.py if not pkg[rpm.RPMTAG_HEADERI18NTABLE]: self._unexpanded_macros(pkg, '%description', description) else: -@@ -985,6 +988,10 @@ Name tag.''', +@@ -987,6 +990,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 ef83f50..4c0acd0 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 -@@ -846,6 +846,10 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -847,6 +847,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 597ae8f..d79288a 100644 --- a/docdata-examples.diff +++ b/docdata-examples.diff @@ -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$') -@@ -1202,7 +1203,7 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -1204,7 +1205,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: -@@ -1574,7 +1575,10 @@ included in your package.''', +@@ -1576,7 +1577,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 c9c4856..51f5471 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 -@@ -1220,7 +1220,7 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -1222,7 +1222,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/invalid-filerequires.diff b/invalid-filerequires.diff index 3589fea..2d380be 100644 --- a/invalid-filerequires.diff +++ b/invalid-filerequires.diff @@ -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]) -@@ -1087,6 +1091,12 @@ explicit Requires: tags.''', +@@ -1089,6 +1093,12 @@ explicit Requires: tags.''', '''This package provides 2 times the same capacity. It should only provide it once.''', diff --git a/libtool-wrapper-check.diff b/libtool-wrapper-check.diff index 0f74478..7b0cc0c 100644 --- a/libtool-wrapper-check.diff +++ b/libtool-wrapper-check.diff @@ -1,6 +1,8 @@ ---- BinariesCheck.py +Index: BinariesCheck.py +=================================================================== +--- BinariesCheck.py.orig +++ BinariesCheck.py -@@ -231,8 +231,19 @@ +@@ -253,8 +253,19 @@ class BinariesCheck(AbstractCheck.Abstra is_elf = 'ELF' in pkgfile.magic is_ar = 'current ar archive' in pkgfile.magic is_ocaml_native = 'Objective caml native' in pkgfile.magic @@ -20,7 +22,7 @@ if not is_binary: if reference_regex.search(fname): lines = pkg.grep(invalid_dir_ref_regex, fname) -@@ -463,6 +474,15 @@ +@@ -502,6 +513,15 @@ recompiled separately from the static li Another common mistake that causes this problem is linking with ``gcc -Wl,-shared'' instead of ``gcc -shared''.''', diff --git a/no-doc-for-lib.diff b/no-doc-for-lib.diff index 9abaa85..41a1f4f 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 -@@ -863,7 +863,7 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -864,7 +864,7 @@ class FilesCheck(AbstractCheck.AbstractC debuginfo_srcs = False debuginfo_debugs = False diff --git a/noarch-lib64.diff b/noarch-lib64.diff index 4fc3468..2939e7c 100644 --- a/noarch-lib64.diff +++ b/noarch-lib64.diff @@ -2,7 +2,7 @@ Index: BinariesCheck.py =================================================================== --- BinariesCheck.py.orig +++ BinariesCheck.py -@@ -232,6 +232,7 @@ class BinariesCheck(AbstractCheck.Abstra +@@ -234,6 +234,7 @@ class BinariesCheck(AbstractCheck.Abstra binary = False binary_in_usr_lib = False has_usr_lib_file = False @@ -10,7 +10,7 @@ Index: BinariesCheck.py multi_pkg = False res = srcname_regex.search(pkg[rpm.RPMTAG_SOURCERPM] or '') -@@ -248,6 +249,10 @@ class BinariesCheck(AbstractCheck.Abstra +@@ -250,6 +251,10 @@ class BinariesCheck(AbstractCheck.Abstra # only-non-binary-in-usr-lib false positives binary_in_usr_lib = True @@ -21,7 +21,7 @@ Index: BinariesCheck.py is_elf = 'ELF' in pkgfile.magic is_ar = 'current ar archive' in pkgfile.magic is_ocaml_native = 'Objective caml native' in pkgfile.magic -@@ -442,9 +447,12 @@ class BinariesCheck(AbstractCheck.Abstra +@@ -464,9 +469,12 @@ class BinariesCheck(AbstractCheck.Abstra if version and version != -1 and version not in pkg.name: printError(pkg, 'incoherent-version-in-name', version) @@ -35,7 +35,7 @@ Index: BinariesCheck.py if has_usr_lib_file and not binary_in_usr_lib: printWarning(pkg, 'only-non-binary-in-usr-lib') -@@ -468,6 +476,11 @@ FHS and the FSSTND forbid this.''', +@@ -490,6 +498,11 @@ FHS and the FSSTND forbid this.''', # 'non-sparc32-binary', # '', diff --git a/only-reg-files-are-scripts.diff b/only-reg-files-are-scripts.diff index c276316..f3ebc0a 100644 --- a/only-reg-files-are-scripts.diff +++ b/only-reg-files-are-scripts.diff @@ -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) -@@ -63,6 +63,9 @@ class InitScriptCheck(AbstractCheck.Abst +@@ -64,6 +64,9 @@ class InitScriptCheck(AbstractCheck.Abst not fname.startswith('/etc/rc.d/init.d/'): continue diff --git a/remove-expand-macros.diff b/remove-expand-macros.diff index a3c2671..0dd8a4e 100644 --- a/remove-expand-macros.diff +++ b/remove-expand-macros.diff @@ -24,7 +24,7 @@ Index: TagsCheck.py _enchant_checkers = {} def spell_check(pkg, str, fmt, lang, ignored): -@@ -854,30 +845,12 @@ class TagsCheck(AbstractCheck.AbstractCh +@@ -856,30 +847,12 @@ class TagsCheck(AbstractCheck.AbstractCh (apply(Pkg.formatRequire, obs), apply(Pkg.formatRequire, prov))) diff --git a/rpmgroup-checks.diff b/rpmgroup-checks.diff index 5854f91..954f013 100644 --- a/rpmgroup-checks.diff +++ b/rpmgroup-checks.diff @@ -11,7 +11,7 @@ Index: TagsCheck.py elif VALID_GROUPS and group not in VALID_GROUPS: printWarning(pkg, 'non-standard-group', group) -@@ -1024,6 +1026,10 @@ won't fool the specfile parser, and rebu +@@ -1026,6 +1028,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-1.3.tar.xz b/rpmlint-1.3.tar.xz deleted file mode 100644 index 6db9a11..0000000 --- a/rpmlint-1.3.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:46ca95b4af224a5923739b6eed8224f18235913136e5004838e5312b4bada0f7 -size 115772 diff --git a/rpmlint-1.4.tar.xz b/rpmlint-1.4.tar.xz new file mode 100644 index 0000000..d26be80 --- /dev/null +++ b/rpmlint-1.4.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af4e4e8304c7209e95b9100f7592aca0d713b542dcb6c0629395655716a287f6 +size 116600 diff --git a/rpmlint-pkg-quoting.diff b/rpmlint-pkg-quoting.diff index 0006198..09eecf8 100644 --- a/rpmlint-pkg-quoting.diff +++ b/rpmlint-pkg-quoting.diff @@ -2,7 +2,7 @@ Index: Pkg.py =================================================================== --- Pkg.py.orig +++ Pkg.py -@@ -492,7 +492,7 @@ class Pkg: +@@ -493,7 +493,7 @@ class Pkg: dir = self.dirname) # TODO: better shell escaping or sequence based command invocation command_str = \ diff --git a/rpmlint.changes b/rpmlint.changes index bd18e63..5451aca 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Thu Sep 13 16:00:07 UTC 2012 - dmueller@suse.com + +- update to 1.4: + * rpmdiff: Teach rpmdiff about pretrans and posttrans + * SpecCheck.py: merge patch from #97, using BuildArch with + something else than Noarch is likely a error and causing issues. + * FilesCheck.py: Add Python 3.3 magic number + * FilesCheck.py, InitScriptCheck.py, MenuCheck.py, Pkg.py, + PostCheck.py: Prepare for rpm-python possibly returning script + progs as arrays. + ------------------------------------------------------------------- Fri Aug 3 17:22:43 UTC 2012 - thardeck@suse.com diff --git a/rpmlint.spec b/rpmlint.spec index 49f2b4e..e2e055e 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -25,7 +25,7 @@ BuildRequires: xz Summary: Rpm correctness checker License: GPL-2.0+ Group: System/Packages -Version: 1.3 +Version: 1.4 Release: 0 Source0: http://rpmlint.zarb.org/download/rpmlint-%{version}.tar.xz Source1: config diff --git a/script-interpreter-only-for-exec-scripts.diff b/script-interpreter-only-for-exec-scripts.diff index 3e903a1..3eae3d3 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 -@@ -1252,7 +1252,7 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -1254,7 +1254,7 @@ class FilesCheck(AbstractCheck.AbstractC elif interpreter or mode & 0111 != 0 or \ script_regex.search(f): if interpreter: diff --git a/stricter-interpreter-check.diff b/stricter-interpreter-check.diff index 8de7ab7..ea57521 100644 --- a/stricter-interpreter-check.diff +++ b/stricter-interpreter-check.diff @@ -2,7 +2,7 @@ Index: FilesCheck.py =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -1275,7 +1275,8 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -1277,7 +1277,8 @@ class FilesCheck(AbstractCheck.AbstractC f.endswith('.la')): printError(pkg, 'script-without-shebang', f) diff --git a/suse-changelog.patch b/suse-changelog.patch index 9e8f7c3..5af91da 100644 --- a/suse-changelog.patch +++ b/suse-changelog.patch @@ -2,7 +2,7 @@ Index: TagsCheck.py =================================================================== --- TagsCheck.py.orig +++ TagsCheck.py -@@ -1022,8 +1022,8 @@ Development/''', +@@ -1024,8 +1024,8 @@ Development/''', "%s".''' % '", "'.join(VALID_GROUPS), 'no-changelogname-tag', diff --git a/suse-check-optional-dependencies.diff b/suse-check-optional-dependencies.diff index 838dbde..fc4c0e0 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 -@@ -952,6 +952,16 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -953,6 +953,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: -@@ -1760,6 +1770,24 @@ consequences), or other compiler flags w +@@ -1762,6 +1772,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-exception.diff b/suse-filter-exception.diff index aa7d875..23a45bd 100644 --- a/suse-filter-exception.diff +++ b/suse-filter-exception.diff @@ -1,6 +1,8 @@ ---- Config.py +Index: Config.py +=================================================================== +--- Config.py.orig +++ Config.py -@@ -104,11 +104,23 @@ +@@ -103,11 +103,23 @@ def getOption(name, default = ""): _filters = [] _filters_re = None @@ -26,7 +28,7 @@ def removeFilter(s): global _filters_re -@@ -123,19 +135,38 @@ +@@ -122,19 +134,38 @@ def removeFilter(s): _scoring = {} def setBadness(s, score): @@ -69,7 +71,7 @@ _filters_re = '(?:' + _filters[0] + ')' for idx in range(1, len(_filters)): -@@ -147,9 +178,27 @@ +@@ -146,9 +177,27 @@ def isFiltered(s): _filters_re = _filters_re + '|(?:' + _filters[idx] +')' _filters_re = re.compile(_filters_re) diff --git a/suse-no-run-ldconfig.diff b/suse-no-run-ldconfig.diff index bbeeebc..31919b1 100644 --- a/suse-no-run-ldconfig.diff +++ b/suse-no-run-ldconfig.diff @@ -2,7 +2,7 @@ Index: SpecCheck.py =================================================================== --- SpecCheck.py.orig +++ SpecCheck.py -@@ -403,6 +403,10 @@ class SpecCheck(AbstractCheck.AbstractCh +@@ -414,6 +414,10 @@ class SpecCheck(AbstractCheck.AbstractCh printWarning(pkg, 'comparison-operator-in-deptoken', conf) @@ -13,7 +13,7 @@ Index: SpecCheck.py if current_section == 'changelog': for match in AbstractCheck.macro_regex.findall(line): res = re.match('%+', match) -@@ -716,6 +720,14 @@ may break short circuit builds.''', +@@ -732,6 +736,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 32a0ff6..61ffb7f 100644 --- a/suse-pkg-config-check.diff +++ b/suse-pkg-config-check.diff @@ -40,7 +40,7 @@ Index: TagsCheck.py # List of words to ignore in spell check ignored_words = set() for pf in pkg.files(): -@@ -1106,6 +1118,11 @@ instead or require a file in bin or /etc +@@ -1108,6 +1120,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.''', diff --git a/suse-python-abi-check.diff b/suse-python-abi-check.diff index ce7e13f..9a32400 100644 --- a/suse-python-abi-check.diff +++ b/suse-python-abi-check.diff @@ -1,6 +1,8 @@ ---- FilesCheck.py +Index: FilesCheck.py +=================================================================== +--- FilesCheck.py.orig +++ FilesCheck.py -@@ -664,8 +664,11 @@ +@@ -1153,8 +1153,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/suse-rclink-check.diff b/suse-rclink-check.diff index fa9205b..a0ff30b 100644 --- a/suse-rclink-check.diff +++ b/suse-rclink-check.diff @@ -2,7 +2,7 @@ Index: InitScriptCheck.py =================================================================== --- InitScriptCheck.py.orig +++ InitScriptCheck.py -@@ -52,7 +52,7 @@ class InitScriptCheck(AbstractCheck.Abst +@@ -51,7 +51,7 @@ class InitScriptCheck(AbstractCheck.Abst return initscript_list = [] @@ -10,8 +10,8 @@ Index: InitScriptCheck.py + rclinks = set() # check chkconfig call in %post and %preun - postin = pkg[rpm.RPMTAG_POSTIN] or pkg[rpm.RPMTAG_POSTINPROG] -@@ -61,6 +61,10 @@ class InitScriptCheck(AbstractCheck.Abst + postin = pkg[rpm.RPMTAG_POSTIN] or pkg.scriptprog(pkg[rpm.RPMTAG_POSTINPROG]) +@@ -60,6 +60,10 @@ class InitScriptCheck(AbstractCheck.Abst for fname, pkgfile in pkg.files().items(): @@ -22,7 +22,7 @@ Index: InitScriptCheck.py if not fname.startswith('/etc/init.d/') and \ not fname.startswith('/etc/rc.d/init.d/'): continue -@@ -198,6 +202,12 @@ class InitScriptCheck(AbstractCheck.Abst +@@ -199,6 +203,12 @@ class InitScriptCheck(AbstractCheck.Abst elif subsys_regex_found and not use_subsys: printError(pkg, 'subsys-unsupported', fname) @@ -32,10 +32,10 @@ Index: InitScriptCheck.py + if not script in rclinks: + printWarning(pkg, 'suse-missing-rclink', script) + - goodnames = (pkg.name.lower(), pkg.name.lower() + 'd') - if len(initscript_list) == 1 and initscript_list[0] not in goodnames: - printWarning(pkg, 'incoherent-init-script-name', initscript_list[0], -@@ -220,6 +230,10 @@ a call to chkconfig.''', + if len(initscript_list) == 1: + pkgname = re.sub("-sysvinit$", "", pkg.name.lower()) + goodnames = (pkgname, pkgname + 'd') +@@ -223,6 +233,10 @@ a call to chkconfig.''', '''The package contains an init script but doesn't contain a %preun with a call to chkconfig.''', diff --git a/suse-speccheck-utf8.diff b/suse-speccheck-utf8.diff index 5b40991..3a5260f 100644 --- a/suse-speccheck-utf8.diff +++ b/suse-speccheck-utf8.diff @@ -2,7 +2,7 @@ Index: SpecCheck.py =================================================================== --- SpecCheck.py.orig +++ SpecCheck.py -@@ -598,8 +598,8 @@ SPEC file to build a valid RPM package.' +@@ -609,8 +609,8 @@ SPEC file to build a valid RPM package.' ("Name:" tag). Either rename your package or the specfile.''', 'non-utf8-spec-file', diff --git a/suse-url-check.diff b/suse-url-check.diff index 52e6ac4..008116c 100644 --- a/suse-url-check.diff +++ b/suse-url-check.diff @@ -2,7 +2,7 @@ Index: TagsCheck.py =================================================================== --- TagsCheck.py.orig +++ TagsCheck.py -@@ -778,7 +778,7 @@ class TagsCheck(AbstractCheck.AbstractCh +@@ -780,7 +780,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) -@@ -1094,7 +1094,7 @@ once.''', +@@ -1096,7 +1096,7 @@ once.''', '''This rpm requires a specific release of another package.''', 'no-url-tag', diff --git a/suse-version.diff b/suse-version.diff index e762ef4..b653de8 100644 --- a/suse-version.diff +++ b/suse-version.diff @@ -1,8 +1,6 @@ -Index: SpecCheck.py -=================================================================== ---- SpecCheck.py.orig +--- SpecCheck.py +++ SpecCheck.py -@@ -56,6 +56,7 @@ libdir_regex = re.compile('%{?_lib(?:dir +@@ -57,6 +57,7 @@ comment_or_empty_regex = re.compile('^\s*(#|$)') defattr_regex = re.compile('^\s*%defattr\\b') attr_regex = re.compile('^\s*%attr\\b') @@ -10,9 +8,9 @@ Index: SpecCheck.py section_regexs = dict( ([x, re.compile('^%' + x + '(?:\s|$)')] for x in ('build', 'changelog', 'check', 'clean', 'description', 'files', -@@ -348,6 +349,12 @@ class SpecCheck(AbstractCheck.AbstractCh - if res: - package_noarch[current_package] = True +@@ -359,6 +360,12 @@ + if not res.group(1).startswith('%'): + printWarning(pkg, 'hardcoded-prefix-tag', res.group(1)) + res = suse_version_regex.search(line) + if res and int(res.group(1)) > 0 and int(res.group(1)) < 1130: @@ -23,7 +21,7 @@ Index: SpecCheck.py res = prereq_regex.search(line) if res: printError(pkg, 'prereq-use', res.group(2)) -@@ -758,6 +765,15 @@ in the resulting binary package dependin +@@ -774,6 +781,15 @@ version (typically < 4.4). Add default attributes using %defattr before it in the %files section, or use per entry %attr's.''', diff --git a/suse-whitelist-opensuse.diff b/suse-whitelist-opensuse.diff index f2066da..ffbfa22 100644 --- a/suse-whitelist-opensuse.diff +++ b/suse-whitelist-opensuse.diff @@ -2,7 +2,7 @@ Index: TagsCheck.py =================================================================== --- TagsCheck.py.orig +++ TagsCheck.py -@@ -881,7 +881,7 @@ class TagsCheck(AbstractCheck.AbstractCh +@@ -883,7 +883,7 @@ class TagsCheck(AbstractCheck.AbstractCh spell_check(pkg, utf8summary, 'Summary(%s)', lang, ignored_words) if '\n' in summary: printError(pkg, 'summary-on-multiple-lines', lang) diff --git a/sysv5-init-checks.diff b/sysv5-init-checks.diff index 7914468..c1e5287 100644 --- a/sysv5-init-checks.diff +++ b/sysv5-init-checks.diff @@ -2,7 +2,7 @@ Index: InitScriptCheck.py =================================================================== --- InitScriptCheck.py.orig +++ InitScriptCheck.py -@@ -31,6 +31,10 @@ lsb_tags_regex = re.compile('^# ([\w-]+) +@@ -30,6 +30,10 @@ lsb_tags_regex = re.compile('^# ([\w-]+) lsb_cont_regex = re.compile('^#(?:\t| )(.*?)\s*$') use_subsys = Config.getOption('UseVarLockSubsys', True) @@ -13,37 +13,38 @@ Index: InitScriptCheck.py LSB_KEYWORDS = ('Provides', 'Required-Start', 'Required-Stop', 'Should-Start', 'Should-Stop', 'Default-Start', 'Default-Stop', 'Short-Description', 'Description') -@@ -48,6 +52,13 @@ class InitScriptCheck(AbstractCheck.Abst +@@ -47,6 +51,13 @@ class InitScriptCheck(AbstractCheck.Abst return initscript_list = [] + + + # check chkconfig call in %post and %preun -+ postin = pkg[rpm.RPMTAG_POSTIN] or pkg[rpm.RPMTAG_POSTINPROG] -+ preun = pkg[rpm.RPMTAG_PREUN] or pkg[rpm.RPMTAG_PREUNPROG] -+ postun = pkg[rpm.RPMTAG_POSTUN] or pkg[rpm.RPMTAG_POSTUNPROG] ++ postin = pkg[rpm.RPMTAG_POSTIN] or pkg.scriptprog(pkg[rpm.RPMTAG_POSTINPROG]) ++ preun = pkg[rpm.RPMTAG_PREUN] or pkg.scriptprog(pkg[rpm.RPMTAG_PREUNPROG]) ++ postun = pkg[rpm.RPMTAG_POSTUN] or pkg.scriptprog(pkg[rpm.RPMTAG_POSTUNPROG]) + for fname, pkgfile in pkg.files().items(): if not fname.startswith('/etc/init.d/') and \ -@@ -61,18 +72,15 @@ class InitScriptCheck(AbstractCheck.Abst - - if dot_in_name_regex.match(basename): +@@ -61,20 +72,16 @@ class InitScriptCheck(AbstractCheck.Abst + if "." in basename: printError(pkg, 'init-script-name-with-dot', fname) + - # check chkconfig call in %post and %preun -- postin = pkg[rpm.RPMTAG_POSTIN] or pkg[rpm.RPMTAG_POSTINPROG] +- postin = pkg[rpm.RPMTAG_POSTIN] or \ +- pkg.scriptprog(rpm.RPMTAG_POSTINPROG) - if not postin: - printError(pkg, 'init-script-without-chkconfig-postin', fname) - elif not chkconfig_regex.search(postin): - printError(pkg, 'postin-without-chkconfig', fname) - -- preun = pkg[rpm.RPMTAG_PREUN] or pkg[rpm.RPMTAG_PREUNPROG] + preun = pkg[rpm.RPMTAG_PREUN] or \ + pkg.scriptprog(rpm.RPMTAG_PREUNPROG) - if not preun: - printError(pkg, 'init-script-without-chkconfig-preun', fname) - elif not chkconfig_regex.search(preun): - printError(pkg, 'preun-without-chkconfig', fname) -+ + if not preun or not stop_on_removal_regex.search(preun): + printError(pkg, 'init-script-without-%stop_on_removal-preun', fname) + @@ -55,7 +56,7 @@ Index: InitScriptCheck.py status_found = False reload_found = False -@@ -271,6 +279,17 @@ of chkconfig don't work as expected with +@@ -275,6 +282,17 @@ of chkconfig don't work as expected with 'init-script-non-executable', '''The init script should have at least the execution bit set for root in order for it to run at boot time.''', diff --git a/usr-arch.diff b/usr-arch.diff index 0917115..1eb8bd6 100644 --- a/usr-arch.diff +++ b/usr-arch.diff @@ -2,7 +2,7 @@ Index: BinariesCheck.py =================================================================== --- BinariesCheck.py.orig +++ BinariesCheck.py -@@ -206,6 +206,7 @@ usr_lib_exception_regex = re.compile(Con +@@ -208,6 +208,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) -@@ -278,7 +279,7 @@ class BinariesCheck(AbstractCheck.Abstra +@@ -280,7 +281,7 @@ class BinariesCheck(AbstractCheck.Abstra # arch dependent packages only from here on # in /usr/share ? diff --git a/yast-provides.diff b/yast-provides.diff index 6109d5b..5745e37 100644 --- a/yast-provides.diff +++ b/yast-provides.diff @@ -2,7 +2,7 @@ Index: TagsCheck.py =================================================================== --- TagsCheck.py.orig +++ TagsCheck.py -@@ -811,7 +811,7 @@ class TagsCheck(AbstractCheck.AbstractCh +@@ -813,7 +813,7 @@ class TagsCheck(AbstractCheck.AbstractCh printWarning(pkg, 'no-url-tag') obs_names = [x[0] for x in pkg.obsoletes()]