/srv/irclogs.ubuntu.com/2016/03/10/#snappy.txt

=== JamesTait is now known as Guest2387
=== devil is now known as Guest83087
=== Guest83087 is now known as devil__
=== dasjoe_ is now known as dasjoe
=== devil is now known as Guest51142
=== tsimonq2alt is now known as tsimonq2-
=== tsimonq2- is now known as tsimonq2
=== chihchun_afk is now known as chihchun
stgraberI just uploaded a new version of lxd to the store, no change to policy, would be nice if it could go through soon, we've had a few folks complaining that 0.21 was a bit dated (by about 6 months :))07:04
stgraberjdstrand: ^07:04
dholbachgood morning07:41
didrocksgood morning dholbach07:41
dholbachsalut didrocks07:48
noizergood morning!08:05
noizerHow can I see that my custom seccomp and apparmor file is applied to my snap?08:33
noizerjdstrand:   can I see that my custom seccomp and apparmor file is applied to my snap?08:59
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
mvowillcooke, dpm: good news, the most recent snappy upload to xenail (should hit xenial-proposed with the next publishing) will have unity7 integration, i.e. nothing (hopefulyl) more to do. install cap-test and it will show up in dash searches etc (make sure you restart your session once after updating snappy because it installs a Xsession.d file for this). I'm very excited!09:18
willcookemvo \m/09:19
willcookemvo, thank you!!!09:19
willcookeTrevinho, ^^09:19
dpmmvo, awesome! I just managed to upload calculator to the store, for which I included the .desktop file support. I'll go ahead and test that too!09:19
dpmjust literally a few minutes ago09:19
dpmso I'll give unity 7 integration a spin once I see the new snappy package in the archive09:20
mvodpm: yeah, xenial-proposed, there is a build failure on powepc that I look at next so it won't promote right away09:23
dpmok09:23
mvodpm: but you can directly grab the two debs from LP if you are eager to test :)09:23
mvodpm: plus the updated ubuntu-core-launcher but that will come as a normal update09:23
dpmmvo, thanks. I am eager :), but I think I'll wait if it's just a matter of hours, which might save me some extra fiddling09:24
zygao/09:26
zyganoizer: yes, look at /var/lib/snappy/{apparmor,seccomp}09:27
mvodpm: you are eager and WISE at the same time :)09:27
dpmlol09:27
noizerzyga:  ok i was looking at the correct files but with security-policy it doesn't work. http://pastebin.com/DmAdrhU309:30
noizerzyga: do you have any clue why my apparmor and seccomp files doesn't apply to my snap?09:36
dpmmvo, how do updates to the ubuntu-core snap happen on the desktop? It is a bit like magic to me. I've tried "sudo snappy upgrade ubuntu-core" a few times and it tells me there are no new versions. Yet every now and then I see it updated automagically when I run "snappy list --verbose". So I'm not sure if this is something that needs to be manually maintained (and how?) or is autoupdated09:37
zyganoizer: s/slots/plugs/ -- use the lastest released snapcraft (just released yesterday AFAIR) and it should work09:37
zyganoizer: good luck09:37
zyganoizer: sorry about the swap, it's stabilizing now09:37
noizerJust switch between slots and plugs?09:37
zyganoizer: you'll have access to many useful interfaces next week (+1/-1 image release)09:37
zygaye009:38
zygayes09:38
noizerBut to be honest i think i need an unconfined snap just for my thing. So i try to make it by changing the apparmor and seccomp file09:39
Trevinhomvo: great to hear09:42
noizerzyga ok thx with plugs it works to edit the apparmor just need to see that mine apparmor is correct but now it fails09:50
zyganoizer: sorry, I don't get the last part ;; what failed?09:52
noizerwait i got the following error when I'm installing my snap with a custom apparmor09:56
noizerzyga:  error, unexpected TOK_ID, expecting TOK_END_OF_RULE09:57
noizerzyga: thats an error of mine apparmor10:01
zyganoizer: yeah, I think your apparmor is just wrongly spelled10:02
zyganoizer: btw there's an unconfined template that you can reference10:02
zyganoizer: look at your desktop10:03
ysionneauah, snapcraft has been updated yesterday with the plugs/slots switch o/10:03
ysionneaucool10:04
zyganoizer: dpkg -L ubuntu-core-security-apparmor10:04
zygaysionneau: yep10:04
ysionneauhmm would there be any interest in chrooting into $SNAP (after doing some bind mounts) ?10:48
ysionneauI mean, before running an app10:48
zygaysionneau: why?10:48
ysionneauthat would for instance allow the app to use hard coded absolute paths10:48
zygaysionneau: and not allowed to do many other things10:48
zygaysionneau: I don't think this is needed10:48
ysionneauthis could be useful for some apps I  think, so that you don't have much work to "port" them to snappy10:49
ysionneauinstead of having to rewrite lots of code10:50
ogra_i doubt chroot will be allowed by seccomp10:50
ysionneauThat could be an option in the snapcraft.yaml like "chroot: yes"10:50
ogra_bu tthat doesnt stop you from shipping a full rootfs if you want and bend the env to completely use it10:52
ogra_which would be close to a chroot10:52
ysionneauwhat do you mean by "bend the env" ?10:54
ysionneauI'm not sure there is a trick to allow an app to write to "/var/lib/<something>"10:54
ysionneauother than chrooting10:54
ogra_well, pretty much what the ubuntu-core-launcher does already but also make it use the shipped toolchain, linker, libc10:55
ysionneauor maybe an LD_PRELOAD to hook open()10:55
ogra_as long as $SNAP and $SNAP_DATA are on the same device you might be able to use hgardlinks for writable bits and dirs10:56
ysionneaubut, whatever I do, /var/lib/ will stay read-only10:57
ysionneauthat's my main issue10:58
ogra_change it to ./var/lib then :)10:58
ogra_(indeed that might mean to recompile the world ... i didnt say its easy ;) )10:59
ysionneauthe thing is, there are lots of occurence of this type of issues in the different softwares I want to "port" to snappy11:01
ysionneauso I'm not a big fan of this solution11:01
ysionneau(by solution here I mean pushing fixes in the code everywhere to use env VAR instead of hard coded absolute paths)11:01
ogra_indeed ...11:02
ogra_dont you need to just re-do the linker path though ?11:02
noizerzyga: the unconfined template can he make some calls to /snaps/bin/... ?11:04
ogra_noizer, unconfined apps have all the power a natively installed deb would have11:04
noizerso he can exectute all things?11:05
ysionneau12:02 < ogra_> dont you need to just re-do the linker path though ?  < I'm talking about normal "open()" here, not library paths issues11:05
ogra_(its just the paths and workdir that are different then ... )11:05
ysionneauor maybe I don't understand what you propose :o11:05
ogra_oh, open() in your code, i see11:05
ogra_well, if you cant get around that one, you can always use lxd or docker11:05
ysionneauah, interesting!11:06
ogra_that equivalent to a chroot i'd say (just a bit more secure)11:06
ysionneauthanks!11:06
ysionneauwill think about that :)11:06
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
zyganoizer: maybe not11:26
zyganoizer: it's not so simple11:26
zyganoizer: you cannot change aa profile anyway *AFAIR*11:26
noizerzyga:   do you mean with AFAIR11:27
zyganoizer: as far as I remember11:27
zyganoizer: it's not identical to really unconfined11:27
zyganoizer: but it very broadly permissive11:27
noizerzyga: What I now did is took an empty apparmor and try to execute an binary from /snaps/bin/11:28
noizerI see it is then possible to execute the binary11:28
noizerzyga: But then i see the following error:11:29
noizererror: /bin/sh: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory11:29
zyganoizer: I don't think that will work11:29
zyganoizer: try doing what I said11:30
zyganoizer: use old-security and unconfined template11:30
noizerok11:30
noizerzyga: then i should be able to execute the binary?11:31
noizerzyga: got then following error: aa_change_onexec failed with -1. errmsg: Permission denied11:32
ogra_noizer, why didnt you fiollow jdstrand's advise from yesterday ?11:39
ogra_*advice11:39
zyganoizer: that's exactly what I said11:39
zyganoizer: you cannot change aa profiles11:39
zygaogra_: what was the advice?11:39
ogra_zyga, i gave him an existing (outdated) unconfined snapcraft.yaml and jamie gave all hints to adapt it to the new interfaces setup11:40
ogra_there is no need to fiddle with apparmor files11:41
zygaogra_: i suspect that unless there were explicit changes somewhere you still cannot (even unconfined) run other snaps from your snap11:41
ogra_why not ?11:42
zygaogra_: it's not allowed, even for unconfined programs (that are really confined but broadly permissive)11:42
ogra_unconfined has the same powers as a deb ... just that all paths and the workdirs are completely mangled11:42
zygaogra_: I went through this issue a few times11:42
zygaogra_: nope11:42
zygaogra_: that is not true11:42
ogra_i have an unconfined  debootstrap that woprks just fine11:42
zygaogra_: unconfined still gives you aa profile and seccomp profile and a cgroup for devices11:42
zygaogra_: it's not the same as running from the ssh shell11:42
ogra_i dont see why an unconfined systemctl shouldnt be able to control services for example11:43
zygaogra_: because that's what's spelled out in unconfined, we'd have to make super-unconfined that has extra powers11:43
zygaogra_: FYI I'm not arguing with you; I'm just telling you how it really works today11:43
ogra_so unconfined changed ?11:43
zygaogra_: no, it was always like that11:43
ogra_with the last iteration11:43
zygaogra_: unconfined != not confined in practice11:43
ogra_right11:44
zygaogra_: it was like that in 15.0411:44
zygaogra_: and I suspect still is in 16.0411:44
ogra_well, unconfined in 15.04 lets me do everything with my system11:44
ogra_i dont think your seccomp assumption is true11:44
zygaogra_: it's 100% true for aa11:44
ogra_but aa wont be used in unconfined11:44
zygaogra_: you cannot load another aa profile while running unconfined profile11:44
zygaogra_: it _is_11:45
zygaogra_: 100% guaranteed it is11:45
zygaogra_: we've been through this many times in cert11:45
ogra_you can not load another aa profile because aa_exec isnt in use at all11:45
zygaogra_: I don't think this is true, in any case, as unconfined snap, you cannot run other snap's apps11:45
ogra_no, but youz can run thes system systemctl11:46
zygaogra_: sure but the error that noizer saw is exactly what I was describing11:47
zygaogra_: not related to systemctl11:47
dholbachdpm, so snapcraft seems to do just what click-review expects:11:49
dholbachsnapcraft/commands/snap.py:    mksquashfs_args = ['-noappend', '-comp', 'xz', '-all-root', '-no-xattrs']11:49
dholbachand for snappy it's http://paste.ubuntu.com/15340831/11:51
dholbachthe latter seems to miss "-all-root"11:51
dholbachthat was in snap/squashfs/squashfs.go, but in obj-x86_64-linux-gnu/src/github.com/ubuntu-core/snappy/pkg/snapfs/pkg.go it has the "-all-root" option11:52
dholbachmvo, is there a reason that in one of the mksquashfs incantations the "-all-root" option is missing?11:53
zygadholbach: (mvo went for lunch, may reply with lag)11:53
dpmdholbach, then perhaps an issue in click-review-tools? As I built the app with snapcraft, and I *think* LP does it with snapcraft as well11:53
dholbachzyga, thanks11:54
ogra_dholbach, --all-root means that all your files are chowned to root inside the squashfs ... probably not wanted in all cases11:54
dholbachdpm, it might, yes11:54
ogra_(definitely not for os snaps for example)11:55
dholbachdpm, I just thought I'd check all incantations first :)11:55
dpmmakes sense, thanks dholbach :)11:55
noizerzyga: So as conclusion it is not possible at all what I want even when i get my custom aa?11:56
noizerzyga: or does i understand it completly wrong?11:57
zyganoizer: you'd have to talk to jdstrand and ask if it is possible to use a custom template to unlock running other snaps from "unconfined" snap12:01
zyganoizer: technically it is possible, it's just the matter of having the right template or the right extra bit in an existing template12:02
zyganoizer: but jdstrand will know how (though he's super-busy so you might not get a quick answer)12:02
dholbachjdstrand, I'm still seeing http://paste.ubuntu.com/15340881/ - do you know what the issue is?12:05
dholbachthat's with r60512:06
dholbachdpm, it might be https://bugs.launchpad.net/ubuntu/+source/click-reviewers-tools/+bug/155530512:17
ubottuLaunchpad bug 1555305 in click-reviewers-tools (Ubuntu) "resquashfs test fails if snap has symlinks" [High,Confirmed]12:17
dholbachhttp://paste.ubuntu.com/15340912/ is what I tried12:18
dholbachhttp://paste.ubuntu.com/15340914/ was the result12:18
dholbachdpm, so it sounds like it's a known problem with snaps containing symlinks(?)12:19
dholbachthe mksquashfs arguments cited in the error message might be a red herring12:19
kyrofaGood morning!12:26
dholbachhey kyrofa12:28
kyrofalool, looks like you pinged me yesterday, you around?12:28
kyrofaHey dholbach, how are you?12:28
dholbachgood good - how about you? :)12:28
kyrofaNot bad! Been out the last few days, felt nice12:31
kyrofaThough now I have ~300 emails to slog through12:32
dholbachgood luck with those :)12:33
dpmdholbach, weird, as the errors weren't triggered with the first rev1 upload12:35
dpmthanks for digging it out12:36
dholbachdpm, let me doublecheck - it could be that click-reviewers-tools didn't have the check at the time :-)12:36
=== chihchun is now known as chihchun_afk
dpmok!12:40
dholbachdpm, looks like the old snap has the same problem12:42
dpmstrange, no errors were triggered on the rev1 upload12:42
noizerzyga: ok so I don't need to change the apparmor from my snap because there are some other things thats needs to be done?12:46
zyganoizer: no, you didn't understand what I said; I think it *is* possible technically but you have to figure out the right aa syntax by youreself12:55
zyganoizer: I don't know how to do this FYI12:56
noizerzyga ok thx in advance12:56
ogra_mvo, http://cdimage.ubuntu.com/ubuntu-core/daily-preinstalled/current/ ... done ... all os and kernel snaps are now published there13:11
ogra_(now onward to creating the dragonboard kernel.snap ... )13:12
dholbachdpm, sorry didn't see your reply... as I said earlier: I think back when you uploaded rev1, click-reviewers-tools probably didn't have this check - it was added quite recently13:19
dpmdholbach, ah, thanks. I had seen it, but somehow I hadn't connected the two. I'll blame it to multitasking rather than admitting I misread it :)13:20
dholbachno worries :)13:20
dholbachI just checked - there were 9 days between the uploads - an eternity in snappy's world :-P13:21
mvoogra_: nice13:23
* ogra_ tries a test build 13:23
ogra_ubuntu@localhost:~$ snappy list13:24
ogra_Name               Date       Version      Developer13:24
ogra_canonical-pc       2016-02-02 3.0          canonical13:24
ogra_canonical-pc-linux 2016-03-10 IOTfGNaBRCTJ sideload13:24
ogra_ubuntu-core        2016-03-10 IOTfGOFdgPKF sideload13:24
ogra_boots :)13:24
mvodholbach: that are the 9 days in which we rewrote it in hylang13:24
dholbachmvo, good to hear you're focusing on the important stuff :-P13:25
ogra_hylang ? not perl ?13:26
ogra_hmm, webdm still not proted to interfaces ?13:27
ogra_funny how all snaps are pretty exactly 20MB smaller than their tarball equivalents ... that seems to be constant, not actually a percentage or anything13:29
techrafhello, I'm new here13:43
ogra_hello techraf13:44
kyrofaHey techraf, welcome!13:44
techrafI was trying to create example snaps -> with snapcraft 2.0 I could "snapcraft snap" and had .snap in result13:44
techrafthe same "snapcraft snap" 1.0 does not produce anything13:45
techrafat least it does not create .snap13:45
kyrofatechraf, right, the command-line is a little different in 1.x13:45
kyrofatechraf, try just `snapcraft`13:45
kyrofatechraf, the actual step in 1.x is called "assemble," but calling snapcraft with no arguments is equivalent13:46
techrafsnapping...13:46
kyrofatechraf, `snapcraft --help` might be useful13:47
kyrofatechraf, compare the output between versions, you'll see similarities13:47
techrafwill do, success so far13:48
techrafyou helped me much, thank you13:48
kyrofatechraf, any time :)13:49
zygajdstrand: hey13:50
zygajdstrand: I've send you a ping on github for a code review13:51
zygajdstrand: it's not urgent but I'd love if we could spend a moment to go over the code there13:51
zygajdstrand: and ensure it's all good13:51
kyrofadidrocks, how are things going for you this week? Examples still coming along?13:54
jdstrandzyga: sure thing14:04
jdstranddholbach: can you give me the snap?14:06
jdstrandnoizer: hey, as mentioned, you are pretty outside of snappy atm and this is the snappy channel. since your questions are now of the form "how to profile with apparmor" I suggest taking a look at 'man apparmor.d' and bringing your questions up on #apparmor on oftc14:08
jdstrandnoizer: also, I saw your paste and you need to use 'plugs' instead of 'slots'14:10
jdstrandnoizer: be sure you are using snapcraft 2.414:11
noizerjdstrand I am using now snapcraft 2.414:11
noizerjdstrand: I am trying some things but now without any success xD14:12
jdstrandnoizer: I would start with using plugs instead of slots, otherwise you get the default confinement. also, you can see what confinement is bing used in /var/lib/snappy/apparmor/profiles14:15
jdstrandbeing14:15
jdstrandoh, that was in the wiki page I gave you yesterday14:16
jdstranddpm: you asked for someone to push the calculator through. did that happen? when I looked it wasn't showing up for review. if it didn't happen, can you request a manual review?14:17
noizerjdstrand: I saw that today and now I am using plugs. and my apparmor changes14:19
jdstrandok good. now you are in the realm of how to profile14:19
jdstrandthat is where #apparmor can help14:19
noizerOk is that from snappy developers too?14:20
jdstrandnoizer: that is what I was saying you should take to #apparmor on oftc14:22
jdstrandthat has apparmor developers and community14:22
dholbachjdstrand, I did a fresh checkout from c-r-t and ran ./bin/click-review on the .snap from https://myapps.developer.ubuntu.com/dev/click-apps/4630/rev/2/14:39
dholbachwith the installed version (0.38 from xenial) it does not crash14:40
zyga-phonejdstrand: thanks14:41
jdstrandmvo: are paths like this intended: /etc/systemd/system/snaps-cap\x2dtest.sideload-LSXRFfhCCLCY.mount14:49
jdstrandmvo: the '\x2d' is causing bzr (etckeeper) to crash14:49
jdstrandand it isn't clear why '-' is being escaped there and nowhere else14:50
jdstrandunless you are using '-' as a delimiter, in which case I would suggest '_', since that isn't an allowable char in the snap package name14:50
jdstrand(or some other not allowed char)14:51
jdstranddholbach: when you checked out crt and did ./bin/click-review, did you set PYTHONPATH? if not, you need to: PYTHONPATH=./ ./bin/click-review /path/to/snap14:52
dholbachjdstrand, oh?14:53
dholbachsince when?14:53
jdstrandalways14:53
zyga-phonejdstrand: sounds like misisng setup.py --develop in hacking docs14:53
jdstrandotherwise you end up using what is in /usr14:53
dholbachhohum14:53
zyga-phonedholbach: this is typical to all python code14:53
dpmjdstrand, dholbach helped me on this. I hadn't realized last night that I needeed to explicitly say "Request manual review". The apps are now published. We still don't know what the issue with the checksum is, but at least the published apps work as opposed to the old ones not working after the plugs<->slots change14:54
dholbachjdstrand, confirmed14:54
dholbachthanks14:54
jdstranddpm: you went offline before I could respond. the checksum issue is https://bugs.launchpad.net/ubuntu/+source/click-reviewers-tools/+bug/155530514:55
ubottuLaunchpad bug 1555305 in click-reviewers-tools (Ubuntu) "resquashfs test fails if snap has symlinks" [High,Confirmed]14:55
noizerjdstrand pff there aren't many people on #apparmor14:55
jdstrandnoizer: on OFTC?14:55
jdstranddpm: I have disabled the test for now until I can fix that14:56
dpmok, thanks14:56
noizerjdstrand: sorry did some typo14:56
jdstranddholbach: ok, with PYTHONPATH, I can confirm it as well14:57
jdstranddholbach: I don't recall, did you file a bug for this? if not, don't worry about it14:58
mvojdstrand: I think the pats are the result of calling systemd-escape15:00
jdstrandhrm15:04
jdstrandI guess I'll file a bug against bzr and workaround it15:04
didrockskyrofa: hey! More busy with the developer website content. On the examples, I'm waiting for the poll feedback we launched with dholbach first to see if people like them :)15:08
kyrofadidrocks, awesome!15:08
kyrofadholbach, how is that poll coming? I'm looking forward to seeing that myself15:10
jdstranddholbach: oh, heh, nm, I typoed PYTHONPATH. it works fine here, so nothing to do15:11
zyga-phonejdstrand: I'll dive into more coding, ping me when you have a moment to go through that diff15:17
kyrofadholbach, do the review tools catch symlinks that point outside the snap?15:17
dholbachkyrofa, yes15:20
jdstrandzyga-phone: yeah, haven't gotten out of email and irc pings yet15:20
kyrofadholbach, ALL of them, no allowed whitelist or anything?15:20
dholbachkyrofa, there's a whitelist15:21
kyrofadholbach, oh darn, that throws a wrench into my plans. Can I have a look at that list?15:22
elopiohey kyrofa, you are back. I'm sorry, I assume we wouldn't have standup today.15:23
kyrofaelopio, I am indeed! And that's okay :)15:23
elopioI'll make it on time tomorrow.15:23
dholbachkyrofa, http://bazaar.launchpad.net/~click-reviewers/click-reviewers-tools/trunk/view/head:/clickreviews/common.py#L63115:23
kyrofadholbach, excellent thank you :)15:24
kyrofaelopio, how has the week been going?15:24
kyrofaI finally made it through my emails, looks like we cranked out 2.4, nice15:24
elopiokyrofa: yes, thinks are looking good. I'm still blocked on the closed ports to test the http examples, but most of the tests are running now.15:27
elopiosergio is doing good progress on the kernel, he said it's almost ready.15:27
kyrofaelopio, yeah I just looked through it15:28
kyrofaelopio, no tests to speak of, but the code is looking pretty good15:29
kyrofaelopio, and looks like you were able to greatly speed up travis tests, eh? Needs a rebase though15:34
=== ken__ is now known as kenvandine
elopiokyrofa: yes, it's running again.15:43
elopioI'm sad because we are no longer running on xenial, but I hope they will just update the machine in april.15:43
kyrofaelopio, don't get your hopes up-- I think they still run on 12.04 by default unless you request trusty15:45
kyrofaelopio, I get the impression that their architecture is very tightly integrated15:45
elopiothey are still calling them beta, the trusty machines...15:47
elopiobut it's GCE. I see no possible way it will be different to manage a xenial in there.15:47
elopioI'm also sure they can prove me wrong :)15:48
kyrofaelopio, heh15:49
varaindemianis ubuntu trying to simlify the building process from source code? Is it trying to make something like "ports"/ABS-arch?16:00
zygavaraindemian: no16:01
varaindemianzyga, is ubuntu core a different os or is part of ubuntu?16:02
ogra_it is a new type and setup of ubuntu (not using apt/dpkg in the runnung system, special filesystem setup, all the shiny new features of teh snappy package manager) but still ubuntu16:03
geniivaraindemian: http://www.ubuntu.com/internet-of-things16:04
varaindemianogra_, so ubuntu 16.04 lts won't have the snappy sotre16:08
varaindemianstore16:08
varaindemianogra_, right?16:08
ogra_the snappy packagemanager will be shipped in ubuntu 16.04 installs16:08
ogra_so you can indeed use snap packages from the store16:08
varaindemianogra_, oh, so I cna build packages for my own system right?16:09
ogra_(on these systems thats additionally to dpkg packages)16:09
ogra_yeah16:09
ogra_you can use snapcraft to package up your github projects as snaps16:09
ogra_(or whatever other projects yoou have)16:09
varaindemianogra_, nice and the building process from source code will be simplified?16:09
ogra_yeah, snapcraft makes that pretty automated16:09
varaindemianso cool16:10
ogra_you create a yaml file that describes the build and just run the snapcraft tool in your workdir ... out comes a snap :)16:10
varaindemianogra_, Really really interesting. How would that differ compared to an os that uses "ports like" system?16:12
ogra_dunno, i never used a "ports like" system16:12
ogra_what you deal with are binary packages though ... the store also doesnt care about source (you can even snap up complete binary blobs if you want)16:13
ogra_snapcraft just makes it easy to create them but source isnat mandatory16:13
ogra_*isnt16:13
ssweenyjdstrand, I'm trying to build location-service in snappy for 16.04 and it seems to want to link against libapparmor.a rather than the shared library. As best I can tell when I stage apparmor-dev in snapcraft something isn't running that sets up the unversioned .so symlink in /lib/<triplet>. Have you seen this sort of thing before?16:16
=== JanC_ is now known as JanC
ssweenyis it that staged packages are just unpacked and no scripts or triggers are run?16:17
kyrofassweeny, you got it16:18
kyrofassweeny, they're only unpacked16:18
kyrofassweeny, no postinst, etc16:18
ssweenyhm16:18
ssweenythanks kyrofa. is there some easy way to manipulate the staged tree as part of the build? i.e. remove a file or add a symlink16:19
ssweenythis is the only library that has an issue for me while building16:19
kyrofassweeny, I typically install the -dev packages as build-packages and only include the runtime packages as stage-packages16:19
kyrofassweeny, have you tried that?16:20
ssweenykyrofa, I did try that but the build step was looking for stuff in stage16:20
ssweenyso I assumed I was wrong16:20
jdstrandssweeny: I haven't no. I imagine I am going to run into this on my next snappy-debug upload though, so I'm interested in what comes of this16:21
ssweenykyrofa, so the theory of operation so to speak is the build-deps go in build-packages and runtime deps go in stage-packages.16:21
ssweenyi can try it again but I'm certain it was looking for headers in stage/include/foo16:22
kyrofassweeny, indeed. Not to say that having -dev in stage would hurt anything, but it bloats your snap unless you exclude them16:22
ssweenyright16:22
ssweenyok I'll try it again. Maybe I was hitting a bug :)16:23
ssweenythanks kyrofa16:23
ssweenyjdstrand, i'll let you know what I find16:23
kyrofassweeny, yeah let me know as well16:23
ysionneaudo I understand correctly that it's not yet possible for an app to bind a unix socket?16:30
ysionneauthe unix-listener policygroup is marked as # TODO16:32
ysionneauand I get a "denied" for this: Mar 10 16:24:48 localhost kernel: [182550.868636] audit: type=1400 audit(1457627088.221:21): apparmor="DENIED" operation="bind" profile="wifid.sideload_foreground_LSbLDVfnJSlm" pid=2988 comm="ld-linux-armhf." family="unix" sock_type="stream" protocol=0 requested_mask="bind" denied_mask="bind" addr="@77696669640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000016:32
jdstrandysionneau: on 16.04 all of this is in flux. unix-listener is actually going away and there will be a proper interface for this16:33
ogra_inter-app sockes within the same snap should be possible though ...16:33
ysionneaujdstrand: ok thx16:33
jdstrandogra_: yes, but perms need to still be allowed16:33
jdstrandit is being worked through16:34
ogra_oh, even if the socket sits in SNAP_DATA ?16:34
jdstrandysionneau: today, use a named socket16:34
jdstrandif that is possible16:34
jdstrandsince only file rules are in effect with those16:34
jdstrandysionneau: let me check the default policy real quick16:35
jdstrandogra_: this is an abstract socket16:36
ogra_oh, right16:36
jdstrandneither 15.04 nor 16.04 allow binding to an abstract unix socket. 16.04 will have an interface for that16:38
jdstrandbut like I said, it should work if you use a named socket16:38
jdstrand(iirc)16:38
jdstrandzyga: ok, I'm going to go pretty deep on this review and really study how things are being put together (except perhaps the xmanager bits)16:40
ysionneaujdstrand: ok thanks!16:42
ysionneauwill try with a named unix socket16:42
zygajdstrand: thank you17:19
zygajdstrand: feel free to pull me in and ask any questions17:19
zygajdstrand: I have more aa-specifc patches piled, about to be pushed out soon17:20
zygajdstrand: ( https://github.com/ubuntu-core/snappy/pull/635 ) for later17:27
=== chihchun_afk is now known as chihchun
jdstrandack17:32
=== chihchun is now known as chihchun_afk
zygajdstrand: thanks17:33
zygajdstrand: also FYI, for some context how I plan to plug it together, look at this list of TODOs (before it gets stale) https://github.com/zyga/snappy/blob/master/overlord/ifacestate/ifacemgr.go#L9317:36
jdstrandok17:36
kyrofaelopio, I just shared a google doc with you regarding the dirty build redesign17:44
kyrofaelopio, essentially a distilled problems/solutions doc17:45
kyrofaelopio, mind taking a look?17:45
rajenHi folks..I am seeing apparmour issues using new ubuntu-core image17:46
rajenAny guidance would be of great help17:46
rajenWe are running our app unconfined as of now17:46
rajendmesg shows a lot of audit messages17:47
rajenhttp://pastebin.com/nQvfDhX517:48
zygaelopio: it's not urgent (next week) but I'd like to write a few integration tests17:49
zygaelopio: and I could use a quick interactive session with you17:49
zygaelopio: my goal is to write a test that checks that udev/apparmor support fuctions really work; this basically means setting up some files, calling a function from snappy and then checking that some stuff happened (either with more snappy functions or just with brute-force helper shell command/file poke)17:50
zygaelopio: when would be the best time to try this?17:50
kyrofarajen, install snappy-debug (snappy install snappy-debug) and run sudo snappy-debug.security scanlog17:52
kyrofarajen, wait... those messages are fine, they're just loading profiles and stuff17:53
rajenHere is the latest from scanlog http://pastebin.com/tAgMJX5D17:53
jdstrandrajen: is this on 16.04?17:55
rajenYes 16.04 daily build17:55
jdstrandyeah, it needs to be updated17:55
jdstrandlet me do that real quick17:55
rajenI picked the image an hour back from  http://cdimage.ubuntu.com/ubuntu-core/daily-preinstalled/current/17:56
jdstrandrajen: ok, update to snappy-debug 0.1318:01
jdstrandit needed the to be updates for interfaces work18:02
jdstrands/the //18:02
rajenjdstrand: Yeah Now I see better scalogs18:02
rajenI see a lot of DENIED logs18:03
rajenjstrand: Here is  a sample from the long logs http://pastebin.com/yRJi4GMD18:04
rajenjdstrand: Do I have to update my snapcraft.yaml for it to work on new image? I am using slots and my snap app is working from on an ubuntu-core image 3 days back.18:08
jdstrandrajen: likely-- can you paste it?18:08
ssweenykyrofa, using build-packages instead of stage-packages I'm getting cmake errors in the config stage. -lpthread failing and whatnot. Looking at the error log I'm seeing stuff like:18:09
ssweeny /usr/bin/cc   -I/home/ubuntu/location-service/trunk/snappy/stage/include -I/home/ubuntu/location-service/trunk/snappy/stage/usr/include -I/home/ubuntu/location-service/trunk/snappy/stage/include/x86_64-linux-gnu -I/home/ubuntu/location-service/trunk/snappy/stage/usr/include/x86_64-linux-gnu   -Wall -pedantic -Wextra -fPIC -DCHECK_FUNCTION_EXISTS=pthread_create   -o CMakeFiles/cmTryCompileExec495151839.dir/CheckFunctionExists.c.o   -c18:09
ssweeny/usr/share/cmake-3.2/Modules/CheckFunctionExists.c18:09
rajenjdstrand: http://pastebin.com/reRMKXHC18:09
ssweenykyrofa, so it's definitely looking for -dev stuff in stage18:10
jdstrandrajen: yes. replace 'slots' with 'plugs'18:10
kyrofassweeny, sure it looks there, but it also looks in the standard places18:10
jdstrandrajen: in both places. that was very similar to what I had to do for snappy-debug incidentally. (the slots<->plugs rename is in the image now)18:11
rajenjdstrand: Yay! Works now.18:12
rajenThanks for the help.18:12
jdstrandnice :)18:12
elopiozyga: I'm here just for that, so you chose the date and time. I usually start working at 14UTC, but I can adjust my working times easily too.18:12
elopiozyga: we have a really simple test for hardware assign that we can use as a base: https://github.com/ubuntu-core/snappy/blob/master/integration-tests/tests/hwAssign_test.go18:13
elopiokyrofa: looking18:14
ssweenykyrofa, at least in the logs it's not looking outside of stage18:17
kyrofassweeny, the -I arguments ADD to the system include dirs-- it doesn't replace the18:18
kyrofam18:18
zygaelopio: cool, let's aim for Tuesday18:24
zygaelopio: I'll sync with you before that happens18:24
elopioperfect. Thanks zyga.18:25
ssweenykyrofa, well I can't think of why it would fail then. I have libc6-dev installed on that system18:29
kyrofassweeny, any chance you could share both your project and the build log?18:30
kyrofassweeny, happy to look into it :)18:30
ssweenykyrofa, sure. let me push my branch up18:31
ssweenykyrofa, my branch is here: https://code.launchpad.net/~ssweeny/location-service/snapcraft-2.3 and it looks like you were right about includes. I was reading too much into CMakeErrors.log. However that just means I have no idea why my build is failing :)18:53
kyrofassweeny, checking it out now18:57
ssweenykyrofa, many thanks18:57
kyrofajdstrand, I assume I just hit bug #155530519:01
ubottubug 1555305 in click-reviewers-tools (Ubuntu) "resquashfs test fails if snap has symlinks" [High,Confirmed] https://launchpad.net/bugs/155530519:01
kyrofajdstrand, I requested a manual review (owncloud.canonical). Mind taking a look?19:02
kyrofassweeny, what is your intention with this glue part?19:05
ssweenykyrofa, I think that's leftover from an earlier version when we didn't know how to expose the binaries properly :)19:06
kyrofassweeny, ahh, okay. Well first off, this is the first YAML I've seen in a subdirectory. I won't be surprised if that's the cause of your issues19:07
ssweenykyrofa, moving the yaml to the top-level dir didn't change anything19:10
kyrofassweeny, sorry, got a few thing going at once, still investigating19:20
ssweenykyrofa, no worries. it might be a legitimate build failure actually. Some "recipe failed" lines were obscured by the jumbled "-j8" output19:21
kyrofassweeny, huh. I assume you're tried outside of snapcraft though?19:22
ssweenykyrofa, yeah it builds fine in a normal cmake environment19:22
ssweenykyrofa, even weirder is I was able to get it to build when the build-packages were stage-packages19:23
elopiokyrofa: Sergio will be super happy.19:24
kyrofaelopio, think so? Most of that sound okay?19:27
kyrofaelopio, I tried to reply to your comments19:27
elopiokyrofa: everyting sounds great.19:27
kyrofaelopio, thanks for taking a look! :)19:29
kyrofassweeny, does this look like your build log? http://pastebin.ubuntu.com/15343243/19:30
ssweenykyrofa, yep that's it19:32
kyrofassweeny, because dbus/dbus.h is not in the standard include paths19:32
kyrofassweeny, it's core/dbus/dbus.h19:32
jdstrandpindonga: I've got one more for you: r60619:32
jdstrandpindonga: adjustment for recent snap.yaml changes19:33
pindongagood thing I had such a busy today that I didn't even get to your previous request :/19:33
jdstrandyay?19:33
pindongajdstrand, and unfortunately, looking at things we won't be able to update until monday19:33
pindongabut I'll make sure it's top prio for early next week19:33
kyrofassweeny, also, may I express my sympathies for needing to deal with dbus-cpp and the trust store19:33
ssweenykyrofa, haha, thanks19:34
jdstrandpindonga: thanks! I wish I could say that there weren't go to be more requests of the next couple weeks, but things continue to change fast19:34
jdstrandgoing*19:34
kyrofassweeny, okay, so this is interesting19:35
jdstrandkyrofa: approved19:35
kyrofajdstrand, many thanks!19:35
jdstrandnp19:35
ssweenykyrofa, i like interesting19:35
kyrofassweeny, I may have been right about how -I added to the system includes rather than replacing them, but you were still right about it using the stage directory. /usr/include/dbus-1.0/ contains dbus/dbus.h, and it's added to the include path, but _within stage_19:36
tvosso/19:36
kyrofassweeny, my question is: Why?19:36
pindongajdstrand, nw19:37
kyrofassweeny, looking at the cmake output, it says it found dbus-cpp19:37
pindongajdstrand, I wish we had taken the time back then to automate the pulling of new crt revnos19:37
pindongainstead of tying it to the normal deployment cycle19:38
kyrofassweeny, but then the paths that get tacked on are in stage rather than the system paths19:38
pindongabut then... :)19:38
kyrofassweeny, ah, it uses pkg-config it seems?19:38
kyrofassweeny, this may indeed be a bug19:38
ssweenywoo hoo I found a bug!19:39
ssweenysecond one i found today :)19:39
kyrofassweeny, may, I say!19:39
ssweenykyrofa, fair enough19:39
kyrofa:P19:39
jdstrandpindonga: yeah, well, hopefully it'll calm down a bit. I mean, click checks aren't updated very often19:39
kyrofassweeny, just a sec, this touches a bit of snapcraft code I'm not super familiar with19:39
jdstrandso after GA, I expect things to calm down a lot19:40
* kyrofa gets familiar19:40
zyga-phonejdstrand: thanks for reviewing the branch; do you want me to merge it and follow-up with isolated changes or do you want me to pile them in the same pull request?19:51
naduI'm looking for information about security updates and auto updates. Can anyone help?19:58
zyga-phonenadu: what do you want to know19:58
kyrofassweeny, yup, bug. Snapcraft sets PKG_CONFIG_SYSROOT_DIR to the stage dir20:01
naduIs there something similar to unattended-upgrades and how are security upgrade applied?20:01
zyga-phonenadu: snappy updates all snaps automatically20:01
zyga-phonenadu: it's on by default20:01
ssweenykyrofa, aha!20:01
zyga-phonenadu: security updates are rolled out as new versions of the os/kernel snaps20:01
zyga-phonenadu: also, snappy reboots automatically to upgrade kernel/os20:02
zyga-phonenadu: so you plug it in and it's on and secure by default20:02
nadusounds cool20:02
naducan I chroot into a docker container?20:02
zyga-phonenadu: for other snaps the same thing happens but there's no reboot required, vendors are responsible for updating their software though20:02
kyrofassweeny, so you know that advice I gave you about having -dev packages as build?20:03
zyga-phonenadu: yes, you can use docker, lxd or you can use the classic dimension which gives you classic ubuntu directly on any snappy hsot20:03
kyrofassweeny, ignore it in this case I guess :P20:03
zyga-phonehost*20:03
ssweenykyrofa, haha20:03
kyrofassweeny, I'm not sure how to get it to work in both cases, though20:03
kyrofassweeny, I'll have to give it some thought. Log a bug for us?20:03
ssweenykyrofa, sure20:03
kyrofassweeny, thank you!20:04
ssweenykyrofa, no thank YOU20:04
ssweenyi thought i was losing my mind20:04
naduzyga-phone: I'd like to do some configuration changes to a docker container without typing docker exec containername everytime20:04
zyga-phonenadu: I don't know how that's related to snappy20:05
ssweenykyrofa, of course now I have the problem of libapparmor not being set up correctly when unpacked20:06
ssweenyso i'm back where i started :)20:06
naduzyga-phone: you're right :)20:07
kyrofassweeny, yeah that's annoying. You can probaby hack Snapcraft a little to work with the build packages if you want20:08
kyrofassweeny, basically, just comment out line 366 in /usr/lib/python3/dist-packages/snapcraft/yaml.py20:09
kyrofassweeny, see if that works better20:09
naduhow can I print more information about a snappy packages? for example getting the maintainer?20:11
zyga-phonenadu: each snap has a vendor field20:11
zyga-phonenadu: snaps don't have maintainers20:11
zyga-phonenadu: snaps are binary packages, not source packages20:12
zyga-phonenadu: how you build your snaps is not important to snappy itself20:12
ssweenykyrofa, yep that fixes it20:12
zyga-phonenadu: you can check the snap meta-data in snapcraft (2.x) documentation20:12
zyga-phonenadu: I'm sorry, I don't have a link handy20:13
kyrofassweeny, but of course, breaks it if you have .pc files in stage-packages20:13
ssweenyof course20:13
zygajdstrand: thanks, I love how all of this is starting to take shape20:21
zygajdstrand: I replied to your Unload() question; I think it's fine to still merge this; we'll do a full pass over the security side of interfaces as things get glued20:23
ssweenykyrofa, looks like someone already found this issue: https://bugs.launchpad.net/snapcraft/+bug/154957020:24
ubottuLaunchpad bug 1549570 in Snapcraft "pkg-config across multiple sysroots" [High,In progress]20:24
jdstrandzyga: yeah, it is feeling like it is coming together20:28
jdstrandzyga: btw, when do you think that old-security/caps will go away? I'm trying to decide if I should upload an ubuntu-core-security with my new x and unity7 policy20:28
jdstrandzyga: this isn't pressure btw, it is just info for me to decide my next steps20:29
zygajdstrand: old-security will *probably* remain for a while but will get migrated over to interfaces as a native kind20:30
zygajdstrand: as to where we want to remove it entirely, I don't know -- I suspect it will live on for 16.0420:30
naduzyga-phone: got it20:30
zygajdstrand: but we'll trigger manual review and just stop allowing it20:30
zygajdstrand: sure, no worries, I think we have a good cooperation flow :)20:30
naducan I install vim to ubuntu-core?20:30
jdstrandwell, we agreed old-security will exist for a while for security-override and security-policy, but I thought old-security/caps and old-security-security-template were going away as soon as these native interfaces were in place20:30
zygajdstrand: mmmm20:31
zygajdstrand: perhaps, if only because some of those would be hard to support20:31
zygajdstrand: e.g. we'd have to parse and rewrite them partially20:31
jdstrandzyga: any way, the removal was actually a shorthand way of asking the question. I'm trying to decide if I should update ubuntu-core-security or if ubuntu-core-security is going away very soon cause of the interfaces work20:31
zygajdstrand: that's a curious question20:32
zygajdstrand: do you need u-c-s for click?20:32
jdstrandno20:32
zygajdstrand: or is the phone using something separate?20:32
jdstrandphone uses other stuff20:32
jdstrandthe last thing we want is duplicated policy between ucs and snappy20:32
zygajdstrand: then I think it's slowly going to become unused20:33
jdstrandso I wanted to know when the snappy stuff was going live20:33
zygajdstrand: ASAP20:33
zygajdstrand: as soon as we glue it together20:33
zygajdstrand: 16.04 ships with this20:33
jdstrandyes20:33
jdstrandhehe20:33
jdstrandis it hours, days or weeks?20:33
jdstrandif days, how many?20:33
zygadays20:33
zyga2-320:33
jdstrandok, then I'll hold off20:33
zygabits are missing20:33
zygain other parts of snappy20:34
zygain particular install/remove need to move over to the state engine first20:34
zygaat least a little bit so that interfaces can "see" the snaps that are in the current state20:34
jdstrandzyga: but so we are clear-- you are going to move all the policy that is in ubuntu-core-security to native interfaces, correct20:34
jdstrand?20:34
jdstrand(in the trunk branch that I pointed you to)20:34
zygajdstrand: yes20:35
jdstrandok20:35
zygajdstrand: it was only nacked by gustavo last time to have me focus on bringing last bits of glue needed20:35
zygajdstrand: as soon as 1st interface works end-to-end I'll pull all the others over20:35
zygajdstrand: (which is simple then)20:35
jdstrandzyga: and behind the scenes, old-security/caps will actually map to the native interfaces (and old-security/security-template is a noop/goes away)? (ie, so ucs can go away and we don't have to keep it and snappy in sync?20:36
zygajdstrand: I think that old-securtiy will become a native interface called "old-security" that emits particular security snippets20:36
zygajdstrand: perhaps with a bit of parsing here and there20:36
zygajdstrand: old-security as in the current codebase in snappy/ will go away sooner20:37
zygajdstrand: we'll keep the feature, switch implementations20:37
jdstrandwe can discuss that later-- so long as old-security/caps isn't using the old code that grabs policy from ucs, that is good enough for me for now20:37
zygajdstrand: so that any and all security related aspects will go through the interfaces/**.go20:37
zygajdstrand: yep20:37
jdstrandright, sounds good20:37
zygajdstrand: that's guaranteed20:37
jdstrandok, thanks!20:37
* zyga wishes to see the day where big git rm -rf will happen20:38
zyga:)20:38
zygajdstrand: btw, while we're on the topic: https://github.com/ubuntu-core/snappy/pull/636/files20:39
zygajdstrand: this one is shorter, this is the code that will reload udev rules after any rules get touched20:39
zygapitti: hey, could you please have a look at https://github.com/ubuntu-core/snappy/pull/636#discussion-diff-55722473R2621:06
zygapitti: and weigh in with your udev experience?21:06
=== Guest51142 is now known as devil__
zygajdstrand: thanks!21:37
jdstrandnp21:38
kgunnhey all what's the _current_ way to remove an installed snap? sudo snap remove snap-name...giving me not found when it's clearly installed21:49
ogra_kgunn, "snappy remove ... "22:48
kgunnta22:49
kgunnogra_: confusing with snap and snappy :)22:49
ogra_well, naming isnt our strength in snappy (see the security ...)22:49
ogra_:)22:49
ogra_capaskillfaces with plugslots :P22:50
zygaogra_: you confused plugslots with slotplugs23:05
zygaogra_: snappy and snapd as commands are going away (from PATH)23:05
zygaogra_: snap is the only thing that people will tab-complete23:05
ogra_zyga, in 4 months :P23:07
zygaogra_: no, more like in the next few days23:07
zygaogra_: all of install/remove/config/etc ops are available in the rest api23:07
zygaogra_: and exposed via snap23:08
* ogra_ wishes back blueprints ... where things were well defined, discussed early and written down in a public place :P23:08
zygaogra_: well, we still discuss and refine but it's not like we have a grand plan for each detail for the next 6 months anymore23:09
zygaogra_: too hard to do that23:09
zygaogra_: too inflexible23:09
ogra_you discuss at some obscure sprints ...23:09
ogra_and then someone writes down something in some well hidden google doc23:09
zygaogra_: I discuss most of my stuff on github23:09
zygaogra_: those are drafts, they trigger coding and feedback cycle23:10
zygaogra_: wanna look at some of the security work I'm doing with jdstrand? https://github.com/ubuntu-core/snappy/pull/61723:10
ogra_well, i see very rarely any discussions of implementation in here23:10
ogra_but i kind of started to give up caring since i'm in this team23:11
zygaogra_: that's true23:11
ogra_everything got way to opaque23:11
zygaogra_: tradeoffs for hard deadlines, I don't think we could have made snappy the old way we made ubuntu before, not this time23:12
zygaogra_: doesn't mean we'll work this way all the time either23:12
* zyga -> shower23:12
* ogra_ TV 23:12
ogra_:)23:12
* zyga -> EOD23:54

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