Re: Help making images to test console-conf changes

2016-11-09 Thread Michael Hudson-Doyle
On 10 November 2016 at 00:50, Oliver Grawert  wrote:

> hi,
> Am Mittwoch, den 09.11.2016, 16:07 +1300 schrieb Michael Hudson-Doyle:
> >
> >
> > I tried to test my packages first by fixing up our build of the core
> > snap (https://launchpad.net/~canonical-foundations/+snap/snappy-first
> > -boot) and then using ubuntu-image (version 0.11+real1 / revision 26
> > from the edge channel) and http://people.canonical.com/~vorlon/offici
> > al-models/dragonboard-model.assertion to make a dragonboard image but
> > it didn't boot. Are there any special steps that need to be taken
> > when making a dragonboard image? I'd love to be able to test this
> > stuff more locally than waiting for your scripts to churn out images
> > ...
>
> do you have any more info ? how does it fail the boot ? what is on the
> serial console ?
>

Sorry, no (my dragonboard doesn't have working serial). The daily images
worked fine though, so I've made 'proper' subiquity and probert releases
and uploaded to zesty and ppa:snappy-dev/image. I've tested in KVM and on
the dragonboard so testing on other boards would be a good idea before we
promote to beta or stable (what is the schedule for that, out of
curiosity?).

Cheers,
mwh
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Snap hangs when accessing a special /dev/file (/dev/vcio) [ubuntu-core 16 / RaspberryPi2]

2016-11-09 Thread Jacques Supcik
Thank you Oliver for your constructive feedback.

I like the idea of a "mailbox-device" and I will open a bug in the
whishlist of snappy.

My snap needs also write access to "/dev/mem":

= AppArmor =
Time: Nov  9 19:09:52
Log: apparmor="ALLOWED" operation="open"
profile="snap.telecom-tower.daemon" name="/dev/mem" pid=3643 comm="tower"
requested_mask="wr" denied_mask="wr" fsuid=0 ouid=0
File: /dev/mem (write)

Should this also be addressed by the "mailbox-device" interface or should I
fill another bug for a "physical-memory" interface? Or do you have an idea
for a better name? Or is there already something available for accessing
/dev/mem?

█  Jacques
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


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

2016-11-09 Thread David Callé
On 09/11/2016 10:47, Enwei Zhang wrote:
> Hello,
> For now, all slots are provided by ubuntu-core. I saw the concept of
> App-provided slots from
> https://github.com/snapcore/snapd/blob/master/interfaces/builtin/basedeclaration.go#L72
> But I didn't find any guidance/document about how to do that.
> Could you please help advise?

I don't think we have a document for this yet, except the general
interfaces overview that only mentions it as a possibility (
http://snapcraft.io/docs/core/interfaces ).

As far as I know, only two snaps are providing their own slots: the core
snap and bluez.
If it can help in the meantime, the source code I've found for the bluez
snap is at:
http://bazaar.launchpad.net/~bluetooth/bluez/snap-core-rolling/files

CCing Morphis and Zyga for more information.

Cheers,
David

> Thanks so much.
>
> Br
> Enwei
>
>

-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


[NEWS] Kdenlive devel snap

2016-11-09 Thread Michael Hall
It's in Portuguese[1], but Google Translate[2] works pretty well.

"This is one of the interesting examples for comments regarding Snap,
with it, we do not need extra repositories to have a program in its
latest version, all without affecting the system base that ensures
stability in an LTS distribution such as Ubuntu 16.04."

[1] http://www.diolinux.com.br/2016/11/editor-de-video-kdenlive-agora-e.html

[2]
https://translate.google.com/translate?hl=en=pt=en=http%3A%2F%2Fwww.diolinux.com.br%2F2016%2F11%2Feditor-de-video-kdenlive-agora-e.html

-- 
Michael Hall
mhall...@ubuntu.com

-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: Help making images to test console-conf changes

2016-11-09 Thread Oliver Grawert
hi,
Am Mittwoch, den 09.11.2016, 16:07 +1300 schrieb Michael Hudson-Doyle:
> 
> 
> I tried to test my packages first by fixing up our build of the core
> snap (https://launchpad.net/~canonical-foundations/+snap/snappy-first
> -boot) and then using ubuntu-image (version 0.11+real1 / revision 26
> from the edge channel) and http://people.canonical.com/~vorlon/offici
> al-models/dragonboard-model.assertion to make a dragonboard image but
> it didn't boot. Are there any special steps that need to be taken
> when making a dragonboard image? I'd love to be able to test this
> stuff more locally than waiting for your scripts to churn out images
> ...

do you have any more info ? how does it fail the boot ? what is on the
serial console ?

ciao
oli

signature.asc
Description: This is a digitally signed message part
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


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

2016-11-09 Thread Enwei Zhang
Hello,
For now, all slots are provided by ubuntu-core. I saw the concept of
App-provided slots from
https://github.com/snapcore/snapd/blob/master/interfaces/builtin/basedeclaration.go#L72
But I didn't find any guidance/document about how to do that.
Could you please help advise?
Thanks so much.

Br
Enwei
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: configure hook

2016-11-09 Thread Didier Roche
Le 09/11/2016 à 10:15, Boris Rybalkin a écrit :
>
> One more question, should I expect a hook to run inside my snap
> package and use relative shebang like this?
>
> #!python/bin/python
>
> Assuming I am packaging python with my snap.
>
hooks are run using the same context than any "commands:" in your snap.

As long as we don't have snapcraft support, I don't think you will have
the override in PYTHONPATH, PYTHONHOME and such (and I don't know if
that's planned), but I'll give it a try later this week or early new one
to have great python hooks examples.

If you beat me to it, do not hesitate to report your results here!

> Thank you very much for your replies!
>

My pleasure :)


>
> On 9 Nov 2016 08:58, "Didier Roche"  > wrote:
>
> Le 09/11/2016 à 09:39, Boris Rybalkin a écrit :
>>
>> Sorry, I did not get that.
>>
>> I am using snapcraft, are you saying that just creating
>> hooks/configure is not enaugh?
>>
> It should be enough if you ensure it's in your final snap in
> meta/hooks/configure. (Look at your prime/ directory).
> Enwei was talking about more advanced snapcraft integration, where
> you point to a file which is then copied for you in meta/hooks.
>
>> Looks like my hook is not executed:
>> https://github.com/syncloud/platform/tree/master/snap
>> 
>>
>> Is it possible to debug the execution of snap install?
>>
>> I would like to see the state of the snap after it failed to
>> start daemons. The only way to see the problem is to run
>> journalctl and guess by startup errors.
>>
>>
> Yeah, hooks are hard to debug, I filed
> *https://bugs.launchpad.net/snappy/+bug/1640114
>  yesterday about this.
>
> Didier
> *
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io 
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/snapcraft
> 
>
>
>

-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: configure hook

2016-11-09 Thread Boris Rybalkin
One more question, should I expect a hook to run inside my snap package and
use relative shebang like this?

#!python/bin/python

Assuming I am packaging python with my snap.

Thank you very much for your replies!

On 9 Nov 2016 08:58, "Didier Roche"  wrote:

> Le 09/11/2016 à 09:39, Boris Rybalkin a écrit :
>
> Sorry, I did not get that.
>
> I am using snapcraft, are you saying that just creating hooks/configure is
> not enaugh?
>
> It should be enough if you ensure it's in your final snap in
> meta/hooks/configure. (Look at your prime/ directory).
> Enwei was talking about more advanced snapcraft integration, where you
> point to a file which is then copied for you in meta/hooks.
>
> Looks like my hook is not executed:
> https://github.com/syncloud/platform/tree/master/snap
>
> Is it possible to debug the execution of snap install?
>
> I would like to see the state of the snap after it failed to start
> daemons. The only way to see the problem is to run journalctl and guess by
> startup errors.
>
> Yeah, hooks are hard to debug, I filed
>
>
> *https://bugs.launchpad.net/snappy/+bug/1640114
>  yesterday about this.
> Didier *
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: configure hook

2016-11-09 Thread Boris Rybalkin
Sorry, I did not get that.

I am using snapcraft, are you saying that just creating hooks/configure is
not enaugh?

Looks like my hook is not executed:
https://github.com/syncloud/platform/tree/master/snap

Is it possible to debug the execution of snap install?

I would like to see the state of the snap after it failed to start daemons.
The only way to see the problem is to run journalctl and guess by startup
errors.

On 9 Nov 2016 07:52, "Enwei Zhang"  wrote:

> Got it, thanks so much.
>
> Br
> Enwei
>
> On Wed, Nov 9, 2016 at 3:38 PM, Didier Roche  wrote:
>
>> Le 09/11/2016 à 07:44, Enwei Zhang a écrit :
>>
>> Hi Didier,
>> Sorry to cut in.
>> Is "hooks" working now in snapcraft?
>> I encountered error:
>> I used below in snapcraft.yaml:
>>
>> hooks: # Top-level YAML attribute, parallel to `apps`
>> upgrade: # Hook name, corresponds to executable name
>> plugs: [network] # Or any other plugs required by this hook
>>
>> enwei@XPS-13-9350:~/work/snap/simple-daemon$ snapcraft
>> Issues while validating snapcraft.yaml: Additional properties are not
>> allowed ('hooks' was unexpected)
>> enwei@XPS-13-9350:~/work/snap/simple-daemon$ snapcraft --version
>> 2.20
>>
>>
>> No, right now, they are only implemented in snapd.
>> You need to place the correct file in the meta/hooks/ folder (if you are
>> using snapcraft, do this in the prime/ directory, before "snapcraft snap
>> prime/").
>>
>> There is an example available at https://github.com/snapcore/sn
>> apd/tree/master/tests/lib/snaps/basic-hooks/meta/hooks.
>>
>> Hope that helps!
>> Didier
>>
>>
>> Thanks.
>>
>> Br
>> Enwei
>>
>>
>>
>> On Tue, Nov 8, 2016 at 6:28 PM, Didier Roche  wrote:
>>
>>> Le 08/11/2016 à 04:52, Kyle Fazzari a écrit :
>>> >
>>> > On Nov 6, 2016 21:51, "Didier Roche" >> > > wrote:
>>> >>
>>> >> Le 06/11/2016 à 00:22, Boris Rybalkin a écrit :
>>> >> >
>>> >> > Hello,
>>> >> >
>>> >>
>>> >> Hey Boris,
>>> >> >
>>> >> > I want to generate my config on snap install using snap location
>>> >> > variables.
>>> >> >
>>> >> > From the docs configure hook is only triggered when 'snap set' is
>>> >> > called. Will configure also be called on install and upgrade?
>>> >> >
>>> >> I didn't try it myself yet, but from what I heard yeah, they will be
>>> run
>>> >> at that time. Kyle can confirm (and if so, we'll update to the
>>> >> documentation to reflect that).
>>> >
>>> > When I wrote it (and the docs) it was only run with `snap set`. I
>>> > believe it's been modified since then to run upon initial install as
>>> > well as upgrade; indeed Gustavo mentioned that it should serve as an
>>> > install and an upgrade hook. The docs weren't updated with this change,
>>> > it seems. That recommendation should also be documented.
>>> >
>>> > Kyle
>>> >
>>>
>>> FYI, opened https://github.com/ubuntudesign/snapcraft.io/issues/216
>>> about it (after confirming manually this new behavior).
>>>
>>> So, to answer on the initial reply: yes, the hooks are ran on install
>>> and upgrade.
>>>
>>> Cheers,
>>> Didier
>>>
>>> --
>>> Snapcraft mailing list
>>> Snapcraft@lists.snapcraft.io
>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>> an/listinfo/snapcraft
>>>
>>
>>
>>
>>
>>
>> --
>> Snapcraft mailing list
>> Snapcraft@lists.snapcraft.io
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/snapcraft
>>
>>
>
> --
> Snapcraft mailing list
> Snapcraft@lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
> an/listinfo/snapcraft
>
>
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft