<div dir="ltr">Hi Simon and Jamie,<div><br></div><div>Thank you for the explanations.</div><div>I would prefer to have all testings of a snap be done locally before I upload it to the store. Another scenario is a developer/company does not want to publish a snap which has a slot. How can they deal this?</div><div><br></div><div>BR,</div><div>Robert<br><br><div class="gmail_quote"><div dir="ltr">On Thu, Oct 27, 2016 at 10:07 PM Jamie Strandboge <<a href="mailto:jamie@canonical.com">jamie@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Thu, 2016-10-27 at 13:36 +0200, Simon Fels wrote:<br class="gmail_msg">
> Hey Robert,<br class="gmail_msg">
><br class="gmail_msg">
> the bluez plug and slot are now auto-connected as we put a snap-declaration<br class="gmail_msg">
> for it on the store side in place. That assertion tells snapd that the<br class="gmail_msg">
> bluez snap should get its slots/plugs automatically connected. But this<br class="gmail_msg">
> only applies for the bluez snap coming from the store. If you install one<br class="gmail_msg">
> you built locally you don't have the signed assertion from the store which<br class="gmail_msg">
> would tell snapd to auto-connect the relevant plugs and slots.<br class="gmail_msg">
><br class="gmail_msg">
> However I am not sure why the interface connection is denied when you do it<br class="gmail_msg">
> manually. @Samuele, Jamie: Any idea?<br class="gmail_msg">
><br class="gmail_msg">
Robert and Simon, interfaces typically give privileged access to the system to<br class="gmail_msg">
slot implementations and the idea is that slot implementations need store<br class="gmail_msg">
approval to protect against bad slot implementations that can be used to harm<br class="gmail_msg">
the system. As such the base declaration will typically deny connections to slot<br class="gmail_msg">
implementations which means a snap declaration from the store is required for<br class="gmail_msg">
your snap in order to allow plugging snaps to connect to it.<br class="gmail_msg">
<br class="gmail_msg">
Gustavo, while the base and snap declarations are working as designed and with<br class="gmail_msg">
the intended purpose, it seems that there is a rough edge for slot<br class="gmail_msg">
implementation snap developers-- namely, it seems local installs of the snap<br class="gmail_msg">
block connections when we have something like this in the base declaration:<br class="gmail_msg">
<br class="gmail_msg">
foo:<br class="gmail_msg">
deny-connection: true<br class="gmail_msg">
deny-auto-connection: true<br class="gmail_msg">
<br class="gmail_msg">
The only way I can see for a slot implementation developer to work within the<br class="gmail_msg">
system as implemented is to a) upload to the store and request a snap<br class="gmail_msg">
declaration and b) upload snaps to edge so as to 'snap refresh --edge ...' to<br class="gmail_msg">
test their changes. Perhaps I am missing something... should --dangerous (or<br class="gmail_msg">
something else) try to do something smart here so Robert can develop the bluez<br class="gmail_msg">
snap locally before uploading to the store? Should we provide a way for the<br class="gmail_msg">
developer to sign a snap declaration for this sort of thing?<br class="gmail_msg">
<br class="gmail_msg">
Thanks!<br class="gmail_msg">
<br class="gmail_msg">
> regards,<br class="gmail_msg">
> Simon<br class="gmail_msg">
><br class="gmail_msg">
> On Thu, Oct 27, 2016 at 6:54 AM, Robert Liu <<a href="mailto:robert.liu@canonical.com" class="gmail_msg" target="_blank">robert.liu@canonical.com</a>><br class="gmail_msg">
> wrote:<br class="gmail_msg">
><br class="gmail_msg">
> ><br class="gmail_msg">
> > Hi list,<br class="gmail_msg">
> ><br class="gmail_msg">
> > I have 2 questions about connecting bluez interface.<br class="gmail_msg">
> > In Interfaces reference [1], it said the bluez is not auto-connected. But<br class="gmail_msg">
> > after I installed the bluez snap, the bluez interface is connected. Do I<br class="gmail_msg">
> > misunderstnad the definition?<br class="gmail_msg">
> ><br class="gmail_msg">
> > root@localhost:/tmp# snap install --edge bluez<br class="gmail_msg">
> > bluez (edge) 5.37-2 from 'canonical' installed<br class="gmail_msg">
> > root@localhost:/tmp# snap interfaces<br class="gmail_msg">
> > Slot Plug<br class="gmail_msg">
> > bluez:service bluez:client<br class="gmail_msg">
> ><br class="gmail_msg">
> ><br class="gmail_msg">
> > The other question is that I cannot connect the interface when using my<br class="gmail_msg">
> > own bluez snap. Should I sign my snap to make this work?<br class="gmail_msg">
> ><br class="gmail_msg">
> > root@localhost:/tmp# snap install --dangerous bluez_5.37-2_amd64.snap<br class="gmail_msg">
> > bluez 5.37-2 installed<br class="gmail_msg">
> > root@localhost:/tmp# snap interfaces<br class="gmail_msg">
> > Slot Plug<br class="gmail_msg">
> > bluez:service -<br class="gmail_msg">
> > [snipped]<br class="gmail_msg">
> > - bluez:client<br class="gmail_msg">
> > root@localhost:/tmp# snap connect bluez:client bluez:service<br class="gmail_msg">
> > error: cannot perform the following tasks:<br class="gmail_msg">
> > - Connect bluez:client to bluez:service (connection denied by slot rule of<br class="gmail_msg">
> > interface "bluez")<br class="gmail_msg">
> ><br class="gmail_msg">
> > [1] <a href="http://snapcraft.io/docs/reference/interfaces" rel="noreferrer" class="gmail_msg" target="_blank">http://snapcraft.io/docs/reference/interfaces</a><br class="gmail_msg">
> ><br class="gmail_msg">
> > BR,<br class="gmail_msg">
> > Robert<br class="gmail_msg">
> ><br class="gmail_msg">
> > --<br class="gmail_msg">
> > Snapcraft mailing list<br class="gmail_msg">
> > <a href="mailto:Snapcraft@lists.snapcraft.io" class="gmail_msg" target="_blank">Snapcraft@lists.snapcraft.io</a><br class="gmail_msg">
> > Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.ubuntu.com/</a><br class="gmail_msg">
> > mailman/listinfo/snapcraft<br class="gmail_msg">
> ><br class="gmail_msg">
> ><br class="gmail_msg">
--<br class="gmail_msg">
Jamie Strandboge | <a href="http://www.canonical.com" rel="noreferrer" class="gmail_msg" target="_blank">http://www.canonical.com</a><br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
Snapcraft mailing list<br class="gmail_msg">
<a href="mailto:Snapcraft@lists.snapcraft.io" class="gmail_msg" target="_blank">Snapcraft@lists.snapcraft.io</a><br class="gmail_msg">
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" class="gmail_msg" target="_blank">https://lists.ubuntu.com/mailman/listinfo/snapcraft</a><br class="gmail_msg">
</blockquote></div></div></div>