/srv/irclogs.ubuntu.com/2016/02/26/#snappy.txt

=== chihchun_afk is now known as chihchun
dholbachgood morning07:45
=== chihchun is now known as chihchun_afk
dholbachanyone ever saw anything like this: http://paste.ubuntu.com/15204671/?10:17
ogra_dholbach, yeah, thats snappys way to tell you "cant install snapcraft 1.x snaps"10:27
ogra_(or rather "cant install non-squashfs snaps" )10:28
dholbachho hum10:28
ogra_sadly the store isnt clever enough to hide them10:28
dholbachnow I get http://paste.ubuntu.com/15204710/10:29
dholbachJamesTait, ^ do you know about this?10:30
dholbachok... I got to install it now10:37
dholbachfor some reason I had to click the "sign package" and the "publish package" button10:37
dholbach(I uploaded it through 'snapcraft upload')10:37
ogra_neat !10:37
ogra_is that scriptable ? or do you need to interact manually ?10:38
* ogra_ hasnt tried the upload feature yet10:38
dholbachmy one-char summary of it is: 😍10:38
ogra_oh my10:39
JamesTaitdholbach, 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.10:43
zygagood morning (so to speak)11:14
JamesTaitdholbach, it should be fixed now.  One of the units in the pool didn't restart properly.11:34
dholbachthanks11:37
dholbachsergiusens, 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?11:41
=== tsimonq2alt is now known as tsimonq2
sergiusensdholbach, from today?13:01
* sergiusens is just getting up13:01
dholbachsergiusens, no... from quite some time ago - I just noticed that nobody replied13:06
dholbachdpm, you can set SNAPCRAFT_LOCAL_SOURCES when running and it will use your local sources.list14:01
dpmdholbach, 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 days14:05
dholbachdpm, it should be somewhat similar to http://bazaar.launchpad.net/~dholbach/+junk/moon-buggy/view/head:/snapcraft.yaml14:06
dholbachpopey also used it for packaging cowsay... iirc his snapcraft.yaml looked quite similar14:06
dholbachjust be careful with the 'snap' bit at the end - it's an explicit list of which files to include in the .snap14:07
dholbachbest to drop it in the beginning14: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-buggy14:07
ogra_feels somehos more user friendly :)14:08
dpmso the important bit for me to package ubuntu-calculator-app I guess is to set 'stage-packages', right14:08
ogra_*somehow14:08
dpmand where do I need to set  SNAPCRAFT_LOCAL_SOURCES ?14:08
dholbachdpm, as an environment variable14:09
dpmok14:09
popeydpm: http://paste.ubuntu.com/15205853/ http://paste.ubuntu.com/15205855/ <- cowsay yaml and shell script14:09
popeyalmost certainly a terrible example of how to make a snap via snapcraft14:10
popeyit was my first :)14:10
dpmso just set it to SNAPCRAFT_LOCAL_SOURCES=1  or just define it?14:10
dpmthanks popey, I'm going to have a go at packaging calculator, see where it explodes14:10
popeyheh14:10
popeyyou gonna be able to do that with mir etc?14:11
* popey updates his pi to get latest snapcraft14:11
dholbachogra_, done14:11
ogra_heh :)14:12
* dholbach <3 'snapcraft upload' :)14:12
beunopindonga that's for you ^14:12
dholbachbeuno, why do I need to publish it manually though? :)14:14
dholbachhttps://myapps.developer.ubuntu.com/dev/click-apps/4075/rev/8/14:14
beunodholbach, because we're missing the snapcraft publish command14:15
beunowhich is on our plate, please hold  :)14:15
popeygood answer14:15
dholbachhum14:15
dholbachdidn't the store auto-publish stuff I uploaded as a click?14:15
dholbachI sort of expected that to happen too14:15
zygajdstrand: I see what you did there "gerund-style" :)14:15
ogra_there was a checkbox for clicks to have that happen ... i dont think i have seen that for snaps14:16
beunodholbach, it did, but we now have channels, released and architectures14:16
dholbachright14:16
beunodholbach, we we need a bit more information on each upload to know where to put it14:16
dholbachI filed a bug so we can have 'snapcraft upload edge' :-)14:16
beunogreat14:17
beunowe have a sprint next week14:17
beunomaybe we can knock some of these off14:17
dholbachsomething we should advertise as a very useful command to add to any CI :)14:17
beunoit depends on how good you are at international beer shipping14:17
ogra_nooo !14:17
ysionneauzyga: 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:17
dholbachysionneau, that's fixed in the newest snapcraft14:18
ogra_every time a team has a sprint something serious changes !14:18
ysionneauah I'm not up to date indeed14:18
ysionneauI've got a few commits late14:18
dholbachysionneau, https://lists.ubuntu.com/archives/snappy-app-devel/2016-February/000622.html14:18
beunoogra_, this particular sprint is heads-down-get-things-landed sprint14:18
dholbachI just confirmed the fix in xenial :)14:18
ysionneauvery cool :)14:18
ogra_beuno, phew :)14:18
ysionneaulet me git pull then, thanks!14:18
beunoso I hope the only change is, more stuff works!14:18
dholbachgo go go! :-)14:18
zygaysionneau: snapcraft snap14:20
zygaysionneau: try snapcraft --help14:20
dpmhm, this didn't use my sources.list, resulting in no download: http://paste.ubuntu.com/1520593414:21
dholbachdpm, I never used the feature, it's just something sergiusens once told me about... maybe he or kyrofa know14:21
sergiusensdholbach, dpm SNAPCRAFT_LOCAL_SOURCES14:23
sergiusensdon't rely on it though14:23
dpmyeah, I added it to .bashrc and started a new terminal, didn't seem to work14:23
dpmI set it to 1 now14:23
dpmwill try that14:23
ysionneauzyga: --help was giving me this error : UnicodeEncodeError: 'ascii' codec can't encode character '\u201c' in position 364: ordinal not in range(128) :p14:23
ogra_just prefix teh snapcraft call with it14:23
dpmgood point14:24
ogra_SNAPCRAFT_LOCAL_SOURCES=1 snapcraft snap14:24
ysionneauhmm still same error14:24
zygaysionneau: oh, that smells like a bug14:24
zygasergiusens: ^^14:24
zygaysionneau: file a bug with the backtrace14:24
zygaysionneau: but for now, perhaps look at the .yaml file and see if you have some non-ascii stuff there14:25
ysionneauthat's the entire stack trace : http://pastebin.com/0rpnsNGt14:27
ysionneauseems like a docstring issue14:27
sergiusensogra_, 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
dpmok, calculator app snap created... what's the best way to examine the contents of the generated .snap file?14:33
sergiusenslaunchpad creates on sources.list14:33
sergiusensand that's all we use14:33
sergiusensif you put the deb line in sources.list it should work14:33
sergiusensthat said, don't rely on this please14:33
zygadpm: mount it14:34
dholbachsergiusens, 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:34
dpmsergiusens, yeah, otherwise there is no way I can run snapcraft manually to build something out of a PPA, right?14:35
dpmzyga, what's the best way to mount then?14:35
dpmok, just mount $SNAP.snap $LOCATION, then14:37
dpmcontents seem to look ok14:38
sergiusensdpm, unsquashfs -l IIRC14:39
dpmthe simple mount command seemed to work14:40
dpmtrying to install the generated snap now14:40
dpminstalled fine, although I'm not sure how to execute it now to execute it14:43
popeydholbach: error: no snaps found for "moon-buggy"14:43
popey:(14:43
dpmnot sure where the binary went14:43
dholbachpopey, moon-buggy.dholbach14:43
popeysnap find should find that14:44
popeymoon-buggy.dholbach failed to install: snappy package not found14:44
dholbachI don't know what the plan is there14:44
dholbachhohum14:44
popeyI dont see it14:44
popeyis it amd64 only?14:44
dholbachah yes14:44
popey:(14:45
popeyYou suck :)14:45
popeyI can't play moon buggy on my pi!  😃14:45
dpmdholbach, 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 builds14:45
dholbachdpm, snap: [..]  limits the list of installed files to just the ones explicitly listed14:46
ogra_sadly you cant build it and give it to dholbach with the new snapcraft14:46
popeyno, but I can upload it14:46
ogra_(since it wil become moon-buggy.popey)14:46
ogra_indeed14:46
dholbachdpm, 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 design14:47
dpmdholbach, 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:47
dholbachdpm, if you mounted it, can't you just run a find in that directory?14:48
dholbachbrb14:48
dpmah, it's in /snaps14:49
ogra_schnaps !14:50
dpmah, bummer14:50
dpm"qmlscene: could not find a Qt installation of 'qt5'"14:50
dholbachadd qt-default (or whatever it is) to stage-packages?14:50
ogra_stage-packages is your friend14:50
=== alexabreu is now known as alex-abreu
dholbachqt5-default14:51
* dpm tries14:51
dholbachyou might have to add a few other things to make it happy14:51
dpmthanks!14:51
jdstrandsergiusens: hi!14:51
dholbachbrb14:51
jdstrandsergiusens: so, trying out the new snapcraft-- lxd seems a rather big dependency-- shouldn't this be a recommends or depends?14:52
jdstrandsergiusens: meh, recommends or suggests?14:52
sergiusensjdstrand, hm, it ended up as a dependency?14:53
jdstrandsergiusens: 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 networking14:53
sergiusensjdstrand, darn14:53
sergiusensjdstrand, it should not be a dep14:54
jdstrand-Depends: python3-apt,14:54
jdstrand+Depends: lxd,14:54
jdstrand+         python3-apt,14:54
jdstrandthat is 2.3 ^14:54
sergiusensjdstrand, I added code in snapcraft to check if lxd was installed14:54
* sergiusens prepares 2.3.214:54
sergiusensjdstrand, I'll remove the dep14:54
jdstrandadding it as a dep in the autopkgtests is of course fine14:54
jdstrandsergiusens: thanks! :)14:54
dpmit seems if I add staged packages to snapcraft.yaml and then I try to run snapcraft snap, it skips the staging step?14:55
popeyoooh. "Can not create a new package with name moon-buggy, multiple origins for moon-buggy are not allowed." when I snapcraft upload :(14:55
sergiusensnot having lxd and calling cleanbuild will error out nicely with followup instructions14:55
dpmis there a way to run with a clean environment, or do I just delete the contents of the directory?14:55
sergiusenspopey, hah, dholbach won you on that name; the logic in itself I will defer to beuno14:55
jdstrandsergiusens: might I suggest using Suggests then since Recommends will be installed automatically?14:56
sergiusensdpm, snapcraft clean14:56
popeybut surely it would let me do moon-buggy.popey ?14:56
dpmthanks sergiusens14:56
sergiusensjdstrand, oh, I was just going to remove it completely, but suggests works fine14:56
jdstrandI guess it could be dropped altogether... I'll let you decide. I'm totally fine with suggests14:56
jdstrandor dropping14:56
beunopopey, package names work differently in snappy14:56
sergiusenspopey, that's why I say I defer to beuno14:57
beunowe won't support developer namespaces for a little bit14:57
beunowe will, but not for 16.0414:57
beunosorry14:57
popeyah, so just uploading manually will work?14:57
popey(not via snapcraft upload)14:57
beunoit won't14:58
beunoanymore14:58
beunodholbach owns "moon-buggy" for now14:58
popey*blink*14:58
jdstrandbeuno: by 'not for 16.04', do you mean 'never for 16.04' or 'not by 16.04 release'?14:59
beunojdstrand, the latter14:59
* jdstrand nods14:59
beunoI'll start saying "not by April 21st" I think  :)15:00
jdstrandcause I squatted a couple things myself15:00
jdstrandand depending on that answer, I would do different things15:00
beunojdstrand, put them up for sale on ebay?15:00
jdstrandI should! :)15:01
popeyyeah, you're buggered if you want to make the next hello-world!15:01
beunoI'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
beunoyes15:01
ogra_wow, thats pretty gross15:01
beunoit's not great, yeah15:01
ogra_cant we bump such a feature to higher prio ?15:01
beunowe can't, no15:01
ogra_:(15:01
dpmok, seems adding 'qt5-default' to staged-packages does not pull qt15:02
beunowe spent a lot of time trying to, but it's not an isolated feature15:02
beunoit's built on other things we're building first15:02
popeydpm: that doesn't actually contain it, that just sets the default qt to qt 515:03
dpmargh15:03
ogra_yeah, there must be another metapackage you can pull to get all the deps15:03
dpmyeah, looking, but not sure which one it is15:04
* ogra_ is curious how big you will end up with the binary :) 15:04
popeydpm: you should probably pull in ubuntu-ui-toolkit or the full sdk15:04
popeydpm: because you're gonna need more than just qt515:04
dpmindeed15:04
popeyubuntu-sdk-libs possibly?15:05
* dpm looks for Mirv15:05
popey(which pulls the world in)15:05
ogra_"the new 1.5GB ubuntu-calculator snap just landed in the store"15:05
dpmlol15:06
sergiusensjdstrand, https://github.com/ubuntu-core/snapcraft/pull/34315:07
sergiusensin case you want to look as well15:07
jdstrandsergiusens: awesome, thanks15:12
dpmthe calculator snap is 150 MB, let's see if it works now15:12
ogra_oh, thats smaller than expected15:13
dpmhm, somehow I can't see the qt libraries in the .snap15:14
dpmand no, the snap does not work either15:14
dpmit seems to download the qt libraries, but I can't see them under stage/lib/x86_64-linux-gnu, neither in the final snap15:16
ogra_dpm, more likely under stage/usr/lib/x86_64-linux-gnu15:19
ogra_i dont think qt installs in /lib usually15:19
dpmah, yeah, it seems to be all in there15:20
dpmbut qmlscene still can't find qt515:20
dpmI'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/files15:25
sergiusensdpm, you need to copy file a config15:25
sergiusensyou might be 5 minutes away from a working snap though ;-)15:26
ogra_sergiusens, had yoda-coffee for breakfast ?15:26
dpmsergiusens, not sure I understand15:26
dpmlol15:26
sergiusensdpm, 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#L6815:26
sergiusensdpm, also set the envvars as in that env function15:27
sergiusensexcept for the mir setup15:27
dpmsergiusens, other than creating the conf file itself, is this something that I can do on snapcraft.yaml file (install file, set envvars)?15:31
dpmon *the snapcraft.yaml file15:31
* dpm looks at docs15:31
jdstranddpm: you might need to set QML2_IMPORT_PATH15:33
jdstranddpm: note that it is searched backwards15:34
dpmjdstrand, ok, looking at the env vars now15:36
dpmnot sure what the 'root' should be in https://github.com/ubuntu-core/snapcraft/blob/master/snapcraft/plugins/qml.py#L79 though15:37
jdstranddpm: 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
jdstranddpm: I am no expert in this area though15:39
jdstrandwell15:39
jdstrandactually15:39
sergiusensdpm, root should be $SNAP15:40
dpmah, is root /snaps?15:40
sergiusensno $SNAP15:40
ogra_schnaps !15:40
dpm:-)15:41
* sergiusens missed a comma15:41
sergiusensno, $SNAP15:41
dpmso in my case 'ubuntu-calculator.sideload'?15:41
ogra_dpm, no, just the var15:41
dpmah, I see15:41
dpmthanks15:41
sergiusenshah, so create two files, one with the conf and another which would be a shell wrapper15:41
ogra_that will expand to the actual path at runtime15:41
sergiusensin the wrapper export your needed vars15:41
dpmok15:42
jdstranddpm: 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 ship15:42
sergiusensdpm, in some sense like this https://github.com/ubuntu-core/snapcraft/blob/master/examples/tomcat-maven-webapp/wrapper15:42
* dpm gives it a go15:43
sergiusensI 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 about15:43
jdstrandheh15:44
dpmthat's the man who told me "you're 5 minutes away from a working snap"15:44
dpmyou teaser :P15:44
beunoI think that's always true, you are 5 minutes away15:45
ogra_5 "jupiter" minutes :)15:45
sergiusensdpm, I had more faith in you ;-)15:52
* sergiusens does a friday troll :-D15:52
dpmsergiusens, you're really into this yoda role this morning, aren't you? :)15:52
dpmsergiusens, jdstrand, so something like this for the wrapper? http://paste.ubuntu.com/1520667315:59
ogra_dpm, and an exec line at the end (like popey showed you earlier)16:00
ogra_i'm also not sure dpkg-architecture is still there ... you might need to use uname16:01
dpmogra_, ok. And which exec line you were saying?16:01
dpmI can't recall popey showing me this16:02
ogra_there was a pastebin above16:02
ogra_( i miss some backlog here on this machine)16:02
dpmhttps://github.com/ubuntu-core/snapcraft/blob/master/examples/tomcat-maven-webapp/wrapper16:03
dpmthat'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:03
jdstranddpkg-architecture is definitely not there16:04
ogra_yeah, thought so16:04
ogra_i think 15.04 still had it16:04
ogra_as a leftover16:04
jdstrandyou do have SNAP_ARCH, but it has 'amd64', not x86_64-linux-gnu16:04
jdstrandso there is perhaps a bug in snappy to export SNAP_GNU_TRIPLET (or whatever it should be named)16:05
jdstranddpm: fyi, if you install hello-world, then you can do: $ hello-world.env |grep SNAP16:05
jdstrandoh, I just noticed a typo16:06
jdstrandSNAPP_APP_TMPDIR16:06
* jdstrand files a bug16:06
sergiusensTMPDIR is not needed anymore iirc16:06
dpmyeah, 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
sergiusensjdstrand, that's there for legacy; but given everything is so aggressive I'm not sure why this is still there :-P16:07
sergiusensogra_, 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
jdstrandI think TMPDIR should be explicitly set to /tmp16:07
ogra_sergiusens, yeah16:08
jdstrandthis actually seems to be a bug in the hello-world snap16:08
sergiusensjdstrand, I thought hello-world just ran 'env'16:08
jdstrandwell, no16:08
* jdstrand keeps looking16:09
sergiusensit's the snappy install logic most likely16:09
jdstrandok, ubuntu-core-launcher is setting it itself16:09
jdstrandsergiusens: that's what I thought, but nothing in /snaps/bin had SNAPP_...16:10
sergiusensoh, tmpdir is special since it is in a new namespace as well16:10
jdstrandbut line 254 of main.c of ubuntu-core-launcher definitely is doing it16:10
dpmogra_, sergiusens, jdstrand, better? http://paste.ubuntu.com/1520676416:12
dpmAlso, 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:12
sergiusensdpm, if it is the wrapper you don't control, you can't16:13
sergiusenssnappy install will wrap it up once more16:13
dpmok, so what do I do with "my" wrapper, simply point to it in the yaml file?16:14
sergiusensdpm, with the copy plugin16:14
jdstranddpm: I bet you want:16:14
jdstrandexport QML2_IMPORT_PATH=$SNAP/usr/lib/$ARCH/qt5/qml16:14
jdstrandexport QML2_IMPORT_PATH=$SNAP/usr/lib/$ARCH:$QML2_IMPORT_PATH16:15
dpmjdstrand, ah, I changed it from your previous comment, I hadn't understood correctly16:15
jdstranddpm: well, I refined my comment16:15
jdstranddpm: actually, change that to be:16:15
jdstrandexport QML2_IMPORT_PATH=$SNAP/usr/lib/$ARCH/qt5/qml16:16
sergiusensdpm, like done for mqtt-client here https://github.com/ubuntu-core/snapcraft/blob/master/examples/mosquitto/snapcraft.yaml16:16
sergiusensbut with your shell wrapper16:16
jdstrandexport QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$SNAP/usr/lib/$ARCH16:16
jdstranddpm: 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
sergiusensjdstrand, https://launchpad.net/ubuntu/+source/snapcraft/2.3.2 now we wait again ;-)16:17
sergiusensQML!16:17
jdstrandyes, not QMPP2 :)16:18
jdstrandQMP2*16:18
jdstrandmeh16:18
sergiusenssearching backwards when everything else searches forwards is super ackward16:18
jdstrandis it friday yet?16:18
jdstrandoh, so it is :)16:18
sergiusensfriday is almost over in some places ;-)16:18
jdstrandsergiusens: re backwards> I know, right?16:19
ysionneauwork day almost over here : 17:20 :'16:19
jdstrandnice! :)16:19
sergiusensysionneau, nice that your work day can end at a specific point in time too ;-)16:19
dpmsergiusens, jdstrand, looks good? http://bazaar.launchpad.net/~dpm/+junk/calculator-snap/files16:20
* jdstrand installs snapcraft 2.3.2 via debs16:20
ysionneausergiusens: your work day never ends ? :p16:21
sergiusensdpm, don't use .wrapper after the : in the copy plugin16:22
jdstranddpm: sorry, to mimic click, change this:16:22
jdstrandexport QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$SNAP/usr/lib/$ARCH16:22
jdstrandto16:22
jdstrandexport QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$SNAP/lib/$ARCH16:22
sergiusensdpm, so; line 15 -> ubuntu-calculator-app.wrapper: bin/ubuntu-calculator-app16:22
sergiusensand line 10 -> command: ubuntu-calculator-app16:23
sergiusensor line 10 -> command: bin/ubuntu-calculator-app16:23
sergiusensif you don't trust PATH resolution16:23
dpmok, just noticed I was missing a 'files:' too, bad syntax16:24
dpmsergiusens, jdstrand, ok, updated http://bazaar.launchpad.net/~dpm/+junk/calculator-snap/files with your comments, thanks!16:26
ysionneausergiusens: were are the examples installed when installing snapcraft-examples ?16:27
ysionneauomg, it's in your email16:27
ysionneausorry16:28
dpmbuilding the snap now16:29
sergiusensysionneau, no worries16:33
dpmsergiusens, jdstrand, argh, no luck yet:16:35
dpmdpm@el-far:/snaps/bin$ ./ubuntu-calculator-app.ubuntu-calculator-app16:35
dpmqmlscene: could not find a Qt installation of 'qt5'16:35
* jdstrand wonders if ubuntu-sdk-libs is enough or if qmlscene needs more...16:37
ogra_dpm, you cant just run the wrapper16:37
jdstrandoh right, you have to setup the environment16:38
ogra_run it without ./16:38
ogra_then the system wrapper will exxec it16:38
dpmnot sure I quite follow, but:16:39
dpmdpm@el-far:/snaps/bin$ ubuntu-calculator-app.ubuntu-calculator-app16:39
dpmqmlscene: could not find a Qt installation of 'qt5'16:39
ogra_like ubuntu-app-launcher on the phone16:39
sergiusensdpm, jdstrand you probably need the full list16:39
sergiusensdpm, except mir, most of what is here: https://github.com/ubuntu-core/snapcraft/blob/master/snapcraft/plugins/qml.py#L3016:39
sergiusensqtubuntu-desktop16:40
dpmsergiusens, but I think from Mirv tells me, ubuntu-sdk-libs should pull Qt + the SDK. Ah, so I'm missing that one?16:40
sergiusensdpm, I think; I'm not sure; show that to Mirv16:42
sergiusensthe error message16:42
dpmthese are all the staged packages, it seems qtubuntu-desktop is not in there16:43
dpmhttp://paste.ubuntu.com/15207150/16:43
sergiusensthe click code has a bunch of libs added to its chroot creation logic too; so I don't think it is that straight forward16:43
sergiusensdpm, that provides the QPA plugin so most likely needed16:44
dpmsergiusens, 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 directly16:50
sergiusensdpm, no, don't do it directly; it is package-name.app-name16:59
sergiusensor else nothing will work16:59
dpmyeah, 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 all17:00
ogra_dpm, running package-name.app-name -> exec ubuntu-core-launcher -> execs the snapcraft wrapper -> execs your wrapper script17:03
ogra_each of the wrappers adds bits to the env17:03
dpmah, cool, that makes it clearer, thanks17:04
ogra_(ubuntu-core-launcher actually sets the SNAP_DIR and stuff)17:04
ogra_snpppy should have been called wrappy actually ;)17:04
ogra_*snappy17:05
=== dholbach_ is now known as dholbach
ysionneaucan someone explain what is the "uses" keyword in snap.yaml?17:24
=== tyhicks` is now known as tyhicks
dpmhm, any ideas how this could have happened?17:53
dpm$ sudo snappy remove ubuntu-calculator-app17:53
dpmRemoving ubuntu-calculator-app17:53
dpmremove /snaps/ubuntu-calculator-app.sideload/INUMLeWbJcQO/bin/ip: read-only file system17:53
dpmI've removed the app a few times already between tries, but this time around it can't be removed17:53
kyrofadpm I'm hitting that as well. You must be on rolling18:18
dpmkyrofa, weird thing is, it just affects that particular installation of the app. I can install new versions and remove them18:19
dpmhave you found any workarounds?18:19
dpmactually, I can't18:24
dpmgarbage collection impossible: prerequisites untrue: remove /snaps/ubuntu-calculator-app.sideload/INUMLeWbJcQO/bin/ip: read-only file system18:24
kyrofadpm no, though it only seems to happen to me when the installation fails18:27
dpmyeah, not sure what to do, I can neither remove nor install the app now18:27
qenghoIs there a good command to use to build a snap package within a snappy environment, to make sure I have dependencies right?18:29
* zyga ends the day18:56
zyganext week: focus on getting working interfaces in master18:57
zygahave nice weekend everyone18:57
dpmsergiusens, 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:58
dpmubuntu-calculator-app.ubuntu-calculator-app -> exec ubuntu-core-launcher -> execs the snapcraft wrapper -> execs my wrapper18:59
dpmThe 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
dpmIf 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/bin18:59
dpmSo my wrapper is never called and no env variables are set18:59
jdstranddpm: 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 command19:01
jdstrandthat way you'll get snapcraft wrapping your wrapper, which wraps your command19:01
jdstrandthat will work. sergiusens might have another suggestion19:02
dpmjdstrand, yeah, but I'm not sure how to best change the name and what controls what the snappy wrapper calls19:02
dpmis it the 'command' field under "apps:"?19:02
jdstranddpm: can you provie the link to the snapcraft.yaml?19:02
dpmjdstrand, http://bazaar.launchpad.net/~dpm/+junk/calculator-snap/files19:03
jdstranddpm: ok, so down in 'files', you have:19:03
jdstrandubuntu-calculator-app.wrapper: bin/ubuntu-calculator-app19:03
jdstrandchange that to: ubuntu-calculator-app.wrapper: bin/ubuntu-calculator-app.wrapper19:04
jdstranddpm: then up above, do:19:04
jdstrandapps:19:04
jdstrand  ubuntu-calculator-app:19:04
jdstrand    command: ubuntu-calculator-app.wrapper19:04
jdstrandI think that will do what you want19:04
dpmah, yeah, that was the bit I wasn't sure about19:04
dpmthanks I'll try that19:04
jdstrandnp19:04
jdstrandbe sure that ubuntu-calculator-app.wrapper can find your real command of course)19:06
dpmhm, that didn't seem to work19:20
dpmStripping ubuntu-calculator-app19:20
dpmCommand '['/bin/sh', '/tmp/tmp2iyqiobh', '/bin/sh',19:20
dpm'/tmp/tmpjc9j0l7z']' returned non-zero exit status 119:20
dpmafter running snapcraft snap19:21
dpmany ideas how to debug that?19:21
popeydpm: i have seen that19:24
popeycan i see the yaml?19:24
dpmpopey, http://bazaar.launchpad.net/~dpm/+junk/calculator-snap/files19:25
dpmthis seemed to cause it: http://bazaar.launchpad.net/~dpm/+junk/calculator-snap/revision/719:25
popeybizarre19:26
dpmindeed. If I rename it back to ubuntu-calculator-app, it works :/19:30
dpmbut neither ubuntu-calculator-app.wrapper nor ubuntu-calculator-app-wrapper does, I get that weird error19:30
dpmoh, is the name too long, perhaps?19:31
dpmwe had that issue with the phone launcher, didn't we?19:31
kyrofasergiusens, elopio alright I'm here for a decent stretch, I think19:31
dpmno, it turns out that 'command' can only be 'ubuntu-calculator-app' :/19:32
kyrofadpm that's probably due to the command not being found in the snap19:35
beunoright, your binary namespace is your snap namespace in the system19:36
kyrofadpm, that error message could be a bit more helpful, perhaps :)19:36
beunoyou 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 list19:36
zygajdstrand: where should I report DENIED errors on ubuntu 16.04 desktop19:39
dpmkyrofa, that's a nice way to put that the error message should be meaningful to humans :)19:40
kyrofadpm, I'm not even sure I'd say that one is meaningful to computers ;)19:41
dpmindeed :)19:41
jdstrandzyga: what is the denial?19:41
zygaFeb 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=019:41
dpmbeuno, taking notes, but not frustrated yet, I'll succeed! :)19:41
zygajdstrand: though I saw other failures eariler (related to dhcp client)19:41
jdstrandzyga: mediascanner219:41
zygakern.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=019:42
jdstrandzyga: it depends on if the package ships the profile or not. if in doubt, can always file against apparmor and we'll reassign19:42
kyrofadpm, does that bzr repo contain the entire snap? Happy to take a look19:42
jdstrandzyga: the dhclient one is already fixed19:42
zygajdstrand: oh, nice, thanks. I'll file the one on mediascanner then19:42
dpmkyrofa, it does, do read the readme file, though19:42
jdstrandit looks like 4.3.3-5ubuntu8 didn't make it out of proposed yet19:43
dpmkyrofa, you'll need to add the PPA to your sources from where the staging packages are being taken19:43
* jdstrand investigates19:43
jdstrand(that was for isc-dhcp)19:43
zygajdstrand: btw, I'd like to look into adding old-security skills next week19:43
dpmkyrofa, I think the last issue to overcome is the upstream launcher script overriding the wrapper script in the snap19:44
zygajdstrand: I'll poke you with some ideas19:44
kyrofadpm, alright, grabbing it now19:44
dpmkyrofa, 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 variables19:45
kyrofadpm, sweet19:45
dpmbbiab19:46
kyrofadpm, pretty sure it's because the wrapper isn't executable19:53
kyrofadpm, yep, that was it19:54
kyrofaOh my goodness, travis, work with me here. At least wake up, pretend you're alive20:00
kyrofadpm https://bugs.launchpad.net/snapcraft/+bug/155049620:01
ubottuLaunchpad bug 1550496 in Snapcraft trunk "Error message when command can't be found/isn't executable is terrible" [High,Triaged]20:01
dpmoh wow, nice catch kyrofa!20:05
dpmhm, still getting the error20:07
kyrofadpm, did you clean first?20:08
dpmkyrofa, 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:08
sergiusensdpm, 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 clash20:09
kyrofadpm, 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:09
kyrofasergiusens, at least we use command-<app>.wrapper20:10
dpmsergiusens, no, the clash is somewhere else. Actually renaming it to .wrapper fixes it20:11
dpm(or anything else)20:11
kyrofadpm actually you can replace the old non-executable wrapper with the new one yourself in the parts/ubuntu-calculator-app/install/ directory20:11
kyrofadpm, then run snapcraft snap again20:11
kyrofadpm, that should work20:11
sergiusensdpm, right, I gave the exact lines and told you to make sure your script wrapper was +x along the conversation this morning :-P20:11
dpmgiving it a go20:11
dpmsergiusens, 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 now20:13
sergiusensdpm, oh, right; your wrapper might have just been called 'wrapper' or whatever; the front facing command is what is in apps: anyways20:20
dpmargh, now the wrapper is called, but qmlscene cannot find the main qml file, even though the path is correct20:24
dpm$ ubuntu-calculator-app.ubuntu-calculator-app20:24
dpm 20:24
dpm$ ubuntu-calculator-app.ubuntu-calculator-app20: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 found20:24
dpmI give up for today20:24
=== dpm is now known as dpm-afk
=== tsimonq2alt is now known as tsimonq2

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!