leds and gpio access for snaps

Jamie Strandboge jamie at canonical.com
Fri Jan 30 17:45:48 UTC 2015


On 01/30/2015 08:56 AM, Joe Talbott wrote:
> What is the plan for snaps being able to access leds and gpio pins?
> Will this be handled by an apparmor profile?  I am currently trying to
> blink the leds on my BBB and I had to change my app's apparmor profile to
> allow writes to /sys/devices/leds/leds/beaglebone\:green\:usr2/brightness
> as well as change the permissions on it to allow the ubuntu user to write.
> 

Today, you can add accesses to the apparmor profile by using an integration
hook. This is not documented for snappy because it is not easy to use and not
how we want to do this in the future. The 'camlistore' example app in the store
currently uses this[1][2]. If you are going to go this route, after making the
changes to your snap you must run 'sudo aa-clickhook -f' if you use the same
version for your snap. You can also simply rev the version and not worry about
running aa-clickhook.

We've been discussing hardware access and snaps a lot lately and we want top
make it easy for people to add hardware accesses for their installed snaps--
stay tuned on this list for this discussion.

Hope this helps

[1]https://github.com/sergiusens/camlistore.snap/blob/master/meta/package.yaml
[2]https://github.com/sergiusens/camlistore.snap/blob/master/meta/camlistored.apparmor


-- 
Jamie Strandboge                 http://www.ubuntu.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20150130/1faa68b5/attachment.pgp>


More information about the snappy-devel mailing list