Bug 84598

Summary: Provide an example for GetAllMatchRules
Product: dbus Reporter: Alban Crequy <alban.crequy>
Component: coreAssignee: D-Bus Maintainers <dbus>
Status: RESOLVED FIXED QA Contact: D-Bus Maintainers <dbus>
Severity: normal    
Priority: medium Keywords: patch
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: [PATCH] GetAllMatchRules: provide an example how it could be used

Description Alban Crequy 2014-10-02 14:00:02 UTC
Created attachment 107228 [details] [review]
[PATCH] GetAllMatchRules: provide an example how it could be used

GetAllMatchRules (Bug #24307) was added in dbus 1.9.0 but without an example how it could be used to debug D-Bus systems.

GetAllMatchRules is useful to find applications registering too broad D-Bus match rules. The attached script shows how it could be done. It could be installed in /usr/share/doc/dbus/examples/.
Comment 1 Simon McVittie 2014-10-06 11:07:55 UTC
Comment on attachment 107228 [details] [review]
[PATCH] GetAllMatchRules: provide an example how it could be used

Review of attachment 107228 [details] [review]:
-----------------------------------------------------------------

> FIXME: why do I need to add GetAllMatchRules.py in EXTRA_DIST?
> "make distcheck" does not work otherwise...

automake-1.14.info ยง9.1 "Executable Scripts":

     # Install my_script in $(bindir) and distribute it.
     dist_bin_SCRIPTS = my_script

   Scripts are not distributed by default; as we have just seen, those
that should be distributed can be specified using a 'dist_' prefix as
with other primaries.

(The justification for not distributing them by default is that they often use the "foo.in" idiom to substitute @datadir@ or @PYTHON@ or whatever.)
Comment 2 Simon McVittie 2014-10-06 11:33:26 UTC
(In reply to Simon McVittie from comment #1)
>    Scripts are not distributed by default; as we have just seen, those
> that should be distributed can be specified using a 'dist_' prefix as
> with other primaries.

Fixed that for you, and committed it for 1.9.2. Thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct.