/srv/irclogs.ubuntu.com/2016/05/18/#snappy.txt

=== chihchun_afk is now known as chihchun
=== devil is now known as Guest24582
=== leftyfb_ is now known as leftyfb
zygagood morning07:23
qenghozyga: good...morning07:26
ngaiohi all good morning / afternoon. Hey how do I minimize the amount of packages being pulled down when I do a pull. I'm on a metered Internet connection and pay by the MB. I'm taking my first steps to building a snap, and it seems when I pull one part, it downloads all over again the same packages for another part07:40
qenghongaio: Could you not clean up the part that downloads a lot?07:43
ngaioqengho, I didn't clean anything07:43
ngaioall I did was one pull, then another07:43
qenghongaio: what kind of section do you have that lists packages?07:44
ngaiowhere can i copy & paste a sample?07:45
qenghopaste.ubuntu.com07:45
ngaiohttp://paste.ubuntu.com/16486317/07:46
ngaiothere is a problem with the pyzmq package-- i can't figure out how to specify the version07:46
ngaioit's failing there07:46
ngaiobut that's a different problem07:46
qenghoprobably "pyzmq=15.1.0", fwiw07:47
qenghoThat's an APT-ism.07:47
ngaioI couldn't find that anywhere in the online docs or in the comments in the plugin source07:47
qenghoOh, but that's not the package you mean.07:47
ngaiono it's not an ubuntu package.... it's a pypi package07:48
qenghoDifferent kind of package, right?07:48
qenghoRight.07:48
qenghongaio: For development, I think you can probably put a full local filename path instead of Ubuntu packages, and perhaps of Python packages, and your local cached files will be used instead. I think. Maybe. Possibly.07:49
ngaioqengho, that would be a big help when it comes to my internet usage, if it works!07:50
qenghongaio: I have never tried it for "package" things, just for large source tarball sources.07:50
qenghongaio: The snapcraft sources are not too hard to read. You should look into what the python source does, to see if it takes a version.  $ dpkg -L snapcraft07:52
qenghongaio: And if versions are a common thing to specify, then file a bug report to ask for it.  $ ubuntu-bug snapcraft07:53
qenghoAnd even "debpackage=version" doesn't work. Sigh.07:57
qenghoBed time.07:57
ngaioqengho, thanks for your help... I'm looking at the source now08:03
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
morphiszyga: ping08:36
zygamorphis: o/08:41
zygamorning08:41
morphiszyga: morning08:41
morphiszyga: have a first draft for a pulseaudio slot part of the interface08:41
morphiszyga: but wondering if we don't want to do an audio interface too which abstracts the kernel access for audio devices08:42
zyganeat! what's the pull request number?08:42
zygamorphis: like alsa?08:42
morphiszyga: no PR yet08:42
morphiszyga: like also, yes08:42
zygamorphis: so pulse would consume alsa and expose pulse?08:42
morphisyes08:42
zygammm, I guess the answer is, perhaps08:42
zygabut I'd wait with that for a real consumer08:42
zygaand for hooks08:43
morphisok08:43
zygae.g. you assign alsa, cannot use pulse yet08:43
morphisthen lets add those things to the pulse interface for now08:43
zygait's sensible just more complicated to model08:43
zygayep08:43
morphissth like hw-assign doesn't exist anymore, right?08:43
zygamorphis: correct08:43
morphisgood08:43
morphiszyga: either I base my PR on top of yours or I do a new one covering yours and mien at the same time08:44
zygamorphis: is there an actual difference?08:46
=== joc__ is now known as joc_
=== cprov_ is now known as cprov
=== ev_ is now known as ev
=== thomi_ is now known as thomi
zygamorphis: do you have an idea when we can land pulseaudio record lockout?08:46
zygamorphis: and I wonnder if you saw my message about the memory leak last night08:46
morphiszyga: (message) saw it and fixed the leak08:46
morphiszyga: the change needs testing and review08:46
=== plars_ is now known as plars
=== xnox_ is now known as xnox
morphiszyga: and need to find out who maintains pulse these days :-)08:47
morphismaybe seb128 knows08:47
=== tedg_ is now known as tedg
zygamorphis: do you have a plan to SRU it anytime soon?08:47
* seb128 doesn't know anything08:47
seb128hey there :-)08:47
zygaseb128: hey :)08:47
morphiszyga: no concrete08:47
morphisseb128: hey08:47
seb128morphis, zyga, TheMuso maintains pulseaudio for us08:48
seb128you can find him on #ubuntu-desktop/devel08:48
morphisseb128: thanks!08:48
seb128but he's .au based might be off for the evening already08:48
seb128yw08:48
morphiszyga: I must say I never did a real SRU yet08:48
morphisso would be good if we could just hand this to somebody08:49
seb128morphis, zyga, I can help you ... what serie do you want to SRU to?08:49
morphisseb128: xenial08:49
seb128just get a bug on launchpad with the patch08:49
zygamorphis: can you build pulse in a ppa somewhere08:49
seb128and give me the number08:49
seb128we can handle the SRU process08:49
zygamorphis: or just listen to seb12808:49
morphisseb128: sounds great!08:49
morphisseb128, zyga: have it in https://requests.ci-train.ubuntu.com/#/ticket/1428 already but still under testing08:50
seb128morphis, we need a bug anyway for SRU process08:50
morphisseb128: ok, let me create one then08:50
fgimenezhey mwhudson, i'm getting http://paste.ubuntu.com/16486677/ while trying to execute snappy's integration test suite and have been told that you could help me with that08:51
fgimenezmwhudson, sorry if that's not the case :) could you please have a look at it?08:52
zygamorphis: is there any tiny app we can use to demo the fact that recording is forbidden08:52
=== braderhart_ is now known as braderhart
morphiszyga: on the way building one08:53
morphisseb128, zyga: https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/158305708:53
ubottuLaunchpad bug 1583057 in pulseaudio (Ubuntu) "Deny audio recording for all snap applications" [Undecided,New]08:53
seb128morphis, thanks08:53
seb128morphis, zyga, lol, I though you guys wanted to fix a leak ... adding a new module is not going to be as easy by SRU rules08:56
zygaseb128: it's data privacy leak ;)08:57
zygaseb128: can we get help somewhere?08:57
zygasummon some super powers or something?08:57
morphisseb128: :-)08:57
seb128zyga, no, need to play by the rules, https://wiki.ubuntu.com/StableReleaseUpdates08:57
seb128zyga, but basically could you put the rational/test case/regression potential08:57
seb128like rather is "needed for snappy"08:58
seb128we can get it uploaded&co08:58
seb128I'm just unsure the SRU team is going to be too happy about it08:58
zygaseb128: understood, we'll do our best08:58
mwhudsonfgimenez: huh08:59
mwhudsonfgimenez: go version?08:59
zygamorphis: I think we should test this thoroughly on random non-snappy apps to ensure there's no impact09:00
zygamorphis: and play the only-affects-snappy card as a regression potential09:00
mwhudsonfgimenez: also, reproduction instructions?09:00
mwhudsonfgimenez: i guess it must either be s390x or yakkety?09:00
morphiszyga: that is the plan09:00
morphiszyga: the module shouldn't have any impact on non-snappy apps09:00
morphisand still simply allows recording09:01
morphiszyga: you have time to test this one too?09:01
zygamorphis: yes, I will gladly help09:01
morphisgreat09:01
zygaespecially now when I'm just about as sleepy as I can09:02
=== jospoortvliet_ is now known as jospoortvliet
morphiszyga: :-)09:07
fgimenezmwhudson, yes, yaketty, more about the environment http://paste.ubuntu.com/16486953/09:08
fgimenez*yakkety09:09
mwhudsonfgimenez: ok, i think that should be working so i'll have a poke09:09
fgimenezmwhudson, ok thanks, to reproduce from a working $GOPATH "mkdir -p ./github.com/ubuntu-core && cd ./github.com/ubuntu-core && git clone https://github.com/ubuntu-core/snappy && cd snappy && go run ./integration-tests/main.go"09:13
fgimenezin fact from $GOPATH/src09:14
mwhudsonfgimenez: well hooray, it works for me09:23
mwhudsonfgimenez: can you run go run -x ./integration-tests/main.go and show me the output09:24
fgimenezmwhudson, sure http://paste.ubuntu.com/16487054/09:25
mwhudsonfgimenez: doesn't look like you're running /usr/bin/go09:29
mwhudsonfgimenez: /home/fgimenez/src/go/pkg/tool/linux_amd64/compile09:29
mwhudsonfgimenez: i don't maintain that one :-)09:29
fgimenezmwhudson, oops thanks! will try with the package version, sorry for the noise09:34
mwhudsonfgimenez: heh nw09:35
sborovkovHello, asked this question yesterday, but no one answered. May be better luck today. Let's say I install snap in --devmode. If I upgrade to newer version of snap - can I automatically remove --devmode somehow11:28
kyrofaGood morning11:40
=== tai271828_ is now known as tai271828
=== Aria|away is now known as Aria
=== Aria is now known as Aria22
=== Aria22 is now known as Aria22|away
=== Aria22|away is now known as Aria22
=== Aria22 is now known as Aria
=== Aria is now known as Aria22
morphiszyga: you had time to take a final look at https://github.com/ubuntu-core/snappy/pull/1036 ?12:55
=== john-mca` is now known as john-mcaleely
zygamorphis: not fully but I think we should land it13:00
morphiszyga: ok, then lets do that13:00
morphiszyga: so when you merge it today, when will we have it in xenial?13:01
zygamorphis: next week13:01
zygamorphis: every Wed AFAIR13:01
morphisend of next week?13:01
zygamorphis: we have one SRU in the pipe now13:01
zygamorphis: if it lands now it will be released next week13:01
zygajdstrand: do you have any last comments on n-m interface?13:06
noizerHi zyga13:09
noizerzyga how are you?13:10
noizerzyga I have a strange problem with copying the armel build (chroot) to my snap13:10
noizerzyga here you got a minified yaml file of my snap http://paste.ubuntu.com/16490708/13:10
noizerzyga and thats the error [Errno 2] No such file or directory: '/home/ubuntu/software3003/parts/13:11
noizerstaticfiles/build/./armel/usr/share/zoneinfo/localtime'13:11
jdstrandzyga: I want to go through the recent comments, yes. I have a couple of meeting so it will be a couple of hours13:14
jdstrandmeetings*13:14
zygajdstrand: sounds good, thank you13:16
zyganoizer: hey :-)13:16
zyganoizer: sudo won't work there13:17
zyganoizer: as in, in is not allowed13:17
zyganoizer: I would suggest you to put this into a wrapper script and not put everythiong on one long line13:17
noizerzyga ok but my snapcraft build won't build :s13:18
zyganoizer: why?13:19
noizerzyga  [Errno 2] No such file or directory: '/home/ubuntu/software3003/parts/13:21
noizerstaticfiles/build/./armel/usr/share/zoneinfo/localtime'13:21
zyganoizer: I'm not sure what that error means, perhaps this should be reported to snapcraft13:22
noizerzyga Wait I will try some other things and then report it if it is nec.13:22
zyganoizer: I would also suggest you to make the snap manually13:23
zyganoizer: just use mksquashfs on it, put meta/snap.yaml in place13:23
zyganoizer: and see what happens13:23
morphiszyga: how do I get the bot to run all tests on my PR?13:23
morphiswasn't there a command to do that?13:24
zygamorphis: "retest this please"13:25
zygabut it may be picky as it may not let you do it13:25
zygalet me run that for you13:25
noizerzyga Ok I'll try that13:25
zygamorphis: running now13:29
zygamorphis: n-m one13:30
morphiszyga: thanks13:30
Facuquestion: when packaging a snap, where should I put the "man" page?13:39
qenghoFacu: it doesn't matter, because outside "man" can't find it.13:41
Facuqengho, how the man pages, or this kind of documentation in general, is handled in the snap world?13:41
qenghoFacu: You might want to add a new app: help: command: cat $SNAP/formatted_man_page13:42
morphiszyga: do we have any possiblity to populate udev rules from a snap?13:42
morphisand not as part of an interface?13:43
Facuqengho, ack, thanks13:43
zygamorphis: no, but an interface can13:54
zygamorphis: what do you need?13:54
zygamorphis: (so a permanent snippet on a slot could do it)13:54
morphiszyga: for modem-manager we have device specific udev rules13:54
morphisand putting them into a interface is not what we should do13:55
zygamorphis: hmmmmm13:56
zygamorphis: perhaps it is, just in the slot definition itself13:56
zygamorphis: we talked about having device specifc stuff in a slot, (pinging ricmm for context if needed)13:56
zygamorphis: think about it13:56
morphiszyga: you mean as parameter?13:56
zygamorphis: we could have a "hardware-enablement" interface or similar13:56
morphisyes13:57
zygamorphis: and we'd stick it on the kernel snap13:57
zygamorphis: and connect to mm13:57
zygamorphis: (so the plug would gain the real power)13:57
zygamorphis: but the slot would say what the powers are13:57
morphishm13:57
morphiszyga: kernel / gadget snap sounds like a possible thing13:57
zygamorphis: I'm going to pick up kids from school now, bbl13:57
zygamorphis: ping me with details please or use email13:58
morphiszyga: will do13:58
=== not_phunyguy is now known as phunyguy
kyrofaelopio, are you around today?15:11
zygare15:30
=== chihchun is now known as chihchun_afk
jdstrandmhall119 (CC Trevinho): hey, you said in https://code.launchpad.net/~3v1n0/snappy-playpen/hello-unity-fixes/+merge/294858 'and am also getting some apparmro denials' -- what were they? if they are the ones I mentioned in the MP then I think there is more work to do on the MP16:02
didrockshey kyrofa, how are you?16:08
kyrofadidrocks, hey! How's Texas?16:08
kyrofaAnd I'm doing well :)16:08
didrockskyrofa: rainy :p16:09
kyrofaYikes16:09
kyrofaAll legs of my flight were delayed because of thunderstorms over that area16:09
kyrofaAnd it's still going?16:10
didrocksno, it's stopped right now16:10
kyrofaOh, okay16:10
didrocksbut it was quite impressive :)16:10
kyrofaI bet it was!16:10
didrocksyeah :)16:10
didrocksI was wondering how you generally approach this: I'm trying to snap galculator, but as most of project, they hardcode datadir at compile time to fetch resources at runtime16:10
didrocksbut ofc, then, nothing is available at runtime on /share ;)16:11
kyrofaAh yes16:11
kyrofaPretty typical problem16:11
didrocksand ofc, changing datadir in the configure flag make it install relative to that path16:11
didrocksso that doesn't even workaround the issue16:11
didrocks(be installed in /snap/galculator/current/snap/galculator/current/share/foo for instance)16:12
kyrofaSo the way I solve it typically depends on the project. Lots of projects that need to reach out like that also support configuration files. No go there?16:12
didrockswell, I can setup datadir=/snap/galculator/current as a workaround for now16:12
didrocksbut16:12
jdstrandzyga: hey, I had a number of PRs for unity7 interface that I was hoping would be in 2.0.4, but it seems they weren't committed. should I be doing something differently?16:12
didrocksthen, it influences the installation path16:12
jdstrandaiui, I request, it gets a review, but then I was told someone else needs to commit16:13
kyrofadidrocks, yeah, I see what you mean16:13
didrockskyrofa: apart from patching upstream, I don't have a good idea on how to resolve this16:15
* seb128 is interested as well16:15
kyrofadidrocks, so no config file, and no runtime flag available either?16:15
didrocksnothing that I saw in the code16:16
kyrofadidrocks, I've not actually encountered a project that was so inflexible16:16
kyrofadidrocks, yeah the only option I see left is to maintain a fork and try to move a runtime flag upstream16:16
kyrofa(or a config file, if you like that better)16:16
ogra_hexedit !16:16
kyrofaogra_, hahaha16:16
didrockskyrofa: no way to patch I guess?16:17
kyrofadidrocks, not yet, but you're not the first to ask16:17
zygajdstrand: no, I guess just bash me more often16:17
zygajdstrand: 2.0.4 is last Friday16:17
didrockswhich is making taking all goodness of getting things from last upstream hard16:17
kyrofadidrocks, it needs some thoughtful design16:17
zygajdstrand: 2.0.5 aka 2016W20 is next week so don't worry, we'll just merge them16:18
seb128didrocks, kyrofa, Trevinho made a quilt plugin in https://code.launchpad.net/~3v1n0/snappy-playpen/hello-unity-fixes/+merge/294858 to apply a patch at build time16:18
seb128sharing one of the existing workarounds invited by people around16:18
Trevinhoit's hacky, eh...16:18
seb128Trevinho, good morning! ;-)16:18
Trevinhoseb128: hey... Sort of :)16:18
* zyga wonders where is the person that was working on arch support16:19
didrocksthanks seb128, Trevinho, kyrofa16:19
didrockskyrofa: yeah, it's quite hackish and will need to rewrite a good part of upstream16:19
didrocksand I bet GNOME is mostly the same16:19
didrocksseb128: do you have any GNOME app snapped at all? (and working :p)16:19
seb128didrocks, https://code.launchpad.net/~ubuntu-desktop/+junk/gnome-calculator-snap16:20
seb128didrocks, our list if issues is on https://bugs.launchpad.net/ubuntu/+bugs?field.tag=snap-desktop-issue16:20
Trevinhojdstrand: mhmh... I've got the thing running here unconfined, but yes... maybe it doesn't work unconfined because it can't access to some local files.. .I didn't check that yet...16:20
seb128didrocks, the branch from Trevinho I just pointed has some improvement I'm looking at now16:20
kyrofadidrocks, which files are we talking about here?16:20
seb128like generating caches are runtime16:20
ogra_zyga, blackout24 you mean ?16:21
Trevinhojdstrand: probably hello-unity python installer has something wrong...16:21
jdstrandTrevinho: right, I'm talking about when not using --devmode16:21
ogra_(obviously not here atm)16:21
Trevinhoor it's wrong the way snapcraft handles it16:21
jdstrandTrevinho: and the accesses indicate it is using some weird paths16:21
didrockskyrofa: lp:~didrocks/+junk/galculator-snap for instance, here is the output (installed with --devmode): http://paste.ubuntu.com/16494689/16:21
Trevinhoseb128, didrocks: my plan was to move those script in something like a build plugin that can generate something at build time16:21
zygaogra_: thanks!16:22
didrocksseb128: yeah, like the gdk pixbuf issue as well ^16:22
Trevinhosince something (like gsettings cache, or mime or icon cahces) can be done at that level16:22
Trevinhoseb128: it would be quite easy to do. We can do it.16:22
kyrofadidrocks, ah, so indeed something gnome-specific16:23
didrockskyrofa: well, Mate for this case, but yeah16:23
seb128gtk*16:23
Trevinhoseb128: however, as discussed in bug #1551716, we should fix snapcraft to allow patching in a native way (or imho, just runing a script in between source pulilng and building). sergiusens if you can comment in what's your preferred approach in that, I could come with a PR.16:23
seb128didrocks, seems like we are getting bind mount interfaces though, so that are going to be able to make things like mimetypes or pixbuf loaders work16:23
ubottubug 1551716 in Snapcraft "snapcraft does not allow vendor/platform patching of upstream sources (aka: add patch phase to lifecycle)" [Undecided,New] https://launchpad.net/bugs/155171616:24
didrocksseb128: oh, so we will be able to bindmount some files?16:24
seb128Trevinho, imho we require to apply patches to upstream code to work on snap we loose16:24
zygadidrocks: we're getting support for that16:24
seb128didrocks, seems o16:24
seb128so16:24
zygadidrocks: there is a bug open on snappy and ubuntu-core-launcher16:24
zygadidrocks: ~ next week16:24
kyrofadidrocks, yeah, we need that for fonts, locales, etc.16:24
didrockskyrofa: zyga: ok, that wouldn't help that .ui file though (which is part of upstream's project)16:25
didrocksbasically in one Makefile.am:16:25
didrocksuidir = $(datadir)/galculator/ui16:25
zygathough note that it's not a way to just load random files from classic16:25
didrocksso changing datadir change uidir, which is where things are stored16:25
seb128didrocks, the --prefix=... should work for that case though?16:25
kyrofaTrevinho, seb128 yeah at least from my perspective I keep getting conflicting requests about patching/not patching and how it relates to contributions upstream16:26
Trevinhojdstrand: yeah... it's weird that those paths are hardcoded. Not sure what's doing the setup.py under the hood, but it doesn't seem anything particular hard... However I just focused in getting compoments to run. So... if you want o check the code further, I leave that in hold for a while16:26
didrocksseb128: hum, using --prefix=/snap/galculator/current/ ?16:26
kyrofasergiusens may have more information-- he'll be back on Monday16:26
seb128didrocks, yes16:26
zygadidrocks: note that /snap might change some day, it's better (though harder) to really understand $SNAP16:27
seb128didrocks, otherwise get upstream to use gresources and have the .ui including in the binary ;-)16:27
Trevinhokyrofa: well, patching is something we need to provide... People can't just fork a project when a patch can live without having to care about pulling at every upstream update.16:27
seb128zyga, well, those are defined at buildtime16:27
seb128zyga, those being the code function calling things on a path16:27
Trevinhokyrofa: and Mark gave is +1, if I read correctly that bug.16:27
seb128same for locales and bindtextdomain()16:28
seb128they do16:28
seb128bindtextdomain ("domain", LOCALEDIR)'16:28
zygaseb128: and all of that can be moved16:28
didrockszyga: yeah, but here, we are quie in a blocked situation16:28
zygaseb128: note that snap name can be changed too16:28
seb128zyga, so what do you suggest doing?16:28
didrocksseb128: sure, that's totally doable for delivering that this week…16:28
zygathis is fine for a short term solution but IMHO patching the world to understand $SNAP in various low-level toolkits would be best16:29
kyrofaTrevinho, ah, so did gustavo. Okay, that clears things up, I guess I missed that conversation16:29
seb128that's bong16:29
seb128we message snap as a way for upstream to ship their code unmodified by distro16:29
zygaseb128: why?16:29
seb128and now we tell them they need distro patches to work on our system16:29
seb128head -> desk16:29
zygaseb128: that doesn't mean some middleware layer must stay oblivious to what snaps are16:29
zygaseb128: we had to patch nearly all major pieces16:29
zygaseb128: (ask morphis)16:30
seb128well, you loose adoption at this point16:30
seb128the interfaces yes16:30
zygaseb128: well, what is your suggestion?16:30
jdstrandTrevinho: I may be able to work with what it there16:30
zygaseb128: no, for paths16:30
seb128but if you need to patch "randomcalc" code to change it's paths16:30
zygaseb128: --prefix is never correct for a snap (it can move around)16:30
jdstrandzyga: ack, thanks16:30
seb128I suggest fixing that ^16:30
seb128and making a predictable prefix16:30
zygaseb128: that's a design decision that we've commited to16:31
zygaseb128: this is not my decision but we shouldn't build everything against that16:31
seb128well, it's fine16:31
seb128it's just going to slow down adoption16:31
seb128if upstream need to "fix" their code to work on snappy16:31
zygaseb128: I suspect that is true16:31
zygaseb128: but only for middleware pieces16:31
zygaseb128: (most things should not care much)16:31
seb128they do though16:32
zygaseb128: but I agree in principle16:32
seb128any gettext program calls16:32
seb128 bindtextdomain ("domain", LOCALEDIR)'16:32
seb128to read translations16:32
zygaseb128: well, we could patch glibc (we plan to anyway)16:32
seb128where LOCALEDIR is $prefix/usr/locale16:32
zygaseb128: and a few other things to make that code correct in a snappy context16:32
seb128and to fix calculator loading its .ui from $prefix/usr/share/ui you patch calculator16:33
seb128you fork the world and end up maintaining patched versions of everything16:33
zygaseb128: with $SNAP being relocatable, we have no other choice really16:33
didrocksseb128: I don't see that specific issue (hardcoded paths) being in the bug list, should I open one or did I mis it?16:33
seb128sounds like deb based ubuntu :p16:33
zygaseb128: I mean that all of those patches should end up upstream16:33
zygaseb128: or at least in ubuntu as patches for deb-based snaps16:33
seb128didrocks, I mentioned it on https://bugs.launchpad.net/ubuntu/+source/snapcraft/+bug/1576282 which is one of those cases16:33
ubottuLaunchpad bug 1576282 in snapcraft (Ubuntu) "Snaps built from deb can't be gettext translated" [Undecided,New]16:33
zygaseb128: anyway, sorry for derailing your discussion16:33
seb128didrocks, but yeah, feel free to open one16:33
didrocksseb128: let me open an explicit bug about it, shall we?16:33
didrocksyeah16:33
seb128thanks16:34
didrocksok, building with --prefix, and see how it goes16:34
seb128zyga, it's not derailing, don't worry16:34
seb128zyga, I'm ready to bet that you are going to figure out at some point that you need a way to fix that path problem other than asking every app in the world to patch their code to have a if (getenv(SNAP...)) hacks16:35
seb128but let's see16:35
zygaseb128: a kernel patch perhaps? :)16:35
zygasomething like /proc/self16:35
seb128yeah16:35
zygaseb128: though I think smart patches in glibc could do 90% of the work16:35
seb128or maybe you need to divert libc and other libs in a wrapper changing the paths on fly for you :p16:35
zygaseb128: we though ot LD_PRELOAD library or a runtime helper (added at link time) to "cure" some common issues16:36
seb128I can see how one gets there16:36
seb128but you are working around in hackish way for issues selft created :-/16:37
seb128well the bind mount is at least going to solve a part of those16:37
seb128locales, mimetypes, fonts, etc16:37
zygaseb128: until we do personal and we expect those snaps to still work16:37
zygaseb128: we have to be careful with bind mounts16:37
zygaseb128: there's a reason we bind mount the os snap over regular ubuntu today16:37
didrocksseb128: hum, modifying prefix modify destdir as well…16:38
seb128didrocks, you can make install DESTDIR=..., which is what deb do16:38
kyrofaseb128, that's what the autotools plugin does16:39
didrocksyeah, unsure you can do that easily with snapcraft, kyrofa ^16:39
zyga(sooner or later you will start patching, this is barganing phase of kubler-ross :/16:39
didrockskyrofa: hum, maybe I'm doing something wrong, but here is what I changed:16:39
didrockskyrofa:     configflags: ["--prefix=/snap/galculator/current/usr/"]16:39
kyrofadidrocks, have you tried doing this standalone? Make sure the build system actually respects DESTDIR correctly?16:39
didrocksand nothing else16:39
kyrofadidrocks, because I've run into a few that don't16:40
kyrofadidrocks, ohh, wait, try this16:40
morphisseb128: this problem does not only affect us but also apps for xdg-app need adjustments from what I saw16:41
kyrofadidrocks, there are two ways to install something. Set a prefix and install (in which case is goes to the prefix), or use DESTDIR to put it where you want it to go16:41
zygakyrofa: prefix and destdir serve different purpose but I'm sure you know that16:41
didrockskyrofa: yeah, I know that, did packaging for years ;)16:41
morphisseb128: I don't see that $SNAP should be part of every opensource software but every software should be relocatable and not hardcode any paths16:41
seb128morphis, most are relocatable but the destination is defined at build time16:42
morphisseb128: right, and that is something which has to change somehow16:42
kyrofadidrocks, yeah I figured you knew that from autotools, but what I mean to say is that the autotools plugin also supports that16:42
didrockskyrofa: what's the right combination then? I did try to set install-via desdir16:42
didrocksdestdir16:42
seb128morphis, that's not going to change overnight and sort of conflicting with the goal of what main apps to be snapped by next week16:42
didrocks(you have the branch, right?)16:42
kyrofadidrocks, so: was there another flag you can use instead of prefix to get it using the right file?16:42
zygamorphis: very true, this is a dual transition: from debs to snaps and from fixed prefix to "portable" installation16:42
morphisseb128: I know that somebody tried something like overlayfs but somehow that didn't worked out16:42
zygamorphis: overlayfs breaks aa16:43
zygaseb128: would it change anything if we gave each app process a bind mount to /snap16:43
zygaseb128: I mean to $SNAP16:43
didrockskyrofa: uidir is defined from datadir, which is set from prefix16:43
morphisseb128: for network-manager/modem-manager/bluez we're patching things to understand $SNAP for now16:43
zygaseb128: like /snap/self16:43
didrocksbut setting prefix seems to change make install dest directory16:43
morphisseb128: but we're not putting those patches into any debian package16:43
zygaseb128: being always bind mounted to /snap/$SNAP_NAME/$SNAP_REVISION/16:43
morphisseb128: see https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager/tree/16:44
kyrofadidrocks, eh... let me clone this thing. Hold on16:44
morphisseb128: somewhat is this an interim solution16:44
zyga(or perhaps a symlink though that is harder)16:44
morphiszyga: yeah16:45
morphisseb128: and something like --prefix=/snap/galculator/current/usr didn't really worked for us16:46
seb128zyga, yeah, I guess having a stable path would make things much easier16:46
roadmrjdstrand: hey, click-reviewer-tools r651 is finally out on the store. Apologies for the dlay16:46
zygaseb128: we should be able to at least prototype something like that next week but I cannot promise the design will be approved16:46
morphisas that will still end up as /snap/galculator/current/snap/galculator/current/usr16:46
seb128morphis, you are getting n-m/bluez/etc upstream to take patches snap specific?16:46
morphisseb128: if you don't strip the prefix again16:46
morphisseb128: no16:46
morphisseb128: we will not bring those patches upstream16:47
morphisseb128: but longer term upstream needs to be relocatable at runtime16:47
seb128right16:47
zygapatch glibc, qt, gtk and you'll see most people not noticing16:47
zyga(with a grain of salt)16:47
zygapeople bundle gtk/qt on windows so it has to "work"16:48
morphiszyga: glibc/qt/gtk should be fine mostly16:48
zygamorphis: yeah? including things like locale and fonts?16:48
morphisseb128: and you can also write wrapper scripts like https://git.launchpad.net/~snappy-hwe-team/snappy-hwe-snaps/+git/network-manager/tree/bin/networkmanager to adjust things like HOME or LD_LIBRARY_PATH16:48
morphiszyga: that is why I said "mostly" :-)16:48
kyrofadidrocks, any chance you have your snapcraft recipe pushed somewhere?16:48
seb128didrocks, hum, the --prefix= thing doesn't work because make install is going to install in that dir as well and you end up with having /snap/galculator/current/snap/galculator/current/usr as morphis said16:49
zygamorphis: one more thing, we're getting support for controling environment variables from interfaces16:49
zygamorphis: so we'll be able to pre-seed sensible variables for the most common stuff16:49
zygamorphis: and also use interfaces to influence that16:49
morphiszyga: sounds good16:49
seb128morphis, right, that's we do, e.g http://bazaar.launchpad.net/~ubuntu-desktop/+junk/gnome-calculator-snap/view/head:/calc16:49
zyga(e.g. set something to see classic fonts when classic font interface is connected)16:49
morphiszyga: I have a feeling that we two should sync up somewhere soon on what is coming and planed etc.16:49
morphisfeel like there are certain things we're really interested in16:49
seb128morphis, that's quite hackish though, I doubt any upstream maintainer is going to find that being clean/something they can to do :p16:49
didrockskyrofa: sure, it's at lp:~didrocks/+junk/galculator-snap. I did try then multiple combinations of prefix and destdir…16:50
didrocksseb128: exactly16:50
morphisseb128: I would simply ignore the "clean" part of this for now and get it working16:50
morphisseb128: I remember that loic started with binary search&replace on NetworkManager coming from a deb16:50
seb128morphis, that's what we are doing, but are also asked to get upstream adoption, which is more difficult in that case16:51
morphisseb128: absolutely16:51
didrockskyrofa: another way is to move the whole datadir directory after install, even setting an incorrect prefix16:51
morphiszyga: https://bazaar.launchpad.net/~ubuntu-desktop/+junk/gnome-calculator-snap/view/head:/calc#L3 is something we should provide from snappy16:51
kyrofadidrocks, yeah, but then you're talking custom plugin or yucky makefile (I had to do that for apache)16:51
didrocksyep16:51
didrockskyrofa: any better idea for now? :p16:52
kyrofadidrocks, experimenting, give me a minute16:52
zygaOMG :)16:52
zygamorphis: thanks!16:52
morphisjdstrand: you already had time to look on the nm interface?16:53
zygamorphis: https://bugs.launchpad.net/snapcraft/+bug/158325916:56
ubottuLaunchpad bug 1583259 in Snappy Launcher "Snappy needs to influence environment variables in applications " [Undecided,New]16:56
zygajdstrand: ^^16:56
zygatyhicks: (we talked about this at the sprint) ^^16:56
zygatyhicks: and gustavo wants it so I think we have agreement for the general direction16:56
zygaseb128: ^^ I'd love to know if you have suggestions on what some defaults might be when people connect the unity7 interface to make more things work out of the box16:56
morphiszyga: sounds good16:56
morphiszyga: couldn't we also add a set of env variables from the gadget snap?16:57
zygamorphis: that's somewhat more risky, can you give me a use case as a thought experiment?16:57
morphiszyga: like on Ubuntu Touch we're supplying different env variables directly from the device tarball to adjust runtime behaviour16:58
zygamorphis: remember nobody will review gadget snaps16:58
zygamorphis: that's a lot of power16:58
morphiszyga: like the device specific GU value16:58
zygamorphis: I see, that's an interesting case16:58
morphiszyga: why that?16:58
zygamorphis: is that something mir consumes or something that each snap needs to have set?16:59
morphisand we're adding more of them like to adjust the wifi management for different BSPs etc.16:59
zygamorphis: why nobody will review gadget snaps?16:59
morphisyes16:59
zygamorphis: because we want many people to make devices and reviews don't scale16:59
morphissame would apply for snaps, right?16:59
zygamorphis: so the only choice is to confine and limit gadget snaps and let us land them without review16:59
zygamorphis: yes but specifically the gadget snap has a very strong power over each device, we should not just let arbitrary things to go through it17:00
zygamorphis: perhaps a gadget snap could announce meta-data that each snap could see?17:00
morphispossible17:00
zygamorphis: and snaps could then opt-into loading some things (just a random idea)17:00
morphisyeah17:00
morphisoff to the future17:01
zygamorphis: I see the need for this but I don't see a solution that's not a compromise over something17:01
zygayep17:01
morphiszyga: most important thing for us will be udev rules supplied by either the gadget or kernel snap17:01
zygamorphis: can you open a bug on that and add some back story (enough for us to drive the design discussion)17:02
zygamorphis: I think this will be a gadget/kernel-snap (both perhaps) hardware-specific interface but I may be wrong17:02
zygamorphis: specifically if snaps have to specifically connect to it17:02
zygamorphis: and what exactly should be in those udev rules17:02
morphiszyga: sure, can open that tomorrow17:03
zygamorphis: thanks17:03
=== Aria22 is now known as Aria22|away
ssweenyzyga, I'm trying to genericise the slotAppLabelExpr function and my go-fu is weak. Is there a way to make that function take either a slot or plug or do I need to make wrapper functions to call that logic?17:14
jdstrandmorphis: been in meetings all morning (both on the schedule and impromptu). I'm done with those for the day so going to eat then look at all the PRs, starting with nm17:27
morphisjdstrand: great!17:27
jdstrandzyga: interesting. I'm going to point tyhicks at that too since he is looking at something related to env handling17:28
oparozWill installing snaps on Ubuntu on Windows be supported?17:31
ogra_heh17:32
ogra_unlikely17:32
oparozOK :)17:32
ogra_unless windows grows some kernel fetures17:32
ogra_*features17:32
oparozYeah, I was wondering what would be limiting the concept. Systemd might be another issue17:33
ogra_systemd, apparmor, seccomp17:35
kyrofaoparoz, yeah basically our entire confinement story is missing there, I imagine17:35
oparozThat's a bit too much to make it work :)17:36
zygassweeny: no generics in go, you need to fork it17:38
ssweenyzyga, ack, thanks17:38
zygassweeny: you might be able to move the common part to a helper that just takes the raw data (apps AFAIR)17:38
ssweenyzyga, yeah that's what I was thinking. Just wanted to make sure I wasn't missing some idiomatic go thing that would be super easy :)17:38
zygassweeny: I'm still new to go but I'm pretty sure there's no generics around17:39
ssweenyzyga, apparently you can switch on type which is neat but I'd still have no idea how to pass the slot/plug in without them implementing the same interface at least17:40
zygassweeny: you cannot switch types, you can "upcast" interface{} to a real type but you cannot "cast it" to something totally different17:41
ssweenyzyga, I meant you can switch ON type like switch foo(type) case bool: <do stuff> case int: <do other stuff>17:42
ssweenysyntax is probably wrong but that's the idea17:42
zygassweeny: ah, yes you can do that17:42
zygassweeny: switch foo.(type) AFAIR17:43
ssweenythat's it17:43
ssweenybut still no way to say "this function takes a plug or a slot and I'll figure out which it is in the body"17:44
ssweenyI'll go ahead and factor the common stuff out17:44
zygassweeny: well you can have it take an interface{}17:45
zygassweeny: but that's not type safe then17:45
ssweenyright17:45
zygassweeny: I think that's the best we have for now17:45
zygassweeny: we toyed with an idea to have a private base class for plug and slot but that wouldn't help you much17:45
ssweenyzyga, I guess I could make an interface that covers the needed fields but by that point I've done more work than just factoring out the common code17:47
tyhickszyga: fyi regarding the env var bug> mvo is having trouble with the "... and ubuntu-core-launcher (to actually apply those variables to each started process)" part17:48
zygawith the "..." and"?17:48
zygawell, I don't suppose we can assume the env is really inherited17:49
tyhickszyga: some variables, such as LD_LIBRARY_PATH are being scrubbed when the launcher execs the app17:49
zygabecause that doesn't work on all the variables17:49
zygaright17:49
zygaoh?17:49
zygaexecs?17:49
tyhicksright17:49
zygacan we still set it after forking:?17:49
zyga(I assume we must)17:49
zygaboth do it and must be really able to do it, otherwise shell would break too17:49
tyhickssome vars are scrubbed because the launcher is setuid root17:49
zygaright but I'm not talking about inheriting environment17:50
tyhicksbut the launcher should, I think, be able to set those vars itself17:50
zygajust loading it from a file17:50
zygaexactly17:50
tyhicksright now, that's not working17:50
tyhicksI'm looking at it17:50
tyhickszyga: I'll keep you updated when I make progress17:51
oparozIs there a kernel for core which include grsecurity or do we have to compile one ourselves?18:10
kyrofaoparoz, you probably need to build that yourself18:16
oparozThanks kyrofa18:16
jdstrandmorphis, zyga: I responded to the nm PR. I think it is fine pending a comment from zyga19:13
jdstrandmorphis: note that I asked you something as well (but it isn't blocking)19:14
jdstrandplars: hey, how did you create the snap in https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1579135/comments/9 ?20:38
ubottuLaunchpad bug 1579135 in apparmor (Ubuntu) "kernel BUG on snap disconnect from within a snap" [Undecided,New]20:38
plarsjdstrand: with snapcraft, on a branch I have at https://github.com/plars/snappy-tests20:59
jdstrandack, thanks21:00
plarsjdstrand: if you want to build yourself, it may take running it a second time. For some reason it tries to build the go code rather than just the tests. I haven't sorted out why just yet, but rerunning snapcraft does it right if it hits an error the first time21:01
plarsjdstrand: basically it's just a compiled version of the tests in the snappy source tree21:02
jdstrandok21:08
jdstrandI'm having some issues with embedded paths that I think is a snapcraft python issue. I've seen the same thing with hello-unity for example21:09
jdstrandsince I just want the tests to run, I figured if I recreate it locally I could run it locally21:10
plarsjdstrand: I can try to rebuild the snap later too if you like - I'm just tied up trying to get some progress on another thing right now21:31
jdstrandplars: I have the snap. should snappy-tests -check.f homeInterfaceSuite be run under sudo?21:32
jdstrandplars: and that is /snap/bin/snappy-tests ?21:32
jdstranddoesn't look like it on either21:33
plarsjdstrand: no, sudo shouldn't be required21:34
jdstrandplars: installed with --devmode?21:35
plarsjdstrand: if there's still a problem, we may need to check with elopio and see if they are still having issues - yes, I did install with --devmode21:35
plarsI think it should be require for those tests to have any chance at running21:35
jdstrandpanic: runtime error: invalid memory address or nil pointer dereference21:37
jdstrandlet me try one more time with your snap21:37
jdstrandplars: fyi https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1579135/comments/1122:06
ubottuLaunchpad bug 1579135 in apparmor (Ubuntu) "kernel BUG on snap disconnect from within a snap" [Undecided,Incomplete]22:06
jdstrandplars: fyi I'm EOD now so feel free to comment in the bug22:08
jdstrandjjohansen: fyi, ^22:08
plarsjdstrand: will do, thanks for taking a look. Very possible that snappy and/or the tests have changed since then22:08
plarselopio: are you hitting errors like that with the tests now? ^22:08
jjohansenplars: I am building a test kernel, with what I hope is the fix. Is a deb good enough for you to test or do you need it in a ppa?22:17
jjohansenplars: this is for bug 157913522:17
ubottubug 1579135 in apparmor (Ubuntu) "kernel BUG on snap disconnect from within a snap" [Undecided,Incomplete] https://launchpad.net/bugs/157913522:17
plarsjjohansen: well it sounds like something is preventing reproduction of the bug. I would need to test it in snappy, so any chance I could get it as a kernel snap?22:18
jjohansenplars: uhmm, no :)22:18
plarsjjohansen: but I'll need to try reproducing again first, and check with QA if they are seeing the new problem in their test runs or if it is something unique to running it this way22:18
plarsjjohansen: heh, ok22:18
jjohansenI'll look into it, I've never done a kernel snap before22:18
plarsjjohansen: me neither, I'm happy to try, just would need to do some rtfm22:19
plarsjjohansen: in any case, no rush... I'm already going to be swamped for most of the night on other problems22:19
jjohansenright, let rephrase the kernel snap won't happen right away22:19
jdstrandjjohansen: you'll want to talk to ogasawara for a kernel snap-- I think she can point you to someone. I think there is tooling to convert a deb to a snap, but I might be making that up22:20
jjohansenjdstrand: ack thanks22:21

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