Hello community, here is the log from the commit of package rpmlint for openSUSE:Factory checked in at 2014-02-28 16:24:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rpmlint (Old) and /work/SRC/openSUSE:Factory/.rpmlint.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "rpmlint" Changes: -------- --- /work/SRC/openSUSE:Factory/rpmlint/rpmlint.changes 2014-02-13 06:52:58.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.rpmlint.new/rpmlint.changes 2014-02-28 16:24:35.000000000 +0100 @@ -1,0 +2,38 @@ +Thu Feb 27 15:45:18 UTC 2014 - aplanas@suse.com + +- added patches: + * rpmlint-fix-unexpanded-macros-for-array-values.patch +- fix _unexpanded_macros for array values + +------------------------------------------------------------------- +Thu Feb 27 11:07:25 UTC 2014 - lnussel@suse.de + +- rip out all decode in an attempt to make it work +- modified patches: + * rpmlint-decode-fix.diff +------------------------------------------------------------------- +Thu Feb 27 08:25:03 UTC 2014 - aplanas@suse.com + +- added paches: + * rpmlint-decode-fix.diff +- Fix decode from UTF-8 string in Python 2 + +------------------------------------------------------------------- +Sun Feb 23 20:52:54 UTC 2014 - schwab@suse.de + +- usr-arch.diff: update usr_arch_share_regex + +------------------------------------------------------------------- +Fri Feb 21 16:16:34 CET 2014 - mls@suse.de + +- adapt to new rpm weak dependency tags + +------------------------------------------------------------------- +Fri Feb 21 14:53:30 UTC 2014 - dmueller@suse.com + +- added patches: + * 0001-Python-3-compatibility-tweaks.patch +- Change openstack- related users to non-prefixed variants, + as they get renamed with the switch to Icehouse + +------------------------------------------------------------------- New: ---- 0001-Python-3-compatibility-tweaks.patch rpmlint-decode-fix.diff rpmlint-fix-unexpanded-macros-for-array-values.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rpmlint.spec ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:36.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:36.000000000 +0100 @@ -58,7 +58,6 @@ Patch1: suse-checks.diff Patch2: suse-version.diff Patch3: suse-url-check.diff -Patch4: invalid-filerequires.diff Patch5: suse-python3-naming-policy.diff Patch6: suse-filesystem.diff Patch7: suse-pkg-config-check.diff @@ -71,6 +70,7 @@ Patch14: sourced-dirs.diff Patch15: suse-filter-more-verbose.diff Patch17: docdata-examples.diff +Patch18: 0001-Python-3-compatibility-tweaks.patch Patch19: yast-provides.diff Patch20: xdg-paths-update.diff Patch22: better-wrong-script.diff @@ -125,6 +125,9 @@ Patch92: rpmlint-1.5-Fix-setgroups-error-name.diff Patch93: xdg-check-exception.diff Patch94: suse-ignore-specfile-errors.diff +Patch95: invalid-filerequires.diff +Patch96: rpmlint-decode-fix.diff +Patch97: rpmlint-fix-unexpanded-macros-for-array-values.patch %py_requires @@ -138,7 +141,6 @@ %patch1 %patch2 %patch3 -%patch4 %patch5 %patch6 %patch7 @@ -151,6 +153,7 @@ %patch14 %patch15 %patch17 +%patch18 -p1 %patch19 %patch20 %patch22 @@ -202,6 +205,9 @@ %patch92 -p1 %patch93 -p1 %patch94 +%patch95 +%patch96 -p1 +%patch97 -p1 cp -p %{SOURCE2} . # Only move top-level python files chmod 0755 rpmlint-checks-master/*.py ++++++ 0001-Python-3-compatibility-tweaks.patch ++++++ ++++ 909 lines (skipped) ++++++ add-weak-dependencies.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:36.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:36.000000000 +0100 @@ -1,8 +1,8 @@ Index: Pkg.py =================================================================== ---- Pkg.py.orig -+++ Pkg.py -@@ -424,6 +424,10 @@ class Pkg: +--- Pkg.py.orig 2014-02-21 15:11:27.194647274 +0000 ++++ Pkg.py 2014-02-21 15:13:26.205647064 +0000 +@@ -427,6 +427,10 @@ class Pkg: self._missingok_files = None self._files = None self._requires = None @@ -13,7 +13,7 @@ self._req_names = -1 if header: -@@ -670,6 +674,22 @@ class Pkg: +@@ -673,6 +677,22 @@ class Pkg: self._gatherDepInfo() return self._requires @@ -36,7 +36,7 @@ def prereq(self): """Get package PreReqs as list of (name, flags, (epoch, version, release)) tuples.""" -@@ -706,7 +726,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,20 +45,20 @@ names = header[nametag] flags = header[flagstag] versions = header[versiontag] -@@ -717,7 +737,11 @@ class Pkg: +@@ -720,7 +740,11 @@ class Pkg: + evr = stringToVersion(versions[loop].decode()) if prereq is not None and flags[loop] & PREREQ_FLAG: - prereq.append((names[loop], flags[loop] & (~PREREQ_FLAG), - evr)) + prereq.append((name, flags[loop] & (~PREREQ_FLAG), evr)) - else: + elif strong_only and flags[loop] & rpm.RPMSENSE_STRONG: + list.append((names[loop], versions[loop], flags[loop] & (~rpm.RPMSENSE_STRONG))) + elif weak_only and not (flags[loop] & rpm.RPMSENSE_STRONG): + list.append((names[loop], versions[loop], flags[loop])) + elif not (weak_only or strong_only): - list.append((names[loop], flags[loop], evr)) + list.append((name, flags[loop], evr)) def _gatherDepInfo(self): -@@ -727,6 +751,10 @@ class Pkg: +@@ -730,6 +754,10 @@ class Pkg: self._provides = [] self._conflicts = [] self._obsoletes = [] @@ -69,38 +69,34 @@ self._gather_aux(self.header, self._requires, rpm.RPMTAG_REQUIRENAME, -@@ -745,6 +773,30 @@ class Pkg: +@@ -748,6 +776,26 @@ class Pkg: rpm.RPMTAG_OBSOLETENAME, rpm.RPMTAG_OBSOLETEFLAGS, rpm.RPMTAG_OBSOLETEVERSION) + try: + self._gather_aux(self.header, self._recommends, -+ rpm.RPMTAG_SUGGESTSNAME, -+ rpm.RPMTAG_SUGGESTSFLAGS, -+ rpm.RPMTAG_SUGGESTSVERSION, -+ strong_only=True) ++ rpm.RPMTAG_RECOMMENDNAME, ++ rpm.RPMTAG_RECOMMENDFLAGS, ++ rpm.RPMTAG_RECOMMENDVERSION) + self._gather_aux(self.header, self._suggests, -+ rpm.RPMTAG_SUGGESTSNAME, -+ rpm.RPMTAG_SUGGESTSFLAGS, -+ rpm.RPMTAG_SUGGESTSVERSION, -+ weak_only=True) ++ rpm.RPMTAG_SUGGESTNAME, ++ rpm.RPMTAG_SUGGESTFLAGS, ++ rpm.RPMTAG_SUGGESTVERSION) + self._gather_aux(self.header, self._supplements, -+ rpm.RPMTAG_ENHANCESNAME, -+ rpm.RPMTAG_ENHANCESFLAGS, -+ rpm.RPMTAG_ENHANCESVERSION, -+ strong_only=True) ++ rpm.RPMTAG_SUPPLEMENTNAME, ++ rpm.RPMTAG_SUPPLEMENTFLAGS, ++ rpm.RPMTAG_SUPPLEMENTVERSION) + self._gather_aux(self.header, self._enhances, -+ rpm.RPMTAG_ENHANCESNAME, -+ rpm.RPMTAG_ENHANCESFLAGS, -+ rpm.RPMTAG_ENHANCESVERSION, -+ weak_only=True) ++ rpm.RPMTAG_ENHANCENAME, ++ rpm.RPMTAG_ENHANCEFLAGS, ++ rpm.RPMTAG_ENHANCEVERSION) + except: + pass + def scriptprog(self, which): """Get the specified script interpreter as a string. -@@ -758,6 +810,7 @@ class Pkg: +@@ -761,6 +809,7 @@ class Pkg: prog = " ".join(prog) return prog ++++++ better-wrong-script.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:36.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:36.000000000 +0100 @@ -2,7 +2,7 @@ =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -1667,7 +1667,10 @@ executed.''', +@@ -1670,7 +1670,10 @@ executed.''', executed.''', 'wrong-script-interpreter', ++++++ config ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:36.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:36.000000000 +0100 @@ -67,6 +67,7 @@ #setOption("KernelModuleRPMsOK", 0) setOption("CompressExtension", None) setOption('UseVarLockSubsys', False) +setOption("BadnessThreshold", 1000) setOption('ValidGroups', []) @@ -152,14 +153,15 @@ 'ntop', 'ntp', 'oinstall', - 'openstack-ceilometer', - 'openstack-cinder', - 'openstack-glance', - 'openstack-heat', - 'openstack-keystone', - 'openstack-nova', - 'openstack-quantum', - 'openstack-swift', + 'ceilometer', + 'cinder', + 'glance', + 'heat', + 'keystone', + 'nova', + 'neutron', + 'swift', + 'trove', 'otrs', 'pdns', 'pegasus', ++++++ description-check.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:36.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:36.000000000 +0100 @@ -2,17 +2,17 @@ =================================================================== --- TagsCheck.py.orig +++ TagsCheck.py -@@ -705,6 +705,9 @@ class TagsCheck(AbstractCheck.AbstractCh - if not description: - printError(pkg, 'no-description-tag') - else: +@@ -715,6 +715,9 @@ class TagsCheck(AbstractCheck.AbstractCh + else: + for lang in langs: + self.check_description(pkg, lang, ignored_words) ++ + if len(pkg[rpm.RPMTAG_DESCRIPTION].partition('Authors:')[0])-4 < len(pkg[rpm.RPMTAG_SUMMARY]): + printWarning(pkg, 'description-shorter-than-summary') -+ - if not pkg[rpm.RPMTAG_HEADERI18NTABLE]: - self._unexpanded_macros(pkg, '%description', description) - else: -@@ -988,6 +991,10 @@ Name tag.''', + else: + printError(pkg, 'no-description-tag') + +@@ -995,6 +998,10 @@ Name tag.''', '''The major number of the library isn't included in the package's name. ''', ++++++ devel-provide-is-devel-package.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:36.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:36.000000000 +0100 @@ -2,7 +2,7 @@ =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -806,6 +806,10 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -807,6 +807,10 @@ class FilesCheck(AbstractCheck.AbstractC # Check if the package is a development package devel_pkg = devel_regex.search(pkg.name) ++++++ libtool-wrapper-check.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -2,7 +2,7 @@ =================================================================== --- BinariesCheck.py.orig +++ BinariesCheck.py -@@ -309,8 +309,19 @@ class BinariesCheck(AbstractCheck.Abstra +@@ -313,8 +313,19 @@ class BinariesCheck(AbstractCheck.Abstra is_ar = 'current ar archive' in pkgfile.magic is_ocaml_native = 'Objective caml native' in pkgfile.magic is_lua_bytecode = 'Lua bytecode' in pkgfile.magic @@ -22,7 +22,7 @@ if not is_binary: if reference_regex.search(fname): lines = pkg.grep(invalid_dir_ref_regex, fname) -@@ -568,6 +579,15 @@ recompiled separately from the static li +@@ -572,6 +583,15 @@ recompiled separately from the static li Another common mistake that causes this problem is linking with ``gcc -Wl,-shared'' instead of ``gcc -shared''.''', ++++++ no-badness-return.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -15,9 +15,9 @@ =================================================================== --- rpmlint.orig +++ rpmlint -@@ -211,7 +211,7 @@ def main(): +@@ -214,7 +214,7 @@ def main(): % (packages_checked, specfiles_checked, - printed_messages["E"], printed_messages["W"]) + printed_messages["E"], printed_messages["W"])) - if printed_messages["E"] > 0: + if badnessThreshold() < 0 and printed_messages["E"] > 0: ++++++ noarch-lib64.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -2,15 +2,15 @@ =================================================================== --- BinariesCheck.py.orig +++ BinariesCheck.py -@@ -289,6 +289,7 @@ class BinariesCheck(AbstractCheck.Abstra +@@ -291,6 +291,7 @@ class BinariesCheck(AbstractCheck.Abstra binary = False binary_in_usr_lib = False has_usr_lib_file = False + file_in_lib64 = False multi_pkg = False - res = srcname_regex.search(pkg[rpm.RPMTAG_SOURCERPM] or '') -@@ -305,6 +306,10 @@ class BinariesCheck(AbstractCheck.Abstra + srpm = pkg[rpm.RPMTAG_SOURCERPM] +@@ -309,6 +310,10 @@ class BinariesCheck(AbstractCheck.Abstra # only-non-binary-in-usr-lib false positives binary_in_usr_lib = True @@ -21,7 +21,7 @@ is_elf = 'ELF' in pkgfile.magic is_ar = 'current ar archive' in pkgfile.magic is_ocaml_native = 'Objective caml native' in pkgfile.magic -@@ -530,9 +535,12 @@ class BinariesCheck(AbstractCheck.Abstra +@@ -534,9 +539,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 @@ if has_usr_lib_file and not binary_in_usr_lib: printWarning(pkg, 'only-non-binary-in-usr-lib') -@@ -556,6 +564,11 @@ FHS and the FSSTND forbid this.''', +@@ -560,6 +568,11 @@ FHS and the FSSTND forbid this.''', # 'non-sparc32-binary', # '', ++++++ only-reg-files-are-scripts.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -2,7 +2,7 @@ =================================================================== --- InitScriptCheck.py.orig +++ InitScriptCheck.py -@@ -17,7 +17,7 @@ from Filter import addDetails, printErro +@@ -18,7 +18,7 @@ from Filter import addDetails, printErro import AbstractCheck import Config import Pkg @@ -11,7 +11,7 @@ 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 @@ -20,4 +20,4 @@ + basename = os.path.basename(fname) initscript_list.append(basename) - if pkgfile.mode & 0500 != 0500: + if pkgfile.mode & int("500", 8) != int("500", 8): ++++++ rpmgroup-checks.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -2,7 +2,7 @@ =================================================================== --- TagsCheck.py.orig +++ TagsCheck.py -@@ -715,6 +715,8 @@ class TagsCheck(AbstractCheck.AbstractCh +@@ -722,6 +722,8 @@ class TagsCheck(AbstractCheck.AbstractCh self._unexpanded_macros(pkg, 'Group', group) if not group: printError(pkg, 'no-group-tag') @@ -11,7 +11,7 @@ elif VALID_GROUPS and group not in VALID_GROUPS: printWarning(pkg, 'non-standard-group', group) -@@ -1027,6 +1029,10 @@ won't fool the specfile parser, and rebu +@@ -1034,6 +1036,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.''', ++++++ rpmlint-1.5-Fix-setgroups-error-name.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -7,11 +7,11 @@ BinariesCheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/BinariesCheck.py b/BinariesCheck.py -index b770085..cea85b9 100644 ---- a/BinariesCheck.py -+++ b/BinariesCheck.py -@@ -459,7 +459,7 @@ class BinariesCheck(AbstractCheck.AbstractCheck): +Index: rpmlint-1.5/BinariesCheck.py +=================================================================== +--- rpmlint-1.5.orig/BinariesCheck.py ++++ rpmlint-1.5/BinariesCheck.py +@@ -514,7 +514,7 @@ class BinariesCheck(AbstractCheck.Abstra printError(pkg, 'missing-PT_GNU_STACK-section', fname) if bin_info.setgid and bin_info.setuid and not bin_info.setgroups: @@ -20,6 +20,3 @@ if bin_info.chroot: if not bin_info.chdir or not bin_info.chroot_near_chdir: --- -1.8.1.4 - ++++++ rpmlint-checks-master.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/BashismsCheck.py new/rpmlint-checks-master/BashismsCheck.py --- old/rpmlint-checks-master/BashismsCheck.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/BashismsCheck.py 2014-02-14 12:52:25.000000000 +0100 @@ -32,7 +32,7 @@ status, output = Pkg.getstatusoutput(["checkbashisms", filename]) if status == 1: printInfo(pkg, "potential-bashisms", filename) - except Exception, x: + except Exception as x: printError(pkg, 'rpmlint-exception', "%(file)s raised an exception: %(x)s" % {'file':filename, 'x':x}) finally: f.close() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/CheckBuildDate.py new/rpmlint-checks-master/CheckBuildDate.py --- old/rpmlint-checks-master/CheckBuildDate.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/CheckBuildDate.py 2014-02-14 12:52:25.000000000 +0100 @@ -5,20 +5,19 @@ # Purpose : Check for binaries containing build date ############################################################################# -from Filter import * import AbstractCheck -import rpm -import re -import os -import commands import Config +import Filter +import re import stat import time + class BuildDateCheck(AbstractCheck.AbstractFilesCheck): def __init__(self): AbstractCheck.AbstractFilesCheck.__init__(self, "CheckBuildDate", ".*") - self.looksliketime = re.compile('(2[0-3]|[01]?[0-9]):([0-5]?[0-9]):([0-5]?[0-9])') + self.looksliketime = re.compile( + '(2[0-3]|[01]?[0-9]):([0-5]?[0-9]):([0-5]?[0-9])') self.istoday = re.compile(time.strftime("%b %e %Y")) def check_file(self, pkg, filename): @@ -34,16 +33,19 @@ if len(grep_date): if len(grep_time): - printError(pkg, "file-contains-date-and-time", filename) + Filter.printError(pkg, "file-contains-date-and-time", filename) else: - printWarning(pkg, "file-contains-current-date", filename) + Filter.printWarning(pkg, "file-contains-current-date", + filename) -check=BuildDateCheck() +check = BuildDateCheck() if Config.info: - addDetails( + Filter.addDetails( 'file-contains-current-date', -"""Your file contains the current date, this may cause the package to rebuild in excess.""", +"""Your file contains the current date, this may cause the package +to rebuild in excess.""", 'file-contains-date-and-time', -"""Your file uses __DATE and __TIME__ this causes the package to rebuild when not needed""" +"""Your file uses __DATE and __TIME__ this causes the package to +rebuild when not needed""" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/CheckBuildRoot.py new/rpmlint-checks-master/CheckBuildRoot.py --- old/rpmlint-checks-master/CheckBuildRoot.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/CheckBuildRoot.py 2014-02-14 12:52:25.000000000 +0100 @@ -6,15 +6,14 @@ # Purpose : Check for files containing $RPM_BUILD_ROOT ############################################################################# -from Filter import * import AbstractCheck -import rpm -import re -import os -import commands import Config +import Filter +import re +import rpm import stat + class BuildRootCheck(AbstractCheck.AbstractFilesCheck): def __init__(self): AbstractCheck.AbstractFilesCheck.__init__(self, "CheckBuildRoot", ".*") @@ -30,12 +29,12 @@ return if len(pkg.grep(self.build_root_re, filename)): - printError(pkg, "file-contains-buildroot", filename) + Filter.printError(pkg, "file-contains-buildroot", filename) -check=BuildRootCheck() +check = BuildRootCheck() if Config.info: - addDetails( -'file-contains-buildroot', -"Your file contains traces of $RPM_BUILD_ROOT." -) + Filter.addDetails( + 'file-contains-buildroot', + "Your file contains traces of $RPM_BUILD_ROOT." + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/CheckCommonFiles.py new/rpmlint-checks-master/CheckCommonFiles.py --- old/rpmlint-checks-master/CheckCommonFiles.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/CheckCommonFiles.py 2014-02-14 12:52:25.000000000 +0100 @@ -6,21 +6,18 @@ # Purpose : Check for common files being packaged ############################################################################# -from Filter import * import AbstractCheck -import rpm -import re -import commands -import stat import Config -import os -import string +import Filter +import re + class CommonFilesCheck(AbstractCheck.AbstractCheck): def __init__(self): self.map = [] AbstractCheck.AbstractCheck.__init__(self, "CheckCommonFiles") - self.sources_am_re = re.compile('([\w\d_]+_SOURCES\s*=|\s*SUBDIRS\s*=)') + self.sources_am_re = re.compile( + '([\w\d_]+_SOURCES\s*=|\s*SUBDIRS\s*=)') def check(self, pkg): @@ -37,7 +34,7 @@ 'cf8c4d1a5ab88db006c47ae2b51a6b30', '5d4638159851671944108691f23e4f28', '0d6be33865b76025c20b48bcac87adb7'): - printError(pkg, "generic-build-instructions", f) + Filter.printError(pkg, "generic-build-instructions", f) # bnc 379919 #if len(md5) and md5 in ( @@ -49,22 +46,24 @@ # printError(pkg, "duplicated-file-gpl-v3", f) # bsd causes the false positive COPYING.BSD - if len(md5) and f.rsplit('/',1)[1][0].lower() == 'r' and f.rsplit('.',1)[-1].lower() in ( - 'aix', 'bsd', 'dos', 'hpux', 'irix', 'os2', 'mac', 'macos', 'tru64', - 'sco', 'vms', 'win32', 'win', 'solaris'): - printWarning(pkg, "non-linux-readme", f) + if (len(md5) and f.rsplit('/', 1)[1][0].lower() == 'r' and + f.rsplit('.', 1)[-1].lower() in ( + 'aix', 'bsd', 'dos', 'hpux', 'irix', 'os2', 'mac', 'macos', + 'tru64', 'sco', 'vms', 'win32', 'win', 'solaris')): + Filter.printWarning(pkg, "non-linux-readme", f) - if f.endswith("/Makefile.am") and f[:-3] + ".in" in files and f in pkg.docFiles(): + if (f.endswith("/Makefile.am") and f[:-3] + ".in" in files and + f in pkg.docFiles()): if not len(pkg.grep(self.sources_am_re, f)): - printError(pkg, "makefile-junk", f) - printError(pkg, "makefile-junk", f[:-3] + ".in") + Filter.printError(pkg, "makefile-junk", f) + Filter.printError(pkg, "makefile-junk", f[:-3] + ".in") if f[:-3] in files: - printError(pkg, "makefile-junk", f[:-3]) + Filter.printError(pkg, "makefile-junk", f[:-3]) -check=CommonFilesCheck() +check = CommonFilesCheck() if Config.info: - addDetails( + Filter.addDetails( 'generic-build-instructions', """Your package contains a file that contains the FSF generic configure/make/make install instructions. Those are useless @@ -85,5 +84,5 @@ """Your package contains makefiles that only make sense in a source package. Did you package a complete directory from the tarball by using %doc? Consider removing Makefile* from this -directory at the end of your %install section to reduce package bloat.""" -) +directory at the end of your %install section to reduce bloat.""" + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/CheckDBusPolicy.py new/rpmlint-checks-master/CheckDBusPolicy.py --- old/rpmlint-checks-master/CheckDBusPolicy.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/CheckDBusPolicy.py 2014-02-14 12:52:25.000000000 +0100 @@ -27,7 +27,7 @@ if f in pkg.ghostFiles(): continue - # catch xml exceptions + # catch xml exceptions try: if f.startswith("/etc/dbus-1/system.d/"): send_policy_seen = False @@ -52,11 +52,11 @@ if ( deny.hasAttribute('send_interface') \ and not deny.hasAttribute('send_destination')): printError(pkg, 'dbus-policy-deny-without-destination', "%(file)s: %(xml)s" % { 'file':f, 'xml':deny.toxml() }) - + if not send_policy_seen: printError(pkg, 'dbus-policy-missing-allow', "%(file)s does not allow communication" % { 'file':f }) - except Exception, x: + except Exception as x: printError(pkg, 'rpmlint-exception', "%(file)s raised an exception: %(x)s" % {'file':f, 'x':x}) continue diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/CheckExecDocs.py new/rpmlint-checks-master/CheckExecDocs.py --- old/rpmlint-checks-master/CheckExecDocs.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/CheckExecDocs.py 2014-02-14 12:52:25.000000000 +0100 @@ -6,19 +6,15 @@ # Purpose : Check for executable files in %doc #--------------------------------------------------------------- -from Filter import * import AbstractCheck -import rpm -import re -import commands -import stat import Config -import os -import string +import Filter +import stat + def ignore_pkg(name): if name.startswith('bundle-'): - return True + return True if name.find('-devel') != -1: return True if name.find('-doc') != -1: @@ -26,6 +22,7 @@ return False + def lang_ignore_pkg(name): if ignore_pkg(name): return True @@ -36,6 +33,7 @@ return False + class ExecDocsCheck(AbstractCheck.AbstractCheck): def __init__(self): self.map = [] @@ -47,51 +45,56 @@ return files = pkg.files() - complete_size=0 - lang_size=0 + complete_size = 0 + lang_size = 0 for f, pkgfile in files.items(): if stat.S_ISREG(pkgfile.mode): complete_size += pkgfile.size if pkgfile.lang != '': lang_size += pkgfile.size - doc_size=0 + doc_size = 0 for f in pkg.docFiles(): if stat.S_ISREG(files[f].mode): doc_size += files[f].size - if doc_size * 2 >= complete_size \ - and doc_size > 100*1024 and (complete_size - doc_size) * 20 > complete_size \ - and not ignore_pkg(pkg.name): - printWarning(pkg, "package-with-huge-docs", ("%3d%%" % (doc_size * 100 / complete_size)) ) + if doc_size * 2 >= complete_size and \ + doc_size > 100*1024 and \ + (complete_size - doc_size) * 20 > complete_size and \ + not ignore_pkg(pkg.name): + Filter.printWarning(pkg, "package-with-huge-docs", + ("%3d%%" % (doc_size * 100 / complete_size))) if lang_size * 2 >= complete_size \ - and lang_size > 100*1024 and (complete_size - lang_size) * 20 > complete_size \ - and not lang_ignore_pkg(pkg.name): - printWarning(pkg, "package-with-huge-translation", ("%3d%%" % (lang_size * 100 / complete_size))) + and lang_size > 100*1024 and \ + (complete_size - lang_size) * 20 > complete_size and \ + not lang_ignore_pkg(pkg.name): + Filter.printWarning(pkg, "package-with-huge-translation", + ("%3d%%" % (lang_size * 100 / complete_size))) for f in pkg.docFiles(): - mode=files[f].mode - if not stat.S_ISREG(mode) or not mode & 0111: - continue - for ext in ['txt', 'gif', 'jpg', 'html', 'pdf', 'ps', 'pdf.gz', 'ps.gz']: - if f.endswith("." + ext): - printError(pkg, 'executable-docs', f) + mode = files[f].mode + if not stat.S_ISREG(mode) or not mode & 0o111: + continue + for ext in ['txt', 'gif', 'jpg', 'html', + 'pdf', 'ps', 'pdf.gz', 'ps.gz']: + if f.endswith("." + ext): + Filter.printError(pkg, 'executable-docs', f) for name in ['README', 'NEWS', 'COPYING', 'AUTHORS']: if f.endswith("/" + name): - printError(pkg, 'executable-docs', f) + Filter.printError(pkg, 'executable-docs', f) -check=ExecDocsCheck() +check = ExecDocsCheck() if Config.info: - addDetails( -'executable-docs', -"Documentation should not be executable.", -'package-with-huge-docs', -"""More than half the size of your package is documentation. -Consider splitting it into a -doc subpackage.""", -'package-with-huge-translation', -"""More than half the size of your package is language-specific. -Consider splitting it into a -lang subpackage.""" -) + Filter.addDetails( + 'executable-docs', + "Documentation should not be executable.", + 'package-with-huge-docs', + """More than half the size of your package is documentation. + Consider splitting it into a -doc subpackage.""", + 'package-with-huge-translation', + """More than half the size of your package is language-specific. + Consider splitting it into a -lang subpackage.""" + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/CheckInitScripts.py new/rpmlint-checks-master/CheckInitScripts.py --- old/rpmlint-checks-master/CheckInitScripts.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/CheckInitScripts.py 2014-02-14 12:52:25.000000000 +0100 @@ -8,13 +8,9 @@ from Filter import * import AbstractCheck -import rpm +import Config import re -import commands import stat -import Config -import os -import string insserv_regex=re.compile('^\s*sbin/insserv', re.MULTILINE) preun_regex=re.compile('^\s*/etc/init.d/\S+ stop', re.MULTILINE) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/CheckKDE4Deps.py new/rpmlint-checks-master/CheckKDE4Deps.py --- old/rpmlint-checks-master/CheckKDE4Deps.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/CheckKDE4Deps.py 2014-02-14 12:52:25.000000000 +0100 @@ -12,7 +12,6 @@ import re import os import string -import commands import Config import Pkg import stat @@ -113,7 +112,7 @@ """Please add %kde4_runtime_requires to the (sub-)package to have the right versioned dependency on the KDE version it was built against.""", 'suse-kde4-missing-dependency', -"""The package builds against a KDE4 related library, but it is missing the runtime +"""The package builds against a KDE4 related library, but it is missing the runtime depencency macro. please add the suggested macro to the (sub-)package listing in the spec file.""" ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/CheckLogrotate.py new/rpmlint-checks-master/CheckLogrotate.py --- old/rpmlint-checks-master/CheckLogrotate.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/CheckLogrotate.py 2014-02-14 12:52:25.000000000 +0100 @@ -34,7 +34,7 @@ printError(pkg, "logrotate-duplicate", n) else: dirs[n] = o - except Exception, x: + except Exception as x: printError(pkg, 'rpmlint-exception', "%(file)s raised an exception: %(x)s" % {'file':f, 'x':x}) for d in sorted(dirs.keys()): @@ -42,11 +42,11 @@ if d != '/var/log': printError(pkg, 'suse-logrotate-log-dir-not-packaged', d) continue - mode = files[d].mode&0777 + mode = files[d].mode&0o777 if files[d].user != 'root' and (dirs[d] is None or dirs[d][0] != files[d].user): printError(pkg, 'suse-logrotate-user-writable-log-dir', \ "%s %s:%s %04o"%(d, files[d].user, files[d].group, mode)) - elif files[d].group != 'root' and mode&020 and (dirs[d] is None or dirs[d][1] != files[d].group): + elif files[d].group != 'root' and mode&0o20 and (dirs[d] is None or dirs[d][1] != files[d].group): printError(pkg, 'suse-logrotate-user-writable-log-dir', \ "%s %s:%s %04o"%(d, files[d].user, files[d].group, mode)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/CheckPkgConfig.py new/rpmlint-checks-master/CheckPkgConfig.py --- old/rpmlint-checks-master/CheckPkgConfig.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/CheckPkgConfig.py 2014-02-14 12:52:25.000000000 +0100 @@ -6,58 +6,60 @@ # Purpose : Check for errors in Pkgconfig files #--------------------------------------------------------------- -from Filter import * import AbstractCheck -import rpm -import re -import commands import Config -import os +import Filter +import re import stat + class PkgConfigCheck(AbstractCheck.AbstractFilesCheck): def __init__(self): - AbstractCheck.AbstractFilesCheck.__init__(self, "CheckPkgConfig", ".*/pkgconfig/.*\.pc$") + AbstractCheck.AbstractFilesCheck.__init__( + self, "CheckPkgConfig", ".*/pkgconfig/.*\.pc$") # currently causes too many failures (2008-03-05) - #self.suspicious_dir=re.compile('(?:/usr/src/\w+/BUILD|/var/tmp|/tmp|/home|\@\w{1,50}\@)') - self.suspicious_dir=re.compile('(?:/usr/src/\w+/BUILD|/var/tmp|/tmp|/home)') + self.suspicious_dir = re.compile( + '(?:/usr/src/\w+/BUILD|/var/tmp|/tmp|/home)') def check(self, pkg): # check for references to /lib when in lib64 mode if pkg.arch in ('x86_64', 'ppc64', 's390x'): - self.wronglib_dir=re.compile('-L/usr/lib\\b') + self.wronglib_dir = re.compile('-L/usr/lib\\b') else: - self.wronglib_dir=re.compile('-L/usr/lib64\\b') + self.wronglib_dir = re.compile('-L/usr/lib64\\b') AbstractCheck.AbstractFilesCheck.check(self, pkg) - def check_file(self, pkg, filename): if pkg.isSource() or not stat.S_ISREG(pkg.files()[filename].mode): return if pkg.grep(self.suspicious_dir, filename): - printError(pkg, "invalid-pkgconfig-file", filename) + Filter.printError(pkg, "invalid-pkgconfig-file", filename) - pc_file=file(pkg.dirName() + "/" + filename, "r") + pc_file = file(pkg.dirName() + "/" + filename, "r") for l in pc_file: if l.startswith('Libs:') and self.wronglib_dir.search(l): - printError(pkg, 'pkgconfig-invalid-libs-dir', filename, l) + Filter.printError(pkg, 'pkgconfig-invalid-libs-dir', + filename, l) + -check=PkgConfigCheck() +check = PkgConfigCheck() if Config.info: - addDetails( -'invalid-pkgconfig-file', -'''Your .pc file appears to be invalid. Possible causes are: -- it contains traces of $RPM_BUILD_ROOT or $RPM_BUILD_DIR. -- it contains unreplaced macros (@have_foo@) -- it references invalid paths (e.g. /home or /tmp) - -Please double-check and report false positives. -''', -'pkgconfig-invalid-libs-dir', -''' Your .pc file contains -L/usr/lib or -L/lib and is built for a lib64 target, -or contains references to -L/usr/lib64 or -L/lib64 and is built for a lib target. -Please remove the wrong library paths from the pc file.''' -) + Filter.addDetails( + 'invalid-pkgconfig-file', + '''Your .pc file appears to be invalid. Possible causes are: + - it contains traces of $RPM_BUILD_ROOT or $RPM_BUILD_DIR. + - it contains unreplaced macros (@have_foo@) + - it references invalid paths (e.g. /home or /tmp) + + Please double-check and report false positives. + ''', + 'pkgconfig-invalid-libs-dir', + ''' Your .pc file contains -L/usr/lib or -L/lib and is + built on a lib64 target, or contains references to -L/usr/lib64 or + -L/lib64 and is built for a lib target. + + Please remove the wrong library paths from the pc file.''' + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/CheckPolkitPrivs.py new/rpmlint-checks-master/CheckPolkitPrivs.py --- old/rpmlint-checks-master/CheckPolkitPrivs.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/CheckPolkitPrivs.py 2014-02-14 12:52:25.000000000 +0100 @@ -26,7 +26,7 @@ self._parsefile(filename) def _parsefile(self,filename): - for line in file(filename): + for line in open(filename): line = line.split('#')[0].split('\n')[0] if len(line): line = re.split(r'\s+', line) @@ -77,7 +77,7 @@ if f in pkg.ghostFiles(): continue - # catch xml exceptions + # catch xml exceptions try: if f.startswith("/usr/share/PolicyKit/policy/")\ or f.startswith("/usr/share/polkit-1/actions/"): @@ -123,7 +123,7 @@ 'polkit-cant-acquire-privilege', '%s (%s:%s:%s)' % (action, \ settings['allow_any'], settings['allow_inactive'], settings['allow_active'])) - except Exception, x: + except Exception as x: printError(pkg, 'rpmlint-exception', "%(file)s raised an exception: %(x)s" % {'file':f, 'x':x}) continue diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/CheckRCLinks.py new/rpmlint-checks-master/CheckRCLinks.py --- old/rpmlint-checks-master/CheckRCLinks.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/CheckRCLinks.py 2014-02-14 12:52:25.000000000 +0100 @@ -5,17 +5,19 @@ # Purpose : Check for missing rc* links and shadowed init scripts ############################################################################# +import os +import stat + from Filter import * import AbstractCheck -import os import Config -import stat + class RCLinksCheck(AbstractCheck.AbstractCheck): def __init__(self): AbstractCheck.AbstractCheck.__init__(self, 'CheckRCLinks') - def check(self, pkg ): + def check(self, pkg): if pkg.isSource(): return @@ -27,21 +29,21 @@ if fname in pkg.ghostFiles(): continue - if stat.S_ISLNK(pkgfile.mode) and (fname.startswith('/usr/sbin/rc') \ - or fname.startswith('/sbin/rc')): + if (stat.S_ISLNK(pkgfile.mode) and + (fname.startswith('/usr/sbin/rc') or + fname.startswith('/sbin/rc'))): rclinks.add(fname.partition('/rc')[2]) elif fname.startswith('/usr/lib/systemd/system/'): + basename = os.path.basename(fname) if '@' in fname: continue - if fname.endswith('.service'): - rccandidates.add(os.path.basename(fname).split('.service')[0]) - if fname.endswith('.target'): - rccandidates.add(os.path.basename(fname).split('.target')[0]) + if fname.endswith('.service') or fname.endswith('.target'): + rccandidates.add(basename.rpartition('.')[0]) elif fname.startswith('/etc/init.d/'): basename = os.path.basename(fname) - if not basename.startswith('rc') \ - and not basename.startswith('boot.'): - initscripts.add(basename) + if not (basename.startswith('rc') or + basename.startswith('boot.')): + initscripts.add(basename) for fname in sorted(initscripts): if fname in rccandidates: @@ -53,8 +55,7 @@ if fname not in sorted(rclinks): printWarning(pkg, "suse-missing-rclink", fname) -check=RCLinksCheck() - +check = RCLinksCheck() if Config.info: addDetails( 'suse-missing-rclink', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/CheckSUIDPermissions.py new/rpmlint-checks-master/CheckSUIDPermissions.py --- old/rpmlint-checks-master/CheckSUIDPermissions.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/CheckSUIDPermissions.py 2014-02-14 12:52:25.000000000 +0100 @@ -8,40 +8,40 @@ from Filter import * import AbstractCheck -import re import os -import string +import re import rpm _permissions_d_whitelist = ( -"lprng", -"lprng.paranoid", -"mail-server", -"mail-server.paranoid", -"postfix", -"postfix.paranoid", -"sendmail", -"sendmail.paranoid", -"squid", -"texlive", -"texlive.texlive", + "lprng", + "lprng.paranoid", + "mail-server", + "mail-server.paranoid", + "postfix", + "postfix.paranoid", + "sendmail", + "sendmail.paranoid", + "squid", + "texlive", + "texlive.texlive", ) + class SUIDCheck(AbstractCheck.AbstractCheck): def __init__(self): AbstractCheck.AbstractCheck.__init__(self, "CheckSUIDPermissions") self.perms = {} - files = [ "/etc/permissions", "/etc/permissions.secure" ] + files = ["/etc/permissions", "/etc/permissions.secure"] for file in files: if os.path.exists(file): self._parsefile(file) - def _parsefile(self,file): + def _parsefile(self, file): lnr = 0 lastfn = None for line in open(file): - lnr+=1 + lnr += 1 line = line.split('#')[0].split('\n')[0] line = line.lstrip() if not len(line): @@ -59,7 +59,7 @@ owner = line[1].replace('.', ':') mode = line[2] - self.perms[fn] = { "owner" : owner, "mode" : int(mode,8)&07777} + self.perms[fn] = {"owner": owner, "mode": int(mode, 8) & 0o7777} # for permissions that don't change and therefore # don't need special handling if file == '/etc/permissions': @@ -84,11 +84,11 @@ if f.startswith("/etc/permissions.d/"): bn = f[19:] - if not bn in _permissions_d_whitelist: + if bn not in _permissions_d_whitelist: printError(pkg, "permissions-unauthorized-file", f) bn = bn.split('.')[0] - if not bn in permfiles: + if bn not in permfiles: permfiles[bn] = 1 for f in permfiles: @@ -105,7 +105,7 @@ if pkgfile.filecaps: printError(pkg, 'permissions-fscaps', '%(file)s has fscaps "%(caps)s"' % \ - { 'file':f, 'caps':pkgfile.filecaps}) + {'file': f, 'caps': pkgfile.filecaps}) mode = pkgfile.mode owner = pkgfile.user+':'+pkgfile.group @@ -117,11 +117,11 @@ # S_IFDIR 004 directory # S_IFCHR 002 character device # S_IFIFO 001 FIFO - type = (mode>>12)&017; - mode &= 07777 + type = (mode >> 12) & 0o17 + mode &= 0o7777 need_verifyscript = False - if f in self.perms or (type == 04 and f+"/" in self.perms): - if type == 012: + if f in self.perms or (type == 4 and f+"/" in self.perms): + if type == 0o12: printWarning(pkg, "permissions-symlink", f) continue @@ -129,13 +129,13 @@ m = 0 o = "invalid" - if type == 04: + if type == 4: if f in self.perms: printWarning(pkg, 'permissions-dir-without-slash', f) else: f += '/' - if type == 010 and mode&0111: + if type == 0o10 and mode & 0o111: # pie binaries have 'shared object' here if 'ELF' in pkgfile.magic and not 'shared object' in pkgfile.magic: printError(pkg, 'non-position-independent-executable', f) @@ -144,35 +144,37 @@ o = self.perms[f]['owner'] if mode != m: - printError(pkg, 'permissions-incorrect', '%(file)s has mode 0%(mode)o but should be 0%(m)o' % \ - { 'file':f, 'mode':mode, 'm':m }) + printError(pkg, 'permissions-incorrect', + '%(file)s has mode 0%(mode)o but should be 0%(m)o' % + {'file': f, 'mode': mode, 'm': m}) if owner != o: - printError(pkg, 'permissions-incorrect-owner', '%(file)s belongs to %(owner)s but should be %(o)s' % \ - { 'file':f, 'owner':owner, 'o':o }) + printError(pkg, 'permissions-incorrect-owner', + '%(file)s belongs to %(owner)s but should be %(o)s' % \ + {'file': f, 'owner': owner, 'o': o}) - elif type != 012: + elif type != 0o12: if f+'/' in self.perms: printWarning(pkg, 'permissions-file-as-dir', f+' is a file but listed as directory') - if mode&06000: + if mode & 0o6000: need_verifyscript = True - msg = '%(file)s is packaged with setuid/setgid bits (0%(mode)o)' % { 'file':f, 'mode':mode } - if type != 04: + msg = '%(file)s is packaged with setuid/setgid bits (0%(mode)o)' % {'file': f, 'mode': mode} + if type != 0o4: printError(pkg, 'permissions-file-setuid-bit', msg) else: printWarning(pkg, 'permissions-directory-setuid-bit', msg) - if type == 010: + if type == 0o10: if not 'shared object' in pkgfile.magic: printError(pkg, 'non-position-independent-executable', f) - if mode&02: + if mode & 0o2: need_verifyscript = True - printError(pkg, 'permissions-world-writable', \ - '%(file)s is packaged with world writable permissions (0%(mode)o)' % \ - { 'file':f, 'mode':mode }) + printError(pkg, 'permissions-world-writable', + '%(file)s is packaged with world writable permissions (0%(mode)o)' % + {'file': f, 'mode': mode}) script = pkg[rpm.RPMTAG_POSTIN] or pkg.scriptprog(pkg[rpm.RPMTAG_POSTINPROG]) found = False @@ -192,8 +194,8 @@ (not f in self.perms or not 'static' in self.perms[f]): if not script or not found: - printError(pkg, 'permissions-missing-postin', \ - "missing %%set_permissions %s in %%post" % f) + printError(pkg, 'permissions-missing-postin', + "missing %%set_permissions %s in %%post" % f) need_set_permissions = True script = pkg[rpm.RPMTAG_VERIFYSCRIPT] or pkg[rpm.RPMTAG_VERIFYSCRIPTPROG] @@ -206,20 +208,19 @@ break if not script or not found: - printWarning(pkg, 'permissions-missing-verifyscript', \ - "missing %%verify_permissions -e %s" % f) - + printWarning(pkg, 'permissions-missing-verifyscript', + "missing %%verify_permissions -e %s" % f) if need_set_permissions: if not 'permissions' in map(lambda x: x[0], pkg.prereq()): - printError(pkg, 'permissions-missing-requires', \ - "missing 'permissions' in PreReq") + printError(pkg, 'permissions-missing-requires', + "missing 'permissions' in PreReq") if found_suseconfig: - printInfo(pkg, 'permissions-suseconfig-obsolete', \ - "%run_permissions is obsolete") + printInfo(pkg, 'permissions-suseconfig-obsolete', + "%run_permissions is obsolete") -check=SUIDCheck() +check = SUIDCheck() if Config.info: addDetails( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/DuplicatesCheck.py new/rpmlint-checks-master/DuplicatesCheck.py --- old/rpmlint-checks-master/DuplicatesCheck.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/DuplicatesCheck.py 2014-02-14 12:52:25.000000000 +0100 @@ -6,16 +6,14 @@ # Purpose : Check for duplicate files being packaged separately ############################################################################# -from Filter import * import AbstractCheck -import rpm -import re -import commands -import stat import Config +import Filter import os +import stat import string + def get_prefix(file): pathlist = string.split(file, '/') if len(pathlist) == 3: @@ -23,6 +21,7 @@ return "/".join(pathlist[0:3]) + class DuplicatesCheck(AbstractCheck.AbstractCheck): def __init__(self): self.map = [] @@ -48,26 +47,29 @@ md5s.setdefault(pkgfile.md5, set()).add(f) sizes[pkgfile.md5] = pkgfile.size - sum=0 + sum = 0 for f in md5s: - duplicates=md5s[f] - if len(duplicates) == 1: continue + duplicates = md5s[f] + if len(duplicates) == 1: + continue - one=duplicates.pop() + one = duplicates.pop() one_is_config = False if one in configFiles: one_is_config = True - partition=get_prefix(one) + partition = get_prefix(one) st = os.stat(pkg.dirName() + '/' + one) diff = 1 + len(duplicates) - st[stat.ST_NLINK] - if diff <= 0: + if diff <= 0: for dupe in duplicates: if partition != get_prefix(dupe): - printError(pkg,"hardlink-across-partition",one,dupe) + Filter.printError(pkg, "hardlink-across-partition", + one, dupe) if one_is_config and dupe in configFiles: - printError(pkg,"hardlink-across-config-files",one,dupe) + Filter.printError(pkg, "hardlink-across-config-files", + one, dupe) continue for dupe in duplicates: @@ -75,15 +77,16 @@ diff = diff - 1 sum += sizes[f] * diff if sizes[f] and diff > 0: - printWarning(pkg, 'files-duplicate', one,":".join(duplicates)) + Filter.printWarning(pkg, 'files-duplicate', one, + ":".join(duplicates)) if sum > 100000: - printError(pkg, 'files-duplicated-waste', sum) + Filter.printError(pkg, 'files-duplicated-waste', sum) -check=DuplicatesCheck() +check = DuplicatesCheck() if Config.info: - addDetails( + Filter.addDetails( 'files-duplicated-waste', """Your package contains duplicated files that are not hard- or symlinks. You should use the %fdupes macro to link the files to one.""", @@ -97,4 +100,4 @@ """Your package contains two config files that are apparently hardlinked. Hardlinking a config file is probably not what you want. Please double check and report false positives.""" -) + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/ErlangCheck.py new/rpmlint-checks-master/ErlangCheck.py --- old/rpmlint-checks-master/ErlangCheck.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/ErlangCheck.py 2014-02-14 12:52:25.000000000 +0100 @@ -6,37 +6,41 @@ # Purpose : Check for erlang compiled files ############################################################################# -from Filter import * import AbstractCheck -import rpm -import re -import os -import commands import Config -import stat +import Filter +import re +import rpm from pybeam import BeamFile + class ErlangCheck(AbstractCheck.AbstractFilesCheck): def __init__(self): - AbstractCheck.AbstractFilesCheck.__init__(self, "ErlangCheck", ".*?\.beam$") - build_dir = rpm.expandMacro("%_builddir") + AbstractCheck.AbstractFilesCheck.__init__( + self, "ErlangCheck", ".*?\.beam$") + build_dir = rpm.expandMacro("%_builddir") self.source_re = re.compile(build_dir) def check_file(self, pkg, filename): beam = BeamFile(pkg.files()[filename].path) if 'debug_info' not in beam.compileinfo['options']: - printWarning(pkg, "beam-compiled-without-debug_info", filename) + Filter.printWarning( + pkg, "beam-compiled-without-debug_info", filename) if not self.source_re.match(beam.compileinfo['source'].value): - printWarning(pkg, "beam-was-not-recompiled", filename, beam.compileinfo['source'].value) + Filter.printWarning( + pkg, "beam-was-not-recompiled", filename, + beam.compileinfo['source'].value) -check=ErlangCheck() +check = ErlangCheck() if Config.info: - addDetails( + Filter.addDetails( 'beam-compiled-without-debug_info', -"Your beam file indicates that it doesn't contain debug_info. Please, make sure that you compile with +debug_info.", +""""Your beam file indicates that it doesn't contain debug_info. +Please, make sure that you compile with +debug_info.""", 'beam-was-not-recompiled', -"It seems that your beam file was not compiled by you, but was just copied in binary form to destination. Please, make sure that you really compile it from the sources.", +"""It seems that your beam file was not compiled by you, but was +just copied in binary form to destination. Please, make sure +that you really compile it from the sources.""", ) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/KMPPolicyCheck.py new/rpmlint-checks-master/KMPPolicyCheck.py --- old/rpmlint-checks-master/KMPPolicyCheck.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/KMPPolicyCheck.py 2014-02-14 12:52:25.000000000 +0100 @@ -10,7 +10,6 @@ import AbstractCheck import rpm import re -import commands import stat import Config import os diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/LibraryPolicyCheck.py new/rpmlint-checks-master/LibraryPolicyCheck.py --- old/rpmlint-checks-master/LibraryPolicyCheck.py 2014-01-30 10:26:12.000000000 +0100 +++ new/rpmlint-checks-master/LibraryPolicyCheck.py 2014-02-14 12:52:25.000000000 +0100 @@ -8,7 +8,9 @@ import AbstractCheck import Config -from Filter import printWarning, printError, addDetails +from Filter import addDetails +from Filter import printError +from Filter import printWarning import os import Pkg import rpm @@ -334,10 +336,12 @@ dirs.add(lib_dir) if bi.soname in pkg_requires: # But not if the library is used by the pkg itself - # This avoids program packages with their own private lib - # FIXME: we'd need to check if somebody else links to this lib + # This avoids program packages with their own + # private lib + # FIXME: we'd need to check if somebody else links + # to this lib reqlibs.add(bi.soname) - except: + except Exception: pass pass ++++++ rpmlint-decode-fix.diff ++++++ Index: rpmlint-1.5/Pkg.py =================================================================== --- rpmlint-1.5.orig/Pkg.py +++ rpmlint-1.5/Pkg.py @@ -85,7 +85,7 @@ def getstatusoutput(cmd, stdoutonly = Fa stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True) proc.stdin.close() - text = proc.stdout.read().decode() + text = proc.stdout.read() sts = proc.wait() if sts is None: sts = 0 diff -ruN rpmlint-1.5/BinariesCheck.py rpmlint-1.5.new/BinariesCheck.py --- rpmlint-1.5/BinariesCheck.py 2014-02-27 12:06:25.018163441 +0100 +++ rpmlint-1.5.new/BinariesCheck.py 2014-02-27 12:04:14.210110261 +0100 @@ -198,7 +198,7 @@ try: fobj = open(path, 'rb') fobj.seek(-12, 2) # 2 == os.SEEK_END, for python 2.4 compat (#172) - self.tail = fobj.read().decode() + self.tail = fobj.read() except Exception: e = sys.exc_info()[1] printWarning(pkg, 'binaryinfo-tail-failed %s: %s' % (file, e)) @@ -296,7 +296,7 @@ multi_pkg = False srpm = pkg[rpm.RPMTAG_SOURCERPM] if srpm: - res = srcname_regex.search(srpm.decode()) + res = srcname_regex.search(srpm) if res: multi_pkg = (pkg.name != res.group(1)) diff -ruN rpmlint-1.5/DocFilesCheck.py rpmlint-1.5.new/DocFilesCheck.py --- rpmlint-1.5/DocFilesCheck.py 2014-02-27 12:06:24.826161897 +0100 +++ rpmlint-1.5.new/DocFilesCheck.py 2014-02-27 12:04:29.681234928 +0100 @@ -44,7 +44,7 @@ # register things which are provided by the package for i in pkg.header[rpm.RPMTAG_PROVIDES]: - core_reqs[i.decode()] = [] + core_reqs[i] = [] for i in files: core_reqs[i] = [] diff -ruN rpmlint-1.5/FilesCheck.py rpmlint-1.5.new/FilesCheck.py --- rpmlint-1.5/FilesCheck.py 2014-02-27 12:06:25.012163393 +0100 +++ rpmlint-1.5.new/FilesCheck.py 2014-02-27 12:04:41.277328352 +0100 @@ -957,11 +957,11 @@ # Prefetch scriptlets, strip quotes from them (#169) postin = (pkg[rpm.RPMTAG_POSTIN] or \ - pkg.scriptprog(rpm.RPMTAG_POSTINPROG)).decode() + pkg.scriptprog(rpm.RPMTAG_POSTINPROG)) if postin: postin = quotes_regex.sub('', postin) postun = (pkg[rpm.RPMTAG_POSTUN] or \ - pkg.scriptprog(rpm.RPMTAG_POSTUNPROG)).decode() + pkg.scriptprog(rpm.RPMTAG_POSTUNPROG)) if postun: postun = quotes_regex.sub('', postun) diff -ruN rpmlint-1.5/LSBCheck.py rpmlint-1.5.new/LSBCheck.py --- rpmlint-1.5/LSBCheck.py 2014-02-27 12:06:24.827161905 +0100 +++ rpmlint-1.5.new/LSBCheck.py 2014-02-27 12:04:52.612419655 +0100 @@ -32,13 +32,11 @@ version = pkg[rpm.RPMTAG_VERSION] if version: - version = version.decode() if not version_regex.search(version): printError(pkg, 'non-lsb-compliant-version', version) release = pkg[rpm.RPMTAG_RELEASE] if release: - release = release.decode() if not version_regex.search(release): printError(pkg, 'non-lsb-compliant-release', release) diff -ruN rpmlint-1.5/Pkg.py rpmlint-1.5.new/Pkg.py --- rpmlint-1.5/Pkg.py 2014-02-27 12:06:25.041163626 +0100 +++ rpmlint-1.5.new/Pkg.py 2014-02-27 12:03:33.599782891 +0100 @@ -448,7 +448,7 @@ os.close(fd) self.is_source = not self.header[rpm.RPMTAG_SOURCERPM] - self.name = self.header[rpm.RPMTAG_NAME].decode() + self.name = self.header[rpm.RPMTAG_NAME] if self.isNoSource(): self.arch = 'nosrc' elif self.isSource(): @@ -534,7 +534,7 @@ # LANGUAGE trumps other env vars per GNU gettext docs, see also #166 orig = os.environ.get('LANGUAGE') os.environ['LANGUAGE'] = lang - ret = self[tag].decode() + ret = self[tag] if orig is not None: os.environ['LANGUAGE'] = orig return ret @@ -599,17 +599,17 @@ modes = self.header[rpm.RPMTAG_FILEMODES] users = self.header[rpm.RPMTAG_FILEUSERNAME] groups = self.header[rpm.RPMTAG_FILEGROUPNAME] - links = [x.decode() for x in self.header[rpm.RPMTAG_FILELINKTOS]] + links = self.header[rpm.RPMTAG_FILELINKTOS] sizes = self.header[rpm.RPMTAG_FILESIZES] md5s = self.header[rpm.RPMTAG_FILEMD5S] mtimes = self.header[rpm.RPMTAG_FILEMTIMES] rdevs = self.header[rpm.RPMTAG_FILERDEVS] langs = self.header[rpm.RPMTAG_FILELANGS] inodes = self.header[rpm.RPMTAG_FILEINODES] - requires = [x.decode() for x in self.header[rpm.RPMTAG_FILEREQUIRE]] - provides = [x.decode() for x in self.header[rpm.RPMTAG_FILEPROVIDE]] - files = [x.decode() for x in self.header[rpm.RPMTAG_FILENAMES]] - magics = [x.decode() for x in self.header[rpm.RPMTAG_FILECLASS]] + requires = self.header[rpm.RPMTAG_FILEREQUIRE] + provides = self.header[rpm.RPMTAG_FILEPROVIDE] + files = self.header[rpm.RPMTAG_FILENAMES] + magics = self.header[rpm.RPMTAG_FILECLASS] try: # rpm >= 4.7.0 filecaps = self.header[rpm.RPMTAG_FILECAPS] except: @@ -736,8 +736,8 @@ if versions: for loop in range(len(versions)): - name = names[loop].decode() - evr = stringToVersion(versions[loop].decode()) + name = names[loop] + evr = stringToVersion(versions[loop]) if prereq is not None and flags[loop] & PREREQ_FLAG: prereq.append((name, flags[loop] & (~PREREQ_FLAG), evr)) elif strong_only and flags[loop] & rpm.RPMSENSE_STRONG: diff -ruN rpmlint-1.5/rpmdiff rpmlint-1.5.new/rpmdiff --- rpmlint-1.5/rpmdiff 2014-02-27 12:06:24.826161897 +0100 +++ rpmlint-1.5.new/rpmdiff 2014-02-27 12:03:50.387918248 +0100 @@ -228,16 +228,16 @@ if namestr == 'REQUIRES': namestr = self.req2str(oldentry[1]) self.__add(self.DEPFORMAT, - (self.REMOVED, namestr, oldentry[0].decode(), - self.sense2str(oldentry[1]), oldentry[2].decode())) + (self.REMOVED, namestr, oldentry[0], + self.sense2str(oldentry[1]), oldentry[2])) for newentry in n: if not newentry in o: namestr = name if namestr == 'REQUIRES': namestr = self.req2str(newentry[1]) self.__add(self.DEPFORMAT, - (self.ADDED, namestr, newentry[0].decode(), - self.sense2str(newentry[1]), newentry[2].decode())) + (self.ADDED, namestr, newentry[0], + self.sense2str(newentry[1]), newentry[2])) def __fileIteratorToDict(self, fi): result = {} diff -ruN rpmlint-1.5/TagsCheck.py rpmlint-1.5.new/TagsCheck.py --- rpmlint-1.5/TagsCheck.py 2014-02-27 12:06:25.036163586 +0100 +++ rpmlint-1.5.new/TagsCheck.py 2014-02-27 12:05:51.742895726 +0100 @@ -536,7 +536,6 @@ packager = pkg[rpm.RPMTAG_PACKAGER] if packager: - packager = packager.decode() self._unexpanded_macros(pkg, 'Packager', packager) if Config.getOption('Packager') and \ not packager_regex.search(packager): @@ -546,7 +545,6 @@ version = pkg[rpm.RPMTAG_VERSION] if version: - version = version.decode() self._unexpanded_macros(pkg, 'Version', version) res = invalid_version_regex.search(version) if res: @@ -556,7 +554,6 @@ release = pkg[rpm.RPMTAG_RELEASE] if release: - release = release.decode() self._unexpanded_macros(pkg, 'Release', release) if release_ext and not extension_regex.search(release): printWarning(pkg, 'not-standard-release-extension', release) @@ -688,12 +685,9 @@ ignored_words.update((x[0] for x in pkg.obsoletes())) langs = pkg[rpm.RPMTAG_HEADERI18NTABLE] - if langs: - langs = [x.decode() for x in langs] summary = pkg[rpm.RPMTAG_SUMMARY] if summary: - summary = summary.decode() if not langs: self._unexpanded_macros(pkg, 'Summary', summary) else: @@ -704,7 +698,6 @@ description = pkg[rpm.RPMTAG_DESCRIPTION] if description: - description = description.decode() if not langs: self._unexpanded_macros(pkg, '%description', description) else: ++++++ rpmlint-fix-unexpanded-macros-for-array-values.patch ++++++
From 092a54ca23367c845f796f753fa8ff43746b844a Mon Sep 17 00:00:00 2001 From: Alberto Planas <aplanas@suse.com> Date: Thu, 27 Feb 2014 16:35:13 +0100 Subject: [PATCH] Fix _unexpanded_macros for array values
--- TagsCheck.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/TagsCheck.py b/TagsCheck.py index c6f5dda..712d4e0 100644 --- a/TagsCheck.py +++ b/TagsCheck.py @@ -533,13 +533,20 @@ class TagsCheck(AbstractCheck.AbstractCheck): AbstractCheck.AbstractCheck.__init__(self, 'TagsCheck') def _unexpanded_macros(self, pkg, tagname, value, is_url=False): + def _check_value(value): + for match in AbstractCheck.macro_regex.findall(value): + # Do not warn about %XX URL escapes + if is_url and re.match('^%[0-9A-F][0-9A-F]$', match, re.I): + continue + printWarning(pkg, 'unexpanded-macro', tagname, match) + if not value: return - for match in AbstractCheck.macro_regex.findall(value): - # Do not warn about %XX URL escapes - if is_url and re.match('^%[0-9A-F][0-9A-F]$', match, re.I): - continue - printWarning(pkg, 'unexpanded-macro', tagname, match) + if isinstance(value, list): + for single_value in value: + _check_value(single_value) + else: + _check_value(value) def check(self, pkg): -- 1.9.0 ++++++ rpmlint-pkg-quoting.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -2,12 +2,12 @@ =================================================================== --- Pkg.py.orig +++ Pkg.py -@@ -490,7 +490,7 @@ class Pkg: +@@ -493,7 +493,7 @@ class Pkg: dir = self.dirname) # TODO: better shell escaping or sequence based command invocation command_str = \ - 'rpm2cpio "%s" | (cd "%s"; cpio -id); chmod -R +rX "%s"' % \ + "rpm2cpio '%s' | (cd '%s'; cpio -id); chmod -R +rX '%s'" % \ (self.filename, self.dirname, self.dirname) - cmd = commands.getstatusoutput(command_str) + cmd = getstatusoutput(command_str, shell=True) self.extracted = True ++++++ selfconflicts-provide.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -2,7 +2,7 @@ =================================================================== --- TagsCheck.py.orig +++ TagsCheck.py -@@ -820,6 +820,7 @@ class TagsCheck(AbstractCheck.AbstractCh +@@ -827,6 +827,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 @@ for o in (x for x in obs_names if x not in prov_names): printWarning(pkg, 'obsolete-not-provided', o) -@@ -831,6 +832,8 @@ class TagsCheck(AbstractCheck.AbstractCh +@@ -838,6 +839,8 @@ class TagsCheck(AbstractCheck.AbstractCh # https://bugzilla.redhat.com/460872 useless_provides = [] for p in prov_names: @@ -19,7 +19,7 @@ if prov_names.count(p) != 1 and p not in useless_provides: useless_provides.append(p) for p in useless_provides: -@@ -971,6 +974,10 @@ the Release tag.''', +@@ -978,6 +981,10 @@ the Release tag.''', '''There is no Name tag in your package. You have to specify a name using the Name tag.''', ++++++ stricter-interpreter-check.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -2,13 +2,13 @@ =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -1242,7 +1242,8 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -1245,7 +1245,8 @@ class FilesCheck(AbstractCheck.AbstractC 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 and interpreter.startswith("/"): +- if not mode_is_exec and not is_doc: ++ if not mode_is_exec and not is_doc and \ ++ interpreter and interpreter.startswith("/"): printError(pkg, 'non-executable-script', f, oct(perm), interpreter) if '\r' in chunk: ++++++ suse-check-optional-dependencies.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -2,7 +2,7 @@ =================================================================== --- FilesCheck.py.orig +++ FilesCheck.py -@@ -907,6 +907,16 @@ class FilesCheck(AbstractCheck.AbstractC +@@ -908,6 +908,16 @@ class FilesCheck(AbstractCheck.AbstractC if res.group(1) != pkg.name: printError(pkg, 'incoherent-logrotate-file', f) @@ -19,7 +19,7 @@ if link != '': ext = compr_regex.search(link) if ext: -@@ -1727,6 +1737,24 @@ consequences), or other compiler flags w +@@ -1730,6 +1740,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.''', ++++++ suse-ignore-specfile-errors.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -1,6 +1,8 @@ ---- SpecCheck.py +Index: SpecCheck.py +=================================================================== +--- SpecCheck.py.orig +++ SpecCheck.py -@@ -524,9 +524,8 @@ +@@ -537,9 +537,8 @@ class SpecCheck(AbstractCheck.AbstractCh printWarning(pkg, "patch-not-applied", "Patch%d:" % pnum, pfile) ++++++ suse-pkg-config-check.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -10,7 +10,7 @@ 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 -@@ -630,10 +631,12 @@ class TagsCheck(AbstractCheck.AbstractCh +@@ -626,10 +627,12 @@ class TagsCheck(AbstractCheck.AbstractCh base = is_devel.group(1) dep = None has_so = False @@ -24,7 +24,7 @@ if has_so: base_or_libs = base + '/' + base + '-libs/lib' + base # try to match *%_isa as well (e.g. "(x86-64)", "(x86-32)") -@@ -670,6 +673,15 @@ class TagsCheck(AbstractCheck.AbstractCh +@@ -666,6 +669,15 @@ class TagsCheck(AbstractCheck.AbstractCh if prov not in (x[0] for x in pkg.provides()): printWarning(pkg, 'no-provides', prov) @@ -40,7 +40,7 @@ # List of words to ignore in spell check ignored_words = set() for pf in pkg.files(): -@@ -1109,6 +1121,11 @@ instead or require a file in bin or /etc +@@ -1099,6 +1111,11 @@ once.''', 'no-url-tag', '''The URL tag is missing. Please add a http or ftp link to the project location.''', ++++++ suse-shlib-devel-dependency.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -2,7 +2,7 @@ =================================================================== --- TagsCheck.py.orig +++ TagsCheck.py -@@ -638,10 +638,10 @@ class TagsCheck(AbstractCheck.AbstractCh +@@ -639,10 +639,10 @@ class TagsCheck(AbstractCheck.AbstractCh if pkg_config_regex.match(fname) and fname.endswith('.pc'): has_pc = True if has_so: ++++++ syntax-validator.py ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -6,6 +6,6 @@ for filename in sys.argv[1:]: try: compile(open(filename).read(), filename, 'exec') - except Exception, e: - print e + except Exception as e: + print(e) exit(1) ++++++ sysv5-init-checks.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -2,7 +2,7 @@ =================================================================== --- InitScriptCheck.py.orig +++ InitScriptCheck.py -@@ -29,6 +29,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,7 +13,7 @@ LSB_KEYWORDS = ('Provides', 'Required-Start', 'Required-Stop', 'Should-Start', 'Should-Stop', 'Default-Start', 'Default-Stop', 'Short-Description', 'Description') -@@ -46,6 +50,13 @@ class InitScriptCheck(AbstractCheck.Abst +@@ -47,6 +51,13 @@ class InitScriptCheck(AbstractCheck.Abst return initscript_list = [] @@ -27,7 +27,7 @@ for fname, pkgfile in pkg.files().items(): if not fname.startswith('/etc/init.d/') and \ -@@ -60,20 +71,16 @@ class InitScriptCheck(AbstractCheck.Abst +@@ -61,20 +72,16 @@ class InitScriptCheck(AbstractCheck.Abst if "." in basename: printError(pkg, 'init-script-name-with-dot', fname) @@ -56,7 +56,7 @@ status_found = False reload_found = False -@@ -274,6 +281,17 @@ of chkconfig don't work as expected with +@@ -276,6 +283,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.''', ++++++ usr-arch.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -6,7 +6,7 @@ srcname_regex = re.compile('(.*?)-[0-9]') invalid_dir_ref_regex = re.compile('/(home|tmp)(\W|$)') ocaml_mixed_regex = re.compile('^Caml1999X0\d\d$') -+usr_arch_share_regex = re.compile('/share/.*/(?:x86|i.86|x86_64|ppc|ppc64|s390|s390x|ia64)') ++usr_arch_share_regex = re.compile('/share/.*/(?:x86|i.86|x86_64|ppc|ppc64|s390|s390x|ia64|m68k|arm|aarch64)') def dir_base(path): res = path_regex.search(path) ++++++ xdg-paths-update.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -2,7 +2,7 @@ =================================================================== --- MenuXDGCheck.py.orig +++ MenuXDGCheck.py -@@ -21,7 +21,7 @@ class MenuXDGCheck(AbstractCheck.Abstrac +@@ -24,7 +24,7 @@ class MenuXDGCheck(AbstractCheck.Abstrac # /var/lib/menu-xdg:/usr/share self.cfp = RawConfigParser() AbstractCheck.AbstractFilesCheck.__init__( ++++++ yast-provides.diff ++++++ --- /var/tmp/diff_new_pack.b3OrX5/_old 2014-02-28 16:24:37.000000000 +0100 +++ /var/tmp/diff_new_pack.b3OrX5/_new 2014-02-28 16:24:37.000000000 +0100 @@ -2,7 +2,7 @@ =================================================================== --- TagsCheck.py.orig +++ TagsCheck.py -@@ -814,7 +814,7 @@ class TagsCheck(AbstractCheck.AbstractCh +@@ -821,7 +821,7 @@ class TagsCheck(AbstractCheck.AbstractCh printWarning(pkg, 'no-url-tag') obs_names = [x[0] for x in pkg.obsoletes()] -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org