<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}
p.MsoNormal,p.MsoNoSpacing{margin:0}
p.MsoNormal,p.MsoNoSpacing{margin:0}
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>I am working on a flatpak for an application which needs to interact with a dbus service with a large number of interfaces. The application only needs to use with a small amount of the stuff exposed by this service, so using <span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">--talk-name=scary.service.with.lots.of.power</span> in <span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">flatpak-build-finish</span> is not ideal.<br></div><div><br></div><div>For what it's worth, I do intend to contribute a portal to avoid using the big scary service, but there other flatpak applications which talk with dbus services in this way and portals are kind of a piece-meal solution. (Depending on the specificity of a given problem, I dare say they might not even apply in every case, although they are effective most of the time).<br></div><div><br></div><div>So, is there a way to set a more fine-grained dbus policy in a flatpak manifest? This would allow me to do the next best thing in lieu of a portal. I see <span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">xdg-dbus-proxy</span> has a mechanism for more specific rules beyond "talks to name" (<a href="https://github.com/flatpak/xdg-dbus-proxy/blob/master/flatpak-proxy.c#L517-L604">https://github.com/flatpak/xdg-dbus-proxy/blob/master/flatpak-proxy.c#L517-L604</a>). I see how this is used for <i>built in</i> flatpak things, and how I assume it could fit into <span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">flatpak_context_to_args</span> and <span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">flatpak_context_add_bus_filters</span> (<a href="https://github.com/flatpak/flatpak/blob/master/common/flatpak-context.c#L1982-L2073">https://github.com/flatpak/flatpak/blob/master/common/flatpak-context.c#L1982-L2073</a>).<br></div><div><br></div><div>I am wondering if there is an argument to be made for adding something like a <span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">--call=NAME=RULE</span> option to <span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">flatpak-build-finish</span>, or extending the syntax for <span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">--talk-name</span> with something like <span class="font" style="font-family:menlo, consolas, monospace, sans-serif;">--talk-name=com.example.Service@com.example.Interface.Method@/com/example/object</span>.<br></div><div><br></div><div>And also, of course, I am also wondering if this argument has already happened :)<br></div><div><br></div><div>Dylan<br></div><div><br></div></body></html>