commit rpmlint for openSUSE:Factory
![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package rpmlint for openSUSE:Factory checked in at Thu Nov 18 17:53:51 CET 2010. -------- --- rpmlint/rpmlint.changes 2010-11-15 17:15:31.000000000 +0100 +++ rpmlint/rpmlint.changes 2010-11-18 11:46:40.000000000 +0100 @@ -1,0 +2,16 @@ +Thu Nov 18 10:46:19 UTC 2010 - lnussel@suse.de + +- also check ghost files for permission violations + +------------------------------------------------------------------- +Wed Nov 17 10:10:29 UTC 2010 - lnussel@suse.de + +- add check for %set_permissions + +------------------------------------------------------------------- +Tue Nov 16 15:19:41 UTC 2010 - lnussel@suse.de + +- modify match in CheckSUIDPermissions to work with new macros +- allow info messages even if badness scoring is used + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- rpmlint-badness-info.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rpmlint.spec ++++++ --- /var/tmp/diff_new_pack.YTgWLA/_old 2010-11-18 17:52:58.000000000 +0100 +++ /var/tmp/diff_new_pack.YTgWLA/_new 2010-11-18 17:52:58.000000000 +0100 @@ -23,7 +23,7 @@ BuildRequires: rpm-python Summary: Rpm correctness checker Version: 1.0 -Release: 3 +Release: 4 Source0: %{name}-%{version}.tar.bz2 Source1: config Source1001: config.in @@ -120,6 +120,7 @@ Patch79: rpmlint-fscaps.diff Patch80: remove-expand-macros.diff Patch81: suse-whitelist-opensuse.diff +Patch82: rpmlint-badness-info.diff %py_requires %description @@ -196,6 +197,7 @@ %patch79 -p1 %patch80 %patch81 +%patch82 -p1 cp -p %{SOURCE1} . cp -p %{SOURCE2} . cp -p %{SOURCE3} . ++++++ CheckSUIDPermissions.py ++++++ --- /var/tmp/diff_new_pack.YTgWLA/_old 2010-11-18 17:52:59.000000000 +0100 +++ /var/tmp/diff_new_pack.YTgWLA/_new 2010-11-18 17:52:59.000000000 +0100 @@ -98,11 +98,10 @@ else: self._parsefile(f) - need_run_permissions = False + need_set_permissions = False + found_suseconfig = False # second pass, find permissions violations for f, pkgfile in files.items(): - if f in pkg.ghostFiles(): - continue if pkgfile.filecaps: printError(pkg, 'permissions-fscaps', '%(file)s has fscaps "%(caps)s"' % \ @@ -168,22 +167,46 @@ if need_verifyscript and \ (not f in self.perms or not 'static' in self.perms[f]): - need_run_permissions = True + need_set_permissions = True script = pkg[rpm.RPMTAG_VERIFYSCRIPT] or pkg[rpm.RPMTAG_VERIFYSCRIPTPROG] - if not script or not "chkstat -n -e %s"%f in script: - printError(pkg, 'permissions-missing-verifyscript', \ + + found = False + if script: + for line in script.split("\n"): + if "/chkstat" in line and f in line: + found = True + break + + if not script or not found: + printWarning(pkg, 'permissions-missing-verifyscript', \ "missing %%verify_permissions -e %s" % f) - if need_run_permissions: - postin = pkg[rpm.RPMTAG_POSTIN] or pkg[rpm.RPMTAG_POSTINPROG] - if not postin or not "SuSEconfig --module permissions" in postin: - printError(pkg, 'permissions-missing-postin', \ - "missing %run_permissions in %post") + script = pkg[rpm.RPMTAG_POSTIN] or pkg[rpm.RPMTAG_POSTINPROG] + found = False + if script: + for line in script.split("\n"): + if "chkstat -n" in line and f in line: + found = True + break + + if "SuSEconfig --module permissions" in line: + found = True + found_suseconfig = True + break + + if not script and not found: + printError(pkg, 'permissions-missing-postin', \ + "missing %%set_permissions %s in %%post" % f) + + if need_set_permissions: if not 'permissions' in map(lambda x: x[0], pkg.prereq()): printError(pkg, 'permissions-missing-requires', \ "missing 'permissions' in PreReq") + if found_suseconfig: + printInfo(pkg, 'permissions-suseconfig-obsolete', \ + "%run_permissions is obsolete") check=SUIDCheck() @@ -226,9 +249,13 @@ request an entry that sets capabilities in /etc/permissions instead.""", 'permissions-missing-postin', -"""Please add %run_permissions to %post""", +"""Please add an appropriate %post section""", 'permissions-missing-requires', """Please add \"PreReq: permissions\"""", 'permissions-missing-verifyscript', """Please add a %verifyscript section""", +'permissions-suseconfig-obsolete', +"""The %run_permissions macro calls SuSEconfig which sets permissions for all +files in the system. Please use %set_permissions <filename> instead +to only set permissions for files contained in this package""", ) ++++++ rpmlint-badness-info.diff ++++++
From c887ed177b551186dc30f7528cd23c018ca2b69d Mon Sep 17 00:00:00 2001 From: Ludwig Nussel
Date: Thu, 4 Nov 2010 17:25:35 +0100 Subject: [PATCH] allow info messages even if badness scoring is used
--- Filter.py | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/Filter.py b/Filter.py index 4b5ca1e..baaee45 100644 --- a/Filter.py +++ b/Filter.py @@ -47,7 +47,12 @@ def _print(msgtype, pkg, reason, details): badness = 0 if threshold >= 0: badness = Config.badness(reason) - msgtype = badness and "E" or "W" + # anything with badness is an error + if badness: + msgtype == 'E' + # errors without badness become warnings + elif msgtype == 'E': + msgtype = 'W' ln = "" if pkg.current_linenum is not None: -- 1.7.1 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de