commit rpmlint for openSUSE:Factory
Hello community, here is the log from the commit of package rpmlint for openSUSE:Factory checked in at Fri Jan 23 23:37:23 CET 2009. -------- --- rpmlint/rpmlint.changes 2009-01-13 16:00:27.000000000 +0100 +++ /mounts/work_src_done/STABLE/rpmlint/rpmlint.changes 2009-01-23 15:18:45.000000000 +0100 @@ -1,0 +2,5 @@ +Fri Jan 23 14:00:24 CET 2009 - lnussel@suse.de + +- add check for DBus Policy problems + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- CheckDBusPolicy.py ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rpmlint.spec ++++++ --- /var/tmp/diff_new_pack.X23508/_old 2009-01-23 23:36:45.000000000 +0100 +++ /var/tmp/diff_new_pack.X23508/_new 2009-01-23 23:36:45.000000000 +0100 @@ -22,7 +22,7 @@ BuildRequires: rpm-python Summary: Rpm correctness checker Version: 0.84 -Release: 11 +Release: 12 Source0: %{name}-%{version}.tar.bz2 Source1: config Source1001: config.in @@ -42,6 +42,7 @@ Source15: CheckPolkitPrivs.py Source16: CheckDBUSServices.py Source17: CheckFilelist.py +Source18: CheckDBusPolicy.py Source100: syntax-validator.py Url: http://rpmlint.zarb.org/ License: GPL v2 or later @@ -194,6 +195,7 @@ cp -p %{SOURCE15} . cp -p %{SOURCE16} . cp -p %{SOURCE17} . +cp -p %{SOURCE18} . %build make @@ -220,6 +222,8 @@ /usr/share/man/man1/rpmlint.1.gz %changelog +* Fri Jan 23 2009 lnussel@suse.de +- add check for DBus Policy problems * Tue Jan 13 2009 lnussel@suse.de - CheckFilelist: optimize FHS check to only complain about wrong directories rather than hundreds of individual files ++++++ CheckDBusPolicy.py ++++++ # vim:sw=4:et ############################################################################# # File : CheckDBusPolicy.py # Package : rpmlint # Author : Ludwig Nussel # Purpose : Check for broken DBus policies ############################################################################# # causes extraction of package if it contains files in /etc/dbus-1/system.d/ from Filter import * import AbstractCheck from xml.dom.minidom import parse class DBusPolicyCheck(AbstractCheck.AbstractCheck): def __init__(self): AbstractCheck.AbstractCheck.__init__(self, "CheckDBusPolicy") def check(self, pkg): if pkg.isSource(): return files = pkg.files() for f in files: if f in pkg.ghostFiles(): continue # catch xml exceptions try: if f.startswith("/etc/dbus-1/system.d/"): send_policy_seen = False lf = pkg.dirName() + f xml = parse(lf) for p in xml.getElementsByTagName("policy"): for allow in p.getElementsByTagName("allow"): if ( allow.hasAttribute('send_interface') \ or allow.hasAttribute('send_member') \ or allow.hasAttribute('send_path')) \ and not allow.hasAttribute('send_destination'): send_policy_seen = True printError(pkg, 'dbus-policy-allow-without-destination', "%(file)s: %(xml)s" % { 'file':f, 'xml':allow.toxml() }) elif allow.hasAttribute('send_destination'): send_policy_seen = True if allow.hasAttribute('receive_sender') \ or allow.hasAttribute('receive_interface'): printInfo(pkg, 'dbus-policy-allow-receive', "%(file)s: %(xml)s" % { 'file':f, 'xml':allow.toxml() }) for deny in p.getElementsByTagName("deny"): if ( deny.hasAttribute('send_interface') \ and not deny.hasAttribute('send_destination')): printError(pkg, 'dbus-policy-deny-without-destination', "%(file)s: %(xml)s" % { 'file':f, 'xml':deny.toxml() }) if not send_policy_seen: printError(pkg, 'dbus-policy-missing-allow', "%(file)s does not allow communication" % { 'file':f }) except Exception, x: printError(pkg, 'rpmlint-exception', "%(file)s raised an exception: %(x)s" % {'file':f, 'x':x}) continue check=DBusPolicyCheck() if Config.info: addDetails( 'dbus-policy-allow-without-destination', """'allow' directives must always specify a 'send_destination'""", 'dbus-policy-allow-receive', """allow receive_* is normally not needed as that is the default""", 'dbus-policy-deny-without-destination', """'deny' directives must always specify a 'send_destination' otherwise messages to other services could be blocked""", 'dbus-policy-missing-allow', """every dbus config normally needs a line of the form <allow send_destination="org.foo.bar"/> or similar. If that is missing the service will not work with a dbus that uses deny as default policy""", 'rpmlint-exception', """A python exception was raised which prevents further analysis""", ) ++++++ config ++++++ --- /var/tmp/diff_new_pack.X23508/_old 2009-01-23 23:36:46.000000000 +0100 +++ /var/tmp/diff_new_pack.X23508/_new 2009-01-23 23:36:46.000000000 +0100 @@ -29,6 +29,7 @@ # polkit-default-privs would need to be installed always #addCheck("CheckPolkitPrivs") addCheck("CheckDBUSServices") +addCheck("CheckDBusPolicy") addCheck("CheckFilelist") addCheck("CheckKDE4Deps") addCheck("KMPPolicyCheck") ++++++ config.in ++++++ --- /var/tmp/diff_new_pack.X23508/_old 2009-01-23 23:36:47.000000000 +0100 +++ /var/tmp/diff_new_pack.X23508/_new 2009-01-23 23:36:47.000000000 +0100 @@ -29,6 +29,7 @@ # polkit-default-privs would need to be installed always #addCheck("CheckPolkitPrivs") addCheck("CheckDBUSServices") +addCheck("CheckDBusPolicy") addCheck("CheckFilelist") # stuff autobuild takes care about ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 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