Hello community, here is the log from the commit of package rpmlint for openSUSE:Factory checked in at 2013-09-26 07:15:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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 2013-09-17 16:27:57.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rpmlint.new/rpmlint.changes 2013-09-26 07:15:06.000000000 +0200 @@ -1,0 +2,14 @@ +Wed Sep 25 10:59:27 UTC 2013 - meissner@suse.com + +- whitelist second iteration of wicked dbus service names + (bnc#783932) + +------------------------------------------------------------------- +Mon Sep 23 14:19:05 UTC 2013 - dmueller@suse.com + +- blacklist old systemd/udev directories (bnc#816467) +- remove checking for groups (bnc#767551) +- ignore icon size mismatches on animated icons (bnc#480664) +- update obsolete/invalid suse version check + +------------------------------------------------------------------- Old: ---- rpmgroups.config ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rpmlint.spec ++++++ --- /var/tmp/diff_new_pack.SdFr89/_old 2013-09-26 07:15:07.000000000 +0200 +++ /var/tmp/diff_new_pack.SdFr89/_new 2013-09-26 07:15:07.000000000 +0200 @@ -31,7 +31,6 @@ Source1: rpmlint-checks-master.tar.gz Source2: config Source3: config.in -Source10: rpmgroups.config Source11: pie.config Source12: licenses.config Source100: syntax-validator.py @@ -220,7 +219,6 @@ head -n 8 $RPM_BUILD_ROOT/usr/share/rpmlint/config > $RPM_BUILD_ROOT/etc/rpmlint/config # make sure that the package is sane python -tt %{SOURCE100} $RPM_BUILD_ROOT/usr/share/rpmlint/*.py $RPM_BUILD_ROOT/usr/share/rpmlint/config -%__install -m 644 %{SOURCE10} %{buildroot}/%{_sysconfdir}/rpmlint/ %__install -m 644 %{SOURCE11} %{buildroot}/%{_sysconfdir}/rpmlint/ cp %{SOURCE12} licenses.config @@ -239,7 +237,6 @@ %{_prefix}/bin/* %{_prefix}/share/rpmlint %config(noreplace) /etc/rpmlint/config -%config %{_sysconfdir}/rpmlint/rpmgroups.config %config %{_sysconfdir}/rpmlint/pie.config %config %{_sysconfdir}/rpmlint/licenses.config %dir /etc/rpmlint ++++++ config ++++++ --- /var/tmp/diff_new_pack.SdFr89/_old 2013-09-26 07:15:08.000000000 +0200 +++ /var/tmp/diff_new_pack.SdFr89/_new 2013-09-26 07:15:08.000000000 +0200 @@ -67,6 +67,8 @@ setOption("CompressExtension", None) setOption('UseVarLockSubsys', False) +setOption('ValidGroups', []) + setOption('StandardGroups', ( 'aegis', 'antivir', @@ -561,6 +563,12 @@ "wicked-dhcp6.conf", "wicked-autoip4.conf", "wicked.conf", + ## next revision of names (old ones could go) + "org.opensuse.Network.conf", + "org.opensuse.Network.AUTO4.conf", + "org.opensuse.Network.DHCP6.conf", + "org.opensuse.Network.DHCP4.conf", + "org.opensuse.Network.Nanny.conf", # systemd machined service (bnc#828207) "org.freedesktop.machine1.service", "org.freedesktop.machine1.conf", ++++++ rpmlint-checks-master.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/BrandingPolicyCheck.py new/rpmlint-checks-master/BrandingPolicyCheck.py --- old/rpmlint-checks-master/BrandingPolicyCheck.py 2013-06-28 18:05:19.000000000 +0200 +++ new/rpmlint-checks-master/BrandingPolicyCheck.py 2013-09-23 16:18:57.000000000 +0200 @@ -8,12 +8,8 @@ from Filter import * import AbstractCheck -import rpm -import re -import commands -import stat import Config -import os +import rpm import string import Pkg @@ -26,7 +22,7 @@ if pkg.isSource(): return - pkg_requires = set(map(lambda x: string.split(x[0],'(')[0], pkg.requires())) + pkg_requires = set(map(lambda x: string.split(x[0], '(')[0], pkg.requires())) pkg_conflicts = set(map(lambda x: x[0], pkg.conflicts())) # verify that only generic branding is required by non-branding packages @@ -35,58 +31,58 @@ continue if (pkg.name.find('-branding-') < 0 and (r[0].find('-theme-') >= 0 or r[0].find('-branding-') >= 0)): - printError(pkg,'suse-branding-specific-branding-req', r[0]) + printError(pkg, 'suse-branding-specific-branding-req', r[0]) if (r[0].endswith('branding') or r[0].endswith('theme')) \ and not r[0].endswith('-icon-theme'): # XXX: that startswith 1 breaks with openSUSE 20... if (r[1] != rpm.RPMSENSE_EQUAL or not r[2][1].startswith('1')): - printError(pkg,'suse-branding-unversioned-requires', r[0]) + printError(pkg, 'suse-branding-unversioned-requires', r[0]) # verify that it doesn't conflict with branding for r in pkg_conflicts: if r.startswith("otherproviders("): continue if r.find('-theme-') >= 0 or r.find('-branding-') >= 0: - printError(pkg,'suse-branding-branding-conflict', r) + printError(pkg, 'suse-branding-branding-conflict', r) if pkg.name.find('-branding-') < 0: return - branding_basename=pkg.name.partition('-branding-')[0] - branding_style=pkg.name.partition('-branding-')[2] + branding_basename = pkg.name.partition('-branding-')[0] + branding_style = pkg.name.partition('-branding-')[2] generic_branding = ("%s-branding" % (branding_basename)) - pkg_provides = set(map(lambda x: string.split(x[0],'(')[0], pkg.provides())) + pkg_provides = set(map(lambda x: string.split(x[0], '(')[0], pkg.provides())) pkg_supplements = set(map(lambda x: x[0], pkg.supplements())) # verify that it only supplements with packageand - found_correct=False - correct_supplement="packageand(%s:branding-%s)" % (branding_basename, branding_style) + found_correct = False + correct_supplement = "packageand(%s:branding-%s)" % (branding_basename, branding_style) for s in pkg_supplements: if s.startswith('packageand('): if s != correct_supplement: printError(pkg,'suse-branding-wrong-branding-supplement', s) else: - found_correct=True + found_correct = True else: - printError(pkg,'suse-branding-excessive-supplement', s) + printError(pkg, 'suse-branding-excessive-supplement', s) if not found_correct: - printError(pkg,'suse-branding-supplement-missing', correct_supplement) + printError(pkg, 'suse-branding-supplement-missing', correct_supplement) # nothing else for r in pkg.recommends(): - printError(pkg,'suse-branding-excessive-recommends', r[0]) + printError(pkg, 'suse-branding-excessive-recommends', r[0]) for r in pkg.suggests(): - printError(pkg,'suse-branding-excessive-suggests', r[0]) + printError(pkg, 'suse-branding-excessive-suggests', r[0]) for r in pkg.enhances(): - printError(pkg,'suse-branding-excessive-enhances', r[0]) + printError(pkg, 'suse-branding-excessive-enhances', r[0]) # check for provide foo-branding - branding_provide=None + branding_provide = None for p in pkg.provides(): if p[0] == generic_branding: - branding_provide=p + branding_provide = p break # check for Conflicts: otherproviders(kde4-kdm-branding) @@ -98,16 +94,16 @@ break if not have_conflict_prop: - printError(pkg,'suse-branding-missing-conflicts', conflict_prop) + printError(pkg, 'suse-branding-missing-conflicts', conflict_prop) if not branding_provide: - printError(pkg,'suse-branding-no-branding-provide') + printError(pkg, 'suse-branding-no-branding-provide') else: if (len(branding_provide) < 2 or branding_provide[1] != rpm.RPMSENSE_EQUAL): printError(pkg, 'suse-branding-unversioned-provides', branding_provide[0]) -check=BrandingPolicyCheck() +check = BrandingPolicyCheck() if Config.info: addDetails( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/CheckFilelist.py new/rpmlint-checks-master/CheckFilelist.py --- old/rpmlint-checks-master/CheckFilelist.py 2013-06-28 18:05:19.000000000 +0200 +++ new/rpmlint-checks-master/CheckFilelist.py 2013-09-23 16:18:57.000000000 +0200 @@ -6,281 +6,305 @@ # Purpose : Check for wrongly packaged files and FHS violations ############################################################################# -from Filter import * import AbstractCheck -import re -import os -import string +from Filter import addDetails, Config, printWarning, printError import fnmatch from rpm import RPMTAG_VENDOR _defaulterror = 'suse-filelist-forbidden' _defaultmsg = '%(file)s is not allowed in SUSE' + def notnoarch(pkg): return pkg.arch != 'noarch' + def isfilesystem(pkg): return pkg.name == 'filesystem' + def isdebuginfo(pkg): - if pkg.name.endswith('-debuginfo') \ - or pkg.name.endswith('-debuginfo-32bit') \ - or pkg.name.endswith('-debuginfo-64bit') \ - or pkg.name.endswith('-debugsource') \ - or pkg.name.endswith('-debug'): - return True + return (pkg.name.endswith('-debuginfo') or + pkg.name.endswith('-debuginfo-32bit') or + pkg.name.endswith('-debuginfo-64bit') or + pkg.name.endswith('-debugsource') or pkg.name.endswith('-debug')) + def notsymlink(pkg, f): mode = pkg.files()[f].mode - type = (mode>>12)&017 - return type != 012 + type = (mode >> 12) & 0o17 + return type != 0o12 + def ghostfile(pkg, f): ghosts = pkg.ghostFiles() return f in ghosts _goodprefixes = ( - '/bin/', - '/boot/', - '/etc/', - '/lib/', - '/lib64/', - '/media/', - # SUSE policy handled in separate check - '/opt/', - '/sbin/', - '/srv/', - # SUSE policy handled in separate check - '/usr/X11R6/', - '/usr/bin/', - '/usr/games/', - '/usr/include/', - '/usr/lib/', - '/usr/lib64/', - '/usr/sbin/', - '/usr/share/', - # actually only linux is allowed by fhs - '/usr/src/linux', - '/usr/src/debug/', - '/usr/src/packages/', - '/var/account/', - '/var/cache/', - '/var/crash/', - '/var/games/', - '/var/lib/', - '/var/lock/', - '/var/log/', - '/var/mail/', - '/var/opt/', - '/var/run/', - '/var/spool/', - '/var/yp/', - # those are not in FHS! - '/var/adm/', - '/var/nis/', - '/emul/', - ) + '/bin/', + '/boot/', + '/etc/', + '/lib/', + '/lib64/', + '/media/', + # SUSE policy handled in separate check + '/opt/', + '/sbin/', + '/srv/', + # SUSE policy handled in separate check + '/usr/X11R6/', + '/usr/bin/', + '/usr/games/', + '/usr/include/', + '/usr/lib/', + '/usr/lib64/', + '/usr/sbin/', + '/usr/share/', + # actually only linux is allowed by fhs + '/usr/src/linux', + '/usr/src/debug/', + '/usr/src/packages/', + '/var/account/', + '/var/cache/', + '/var/crash/', + '/var/games/', + '/var/lib/', + '/var/lock/', + '/var/log/', + '/var/mail/', + '/var/opt/', + '/var/run/', + '/var/spool/', + '/var/yp/', + # those are not in FHS! + '/var/adm/', + '/var/nis/', + '/emul/', +) # computed from goodprefixes. # Directories that are only allowed to have defined subdirs (such as /usr) _restricteddirs = set() _checks = [ - { - 'bad': [ - '*/.xvpics', - '*.orig', - '*.orig.gz', - '/usr/share/*/.libs*', - '/usr/share/*/.deps*', - '/var/adm/setup', - '/etc/httpd/*', - '/etc/init.d/*/*', - '/usr/share/locale/LC_MESSAGES', - ], - }, - { - 'error': 'suse-filelist-forbidden-sysconfig', - 'details': '''Please use /var/adm/fillup-templates/sysconfig.<packagename> - and call %fillup_and_insserv to install new sysconfig files''', - 'good': [ - '/etc/sysconfig/cbq', - '/etc/sysconfig/scripts', - '/etc/sysconfig/scripts/*', - '/etc/sysconfig/network', - '/etc/sysconfig/network/*', - '/etc/sysconfig/hardware', - '/etc/sysconfig/hardware/*', - '/etc/sysconfig/isdn', - '/etc/sysconfig/isdn/scripts', - '/etc/sysconfig/isdn/scripts/*', - '/etc/sysconfig/SuSEfirewall2.d', - '/etc/sysconfig/SuSEfirewall2.d/*', - '/etc/sysconfig/uml', - ], - 'bad': [ - '/var/adm/fillup-templates/rc.config.*', - '/etc/sysconfig/*', - '/etc/rc.config.d/*', - ], - }, - { - 'error': 'suse-filelist-forbidden-perl-dir', - 'details': '''perl files installed a non-vendor installed path, - which is not allowed in SUSE.''', - 'bad': [ - '/usr/lib/perl5/site_perl/*', - ], - }, - { - 'error': 'suse-filelist-forbidden-backup-file', - 'details': 'backup files (e.g. files ending in ~, .swp or .bak) are not allowed', - 'bad': [ - '*~', - '*.bak', - '*/.*.swp', - ], - 'ignorefileif': ghostfile, - }, - { - 'error': 'suse-filelist-forbidden-devel-in-lib', - 'details': 'please move la files, static libs and .so symlinks to /usr/lib(64)', - 'bad': [ - "/lib/*.la", - "/lib/*.a", - "/lib64/*.la", - "/lib64/*.a", - ] - }, - { - 'error': 'suse-filelist-forbidden-devel-in-lib', - 'details': 'please move la files, static libs and .so symlinks to /usr/lib(64)', - 'good': [ - # exception for pam - "/lib/security/*.so", - "/lib64/security/*.so", - ], - 'bad': [ - "/lib/*.so", - "/lib64/*.so", - ], - # some libs without proper soname are packaged directly - 'ignorefileif': notsymlink, - }, - { - 'error': 'suse-filelist-forbidden-fhs23', - 'msg': '%(file)s is not allowed in FHS 2.3', - 'details': 'see http://www.pathname.com/fhs/ to find a better location', - 'bad': [ - "/etc/X11/app-defaults/*", - "/usr/local/man/*/*", - "/var/lib/games", - "/var/lib/games/*", - "/usr/sbin/*/*", - "/sbin/init.d", - "/sbin/init.d/*", - "/bin/*/*", - ] - }, - { - 'error': 'suse-filelist-forbidden-yast2', - 'msg': '%(file)s is not allowed anymore in YaST2', - 'bad': [ - '/usr/lib/YaST2/*.ycp', - '/usr/lib/YaST2/*.y2cc', - '/usr/lib/YaST2/*.*.scr', - ], - }, - { - 'error': 'suse-filelist-forbidden-srv', - 'details': """Please use /srv for ftp and http data""", - 'bad': [ - '/usr/local/ftp', - '/usr/local/http', - ], - }, - { - 'error': 'suse-filelist-forbidden-games', - 'details': """static data has to be in /usr/share/games, variable in /var/games""", - 'bad': [ - '/usr/games/bin', - '/usr/games/lib', - '/usr/games/*/*', - ], - }, - { - 'error': 'suse-filelist-forbidden-noarch', - 'msg': '%(file)s is not allowed in a noarch package', - 'bad': [ - '/lib64', - '/lib64/*', - '/usr/lib64', - '/usr/lib64/*', - '/usr/X11R6/lib64', - '/usr/X11R6/lib64/*', - '/opt/gnome/lib64', - '/opt/gnome/lib64/*', - '/opt/kde3/lib64', - '/opt/kde3/lib64/*', - '/usr/lib/pkgconfig/*', - '/usr/lib/perl5/vendor_perl/5.*/*-linux-*/*', - ], - 'ignorepkgif': notnoarch, - }, - { - 'error': 'suse-filelist-forbidden-debuginfo', - 'msg': '%(file)s may only be packaged in the -debuginfo subpackage', - 'bad': [ - '/usr/lib/debug/*', - ], - 'ignorepkgif': isdebuginfo, - }, - { - 'error': 'suse-filelist-forbidden-locale', - 'details': """Please use nb or nb_NO (and nn for nynorsk)""" - """see https://bugzilla.novell.com/show_bug.cgi?id=42748""", - 'bad': [ - '/opt/gnome/share/locale/no', - '/opt/gnome/share/locale/no/*', - '/opt/kde3/share/locale/no', - '/opt/kde3/share/locale/no/*', - '/usr/share/locale/no', - '/usr/share/locale/no/*', - '/usr/share/vim/*/lang/no', - '/usr/share/vim/*/lang/no/*', - ], - }, - { - 'error': 'suse-filelist-forbidden-xorg', - 'details': """Please use the updated paths for Xorg 7.1 and above""", - 'bad': [ - '/usr/X11R6/*', - ], - 'ignorepkgif': isfilesystem, - }, - { - 'error': 'suse-filelist-forbidden-suseconfig', - 'details': """SuSEconfig is not available in openSUSE 12.3 and newer""", - 'bad': [ - '/sbin/conf.d/*', - '/var/adm/SuSEconfig/' - ], - }, - { - 'error': 'suse-filelist-forbidden-opt', - 'details': """/opt may not be used by a distribution. It is reserved for 3rd party packagers""", - }, - { - 'error': 'suse-filelist-forbidden-systemd-userdirs', - 'details': """This directory is for user files, use the system directory under /usr/lib""", - 'bad': [ - '/etc/systemd/*', - '/etc/modules-load.d/*', - '/etc/tmpfiles.d/*', - ], - }, + { + 'bad': [ + '*/.xvpics', + '*.orig', + '*.orig.gz', + '/usr/share/*/.libs*', + '/usr/share/*/.deps*', + '/var/adm/setup', + '/etc/httpd/*', + '/etc/init.d/*/*', + '/usr/share/locale/LC_MESSAGES', + ], + }, + { + 'error': 'suse-filelist-forbidden-sysconfig', + 'details': '''Please use /var/adm/fillup-templates/sysconfig.<pkgname> + and call %fillup_and_insserv for new sysconfig files. + ''', + 'good': [ + '/etc/sysconfig/cbq', + '/etc/sysconfig/scripts', + '/etc/sysconfig/scripts/*', + '/etc/sysconfig/network', + '/etc/sysconfig/network/*', + '/etc/sysconfig/hardware', + '/etc/sysconfig/hardware/*', + '/etc/sysconfig/isdn', + '/etc/sysconfig/isdn/scripts', + '/etc/sysconfig/isdn/scripts/*', + '/etc/sysconfig/SuSEfirewall2.d', + '/etc/sysconfig/SuSEfirewall2.d/*', + '/etc/sysconfig/uml', + ], + 'bad': [ + '/var/adm/fillup-templates/rc.config.*', + '/etc/sysconfig/*', + '/etc/rc.config.d/*', + ], + }, + { + 'error': 'suse-filelist-forbidden-perl-dir', + 'details': '''perl files installed a non-vendor installed path, + which is not allowed in SUSE.''', + 'bad': [ + '/usr/lib/perl5/site_perl/*', + ], + }, + { + 'error': 'suse-filelist-forbidden-backup-file', + 'details': 'backup files (~, .swp or .bak) are not allowed', + 'bad': [ + '*~', + '*.bak', + '*/.*.swp', + ], + 'ignorefileif': ghostfile, + }, + { + 'error': 'suse-filelist-forbidden-devel-in-lib', + 'details': 'Please move .la/.a files and .so symlinks to /usr/lib(64)', + 'bad': [ + "/lib/*.la", + "/lib/*.a", + "/lib64/*.la", + "/lib64/*.a", ] + }, + { + 'error': 'suse-filelist-forbidden-devel-in-lib', + 'details': 'Please move .la/.a files and .so symlinks to /usr/lib(64)', + 'good': [ + # exception for pam + "/lib/security/*.so", + "/lib64/security/*.so", + ], + 'bad': [ + "/lib/*.so", + "/lib64/*.so", + ], + # some libs without proper soname are packaged directly + 'ignorefileif': notsymlink, + }, + { + 'error': 'suse-filelist-forbidden-fhs23', + 'msg': '%(file)s is not allowed in FHS 2.3', + 'details': 'see http://www.pathname.com/fhs/ for a better location', + 'bad': [ + "/etc/X11/app-defaults/*", + "/usr/local/man/*/*", + "/var/lib/games", + "/var/lib/games/*", + "/usr/sbin/*/*", + "/sbin/init.d", + "/sbin/init.d/*", + "/bin/*/*", + ] + }, + { + 'error': 'suse-filelist-forbidden-yast2', + 'msg': '%(file)s is not allowed anymore in YaST2', + 'bad': [ + '/usr/lib/YaST2/*.ycp', + '/usr/lib/YaST2/*.y2cc', + '/usr/lib/YaST2/*.*.scr', + ], + }, + { + 'error': 'suse-filelist-forbidden-srv', + 'details': """Please use /srv for ftp and http data""", + 'bad': [ + '/usr/local/ftp', + '/usr/local/http', + ], + }, + { + 'error': 'suse-filelist-forbidden-games', + 'details': """Static data should be in /usr/share/games; + Variable data in /var/games + """, + 'bad': [ + '/usr/games/bin', + '/usr/games/lib', + '/usr/games/*/*', + ], + }, + { + 'error': 'suse-filelist-forbidden-noarch', + 'msg': '%(file)s is not allowed in a noarch package', + 'bad': [ + '/lib64', + '/lib64/*', + '/usr/lib64', + '/usr/lib64/*', + '/usr/X11R6/lib64', + '/usr/X11R6/lib64/*', + '/opt/gnome/lib64', + '/opt/gnome/lib64/*', + '/opt/kde3/lib64', + '/opt/kde3/lib64/*', + '/usr/lib/pkgconfig/*', + '/usr/lib/perl5/vendor_perl/5.*/*-linux-*/*', + ], + 'ignorepkgif': notnoarch, + }, + { + 'error': 'suse-filelist-forbidden-debuginfo', + 'msg': '%(file)s may only be packaged in the -debuginfo subpackage', + 'bad': [ + '/usr/lib/debug/*', + ], + 'ignorepkgif': isdebuginfo, + }, + { + 'error': 'suse-filelist-forbidden-locale', + 'details': """Please use nb or nb_NO (and nn for nynorsk)""" + """see https://bugzilla.novell.com/show_bug.cgi?id=42748""", + 'bad': [ + '/opt/gnome/share/locale/no', + '/opt/gnome/share/locale/no/*', + '/opt/kde3/share/locale/no', + '/opt/kde3/share/locale/no/*', + '/usr/share/locale/no', + '/usr/share/locale/no/*', + '/usr/share/vim/*/lang/no', + '/usr/share/vim/*/lang/no/*', + ], + }, + { + 'error': 'suse-filelist-forbidden-xorg', + 'details': """Please use the updated paths for Xorg 7.1 and above""", + 'bad': [ + '/usr/X11R6/*', + ], + 'ignorepkgif': isfilesystem, + }, + { + 'error': 'suse-filelist-forbidden-suseconfig', + 'details': """SuSEconfig is unavailable in openSUSE 12.3 and newer""", + 'bad': [ + '/sbin/conf.d/*', + '/var/adm/SuSEconfig/' + ], + }, + { + 'error': 'suse-filelist-forbidden-opt', + 'details': """/opt may not be used by a SUSE. + It is reserved for 3rd party packagers""", + }, + { + 'error': 'suse-filelist-forbidden-systemd-userdirs', + 'details': """This directory is for user files, + use the system directory under /usr/lib""", + 'bad': [ + '/etc/systemd/*', + '/etc/modules-load.d/*', + '/etc/tmpfiles.d/*', + ], + }, + { + 'error': 'suse-filelist-forbidden-udev-userdirs', + 'details': """This directory is for user files, + use /usr/lib/udev/rules.d""", + 'bad': [ + '/etc/udev/rules.d/*', + ], + }, + { + 'error': 'suse-filelist-forbidden-move-to-usr', + 'details': """This directory has been moved to /usr""", + 'bad': [ + '/lib/systemd/system/*', + '/lib/udev/rules.d/*', + ], + }, + + +] + class FilelistCheck(AbstractCheck.AbstractCheck): def __init__(self): @@ -320,7 +344,8 @@ files = pkg.files() if not files: - printWarning(pkg, 'suse-filelist-empty', 'packages without any files are discouraged in SUSE') + printWarning(pkg, 'suse-filelist-empty', + 'packages without any files are discouraged in SUSE') return for check in _checks: @@ -340,11 +365,12 @@ error = _defaulterror if 'good' in check or 'bad' in check: - for f in files.keys(): + for f in files: ok = False if 'good' in check: for g in check['good']: - if (not isinstance(g, str) and g.match(f)) or g == f: + if ((not isinstance(g, str) and g.match(f)) or + g == f): ok = True break if ok: @@ -355,31 +381,32 @@ if 'ignorefileif' in check: if check['ignorefileif'](pkg, f): continue - if (not isinstance(b, str) and b.match(f)) or b == f: - printError(pkg, error, msg % { 'file':f } ) + if ((not isinstance(b, str) and b.match(f)) or + b == f): + printError(pkg, error, msg % {'file': f}) invalidfhs = set() invalidopt = set() - if pkg.header[RPMTAG_VENDOR] and pkg.header[RPMTAG_VENDOR].find('SUSE') != -1: - isSUSE = True - else: - isSUSE = False + isSUSE = (pkg.header[RPMTAG_VENDOR] and + 'SUSE' in pkg.header[RPMTAG_VENDOR]) # the checks here only warn about a directory once rather # than reporting potentially hundreds of files individually for f, pkgfile in files.items(): - type = (pkgfile.mode>>12)&017 + type = (pkgfile.mode >> 12) & 0o17 # append / to directories - if type == 04: - f += '/' + if type == 4: + f += '/' if not f.startswith(_goodprefixes): base = f.rpartition('/') pfx = None - # find the first invalid path component (/usr/foo/bar/baz -> /usr) - while base[0] and not base[0].startswith(_goodprefixes) and not base[0] in _restricteddirs: + # find the first invalid path component + # (/usr/foo/bar/baz -> /usr) + while (base[0] and not base[0].startswith(_goodprefixes) and + not base[0] in _restricteddirs): pfx = base[0] base = base[0].rpartition('/') @@ -391,7 +418,7 @@ if f.startswith('/opt'): try: provider = f.split('/')[2] - except: + except Exception: continue # legacy exception if provider == 'kde3': @@ -403,20 +430,24 @@ invalidopt.add(d) for f in invalidfhs: - printError(pkg, 'suse-filelist-forbidden-fhs23', "%(file)s is not allowed in FHS 2.3" % { 'file': f }) + printError(pkg, 'suse-filelist-forbidden-fhs23', + "%(file)s is not allowed in FHS 2.3" % + {'file': f}) for f in invalidopt: - printError(pkg, 'suse-filelist-forbidden-opt', '%(file)s is not allowed for official SUSE packages' % { 'file': f }) + printError(pkg, 'suse-filelist-forbidden-opt', + '%(file)s is not allowed for official SUSE packages' % + {'file': f}) -check=FilelistCheck() +check = FilelistCheck() if Config.info: for check in _checks: - if not 'details' in check: + if 'details' not in check: continue - if not 'error' in check: + if 'error' not in check: continue addDetails('suse-filelist-forbidden', """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/CheckIconSizes.py new/rpmlint-checks-master/CheckIconSizes.py --- old/rpmlint-checks-master/CheckIconSizes.py 2013-06-28 18:05:19.000000000 +0200 +++ new/rpmlint-checks-master/CheckIconSizes.py 2013-09-23 16:36:25.000000000 +0200 @@ -6,15 +6,11 @@ # Purpose : Check for common scaling errors in icons ############################################################################# -from Filter import * import AbstractCheck -import rpm -import re -import commands -import stat import Config -import os -import string +from Filter import printError, addDetails +import re + class IconSizesCheck(AbstractCheck.AbstractCheck): def __init__(self): @@ -28,6 +24,10 @@ return for fname, pkgfile in pkg.files().items(): + + if '/animations/' in fname: + continue + res = self.file_size_regex.search(fname) if res: sizes = (res.group(1), res.group(2)) @@ -37,15 +37,17 @@ if abs(int(sizes[0])-int(actualsizes[0])) > 2 or \ abs(int(sizes[1])-int(actualsizes[1])) > 2: - printError(pkg,"wrong-icon-size", fname, "expected:", - "x".join(sizes), "actual:", "x".join(actualsizes)) + printError(pkg, "wrong-icon-size", fname, "expected:", + "x".join(sizes), + "actual:", "x".join(actualsizes)) -check=IconSizesCheck() +check = IconSizesCheck() if Config.info: addDetails( -'wrong-icon-size', -"""Your icon file is installed in a fixed-size directory, but has a largely incorrect size. -Some desktop environments (e.g. GNOME) display them incorrectly.""" -) + 'wrong-icon-size', + """Your icon file is installed in a fixed-size directory, but has a + largely incorrect size. Some desktop environments (e.g. GNOME) + display them incorrectly.""" + ) ++++++ suse-version.diff ++++++ --- /var/tmp/diff_new_pack.SdFr89/_old 2013-09-26 07:15:08.000000000 +0200 +++ /var/tmp/diff_new_pack.SdFr89/_new 2013-09-26 07:15:08.000000000 +0200 @@ -15,9 +15,9 @@ printWarning(pkg, 'hardcoded-prefix-tag', res.group(1)) + res = suse_version_regex.search(line) -+ if res and int(res.group(1)) > 0 and int(res.group(1)) < 1130: ++ if res and int(res.group(1)) > 0 and int(res.group(1)) < 1210: + printWarning(pkg, "obsolete-suse-version-check", res.group(1)) -+ elif res and int(res.group(1)) > 1230: ++ elif res and int(res.group(1)) > 1310: + printError(pkg, "invalid-suse-version-check", res.group(1)) + res = prereq_regex.search(line) -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org