From a8d54e5711ae05c7fcde1bf606a5993470e635ad0817e606fdc88d2ce2a311d5 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Fri, 30 Jan 2009 15:19:08 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=37 --- CheckFilelist.py | 15 ++++++++++++--- config | 11 +++++++++++ rpmlint.changes | 6 ++++++ rpmlint.spec | 5 ++++- 4 files changed, 33 insertions(+), 4 deletions(-) diff --git a/CheckFilelist.py b/CheckFilelist.py index 34cf9de..3f57843 100644 --- a/CheckFilelist.py +++ b/CheckFilelist.py @@ -38,6 +38,10 @@ def notsymlink(pkg, f): type = (mode>>12)&017 return type != 012 +def ghostfile(pkg, f): + ghosts = pkg.ghostFiles() + return f in ghosts + _goodprefixes = ( '/bin/', '/boot/', @@ -86,6 +90,7 @@ _restricteddirs = set() _checks = [ { + # TODO: split this into several checks 'good': [ '/etc/sysconfig/cbq', '/etc/sysconfig/scripts', @@ -103,7 +108,6 @@ _checks = [ ], 'bad': [ '/usr/share/info/dir', - '*~', '*/CVS', '*/CVS/*', '*/.cvsignore', @@ -111,7 +115,6 @@ _checks = [ '*/RCS', '*/RCS/*', '*,v', - '*.bak', '*/.xvpics', '*.orig', '*.orig.gz', @@ -124,12 +127,18 @@ _checks = [ '/etc/rc.config.d/*', '/etc/init.d/*/*', '/usr/share/locale/LC_MESSAGES', - '/opt/gnome', '/usr/lib/perl5/site_perl/*', '/usr/lib/perl5/vendor_perl/5.*/auto', '/usr/lib/perl5/vendor_perl/5.*/*-linux-*/auto', ], }, + { + 'bad': [ + '*~', + '*.bak', + ], + 'ignorefileif': ghostfile, + }, { 'error': 'suse-filelist-forbidden-devel-in-lib', 'details': 'please move la files, static libs and .so symlinks to /usr/lib(64)', diff --git a/config b/config index 396bb28..f463860 100644 --- a/config +++ b/config @@ -216,6 +216,17 @@ addFilter("beagle-index\.\S+: \w: (non-devel|unnecessary)-buildrequires") addFilter("collect-desktop-files\.\S+: \w: (non-devel|unnecessary)-buildrequires") addFilter("installation-images\.\S+: \w: (non-devel|unnecessary)-buildrequires") +# directory used by statd +addFilter("nfs-client\.\S+: \w: suse-filelist-forbidden /var/lib/nfs/sm.bak ") + +# perl must have those +addFilter("perl\.\S+: \w: suse-filelist-forbidden /usr/lib/perl5/site_perl/.* ") +addFilter("perl\.\S+: \w: suse-filelist-forbidden /usr/lib/perl5/vendor_perl/5\..*/auto ") +addFilter("perl\.\S+: \w: suse-filelist-forbidden /usr/lib/perl5/vendor_perl/5\..*/.*-linux-.*/auto ") + +# texinfo maintains that file +addFilter("texinfo\.\S+: \w: suse-filelist-forbidden /usr/share/info/dir ") + # suboptimal library packaging addFilter(" non-devel-buildrequires graphviz") addFilter(" non-devel-buildrequires ImageMagick") diff --git a/rpmlint.changes b/rpmlint.changes index e2547dd..74ff0a6 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jan 30 14:35:48 CET 2009 - lnussel@suse.de + +- add exception for nfs-utils, texinfo and perl +- allow backup files if they are ghost files + ------------------------------------------------------------------- Fri Jan 23 14:00:24 CET 2009 - lnussel@suse.de diff --git a/rpmlint.spec b/rpmlint.spec index 481d8bc..da30f04 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -22,7 +22,7 @@ Name: rpmlint BuildRequires: rpm-python Summary: Rpm correctness checker Version: 0.84 -Release: 12 +Release: 13 Source0: %{name}-%{version}.tar.bz2 Source1: config Source1001: config.in @@ -222,6 +222,9 @@ rm -rf $RPM_BUILD_ROOT /usr/share/man/man1/rpmlint.1.gz %changelog +* Fri Jan 30 2009 lnussel@suse.de +- add exception for nfs-utils, texinfo and perl +- allow backup files if they are ghost files * Fri Jan 23 2009 lnussel@suse.de - add check for DBus Policy problems * Tue Jan 13 2009 lnussel@suse.de