[RFC] Improving hardware access for snaps
Jamie Strandboge
jamie at canonical.com
Sat Jan 31 13:52:01 UTC 2015
On 01/30/2015 04:42 PM, Sergio Schvezov wrote:
> On viernes 30 de enero de 2015 19h'31:44 ART, Jamie Strandboge wrote:
>> On 01/30/2015 04:18 PM, Jamie Strandboge wrote:
>>
>> ...
>>
>>> = UX =
>>> Relevant packaging yaml:
>>> name: foo
>>> version: 0.1
>>> ...
>> ...
>>
>> Hmm, one thing that occurred to me is that while we want to give the
> device
>> access to a particular service/cli binary, I don't think users have a way to see
>> what services/cli binaries a snap provides, do they? In other words:
>>
>> $ snappy install foo
>> ...
>> $ snappy add-hw foo.bar /dev/ttyS0
>>
>>
>> How does the user know to specify 'foo.bar'? Does the new snappy cli UX cover
>> this anywhere? If not, we'll can leave the original proposal, but prompt when
>> the user specifies only the package name and when there is more than one
>> service/cli binary to choose from (like in the above yaml example). Eg:
>>
>> $ snappy install foo
>> ...
>>
>> $ snappy add-hw foo /dev/ttyS0 <=== only package name
> specified
>> Add access to '/dev/ttyS0' for which of the following:
>> [1] foo.bar
>> [2] foo.baz
>> [3] all of the above
>>
>>> 1
>> 'foo.bar' is now allowed to access /dev/ttyS0
>
> It should be foo_bar though, foo.bar would be akin to camlistore.sergiusens or
> pastebinit.mvo (full package names).
It's funny because I initially had '_' because it works better with the APP_ID
concept and therefore the security policy. I picked '.' for consistency with the
cli binaries, but forgot that those will use '/' in the future, so I think I
picked the worst one.
Choices:
1. foo.bar
$ snappy add-hw foo.bar /dev/ttyS0
2. foo_bar
$ snappy add-hw foo_bar /dev/ttyS0
3. foo/bar
$ snappy add-hw foo/bar /dev/ttyS0
I think I slightly prefer '3' visually, but would be happy with '2' for the
reasons stated above. I don't like '1' because it is inconsistent with the
future experience and is the most confusing.
--
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/20150131/15bcee48/attachment.pgp>
More information about the snappy-devel
mailing list