Hello community, here is the log from the commit of package rpmlint for openSUSE:Factory checked in at Fri Aug 21 18:18:58 CEST 2009. -------- --- rpmlint/rpmlint.changes 2009-04-05 00:10:56.000000000 +0200 +++ rpmlint/rpmlint.changes 2009-08-10 08:12:50.000000000 +0200 @@ -1,0 +2,28 @@ +Mon Aug 10 08:07:25 CEST 2009 - thomas@novell.com + +- added /selinux to allowed prefixes in CheckFilelist.py + +------------------------------------------------------------------- +Wed Jul 29 14:28:25 UTC 2009 - lnussel@suse.de + + - add cups to dbus whitelist (bnc#515977) + +------------------------------------------------------------------- +Mon Jul 20 13:26:16 UTC 2009 - lnussel@suse.de + +- fix suse checks for 0.87 + +------------------------------------------------------------------- +Thu Jul 16 10:04:16 UTC 2009 - lnussel@suse.de + +- fix syntax error in suse-hide-unstripped-outside-build.diff + +------------------------------------------------------------------- +Sun Jun 21 15:29:11 CEST 2009 - dmueller@suse.de + +- update to 0.87: + * remove old rpm support + * improved performance and compat with python 2.6 + * many pylint/pychecker code fixes + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- old-rpm-compat.diff rpmlint-0.85.tar.bz2 suse-spec-bzip2.diff New: ---- rpmlint-0.87.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rpmlint.spec ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:40.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:40.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package rpmlint (Version 0.85) +# spec file for package rpmlint (Version 0.87) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -21,8 +21,8 @@ Name: rpmlint BuildRequires: rpm-python Summary: Rpm correctness checker -Version: 0.85 -Release: 2 +Version: 0.87 +Release: 1 Source0: %{name}-%{version}.tar.bz2 Source1: config Source1001: config.in @@ -48,11 +48,10 @@ License: GPL v2 or later Group: System/Packages BuildRoot: %{_tmppath}/%{name}-%{version}-build -Requires: rpm-python, binutils, file, findutils, cpio, grep, bash +Requires: rpm-python, /usr/bin/readelf, file, findutils, cpio, bash Requires: desktop-file-utils BuildArch: noarch Patch0: rpmlint-suse.diff -Patch1: old-rpm-compat.diff Patch2: suse-version.diff Patch3: disable-menu-check.diff Patch4: invalid-filerequires.diff @@ -62,7 +61,6 @@ Patch8: suse-debuginfo.diff Patch9: no-doc-for-lib.diff Patch10: add-scoring-support.diff -Patch11: suse-spec-bzip2.diff Patch12: usr-arch.diff Patch13: script-interpreter-only-for-exec-scripts.diff Patch14: sourced-dirs.diff @@ -123,7 +121,6 @@ %prep %setup -q -n rpmlint-%{version} %patch -%patch1 %patch2 %patch3 %patch4 @@ -133,7 +130,6 @@ %patch8 %patch9 %patch10 -%patch11 %patch12 %patch13 %patch14 @@ -150,34 +146,34 @@ %patch27 %patch29 %patch30 -%patch31 -%patch33 -%patch34 -%patch35 -%patch37 -%patch39 -%patch41 -%patch42 -%patch46 -%patch47 -%patch49 +#%patch31 +#%patch33 +#%patch34 +#%patch35 +#%patch37 +#%patch39 +#%patch41 +#%patch42 +#%patch46 +#%patch47 +#%patch49 %patch50 -%patch51 -%patch52 +#%patch51 +#%patch52 %patch54 -%patch57 -%patch58 -%patch60 -%patch62 -%patch63 -%patch65 -%patch66 -%patch67 -%patch68 -%patch69 -%patch70 -%patch71 -%patch72 -p1 +#%patch57 +#%patch58 +#%patch60 +#%patch62 +#%patch63 +#%patch65 +#%patch66 +#%patch67 +#%patch68 +#%patch69 +#%patch70 +#%patch71 +#%patch72 -p1 cp -p %{SOURCE1} . cp -p %{SOURCE2} . cp -p %{SOURCE3} . ++++++ CheckBuildRoot.py ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:40.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:40.000000000 +0200 @@ -17,13 +17,13 @@ class BuildRootCheck(AbstractCheck.AbstractFilesCheck): def __init__(self): - AbstractCheck.AbstractFilesCheck.__init__(self, "BuildRootCheck", ".*") + AbstractCheck.AbstractFilesCheck.__init__(self, "CheckBuildRoot", ".*") self.build_root_re = re.compile('/var/tmp/[\w\!-\.]{1,60}-build/') def check_file(self, pkg, filename): if filename.startswith('/usr/lib/debug') or pkg.isSource(): return - if not stat.S_ISREG(pkg.files()[filename][0]): + if not stat.S_ISREG(pkg.files()[filename].mode): return if len(pkg.grep(self.build_root_re, filename)): ++++++ CheckCommonFiles.py ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:40.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:40.000000000 +0200 @@ -19,7 +19,7 @@ class CommonFilesCheck(AbstractCheck.AbstractCheck): def __init__(self): self.map = [] - AbstractCheck.AbstractCheck.__init__(self, "CommonFilesCheck") + AbstractCheck.AbstractCheck.__init__(self, "CheckCommonFiles") self.sources_am_re = re.compile('([\w\d_]+_SOURCES\s*=|\s*SUBDIRS\s*=)') def check(self, pkg): @@ -27,15 +27,10 @@ if pkg.isSource(): return files = pkg.files() - for f in files: + for f in files.keys(): if f in pkg.ghostFiles(): continue - enreg = files[f] - mode = enreg[0] - links = enreg[3] - size = enreg[4] - md5 = enreg[5] - rdev = enreg[7] + md5 = files[f].md5 if len(md5) and md5 in ( 'c59cbaf0df9bcf35feca0d0f1fc01dae', ++++++ CheckDBUSServices.py ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:40.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:40.000000000 +0200 @@ -17,6 +17,7 @@ _services_whitelist = ( "ConsoleKit.conf", "hal.conf", + "cups.conf", # bnc#515977 "org.freedesktop.ConsoleKit.service", "org.freedesktop.PolicyKit.conf", "org.freedesktop.PolicyKit.service", ++++++ CheckExecDocs.py ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:40.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:40.000000000 +0200 @@ -39,7 +39,7 @@ class ExecDocsCheck(AbstractCheck.AbstractCheck): def __init__(self): self.map = [] - AbstractCheck.AbstractCheck.__init__(self, "ExecDocsCheck") + AbstractCheck.AbstractCheck.__init__(self, "CheckExecDocs") def check(self, pkg): @@ -49,16 +49,16 @@ files = pkg.files() complete_size=0 lang_size=0 - for f in files: - if stat.S_ISREG(files[f][0]): - complete_size += files[f][4] - if pkg.fileLang(f) != '': - lang_size += files[f][4] + 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 for f in pkg.docFiles(): - if stat.S_ISREG(files[f][0]): - doc_size += files[f][4] + 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 \ @@ -71,8 +71,7 @@ printWarning(pkg, "package-with-huge-translation", ("%3d%%" % (lang_size * 100 / complete_size))) for f in pkg.docFiles(): - enreg=files[f] - mode=enreg[0] + 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']: ++++++ CheckFilelist.py ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:40.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:40.000000000 +0200 @@ -32,9 +32,7 @@ return True def notsymlink(pkg, f): - files = pkg.files() - enreg = files[f] - mode = enreg[0] + mode = pkg.files()[f].mode type = (mode>>12)&017 return type != 012 @@ -82,6 +80,7 @@ '/var/adm/', '/var/nis/', '/emul/', + '/selinux/', ) # computed from goodprefixes. @@ -376,7 +375,7 @@ error = _defaulterror if 'good' in check or 'bad' in check: - for f in files: + for f in files.keys(): ok = False if 'good' in check: for g in check['good']: @@ -405,10 +404,8 @@ # the checks here only warn about a directory once rather # than reporting potentially hundreds of files individually - for f in files: - enreg = files[f] - mode = enreg[0] - type = (mode>>12)&017 + for f, pkgfile in files.items(): + type = (pkgfile.mode>>12)&017 # append / to directories if type == 04: ++++++ CheckIconSizes.py ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:40.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:40.000000000 +0200 @@ -18,7 +18,7 @@ class IconSizesCheck(AbstractCheck.AbstractCheck): def __init__(self): - AbstractCheck.AbstractCheck.__init__(self, "IconSizesCheck") + AbstractCheck.AbstractCheck.__init__(self, "CheckIconSizes") self.file_size_regex = re.compile('/icons/[^/]+/(\d+)x(\d+)/') self.info_size_regex = re.compile('(\d+) x (\d+)') @@ -27,19 +27,17 @@ if pkg.isSource(): return - info = pkg.getFilesInfo() - for i in info: - file = i[0] - res = self.file_size_regex.search(file) + for fname, pkgfile in pkg.files().items(): + res = self.file_size_regex.search(fname) if res: sizes = (res.group(1), res.group(2)) - res = self.info_size_regex.search(i[1]) + res = self.info_size_regex.search(pkgfile.magic) if res: actualsizes = (res.group(1), res.group(2)) if abs(int(sizes[0])-int(actualsizes[0])) > 2 or \ abs(int(sizes[1])-int(actualsizes[1])) > 2: - printError(pkg,"wrong-icon-size", file, "expected:", + printError(pkg,"wrong-icon-size", fname, "expected:", "x".join(sizes), "actual:", "x".join(actualsizes)) ++++++ CheckInitScripts.py ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:40.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:40.000000000 +0200 @@ -19,9 +19,9 @@ insserv_regex=re.compile('^\s*sbin/insserv', re.MULTILINE) preun_regex=re.compile('^\s*/etc/init.d/\S+ stop', re.MULTILINE) -class InitScriptsCheck(AbstractCheck.AbstractFilesCheck): +class CheckInitScripts(AbstractCheck.AbstractFilesCheck): def __init__(self): - AbstractCheck.AbstractFilesCheck.__init__(self, "InitScriptsCheck", "/etc/init.d/.*") + AbstractCheck.AbstractFilesCheck.__init__(self, "CheckInitScripts", "/etc/init.d/.*") def check(self, pkg): @@ -30,13 +30,11 @@ files = pkg.files() bins_list = filter(lambda f: (f.startswith("/usr/bin") \ - or f.startswith("/usr/sbin")) and stat.S_ISREG(files[f][0]), files) + or f.startswith("/usr/sbin")) and stat.S_ISREG(files[f].mode), files.keys()) - for f in files: - enreg = files[f] - mode = enreg[0] + for f, pkgfile in files.items(): - if f in pkg.ghostFiles() or not stat.S_ISREG(mode) or not f.startswith("/etc/init.d/"): + if f in pkg.ghostFiles() or not stat.S_ISREG(pkgfile.mode) or not f.startswith("/etc/init.d/"): continue boot_script = f.startswith('/etc/init.d/boot.') @@ -71,7 +69,7 @@ printWarning(pkg, "non-remote_fs-dependency", f) -check=InitScriptsCheck() +check=CheckInitScripts() if Config.info: addDetails( ++++++ CheckKDE4Deps.py ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:40.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:40.000000000 +0200 @@ -55,7 +55,7 @@ class KDE4Check(AbstractCheck.AbstractCheck): def __init__(self): - AbstractCheck.AbstractCheck.__init__(self, "KDE4Check") + AbstractCheck.AbstractCheck.__init__(self, "CheckKDE4Deps") def check(self, pkg): ++++++ CheckPkgConfig.py ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:40.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:40.000000000 +0200 @@ -17,7 +17,7 @@ class PkgConfigCheck(AbstractCheck.AbstractFilesCheck): def __init__(self): - AbstractCheck.AbstractFilesCheck.__init__(self, "PkgConfigCheck", ".*/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)') ++++++ CheckSUIDPermissions.py ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:41.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:41.000000000 +0200 @@ -11,6 +11,7 @@ import re import os import string +import pprint _permissions_d_whitelist = ( "lprng", @@ -57,7 +58,7 @@ permfiles = {} # first pass, find and parse permissions.d files - for f in files: + for f in files.keys(): if f in pkg.ghostFiles(): continue @@ -79,16 +80,11 @@ self._parsefile(f) # second pass, find permissions violations - for f in files: + for f, pkgfile in files.items(): if f in pkg.ghostFiles(): continue - enreg = files[f] - mode = enreg[0] - owner = enreg[1]+':'+enreg[2] - links = enreg[3] - size = enreg[4] - md5 = enreg[5] - rdev = enreg[7] + mode = pkgfile.mode + owner = pkgfile.user+':'+pkgfile.group # S_IFSOCK 014 socket # S_IFLNK 012 symbolic link ++++++ DesktopTranslationCheck.py ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:41.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:41.000000000 +0200 @@ -17,7 +17,7 @@ class DesktopCheck(AbstractCheck.AbstractFilesCheck): def __init__(self): - AbstractCheck.AbstractFilesCheck.__init__(self, "DesktopCheck", ".*\.desktop$") + AbstractCheck.AbstractFilesCheck.__init__(self, "DesktopTranslationCheck", ".*\.desktop$") def check_file(self, pkg, filename): if pkg.isSource() or filename in pkg.ghostFiles(): ++++++ DuplicatesCheck.py ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:41.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:41.000000000 +0200 @@ -38,22 +38,15 @@ files = pkg.files() configFiles = pkg.configFiles() - for f in files: + for f, pkgfile in files.items(): if f in pkg.ghostFiles(): continue - enreg = files[f] - mode = enreg[0] - links = enreg[3] - size = enreg[4] - md5 = enreg[5] - rdev = enreg[7] - if not stat.S_ISREG(mode): + if not stat.S_ISREG(pkgfile.mode): continue - md5s.setdefault(md5, set()).add(f) - sizes[md5] = size - #print f, links, size, md5, rdev + md5s.setdefault(pkgfile.md5, set()).add(f) + sizes[pkgfile.md5] = pkgfile.size sum=0 for f in md5s: ++++++ LibraryPolicyCheck.py ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:41.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:41.000000000 +0200 @@ -503,11 +503,11 @@ reqlibs = set() pkg_requires = set(map(lambda x: string.split(x[0],'(')[0], pkg.requires())) - for f in files: + for f in files.keys(): if f.find('.so.') != -1 or f.endswith('.so'): filename = pkg.dirName() + '/' + f try: - if stat.S_ISREG(files[f][0]): + if stat.S_ISREG(files[f].mode): bi = BinaryInfo(pkg, filename, f, False, True) libs_needed = libs_needed.union(bi.needed) if bi.soname != 0: ++++++ add-scoring-support.diff ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:41.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:41.000000000 +0200 @@ -1,30 +1,21 @@ --- Filter.py +++ Filter.py -@@ -74,26 +74,28 @@ - except KeyError: - pass +@@ -80,23 +80,24 @@ -+ - def _diag_compare(x,y): + def _diag_compare(x, y): - where_a = x.split()[1] - level_a = x.split()[2] + where_a = x.split()[2] + level_a = x.split()[1] -+ -+ where_b = y.split()[2] -+ level_b = y.split()[1] -+ -+ if (level_b > level_a): -+ return 1 - where_b = y.split()[1] - level_b = y.split()[2] -+ if (level_b < level_a): -+ return -1 ++ where_b = y.split()[2] ++ level_b = y.split()[1] - if level_b > level_a: -+ if (where_b < where_a): ++ if (level_b > level_a): return 1 - elif level_b == level_a: - if where_b > where_b: @@ -35,10 +26,15 @@ - return -1 - else: + ++ if (level_b < level_a): ++ return -1 ++ ++ if (where_b < where_a): ++ return 1 ++ + if (where_b > where_a): return -1 - + return 0 + def printAllReasons(): - threshold = badnessThreshold() ++++++ devel-provide-is-devel-package.diff ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:41.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:41.000000000 +0200 @@ -1,13 +1,13 @@ --- FilesCheck.py +++ FilesCheck.py -@@ -282,6 +282,10 @@ +@@ -285,6 +285,10 @@ # Check if the package is a development package - devel_pkg=devel_regex.search(pkg.name) + devel_pkg = devel_regex.search(pkg.name) + for p in pkg.provides(): + if not devel_pkg and devel_regex.search(p[0]): + devel_pkg = True + - config_files=pkg.configFiles() - ghost_files=pkg.ghostFiles() - doc_files=pkg.docFiles() + config_files = pkg.configFiles() + ghost_files = pkg.ghostFiles() + doc_files = pkg.docFiles() ++++++ disable-menu-check.diff ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:41.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:41.000000000 +0200 @@ -1,10 +1,10 @@ --- Config.py +++ Config.py -@@ -18,7 +18,6 @@ DEFAULT_CHECKS=("DistributionCheck", - "DocFilesCheck", - "FHSCheck", - "I18NCheck", -- "MenuCheck", - "PostCheck", - "InitScriptCheck", - "SourceCheck", +@@ -22,7 +22,6 @@ + "FHSCheck", + "SignatureCheck", + "I18NCheck", +- "MenuCheck", + "PostCheck", + "InitScriptCheck", + "SourceCheck", ++++++ docdata-examples.diff ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:41.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:41.000000000 +0200 @@ -1,23 +1,23 @@ --- FilesCheck.py +++ FilesCheck.py -@@ -651,6 +651,7 @@ - bin_regex=re.compile('^(/usr)?/s?bin/') - includefile_regex=re.compile('\.(c|h|a|cmi)$') - buildconfigfile_regex=re.compile('(\.pc|/bin/.+-config)$') -+docdir_examples_regex=re.compile('^/usr/(?:share/doc/packages|lib(?:64))/[^/]+/(?:example|demo|script|contrib)') - sofile_regex=re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$') - devel_regex=re.compile('(.*)-(debug(info)?|devel|source|static)$') - debuginfo_package_regex=re.compile('-debug(info)?$') -@@ -990,7 +991,7 @@ - compr_regex.search(f) or \ +@@ -179,6 +179,7 @@ + includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE) + develfile_regex = re.compile('\.(a|cmxa?|mli?)$') + buildconfigfile_regex = re.compile('(\.pc|/bin/.+-config)$') ++docdir_examples_regex = re.compile('^/usr/(?:share/doc/packages|lib(?:64))/[^/]+/(?:example|demo|script|contrib)') + # room for improvement with catching more -R, but also for false positives... + buildconfig_rpath_regex = re.compile('(?:-rpath|Wl,-R)\\b') + sofile_regex = re.compile('/lib(64)?/(.+/)?lib[^/]+\.so$') +@@ -551,7 +552,7 @@ includefile_regex.search(f) or \ + develfile_regex.search(f) or \ logrotate_regex.search(f) - if nonexec_file: + if nonexec_file and not docdir_examples_regex.search(f): printWarning(pkg, 'spurious-executable-perm', f) elif f.startswith('/etc/'): if not f in config_files and not f in ghost_files: -@@ -1289,7 +1290,10 @@ +@@ -853,7 +854,10 @@ '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 ++++++ invalid-filerequires.diff ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:41.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:41.000000000 +0200 @@ -1,16 +1,16 @@ --- TagsCheck.py +++ TagsCheck.py -@@ -406,6 +406,7 @@ invalid_version_regex=re.compile('([0-9](?:rc|alpha|beta|pre).*)', re.IGNORECASE - forbidden_words_regex=re.compile('(' + Config.getOption('ForbiddenWords') + ')', re.IGNORECASE) - valid_buildhost_regex=re.compile(Config.getOption('ValidBuildHost')) - epoch_regex=re.compile('^[0-9]+:') +@@ -402,6 +402,7 @@ + # () are here for grouping purpose in the regexp + forbidden_words_regex = re.compile('(' + Config.getOption('ForbiddenWords') + ')', re.IGNORECASE) + valid_buildhost_regex = re.compile(Config.getOption('ValidBuildHost')) +valid_filedep_regex=re.compile('(?:/s?bin/|^/etc/|^/usr/lib/sendmail$)') - use_epoch=Config.getOption('UseEpoch', 0) - use_utf8=Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT) - macro_regex=re.compile('^%(?:[\{\(]|\w{3,})') -@@ -490,6 +491,9 @@ class TagsCheck(AbstractCheck.AbstractCheck): - if d[0].startswith('/usr/bin/env'): - printWarning(pkg, 'invalid-dependency', d[0]) + epoch_regex = re.compile('^[0-9]+:') + use_epoch = Config.getOption('UseEpoch', 0) + use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT) +@@ -484,6 +485,9 @@ + if d[0].startswith('/usr/local/'): + printError(pkg, 'invalid-dependency', d[0]) + if d[0].startswith('/') and not valid_filedep_regex.search(d[0]): + printWarning(pkg, 'invalid-filepath-dependency', d[0]) @@ -18,12 +18,12 @@ if not devel_depend and not is_devel and not is_source: if FilesCheck.devel_regex.search(d[0]): printError(pkg, 'devel-dependency', d[0]) -@@ -866,6 +870,12 @@ once.''', +@@ -885,6 +889,12 @@ 'obsolete-on-name', '''A package should not obsolete itself, as it can cause weird errors in tools.''', +'invalid-filepath-dependency', -+'''A package has a file or path based dependency that is not resolveable for ++'''A package has a file or path based dependency that is not resolveable for +package solvers because it is not in the whitelist for path based dependencies +and therefore not available in repository metadata. Please use a symbolic requires +instead or require a file in bin or /etc.''', ++++++ rpmlint-0.85.tar.bz2 -> rpmlint-0.87.tar.bz2 ++++++ ++++ 6110 lines of diff (skipped) ++++++ rpmlint-suse.diff ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:42.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:42.000000000 +0200 @@ -1,48 +1,22 @@ --- FilesCheck.py +++ FilesCheck.py -@@ -173,7 +173,7 @@ - absolute_regex=re.compile('^/([^/]+)') - absolute2_regex=re.compile('^/?([^/]+)') - points_regex=re.compile('^\.\./(.*)') --doc_regex=re.compile('^/usr(/share|/X11R6)?/(doc|man|info)/') -+doc_regex=re.compile('^/usr(/share|/X11R6)?/(doc|man|info)/|^/opt/kde3/share/doc|^/usr/share/gnome/help') - bin_regex=re.compile('^(/usr)?/s?bin/') +@@ -174,7 +174,7 @@ + absolute_regex = re.compile('^/([^/]+)') + absolute2_regex = re.compile('^/?([^/]+)') + points_regex = re.compile('^\.\./(.*)') +-doc_regex = re.compile('^/usr(/share|/X11R6)?/(doc|man|info)/') ++doc_regex = re.compile('^/usr(/share|/X11R6)?/(doc|man|info)/|^/opt/kde3/share/doc|^/usr/share/gnome/help') + bin_regex = re.compile('^(/usr)?/s?bin/') includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE) develfile_regex = re.compile('\.(a|cmxa?|mli?)$') --- I18NCheck.py +++ I18NCheck.py -@@ -69,10 +69,11 @@ - st += ')$' +@@ -67,7 +67,7 @@ + ) - package_regex=re.compile(st) --locale_regex=re.compile('^(/usr/share/locale/([^/]+))/') -+locale_regex=re.compile('^/(usr|opt/kde3)/share/locale/([^/]+)/') - correct_subdir_regex=re.compile('^(([a-z][a-z]([a-z])?(_[A-Z][A-Z])?)([.@].*$)?)$') - lc_messages_regex=re.compile('/usr/share/locale/([^/]+)/LC_MESSAGES/.*(mo|po)$') - man_regex=re.compile('/usr(?:/share)?/man/([^/]+)/man./[^/]+$') -+doc_regex=re.compile('^/opt/kde3/share/doc/HTML/(^[/]*)/') - - # list of exceptions - # -@@ -122,7 +123,7 @@ - if res: - locale=res.group(2) - # checks the same locale only once -- if not locale in locales: -+ if locale and not locale in locales: - locales.append(locale) - res2=correct_subdir_regex.search(locale) - if not res2: -@@ -162,6 +163,12 @@ - if main_lang != lang: - main_dir, main_lang = f, lang - -+ res=doc_regex.search(f) -+ if res: -+ subdir=res.group(1) -+ if subdir != 'en' and pkg.fileLang(f) == '': -+ printWarning(pkg, 'file-not-in-%lang', f) -+ - name=pkg.name - res=package_regex.search(name) - if res: + package_regex = re.compile('-(' + '|'.join((x[0:2] for x in CORRECT_SUBDIRS)) + ')$') +-locale_regex = re.compile('^(/usr/share/locale/([^/]+))/') ++locale_regex = re.compile('^(/(usr|opt/kde3|opt/gnome)/share/locale/([^/]+))/') + correct_subdir_regex = re.compile('^(([a-z][a-z]([a-z])?(_[A-Z][A-Z])?)([.@].*$)?)$') + lc_messages_regex = re.compile('/usr/share/locale/([^/]+)/LC_MESSAGES/.*(mo|po)$') + man_regex = re.compile('/usr(?:/share)?/man/([^/]+)/man./[^/]+$') ++++++ sourced-dirs.diff ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:42.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:42.000000000 +0200 @@ -1,11 +1,11 @@ --- FilesCheck.py +++ FilesCheck.py -@@ -683,7 +683,7 @@ - shebang_regex=re.compile('^#!\s*(\S*)') - interpreter_regex=re.compile('^/(usr/)?s?bin/[^/]+$') - script_regex=re.compile('^/((usr/)?s?bin|etc/(rc\.d/init\.d|X11/xinit\.d|cron\.(hourly|daily|monthly|weekly)))/') --sourced_script_regex=re.compile('^/etc/(bash_completion\.d|profile\.d)/') -+sourced_script_regex=re.compile('^(/etc/(bash_completion\.d|profile\.d)|/sbin/conf.d)/') - use_utf8=Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT) - meta_package_re=re.compile(Config.getOption('MetaPackageRegexp', '^(bundle|task)-')) - filesys_packages = ['filesystem'] # TODO: make configurable? +@@ -211,7 +211,7 @@ + shebang_regex = re.compile('^#!\s*(\S*)') + interpreter_regex = re.compile('^/(usr/)?(s?bin|games|libexec(/.+)?|(lib(64)?|share)/.+)/[^/]+$') + script_regex = re.compile('^/((usr/)?s?bin|etc/(rc\.d/init\.d|X11/xinit\.d|cron\.(hourly|daily|monthly|weekly)))/') +-sourced_script_regex = re.compile('^/etc/(bash_completion\.d|profile\.d)/') ++sourced_script_regex = re.compile('^/etc/(bash_completion\.d|profile\.d|/sbin/conf.d)/') + use_utf8 = Config.getOption('UseUTF8', Config.USEUTF8_DEFAULT) + skipdocs_regex = re.compile(Config.getOption('SkipDocsRegexp', '\.(?:rtf|x?html?|ml[ily]?)$'), re.IGNORECASE) + meta_package_regex = re.compile(Config.getOption('MetaPackageRegexp', '^(bundle|task)-')) ++++++ suse-bzip-bigger-than-100k.diff ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:42.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:42.000000000 +0200 @@ -1,33 +1,31 @@ --- SourceCheck.py +++ SourceCheck.py -@@ -14,7 +14,7 @@ +@@ -17,7 +17,7 @@ - DEFAULT_VALID_SRC_PERMS=(0644, 0755) + DEFAULT_VALID_SRC_PERMS = (0644, 0755) --source_regex=re.compile('\\.(tar|patch|tgz|diff)$') -+source_regex=re.compile('\\.(tar|patch|tgz|tar\.gz|dif||diff)$') - use_bzip2=Config.getOption('UseBzip2', 1) - valid_src_perms=Config.getOption("ValidSrcPerms", DEFAULT_VALID_SRC_PERMS) +-source_regex = re.compile('\\.(tar|patch|tgz|diff)$') ++source_regex = re.compile('\\.(tar|patch|tar\.gz|tgz|diff)$') + use_bzip2 = Config.getOption('UseBzip2', 1) + valid_src_perms = Config.getOption("ValidSrcPerms", DEFAULT_VALID_SRC_PERMS) -@@ -38,7 +38,7 @@ - printError(pkg, 'multiple-specfiles', spec_file, f) +@@ -40,7 +40,7 @@ + printError(pkg, 'multiple-specfiles', spec_file, fname) else: - spec_file=f -- elif source_regex.search(f): -+ elif source_regex.search(f) and files[f][4] > 120*1024: + spec_file = fname +- elif source_regex.search(fname): ++ elif source_regex.search(fname) and files[f][4] > 120*1024: if use_bzip2: - if not f.endswith('.bz2'): - printWarning(pkg, 'source-or-patch-not-bzipped', f) -@@ -59,8 +59,10 @@ - all your RPM information.''', + if not fname.endswith('.bz2'): + printWarning(pkg, 'source-or-patch-not-bzipped', fname) +@@ -61,7 +61,9 @@ 'source-or-patch-not-bzipped', --'''A source archive or file in your package is not bzipped (doesn't + '''A source archive or file in your package is not bzipped (doesn't -have the .bz2 extension). To bzip it, use bzip2.''', -+'''A source archive or patch in your package is not bzipped (doesn't +have the .bz2 extension). Files bigger than 100k should be bzip2'ed -+in order to save space. To bzip2 a patch, use bzip2. To bzip2 a source -+tarball, use bznew''', +++in order to save space. To bzip2 a patch, use bzip2. To bzip2 a source +++tarball, use bznew''', 'source-or-patch-not-gzipped', '''A source archive or file in your package is not gzipped (doesn't ++++++ suse-checks.diff ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:42.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:42.000000000 +0200 @@ -1,10 +1,10 @@ --- Config.py +++ Config.py -@@ -17,7 +17,6 @@ - "FilesCheck", - "DocFilesCheck", - "FHSCheck", -- "SignatureCheck", - "I18NCheck", - "MenuCheck", - "PostCheck", +@@ -20,7 +20,6 @@ + "FilesCheck", + "DocFilesCheck", + "FHSCheck", +- "SignatureCheck", + "I18NCheck", + "MenuCheck", + "PostCheck", ++++++ suse-hide-unstripped-outside-build.diff ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:42.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:42.000000000 +0200 @@ -1,21 +1,21 @@ --- BinariesCheck.py +++ BinariesCheck.py -@@ -16,6 +16,7 @@ - import Config - import Pkg +@@ -10,6 +10,7 @@ + + import re import stat +import os - DEFAULT_SYSTEM_LIB_PATHS=('/lib', '/usr/lib', '/usr/X11R6/lib', - '/lib64', '/usr/lib64', '/usr/X11R6/lib64') -@@ -193,7 +194,9 @@ + import rpm + +@@ -252,7 +253,9 @@ # stripped ? - if not unstrippable.search(i[0]) and not is_ocaml_native: -- if not_stripped.search(i[1]): -+ if not_stripped.search(i[1]) and \ + if not unstrippable.search(fname) and not is_ocaml_native: +- if not_stripped.search(pkgfile.magic): ++ if not_stripped.search(pkgfile.magic) and \ + (os.environ.get('BUILD_IS_RUNNING', None) == None or \ -+ os.environ.get('BUILD_DEBUG_FLAGS','').find('-g') != -1): - printWarning(pkg, 'unstripped-binary-or-object', i[0]) ++ os.environ.get('BUILD_DEBUG_FLAGS','').find('-g') != -1): + printWarning( + pkg, 'unstripped-binary-or-object', fname) - # inspect binary file ++++++ suse-version.diff ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:42.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:42.000000000 +0200 @@ -1,16 +1,16 @@ --- SpecCheck.py +++ SpecCheck.py -@@ -52,6 +52,7 @@ +@@ -53,6 +53,7 @@ comment_or_empty_regex = re.compile('^\s*(#|$)') defattr_regex = re.compile('^\s*%defattr\\b') attr_regex = re.compile('^\s*%attr\\b') +suse_version_regex = re.compile('%suse_version\s*[<>=]+\s*(\d+)') - - # Only check for /lib, /usr/lib, /usr/X11R6/lib - # TODO: better handling of X libraries and modules. -@@ -340,6 +341,12 @@ + section_regexs = dict( + ([x, re.compile('^%' + x + '(?:\s|$)')] + for x in ('build', 'changelog', 'check', 'clean', 'description', 'files', +@@ -359,6 +360,12 @@ if res: - noarch = 1 + package_noarch[current_package] = True + res = suse_version_regex.search(line) + if res and int(res.group(1)) > 0 and int(res.group(1)) < 1030: @@ -21,11 +21,10 @@ res = prereq_regex.search(line) if res: printError(pkg, 'prereq-use', res.group(2)) -@@ -598,6 +605,16 @@ - set which may result in security issues in the resulting binary package +@@ -645,6 +652,15 @@ depending on the system where the package is built. Add default attributes using %defattr before it in the %files section, or use per line %attr's.''', -+ + +'obsolete-suse-version-check', +'''The specfile contains a comparison of %suse_version against a suse release +that is no longer in maintenance. Consider removing obsolete parts of your @@ -33,9 +32,8 @@ + +'invalid-suse-version-check', +'''The specfile contains a comparison of %suse_version against a suse release -+that does not exist. Please double check.''' ++that does not exist. Please double check.''', + - ) - - # SpecCheck.py ends here -Nur in b/rpmlint-0.85: SpecCheck.py.orig. + 'non-standard-group', + '''The value of the Group tag in the package is not valid. Valid groups are: + "%s".''' % '", "'.join(VALID_GROUPS), ++++++ sysv5-init-checks.diff ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:42.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:42.000000000 +0200 @@ -1,58 +1,52 @@ --- InitScriptCheck.py +++ InitScriptCheck.py -@@ -27,6 +27,8 @@ - use_deflevels=Config.getOption('UseDefaultRunlevels', 1) +@@ -30,6 +30,8 @@ + use_deflevels = Config.getOption('UseDefaultRunlevels', 1) lsb_tags_regex = re.compile('^# ([\w-]+):\s*(.*?)\s*$') lsb_cont_regex = re.compile('^#(?:\t| )(.*?)\s*$') +insserv_regex=re.compile('^\s*sbin/insserv', re.MULTILINE) +preun_regex=re.compile('^\s*/etc/init.d/\S+ stop', re.MULTILINE) - class InitScriptCheck(AbstractCheck.AbstractCheck): - -@@ -39,6 +41,12 @@ + LSB_KEYWORDS = ('Provides', 'Required-Start', 'Required-Stop', 'Should-Start', + 'Should-Stop', 'Default-Start', 'Default-Stop', +@@ -48,6 +50,13 @@ 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] -+ - for f in pkg.files().keys(): - if rc_regex.search(f): - basename=basename_regex.search(f).group(1) -@@ -48,20 +56,23 @@ ++ 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] ++ + for fname, pkgfile in pkg.files().items(): + if rc_regex.search(fname): + basename = os.path.basename(fname) +@@ -57,13 +66,17 @@ if dot_in_name_regex.match(basename): - printError(pkg, 'init-script-name-with-dot', f) + 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[rpm.RPMTAG_POSTINPROG] if not postin: - printError(pkg, 'init-script-without-chkconfig-postin', f) - else: - if not chkconfig_regex.search(postin): - printError(pkg, 'postin-without-chkconfig', f) - -- preun=pkg[rpm.RPMTAG_PREUN] or pkg[rpm.RPMTAG_PREUNPROG] - if not preun: -- printError(pkg, 'init-script-without-chkconfig-preun', f) -+ printError(pkg, 'init-script-without-%stop_on_removal-preun', f) - else: -- if not chkconfig_regex.search(preun): -- printError(pkg, 'preun-without-chkconfig', f) +- printError(pkg, 'init-script-without-chkconfig-postin', fname) ++ printError(pkg, 'init-script-without-%stop_on_removal-postin', fname) ++ else: + if not preun_regex.search(preun): + printError(pkg, 'preun-without-%stop_on_removal-preun', f) + + if not postun: + printError(pkg, 'init-script-without-%insserv_cleanup-postun', f) -+ else: + else: +- if not chkconfig_regex.search(postin): +- printError(pkg, 'postin-without-chkconfig', fname) + if not insserv_regex.search(postun): + printError(pkg, 'postun-without-%insserv_cleanup', f) - status_found = 0 - reload_found = 0 -@@ -183,10 +194,18 @@ + preun = pkg[rpm.RPMTAG_PREUN] or pkg[rpm.RPMTAG_PREUNPROG] + if not preun: +@@ -193,10 +206,18 @@ 'postin-without-chkconfig', '''The package contains an init script but doesn't call chkconfig in its %post.''', @@ -72,7 +66,7 @@ 'preun-without-chkconfig', '''The package contains an init script but doesn't call chkconfig in its %preun.''', -@@ -241,6 +260,18 @@ +@@ -254,6 +275,18 @@ '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.RYj14R/_old 2009-08-21 18:10:42.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:42.000000000 +0200 @@ -1,19 +1,19 @@ --- BinariesCheck.py +++ BinariesCheck.py -@@ -109,6 +109,7 @@ - numeric_dir_regex=re.compile('/usr(?:/share)/man/man./(.*)\.[0-9](?:\.gz|\.bz2)') - versioned_dir_regex=re.compile('[^.][0-9]') - usr_share=re.compile('^/usr/share/') -+usr_arch_share=re.compile('/share/.*/(?:x86|i.86|x86_64|ppc|ppc64|s390|s390x|ia64)') - etc=re.compile('^/etc/') - not_stripped=re.compile('not stripped') - unstrippable=re.compile('\.o$|\.static$') -@@ -181,7 +182,7 @@ - printError(pkg, 'arch-independent-package-contains-binary-or-object', i[0]) +@@ -165,6 +165,7 @@ + numeric_dir_regex = re.compile('/usr(?:/share)/man/man./(.*)\.[0-9](?:\.gz|\.bz2)') + versioned_dir_regex = re.compile('[^.][0-9]') + usr_share = re.compile('^/usr/share/') ++usr_arch_share = re.compile('/share/.*/(?:x86|i.86|x86_64|ppc|ppc64|s390|s390x|ia64)') + etc = re.compile('^/etc/') + not_stripped = re.compile('not stripped') + unstrippable = re.compile('\.o$|\.static$') +@@ -239,7 +240,7 @@ + printError(pkg, 'arch-independent-package-contains-binary-or-object', fname) else: # in /usr/share ? -- if usr_share.search(i[0]): -+ if usr_share.search(i[0]) and not usr_arch_share.search(i[0]): - printError(pkg, 'arch-dependent-file-in-usr-share', i[0]) +- if usr_share.search(fname): ++ if usr_share.search(fname) and not usr_arch_share.search(i[0]): + printError( + pkg, 'arch-dependent-file-in-usr-share', fname) # in /etc ? - if etc.search(i[0]): ++++++ yast-provides.diff ++++++ --- /var/tmp/diff_new_pack.RYj14R/_old 2009-08-21 18:10:42.000000000 +0200 +++ /var/tmp/diff_new_pack.RYj14R/_new 2009-08-21 18:10:42.000000000 +0200 @@ -1,11 +1,11 @@ --- TagsCheck.py +++ TagsCheck.py -@@ -670,7 +670,7 @@ +@@ -669,7 +669,7 @@ printWarning(pkg, 'no-url-tag') - obs_names = map(lambda x: x[0], pkg.obsoletes()) -- prov_names = map(lambda x: x[0], pkg.provides()) -+ prov_names = map(lambda x: x[0].split(':/')[0], pkg.provides()) + obs_names = [x[0] for x in pkg.obsoletes()] +- prov_names = [x[0] for x in pkg.provides()] ++ prov_names = [x[0].split(':/')[0] for x in pkg.provides()] if pkg.name in obs_names: printError(pkg, 'obsolete-on-name') ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org