[07:45] <dholbach> good morning
[10:17] <dholbach> anyone ever saw anything like this: http://paste.ubuntu.com/15204671/?
[10:27] <ogra_> dholbach, yeah, thats snappys way to tell you "cant install snapcraft 1.x snaps"
[10:28] <ogra_> (or rather "cant install non-squashfs snaps" )
[10:28] <dholbach> ho hum
[10:28] <ogra_> sadly the store isnt clever enough to hide them
[10:29] <dholbach> now I get http://paste.ubuntu.com/15204710/
[10:30] <dholbach> JamesTait, ^ do you know about this?
[10:37] <dholbach> ok... I got to install it now
[10:37] <dholbach> for some reason I had to click the "sign package" and the "publish package" button
[10:37] <dholbach> (I uploaded it through 'snapcraft upload')
[10:37] <ogra_> neat !
[10:38] <ogra_> is that scriptable ? or do you need to interact manually ?
[10:38]  * ogra_ hasnt tried the upload feature yet
[10:38] <dholbach> my one-char summary of it is: 😍
[10:39] <ogra_> oh my
[10:43] <JamesTait> dholbach, what ogra_ said for your first pastebin.  Looking into your second.  Sounds like the signing task either failed or hadn't completed when you tried to download.
[11:14] <zyga> good morning (so to speak)
[11:34] <JamesTait> dholbach, it should be fixed now.  One of the units in the pool didn't restart properly.
[11:37] <dholbach> thanks
[11:41] <dholbach> sergiusens, kyrofa: do you think one of you (or somebody else?) can reply to the "Packaging an OSGi Java app in snappy" mail on the mailing list?
[13:01] <sergiusens> dholbach, from today?
[13:01]  * sergiusens is just getting up
[13:06] <dholbach> sergiusens, no... from quite some time ago - I just noticed that nobody replied
[14:01] <dholbach> dpm, you can set SNAPCRAFT_LOCAL_SOURCES when running and it will use your local sources.list
[14:05] <dpm> dholbach, I think I'll have to get back onto using snapcraft, not sure exactly where to start yet. I might have some more questions in the next few days
[14:06] <dholbach> dpm, it should be somewhat similar to http://bazaar.launchpad.net/~dholbach/+junk/moon-buggy/view/head:/snapcraft.yaml
[14:06] <dholbach> popey also used it for packaging cowsay... iirc his snapcraft.yaml looked quite similar
[14:07] <dholbach> just be careful with the 'snap' bit at the end - it's an explicit list of which files to include in the .snap
[14:07] <dholbach> best to drop it in the beginning
[14:07]  * ogra_ recommends to dholbach  to call the binary "play" instead of moon-buggy ... so you end up with moon-buggy.play instead of moon-buggy.moon-buggy
[14:08] <ogra_> feels somehos more user friendly :)
[14:08] <dpm> so the important bit for me to package ubuntu-calculator-app I guess is to set 'stage-packages', right
[14:08] <ogra_> *somehow
[14:08] <dpm> and where do I need to set  SNAPCRAFT_LOCAL_SOURCES ?
[14:09] <dholbach> dpm, as an environment variable
[14:09] <dpm> ok
[14:09] <popey> dpm: http://paste.ubuntu.com/15205853/ http://paste.ubuntu.com/15205855/ <- cowsay yaml and shell script
[14:10] <popey> almost certainly a terrible example of how to make a snap via snapcraft
[14:10] <popey> it was my first :)
[14:10] <dpm> so just set it to SNAPCRAFT_LOCAL_SOURCES=1  or just define it?
[14:10] <dpm> thanks popey, I'm going to have a go at packaging calculator, see where it explodes
[14:10] <popey> heh
[14:11] <popey> you gonna be able to do that with mir etc?
[14:11]  * popey updates his pi to get latest snapcraft
[14:11] <dholbach> ogra_, done
[14:12] <ogra_> heh :)
[14:12]  * dholbach <3 'snapcraft upload' :)
[14:12] <beuno> pindonga that's for you ^
[14:14] <dholbach> beuno, why do I need to publish it manually though? :)
[14:14] <dholbach> https://myapps.developer.ubuntu.com/dev/click-apps/4075/rev/8/
[14:15] <beuno> dholbach, because we're missing the snapcraft publish command
[14:15] <beuno> which is on our plate, please hold  :)
[14:15] <popey> good answer
[14:15] <dholbach> hum
[14:15] <dholbach> didn't the store auto-publish stuff I uploaded as a click?
[14:15] <dholbach> I sort of expected that to happen too
[14:15] <zyga> jdstrand: I see what you did there "gerund-style" :)
[14:16] <ogra_> there was a checkbox for clicks to have that happen ... i dont think i have seen that for snaps
[14:16] <beuno> dholbach, it did, but we now have channels, released and architectures
[14:16] <dholbach> right
[14:16] <beuno> dholbach, we we need a bit more information on each upload to know where to put it
[14:16] <dholbach> I filed a bug so we can have 'snapcraft upload edge' :-)
[14:17] <beuno> great
[14:17] <beuno> we have a sprint next week
[14:17] <beuno> maybe we can knock some of these off
[14:17] <dholbach> something we should advertise as a very useful command to add to any CI :)
[14:17] <beuno> it depends on how good you are at international beer shipping
[14:17] <ogra_> nooo !
[14:17] <ysionneau> zyga: with old snapcraft I was able to generate a .snap by just doing "snapcraft" without argument. Now it seems it does not work. What do I need to type then?
[14:17] <ogra_> stop having sprints !!!
[14:17] <ysionneau> (hello  btw!)
[14:18] <dholbach> ysionneau, that's fixed in the newest snapcraft
[14:18] <ogra_> every time a team has a sprint something serious changes !
[14:18] <ysionneau> ah I'm not up to date indeed
[14:18] <ysionneau> I've got a few commits late
[14:18] <dholbach> ysionneau, https://lists.ubuntu.com/archives/snappy-app-devel/2016-February/000622.html
[14:18] <beuno> ogra_, this particular sprint is heads-down-get-things-landed sprint
[14:18] <dholbach> I just confirmed the fix in xenial :)
[14:18] <ysionneau> very cool :)
[14:18] <ogra_> beuno, phew :)
[14:18] <ysionneau> let me git pull then, thanks!
[14:18] <beuno> so I hope the only change is, more stuff works!
[14:18] <dholbach> go go go! :-)
[14:20] <zyga> ysionneau: snapcraft snap
[14:20] <zyga> ysionneau: try snapcraft --help
[14:21] <dpm> hm, this didn't use my sources.list, resulting in no download: http://paste.ubuntu.com/15205934
[14:21] <dholbach> dpm, I never used the feature, it's just something sergiusens once told me about... maybe he or kyrofa know
[14:23] <sergiusens> dholbach, dpm SNAPCRAFT_LOCAL_SOURCES
[14:23] <sergiusens> don't rely on it though
[14:23] <dpm> yeah, I added it to .bashrc and started a new terminal, didn't seem to work
[14:23] <dpm> I set it to 1 now
[14:23] <dpm> will try that
[14:23] <ysionneau> zyga: --help was giving me this error : UnicodeEncodeError: 'ascii' codec can't encode character '\u201c' in position 364: ordinal not in range(128) :p
[14:23] <ogra_> just prefix teh snapcraft call with it
[14:24] <dpm> good point
[14:24] <ogra_> SNAPCRAFT_LOCAL_SOURCES=1 snapcraft snap
[14:24] <ysionneau> hmm still same error
[14:24] <zyga> ysionneau: oh, that smells like a bug
[14:24] <zyga> sergiusens: ^^
[14:24] <zyga> ysionneau: file a bug with the backtrace
[14:25] <zyga> ysionneau: but for now, perhaps look at the .yaml file and see if you have some non-ascii stuff there
[14:27] <ysionneau> that's the entire stack trace : http://pastebin.com/0rpnsNGt
[14:27] <ysionneau> seems like a docstring issue
[14:33] <sergiusens> ogra_, zyga, dpm ysionneau heh, we implemented this for launchpad only, probably the reason why it fails (and the reason we don't want people to use it)
[14:33] <dpm> ok, calculator app snap created... what's the best way to examine the contents of the generated .snap file?
[14:33] <sergiusens> launchpad creates on sources.list
[14:33] <sergiusens> and that's all we use
[14:33] <sergiusens> if you put the deb line in sources.list it should work
[14:33] <sergiusens> that said, don't rely on this please
[14:34] <zyga> dpm: mount it
[14:34] <dholbach> sergiusens, I think it's nice to be able to test it locally before you try this on LP, which is where we'll send people for something like this right?
[14:35] <dpm> sergiusens, yeah, otherwise there is no way I can run snapcraft manually to build something out of a PPA, right?
[14:35] <dpm> zyga, what's the best way to mount then?
[14:37] <dpm> ok, just mount $SNAP.snap $LOCATION, then
[14:38] <dpm> contents seem to look ok
[14:39] <sergiusens> dpm, unsquashfs -l IIRC
[14:40] <dpm> the simple mount command seemed to work
[14:40] <dpm> trying to install the generated snap now
[14:43] <dpm> installed fine, although I'm not sure how to execute it now to execute it
[14:43] <popey> dholbach: error: no snaps found for "moon-buggy"
[14:43] <popey> :(
[14:43] <dpm> not sure where the binary went
[14:43] <dholbach> popey, moon-buggy.dholbach
[14:44] <popey> snap find should find that
[14:44] <popey> moon-buggy.dholbach failed to install: snappy package not found
[14:44] <dholbach> I don't know what the plan is there
[14:44] <dholbach> hohum
[14:44] <popey> I dont see it
[14:44] <popey> is it amd64 only?
[14:44] <dholbach> ah yes
[14:45] <popey> :(
[14:45] <popey> You suck :)
[14:45] <popey> I can't play moon buggy on my pi!  😃
[14:45] <dpm> dholbach, the last line on http://bazaar.launchpad.net/~dholbach/+junk/moon-buggy/view/head:/snapcraft.yaml - why was it needed? was the binary not installed during the snap installation?
[14:45] <ogra_> and i cant play it on my dragonboard !
[14:45]  * popey builds
[14:46] <dholbach> dpm, snap: [..]  limits the list of installed files to just the ones explicitly listed
[14:46] <ogra_> sadly you cant build it and give it to dholbach with the new snapcraft
[14:46] <popey> no, but I can upload it
[14:46] <ogra_> (since it wil become moon-buggy.popey)
[14:46] <ogra_> indeed
[14:47] <dholbach> dpm, so you don't install lots of useless files and have huge packages - for the beginning try without it :)
[14:47] <ogra_> would be cooler if i could quickly build a binary for dholbach so we dont need different namespaces .... thats quite a drawback of our design
[14:47] <dpm> dholbach, ah, I see yours was just a binary. Yeah, I hadn't used it. So the generated ubuntu-calculator-app was installed, but I'm not sure where :)
[14:47] <ogra_> (given he doesnt have arm64 HW)
[14:48] <dholbach> dpm, if you mounted it, can't you just run a find in that directory?
[14:48] <dholbach> brb
[14:49] <dpm> ah, it's in /snaps
[14:50] <ogra_> schnaps !
[14:50] <dpm> ah, bummer
[14:50] <dpm> "qmlscene: could not find a Qt installation of 'qt5'"
[14:50] <dholbach> add qt-default (or whatever it is) to stage-packages?
[14:50] <ogra_> stage-packages is your friend
[14:51] <dholbach> qt5-default
[14:51]  * dpm tries
[14:51] <dholbach> you might have to add a few other things to make it happy
[14:51] <dpm> thanks!
[14:51] <jdstrand> sergiusens: hi!
[14:51] <dholbach> brb
[14:52] <jdstrand> sergiusens: so, trying out the new snapcraft-- lxd seems a rather big dependency-- shouldn't this be a recommends or depends?
[14:52] <jdstrand> sergiusens: meh, recommends or suggests?
[14:53] <sergiusens> jdstrand, hm, it ended up as a dependency?
[14:53] <jdstrand> sergiusens: I've had trouble having lxc and libvirt installed on the same machine for example due to how they've interacted with each other's networking
[14:53] <sergiusens> jdstrand, darn
[14:54] <sergiusens> jdstrand, it should not be a dep
[14:54] <jdstrand> -Depends: python3-apt,
[14:54] <jdstrand> +Depends: lxd,
[14:54] <jdstrand> +         python3-apt,
[14:54] <jdstrand> that is 2.3 ^
[14:54] <sergiusens> jdstrand, I added code in snapcraft to check if lxd was installed
[14:54]  * sergiusens prepares 2.3.2
[14:54] <sergiusens> jdstrand, I'll remove the dep
[14:54] <jdstrand> adding it as a dep in the autopkgtests is of course fine
[14:54] <jdstrand> sergiusens: thanks! :)
[14:55] <dpm> it seems if I add staged packages to snapcraft.yaml and then I try to run snapcraft snap, it skips the staging step?
[14:55] <popey> oooh. "Can not create a new package with name moon-buggy, multiple origins for moon-buggy are not allowed." when I snapcraft upload :(
[14:55] <sergiusens> not having lxd and calling cleanbuild will error out nicely with followup instructions
[14:55] <dpm> is there a way to run with a clean environment, or do I just delete the contents of the directory?
[14:55] <sergiusens> popey, hah, dholbach won you on that name; the logic in itself I will defer to beuno
[14:56] <jdstrand> sergiusens: might I suggest using Suggests then since Recommends will be installed automatically?
[14:56] <sergiusens> dpm, snapcraft clean
[14:56] <popey> but surely it would let me do moon-buggy.popey ?
[14:56] <dpm> thanks sergiusens
[14:56] <sergiusens> jdstrand, oh, I was just going to remove it completely, but suggests works fine
[14:56] <jdstrand> I guess it could be dropped altogether... I'll let you decide. I'm totally fine with suggests
[14:56] <jdstrand> or dropping
[14:56] <beuno> popey, package names work differently in snappy
[14:57] <sergiusens> popey, that's why I say I defer to beuno
[14:57] <beuno> we won't support developer namespaces for a little bit
[14:57] <beuno> we will, but not for 16.04
[14:57] <beuno> sorry
[14:57] <popey> ah, so just uploading manually will work?
[14:57] <popey> (not via snapcraft upload)
[14:58] <beuno> it won't
[14:58] <beuno> anymore
[14:58] <beuno> dholbach owns "moon-buggy" for now
[14:58] <popey> *blink*
[14:59] <jdstrand> beuno: by 'not for 16.04', do you mean 'never for 16.04' or 'not by 16.04 release'?
[14:59] <beuno> jdstrand, the latter
[14:59]  * jdstrand nods
[15:00] <beuno> I'll start saying "not by April 21st" I think  :)
[15:00] <jdstrand> cause I squatted a couple things myself
[15:00] <jdstrand> and depending on that answer, I would do different things
[15:00] <beuno> jdstrand, put them up for sale on ebay?
[15:01] <jdstrand> I should! :)
[15:01] <popey> yeah, you're buggered if you want to make the next hello-world!
[15:01] <beuno> I'm not saying that's my retirement plan, but...
[15:01] <popey> (I hope our tutorials don't tell people to do that) :)
[15:01] <beuno> yes
[15:01] <ogra_> wow, thats pretty gross
[15:01] <beuno> it's not great, yeah
[15:01] <ogra_> cant we bump such a feature to higher prio ?
[15:01] <beuno> we can't, no
[15:01] <ogra_> :(
[15:02] <dpm> ok, seems adding 'qt5-default' to staged-packages does not pull qt
[15:02] <beuno> we spent a lot of time trying to, but it's not an isolated feature
[15:02] <beuno> it's built on other things we're building first
[15:03] <popey> dpm: that doesn't actually contain it, that just sets the default qt to qt 5
[15:03] <dpm> argh
[15:03] <ogra_> yeah, there must be another metapackage you can pull to get all the deps
[15:04] <dpm> yeah, looking, but not sure which one it is
[15:04]  * ogra_ is curious how big you will end up with the binary :) 
[15:04] <popey> dpm: you should probably pull in ubuntu-ui-toolkit or the full sdk
[15:04] <popey> dpm: because you're gonna need more than just qt5
[15:04] <dpm> indeed
[15:05] <popey> ubuntu-sdk-libs possibly?
[15:05]  * dpm looks for Mirv
[15:05] <popey> (which pulls the world in)
[15:05] <ogra_> "the new 1.5GB ubuntu-calculator snap just landed in the store"
[15:06] <dpm> lol
[15:07] <sergiusens> jdstrand, https://github.com/ubuntu-core/snapcraft/pull/343
[15:07] <sergiusens> in case you want to look as well
[15:12] <jdstrand> sergiusens: awesome, thanks
[15:12] <dpm> the calculator snap is 150 MB, let's see if it works now
[15:13] <ogra_> oh, thats smaller than expected
[15:14] <dpm> hm, somehow I can't see the qt libraries in the .snap
[15:14] <dpm> and no, the snap does not work either
[15:16] <dpm> it seems to download the qt libraries, but I can't see them under stage/lib/x86_64-linux-gnu, neither in the final snap
[15:19] <ogra_> dpm, more likely under stage/usr/lib/x86_64-linux-gnu
[15:19] <ogra_> i dont think qt installs in /lib usually
[15:20] <dpm> ah, yeah, it seems to be all in there
[15:20] <dpm> but qmlscene still can't find qt5
[15:25] <dpm> I'll give up for today. In any case, if someone else wants to give it a go: http://bazaar.launchpad.net/~dpm/+junk/calculator-snap/files
[15:25] <sergiusens> dpm, you need to copy file a config
[15:26] <sergiusens> you might be 5 minutes away from a working snap though ;-)
[15:26] <ogra_> sergiusens, had yoda-coffee for breakfast ?
[15:26] <dpm> sergiusens, not sure I understand
[15:26] <dpm> lol
[15:26] <sergiusens> dpm, create a config file and drop it in etc/xdg/qtchooser like in https://github.com/ubuntu-core/snapcraft/blob/master/snapcraft/plugins/qml.py#L68
[15:27] <sergiusens> dpm, also set the envvars as in that env function
[15:27] <sergiusens> except for the mir setup
[15:31] <dpm> sergiusens, other than creating the conf file itself, is this something that I can do on snapcraft.yaml file (install file, set envvars)?
[15:31] <dpm> on *the snapcraft.yaml file
[15:31]  * dpm looks at docs
[15:33] <jdstrand> dpm: you might need to set QML2_IMPORT_PATH
[15:34] <jdstrand> dpm: note that it is searched backwards
[15:36] <dpm> jdstrand, ok, looking at the env vars now
[15:37] <dpm> not sure what the 'root' should be in https://github.com/ubuntu-core/snapcraft/blob/master/snapcraft/plugins/qml.py#L79 though
[15:39] <jdstrand> dpm: looking at what we are doing for click, it seems like 'QML2_IMPORT_PATH={}/usr/lib/{}/qt5/qml'.format(root, arch) should be 'QML2_IMPORT_PATH={}/usr/lib/{}'.format(root, arch)
[15:39] <jdstrand> dpm: I am no expert in this area though
[15:39] <jdstrand> well
[15:39] <jdstrand> actually
[15:40] <sergiusens> dpm, root should be $SNAP
[15:40] <dpm> ah, is root /snaps?
[15:40] <sergiusens> no $SNAP
[15:40] <ogra_> schnaps !
[15:41] <dpm> :-)
[15:41]  * sergiusens missed a comma
[15:41] <sergiusens> no, $SNAP
[15:41] <dpm> so in my case 'ubuntu-calculator.sideload'?
[15:41] <ogra_> dpm, no, just the var
[15:41] <dpm> ah, I see
[15:41] <dpm> thanks
[15:41] <sergiusens> hah, so create two files, one with the conf and another which would be a shell wrapper
[15:41] <ogra_> that will expand to the actual path at runtime
[15:41] <sergiusens> in the wrapper export your needed vars
[15:42] <dpm> ok
[15:42] <jdstrand> dpm: ok, so I'm not sure if it is right or wrong. I suspect it is right for stage packages but that an additional path should be appended for non-staged qml modules that you ship
[15:42] <sergiusens> dpm, in some sense like this https://github.com/ubuntu-core/snapcraft/blob/master/examples/tomcat-maven-webapp/wrapper
[15:43]  * dpm gives it a go
[15:43] <sergiusens> I suffered a lot getting gallery to work in the click world, there are so many Qt vars and at that time they changed the var to export too.... ah memories I am glad I forgot about
[15:44] <jdstrand> heh
[15:44] <dpm> that's the man who told me "you're 5 minutes away from a working snap"
[15:44] <dpm> you teaser :P
[15:45] <beuno> I think that's always true, you are 5 minutes away
[15:45] <ogra_> 5 "jupiter" minutes :)
[15:52] <sergiusens> dpm, I had more faith in you ;-)
[15:52]  * sergiusens does a friday troll :-D
[15:52] <dpm> sergiusens, you're really into this yoda role this morning, aren't you? :)
[15:59] <dpm> sergiusens, jdstrand, so something like this for the wrapper? http://paste.ubuntu.com/15206673
[16:00] <ogra_> dpm, and an exec line at the end (like popey showed you earlier)
[16:01] <ogra_> i'm also not sure dpkg-architecture is still there ... you might need to use uname
[16:01] <dpm> ogra_, ok. And which exec line you were saying?
[16:02] <dpm> I can't recall popey showing me this
[16:02] <ogra_> there was a pastebin above
[16:02] <ogra_> ( i miss some backlog here on this machine)
[16:03] <dpm> https://github.com/ubuntu-core/snapcraft/blob/master/examples/tomcat-maven-webapp/wrapper
[16:03] <dpm> that's the only thing I remember being pasted ^
[16:03] <ogra_> here is one of my snaps http://bazaar.launchpad.net/~ogra/+junk/ircproxy/view/head:/run-bip (though thats a service ... )
[16:04] <jdstrand> dpkg-architecture is definitely not there
[16:04] <ogra_> yeah, thought so
[16:04] <ogra_> i think 15.04 still had it
[16:04] <ogra_> as a leftover
[16:04] <jdstrand> you do have SNAP_ARCH, but it has 'amd64', not x86_64-linux-gnu
[16:05] <jdstrand> so there is perhaps a bug in snappy to export SNAP_GNU_TRIPLET (or whatever it should be named)
[16:05] <jdstrand> dpm: fyi, if you install hello-world, then you can do: $ hello-world.env |grep SNAP
[16:06] <jdstrand> oh, I just noticed a typo
[16:06] <jdstrand> SNAPP_APP_TMPDIR
[16:06]  * jdstrand files a bug
[16:06] <sergiusens> TMPDIR is not needed anymore iirc
[16:07] <dpm> yeah, just installed it, only amd64, so hardcoding for now?
[16:07] <ogra_> why do we expose that anyway ? isnt it the same as $TMPDIR nowadays ?
[16:07] <sergiusens> jdstrand, that's there for legacy; but given everything is so aggressive I'm not sure why this is still there :-P
[16:07] <sergiusens> ogra_, so things didn't break on day one; but things have been breaking since, so it makes little sense to have this at all ;-)
[16:07] <jdstrand> I think TMPDIR should be explicitly set to /tmp
[16:08] <ogra_> sergiusens, yeah
[16:08] <jdstrand> this actually seems to be a bug in the hello-world snap
[16:08] <sergiusens> jdstrand, I thought hello-world just ran 'env'
[16:08] <jdstrand> well, no
[16:09]  * jdstrand keeps looking
[16:09] <sergiusens> it's the snappy install logic most likely
[16:09] <jdstrand> ok, ubuntu-core-launcher is setting it itself
[16:10] <jdstrand> sergiusens: that's what I thought, but nothing in /snaps/bin had SNAPP_...
[16:10] <sergiusens> oh, tmpdir is special since it is in a new namespace as well
[16:10] <jdstrand> but line 254 of main.c of ubuntu-core-launcher definitely is doing it
[16:12] <dpm> ogra_, sergiusens, jdstrand, better? http://paste.ubuntu.com/15206764
[16:12] <dpm> Also, another question, so my snap already installs a "command-ubuntu-calculator-app.wrapper" by default. How do I make it ship this new wrapper instead?
[16:13] <sergiusens> dpm, if it is the wrapper you don't control, you can't
[16:13] <sergiusens> snappy install will wrap it up once more
[16:14] <dpm> ok, so what do I do with "my" wrapper, simply point to it in the yaml file?
[16:14] <sergiusens> dpm, with the copy plugin
[16:14] <jdstrand> dpm: I bet you want:
[16:14] <jdstrand> export QML2_IMPORT_PATH=$SNAP/usr/lib/$ARCH/qt5/qml
[16:15] <jdstrand> export QML2_IMPORT_PATH=$SNAP/usr/lib/$ARCH:$QML2_IMPORT_PATH
[16:15] <dpm> jdstrand, ah, I changed it from your previous comment, I hadn't understood correctly
[16:15] <jdstrand> dpm: well, I refined my comment
[16:15] <jdstrand> dpm: actually, change that to be:
[16:16] <jdstrand> export QML2_IMPORT_PATH=$SNAP/usr/lib/$ARCH/qt5/qml
[16:16] <sergiusens> dpm, like done for mqtt-client here https://github.com/ubuntu-core/snapcraft/blob/master/examples/mosquitto/snapcraft.yaml
[16:16] <sergiusens> but with your shell wrapper
[16:16] <jdstrand> export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$SNAP/usr/lib/$ARCH
[16:17] <jdstrand> dpm: ie, set QMP2_IMPORT_PATH to what is already there, then append your app-specific modules. this should make it so your app-specific modules are used first (since it is searched backwards)
[16:17] <sergiusens> jdstrand, https://launchpad.net/ubuntu/+source/snapcraft/2.3.2 now we wait again ;-)
[16:17] <sergiusens> QML!
[16:18] <jdstrand> yes, not QMPP2 :)
[16:18] <jdstrand> QMP2*
[16:18] <jdstrand> meh
[16:18] <sergiusens> searching backwards when everything else searches forwards is super ackward
[16:18] <jdstrand> is it friday yet?
[16:18] <jdstrand> oh, so it is :)
[16:18] <sergiusens> friday is almost over in some places ;-)
[16:19] <jdstrand> sergiusens: re backwards> I know, right?
[16:19] <ysionneau> work day almost over here : 17:20 :'
[16:19] <jdstrand> nice! :)
[16:19] <sergiusens> ysionneau, nice that your work day can end at a specific point in time too ;-)
[16:20] <dpm> sergiusens, jdstrand, looks good? http://bazaar.launchpad.net/~dpm/+junk/calculator-snap/files
[16:20]  * jdstrand installs snapcraft 2.3.2 via debs
[16:21] <ysionneau> sergiusens: your work day never ends ? :p
[16:22] <sergiusens> dpm, don't use .wrapper after the : in the copy plugin
[16:22] <jdstrand> dpm: sorry, to mimic click, change this:
[16:22] <jdstrand> export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$SNAP/usr/lib/$ARCH
[16:22] <jdstrand> to
[16:22] <jdstrand> export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$SNAP/lib/$ARCH
[16:22] <sergiusens> dpm, so; line 15 -> ubuntu-calculator-app.wrapper: bin/ubuntu-calculator-app
[16:23] <sergiusens> and line 10 -> command: ubuntu-calculator-app
[16:23] <sergiusens> or line 10 -> command: bin/ubuntu-calculator-app
[16:23] <sergiusens> if you don't trust PATH resolution
[16:24] <dpm> ok, just noticed I was missing a 'files:' too, bad syntax
[16:26] <dpm> sergiusens, jdstrand, ok, updated http://bazaar.launchpad.net/~dpm/+junk/calculator-snap/files with your comments, thanks!
[16:27] <ysionneau> sergiusens: were are the examples installed when installing snapcraft-examples ?
[16:27] <ysionneau> omg, it's in your email
[16:28] <ysionneau> sorry
[16:29] <dpm> building the snap now
[16:33] <sergiusens> ysionneau, no worries
[16:35] <dpm> sergiusens, jdstrand, argh, no luck yet:
[16:35] <dpm> dpm@el-far:/snaps/bin$ ./ubuntu-calculator-app.ubuntu-calculator-app
[16:35] <dpm> qmlscene: could not find a Qt installation of 'qt5'
[16:37]  * jdstrand wonders if ubuntu-sdk-libs is enough or if qmlscene needs more...
[16:37] <ogra_> dpm, you cant just run the wrapper
[16:38] <jdstrand> oh right, you have to setup the environment
[16:38] <ogra_> run it without ./
[16:38] <ogra_> then the system wrapper will exxec it
[16:39] <dpm> not sure I quite follow, but:
[16:39] <dpm> dpm@el-far:/snaps/bin$ ubuntu-calculator-app.ubuntu-calculator-app
[16:39] <dpm> qmlscene: could not find a Qt installation of 'qt5'
[16:39] <ogra_> like ubuntu-app-launcher on the phone
[16:39] <sergiusens> dpm, jdstrand you probably need the full list
[16:39] <sergiusens> dpm, except mir, most of what is here: https://github.com/ubuntu-core/snapcraft/blob/master/snapcraft/plugins/qml.py#L30
[16:40] <sergiusens> qtubuntu-desktop
[16:40] <dpm> sergiusens, but I think from Mirv tells me, ubuntu-sdk-libs should pull Qt + the SDK. Ah, so I'm missing that one?
[16:42] <sergiusens> dpm, I think; I'm not sure; show that to Mirv
[16:42] <sergiusens> the error message
[16:43] <dpm> these are all the staged packages, it seems qtubuntu-desktop is not in there
[16:43] <dpm> http://paste.ubuntu.com/15207150/
[16:43] <sergiusens> the click code has a bunch of libs added to its chroot creation logic too; so I don't think it is that straight forward
[16:44] <sergiusens> dpm, that provides the QPA plugin so most likely needed
[16:50] <dpm> sergiusens, except from qtubutnu-desktop, all the packages from the qml plugin and more are pulled, so I think I should be ok if I just add it for now. Question, though, how do the wrappers work? I'm a bit lost in the wrapper chain, and if I'm doing the right thing when trying to execute the snap from /snaps/bin directly
[16:59] <sergiusens> dpm, no, don't do it directly; it is package-name.app-name
[16:59] <sergiusens> or else nothing will work
[17:00] <dpm> yeah, that's how I've been executing it after ogra told me to drop the ./ but I've no idea what's happening behing the scenes and if the wrapper with the env variables is being called at all
[17:03] <ogra_> dpm, running package-name.app-name -> exec ubuntu-core-launcher -> execs the snapcraft wrapper -> execs your wrapper script
[17:03] <ogra_> each of the wrappers adds bits to the env
[17:04] <dpm> ah, cool, that makes it clearer, thanks
[17:04] <ogra_> (ubuntu-core-launcher actually sets the SNAP_DIR and stuff)
[17:04] <ogra_> snpppy should have been called wrappy actually ;)
[17:05] <ogra_> *snappy
[17:24] <ysionneau> can someone explain what is the "uses" keyword in snap.yaml?
[17:53] <dpm> hm, any ideas how this could have happened?
[17:53] <dpm> $ sudo snappy remove ubuntu-calculator-app
[17:53] <dpm> Removing ubuntu-calculator-app
[17:53] <dpm> remove /snaps/ubuntu-calculator-app.sideload/INUMLeWbJcQO/bin/ip: read-only file system
[17:53] <dpm> I've removed the app a few times already between tries, but this time around it can't be removed
[18:18] <kyrofa> dpm I'm hitting that as well. You must be on rolling
[18:19] <dpm> kyrofa, weird thing is, it just affects that particular installation of the app. I can install new versions and remove them
[18:19] <dpm> have you found any workarounds?
[18:24] <dpm> actually, I can't
[18:24] <dpm> garbage collection impossible: prerequisites untrue: remove /snaps/ubuntu-calculator-app.sideload/INUMLeWbJcQO/bin/ip: read-only file system
[18:27] <kyrofa> dpm no, though it only seems to happen to me when the installation fails
[18:27] <dpm> yeah, not sure what to do, I can neither remove nor install the app now
[18:29] <qengho> Is there a good command to use to build a snap package within a snappy environment, to make sure I have dependencies right?
[18:56]  * zyga ends the day
[18:57] <zyga> next week: focus on getting working interfaces in master
[18:57] <zyga> have nice weekend everyone
[18:58] <dpm> sergiusens, jdstrand, I think I'm nearly there with the calculator snap. I think I've figured out why qmlscene wasn't finding Qt, but in this I've uncovered a new issue. So:
[18:59] <dpm> ubuntu-calculator-app.ubuntu-calculator-app -> exec ubuntu-core-launcher -> execs the snapcraft wrapper -> execs my wrapper
[18:59] <dpm> The problem is, the snapcraft wrapper calls 'ubuntu-calculator-app', which also turns out to be the name of the launcher script for the app.
[18:59] <dpm> If I understand it correctly, as the launcher script is in $SNAP/usr/bin, it takes precedence over my wrapper with the same name in $SNAP/bin
[18:59] <dpm> So my wrapper is never called and no env variables are set
[19:01] <jdstrand> dpm: I think you need to have a different name for your wrapper and for the calculator. then your wrapper calls the calculator and you tell snapcraft to install your wrapper as the command
[19:01] <jdstrand> that way you'll get snapcraft wrapping your wrapper, which wraps your command
[19:02] <jdstrand> that will work. sergiusens might have another suggestion
[19:02] <dpm> jdstrand, yeah, but I'm not sure how to best change the name and what controls what the snappy wrapper calls
[19:02] <dpm> is it the 'command' field under "apps:"?
[19:02] <jdstrand> dpm: can you provie the link to the snapcraft.yaml?
[19:03] <dpm> jdstrand, http://bazaar.launchpad.net/~dpm/+junk/calculator-snap/files
[19:03] <jdstrand> dpm: ok, so down in 'files', you have:
[19:03] <jdstrand> ubuntu-calculator-app.wrapper: bin/ubuntu-calculator-app
[19:04] <jdstrand> change that to: ubuntu-calculator-app.wrapper: bin/ubuntu-calculator-app.wrapper
[19:04] <jdstrand> dpm: then up above, do:
[19:04] <jdstrand> apps:
[19:04] <jdstrand>   ubuntu-calculator-app:
[19:04] <jdstrand>     command: ubuntu-calculator-app.wrapper
[19:04] <jdstrand> I think that will do what you want
[19:04] <dpm> ah, yeah, that was the bit I wasn't sure about
[19:04] <dpm> thanks I'll try that
[19:04] <jdstrand> np
[19:06] <jdstrand> be sure that ubuntu-calculator-app.wrapper can find your real command of course)
[19:20] <dpm> hm, that didn't seem to work
[19:20] <dpm> Stripping ubuntu-calculator-app
[19:20] <dpm> Command '['/bin/sh', '/tmp/tmp2iyqiobh', '/bin/sh',
[19:20] <dpm> '/tmp/tmpjc9j0l7z']' returned non-zero exit status 1
[19:21] <dpm> after running snapcraft snap
[19:21] <dpm> any ideas how to debug that?
[19:24] <popey> dpm: i have seen that
[19:24] <popey> can i see the yaml?
[19:25] <dpm> popey, http://bazaar.launchpad.net/~dpm/+junk/calculator-snap/files
[19:25] <dpm> this seemed to cause it: http://bazaar.launchpad.net/~dpm/+junk/calculator-snap/revision/7
[19:26] <popey> bizarre
[19:30] <dpm> indeed. If I rename it back to ubuntu-calculator-app, it works :/
[19:30] <dpm> but neither ubuntu-calculator-app.wrapper nor ubuntu-calculator-app-wrapper does, I get that weird error
[19:31] <dpm> oh, is the name too long, perhaps?
[19:31] <dpm> we had that issue with the phone launcher, didn't we?
[19:31] <kyrofa> sergiusens, elopio alright I'm here for a decent stretch, I think
[19:32] <dpm> no, it turns out that 'command' can only be 'ubuntu-calculator-app' :/
[19:35] <kyrofa> dpm that's probably due to the command not being found in the snap
[19:36] <beuno> right, your binary namespace is your snap namespace in the system
[19:36] <kyrofa> dpm, that error message could be a bit more helpful, perhaps :)
[19:36] <beuno> you can't have a snap called "calculator" that installs "apache"  :)
[19:36]  * beuno hopes dpm is taking notes about the frustrations and sends a summary to the list
[19:39] <zyga> jdstrand: where should I report DENIED errors on ubuntu 16.04 desktop
[19:40] <dpm> kyrofa, that's a nice way to put that the error message should be meaningful to humans :)
[19:41] <kyrofa> dpm, I'm not even sure I'd say that one is meaningful to computers ;)
[19:41] <dpm> indeed :)
[19:41] <jdstrand> zyga: what is the denial?
[19:41] <zyga> Feb 26 20:32:44 x200t kernel: [31556.508068] audit: type=1400 audit(1456515164.332:46): apparmor="DENIED" operation="open" profile="/usr/lib/*/mediascanner-2.0/mediascanner-extractor" name="/sys/devices/system/node/node0/meminfo" pid=17842 comm="qtdemux0:sink" requested_mask="r" denied_mask="r" fsuid=1000 ouid=0
[19:41] <dpm> beuno, taking notes, but not frustrated yet, I'll succeed! :)
[19:41] <zyga> jdstrand: though I saw other failures eariler (related to dhcp client)
[19:41] <jdstrand> zyga: mediascanner2
[19:42] <zyga> kern.log:Feb 24 19:07:03 x200t kernel: [   15.239795] audit: type=1400 audit(1456337223.467:29): apparmor="DENIED" operation="open" profile="/sbin/dhclient" name="/etc/ssl/openssl.cnf" pid=1112 comm="dhclient" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
[19:42] <jdstrand> zyga: it depends on if the package ships the profile or not. if in doubt, can always file against apparmor and we'll reassign
[19:42] <kyrofa> dpm, does that bzr repo contain the entire snap? Happy to take a look
[19:42] <jdstrand> zyga: the dhclient one is already fixed
[19:42] <zyga> jdstrand: oh, nice, thanks. I'll file the one on mediascanner then
[19:42] <dpm> kyrofa, it does, do read the readme file, though
[19:43] <jdstrand> it looks like 4.3.3-5ubuntu8 didn't make it out of proposed yet
[19:43] <dpm> kyrofa, you'll need to add the PPA to your sources from where the staging packages are being taken
[19:43]  * jdstrand investigates
[19:43] <jdstrand> (that was for isc-dhcp)
[19:43] <zyga> jdstrand: btw, I'd like to look into adding old-security skills next week
[19:44] <dpm> kyrofa, I think the last issue to overcome is the upstream launcher script overriding the wrapper script in the snap
[19:44] <zyga> jdstrand: I'll poke you with some ideas
[19:44] <kyrofa> dpm, alright, grabbing it now
[19:45] <dpm> kyrofa, oh, and importantly, that snap is for unity 7 on the desktop, not for mir. I.e. it runs on X, and it won't pull any mir dependencies or set any mir env variables
[19:45] <kyrofa> dpm, sweet
[19:46] <dpm> bbiab
[19:53] <kyrofa> dpm, pretty sure it's because the wrapper isn't executable
[19:54] <kyrofa> dpm, yep, that was it
[20:00] <kyrofa> Oh my goodness, travis, work with me here. At least wake up, pretend you're alive
[20:01] <kyrofa> dpm https://bugs.launchpad.net/snapcraft/+bug/1550496
[20:05] <dpm> oh wow, nice catch kyrofa!
[20:07] <dpm> hm, still getting the error
[20:08] <kyrofa> dpm, did you clean first?
[20:08] <dpm> kyrofa, no, I didn't, that's what I was going to do next. But is there a way to clean without deleting the staged packages?
[20:09] <sergiusens> dpm, yeah, that's why I told you not to name your wrapper <app-name>.wrapper as we do that internally as well and there is a clash
[20:09] <kyrofa> dpm, for this specific situation, yes, but you have to fool snapcraft. Snapcraft isn't very smart about this type of thing yet (I'm working on that right now, actually)
[20:10] <kyrofa> sergiusens, at least we use command-<app>.wrapper
[20:11] <dpm> sergiusens, no, the clash is somewhere else. Actually renaming it to .wrapper fixes it
[20:11] <dpm> (or anything else)
[20:11] <kyrofa> dpm actually you can replace the old non-executable wrapper with the new one yourself in the parts/ubuntu-calculator-app/install/ directory
[20:11] <kyrofa> dpm, then run snapcraft snap again
[20:11] <kyrofa> dpm, that should work
[20:11] <sergiusens> dpm, right, I gave the exact lines and told you to make sure your script wrapper was +x along the conversation this morning :-P
[20:11] <dpm> giving it a go
[20:13] <dpm> sergiusens, these were two separate issues. With the exact lines, there was a clash with the upstream launcher script, that's why I need to rename it now
[20:20] <sergiusens> dpm, oh, right; your wrapper might have just been called 'wrapper' or whatever; the front facing command is what is in apps: anyways
[20:24] <dpm> argh, now the wrapper is called, but qmlscene cannot find the main qml file, even though the path is correct
[20:24] <dpm> $ ubuntu-calculator-app.ubuntu-calculator-app
[20:24] <dpm>  
[20:24] <dpm> $ ubuntu-calculator-app.ubuntu-calculator-app
[20:24] <dpm>  /snaps/ubuntu-calculator-app.sideload/INUXMfbfaWSb/bin/ubuntu-calculator-app.wrapper: 40: exec: /snaps/ubuntu-calculator-app.sideload/INUXMfbfaWSb/usr/bin/qmlscene /snaps/ubuntu-calculator-app.sideload/INUXMfbfaWSb/usr/share/ubuntu-calculator-app/ubuntu-calculator-app.qml: not found
[20:24] <dpm> I give up for today