Hello community, here is the log from the commit of package rpmlint for openSUSE:Factory checked in at 2017-10-18 10:43:58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rpmlint (Old) and /work/SRC/openSUSE:Factory/.rpmlint.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rpmlint" Wed Oct 18 10:43:58 2017 rev:282 rq:533398 version:1.10 Changes: -------- --- /work/SRC/openSUSE:Factory/rpmlint/rpmlint-tests.changes 2017-10-10 11:32:44.202463781 +0200 +++ /work/SRC/openSUSE:Factory/.rpmlint.new/rpmlint-tests.changes 2017-10-18 10:44:00.291124444 +0200 @@ -1,0 +2,24 @@ +Wed Oct 11 11:29:25 UTC 2017 - opensuse-packag...@opensuse.org + +- Update to version 84.87+git20171011.8b163ac: + * Trying to fixup the erlang check + +------------------------------------------------------------------- +Wed Oct 11 06:43:46 UTC 2017 - opensuse-packag...@opensuse.org + +- Update to version 84.87+git20171011.856375f: + * Add unit test for ErlangCheck + +------------------------------------------------------------------- +Tue Oct 10 12:21:50 UTC 2017 - opensuse-packag...@opensuse.org + +- Update to version 84.87+git20171010.a53d9bd: + * Remove appdata related tests, those are upstream now + +------------------------------------------------------------------- +Tue Oct 10 09:19:30 UTC 2017 - opensuse-packag...@opensuse.org + +- Update to version 84.87+git20171009.dfac67b: + * Adjust output for enabled non-std group checks + +------------------------------------------------------------------- --- /work/SRC/openSUSE:Factory/rpmlint/rpmlint.changes 2017-10-10 11:32:44.230462552 +0200 +++ /work/SRC/openSUSE:Factory/.rpmlint.new/rpmlint.changes 2017-10-18 10:44:00.319123128 +0200 @@ -1,0 +2,35 @@ +Wed Oct 11 08:03:12 UTC 2017 - opensuse-packag...@opensuse.org + +- Update to version master: + * Python 3.x porting of the ErlangCheck + +------------------------------------------------------------------- +Wed Oct 11 06:43:48 UTC 2017 - opensuse-packag...@opensuse.org + +- Update to version master: + * Treat strongly versioned libs also as compliant (bsc#723726) + * LibraryPolicy: allow %%_licensedir in packages (used by %license) +- Hide the noisy warnings + +------------------------------------------------------------------- +Tue Oct 10 09:06:23 UTC 2017 - dmuel...@suse.com + +- add 0001-Avoid-false-positives-on-is_elf-check.patch (bsc#1057216) + add 0007-Validate-Appdata-also-when-appstream-util-is-unavail.patch +- Update rpmlint-checks to version master: + * Fix false positives for -theme- -> -branding- rename + * Stop leaking filedescriptors + * Pythonic fixes + * Drop CheckAppdata (there is AppDataCheck upstream) + * Tighten ELF check + * Tiny code formatting cleanup + * Tighten the branding policy reporting a bit to make it less confusing + +------------------------------------------------------------------- +Fri Oct 6 09:20:48 UTC 2017 - lnus...@suse.de + +- add package groups from + https://en.opensuse.org/openSUSE:Package_group_guidelines to enable the + groups check + +------------------------------------------------------------------- Old: ---- rpmlint-tests-84.87+git20170930.a05216c.tar.xz New: ---- 0001-Avoid-false-positives-on-is_elf-check.patch 0007-Validate-Appdata-also-when-appstream-util-is-unavail.patch rpmlint-tests-84.87+git20171011.8b163ac.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rpmlint-tests.spec ++++++ --- /var/tmp/diff_new_pack.p3Kkau/_old 2017-10-18 10:44:02.375026537 +0200 +++ /var/tmp/diff_new_pack.p3Kkau/_new 2017-10-18 10:44:02.383026162 +0200 @@ -19,11 +19,12 @@ #!BuildIgnore: post-build-checks brp-check-suse +BuildRequires: erlang BuildRequires: rpmlint-Factory-strict BuildRequires: rpmlint-mini Name: rpmlint-tests -Version: 84.87+git20170930.a05216c +Version: 84.87+git20171011.8b163ac Release: 0 Summary: rpmlint regression tests License: SUSE-Public-Domain ++++++ rpmlint.spec ++++++ --- /var/tmp/diff_new_pack.p3Kkau/_old 2017-10-18 10:44:02.407025034 +0200 +++ /var/tmp/diff_new_pack.p3Kkau/_new 2017-10-18 10:44:02.411024846 +0200 @@ -83,6 +83,8 @@ Patch65: 0001-split-wrong-script-interpreter-into-env-script-inter.patch Patch66: 0001-Handle-post-scripts-that-contain-non-ascii-character.patch Patch67: omit_BUILDROOT_from_pyo_files.patch +Patch68: 0001-Avoid-false-positives-on-is_elf-check.patch +Patch69: 0007-Validate-Appdata-also-when-appstream-util-is-unavail.patch Patch70: rpmlint-all-pie.patch BuildRequires: obs-service-format_spec_file BuildRequires: python3-flake8 ++++++ 0001-Avoid-false-positives-on-is_elf-check.patch ++++++ >From 5a0f99a9f522944a0933cd06f9010a96bef9b7b3 Mon Sep 17 00:00:00 2001 From: Dirk Mueller <d...@dmllr.de> Date: Tue, 10 Oct 2017 11:02:57 +0200 Subject: [PATCH] Avoid false positives on is_elf check "symbolic link to `SELF-WE-PD-XXL.wings'" matched the "ELF" in magic logic. So make it more strict by enforcing that the magic needs to start with "ELF " which seems to match everywhere (PIE executables, normal executables, ELF libs). --- BinariesCheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: rpmlint-rpmlint-1.10/BinariesCheck.py =================================================================== --- rpmlint-rpmlint-1.10.orig/BinariesCheck.py +++ rpmlint-rpmlint-1.10/BinariesCheck.py @@ -372,7 +372,7 @@ class BinariesCheck(AbstractCheck.Abstra (fname.startswith("/usr/lib64") or fname.startswith("/lib64")): file_in_lib64 = True - is_elf = 'ELF' in pkgfile.magic + is_elf = pkgfile.magic.startswith('ELF ') 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 ++++++ 0007-Validate-Appdata-also-when-appstream-util-is-unavail.patch ++++++ >From 33b3aab641f6f71f33fd87f1e1b41ea2e74f48e3 Mon Sep 17 00:00:00 2001 From: Dirk Mueller <d...@dmllr.de> Date: Sun, 1 Oct 2017 14:36:40 +0200 Subject: [PATCH] Validate Appdata also when appstream-util is unavailable When the dependency isn't installed, we can at least still validate whether the input is valid XML or not. As we're not printing any validation results anyway this is good enough. --- AppDataCheck.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) Index: rpmlint-rpmlint-1.10/AppDataCheck.py =================================================================== --- rpmlint-rpmlint-1.10.orig/AppDataCheck.py +++ rpmlint-rpmlint-1.10/AppDataCheck.py @@ -10,6 +10,7 @@ import AbstractCheck import Config from Filter import addDetails, printError from Pkg import getstatusoutput +import xml.etree.ElementTree as ET STANDARD_BIN_DIRS = ['/bin/', '/sbin/', '/usr/bin/', '/usr/sbin/'] DEFAULT_APPDATA_CHECKER = ('appstream-util', 'validate-relax') @@ -28,12 +29,18 @@ class AppDataCheck(AbstractCheck.Abstrac def check_file(self, pkg, filename): root = pkg.dirName() f = root + filename + validation_failed = False try: st = getstatusoutput(appdata_checker + (f,)) + # Return code nonzero? + validation_failed = (st[0] != 0) except OSError: - # ignore if the checker is not installed - return - if st[0]: + # checker is not installed, do a validation manually + try: + ET.parse(pkg.dirName() + filename) + except ET.ParseError: + validation_failed = True + if validation_failed: printError(pkg, 'invalid-appdata-file', filename) ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.p3Kkau/_old 2017-10-18 10:44:02.531019208 +0200 +++ /var/tmp/diff_new_pack.p3Kkau/_new 2017-10-18 10:44:02.531019208 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/openSUSE/rpmlint-tests.git</param> - <param name="changesrevision">a05216ca4502eb1c029f68534ada12092e139999</param></service><service name="tar_scm"> + <param name="changesrevision">8b163ac0aaf41e8424edbc4074a60f18e9cb9438</param></service><service name="tar_scm"> <param name="url">https://github.com/openSUSE/rpmlint-checks.git</param> - <param name="changesrevision">b82179a9c8d48a3573e8c4f4770500d1fe932921</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">c90062ef30ec343a060331f1b867e9f30d2951bf</param></service></servicedata> \ No newline at end of file ++++++ config ++++++ --- /var/tmp/diff_new_pack.p3Kkau/_old 2017-10-18 10:44:02.555018081 +0200 +++ /var/tmp/diff_new_pack.p3Kkau/_new 2017-10-18 10:44:02.555018081 +0200 @@ -38,7 +38,6 @@ addCheck("CheckLogrotate") addCheck("CheckPAMModules") addCheck("CheckRCLinks") -addCheck("CheckAppdata") addCheck("CheckSystemdInstall") addCheck("TmpFilesCheck") addCheck("CheckSysVinitOnSystemd") @@ -71,7 +70,249 @@ setOption('UseVarLockSubsys', False) setOption("BadnessThreshold", 1000) -setOption('ValidGroups', []) +# keep in sync with https://en.opensuse.org/openSUSE:Package_group_guidelines +setOption('ValidGroups', [ + 'Amusements/Games/3D/Other', + 'Amusements/Games/3D/Race', + 'Amusements/Games/3D/Shoot', + 'Amusements/Games/3D/Simulation', + 'Amusements/Games/Action/Arcade', + 'Amusements/Games/Action/Breakout', + 'Amusements/Games/Action/Other', + 'Amusements/Games/Action/Race', + 'Amusements/Games/Action/Shoot', + 'Amusements/Games/Board/Card', + 'Amusements/Games/Board/Chess', + 'Amusements/Games/Board/Other', + 'Amusements/Games/Board/Pool', + 'Amusements/Games/Board/Puzzle', + 'Amusements/Games/Logic', + 'Amusements/Games/Other', + 'Amusements/Games/RPG', + 'Amusements/Games/Strategy/Other', + 'Amusements/Games/Strategy/Real Time', + 'Amusements/Games/Strategy/Turn Based', + 'Amusements/Teaching/Language', + 'Amusements/Teaching/Mathematics', + 'Amusements/Teaching/Other', + 'Amusements/Toys/Background', + 'Amusements/Toys/Clocks', + 'Amusements/Toys/Graphics', + 'Amusements/Toys/Other', + 'Amusements/Toys/Screensavers', + 'Development/Languages/C and C++', + 'Development/Languages/Fortran', + 'Development/Languages/Haskell', + 'Development/Languages/Java', + 'Development/Languages/Other', + 'Development/Languages/Perl', + 'Development/Languages/Python', + 'Development/Languages/Ruby', + 'Development/Languages/Scheme', + 'Development/Languages/Tcl', + 'Development/Libraries/C and C++', + 'Development/Libraries/Cross', + 'Development/Libraries/GNOME', + 'Development/Libraries/Haskell', + 'Development/Libraries/Java', + 'Development/Libraries/KDE', + 'Development/Libraries/Other', + 'Development/Libraries/Parallel', + 'Development/Libraries/Perl', + 'Development/Libraries/Python', + 'Development/Libraries/Tcl', + 'Development/Libraries/X11', + 'Development/Libraries/YaST', + 'Development/Sources', + 'Development/Tools/Building', + 'Development/Tools/Debuggers', + 'Development/Tools/Doc Generators', + 'Development/Tools/GUI Builders', + 'Development/Tools/IDE', + 'Development/Tools/Navigators', + 'Development/Tools/Other', + 'Development/Tools/Version Control', + 'Documentation/Howto', + 'Documentation/HTML', + 'Documentation/Man', + 'Documentation/Other', + 'Documentation/SUSE', + 'Hardware/Camera', + 'Hardware/Fax', + 'Hardware/ISDN', + 'Hardware/Joystick', + 'Hardware/Mobile', + 'Hardware/Modem', + 'Hardware/Other', + 'Hardware/Palm', + 'Hardware/Printing', + 'Hardware/Psion', + 'Hardware/Radio', + 'Hardware/Scanner', + 'Hardware/TV', + 'Hardware/UPS', + 'Hardware/Wifi', + 'Metapackages', + 'Productivity/Archiving/Backup', + 'Productivity/Archiving/Compression', + 'Productivity/Clustering/Computing', + 'Productivity/Clustering/HA', + 'Productivity/Databases/Clients', + 'Productivity/Databases/Servers', + 'Productivity/Databases/Tools', + 'Productivity/File utilities', + 'Productivity/Graphics/3D Editors', + 'Productivity/Graphics/Bitmap Editors', + 'Productivity/Graphics/CAD', + 'Productivity/Graphics/Convertors', + 'Productivity/Graphics/Other', + 'Productivity/Graphics/Vector Editors', + 'Productivity/Graphics/Viewers', + 'Productivity/Graphics/Visualization/Graph', + 'Productivity/Graphics/Visualization/Other', + 'Productivity/Graphics/Visualization/Raytracers', + 'Productivity/Hamradio/Fax', + 'Productivity/Hamradio/Logging', + 'Productivity/Hamradio/Morse', + 'Productivity/Hamradio/Other', + 'Productivity/Hamradio/Packet', + 'Productivity/Hamradio/Psk31', + 'Productivity/Hamradio/Satellite', + 'Productivity/Multimedia/CD/Grabbers', + 'Productivity/Multimedia/CD/Players', + 'Productivity/Multimedia/CD/Record', + 'Productivity/Multimedia/Other', + 'Productivity/Multimedia/Sound/Editors and Convertors', + 'Productivity/Multimedia/Sound/Midi', + 'Productivity/Multimedia/Sound/Mixers', + 'Productivity/Multimedia/Sound/Players', + 'Productivity/Multimedia/Sound/Utilities', + 'Productivity/Multimedia/Sound/Visualization', + 'Productivity/Multimedia/Video/Editors and Convertors', + 'Productivity/Multimedia/Video/Players', + 'Productivity/Networking/AOLInstantMessenger', + 'Productivity/Networking/Archie', + 'Productivity/Networking/Boot/Clients', + 'Productivity/Networking/Boot/Servers', + 'Productivity/Networking/Boot/Utilities', + 'Productivity/Networking/Diagnostic', + 'Productivity/Networking/DNS/Servers', + 'Productivity/Networking/DNS/Utilities', + 'Productivity/Networking/Email/Clients', + 'Productivity/Networking/Email/Mailinglists', + 'Productivity/Networking/Email/Servers', + 'Productivity/Networking/Email/Utilities', + 'Productivity/Networking/File-Sharing', + 'Productivity/Networking/Ftp/Clients', + 'Productivity/Networking/Ftp/Servers', + 'Productivity/Networking/ICQ', + 'Productivity/Networking/Instant Messenger', + 'Productivity/Networking/IRC', + 'Productivity/Networking/LDAP/Clients', + 'Productivity/Networking/LDAP/Servers', + 'Productivity/Networking/LDAP/Utilities', + 'Productivity/Networking/Napster', + 'Productivity/Networking/News/Clients', + 'Productivity/Networking/News/Servers', + 'Productivity/Networking/News/Utilities', + 'Productivity/Networking/NFS', + 'Productivity/Networking/NIS', + 'Productivity/Networking/Novell', + 'Productivity/Networking/Other', + 'Productivity/Networking/PPP', + 'Productivity/Networking/Radius/Clients', + 'Productivity/Networking/Radius/Servers', + 'Productivity/Networking/Routing', + 'Productivity/Networking/Samba', + 'Productivity/Networking/Security', + 'Productivity/Networking/SSH', + 'Productivity/Networking/System', + 'Productivity/Networking/Talk/Clients', + 'Productivity/Networking/Talk/Servers', + 'Productivity/Networking/Web/Browsers', + 'Productivity/Networking/Web/Frontends', + 'Productivity/Networking/Web/Proxy', + 'Productivity/Networking/Web/Servers', + 'Productivity/Networking/Web/Utilities', + 'Productivity/Office/Dictionary', + 'Productivity/Office/Finance', + 'Productivity/Office/Management', + 'Productivity/Office/Organizers', + 'Productivity/Office/Other', + 'Productivity/Office/Spreadsheets', + 'Productivity/Office/Suite', + 'Productivity/Office/Word Processor', + 'Productivity/Other', + 'Productivity/Publishing/DocBook', + 'Productivity/Publishing/HTML/Editors', + 'Productivity/Publishing/HTML/Tools', + 'Productivity/Publishing/Other', + 'Productivity/Publishing/PDF', + 'Productivity/Publishing/Presentation', + 'Productivity/Publishing/PS', + 'Productivity/Publishing/SGML', + 'Productivity/Publishing/TeX/Base', + 'Productivity/Publishing/TeX/Fonts', + 'Productivity/Publishing/TeX/Frontends', + 'Productivity/Publishing/Texinfo', + 'Productivity/Publishing/TeX/Utilities', + 'Productivity/Publishing/Troff', + 'Productivity/Publishing/Word', + 'Productivity/Publishing/XML', + 'Productivity/Scientific/Astronomy', + 'Productivity/Scientific/Chemistry', + 'Productivity/Scientific/Electronics', + 'Productivity/Scientific/Math', + 'Productivity/Scientific/Other', + 'Productivity/Scientific/Physics', + 'Productivity/Security', + 'Productivity/Telephony/Clients', + 'Productivity/Telephony/H323/Clients', + 'Productivity/Telephony/H323/Servers', + 'Productivity/Telephony/H323/Utilities', + 'Productivity/Telephony/Servers', + 'Productivity/Telephony/SIP/Clients', + 'Productivity/Telephony/SIP/Servers', + 'Productivity/Telephony/SIP/Utilities', + 'Productivity/Telephony/Utilities', + 'Productivity/Text/Convertors', + 'Productivity/Text/Editors', + 'Productivity/Text/Spell', + 'Productivity/Text/Utilities', + 'System/Base', + 'System/Benchmark', + 'System/Boot', + 'System/Console', + 'System/Daemons', + 'System/Emulators/Other', + 'System/Emulators/PC', + 'System/Fhs', + 'System/Filesystems', + 'System/GUI/GNOME', + 'System/GUI/KDE', + 'System/GUI/LXDE', + 'System/GUI/Other', + 'System/GUI/XFCE', + 'System/I18n/Chinese', + 'System/I18n/Japanese', + 'System/I18n/Korean', + 'System/Kernel', + 'System/Libraries', + 'System/Localization', + 'System/Management', + 'System/Monitoring', + 'System/Packages', + 'System/Shells', + 'System/Sound Daemons', + 'System/X11/Displaymanagers', + 'System/X11/Fonts', + 'System/X11/Icons', + 'System/X11/Servers/XF86_3', + 'System/X11/Servers/XF86_4', + 'System/X11/Terminals', + 'System/X11/Utilities', + 'System/YaST', +]) setOption('StandardGroups', ( 'aegis', @@ -384,6 +625,7 @@ 'radiusd', 'radvd', 'root', + '_rmt', 'sabayon-admin', 'salt', 'sapdb', @@ -1115,6 +1357,13 @@ addFilter(' non-devel-buildrequires libxslt') addFilter(' non-devel-buildrequires recode') +# Too noisy, and usually not something downstream packagers can fix +addFilter(' incorrect-fsf-address ') +addFilter(' no-manual-page-for-binary ') +addFilter(' static-library-without-debuginfo /usr/lib(?:64)?/ghc-[\d\.]+/') + +# the libre mess +addFilter(r'libre(?:ssl|office|cad)[^\:]+: \w: shlib-policy-') # many places have shorter paths addFilter(' non-coherent-filename ') ++++++ rpmlint-checks-master.tar.xz ++++++ 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 2017-09-30 16:54:33.000000000 +0200 +++ new/rpmlint-checks-master/BrandingPolicyCheck.py 2017-10-11 10:02:36.000000000 +0200 @@ -6,9 +6,8 @@ # Purpose : Verify that branding related things comply ############################################################################# -from Filter import * +from Filter import printError, addDetails import AbstractCheck -import Config import rpm @@ -27,8 +26,8 @@ for r in pkg.requires(): if r[0].startswith("config("): continue - if (pkg.name.find('-branding-') < 0 and - (r[0].find('-theme-') >= 0 or r[0].find('-branding-') >= 0)): + if ('-branding-' not in pkg.name and + ('-theme-' in r[0] or '-branding-' in 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'): @@ -36,14 +35,14 @@ if (r[1] != rpm.RPMSENSE_EQUAL or not r[2][1].startswith('1')): printError(pkg, 'suse-branding-unversioned-requires', r[0]) - # verify that it doesn't conflict with branding + # verify that it uses branding conflicts for r in pkg_conflicts: if r.startswith("otherproviders("): continue - if r.find('-theme-') >= 0 or r.find('-branding-') >= 0: + if '-branding-' in r: printError(pkg, 'suse-branding-branding-conflict', r) - if pkg.name.find('-branding-') < 0: + if '-branding-' not in pkg.name: return branding_basename = pkg.name.partition('-branding-')[0] @@ -53,18 +52,17 @@ pkg_supplements = set(map(lambda x: x[0], pkg.supplements())) # verify that it only supplements with packageand - found_correct = False + found_packageand_supplement = 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_packageand_supplement = True else: printError(pkg, 'suse-branding-excessive-supplement', s) - if not found_correct: + if not found_packageand_supplement: printError(pkg, 'suse-branding-supplement-missing', correct_supplement) # nothing else @@ -102,20 +100,36 @@ check = BrandingPolicyCheck() -if Config.info: - addDetails( +addDetails( +'suse-branding-branding-conflict', +'''Branding packages should conflict with other flavors of the branding package by using +Conflicts: otherproviders(pkg-branding) = brandingversion +and not directly by numerating a name with -branding- in it.''', + 'suse-branding-specific-branding-req', """packages must not require a specific branding or theme package to allow for different themes""", + 'suse-branding-no-branding-provides', """Please add a provides entry similar to 'Provides: %name-branding = %version'.""", + 'suse-branding-unversioned-provides', -"""Please make sure that your provides entry reads like 'Provides: %name-branding = %version'.""", +"""Please make sure that your provides entry reads like: +Provides: %name-branding = %version'.""", + +'suse-branding-wrong-branding-supplement', +"""For consistency, the branding package should be in the form +Supplements: packageand(basebackage:branding-<flavor> +""", + 'suse-branding-supplement-missing', -"""branding packages should provide a supplemnent in the form +"""branding packages should provide a supplement in the form Supplements: packageand(basepackage:branding-<flavour>) """, + 'suse-branding-unversioned-requires', -"""Please make sure that your requires entry reads like 'Requires: %name-branding = <versionnumber>'.""", +"""Please make sure that your requires entry is similar to: +Requires: %name-branding = <versionnumber>'.""", + 'suse-branding-missing-conflicts', """Any branding flavor package that provides the generic branding must also conflict with all other branding packages via a special diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/CheckAppdata.py new/rpmlint-checks-master/CheckAppdata.py --- old/rpmlint-checks-master/CheckAppdata.py 2017-09-30 16:54:33.000000000 +0200 +++ new/rpmlint-checks-master/CheckAppdata.py 1970-01-01 01:00:00.000000000 +0100 @@ -1,34 +0,0 @@ -# vim:sw=4:et -############################################################################# -# File : CheckAppdata.py -# Package : rpmlint -# Author : Stephan Kulow -# Purpose : Check for valid XML in appdata -############################################################################# - -# http://people.freedesktop.org/~hughsient/appdata/ - -from Filter import * -import AbstractCheck -from xml.dom.minidom import parse -from xml.parsers.expat import ExpatError - - -class AppdataCheck(AbstractCheck.AbstractFilesCheck): - def __init__(self): - AbstractCheck.AbstractFilesCheck.__init__(self, "CheckAppdata", r'/usr/share/appdata/.*appdata\.xml$') - - def check_file(self, pkg, filename): - try: - parse(pkg.dirName() + filename) - except ExpatError: - printError(pkg, 'invalid-xml-in-appdata', filename) - - -check = AppdataCheck() - -addDetails( -'invalid-xml-in-appdata', -"""The appdata file provided by the package is not valid XML and will -cause problems. Use e.g. xmllint to verify the problem and fix.""" -) 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 2017-09-30 16:54:33.000000000 +0200 +++ new/rpmlint-checks-master/CheckExecDocs.py 2017-10-11 10:02:36.000000000 +0200 @@ -12,22 +12,13 @@ def ignore_pkg(name): - if name.startswith('bundle-'): + if name.startswith('bundle-') or '-devel' in name or '-doc' in name: return True - if name.find('-devel') != -1: - return True - if name.find('-doc') != -1: - return True - return False def lang_ignore_pkg(name): - if ignore_pkg(name): - return True - if name.endswith('-lang'): - return True - if name.find('-trans-') != -1: + if ignore_pkg(name) or '-lang' in name or '-trans' in name: return True return False 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 2017-09-30 16:54:33.000000000 +0200 +++ new/rpmlint-checks-master/CheckPolkitPrivs.py 2017-10-11 10:02:36.000000000 +0200 @@ -28,14 +28,15 @@ self._parsefile(filename) def _parsefile(self, filename): - for line in open(filename): - line = line.split('#')[0].split('\n')[0] - if len(line): - line = re.split(r'\s+', line) - priv = line[0] - value = line[1] + with open(filename) as inputfile: + for line in inputfile: + line = line.split('#')[0].split('\n')[0] + if len(line): + line = re.split(r'\s+', line) + priv = line[0] + value = line[1] - self.privs[priv] = value + self.privs[priv] = value def check(self, pkg): @@ -145,23 +146,25 @@ check = PolkitCheck() -if Config.info: - addDetails( +addDetails( 'polkit-unauthorized-file', """If the package is intended for inclusion in any SUSE product please open a bug report to request review of the package by the security team""", + 'polkit-unauthorized-privilege', """The package allows unprivileged users to carry out privileged operations without authentication. This could cause security problems if not done carefully. If the package is intended for inclusion in any SUSE product please open a bug report to request review of the package by the security team""", + 'polkit-untracked-privilege', """The privilege is not listed in /etc/polkit-default-privs.* which makes it harder for admins to find. If the package is intended for inclusion in any SUSE product please open a bug report to request review of the package by the security team""", + 'polkit-cant-acquire-privilege', """Usability can be improved by allowing users to acquire privileges via authentication. Use e.g. 'auth_admin' instead of 'no' and make 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 2017-09-30 16:54:33.000000000 +0200 +++ new/rpmlint-checks-master/CheckSUIDPermissions.py 2017-10-11 10:02:36.000000000 +0200 @@ -143,7 +143,7 @@ if type == 0o10 and mode & 0o111: # pie binaries have 'shared object' here - if ('ELF' in pkgfile.magic and + if (pkgfile.magic.startswith('ELF ') and 'shared object' not in pkgfile.magic): printError(pkg, 'non-position-independent-executable', f) 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 2017-09-30 16:54:33.000000000 +0200 +++ new/rpmlint-checks-master/DuplicatesCheck.py 2017-10-11 10:02:36.000000000 +0200 @@ -7,7 +7,6 @@ ############################################################################# import AbstractCheck -import Config import Filter import os import stat @@ -85,19 +84,19 @@ check = DuplicatesCheck() -if Config.info: - Filter.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.""", + 'hardlink-across-partition', """Your package contains two files that are apparently hardlinked and that are likely on different partitions. Installation of such an RPM will fail due to RPM being unable to unpack the hardlink. do not hardlink across the first two levels of a path, e.g. between /srv/ftp and /srv/www or /etc and /usr. """, + 'hardlink-across-config-files', """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.""" - ) +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 2017-09-30 16:54:33.000000000 +0200 +++ new/rpmlint-checks-master/ErlangCheck.py 2017-10-11 10:02:36.000000000 +0200 @@ -7,8 +7,8 @@ ############################################################################# import AbstractCheck -import Config import Filter +import Pkg import re import rpm @@ -27,7 +27,7 @@ if 'debug_info' not in beam.compileinfo['options']: Filter.printWarning( pkg, "beam-compiled-without-debug_info", filename) - if not self.source_re.match(beam.compileinfo['source'].value): + if not self.source_re.match(Pkg.b2s(beam.compileinfo['source'].value)): Filter.printWarning( pkg, "beam-was-not-recompiled", filename, beam.compileinfo['source'].value) @@ -35,11 +35,11 @@ check = ErlangCheck() -if Config.info: - Filter.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.""", + '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 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 2017-09-30 16:54:33.000000000 +0200 +++ new/rpmlint-checks-master/LibraryPolicyCheck.py 2017-10-11 10:02:36.000000000 +0200 @@ -13,6 +13,7 @@ from Filter import printWarning import os import Pkg +import re import rpm import stat @@ -297,8 +298,9 @@ class LibraryPolicyCheck(AbstractCheck.AbstractCheck): def __init__(self): - self.map = [] AbstractCheck.AbstractCheck.__init__(self, "LibraryPolicyCheck") + self.map = [] + self.strongly_versioned_re = re.compile('-[\d\.]+\.so$') def check(self, pkg): global _policy_legacy_exceptions @@ -322,9 +324,9 @@ pkg.requires())) for f, pkgfile in files.items(): - if f.find('.so.') != -1 or f.endswith('.so'): + if '.so.' in f or f.endswith('.so'): filename = pkg.dirName() + '/' + f - if stat.S_ISREG(files[f].mode) and 'ELF' in pkgfile.magic: + if stat.S_ISREG(files[f].mode) and pkgfile.magic.startswith('ELF '): bi = BinaryInfo(pkg, filename, f, False, True) libs_needed = libs_needed.union(bi.needed) if bi.soname != 0: @@ -369,9 +371,9 @@ # Check for non-versioned libs in a std lib package if std_lib_package: for lib in libs.copy(): - if not lib[-1].isdigit(): + if (not (lib[-1].isdigit() or + self.strongly_versioned_re.search(lib))): printWarning(pkg, "shlib-unversioned-lib", lib) - libs.remove(lib) # If this package should be or should be splitted into shlib # package(s) @@ -416,12 +418,13 @@ # Verify non-lib stuff does not add dependencies if libs: for dep in pkg_requires.difference(_essential_dependencies): - if dep.find('.so.') != -1 and dep not in libs and dep not in libs_needed: + if '.so.' in dep and dep not in libs and dep not in libs_needed: printError(pkg, 'shlib-policy-excessive-dependency', dep) # Check for non-versioned directories beyond sysdirs in package - sysdirs = ['/lib', '/lib64', '/usr/lib', '/usr/lib64', - '/usr/share/doc/packages', '/usr/share'] + sysdirs = ('/lib', '/lib64', '/usr/lib', '/usr/lib64', + '/usr/share', '/usr/share/licenses', + '/usr/share/doc/packages') cdirs = set() for sysdir in sysdirs: done = set() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-checks-master/experimental/CheckUnusedLibs.py new/rpmlint-checks-master/experimental/CheckUnusedLibs.py --- old/rpmlint-checks-master/experimental/CheckUnusedLibs.py 2017-09-30 16:54:33.000000000 +0200 +++ new/rpmlint-checks-master/experimental/CheckUnusedLibs.py 2017-10-11 10:02:36.000000000 +0200 @@ -37,7 +37,7 @@ if fname.startswith('/usr/lib/debug') or \ not stat.S_ISREG(pkgfile.mode) or \ - string.find(pkgfile.magic, 'ELF') == -1: + not pkgfile.magic.startswith('ELF '): continue ret, output = Pkg.getstatusoutput(['ldd', '-r', '-u', pkgfile.path]) ++++++ rpmlint-tests-84.87+git20170930.a05216c.tar.xz -> rpmlint-tests-84.87+git20171011.8b163ac.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-tests-84.87+git20170930.a05216c/tests/appdata1.ignore new/rpmlint-tests-84.87+git20171011.8b163ac/tests/appdata1.ignore --- old/rpmlint-tests-84.87+git20170930.a05216c/tests/appdata1.ignore 2017-09-30 18:36:23.000000000 +0200 +++ new/rpmlint-tests-84.87+git20171011.8b163ac/tests/appdata1.ignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -#addFilter(" files-duplicate") -#addFilter(" no-manual-page-for-binary ") -#addFilter(" no-binary") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-tests-84.87+git20170930.a05216c/tests/appdata1.ref new/rpmlint-tests-84.87+git20171011.8b163ac/tests/appdata1.ref --- old/rpmlint-tests-84.87+git20170930.a05216c/tests/appdata1.ref 2017-09-30 18:36:23.000000000 +0200 +++ new/rpmlint-tests-84.87+git20171011.8b163ac/tests/appdata1.ref 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -appdata1: W: invalid-xml-in-appdata /usr/share/appdata/gnome-power-statistics.appdata.xml -1 packages and 0 specfiles checked; 0 errors, 1 warnings. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-tests-84.87+git20170930.a05216c/tests/appdata1.spec new/rpmlint-tests-84.87+git20171011.8b163ac/tests/appdata1.spec --- old/rpmlint-tests-84.87+git20170930.a05216c/tests/appdata1.spec 2017-09-30 18:36:23.000000000 +0200 +++ new/rpmlint-tests-84.87+git20171011.8b163ac/tests/appdata1.spec 1970-01-01 01:00:00.000000000 +0100 @@ -1,71 +0,0 @@ -Name: appdata1 -Version: 0 -Release: 0 -Group: Development/Tools/Building -Summary: Check validation of appdata.xml -License: GPL-2.0+ -BuildRoot: %_tmppath/%name-%version-build -Url: http://www.opensuse.org/ -BuildArch: noarch - -%description -Lorem ipsum dolor sit amet, consectetur adipisici elit, sed -eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim -ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut -aliquid ex ea commodi consequat. Quis aute iure reprehenderit in -voluptate velit esse cillum dolore eu fugiat nulla pariatur. -Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui -officia deserunt mollit anim id est laborum. - -%prep -%build - -%install -install -d -m 755 %buildroot/usr/share/appdata - -cat > %buildroot/usr/share/appdata/gnome-power-statistics.appdata.xml <<'EOF' -<?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 2013 First Lastname <y...@email.com> --> -<application> - <id type="desktop">gnome-power-statistics.desktop</id> - <licence>CC0</licence> - <name>Power Statistics</name> - <summary>Observe power management</summary> - <description> - <p> - Power Statistics is a program used to view historical and current battery - information and will show programs running on your computer using power. - - &error - </p> - <p>Example list:</p> - <ul> - <li>First item</li> - <li>Second item</li> - </ul> - <p> - You probably only need to install this application if you are having problems - with your laptop battery, or are trying to work out what programs are using - significant amounts of power. - </p> - </description> - <screenshots> - <screenshot type="default" width="800" height="600">http://www.hughsie.com/en_US/main.png</screenshot> - <screenshot width="800" height="600">http://www.hughsie.com/en_US/preferences.png</screenshot> - </screenshots> - <url type="homepage">http://www.gnome.org/projects/en_US/gnome-power-manager</url> - <updatecontact>gnome-power-manager-l...@gnome.org</updatecontact> - <project_group>GNOME</project_group> -</application> -EOF - -%clean -rm -rf %buildroot - -%files -%defattr(-,root,root) -/usr/share/appdata - -%changelog -* Mon Apr 18 2011 lnus...@suse.de -- dummy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-tests-84.87+git20170930.a05216c/tests/appdata2.ignore new/rpmlint-tests-84.87+git20171011.8b163ac/tests/appdata2.ignore --- old/rpmlint-tests-84.87+git20170930.a05216c/tests/appdata2.ignore 2017-09-30 18:36:23.000000000 +0200 +++ new/rpmlint-tests-84.87+git20171011.8b163ac/tests/appdata2.ignore 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -#addFilter(" files-duplicate") -#addFilter(" no-manual-page-for-binary ") -#addFilter(" no-binary") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-tests-84.87+git20170930.a05216c/tests/appdata2.ref new/rpmlint-tests-84.87+git20171011.8b163ac/tests/appdata2.ref --- old/rpmlint-tests-84.87+git20170930.a05216c/tests/appdata2.ref 2017-09-30 18:36:23.000000000 +0200 +++ new/rpmlint-tests-84.87+git20171011.8b163ac/tests/appdata2.ref 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -1 packages and 0 specfiles checked; 0 errors, 0 warnings. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-tests-84.87+git20170930.a05216c/tests/appdata2.spec new/rpmlint-tests-84.87+git20171011.8b163ac/tests/appdata2.spec --- old/rpmlint-tests-84.87+git20170930.a05216c/tests/appdata2.spec 2017-09-30 18:36:23.000000000 +0200 +++ new/rpmlint-tests-84.87+git20171011.8b163ac/tests/appdata2.spec 1970-01-01 01:00:00.000000000 +0100 @@ -1,69 +0,0 @@ -Name: appdata2 -Version: 0 -Release: 0 -Group: Development/Tools/Building -Summary: Check validation of appdata.xml -License: GPL-2.0+ -BuildRoot: %_tmppath/%name-%version-build -Url: http://www.opensuse.org/ -BuildArch: noarch - -%description -Lorem ipsum dolor sit amet, consectetur adipisici elit, sed -eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim -ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut -aliquid ex ea commodi consequat. Quis aute iure reprehenderit in -voluptate velit esse cillum dolore eu fugiat nulla pariatur. -Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui -officia deserunt mollit anim id est laborum. - -%prep -%build - -%install -install -d -m 755 %buildroot/usr/share/appdata - -cat > %buildroot/usr/share/appdata/gnome-power-statistics.appdata.xml <<'EOF' -<?xml version="1.0" encoding="UTF-8"?> -<!-- Copyright 2013 First Lastname <y...@email.com> --> -<application> - <id type="desktop">gnome-power-statistics.desktop</id> - <licence>CC0</licence> - <name>Power Statistics</name> - <summary>Observe power management</summary> - <description> - <p> - Power Statistics is a program used to view historical and current battery - information and will show programs running on your computer using power. - </p> - <p>Example list:</p> - <ul> - <li>First item</li> - <li>Second item</li> - </ul> - <p> - You probably only need to install this application if you are having problems - with your laptop battery, or are trying to work out what programs are using - significant amounts of power. - </p> - </description> - <screenshots> - <screenshot type="default" width="800" height="600">http://www.hughsie.com/en_US/main.png</screenshot> - <screenshot width="800" height="600">http://www.hughsie.com/en_US/preferences.png</screenshot> - </screenshots> - <url type="homepage">http://www.gnome.org/projects/en_US/gnome-power-manager</url> - <updatecontact>gnome-power-manager-l...@gnome.org</updatecontact> - <project_group>GNOME</project_group> -</application> -EOF - -%clean -rm -rf %buildroot - -%files -%defattr(-,root,root) -/usr/share/appdata - -%changelog -* Mon Apr 18 2011 lnus...@suse.de -- dummy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-tests-84.87+git20170930.a05216c/tests/erlang.ignore new/rpmlint-tests-84.87+git20171011.8b163ac/tests/erlang.ignore --- old/rpmlint-tests-84.87+git20170930.a05216c/tests/erlang.ignore 1970-01-01 01:00:00.000000000 +0100 +++ new/rpmlint-tests-84.87+git20171011.8b163ac/tests/erlang.ignore 2017-10-11 13:28:59.000000000 +0200 @@ -0,0 +1,2 @@ +addCheck("ErlangCheck") +addFilter(" no-binary") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-tests-84.87+git20170930.a05216c/tests/erlang.ref new/rpmlint-tests-84.87+git20171011.8b163ac/tests/erlang.ref --- old/rpmlint-tests-84.87+git20170930.a05216c/tests/erlang.ref 1970-01-01 01:00:00.000000000 +0100 +++ new/rpmlint-tests-84.87+git20171011.8b163ac/tests/erlang.ref 2017-10-11 13:28:59.000000000 +0200 @@ -0,0 +1,2 @@ +erlang: W: beam-compiled-without-debug_info /usr/lib/erlang/m.beam +1 packages and 0 specfiles checked; 0 errors, 1 warnings. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-tests-84.87+git20170930.a05216c/tests/erlang.spec new/rpmlint-tests-84.87+git20171011.8b163ac/tests/erlang.spec --- old/rpmlint-tests-84.87+git20170930.a05216c/tests/erlang.spec 1970-01-01 01:00:00.000000000 +0100 +++ new/rpmlint-tests-84.87+git20171011.8b163ac/tests/erlang.spec 2017-10-11 13:28:59.000000000 +0200 @@ -0,0 +1,42 @@ +Name: erlang +Version: 0 +Release: 0 +Group: Development/Tools/Building +Summary: Lorem ipsum +License: GPL-2.0+ +BuildRoot: %_tmppath/%name-%version-build +Url: http://www.opensuse.org/ + +%description +Lorem ipsum dolor sit amet, consectetur adipisici elit, sed +eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim +ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut +aliquid ex ea commodi consequat. Quis aute iure reprehenderit in +voluptate velit esse cillum dolore eu fugiat nulla pariatur. +Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui +officia deserunt mollit anim id est laborum. + +%prep +%build +cat <<EOF > m.erl +-module(m). +-export([fact/1]). + +fact(N) when N>0 -> N * fact(N-1); +fact(0) -> 1. +EOF +erlc +no_debug_info m.erl + +%install +install -D -m 644 m.beam %buildroot/usr/lib/erlang/m.beam + +%clean +rm -rf %buildroot + +%files +%defattr(-,root,root) +/usr/lib/erlang/m.beam + +%changelog +* Mon Apr 18 2011 lnus...@suse.de +- dummy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rpmlint-tests-84.87+git20170930.a05216c/tests/foo1-developer-plugins.ref new/rpmlint-tests-84.87+git20171011.8b163ac/tests/foo1-developer-plugins.ref --- old/rpmlint-tests-84.87+git20170930.a05216c/tests/foo1-developer-plugins.ref 2017-09-30 18:36:23.000000000 +0200 +++ new/rpmlint-tests-84.87+git20171011.8b163ac/tests/foo1-developer-plugins.ref 2017-10-11 13:28:59.000000000 +0200 @@ -1 +1,2 @@ -1 packages and 0 specfiles checked; 0 errors, 0 warnings. +foo1-developer-plugins: W: non-standard-group Blah +1 packages and 0 specfiles checked; 0 errors, 1 warnings. ++++++ suse-whitelist-opensuse.diff ++++++ --- /var/tmp/diff_new_pack.p3Kkau/_old 2017-10-18 10:44:02.775007745 +0200 +++ /var/tmp/diff_new_pack.p3Kkau/_new 2017-10-18 10:44:02.779007557 +0200 @@ -1,22 +1,38 @@ -From: Some One <nob...@opensuse.org> -Date: Thu, 9 Apr 2015 14:55:40 +0200 -Subject: [PATCH] suse-whitelist-opensuse.diff +From ceebc0de2c3a9bb1663418d75a4b0de1d15740b2 Mon Sep 17 00:00:00 2001 +From: Dirk Mueller <d...@dmllr.de> +Date: Sun, 1 Oct 2017 14:06:31 +0200 +Subject: [PATCH] Lower false-positives on summary-not-capitalized -=================================================================== +Allow some 'names' at the beginning of the summary to be +non-capitalized. --- - TagsCheck.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + TagsCheck.py | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) -Index: rpmlint-rpmlint-1.10/TagsCheck.py -=================================================================== ---- rpmlint-rpmlint-1.10.orig/TagsCheck.py -+++ rpmlint-rpmlint-1.10/TagsCheck.py -@@ -953,7 +953,7 @@ class TagsCheck(AbstractCheck.AbstractCh +diff --git a/TagsCheck.py b/TagsCheck.py +index ea131e3..d3da24c 100644 +--- a/TagsCheck.py ++++ b/TagsCheck.py +@@ -397,6 +397,9 @@ BAD_WORDS = { + 'xwindows': 'X' + } + ++CAPITALIZED_IGNORE_LIST = ( ++ 'jQuery', 'openSUSE', 'wxWidgets', 'a', 'an', 'uWSGI') ++ + DEFAULT_INVALID_REQUIRES = ('^is$', '^not$', '^owned$', '^by$', '^any$', + '^package$', r'^libsafe\.so\.') + +@@ -911,7 +914,8 @@ class TagsCheck(AbstractCheck.AbstractCheck): spell_check(pkg, summary, 'Summary(%s)', lang, ignored_words) if '\n' in summary: printError(pkg, 'summary-on-multiple-lines', lang) - if summary[0] != summary[0].upper(): -+ if summary[0] != summary[0].upper() and not summary.startswith("openSUSE"): ++ if (not summary[0].isupper() and ++ summary.partition(' ')[0] not in CAPITALIZED_IGNORE_LIST): printWarning(pkg, 'summary-not-capitalized', lang, summary) if summary[-1] == '.': printWarning(pkg, 'summary-ended-with-dot', lang, summary) +-- +2.14.1 +