<div dir="ltr"><div><div>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!<br><br></div>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?<br></div>Also is there any documentation on how to install snapd on a linux?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 14, 2016 at 9:20 AM, Didier Roche <span dir="ltr"><<a href="mailto:didrocks@ubuntu.com" target="_blank">didrocks@ubuntu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><span class="">
    <div class="m_3091988564963748306moz-cite-prefix">Le 14/11/2016 à 10:04, Boris Rybalkin a
      écrit :<br>
    </div>
    <blockquote type="cite">
      <p dir="ltr">Will it help if I upgrade to 16.10?<br>
      </p>
    </blockquote></span>
    No, it contains the same version:
    <a class="m_3091988564963748306moz-txt-link-freetext" href="https://launchpad.net/ubuntu/+source/snapd" target="_blank">https://launchpad.net/ubuntu/+<wbr>source/snapd</a><br>
    Try the ubuntu core vm is the only easy way for you to progress
    there.<span class=""><br>
    <br>
    <blockquote type="cite">
      <p dir="ltr">
        Also what is really relation between snapd and ubuntu core on
        amd64?</p>
    </blockquote>
    <br></span>
    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)<span class="HOEnZb"><font color="#888888"><br>
    <br>
    Didier</font></span><div><div class="h5"><br>
    <br>
    <blockquote type="cite">
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On 14 Nov 2016 8:01 am, "Didier Roche"
          <<a href="mailto:didrocks@ubuntu.com" target="_blank">didrocks@ubuntu.com</a>>
          wrote:<br type="attribution">
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <div class="m_3091988564963748306m_-2719121276116885253moz-cite-prefix">Le
                12/11/2016 à 17:45, Boris Rybalkin a écrit :<br>
              </div>
              <blockquote type="cite">
                <p dir="ltr">Still struggling with hooks, they are not
                  executed on install.</p>
                <p dir="ltr">snap$ snap run --hook=configure
                  syncloud-platform<br>
                  cannot snap-exec: cannot find hook "configure" in
                  "syncloud-platform"<br>
                  and even 'snap run --hook=configure mysnap' silently
                  returns.</p>
                <p dir="ltr">I am using:<br>
                  Ubuntu 16.04<br>
                  snapd 2.16ubuntu3</p>
                <p dir="ltr">Does it have hook support?</p>
              </blockquote>
              <br>
              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.<br>
              <br>
              <blockquote type="cite">
                <p dir="ltr">According to this test they should even
                  fail install if broken: <br>
                  <a href="https://github.com/snapcore/snapd/blob/203591b28670ef5c4106c8fc43051500bd6c3fda/tests/main/snap-set/task.yaml" target="_blank">https://github.com/snapcore/sn<wbr>apd/blob/203591b28670ef5c4106c<wbr>8fc43051500bd6c3fda/tests/<wbr>main/snap-set/task.yaml</a></p>
                <p dir="ltr">As suggested I am copying meta/hooks to
                  prime dir after running snapcraft prime  and then
                  running snapcraft snap.</p>
                <p dir="ltr">This bug says it is probably not yet
                  available in edge, how do I switch channel?</p>
                <p dir="ltr"><a href="https://bugs.launchpad.net/snappy/+bug/1636931" target="_blank">https://bugs.launchpad.net/sna<wbr>ppy/+bug/1636931</a></p>
              </blockquote>
              <br>
              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).<br>
              Cheers,<br>
              Didier<br>
              <br>
              <blockquote type="cite">
                <p dir="ltr">Thank you.</p>
                <div class="gmail_extra"><br>
                  <div class="gmail_quote">On 9 Nov 2016 09:21, "Didier
                    Roche" <<a href="mailto:didrocks@ubuntu.com" target="_blank">didrocks@ubuntu.com</a>>
                    wrote:<br type="attribution">
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div bgcolor="#FFFFFF" text="#000000">
                        <div class="m_3091988564963748306m_-2719121276116885253m_8701655348413158309moz-cite-prefix">Le
                          09/11/2016 à 10:15, Boris Rybalkin a écrit :<br>
                        </div>
                        <blockquote type="cite">
                          <p dir="ltr">One more question, should I
                            expect a hook to run inside my snap package
                            and use relative shebang like this?</p>
                        </blockquote>
                        <blockquote type="cite">
                          <p dir="ltr">#!python/bin/python</p>
                          <p dir="ltr">Assuming I am packaging python
                            with my snap.</p>
                        </blockquote>
                        hooks are run using the same context than any
                        "commands:" in your snap.<br>
                        <br>
                        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.<br>
                        <br>
                        If you beat me to it, do not hesitate to report
                        your results here!<br>
                        <br>
                        <blockquote type="cite">
                          <p dir="ltr">Thank you very much for your
                            replies!</p>
                        </blockquote>
                        <br>
                        My pleasure :)<br>
                        <br>
                        <br>
                        <blockquote type="cite">
                          <div class="gmail_extra"><br>
                            <div class="gmail_quote">On 9 Nov 2016
                              08:58, "Didier Roche" <<a href="mailto:didrocks@ubuntu.com" target="_blank">didrocks@ubuntu.com</a>>
                              wrote:<br type="attribution">
                              <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                <div bgcolor="#FFFFFF" text="#000000">
                                  <div class="m_3091988564963748306m_-2719121276116885253m_8701655348413158309m_8215880607017612253moz-cite-prefix">Le
                                    09/11/2016 à 09:39, Boris Rybalkin a
                                    écrit :<br>
                                  </div>
                                  <blockquote type="cite">
                                    <p dir="ltr">Sorry, I did not get
                                      that.</p>
                                    <p dir="ltr">I am using snapcraft,
                                      are you saying that just creating
                                      hooks/configure is not enaugh?</p>
                                  </blockquote>
                                  It should be enough if you ensure it's
                                  in your final snap in
                                  meta/hooks/configure. (Look at your
                                  prime/ directory).<br>
                                  Enwei was talking about more advanced
                                  snapcraft integration, where you point
                                  to a file which is then copied for you
                                  in meta/hooks.<br>
                                  <br>
                                  <blockquote type="cite">
                                    <p dir="ltr">Looks like my hook is
                                      not executed:<br>
                                      <a href="https://github.com/syncloud/platform/tree/master/snap" target="_blank">https://github.com/syncloud/pl<wbr>atform/tree/master/snap</a></p>
                                    <p dir="ltr">Is it possible to debug
                                      the execution of snap install?</p>
                                    <p dir="ltr">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.</p>
                                    <div class="gmail_extra"><br>
                                    </div>
                                  </blockquote>
                                  Yeah, hooks are hard to debug, I filed
                                  <b style="font-weight:normal" id="m_3091988564963748306m_-2719121276116885253m_8701655348413158309m_8215880607017612253docs-internal-guid-64dccfd7-484b-ceda-a91e-d2b3b4567373"><a class="m_3091988564963748306m_-2719121276116885253m_8701655348413158309m_8215880607017612253moz-txt-link-freetext" href="https://bugs.launchpad.net/snappy/+bug/1640114" target="_blank">https://bugs.launchpad.net/sna<wbr>ppy/+bug/1640114</a>
                                    yesterday about this.<br>
                                    <br>
                                    Didier<br>
                                  </b><br>
                                </div>
                                <br>
                                --<br>
                                Snapcraft mailing list<br>
                                <a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcraft.io</a><br>
                                Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/snapcraft</a><br>
                                <br>
                              </blockquote>
                            </div>
                          </div>
                          <br>
                          <fieldset class="m_3091988564963748306m_-2719121276116885253m_8701655348413158309mimeAttachmentHeader"></fieldset>
                          <br>
                        </blockquote>
                        <p><br>
                        </p>
                      </div>
                      <br>
                      --<br>
                      Snapcraft mailing list<br>
                      <a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcraft.io</a><br>
                      Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/snapcraft</a><br>
                      <br>
                    </blockquote>
                  </div>
                </div>
                <br>
                <fieldset class="m_3091988564963748306m_-2719121276116885253mimeAttachmentHeader"></fieldset>
                <br>
              </blockquote>
              <p><br>
              </p>
            </div>
            <br>
            --<br>
            Snapcraft mailing list<br>
            <a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcraft.io</a><br>
            Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/snapcraft</a><br>
            <br>
          </blockquote>
        </div>
      </div>
      <br>
      <fieldset class="m_3091988564963748306mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <p><br>
    </p>
  </div></div></div>

<br>--<br>
Snapcraft mailing list<br>
<a href="mailto:Snapcraft@lists.snapcraft.io">Snapcraft@lists.snapcraft.io</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/<wbr>mailman/listinfo/snapcraft</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Boris Rybalkin<br><a href="mailto:ribalkin@gmail.com" target="_blank">ribalkin@gmail.com</a></div>
</div>