Is there any guidance/document about how to write App-provided slots

Enwei Zhang enwei.zhang at canonical.com
Mon Nov 14 13:50:32 UTC 2016


Yes, you are right Simon. I am clear now.
Thanks a lot.

Br
Enwei

On Mon, Nov 14, 2016 at 9:29 PM, Simon Fels <simon.fels at canonical.com>
wrote:

> On 14.11.2016 11:56, Enwei Zhang wrote:
> > Thanks David. Did you forget to add Morphis and Zyga? :)
> > Loop Simon.
> > Simon told me here is the latest bluez snap,
> > https://code.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/bluez
> > <https://code.launchpad.net/%7Esnappy-hwe-team/snappy-hwe-
> snaps/+git/bluez>
> > Simon told me that bluez snap only declares bluez slot in its
> > snapcraft.yaml.
> >
> > IMHO, after the bluez snap declares "bluez" slot in snapcraft.yaml, it
> > will have *bluezPermanentSlotAppArmor* capability defined in
> > https://github.com/snapcore/snapd/blob/master/interfaces/
> builtin/bluez.go#L28
> > <https://github.com/snapcore/snapd/blob/master/interfaces/
> builtin/bluez.go#L28>
> > So it seems to me by defining "bluez" slot, the bluez snap have more
> > power/permissions to do some privileged work,
> > *but* it doesn't *provide* anything to other snaps. From my experiment,
> > if a new snap connects to the bluez slot in bluez snap, the new snap
> > will not get the extra permissions.
>
> The connecting snap (the plug side) will get the bluezConnectedPlug
> snippets from the interface definitions which actually allow the
> application to talk to bluez over dbus. So the bluez snap provides
> something to other services, a dbus service.
>
> If you want to know more in deep things about interfaces and how they
> work have a look at Zygmunds great post about how to write an interface
> at
> http://www.zygoon.pl/2016/08/creating-your-first-snappy-interface.html
> It will tell about all the details and the different snippets you can use.
>
> regards,
> Simon
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20161114/30b9c519/attachment.html>


More information about the Snapcraft mailing list