configure hook

Boris Rybalkin ribalkin at gmail.com
Mon Nov 14 21:35:19 UTC 2016


Great, on ubuntu core vm hook worked perfectly fine and even was executed
on install with all the issues printed to the output until fixed it!

VM has snapd v2.17, is it possible to install this version on desktop
16.04/16.10 so I can have it for integration tests?
Also is there any documentation on how to install snapd on a linux?

On Mon, Nov 14, 2016 at 9:20 AM, Didier Roche <didrocks at ubuntu.com> wrote:

> Le 14/11/2016 à 10:04, Boris Rybalkin a écrit :
>
> Will it help if I upgrade to 16.10?
>
> No, it contains the same version: https://launchpad.net/ubuntu/+
> source/snapd
> Try the ubuntu core vm is the only easy way for you to progress there.
>
> Also what is really relation between snapd and ubuntu core on amd64?
>
>
> snapd is part of the core snap. snapd from the core snap is running on
> ubuntu core, snapd from the ubuntu package is running on the desktop. (the
> REEXEC plan has been disabled some months ago, due to some issues IIRC)
>
> Didier
>
>
>
> On 14 Nov 2016 8:01 am, "Didier Roche" <didrocks at ubuntu.com> wrote:
>
>> Le 12/11/2016 à 17:45, Boris Rybalkin a écrit :
>>
>> Still struggling with hooks, they are not executed on install.
>>
>> snap$ snap run --hook=configure syncloud-platform
>> cannot snap-exec: cannot find hook "configure" in "syncloud-platform"
>> and even 'snap run --hook=configure mysnap' silently returns.
>>
>> I am using:
>> Ubuntu 16.04
>> snapd 2.16ubuntu3
>>
>> Does it have hook support?
>>
>>
>> It's supposed to have some, but IIRC, Kyle found some issues with it.
>> Definitively, this version doesn't run the hook on install though.
>>
>> According to this test they should even fail install if broken:
>> https://github.com/snapcore/snapd/blob/203591b28670ef5c4106c
>> 8fc43051500bd6c3fda/tests/main/snap-set/task.yaml
>>
>> As suggested I am copying meta/hooks to prime dir after running snapcraft
>> prime  and then running snapcraft snap.
>>
>> This bug says it is probably not yet available in edge, how do I switch
>> channel?
>>
>> https://bugs.launchpad.net/snappy/+bug/1636931
>>
>>
>> As I said in some email above, the easiest path to test it is to use an
>> ubuntu core VM (until a new snapd release is out for Ubuntu 16.04 desktop,
>> CCing Michael to know when the next snapd hits stable + SRU published).
>> Cheers,
>> Didier
>>
>> Thank you.
>>
>> On 9 Nov 2016 09:21, "Didier Roche" <didrocks at ubuntu.com> wrote:
>>
>>> 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" <didrocks at ubuntu.com> 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
>>>> <https://bugs.launchpad.net/snappy/+bug/1640114> yesterday about this.
>>>> Didier *
>>>>
>>>> --
>>>> Snapcraft mailing list
>>>> Snapcraft at lists.snapcraft.io
>>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>>> an/listinfo/snapcraft
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Snapcraft mailing list
>>> Snapcraft at lists.snapcraft.io
>>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>>> an/listinfo/snapcraft
>>>
>>>
>>
>>
>>
>> --
>> Snapcraft mailing list
>> Snapcraft at lists.snapcraft.io
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/snapcraft
>>
>>
>
>
>
> --
> Snapcraft mailing list
> Snapcraft at lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/snapcraft
>
>


-- 
Boris Rybalkin
ribalkin at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20161114/4fa19d67/attachment.html>


More information about the Snapcraft mailing list