/srv/irclogs.ubuntu.com/2018/03/01/#snappy.txt

nacchrm, why did my snap that just built get a version of 0.7.1-dirty? it's building via a LP build recipe and when I built the 0.7 version it built fine (as 0.7)00:37
naccit also blew up by 10 M when it shouldnt' have00:41
nacci dont' understand how snapcraft would ever emit a -dirty version for a git repo00:49
naccseems like something is busted00:50
naccand uh, like half my parts didn't build?00:54
naccdid something happen to change on LP between the two runs I just did?00:55
nacccjwatson: --^ you may have some idea (i assume you're not around now, but maybe you would be later)00:58
kyrofawgrant, same thing happened again with rev 5445 of nextcloud, blocking reviews again :(01:09
wgrantkyrofa: afk atm, will look in more depth when I'm back01:12
wgrantnacc: nothing's changed in LP there recently. compare logs?01:13
naccwgrant: yeah i'll have to -- makes no sense01:13
nacca build an hour ago worked fine01:13
stgraberhmm, why is s390x snap builds broken now?01:23
stgraber"Could not find a required package in 'build-packages': patchelf"01:23
stgraberit's not something the LXD snap itself is using, so wondering if snapcraft got updated and is unhappy on z somehow?01:23
stgraberhmm, or is it an external parts that's broken maybe? /me checks01:24
stgraberhmm, nope, doesn't appear to be coming from lxd or from the one external part we're using (go)01:25
stgrabersergiusens: ^ any ideas?01:25
sergiusensstgraber: oh, this is unfortunate, I'll have to propose a fix for that01:26
stgrabersergiusens: is that going to affect all s390x builds? if so, that's a bit of a problem :)01:26
sergiusenswe don't have good testing infra for z to actually notice in this unfortunately01:27
sergiusensyes01:27
sergiusensstgraber: do you have a way test snaps on s390x builds?01:27
stgrabersergiusens: I have s390x systems, yeah01:28
sergiusensstgraber: lucky you; it is kind of late here, but I'll work on a quick fix tomorrow morning; if you are really in a hurry, I guess we can ask for a revert of the SRU01:30
stgrabersergiusens: is that an option for you? (revert)01:31
stgraberif so, I can do it pretty trivially using a cheap revert method, so not uploading a reverted package (because that makes the versioning crazy) but just remove the current SRU and publish the previous one again01:32
sergiusensstgraber: I can push a version that potentially fixes this, it is one line of code01:33
stgrabersergiusens: ah, give me a diff and I can test it for you01:33
sergiusensstgraber: http://paste.ubuntu.com/p/sc9TfT5sCG/01:36
sergiusensstgraber: in retrospect this could have been an arch specific Depdends :-/01:37
stgraberok, that got me past the error, will see if the rest works, but it should01:37
stgrabersergiusens: do you have upload rights to push that or should I do it?01:38
sergiusensstgraber: I do; your snap is not classic so it should just work01:38
stgrabersergiusens: ok, if you upload a fix I can let it in and then push it straight to -updates once it's built01:39
sergiusensok, one sec01:40
sergiusensstgraber: before dputting, care to corroborate this https://paste.ubuntu.com/p/VydCV8ssZr/01:45
stgrabersergiusens: LGTM01:46
sergiusensstgraber: awaiting approval01:48
stgraberaccepted01:49
stgraberwill wait for it to build and publish, then will release it into updates01:49
sergiusensstgraber: great thanks01:50
sergiusensstgraber: also, most of all, sorry for all of this; I think we should talk about this next week01:50
stgrabersergiusens: I thought that snapcraft had an autopkgtest suite, shouldn't that have caught it on s390x?01:53
stgraberand no worries, it's an easy enough fix, it's just a bad time for us as we're moving a lot of stuff around and are about to release betas for all our repos so want to make sure everything builds properly everywhere as we do that :)01:54
sergiusensstgraber: hey, sorry, dozed off for a bit, long day. We do have tests, but most of the things we build has always been red on s390x (we need to scope it down with some skips, but the release team preferred that we slowly fixed them)02:20
sergiusensI am heading out, if it still doesn't work, feel free to go ahead and revert02:20
naccwgrant: i think it's the snapcraft SRU02:24
nacctotally broke my snap :/02:24
naccwgrant: yeah ,i think my system at home hasn't received the update yet (nor has our CI based builds) so it isn't breaking, but ftpmaster.internal had02:27
naccstgraber: --^ i guess sinc eyou were looking at it, something to worry about02:27
naccclassic snap that is not dirty is getting marked as -dirty and the python plugin behavior has apparently changed (at a minimum)02:28
wgrantnacc: Ah, ouch.02:31
naccwgrant: i'm fairly sure, at least. I think I just happened to hit a weird window on ftpmaster02:36
wgrantnacc: Yeah, totally makes sense.02:59
wgrantkyrofa: Another compute node reboot semi-broke snap storage again, fixing.03:07
stgrabernacc: hmm, odd, something to look at after the s390x fix I guess03:11
stgrabernacc: lxd doesn't seem to hit that -dirty issue somehow03:14
naccstgraber: it's not a classic snap is it?03:32
nacci wonder if it only is hitting classic somehow03:32
naccLP: #1752481 filed03:32
mupBug #1752481: Regressions in 2.39.2 in xenial-updates in classic snaps (relative to 2.35) <snapcraft (Ubuntu):New> <https://launchpad.net/bugs/1752481>03:32
stgrabernacc: yeah, lxd is strictly confined03:41
naccwgrant: hrm, are reviews backed up again? I have a few git-ubuntu ones that seem to be queued for longe rthan ormal05:30
naccintersting LP reports that as a store upload failed, although the store found it05:31
nacchttps://launchpad.net/~usd-import-team/+snap/git-ubuntu/+build/15816105:31
nacc(i rejected it manually)05:31
naccoh nm, that one went through05:32
wgrantnacc: Things are a bit sluggish atm but should work05:34
naccwgrant: ack, it does seem to be going through (the auto uploads from LP were hung, but i rejected those and the one i manually built was able to release)05:35
wgrantnacc: Ah yeah, looks like the stuck upload was 4h ago when things were still rather sad.05:35
wgrantRebooting 100 different parts of a system at 100 different times over two weeks exposes some amusing issues05:36
wgrantSome of which we knew about, but a couple of which we didn't...05:36
naccwgrant: ack, np!05:53
happyaronhi, is there a plan to review classic confinement requests?06:14
mborzeckimorning06:15
zygagood morning06:17
mborzeckizyga: hey06:17
zygahey :-)06:18
zyga-14 still06:18
zyga*brr*06:18
zygaman, I'm looking forward to any positive temperatures06:18
zygaeven if +106:18
mborzeckizyga: https://images.meteociel.fr/im/132/tempresult_ciz8.gif06:21
zygaI could look at that all day :)06:22
keshavhello people06:24
zygahey hey06:24
keshavhi zyga06:24
keshavam bulldog06:24
keshavam having an issue06:24
keshavam snapping an app and its not getting its desktop entry in unity menu or any other app launcher06:24
keshav@zyga my snapcraft.yaml https://paste.ubuntu.com/p/Z727mQ4B9s/06:25
* zyga honestly doesn't remember how to do desktop files06:26
zygaI know how they have to be after building06:26
zygabut I don't remember how to them in snapcraft06:26
zygalet me look06:26
keshavmy .desktop file is under snap/gui with an icon06:26
keshavokay i appriciate06:27
zygaquestion: what happens after you build?06:27
zygawhere is the destkop file relative to the top level directory of the snap06:27
zygaI found: https://github.com/ubuntu-core/snapcraft-examples/tree/master/03-hello-world-desktop-devmode06:27
keshavafter install or while building snap ?06:28
zygait has an app "hello-world-desktop" that matches the desktop file06:28
zygaafter you finish building06:28
zygawhat is in the prime/ directory06:28
zyga(I mean, what are the paths of .desktop files relative to the prime directory)06:28
keshavokay wai t06:28
zygaok06:28
keshavinside setup/gui and snap/gui06:29
keshavalso in meta/gui06:29
zygaok06:29
zygathat looks good06:29
keshavyeah but after installing the app gets no entry in menus06:30
zygaok06:30
zygaafter installing look at /var/lib/snapd/desktop/applications06:31
zygado you see your launcher there?06:31
zygaif so, look inside, does it have the Exec= line?06:31
keshavwait bro06:31
keshavnah no exec line is there06:32
zygaok06:33
zygathat means the exec line was incompatible with the snap06:33
zygaand that's why you cannot launch it from the menu06:33
zygawhat was the original exec line?06:33
zyga(in setup/gui)06:33
keshavokay wait06:33
keshavExec=Kdictionary %F06:34
zygaok, please change that to match your snap name06:34
zygaK is upper case, I suspect that's why it is being filtered out06:34
keshavdamn06:34
keshavokay let me check bro06:34
keshavyou are very helpful all the time06:34
keshavzyga all this need to be documented in snapcraft.io06:36
zygano disagreement there06:36
keshavit working now06:43
keshavty very much man06:43
pstolowskiheyas08:08
=== ubott2 is now known as ubottu
kalikianamoin moin08:09
zygahey hey08:09
mborzeckipstolowski: kalikiana: hey08:09
mvohey pstolowski - good morning08:12
mborzeckimvo: hey08:12
mborzeckihttps://github.com/snapcore/snapd/pull/4769 needs a second look08:13
mupPR #4769: wrappers: detect whether systemd-analyze can be used in unit tests <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/4769>08:13
mupPR snapd#4769 closed: wrappers: detect whether systemd-analyze can be used in unit tests <Created by bboozzoo> <Merged by zyga> <https://github.com/snapcore/snapd/pull/4769>08:20
=== LtWorf_ is now known as LtWorf
zygamvo do you have time for a 2nd review now?08:47
ackkkalikiana, so, it seems snapcraft lost the ability of building on different bases (as specified by the app's base attribute). Or is there a different way to do that now?08:50
Chipacahah! be careful how you write "is this number is smaller than -1" in go or it'll get really grumpy09:00
Chipacaand good morning09:00
zygagood morning! :)09:00
Chipaca(and because you're thinking "smaller than -1" it'll take you a while to understand)09:00
kalikianaackk: There's no such ability. Unless you're talking about Snapcraft's patching libraries to make them compatible with the target09:01
kalikianaackk: That is, you can build on different hosts, but there is no explicit support for building against a different base (yet)09:02
kalikianaChipaca: Do you have an example of that?09:02
kalikianaLike, what do you mean by grumpy09:03
Chipacakalikiana: if d<-1 { println("smaller!") }09:03
zygaChipaca so what's the catch?09:04
* Chipaca giggles09:04
Chipacait's funny how the brain works09:04
Chipacazyga: kalikiana: <- is an operator09:05
zygais d a channel? :D09:05
zygabtw, I really wished go used <= for that09:05
zyga<=shove=09:05
zyga=yank=>09:05
zyga<=poem=09:05
Chipacazyga: ⇜09:06
mborzecki<~ ~>09:06
zygagotta have your trigraphs09:06
ogra_mvo, the nightly core snap builds failed on all arches with a weird error (and i'm at embeddedworld, can't research atm) ... https://launchpadlibrarian.net/359032850/buildlog_snap_ubuntu_xenial_amd64_core_BUILDING.txt.gz09:06
ogra_OSError: [Errno 6] No such device or address: '/build/core/prime/dev/dsp2'09:06
ogra_Build failed09:06
Chipacaogra_: oh hi09:06
ogra_(or zyga if you feel like looking ... )09:06
zygahmm hmm09:07
ogra_hey Chipaca09:07
zygahey ogra_, this doesn't ring a bell immediately09:07
ogra_(this error is seriously weird)09:07
Chipacaogra_: I had a question for you, but then realised it's probably for mvo :-)09:07
Chipacaabout tweaking a file on core09:07
ogra_heh09:07
mvozyga: right now I'm working on apt :/09:07
mvoChipaca: ok09:08
mborzeckihey Chipaca, ARS is a really unfortunate abbreviation for a timezone09:08
zygakalikiana why does snapcraft want to open /dev/dsp2?09:08
mvoogra_: hm, sounds like a test misbehaving09:08
kalikianaChipaca hot damn, I did not see that. the thought that the 1 is not assumed to be a number... I guess that's where the parser is either too smart or not enough09:08
zygaif it is a device09:08
zygathis is coming from internal/elf.py09:08
Chipacamborzecki: :-)09:08
zygalooks like a bug in snapcraft elf resolver09:08
zygahey mvo, no worries :)09:09
pstolowskizyga, i had another layout test failure on 4358 (but it was run yesterday in the afternoon)09:09
mvoogra_: aha, no - its our "fault"09:09
zygaChipaca maybe you can do a 2nd review instead of mvo09:09
mvoogra_, kalikiana I think the problem is that in "core" we ship some device files09:09
ogra_Chipaca, either in  https://github.com/snapcore/core-build/tree/master/config (needs a release of the deb to the PPA after committing) or via live-build hooks https://github.com/snapcore/core/tree/master/live-build/hooks09:09
zygapstolowski do you remember what the error was09:09
ogra_well, debootstrap creates a populated /dev ...09:09
zygaI just merged a helper that will give us more debug data in such cases09:09
ogra_but it always did that09:09
mvoogra_, kalikiana which we need for booting, snapcraft should just put them into the snap without trying to be smart and open them etc09:10
zygaogra_ yeah, it looks like a snapcraft change09:10
ogra_ah09:10
ogra_yeah, that makes sense09:10
pstolowskizyga, cannot update snap namespace: cannot create writable mimic over "/etc": no such file or directory09:10
mupPR snapd#4773 closed: tests: add debug for layout test <Created by zyga> <Merged by zyga> <https://github.com/snapcore/snapd/pull/4773>09:10
pstolowskizyga, https://api.travis-ci.org/v3/job/347256945/log.txt09:10
Chipacaogra_: ack, i'll have a chat with em vee oh after things have frozen (i'm staying out of his path today)09:10
zygapstolowski hmm hmm09:10
zygathank you09:10
pstolowskizyga, snap-update-ns failed with code 1: File exists09:10
* ogra_ goes back to booth duties (students-day here today ... will be crowded)09:10
zygapstolowski I *bet* our test suite is broken09:10
zygapstolowski as /etc doesn't just go away09:10
zygalet's hope we learn some more from debug data09:11
zygaChipaca so about that review, maybe you want to look at 476009:17
zygait's not long really, a chunk of file got moved09:17
Chipacazyga: will do09:17
zygaand a few bits got added to other places09:17
Chipacawrapping up an edit here and will do09:17
zygaI'm pushing this as it is 2.32 material09:18
zygaand EOUTATIME09:18
ackkkalikiana, I'm building a base-18 snap on bionic09:18
ackkkalikiana, but it seems there' an hardcoded "core" mention in the code09:20
ackkkalikiana, BjornT was able to get it to work with this change: https://paste.ubuntu.com/p/s2t3wct5J3/09:20
ackkI mean, managed to build the snap, but then it seems there are missing libraries09:20
ackkand LD_LIBRARY_PATH is not set09:20
Chipacazyga: looking09:24
zygaThank you!09:24
Chipacazyga: 4760, per-snap profiles?09:26
zygayes09:26
kalikianaackk: Perhaps you can file a bug with some context? I fear this is getting lost in IRC backlog otherwise.09:30
ackkkalikiana, sure09:31
Chipacazyga: can you explain the 'per-snap' comments?09:33
zygayes09:33
Chipacagood :-)09:33
Chipacaplease do?09:33
zygathose are places that can benefit from per-snap paths instead of globs09:33
zygaso instead of /snap/*/**09:33
Chipaca?09:34
zygawe can say /snap/$SNAP_NAME/**09:34
Chipaca/snap/thesnap/*809:34
Chipacayeah09:34
zygaand expand the variable09:34
zygayep09:34
zygaI'm doing that in subsequent branches though09:34
zygait's going to be a while09:34
zygaand it's tricky09:34
Chipacak09:34
Chipacaah!09:34
Chipacai figur he wrote the shorter per-snap ones after writing the longer one :-)09:34
Chipacazyga: branch looks fine, and jdstrand is awesome09:35
zygaIndeed :)09:35
Chipacai'm reminded what a privilege it is for us to have him on team09:35
Chipacazyga: is there any reason we aren't using templates for the templates?09:35
zygalegacy09:35
zygaone change at a time perhaps09:35
zygathis is very very old code now09:36
Chipacazyga: ok, fair09:36
zygaI would love to get rid of ###SNAP_NAME### though09:36
zygait's just weird09:36
zygabut predictable :)09:36
Chipaca+1, and +1 on one-change-at-a-time09:36
zygathank you!09:36
Chipacawhen the churn dies down a little maybe we can look at switching them to templates09:36
Chipacabut no hurry; this works09:36
zygayeah, I'd like that09:36
zygaand unify the interface code with the same means of replacing text09:37
zygawe have a few weird conventions now with ###FOO### @@FOO@@ or {{foo}}09:37
mborzeckipstolowski: since you reviewed timer services before, can you take a look at https://github.com/snapcore/snapd/pull/4758 ?09:38
mupPR #4758: wrappers, tests/main/snap-service-timer: restore missing commit, add spread test for timer services <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/4758>09:38
mupPR snapd#4760 closed: many: generate and use per-snap snap-update-ns profile <Created by zyga> <Merged by zyga> <https://github.com/snapcore/snapd/pull/4760>09:38
pstolowskimborzecki, sure09:40
Chipacago 1.10's caching of test results is uncanny09:43
zygahmm?09:44
zygawhat's that?09:44
Chipacazyga: have /snap/bin/go be 1.10; run tests with it; see it zip through things it's tested that haven't changed09:46
zygaoh09:46
zygathat's *neat*09:46
Chipacazyga: that's not the neatest bit09:49
Chipacazyga: run tests, they pass; change the file, tests fail; edit the file back to what it was. Tests are already cached.09:49
ChipacaI'm afraid to look where it's caching and how big that cache is, but it's neat09:50
zygain the cloud ;-))09:50
mborzeckiiirc it's also running vet under the hood now09:50
Chipacazyga: do you remember the name of the property of numbers where if a!=b, a>b or b>a?09:51
Chipacamborzecki: and that yes :-)09:51
zygahmm, no I don't sorry09:52
zygaI mean09:55
zygaChipaca I can recall papers and who wrote them but I don't know how the term is called09:55
* Chipaca adds a 'go go go go!' label09:55
BjornTkalikiana, ackk: https://bugs.launchpad.net/snapcraft/+bug/175253810:02
mupBug #1752538: Building snap using base-18 is broken with 2.39 <Snapcraft:New> <https://launchpad.net/bugs/1752538>10:02
zygahmm10:22
zygaI run out of memory during tests10:22
zygaI'm building a string that's maybe dozen lines long10:22
zygaWTF?10:23
zygaon 8GB Vm10:23
Chipacazyga: go test -memprofile mem.out10:23
sergiusenshey zyga, any insight on this one https://bugs.launchpad.net/snapcraft/+bug/1752498 to generate a more thorough response?10:25
mupBug #1752498: cleanbuild fails with lxd snap <Snapcraft:New> <https://launchpad.net/bugs/1752498>10:25
zygalooking10:25
zygaso, the host is pureos, it uses snaps and has the lxd snap10:26
zygaand then that runs a xenial container10:26
zygaand that fails to mount snaps10:26
zygado I get that right?10:27
zygaChipaca trying10:27
zygaChipaca it crashes with OOM and doesn't give me the mem.out file10:28
Chipacazyga: go test -memprofile mem.out -timeout <something less than it takes to oom>10:28
Chipaca(but -memprofile might only work for successful tests, in which case you'll have to do it by hand)10:28
Chipaca(but try it this way first)10:29
Chipaca(parenthetical)10:29
zygaChipaca it doesn't write the memory profile when a timeout occurs10:29
zygaI mean, not sure what to do10:29
Chipacazyga: it's in a single test that fails, or is it the suite as a whole?10:29
zygaI don't get an OOM without a trivial loop10:29
zyganot sure yet10:30
Chipacazyga: in the test, or in setupsuite, or in init, start the mem profiler, start a goroutine that sleeps then stops and closes the profiler before it ooms10:30
zygarunning one test doesn't oom10:30
* zyga thinks10:30
Chipacain init would work (but tests can't have init? not sure)10:31
zygaI got something useful now10:31
zygafilepath.Split is broken? :/10:31
Chipacaprobably not :-)10:31
Chipacazyga: but, tell me how you think it's broken :-)10:32
zygap is "/snap/vanguard/42/"10:33
zygasplit of p is "/snap/vanguard/42/" ""10:33
zygathat's ... unexpected10:33
Chipacazyga: you need to filepath.Clean it10:33
zygayeah10:33
Chipacafilepath is broken in that half of the things Clean the path unconditionally, half of them break if you don't, and half of them return a Clean path, and half of them don't, and … none of those overlap10:34
Chipacai mean, those four sets are different and not complementary10:34
Chipacaor something10:34
Chipacait's a mess10:34
* Chipaca should write a path package that did things properly :-p10:34
* Chipaca is still working on a package that knows how wide something you printed to the terminal was10:35
zygawoah10:36
zygathat's silly10:36
zyga(^H dumb)10:36
zygap is "/snap/vanguard/42/usr"10:36
zygasplit of p is "/snap/vanguard/42/" "usr"10:36
zygaso filepath.Split returns unclean result10:36
zyga...10:36
Chipacazyga: that's because of the property of Split that the first element will always end in / so that you can + the things together and get the original10:36
ChipacaI'm not sure how that property is useful though10:37
Chipacaif you're looping, just lob off the last byte10:37
zygayeah, done now10:40
Chipacazyga: why were you accumulating in that loop though10:41
zygaI was doing this...10:41
zygahttps://pastebin.ubuntu.com/p/68f45jQ2tG/10:41
zygathose are per-snap apparmor rules for snap-update-ns for a single layout line10:41
zygaI need to give write permissions to all the path segments10:42
zygajdstrand ^ FYI, does that look sane>?10:42
Chipacaquoth the raven, eep10:42
zygaChipaca less wildcards :)10:42
Chipacazyga: i'm lazy, can you point me to the code that builds / uses this?10:43
Chipacazyga: also can you review #4748 :-)10:43
mupPR #4748: store: don't ask for snap_yaml_raw except on the details endpoint <Created by chipaca> <https://github.com/snapcore/snapd/pull/4748>10:43
zyganot committed yetr10:43
zygahttps://pastebin.ubuntu.com/p/j8XXgMzct8/10:43
zygasure10:43
zygaI mean, not rocket science10:43
zygajust very talkative10:44
zygaChipaca question about that PR, the filtering out thing I understand, the queryForSnapInfo part I don't10:47
zygawhy is that needed?10:47
Chipacazyga: because SnapInfo _does_ want to get the yaml10:48
zygano no10:48
zygaI understand we want it10:48
zygajust don't understand how the code is laid out to need "snap_yaml_raw" explicitly mentioned in queryForSnapInfo10:48
zygaI assumed we took all the variables10:49
zygaso the exception list makes sense10:49
Chipacazyga: so, this changes getStructFields to take a list of fields not to look at10:49
zyga so the part at line 425 that gets all the things except the yaml, is is fine10:49
Chipacazyga: and the default config loads all things except the yaml10:50
Chipacazyga: but then we want that field back for snap info10:50
zygawhat is the default?10:50
Chipacaso, start with the default field list, add yaml10:50
zygadefaultSnapQuery ?10:50
Chipacayes10:50
zygawhere is the logic that says defaultSnapQuery doesn't get the yaml field?10:50
Chipacayes, if you expand just above queryForSnapInfo you 'll see it10:50
zygayes, I did that10:51
Chipaca1 sec...10:51
zygaI mean, reading this https://github.com/snapcore/snapd/pull/4748/files#diff-1f8872a5d54402aa220c723deb16293cR49910:51
mupPR #4748: store: don't ask for snap_yaml_raw except on the details endpoint <Created by chipaca> <https://github.com/snapcore/snapd/pull/4748>10:51
zygaI don't understand why it doesn't ask for the yaml field10:51
Chipacazyga: +var detailFields = getStructFields(snapDetails{}, "snap_yaml_raw")10:51
zygaand detailFields gets copied to Store somewhere?10:51
Chipacazyga: that's the default for the config10:52
Chipacayes10:52
zygaah10:52
zygaok, then it makes sense now10:52
zygathank you!10:52
Chipacai mean, it was meant to be a small refactor10:52
Chipacaotherwise i'd've gotten rid of the indirection10:52
zygait's fine, I just didn't connect the dots10:52
Chipacabut pedronis is doing a good job of doing exactly that while moving to the new api10:52
Chipacaso \o/10:52
sergiusenszyga: you got it right10:53
zygasergiusens okay10:53
mupPR snapd#4748 closed: store: don't ask for snap_yaml_raw except on the details endpoint <Created by chipaca> <Merged by zyga> <https://github.com/snapcore/snapd/pull/4748>10:53
Chipacamborzecki: got a question on #4743 otherwise +110:54
mupPR #4743: packaging/arch: sync with snapd/snapd-git from AUR <Created by bboozzoo> <https://github.com/snapcore/snapd/pull/4743>10:54
zygasergiusens does pop os use our kernel?10:54
Chipacaalso why are we doing this: UNCLEAN="$(git status -s|grep '^??')" || true10:54
zygaI know it used to be a derivative10:54
Chipacathat || true10:54
Chipacawat10:55
sergiusenszyga: PopOS? I almost certain it does, cannot say for sure; but this is PureOS10:55
mborzeckiChipaca: i believe it's to cover the case when it's runnig in a spread test where the sources are packed sans .git directory10:55
zygaah10:55
zygasorry10:55
zygathen I don't know why it fails10:55
zygamaybe the kernel doesn't work with fuse10:55
zygasomeone would have to look at the error messages in the journal10:55
zyga(the ones from the kernel)10:55
sergiusenszyga: once you know what it is, would it be wise to add it as a pre-flight check before attempting a `snap install` to even get started?10:56
zygahmmm10:57
zygano idea10:57
zygaI mean, we don't check if the kernel can mount squasfs files10:57
zygaor how such a check would look like10:57
zygabecause the details are burried in kernel config10:57
zygaand you may not even be able to read that10:57
mupPR snapd#4758 closed: wrappers, tests/main/snap-service-timer: restore missing commit, add spread test for timer services <go go go go!> <Created by bboozzoo> <Merged by bboozzoo> <https://github.com/snapcore/snapd/pull/4758>10:57
zyga(you can squashfs but you cannot read XZ compression, for example)10:57
zygaand inside a container it gets even more complex as you need FUSE and helpers10:58
Chipacamborzecki: yeah, just that the construction is super weird (and makes you really think about whether UNCLEAN is bound if the git fails)10:58
Chipacamborzecki: (but this itself wasn't a comment on your PR)10:59
Chipacamborzecki: also, I'd love to know why ${foo=} even works11:01
mborzeckiChipaca: that's supposed to be the default value, if my memory serves me right the : in := is optional, but i might be wrong :)11:03
mborzeckilet me check bash manpage :)11:03
Chipacaempirically yes11:03
Chipacabut the manpage doesn't say the : is optional11:03
Chipacaand i'd never seen this usage11:04
Chipaca¯\_(ツ)_/¯11:04
pedronisChipaca: yes, the manual copying  is annoying/fragile, not sure a complicated solution using reflection is better though11:04
mborzeckiChipaca: `Omitting the colon results in a test only for a parameter that is unset`11:04
mborzeckiChipaca: funny how they use : and 'colon' in that particular sentence11:04
Chipacamborzecki: ooh11:05
Chipacaso ${foo?error} errors only if unset11:05
Chipacafair enough11:05
Chipacapedronis: was your comment on #4738 a request to remove or improve?11:07
mupPR #4738: snap: unify snap name validation w/python; enforce length limit <Created by chipaca> <https://github.com/snapcore/snapd/pull/4738>11:07
=== Sir_Gallantmon is now known as Son_Goku
Chipacamvo: #4720 has you tagged for reviewing it, but it's got a +1 from zyga and j.d.strand, dunno how to proceed11:09
mupPR #4720: interfaces: add xdg-desktop-portal support to desktop interface <Created by jhenstridge> <https://github.com/snapcore/snapd/pull/4720>11:09
Chipacazyga: I think you just broke 4714, is that something you could deconflict?11:10
zygaoh, I always deconflict that one :D11:10
zygadone11:11
Chipacathanks11:21
* Chipaca reviewing11:21
Chipacawoo! we're below 3 pages11:25
Chipaca:-(11:25
mupPR snapd#4743 closed: packaging/arch: sync with snapd/snapd-git from AUR <go go go go!> <Created by bboozzoo> <Merged by bboozzoo> <https://github.com/snapcore/snapd/pull/4743>11:26
Chipacazyga: why is tests/main/layout failing so much11:26
zygaI don't know yet, I merged some debug helper to see what we can learn11:26
zygawhat I saw seemed to indicate that /etc is gone11:27
zygawhich is ... worrying11:27
Chipacazyga: https://pastebin.ubuntu.com/p/Yj8MKv3h2m/ <-11:27
Chipacaah yes11:27
zygaperhaps I want to adjust the debug output to do "ls -ld /etc"11:27
Chipacacachio__: good morning sir! as a waking-up present, you have conflcits in #472111:28
mupPR #4721: tests: update interface tests to remove extra checks and normalize tests <Created by sergiocazzolato> <https://github.com/snapcore/snapd/pull/4721>11:28
pedroniszyga: remember there's a denial too, so not clear is gone, or cannot be operated on11:33
pedronisalso I have /etc and /opt11:33
pedronis*I have seen11:33
zygayep11:33
zygabut ENOENT cannot happen via apparmor11:34
zygastill unclear what is wrong really11:34
pedronisChipaca:   improve11:35
pedronisI didn't get it was a joke11:36
pedronisit seems11:36
Chipacapedronis: ok, i'll improve11:36
pedronisChipaca: did you see my comment about copying fields,  did you have something better in mind? I have only complicated things11:36
Chipacapedronis: I just wish these things were assignable11:37
Chipacapedronis: wishful thinking on my part11:37
Chipacanothing more, i fear11:37
pedronisok11:37
pedroniswondering if there's a way to check I didn't leave out any field11:37
pedronisthough11:37
pedronisI'll think a bit more,   I need to rename a couple of fields anyway11:38
pedronisbecause of last night discussions11:38
pedronisChipaca: is go go go! a new thing?11:38
Chipacapedronis: yes i created it today11:38
Chipacaand expect it to be given a more professional name :-) but11:38
Chipacawe need a tag to not waste time looking at a pr because it's good-to-go11:39
Chipacamaybe because i'm not always comfortable merging somebody else's code (as i presume if they haven't merged it there's a reason)11:39
pedronisin theory you can just go and merge it I suppose,  though for mine it would have been wrong, well not wrong, but I need to tweak it11:39
pedronisthat is fair11:39
pedronisyes, not a fan of merging code unless I have the full context11:40
Chipacazyga: does the layout error happen on every pass, or is it random?11:42
zygarandom11:42
Chipacazyga: IOW, should i just hit restart11:42
zygaif it was every pass it wouldn't land11:42
Chipacabecause there's a bunch of prs red because of it11:42
zygahmmm11:42
zygaI'll look into it11:42
zygameanwhile please restart11:43
Chipacazyga: so i should leave them red?11:43
Chipacaah ok11:43
* Chipaca punches the button11:43
zyganah, I need to reproduce that or add more debugging11:43
Chipacacachio__: in #4725, it's completely unclear to me whether you're saying it's in the model/gadget/whatever (and thus it shouldn't get removed and we have a bug), or not (and thus the model needs tweaking)11:44
mupPR #4725: tests: avoid removing preinstalled snaps on core <Created by sergiocazzolato> <https://github.com/snapcore/snapd/pull/4725>11:44
Chipacazyga: you probably want to re-review #467211:46
mupPR #4672: tests: adding test for removable-media interface <Created by sergiocazzolato> <https://github.com/snapcore/snapd/pull/4672>11:46
zygaquestion about that ../../../bin/sh trick11:46
zygahow do you want to tackle that11:46
Chipacathe one that's going away?11:46
Chipacafirst, do a scan of all snaps to make sure it's just our snaps that use it11:46
Chipacasecond, let you use absolute paths11:47
mvoChipaca: looking at 472011:47
Chipacathird, forbid you from using ..11:47
Chipacazyga: <end>11:47
Chipacazyga: if the first step fails, we need to address that before moving to #2 and #311:48
zygaln -s .. foo11:48
Chipacabah, #2 can move ahead independently and might be needed to address #111:48
zygals foo/11:48
zygajust saying11:48
Chipacazyga: this is snap.Container-level validation11:48
Chipacaso you can read that link, probably11:49
mupPR snapd#4720 closed: interfaces: add xdg-desktop-portal support to desktop interface <Created by jhenstridge> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/4720>11:49
Chipaca* needs more work but it's doable11:49
Chipacathat is, snap.Container would need a ResolveSymlink or something, as the walk on its own doesn't have enough info11:50
mupPR core#82 opened: xdg-open: add implementation capable of opening local files <Created by jhenstridge> <https://github.com/snapcore/core/pull/82>11:50
cachio__Chipaca, we don't have a bug11:57
cachio__Chipaca, this PR is to run our test suite on caracalla device11:58
cachio__Chipaca, in this case the caracalla image has different snaps preinstalled11:58
cachio__some of them cannot be uninstalled11:58
cachio__Chipaca, so the idea is to avoid removing those when we reset11:59
mborzeckijamesh: hmm i see the xdg-open PR, what reminds me that I've seen some snaps call xdg-mime directly, discord does that for instance, do you think we should handle this as well?12:01
jameshmborzecki: mvo's xdg-mime proxy already handles that, no?12:02
mborzeckijamesh: let me try to grab the log from discord12:03
mvoiirc we don't do xdg-mine, we do xdg-settings though12:05
jameshah.  Got those confused12:05
mvojamesh: just saw your glib xdg-open PR, nice!12:06
mvojamesh: will we need to register more handlers? I see we right now do http,https,mailto,help, how will open other types (like normal text) work?12:06
jameshmvo: I've got a hack to make that work, but don't want to put it in core12:07
mvojamesh: aha, nice12:07
mvojamesh: so that will be per-snap?12:07
jameshmvo: I just forwarded you an email about the hack I used: it relies on a stub shared-mime-info database so that everything maps to a single mime type12:09
jameshi.e. not the kind of thing I'd want to make part of the ABI of the core snap12:09
mborzeckijamesh: https://paste.ubuntu.com/p/pHMSZgZG6M/ grep does not show any trace of xdg-mime in unpacked snap, so no clue where that's called from12:10
=== chihchun_afk is now known as chihchun
mborzeckijamesh: this is what it's trying to do with xdg-mime: https://paste.ubuntu.com/p/dsDJ7DqjfV/12:15
jameshmborzecki: fwiw, I filed a wishlist issue against xdg-desktop-portal about supporting default app associations, but it got knocked back: https://github.com/flatpak/xdg-desktop-portal/issues/12612:18
jameshmborzecki: if we wanted to support this kind of thing, it isn't something we can fob off to xdg-desktop-portal in future12:18
jameshI am sympathetic to their point of view that confined apps shouldn't be changing associations12:19
* Chipaca disappears in a cloud of 'omg lunch'12:20
mupPR snapcraft#1969 opened: Add a "--profile" parameter to cleanbuild <Created by chrisglass> <https://github.com/snapcore/snapcraft/pull/1969>12:31
pedronismvo: I noticed we still avae snap.Info.LicenseAgreement and snap.Info.LicesenseVersion, are they still a thing in snapcraft.yaml ?12:34
* pedronis can't type12:34
kaliyhi, quick question: I'm assuming that I need to use classic confinement if I need to drop a policykit policy file system-wide during install, is this correct? or could I do this in any other way?12:44
Chipacakaliy: please don't do that unless you also remove it on uninstall12:44
Chipacabut, yes, as a classic snap you would be able to do that12:45
kaliyChipaca: that's already done :)12:45
Chipacakaliy: how?12:45
kaliywith the remove hook12:45
Chipacawe have a remove hook?12:45
* Chipaca is behind the times12:45
pedroniswe have all sorts of hooks12:45
Chipacaoh dear12:46
kaliyI was about to post to the forum asking for review for a classic confinement snap, but I wanted to make sure if I hadn't misunderstood something12:46
Chipacapedronis: I had a vision of you doin ga 'From Dusk till Dawn' thing with hooks12:46
Chipacakaliy: please do a forum post. I'm interested in knowing what you need the policykit thing for, to see if we can't accommodate it with interfaces in the future12:47
Chipacakaliy: also i'd be interested in knowing how you'd handle a missing policy kit, or running on arch12:48
Chipaca(have you tested on arch)12:48
Chipacathen 'run snaps cross-distroly' breaks down easily for classic snaps :)12:48
kaliyChipaca: this app uses a polkit policy for launching openvpn. the app will complain if no polkit agent is running, and we try hard to launch any usable polkit agent that can be found on the system12:49
kaliyI saw a reference to interfaces for polkit in the forum, but I was unsure how this would be implemented12:49
Chipacakaliy: me too :-) more examples help12:50
Chipacaso, go forum post asking for classic, give us the juicy, juicy details of what you need :-)12:50
kaliyChipaca: sure, thanks :)12:50
pedronisChipaca: after standup could you look at the commits I added to #477012:59
mupPR #4770: store: parse the JSON format used by the coming new store API to convey snap information <Blocked> <Created by pedronis> <https://github.com/snapcore/snapd/pull/4770>12:59
Chipacadoing so now12:59
mupPR snapcraft#1958 closed: store: support for more granular store permissions <enhancement> <Created by cprov> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/1958>13:02
zyga[Wed Feb 28 17:17:47 2018] audit: type=1400 audit(1519838267.637:342): apparmor="DENIED" operation="mount" info="Failed name lookup - deleted entry" error=-2 profile="/usr/lib/snapd/snap-confine//snap_update_ns" name="/etc/group" pid=14239 comm="3" flags="rw, bind"13:25
zygaso this clearly shows something removed /etc/group while we were working13:26
mupPR snapd#4774 closed: tests: adding ubuntu-14.04-64 to the google backend <go go go go!> <Created by sergiocazzolato> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/4774>13:26
jdstrandmvo: hi! I see in backscroll that you noticed the xdg-open PR. Please see this in particular: https://github.com/snapcore/snapd/pull/4766/#discussion_r17127553313:31
mupPR #4766: userd: add an OpenFile method for launching local files with xdg-open <Created by jhenstridge> <https://github.com/snapcore/snapd/pull/4766>13:31
mvojdstrand: thanks, in a meeting right now but I will read this, thanks for the info. please note that this is not a security measure, this is just to get the transient parent for the window that is displayed :)13:34
mupPR snapcraft#1970 opened: meta: parse LAUNCHPAD_BUILD_INFO for inclusion in the manifest <Created by kalikiana> <https://github.com/snapcore/snapcraft/pull/1970>13:38
jdstrandmvo: that's a different comment I want you to look at. that was just a warning. what I asked you to look at is the snap name lookup in snapFromSender since you can bypass the "I proved I could open the file" check in that PR13:38
zygajdstrand hey13:39
* kalikiana going for lunch13:39
jdstrandhey zyga13:39
zygajdstrand I just found a bug in layouts and I'm super in progress with layout harderning13:39
zygajdstrand /etc is the real /etc on classic13:39
zygajdstrand so it's writable13:40
zygajdstrand so we create symlinks there (oops)13:40
zygajdstrand not sure if we should do13:40
zyga*what13:40
jdstrandzyga: can you connect the dots a little more. I understand on classic, /etc is the host's etc. this is why we don't allow specifying non-$SNAP* source mounts. what are you referring to?13:41
zygawe still allow one to make a symlink in /etc/foo -> stuff13:41
zygaand that creates a real symlink in real /etc13:42
zygawe also allow creating file bind mounts13:42
zygaand that creates a real empty file in the real /etc as a mount point13:42
zygaand in fact, any writable location will have this property13:42
zygathat the symlink and empty files/directories are really actually created there13:42
jdstrandok, so while the source mount is $SNAP*, the target needs to exists for the mount point13:43
jdstrandexist*13:43
jdstrandthat is definitely wrong13:44
mupPR snapcraft#1916 closed: lxd: initialize remote lazily <bug> <Created by kalikiana> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/1916>13:44
zygawell, that's not how layouts work13:44
zygaotherwise you cannot put stuff into /usr/share/myapp13:44
zygamyapp doesn't exist when the layout is being constructed13:44
jdstrandit is wrong that the files are leaking outside of the snap that is13:44
zygaoh, no disagreement there13:44
zygait's just something we need to figure out13:45
jdstrandI thought that was going to be handled with a writable mimic?13:45
zygait is13:45
zygabut /etc is _writable_13:45
zygamimics are not constructed there13:46
jdstrandyou're saying writable mimic only kicks in if the source is readable13:46
zygawe only invoke the mimic if the write returns EROFS13:46
jdstrandright. what if you always did that instead of doing that check?13:46
zygaI'm saying the mimic only kicks in when the mount point cannot be created13:46
zygait's not clear at which level we'd construct the mimic13:46
zygaat the parent?13:46
zygathat is13:46
zygafor /usr/share/foo we'd always make a mimic at /usr/share13:47
zygajdstrand stashing that converstation13:49
zygacan I ask you to take a quick look at a bit of apparmor policy13:49
jdstrandsc_populate_mount_ns has a list of dirs that are affected, no?13:49
zygait's representative for all the layout bits we need to do13:49
zygahold on, looking13:50
zygajdstrand yes, I think that's roughly the list13:51
zygathough I don't know thinking about it quickly if that's _the_ list13:51
zygaor if something contributes elsewhere13:51
jdstrandzyga: we can either just do the parent or some variation on that, which would mean more mimics, or we are precise an when to mimic13:52
jdstrandwhich is fewer mimics13:52
zygahmm, I almost agree13:52
zygabut not fewer in some cases, let's see /usr/share/foo/bar is something we need to make13:52
zygathis would give us a mimic at /usr/share and then another one (not needed) at /usr/share/foo, right?13:53
Chipacaniemeyer: mvo: I was trying to say something but it froze up13:53
mvoChipaca: what was it?13:54
cachio__mvo, I already tagged 2 PRs for 2.3213:54
zygajdstrand I need to think about this, I just realized this happens13:54
jdstrandI presented two choices. a) mimic the parent (or a variation), b) mimic based on this list13:54
mvocachio__: thank you13:54
zygajdstrand can you please look at this policy test: https://pastebin.ubuntu.com/p/CM9tJ5W7cF/13:54
niemeyerChipaca: Ah, oops, sorry :)13:54
Chipacaniemeyer: mvo: bash in 16.04 (i haven't looked elsewhere) that --rcfile overrides reading /etc/bash.bashrc, but it doesn't13:54
zygajdstrand ack13:54
jdstrandso, with 'a', you mimic at /usr/share/foo13:54
Chipacaniemeyer: mvo: so to do what I want to do I'm going to have to tweak /etc/bash.bashrc13:54
jdstrandbut if you then have /usr/share/baz/norf, you mimic as /usr/share/baz13:54
jdstrandso that is 2 under /usr/share13:54
zygawith a) exiting code would also kick in and make a mimic at /usr/share since foo is not a thing in the base snap13:55
niemeyerChipaca: That'd mean not working for most people.. :(13:55
Chipacaso, that. No biggie, but it's going to take a while more (and involve more people) than the quick hack it would've been otherwise13:55
niemeyerChipaca: And perhaps some people upset when it does work :)13:55
Chipacaniemeyer: /etc/bash.bashrc is from core13:55
jdstrandbut, if /usr/share is in the list, you mimic /usr/share13:55
niemeyerChipaca: Ah, hmm, that's also not so great given bases13:55
zygajdstrand I think we need the list of directories13:55
niemeyerChipaca: I mean, behavior will be inconsistent13:55
zygaas that seems as a more natural thing to do13:55
zygait's complex as that list is variable13:55
zygaand I don't know if it's simple to connect the dots yet13:56
niemeyerChipaca: Did you dig into what was going on with --rcfile?13:56
jdstrandfor /usr/share/foo/bar and tack on /usr/share/baz/norf under that existing mimic13:56
zygaperhaps we can start with a blacklist (e.g. extend it to refuse /home mounts) and a simpler rule for just /etc13:56
zyga(and similarly /var)13:56
jdstrandzyga: right. I'm not expressing a preference. I just recalled there was a list, so maybe it could be leveraged13:56
zygajdstrand yeah13:57
zygaI just wanted to let you know because I didn't anticipate this before13:57
Chipacaniemeyer: as I said, the documentation says it overrides reading the system rc, but it doesn't13:57
jdstrandzyga: I like starting simpler. we would have to consider if there are any valid use cases for the ones we leave out of the list13:58
Chipacathe code is: load system rc; load rcfile or ~/.bashrc13:58
jdstrandzyga: I didn't explicitly think about this either-- I was thinking 'oh, this is a per-snap mimic so all is good'. curious, did this come about from the apparmor hardening?13:59
jdstrandzyga: btw, thank you for that hardening13:59
Chipacaniemeyer: are bases required to have bash?13:59
zygajdstrand yes this came out of the hardening as I was testing this on my host system14:00
zygajdstrand and I noticed /etc is populated with placeholders14:00
zygajdstrand hardening is almost complete for layouts (modulo review and fixes) but I need to go all the way and make content interface do something similar or I won't be able to drop some of the wildcards14:01
zygaonce content interface also adds update-ns rules I should be able to remove the biggest offenders :)14:02
jdstrandzyga: yeah for hardening! :)14:02
jdstrandzyga: you asked me to look at some apparmor rules?14:03
zygayes14:03
zygain the pastebin above14:03
zygahttps://pastebin.ubuntu.com/p/CM9tJ5W7cF/14:03
zygait's a part of a test14:03
zygathere's a simple layout14:03
jdstrandI responded to 4765 yesterday (you probably saw)14:03
zygaand the resulting rules14:03
zygayeah, I will iterate with the hardening there14:03
Chipacazyga: why does snap-confine create SNAP_USER_DATA, but not any other of the four data dirs?14:04
zygaChipaca not sure14:05
zygaI think it is doing that because /home/zyga/snap/snapname/ is not writable in general14:05
zygaso it will do /home/zyga/snap/snapname/42/14:05
zygathe common one is done somewhere else (right?)14:05
zygabut really that's just a guess14:06
zygathat's some oooold code pre-dating many of the things we have now14:06
mupPR snapd#4739 closed: many: remove snapd.refresh.{timer,service} <go go go go!> <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/4739>14:07
roadmrhey folks. Is bsutton here? does anybody know him?14:08
zygaroadmr not me14:09
pedronismvo:   snap-rervice-refresh-mode seems flaky:  https://travis-ci.org/snapcore/snapd/builds/347750674?utm_source=github_status&utm_medium=notification14:11
Chipacazyga: there's no SNAP_USER_COMMON in snap-confine14:12
zygaI think that's something to garden14:12
Chipacazyga: the mkdir, or the lack of them?14:12
zyganot sure, they ought to be made, just unsure where14:13
zygaI suspect in snap-confine though, due to permissions14:13
mvopedronis: hm, I think we had this before that tests/main/snap-service-refresh-mode  was flaky, iirc cachio__ did some fixes (or was it mborzecki) from leftover systemd logs. I will look in a wee bit14:13
Chipacazyga: ok, I'll dig14:14
pedronisthanks14:14
Chipacazyga: I need to change this code anyway14:14
zygawhat kind of changes do you need to make?14:14
Chipacazyga: SNAP_DATA and SNAP_USER_DATA are going to point at symlinks14:14
zygahmm14:14
zygathat's interesting14:14
Chipacazyga: very precise symlinks, so, a little code to desymlink them and we'll be good14:15
Chipacaa readlinkat and a add-this-to-that14:16
mborzeckimvo: yup, it was journalctl --sync && journalctl --rotate14:16
jdstrandChipaca: what is the symlink and what will the symlink point to? what is the motivation of the change?14:16
Chipacajdstrand: current14:16
cachio__pedronis, mvo I'll take a look to that test14:17
Chipacajdstrand: motivation is that if an app uses $SNAP_USER_DATA for something, they should be able to store it without it breaking on refresh14:17
Chipacajdstrand: e.g. vlc using $SNAP_USER_DATA/Videos (or whatever) as default for where to find videos14:17
jdstrandChipaca: that only solves part of the problem14:18
Chipacajdstrand: (there's a second half of this work that's "move then copy back on refresh, instead of copy forward")14:18
jdstrandChipaca: but will improve things, yes14:18
jdstrandChipaca: the hard problem is open fds14:19
Chipacajdstrand: that's fixed by the move-then-copy-back thing14:19
Chipacaright?14:19
pedronismvo: cachio__:  journalctl has cursors, maybe we can use those14:19
cachio__pedronis, ok, let me check if that works on trusty14:20
pedronis--show-cursor  and  --cursor  and --after-cursor14:21
jdstrandI don't see how. it does solve newly opened files. eg, vlc opens 1/foo, a frefresh happens, the apparmor policy is reloaded, making 1/foo readonly and 2/foo readwrite, when vlc writes to its fd, the kernel will do a revalidation of that fd, see it is in 1/foo, which is readonly and then deny it14:21
mborzeckipedronis: hm intersting, worth exploring if the test continues to be flaky14:21
mborzeckipedronis: the last attempt was to make sure that the journal is flushed and rotated before each test14:22
pedronisthat should be overkill with cursors (if they work on 14.04)14:22
niemeyerChipaca: Yes, the shell needs to be in the base, at least for now14:24
niemeyerChipaca: In a call, but will be with you shortly14:24
jdstrandChipaca: there are only four ways to fix this: the application gets a signal and does something smart, we make the previous revision readwrite, we defer the policy reload or we have per-revision apparmor policy (like we did with click)14:25
* zyga -> lunch14:25
cachio__pedronis, we can use cursors in all the systems but 14.0414:25
pedronis:/14:25
Chipacajdstrand: if we mv 1/ 2/, won't the revalidation see the fd of 1/foo as on 2/ now?14:26
cachio__pedronis, 14.04 should be removed soon from our test suite I think14:26
jdstrandChipaca: each has drawbacks. for the first, the app needs to be really smart. for the second, that destoys rollbacks. for the fourth, the running app writes to the old dir after the migration14:26
jdstrandChipaca: the third is not impossible (defer/prompt the refresh if non-daemon processes are running in the freezer cgroup)14:27
jdstrandChipaca: hmm, maybe. did you test that actually works?14:27
Chipacajdstrand: I don't have the code to do that yet, no, but I should be able to get there before eod14:29
jdstrandChipaca: we should ask jjohansen if that is expected to work14:29
Chipacajdstrand: asking somebody whether it'll work >>> doing the work to check if it works :-)14:30
Chipacajjohansen: OHI14:30
jdstrandChipaca: well, I was thinking you would write a very small test to see if the revalidation happens rather than changing snapd since that might waste your time14:30
jdstrandChipaca: let me ask14:30
* Chipaca lets14:30
pedroniscachio__: do you that travis log or can I restart the tests?14:31
pedronis*do you need14:31
cachio__pedronis, restart it14:31
pedronisthx14:31
cachio__np14:32
jdstrandjjohansen: hi! consider a profile has '/1/** rw,' and an app has an fd for /1/foo. when the profile is reloaded to only allow '/2/** rw,' then when the app writes to the fd, it is denied cause of revalidation (fine)14:33
jdstrandjjohansen: now consider profile has '/1/** rw,', app has open fd to /1/foo. then, the app is frozen via freezer cgroup, /1 is moved to /2, the profile is updated to allow only '/2/** rw,' and reloaded, then app is unfrozen14:35
jdstrandjjohansen: what is expected to happen when the app writes to the open fd? does revalidation kick in? the path is different, but the inode backing it is the same14:36
* zyga tunes in as this is interessting14:36
jdstrandChipaca: fyi, jjohansen may not be online for a little while14:36
* ikey also has the popcorn14:36
zygaI didn't know apaprmor does revalidation14:36
Chipacajdstrand: it's ok, i've got plenty of other stuff to work on meanwhile :-)14:39
jdstrandChipaca: assuming for a moment that works, deferring/prompting is still desired14:39
jdstrandChipaca: this operation could take several seconds to migrate, reload, etc14:39
kalikianare14:40
jdstrandChipaca: while the whole time the application is frozen. if the application is vlc, its playback is stopped. the window goes gray, the user is like 'wth?'14:40
elopiocachio__: those look like network timeouts14:40
Chipacajdstrand: yes, we still want apps to be able to say "don't refrsh me just yet plz"14:40
* zyga never imagined jdstrand would say "the user is like 'wth?'" :D14:41
jdstrandChipaca: if we have that ability. or even simply the ability to prompt and say "I have a refresh pending. Deferring the refresh until vlc closes'. Then you watch for when the cgroup has no non-daemon processes running in it, and do it then14:42
Chipacazyga: jdstrand: do we know how many things are in the freezer?14:42
jdstrandChipaca: then you don't need the rigamorole14:42
zygayes14:42
Chipacabecause we could defer a refresh if the freezer isn't empty14:43
jdstrandzyga: note, it was the user that said that, not me :P14:43
zygayou can enumerate processes and threads14:43
* zyga hugs jdstrand for being so awesome14:43
* jdstrand hugs zyga :)14:43
* Chipaca adds it to quotes14:44
Chipacazyga: do you have to freeze it before you can answer 'is it empty'?14:44
jdstrandChipaca: yes, like zyga said. the trick is 'non-daemon' and by that I mean snap commands that don't use 'daemon: ...' in the yaml, since they are expected to be running14:45
zygaChipaca I think no14:45
zygaalthough the process you will find may be gone now14:45
zygaso you can see "not empty" without freezing14:45
Chipacajdstrand: daemons are a whole other … uh … species?14:45
jdstrandChipaca: I may not be clear. we handle daemons across refresh fine. so we just want to know if non-daemons are in the cgroup.14:46
cachio__pedronis, journalctl on trusty supports cursors14:46
Chipacajdstrand: yes14:46
Chipacabah14:46
Chipacayes14:46
Chipacai wouldn't mind if at first we were just careful about purely-non-daemon snaps14:47
mvoniemeyer: I put the apt integration ideas here: https://forum.snapcraft.io/t/providing-hints-about-snaps-from-apt/430114:47
Chipacababy steps, etc14:47
cachio__pedronis, I'll make a change to use it instead of rotating the logs14:47
mupPR snapd#4776 opened: Do not auto-import from loop/ram devices <Created by alfonsosanchezbeato> <https://github.com/snapcore/snapd/pull/4776>14:48
niemeyermvo: Thanks!14:48
niemeyerChipaca: I'm in the travel stuff call, but while the propaganda goes on: it would be nice to understand *why* --rcfile doesn't work14:49
Chipacaniemeyer: you mean, *why* the code does what it does?14:49
niemeyerChipaca: Yeah, it's not like bash changes very often.. that sort of breakage sounds surprising14:49
Chipacaniemeyer: or are you asking about the code14:50
jdstrandChipaca: I can imagine something along the lines of: refresh is downloaded. snapd sets a flag 'refresh pending', it checks the freezer, if nothing running, refresh. if running, idle til no running, then refresh, then unset the review pending flag. we can use the 'review pending' flag in snap run to avoid a race for starting the app between the 'is empty' check and the refresh is finished14:50
Chipacaniemeyer: it's a distro patch that adds /etc/bash.bashrc that tweaks the manapage one way, which is not how shell.c is written14:50
jdstrandChipaca: with what I outlined, that could be all implemented without a prompt. ie, snapd becomes smarter about when to refresh. than at some future date, could tastefully alert the user that the refresh is pending14:51
niemeyer[niemeyer@nomad ../snapd/cmd/snap]% bash --rcfile ./foo.sh14:51
niemeyerWhat14:51
niemeyerniemeyer@nomad:~/src/github.com/snapcore/snapd/cmd/snap$14:51
niemeyerChipaca: That's 16.0414:51
Chipacajdstrand: “error: the app "hello-world" has a refresh pending; please try again later (you can close all current apps from the snap to make this happen faster)”?14:51
jdstrandChipaca: yes. but maybe 'a refresh in progress' would be better14:52
Chipacajdstrand: true14:52
Chipacasounds very doable (but a lot of work) (also, need something for gui apps)14:52
Chipacaniemeyer: and without --rcfile?14:53
zygajdstrand I'll do that lunch for real now, let me know if the apparmor rules in the pastebin look sensible, I will open a PR soon14:53
jdstrandChipaca: because you only prompt for that when we started the refresh. ie, if vlc is running and a refresh is pending, the user should be able to launch another vlc14:53
jdstrandChipaca: both need to be gone to [trigger the refresh, which blocks the launch14:53
jdstrands/\[//14:53
Chipacaniemeyer: how about: bash --rcfile ./foo.sh -x14:53
Chipacajdstrand: ah, gotcha14:54
jdstrandChipaca: that's a pretty cool idea if I say so myself :)14:54
Chipacajdstrand: quick write it down14:55
jdstrandI think it only took a year or more of my brain thinking about it in the background to think of it :P14:55
jdstrandChipaca: the real trick is the 'is cgroup empty of non-daemons' check. everything else should be relatively straightforward14:56
Chipacathis still needs the 'drop revision from env vars'14:57
jdstrandChipaca: yes14:57
Chipacabut might not need the 'cp -> mv && cp' change14:57
jdstrandChipaca: cause we don't have a way to change the environ for a running process in a way that could possibly be contrued as sane14:57
jdstrandChipaca: so the env handles new files. the defer handles open fds, but also adds robustness and improves usability14:58
jdstrand(and by handling them, it punts on them :)14:59
jdstrandbut that's ok and desirable14:59
jdstrandit is very natural to defer an update if something is running. it is less so to change things behind the apps back15:00
jdstrandChipaca: actually, we don't need the env. the refresh was deferred. the new env will only ever be in effect after the refresh15:00
Chipacajdstrand: right, but if the app picks up the env var to stick it in config, it breaks15:01
jdstrandChipaca: that's entirely fair15:01
jdstrandChipaca: pointing at current is a good idea for lots of reasons15:01
ackksergiusens, mvo, will "base-18" be called "core" on bionic, once it's released? or will it keep the numbering?15:01
jdstrandChipaca: istr we didn't initially cause we weren't sure we always wanted the symlink15:02
roadmrzyga: I found bsutton in the forum :)15:02
sergiusensackk: I have no idea, which is why I wanted this a bit more formally documented (not just IRC fly by conversation)15:02
sergiusensI suspect, no; but it would be nice to have this recorded15:03
ackksparkiegeek, I'm asking 'cause we currently have "base: base-18" in our snap for bionic, if it's going to be called "core" I'm not sure how you could run a bionic snap on xenial15:03
ackkerr, sergiusens ^15:03
niemeyerChipaca: https://gist.github.com/niemeyer/c1cfd64dbc8b3f094333b061cd0422fb15:03
ackksparkiegeek, sorry :)15:03
Chipacaniemeyer: exactly15:05
Chipacaniemeyer: that's /etc/bash.bashrc15:05
niemeyerChipaca: I don't get it.. so what?15:05
niemeyerChipaca: We can set a PS1 like that, can't we?15:05
Chipacaniemeyer: that's what sets up command-not-found, which won't work15:05
niemeyerChipaca: Is there no way to disable it?15:05
Chipacaniemeyer: that's what echoes "here's how to run sudo"15:05
mvomborzecki: fwiw, I looked at systemd-analyize in a chroot and also at the source, it does not require a dbus connection for me, so either thats a bug in older systemd (I only checked git) or the buildd is doing even stranger things15:05
Chipacaniemeyer: the first one yes, the second one no :-) (can't un-echo)15:06
mupPR snapd#4723 closed: Translate polkit strings <Created by gunnarhj> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/4723>15:07
Chipacaniemeyer: if it's the best we can get, I'm ok with it; I'd rather tweak bash.bashrc in core to avoid that15:07
niemeyerChipaca: Okay, but those sound like two separate issues: we can do less in bashrc, which would be a bug for the base, and then have a stock bashrc which does more, which doesn't have to be in the base15:07
Chipacaniemeyer: bases will still work because they (shouldn't / won't) have /etc/bash.bashrc in the first place15:07
Chipacaniemeyer: i mean, my proposed change for bash.bashrc was literally '[[ "$SNAP" ]] && return'15:08
niemeyerChipaca: Ah, ok, and the PS1 change elsewhere?15:08
Chipacayes15:08
Chipacacould also go with SNAP_COOKIE if SNAP is too easy15:08
Chipaca:-)15:08
Chipaca(aside: why do we have both SNAP_COOKIE and SNAP_CONTEXT)15:09
niemeyerChipaca: Brilliant!15:09
niemeyerChipaca: Histerical15:09
Chipacasigh15:09
niemeyerChipaca: One of these is obsolete and should be dropped eventually15:10
Chipacaniemeyer: you know how they cured hysteria, right?15:10
ChipacaI can't tell you because NSFW15:10
Chipacaanyhow, moving on15:10
* cachio__ lunch15:38
=== ikey is now known as ikey|busy
arm1eHi,15:54
arm1eI would like to package software as snaps but I have no packaging experience. I have read the documentation but where can I learn how to package software. I heve no programming experience, but really want to help port apps15:55
Chipacazyga: i addressed your concerns with #4775 i think15:55
mupPR #4775: timeutil: timeutil.Human(t) gives a human-friendly string for t <Created by chipaca> <https://github.com/snapcore/snapd/pull/4775>15:55
mupPR snapd#4777 opened: i18n: simplify NG usage by doing the modulo math in-package <Created by chipaca> <https://github.com/snapcore/snapd/pull/4777>15:55
zygaChipaca ack15:56
Chipacapopey: do you have anything you'd recommend arm1e ?15:56
popeywat wat?15:56
mupPR snapcraft#1971 opened: tests: remove dependency of internal repo from integration suite <Created by elopio> <https://github.com/snapcore/snapcraft/pull/1971>15:56
mupPR snapcraft#1972 opened: tests: remove _options dependency from integration suite <Created by elopio> <https://github.com/snapcore/snapcraft/pull/1972>15:56
popeyoooh15:57
popeyarm1e: hello!15:57
arm1ehey popey15:57
popeyarm1e: https://docs.snapcraft.io/build-snaps/get-started-snapcraft15:58
popeythats a good place to start, to get your system setup to build snaps :)15:58
arm1eallready done :)15:58
popey(if anything on that page doesn't work, let me know, I wrote it)15:58
popeyMaybe start seeking out some things to snap. Want an idea or two?15:59
arm1eplease15:59
Chipacapedronis: #4770 is all nice and pretty and ready to go places15:59
mupPR #4770: store: parse the JSON format used by the coming new store API to convey snap information <Created by pedronis> <https://github.com/snapcore/snapd/pull/4770>15:59
pedronisChipaca: thx15:59
popeyOne relatively easy place to start is with electron apps16:00
popeyEspecially if they use electron-builder16:00
popeyWe wrote this task for Google CodeIn, but it's still valid. https://codein.withgoogle.com/tasks/5004124745629696/16:01
mupPR snapd#4770 closed: store: parse the JSON format used by the coming new store API to convey snap information <Created by pedronis> <Merged by pedronis> <https://github.com/snapcore/snapd/pull/4770>16:01
popeyThat might be a good starting point :)16:02
arm1echeers16:07
jjohansenjdstrand: interesting question. It will depend on the ordering of the update and operations in the unfreeze. If the migration happens before the profile update, I think a revalidation should happen. Basically on the migration the task has to be associated with a profile before the profile update.16:07
jjohansenAs long as that happens the revalidation should happen, if however the association of task to profile happens on say unfreeze, that would be after the profile update, and the update then becomes invisible to the task, so revalidation would not happen.16:07
=== c_ is now known as Guest85417
Guest85417any tutorial to build a golang snap?16:08
Guest85417i have an app that uses the com port, trying to port it on an ubuntu-core gateway16:09
davidcalleGuest85417: golang snaps have a nice intro here https://docs.snapcraft.io/build-snaps/go16:09
Guest85417Thanks. going to try this16:11
jdstrandjjohansen: interesting. I think the question is academic at this point, because the idea that prompted it had a usability issue16:13
mupIssue snapcraft#1973 opened: Support quering package manager in tests <Created by sergiusens> <https://github.com/snapcore/snapcraft/issue/1973>16:18
mupIssue snapcraft#1974 opened: organize with forward slashes should be stripped <bug> <Created by sergiusens> <https://github.com/snapcore/snapcraft/issue/1974>16:21
cachio__mvo, snapd upgrade does not work with last systemd on bionic16:35
cachio__mvo, confirmed also running on qemu16:35
mvocachio__: what error do you see?16:35
naccsergiusens: would really appreciate your guidance on LP: #175248116:35
mupBug #1752481: Regressions in 2.39.2 in xenial-updates in classic snaps (relative to 2.35) <snapcraft (Ubuntu):New> <https://launchpad.net/bugs/1752481>16:35
cachio__mvo, after upgrade the snaps are not mounted anymore16:35
cachio__mvo, I see this with systemd 237-3ubuntu316:36
zygamvo I looked at that briefly and mount units were all stopped16:36
zygamvo I didn't recall if other things were stopped16:37
cachio__it is like you install a new snapd and then the snaps appear as broken16:37
cachio__mvo, I am kind of stuck, don't know where to see16:38
cachio__zyga, what do you suggest to review?16:39
cachio__zyga,  not sure how to continue16:39
zygacachio__ look at the journal output during the update16:39
zygasee what happens16:39
zygamaybe there's a hint as to who stops the units16:39
zygamaybe they get stopped because of some reverse dependency with snapd16:40
zygaso maybe check if stopping snapd.{socket,service} affects anything else16:40
cachio__the only weir thing I saw in the logs is16:41
cachio__Mar 01 13:22:58 autopkgtest snapd[30308]: 2018/03/01 13:22:58.805777 main.go:78: Exiting on terminated signal.16:41
cachio__after the units are unmounted16:42
zygathat's snapd being SIGINT'ed probably16:42
zygaafter?16:42
cachio__zyga, https://paste.ubuntu.com/p/zVWGtZc6yj/16:42
cachio__yes, afetr16:42
cachio__then the units are not mounterd16:42
zygayeah16:43
zygano idea16:43
zygareally16:43
zygamvo more reasons to make 2.32.1.x as a quiet safe thing16:44
cachio__I'll add more log in this line to see if there is some hink16:44
zygacachio__ reproduce this manually16:44
zygaand poke around16:44
zyganot sure16:44
zygasee if updating the package really triggers this16:44
zygasee if there's something in the postinst/preinst scripts16:44
cachio__zyga, already check those16:46
cachio__zyga, np, I have something to dig into16:46
naccso i've got a tricky situation in a classic snap building on xenial; I need the latest version (well technically just the files) from specific packages (debian-archive-keyring and ubuntu-keyring) in the latest release.16:47
zygacachio__ does it happen if you update from 2.31 to 2.31.1 on bionic?16:47
cachio__did not try that16:47
zygaI'm trying to understand if 2.32 is broken16:47
zygaor if bionic is broken16:48
cachio__I updated from 2.31.1 to the current16:48
cachio__well, if I run the same in another system it works16:48
cachio__even in an older bionic16:48
cachio__the problem is in the last bionic versions16:49
cachio__at some point systemd and the kernel were updated16:49
mvocachio__, zyga hmmm, thank you. so just to confirm 2.31 is ok?16:49
mvocachio__: or is that a bit of an unkown at this point?16:49
zygamvo I don't know yet, I'm not checking either (digging in another hole)16:49
cachio__I'll run sru on this bionic version to see if it works16:50
sergiusensnacc: is your not working link an actual non working one?17:04
sergiusensnacc: is this version related?17:04
naccsergiusens: it's a bunch of stuff it seems like17:05
naccsergiusens: well, the snap it built is non-functional17:05
naccsergiusens: and it *was* functional just before the snapcraft SRU17:05
sergiusensnacc: oh, ic; this seems not related to the patchelf work but probably our pip consolidation; kyrofa want to take look?17:06
naccsergiusens: the version seems wonky, though17:06
cachio__zyga, mvo I installed 2.29 and upgraded to 2.31.1 and works17:06
zygacachio__ good, thank you for checking htat17:06
cachio__then I upgraded to 2.32~ and failed17:06
sergiusensnacc: yes, some files got modified locally during build it seems; can I see your sources?17:06
zygait means we can safely release point release from 2.3117:06
zygacachio__ can you diff packaging before/after17:07
naccsergiusens: https://git.launchpad.net/usd-importer?h=master17:07
zygaI mean the actual package for 2.31 and 2.3217:07
zygaI recommend meld (in the archive) for that17:07
zygasee if anything odd stands out17:07
arm1epopey: 'Update the version of electron-builder to “^19.53.0” in dev/Dependencies' How do I do this?17:07
naccsergiusens: sigh17:07
naccsergiusens: you changed where you look for setup.py17:07
naccsergiusens: from self.builddir to self.sourcedir17:08
naccsourcedir is not updated for subdir17:08
cachio__zyga, ok, I'll do17:08
zygayou can unpack the packages with dpkg or with mc :)17:08
naccsergiusens: i can see it in the srcpkg diff17:08
sergiusensnacc: oh; darn :-/ To shed some good news though, you probably do not need to build your own python anymore17:09
naccsergiusens: hey, that's something! :)17:09
naccsergiusens: what changed there? we do depend on a newer python3 than in xenial17:09
sergiusensnacc: this happened https://forum.snapcraft.io/t/classic-snaps-failing-on-ubuntu-17-10/2324/3417:09
naccsergiusens: relevant diff https://paste.ubuntu.com/p/8dC9Bmh7r2/17:10
sergiusenswe use the python3 in xenial17:10
naccsergiusens: right, that's tool old for us17:10
sergiusensnacc: yeah, this is kyrofa's refactor (not his fault) as it slipped me too... this source-subdir feature is such a pain :-/17:11
naccsergiusens: now, what you linked to might fix some of the stuff i hit with the loader when i was building 'on' artful17:11
naccsergiusens: ack, just happened to break us pretty badly :)17:11
sergiusensnacc: try the deb on bionic or the snap on artful, they should do the right thing17:11
naccsergiusens: well, snapcraft cleanbuild jsut started failing on my bionic mahcine at home17:12
sergiusensnacc: it eventually broke everyone as it is a feature tied with single threaded strings17:12
naccsergiusens: oh you mean for the above change, ack17:12
popeyarm1e: it's in the package.json17:12
naccsergiusens: the problem is right now i can now no longer cleanbuild and i can't get LP to build correctly because xenial-updates is busted :(17:13
sergiusensnacc: sorry, yeah, snapcraft in bionic-updates will give you what you need wrt to proper "library environemtns"17:13
naccsergiusens: cool, i will try it17:13
sergiusensnacc: and source-subdir is a dreadful feature17:13
sergiusensnacc: the other dreadful feature we have is that we do not require `setup.py` in the source :-/17:13
sergiusensnacc we plan to do an SRU on Monday, I will make sure to include a fix for you17:17
naccsergiusens: i can imagine; what would you recommend i do in the meantime?17:25
* kalikiana heading out for the day17:25
naccsergiusens: any idea on the version thing?17:25
sergiusensnacc: I think it is related to running pip from that source and a lack of .gitignore; I can run locally to determine which file is getting layed out where it shouldn't17:26
naccsergiusens: would it make sesne to get the version *before* doing the build?17:26
naccsergiusens: since using git to get the version is an attribute of the original repository17:26
sergiusensnacc: the reason it is done this way is to account for all the possible scenarios; this feature was mostly done to support giving the core image a version which would attach the version of snapd inside it; that meant; after the livecd-rootfs build was done and primed17:27
sergiusensnacc: but yeah, for `git` specifically we could17:28
sergiusenswe will be working in the coming weeks on pre/post prepare,build,stage,prime and adding setters for version, description and summary as a start which could be scripted any way you like17:28
naccsergiusens: nice17:29
sergiusensnacc: I will migrate to a faster location and work on this, I will keep you updated17:41
naccsergiusens: thanks, i really appreciate it17:41
cachio__zyga, there are many diffs17:47
cachio__zyga, the systemd part is the same17:48
* Chipaca EODs17:58
=== alan_g is now known as alan_g|EOD
cachio__mvo, I found something interesting18:14
cachio__mvo, if I upgrade from 2.29 to 2.32 it works18:15
cachio__it I upgrade from 2.31.1 it fails18:15
mvocachio__: woah, that is interessting indeed18:15
mupPR snapcraft#1975 opened: python plugin: find setup.py when source-subdir is used <Created by sergiusens> <https://github.com/snapcore/snapcraft/pull/1975>18:29
sborovkovHi. Can anyone take a look at this forum thread? Ubuntu core nodes just die after few hours of uptime. https://forum.snapcraft.io/t/how-to-figure-out-why-ubuntu-core-keeps-restarting/4257/219:34
sborovkovwhich seems to be a pretty serious issue19:34
zygare19:35
zygacachio__ did you unpack maintainer scripts?19:35
zygaas in, did the tree contain the upper-case DEBIAN directory19:35
zygacachio__ and if so, did you did that part as well19:36
cachio__zyga, no that part19:36
cachio__something weird is that upgrade 2.29 - 2.32 works19:37
cachio__2.31.1 - 2.32 doesn't19:37
cachio__I was running ubuntu core now19:38
cachio__zyga, there is an error that you could be interested19:38
cachio__the layout test is failing in ubuntu core19:38
cachio__zyga, last exec it passed19:40
arm1epopey: Sorry, had to sort kids. I am looking for the package.json file and it does not mention electron builder. There is one in the electron folder and another in the core folder19:41
cachio__zyga https://paste.ubuntu.com/p/wgDf97qZRP/19:41
cachio__zyga,  there is a denial19:41
cachio__but it is not failing 100%, sometimes it passes19:42
zygaI saw that error and that denial, not sure what's wrong yet19:43
zygaI'm spending time with my son now (homework)19:43
zygacachio__ but I have one idea what is wrong with layouts now19:43
zygamay be the same bug, not sure yet19:43
cachio__zyga, sure, np19:44
arm1ecan anyone help teach me about snapping an electron app please?19:47
cachio__zyga, the control files are identical19:48
cachio__for 2.31.1 and 2.3219:49
cachio__the only one diffs are some dependencies19:49
arm1eanyone help with building an electron app please? I cant find the "scripts" stanza in the package.json file19:58
arm1ethere is no build or target19:58
roadmrhi sergiusens . parts-service is borky because one of the parts has yaml syntax errors. I contacted the author hours ago but nothing. WHat's usually done here? remove the part entirely?20:09
sergiusensroadmr: yes, remove the part20:10
sergiusenscomment it out20:10
roadmrsergiusens: will do20:10
roadmrthanks!20:10
mupPR snapd#4755 closed: snap/squashfs: add BuildDate <Created by chipaca> <Merged by chipaca> <https://github.com/snapcore/snapd/pull/4755>20:13
mupPR snapd#4778 opened: tests: moving debian 9 from linode to google backend <Created by sergiocazzolato> <https://github.com/snapcore/snapd/pull/4778>20:57
jdstrandslangasek: hey, do you have a moment to talk about https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/175166721:38
mupBug #1751667: classic snap does not run on live session <amd64> <apport-bug> <bionic> <snapd (Ubuntu):Confirmed> <ubiquity (Ubuntu):New> <https://launchpad.net/bugs/1751667>21:38
slangasekjdstrand: sure21:39
jdstrandslangasek: I can give you the summary21:40
jdstrandslangasek: if you recall, the bionic kernels use overlay21:40
jdstrandslangasek: so I fixed that and classic and strict (and devmode) snaps all work (yay, will be in 2.32)21:41
slangaseknice!21:41
jdstrandslangasek: but something regressed in bionic in that nothing in /etc/apparmor.d/ is loaded21:41
slangasekhmm21:41
jdstrandslangasek: which causes snap-confine to fail like so:21:41
jdstrand$ hello-world21:42
jdstrandsnap-confine has elevated permissions and is not confined but should be. Refusing to continue to avoid permission escalation attacks21:42
jdstrandslangasek: this happens with  just the livecd today, so you don't even get to the point where overlay broke things21:42
jdstrandslangasek: I couldn't remember what you did before to make classic snaps work21:43
jdstrandslangasek: really, we do *not* want to load all of /etc/apparmor.d, but we do want to load /etc/apparmor.d/*snap-confine*21:43
jdstrandslangasek: so I think in the general case, the livecd is doing the right thing21:43
mwhudsoncan we blame casper21:44
jdstrandslangasek: but we're missing the 'apparmor_parser -r /etc/apparmor.d/*snap-confine*' somewhere21:44
slangasekjdstrand: doesn't snap-confine being confined rely not just on /etc/apparmor.d being loaded, but also on snap-confine being at /usr/lib/snapd/snap-confine , which it isn't, because overlay?21:44
jdstrandslangasek: no21:44
jdstrandslangasek: if I do 'sudo apparmor_parser -r /etc/apparmor.d/*snap-confine*', then I can run hello-world and see the overlay denial (or if you have my deb, it works)21:45
slangasekjdstrand: as far as what we did previously, I don't think we did anything... subiquity Just Worked by accident, and then failed when snapd restarted, so we fixed it so snapd didn't restart21:45
mwhudsonsubiquity is ok in this case because it runs as root21:45
jdstrandoh, was classic ever only ok with subiquity?21:46
jdstrandI was thinking ubiquity, but maybe it never worked there21:46
slangasekwe never tested on ubiquity21:46
jdstrandslangasek: I think reexec will work with snapd 2.32 btw21:46
jdstrandok, then no regression21:46
jdstrandI mean, someone should check subiquity-- pretty sure it will die without snapd 2.3221:46
jdstrandhow could it not?21:47
jdstrandslangasek: ok, so if you were going to fix this in ubiquity, what would you do?21:47
mwhudsoner hm if i load the apparmor profile subiquity doesn't start, complains about libudev.so.121:47
mwhudsonoh right that's the sort of thing 2.32 fixes21:47
jdstrandslangasek: all I want is to load the snap-confine profiles21:48
mwhudsonjdstrand: what loads the profiles in a normal boot?21:48
jdstrandmwhudson: how does it complain about libudev.so.1?21:48
mwhudsonjdstrand: DENIED on /rofs/lib/x64-64-linux-gnu/libudev.so.121:48
jdstrandmwhudson: the apparmor init script. it knows that if it is on livecd not to load21:49
jdstrandmwhudson: that seems like you are not using the overlayfs kernel?21:49
mwhudsonoh maybe this is aufs still :(21:49
jdstrandmwhudson: artful used aufs, so I would expect denials on /rofs21:49
mwhudsonyes it is21:50
jdstrandmwhudson: bionic is shiny and uses overlay. you would see denials on /upper/... for various thinfs21:50
jdstrandthings*21:50
mwhudsonbecause https://code.launchpad.net/~mwhudson/debian-cd/live-server-cmdline-2/+merge/336177 is not merged21:50
mwhudsonslangasek: can you merge that branch?21:51
jdstrandmwhudson: ah. yes, if you merge that and get snapd 2.32 (couple weeks?) that should work21:51
mwhudsonslangasek: adam has long passed the timeout for complaining :/21:51
slangasekjdstrand: I think I would check where the at-boot apparmor_parser is being suppressed, and add an exclusion there for snap-confine.  Which I think means casper21:51
jdstrandslangasek: let me check something21:51
slangasekmwhudson: not currently, my stack is full.  email?21:52
mwhudsonslangasek: ok21:52
mwhudsonslangasek: is there anyone else who can review this stuff?21:52
jdstrand[ -d /rofs/etc/apparmor.d ]  && exit 0 # do not load if running liveCD21:52
jdstrandthat is in /lib/apparmor/profile-load21:53
jdstrandand that exists in bionic21:53
jdstrandslangasek: so you are suggesting I do something more like: [ -d /rofs/etc/apparmor.d ] && apparmor_parser -r /rofs/etc/apparmor.d/*snap-confine* ; exit 021:55
jdstrandI might have to tweak that for the shell, but you get the idea21:55
jdstrandslangasek: you know, actually, profile-load isn't used by the systemd unit21:58
jdstrandI'll look at casper21:58
jdstrandah, but the initscript does22:00
jdstrand(apparmor's)22:00
mwhudsonjdstrand: the service has conditionpathexists=!/rofs/etc/ ...22:01
jdstrandslangasek: ok, well, thanks for letting me bounce ideas off ofyou :)22:01
mwhudsonand it calls the initscript, which has the same checks again, its seems...22:01
jdstrandsince the initscript has it, I can remove the conditional22:02
jdstrandin the service22:02
mwhudsoni guess that might affect things that require= on apparmor.service?22:03
mwhudsoni don't know if there are any of those though22:03
jdstrandso the service calls the initscript, the initscript just loads those two things22:03
mwhudsonoh right yes22:03
mwhudsononce snapd 2.32 is in bionic please :)22:04
jdstrandmwhudson: why? the profiles are fine to load22:05
jdstrandmwhudson: loading the profiles just means that snaps fail to run in a different way22:06
jdstrandmwhudson: am I missing something?22:06
slangasekjdstrand: the conditional on the service surely makes a difference for whether dependent things consider the service started or not22:15
slangasekor to-be-started22:15
slangasekbut maybe that gives the wrong answer here in any event22:15
jdstrandCondition: start condition failed at Thu 2018-03-01 21:18:49 UTC; 45min ago22:15
jdstrandthat is what we have now22:15
mwhudsonjdstrand: if the profiles are loaded subiquity fails to start22:16
mwhudsonjdstrand: in the current situation the 'elevated privileges' check only fires if subiquity is started as non-root, which isn't interesting anyway22:17
jdstrandah22:17
jdstrandyes22:17
jdstrandbut if it is root, then snap-confine dies cause of /rofs22:18
jdstrandgot it22:18
jdstrandmaybe it would be better if snapd loaded them22:19
mwhudsonright22:20
jdstrandbah, my test case was bad. snapd *will* load the profile itself. *sigh*22:31
jdstrandsystemctl start snapd with 2.32 will load the profile since it generates the overlay. in the bug I did the wrong thing to reproduce22:32
jdstrandat least we know how to fix subiquity now :)22:32
jdstrands/overlay/overlay policy/22:32
jdstrandsorry for the noise22:36
mupPR snapd#4714 closed: interfaces/apparmor,system-key: add upperdir snippets for strict snaps on livecd (LP: #1729867) <Created by jdstrand> <Merged by jdstrand> <https://github.com/snapcore/snapd/pull/4714>22:48
arm1eI have been trying to snap up an electron app but I can't find the relevent sections in the json file. Can anyone please help22:50
arm1eI have been trying to snap up an electron app but I can't find the relevent sections in the json file. Can anyone please help23:00
naccarm1e: i've never built an electron snap, but i can try and help23:00
naccarm1e: what happens when you try to snap it?23:00
mupPR snapd#4779 opened:  interfaces/apparmor,system-key: add upperdir snippets for strict snaps on livecd (LP: #1729867) - 2.32 <Created by jdstrand> <https://github.com/snapcore/snapd/pull/4779>23:17
arm1eFailed to parse package.json data.23:18
arm1enpm ERR! package.json must be actual JSON, not just JavaScript.23:18
arm1enpm ERR!23:18
arm1enpm ERR! Tell the package author to fix their package.json file. JSON.pars23:18
arm1enacc, basicallly want to learn how to snap packages but I have no experience of packaging or programming and want to learn.23:20
arm1eI have completed the tutorial, but EVERY time I attempt to snap something there is a huge hurdle, such as files missing, or expected build properties not present. I just dont know how to learn if there is always a huge problem that I cant understand23:21
naccarm1e: and where is the source?23:23
naccarm1e: it feels counterintuitive to want to make snaps if you aren't the author of the thing you are snapping23:23
naccarm1e: not impossible of course, but it can be harder23:24
arm1ehttps://github.com/LightTable/LightTable23:24
arm1eThis is from the Google Code-in stuff I was given by popey23:25
naccarm1e: it doesn't seem like a normal electron app, but i don't know23:25
arm1eAlso tried https://github.com/princejwesley/Mancy/blob/master/package.json23:26
arm1enacc:  That's what I thought so I gave up23:27
arm1eI will look into it another day. Too late now, off to bed23:27
arm1enacc: thanks for trying :)23:27

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