/srv/irclogs.ubuntu.com/2017/05/17/#snappy.txt

kyrofajorian, snap would be a good option for packaging your app _together_ with the newer lib00:22
=== georgeowell_ is now known as georgeowell
diddledanif anyone is familiar with locales in combo with snaps, is the folder usr/lib/locale important for an app, or can I omit it (presumably by not installing locales-all in stage-packages)?01:00
diddledanit's 117MB is all so it's bloating my snap to rather large proportions01:01
diddledan(117MB uncompressed)01:02
=== chihchun_afk is now known as chihchun
nacckyrofa: good point, sorry I didn't say that more explicitly03:48
mupPR snapd#3334 closed: Release snapd 2.26.2 <Created by mvo5> <Closed by mvo5> <https://github.com/snapcore/snapd/pull/3334>05:51
mupPR snapd#3336 opened: Reease snapd 2.26.2 <Created by mvo5> <https://github.com/snapcore/snapd/pull/3336>05:51
mupPR snapd#3292 closed: wrappers: make StartSnapServices cleanup any services that were added if a later one fails <Created by chipaca> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/3292>05:58
mupPR snapcraft#1320 opened: store: send X-Ubuntu-Series, not X-Ubuntu-Release <Created by cjwatson> <https://github.com/snapcore/snapcraft/pull/1320>06:09
mupPR snapd#3337 opened: errtracker: try multiple paths to read machine-id <Created by morphis> <https://github.com/snapcore/snapd/pull/3337>06:33
morphismvo: ^^06:34
mvomorphis: cool, thank you06:41
mvomorphis: is there a leftover debug fmt.Prinln in there ;) ?06:42
morphismvo: yeah, could be :-)06:42
mvomorphis: looks great otherwise, I will do a formal review in a bit, just fixing the image, shadow is out-of-sync with the archive06:43
morphismvo: oh wonderful, that just happened recently06:43
morphismvo: dropped the Println06:43
zygagood morning06:47
zygamvo: hey, I'd like to trigger a build of the ppa that feeds edge, I'm looking at https://launchpad.net/~snappy-dev but I see quite a few archives there, can you give me a hand plese?07:00
zygamvo: perhaps we could close some archives (I suspect we don't need all of them at once)07:00
zygaCC ogra_ ^^07:01
mvozyga: sure, let me check07:01
* zyga goes to garden PRs in the meantime07:02
zygathank you :)07:02
mvozyga: https://launchpad.net/~snappy-dev/+snap/core is what need if you want to trigger a new build07:03
mvozyga: please check that shadow build in the ppa:snappy-dev/image, would be good to have that fix in the iamge too07:04
zygamvo: I know the snap recipe, I was just struggling with the PPA part07:05
mvozyga: aha, ok07:05
zygamvo: thank you!07:05
mvozyga: ppa:snappy-dev/image is the relevant one07:05
mvozyga: I will trigger a new build now unless you want something else in there too?07:06
zygamvo: I'll talk to ogra about closing the remaining archives, they feel like just noise07:06
zygamvo: no, everyting is ready since yesterday07:06
zygamvo: please go ahead07:06
zygaeverything*07:06
mvozyga: I deleted some obvious ones, some are 15.04, if we are really sure we don't need 15.04 anymore for the previous snappy incarnation then those can go07:06
zygamvo: though when I refreshed core today (from edge) I got 2.26.207:07
zygamvo: what about this one? https://launchpad.net/~snappy-dev/+archive/ubuntu/edge207:07
zygaor https://launchpad.net/~snappy-dev/+archive/ubuntu/beta ?07:07
mvozyga: checking07:10
mvozyga: I guess beta is fine to remove, the risk is always that if you delete a ppa you screw all the people who still have it in their sources.list07:11
mvozyga: but given that the latest archive in there that is still supported is trusty the risk is relatively low07:11
mvozyga: I will delete edge2 after this core build07:12
zygamvo: there is something wrong in the image07:13
zygahttps://travis-ci.org/snapcore/snapd/builds/233106199#L381407:13
zygamvo: this is the 2.26.2 merge back to master07:13
zygawe lack --extrausers07:13
zygait seems like the archive package has higher version number07:13
mvozyga: yes, the core build that is currently in process will fix it07:13
zygaand we're not getting the patched one07:13
zygaah, perfect, thank you for handling this :)07:13
morphiszyga: thanks for pushing to my PR but I will squash that change if you're ok07:20
morphiswas about to push the same07:21
zygamorphis: no worries, do it07:25
zygamorphis: I'd squash myself if I knew you wanted it :)07:25
morphis:-)07:25
fgimenezhi mvo: i've started with 2.26.2 validation, tests/main/listing and tests/main/interefaces-log-observe are failing on i386 (the first one that finished) this is expected (it seems that https://github.com/snapcore/snapd/pull/3327 is missong in the release branch), right?07:36
mupPR snapd#3327: tests: fix failing tests (snap core version, syslog changes) <Created by chipaca> <Merged by chipaca> <https://github.com/snapcore/snapd/pull/3327>07:36
mvofgimenez: meh, the listing test! we may need to backport that fix to 2.26 too07:38
mvofgimenez: interfaces-log-observe is  unexpected07:38
mvofgimenez: tests/main/listing will also fail in autopkgtest so we also need a new SRU :/07:38
fgimenezmvo: i think interfaces-log-observe is fixed in the same branch, will check in the upgrade-from-stable scenario07:39
morphiszyga: so moment of truth, running the entire main suite again for fedora, we should now close to 100%07:39
morphisor better said close to 100% of those tests which apply to Fedora (disabled those which test re-execution or classic confinement which we don't support on Fedora yet)07:40
mupPR snapd#3338 opened: tests/main/completion: source from /usr/share/bash-completion <Created by morphis> <https://github.com/snapcore/snapd/pull/3338>07:43
zygamorphis: I'm very happy to see that :)07:44
morphis:-)07:44
morphiszyga: when you're leaving for the suse conference?07:44
zyganext week07:45
zyga25th07:45
morphisok07:45
pedronismvo: why interfaces-log-observe is unexpected? did you build also with an older revision of core stuff07:58
mvopedronis: well, maybe it is not, I have not checked the log what exactly is failing. if it has a similar regex as the listing test then it is not unexpected08:01
* zyga hugs mvo - the SRU dancer08:01
mvopedronis: I will check as soon as I'm finished with the current code review08:01
pedronismvo: well we turned off rsyslog08:01
zygayep, that was bundled into chipaca's branch08:01
pedronisat least that's why we had interfaces-log-observe issues on the mainline08:01
=== didrocks1 is now known as didrocks
mvopedronis: aha, I must have missed that, thank you. that will also need to be ported then08:04
pedronismvo: here is the discussion https://forum.snapcraft.io/t/change-in-logging-behaviour-on-ubuntu-core/591/4  jdstrand still thinks it's bad backward compatibility wise08:05
mvopedronis: fwiw, I agree with that08:06
mvopedronis: if it changed from 2.26 to 2.26.3 that would also be very bad08:07
mvopedronis: thanks for raising it, I will look, it definitely needs to go into the release notes if it goes into 2.2608:08
mvopedronis: I will follow up in the forum, I think if nothing else we should create some hint for people looking at /var/log/syslog that they now need to use journalctl08:10
morphiszyga: you already had time to look into the bind problem? this really prevents configure hook execution on !ubuntu for all !core snaps08:18
zygamvo: can you override merge https://github.com/snapcore/snapd/pull/3332 so that we don't waste resources on re-testing it08:18
mupPR snapd#3332: interfaces/seccomp: document Backend.NewSpecification <Created by zyga> <https://github.com/snapcore/snapd/pull/3332>08:18
zygapstolowski: hey08:19
pstolowskizyga, hey!08:19
zygapstolowski: question about https://github.com/snapcore/snapd/pull/3328 - how would you feel starting afresh; take that branch, squash the history so that it makes more sense08:19
mupPR snapd#3328: many: snapctl outside hooks v2 <Created by stolowski> <https://github.com/snapcore/snapd/pull/3328>08:19
morphiszyga: 87% pass rate, is what I have now08:19
zygapstolowski: I will work with you on the regexp code elimination today08:20
pstolowskizyga, np, i can do that if it helps08:20
mvomorphis: nice job08:21
zygapstolowski: as you think but I would recommend it, it's a "new" PR and the history is full of stuff that makes it harder to follow08:21
mupPR snapd#3332 closed: interfaces/seccomp: document Backend.NewSpecification <Created by zyga> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/3332>08:21
morphismvo, zyga: however we need to fix the bind() problem for hooks this cycle, if you have any pointers for me what calls it in the go libs when snapctl is executed from your previous research that would be a great starting point08:22
zygamorphis: sure08:22
mvomorphis: who should I talk to about the dropping of rsyslog in the CE team? I would like to make sure none of our existing customers will suffer because of it08:22
pstolowskizyga, ok, will do in a few08:22
zygamorphis: it's easy, one sec08:22
morphismvo: I can raise this with Tony later today, it will mean that /var/log/syslog is not being filled anymore, right?08:23
morphisjoc: would that be a problem for you guys in any way?08:23
mvomorphis: I think so, I'm looking at it right now08:24
zygamorphis: look at /usr/share/go-1.6/src/net08:25
zygamorphis: look at /usr/share/go-1.6/src/net/net.go line 9908:25
zygamorphis: on startup the net package probes ipv4 and ipv608:25
fgimenezmvo: i can conform that adding the changes in snapd#3327 to the release/2.26 branch makes the full suite pass using core from beta (amd64 so far)08:25
mupPR snapd#3327: tests: fix failing tests (snap core version, syslog changes) <Created by chipaca> <Merged by chipaca> <https://github.com/snapcore/snapd/pull/3327>08:25
fgimenez*confirm08:25
morphiszyga: hm08:25
zygamorphis: it creates two sockets and binds them to localhost address08:26
jocmorphis: pretty sure we have some tests that expect to be able to find events logged in syslog08:26
zygamorphis: I don't know if seccomp can even express that08:26
zygamorphis: and even if, I don't know if this is safe08:26
zygamorphis: after all, you can bind on localhost and that's still IPC08:26
jocmorphis: off the top of my head, usb insertions08:27
zygamorphis: apart from allowing any hook to do "socket+bind"08:27
zygamorphis: or waiting for the bleeding edge kernel that can return EPERM08:27
zygamorphis: (instead of killing)08:27
zygamorphis: well, clarification, all kernels can EPERM, we want bleeding edge kernel that does EPERM + audit08:27
zygamorphis: even if we just return EPERM today, I don't know if we can do that per syscall08:28
zygamorphis: and even if we can I don't know how that combines with a rule that allows bind (say an actual hook that has the network-bind plug)08:28
zygamorphis: all in all, it's pretty messy at this level08:28
zygamorphis: for network filtering I'd feel much better if we wrapped things in a network namespace and used firewall rules08:29
zygamorphis: but that's a huge chunk of work08:29
zygajoc: interesting08:29
zygamvo: ^^08:29
morphiszyga: hm08:29
zygamvo: how about postponing this till we can ship a working rsyslog snap?08:29
zygamvo: I know it's a tough problem because we have people that want both things _now_08:30
mvozyga: this was suggested by jamie as well, see the forum discussion08:30
zygamvo: alternatively allow customers to disable it08:31
zygamvo: but don't disable yet and don't remove yet08:31
iceyI'm trying to make a snap of a prigram that uses git internally, to clone and manage stuff, I'm having trouble getting all of git working from within the snap08:31
mvozyga: I personally think even the removal is risky, its a stable 16 core afterall and we enforce updates. if an update is percived to be breaking functionality that will weaken the trust in the system08:31
zygamvo: yes, I agree08:31
iceylooks like it's not finding the stuff that's normally in /usr/lib/git-core/08:31
zygaicey: that's expected08:31
zygaicey: snap execution environment is not like the regular environment08:31
iceyzyga: I'm aware08:32
iceyzyga: I've got git installed in the snap08:32
zygaicey: all the content of your snap is in $SNAP which is something like /snap/yourfancysnapname/12308:32
iceyzyga: my program executes git fine, but git can't find any of its handlers08:32
zygaicey: and the root filesystem is not the one you normally see08:32
zygaicey: but the core snap itself (see /snap/core/current for some ideas)08:32
iceyzyga: warning: templates not found /usr/share/git-core/templates08:32
iceyfatal: Unable to find remote helper for 'http'08:32
zygaicey: tip: run snap run --shell yoursnapname and look around08:32
iceyzyga: yes, I've been doing that08:32
iceyzyga: I'm wondering if anybody has figured out a way to let a program use git (inside the snap) as a dependency08:33
zygaicey: some people that tried this also set a variable that redirects git to look elsewhere but I don't remember the details08:33
zygaicey: yes they have, there was a discussion here a few months ago08:34
zygaicey: but you will still struggle with ssh as ~/.ssh is not going to be available08:34
iceyzyga: I'm digging through git's manpages now to try to find environment variables08:34
zygaicey: and $HOME will not retain its value08:34
zygaicey: dig through git source code08:34
iceyzyga: I'm only expecting to use the http handlers08:34
zygaicey: should be good then08:35
iceyzyga: and I'm not using $HOME08:35
zygamorphis: what do you think about the bind issue?08:35
iceyzyga: practically, my program should be fine (and I can change its source ;-) )08:35
morphiszyga: it's hard to say what we can do08:35
morphiszyga: it would be good if you could generate a profile specific for snapctl08:36
morphisas that is the real issue here and it gets executed under the umbrella of the hook profile08:36
iceyzyga: do you know if the environment variable is a runtime change or if it would need to be an install time thing?08:36
zygaicey: I don't know08:37
zygaicey: may be either, it was long ago, sorry :/08:37
pedronisfgimenez: mvo: we need to upload some test-snapd-* snap with a configure hook (can be empty, accept anything)08:37
zygamorphis: interesting08:37
zygamorphis: that may be a nice way out08:37
morphiszyga: yes08:37
zygamorphis: we could have a profile just for snapctl and allow anyone to run snapctl in a way that changes profiles08:37
morphiszyga: is that something we can do without a lot of refactoring?08:37
zygamorphis: there's still risk ask overmount must now reject you from changing snapctl08:37
zygamorphis: perhaps08:38
zygamorphis: let me try08:38
mvopedronis: do we have the snap already? if so its trivial for me to upload08:38
zygamorphis: thanks for the idea!08:38
morphiszyga: np :-)08:38
pedronismvo: no08:38
morphiszyga: if you have some initial code I can help more with that as we need to get this fixed real soon08:38
pedronismvo: can make a PR with one though08:38
mvopedronis: ok, I can create one - test-snapd-with-configure ?08:38
pedronisyea08:38
mvopedronis: whatever is easier for you :)08:38
morphiszyga: I can open a forum topic to get this more widely discussed08:38
mvopedronis: but I can do it too08:39
zygamorphis: open one please08:39
zygamorphis: I have no code at all but I can get started quickly08:39
zygamorphis: it's actually trivial to test08:39
morphiszyga: would be great!08:39
pedronismvo: I'll make a PR about that and ping you08:39
mvopedronis: thanks a bunch !08:39
mvopedronis: btw, 3211 (the repair assertion) is green and has two +1, anything else I can do there or can I merge?08:40
pedronismvo: I think it's fine personally, also after further thinking I think it's a good property that if we want we can emit  a canonical signed     brand_model-# assertion if needed08:41
pedronis(witho some coord with the brand)08:41
zygamorphis: hmmmmmm08:41
zygamorphis: I think there's a separate problem08:42
zygamorphis: we can change the apparmor profile08:42
zygamorphis: but not the seccomp profile08:42
zygamorphis: let me read some man pages08:42
iceyzyga: any chance there's a way to see the snapcraft.yaml used to build a snap? looks like https://uappexplorer.com/app/git-repo.jhodapp may have figured it out08:42
mvopedronis: great, I merge it then, it got a +1 from gustavo as well, we can always iterate, its not being actively used yet anyway08:42
pedronismvo: yup08:42
zygaicey: no08:43
zygaicey: I know there's ongoing work for that but I don't think it is ready :/08:43
zygaicey: you can just reach to the author of that snap08:43
pedronismvo: do we have a core that fixe create-user ? or is still building?08:43
iceyyeah zyga, stalking hiim on GH + Launchpad hasn't led me to useful results08:44
pedronisChipaca: maybe snapd#3335 is something you can review?08:45
mupPR snapd#3335: daemon: teach the daemon to wait on active connections when shutting down <Created by pedronis> <https://github.com/snapcore/snapd/pull/3335>08:45
Chipacanah08:45
Chipaca:-p08:45
zygaoh, no battery08:45
* zyga looks for cable08:45
iceyzyga: looks like there's a $prefix available during build, I'm going to try building git in my snap ;-)08:46
mvofwiw https://codecov.io/gh/snapcore/snapd/pulls08:46
zygaicey: tip: set prefix to /snap/your-snap-name/current/usr and then install it so that the snap's prime directory only contains the /usr part08:47
zygaicey: (I think you can do this with organize)08:47
mupPR snapd#3211 closed: assertions: add "repair" assertion  <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/3211>08:47
zygaicey: ask kyrofa for hints, I'm not using snapcraft that much and my knowledge can be stale08:47
mvozyga: also sorry about the missing comment on 3308 - I added one last night but for some reason gh marked it as pending :/08:47
Chipacapedronis: 1.6 didn't have Shutdown, i guess08:50
pedronisChipaca: it doesn't08:50
pedroniswith 1.808:50
pedroniswe wouldn't need this08:50
pedronisbut doing it similarly means we if/when we move to 1.8, the change is easier08:51
pstolowskizyga, we already have sc_snap_name_validate, which is regexp-free08:52
pedronisthere was some idea to do something inside Command.ServeHTTP , but this seems less invasive08:52
zygapstolowski: I think we need a few more as well08:53
zygapstolowski: but yeah08:53
zygapstolowski: that's the way to go08:53
zygamvo: no worries, I just replied to your question08:53
zygamvo: thank you for responding :)08:53
pedronisChipaca: I need to merge master and waiting for a fixed core to rerun tests, so I can add a comment about that08:54
Chipacapedronis: +1, anyway08:54
Chipacapedronis: my questions were merely because the godoc i have up right now points to 1.808:55
Chipacaif it had been pointing to 1.6 i woudln't've had to ask them at all08:55
Chipacacode is super clear08:55
mupPR snapd#3328 closed: many: snapctl outside hooks v2 <Created by stolowski> <Closed by stolowski> <https://github.com/snapcore/snapd/pull/3328>08:55
pedronisthx08:55
zygaofftopic: wow, amd has released some insane chips!08:58
mupPR snapd#3338 closed: tests/main/completion: source from /usr/share/bash-completion <Created by morphis> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/3338>08:58
morphismvo: thanks!08:59
pedronismvo: do you have a tentative date for 2.27 ?08:59
zygamvo: new core built09:03
mvopedronis: yes, 23.05 ideally, that would follow the two weeks cadance, I created a  milestone09:03
mvozyga: another new core? what changed?09:03
zygamvo: I was thinking that the release "shadow" issues say we should think about a pair of PPAs and snap recipes09:03
zygamvo: I think it was the one you built :)09:04
zygamvo: 2.26.2 with fixed --extrausers09:04
pedronismvo: thank you09:04
zygamvo: I'd like to see the new core, from master, with update-ns though09:04
mvozyga: that one finished some time ago, maybe the last stranglers or something09:04
zygamvo: without interrupting the release09:04
morphiszyga: reading a bit through the snap-confine code for the seccomp setup ..09:04
zygamvo: perhaps, I'm on 1952 now09:04
zygamorphis: seccomp can only be appended to, I think09:04
zygamorphis: (constrained)09:05
mvozyga: I can't parse the "shadow" issue suggestion, sorry. could you elaborate please?09:05
zygamvo: sure, sorry, the conflict of which snapd package is build into the snap09:05
mvozyga: the update-ns from core? I think we need to merge the 2.26.2 change first09:05
morphiszyga: so we can split out the current profile and extend just for snapctl?09:05
zygamvo: like when you made 2.26.2 you needed to dput to a ppa and quickly build the core snap09:05
zygamvo: so that another daily build doesn't clobber your state09:05
zygamorphis: "split out the current profile?09:05
zygamorphis: the problem is that as we can only constrain profiles09:06
zygamorphis: if you are in a hook/app that doesn't have network-bind (hook)09:06
zygamorphis: nothing you can do will add that09:06
zygamorphis: if you allow network-bind in the first place then you'd have to constrain it for _everything_ else (apart from snapctl) but there's no way to do that09:06
mvozyga: thats how it works, except it does not need to be "quick" because as long as the version in the ppa is higher than the version in git master we are good, as soon as e.g. 3336 gets merged we get new core builds with the edge snapd. so the workflow is ok for now09:06
morphiszyga: hm09:07
zygamvo: why didn't we get a single build in master that contains edge then?09:07
zygamvo: it's not okay because it doesn't work, releases interrupt master and vice versa IMO09:07
zygamvo: (I swapped the semantics of master and edge in the previous statement)09:07
mvozyga: yeah, that is true, during release the edge is the released version not the edge version, that is annoying09:08
zygamvo: not something i wan't to jump at fixing but I want to recongize the issue09:08
morphiszyga: we can't even patch golang for this ..09:08
mvozyga: usually the interruption is short but this time its not because of the various issues (snapd, listing test breakage, rsyslog)09:08
zygamorphis: nope09:08
mvozyga: yeah, agreed, I now understand your point and there is no disagreement09:09
zygamvo: I was thinking if we could clone the current setup so we have two of everything: snap recipes, deb recipes and PPA archives09:09
zygamvo: then edge just always contains master no matter what09:09
zygamvo: and beta is a hand-triggered thing09:09
zygamvo: though the list of packages in the ppa is scary :/09:09
zygamvo: I wish we didn't need those09:09
zygamvo: for the rarely changing packages we could just copy them from edge ppa once in a while09:09
zygamvo: but it'd be better if those didn't exist in the first place09:10
zygamvo: and our ppa just contained snapd and nothing else09:10
zygamvo: though maybe it can, with the image machinery09:10
zygamvo: we might move everything else to a 3rd ppa that is there as a base for all core channels09:10
mupPR snapd#3336 closed: Reease snapd 2.26.2 <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/3336>09:12
mvozyga: yes, we can build more infrastructure and decouple the two. there is also the suggesiton from Gustavo about decoupling the snapd build and the base image which is probably the first step as we get a more predictable core with it09:13
zygamvo: yes, the way the core is assembled also has to change09:14
ogra_zyga, i need to contact all the uploaders first, (i dont want to delete PPAs without consent), but i'll put dropping them on my TODO09:15
zygaogra_: hey, good mornign09:16
zygaogra_: I think mvo axed some PPAs09:16
ogra_zyga, mvo, hmm, did you guys disable something already ?09:16
zygaogra_: I think so09:17
ogra_seems edge is broken09:17
ogra_(the edge PPA)09:17
zygaogra_: those looked very much dead anyway09:17
zygaogra_: in which way?09:17
ogra_"This PPA depends on disabled archives. it may cause spurious build failures or binaries with unexpected contents."09:17
mvoogra_: I killed edge2, I can fix the fallout09:17
ogra_this needs some planning i fear09:17
ogra_ok09:17
mvoogra_: edge is fine again09:18
ogra_we should end up with image anbd edge though, all the others should go ... but there might be people or other PPAs still using them somehow09:18
* ogra_ will start a forum thread 09:18
zygaogra_: have a look at the discussion just above ^ where I advocate for a beta PPA09:18
ogra_zyga, well, we should finally follow the plan ...09:19
zygaogra_: as we (the snapd team) release just beta and edge snaps having a pair makes sense09:19
ogra_it exists since nearly 2 years now and we're still buiolding from random PPAs09:19
ogra_there should only be one PPA ... for edge ... the rest of the snap builds should come from different stages of the actual archive09:19
* ogra_ points to the QA teams https://wiki.ubuntu.com/QATeam/OSSnapPromotion09:20
zygaogra_: did you see my rationale for a beta ppa?09:20
zygaogra_: do you think it makes no sense to have it?09:21
ogra_zyga, i think building beta from proposed is the way to go ... but that means a lot of PPA cleanup (packasges to go to the archive)09:21
ogra_like the plan describes09:21
ogra_else you have a PPA for beta builds and *still* need to do the deb release aside ... using proposed as beta stage archive saves that step09:22
zygaogra_: interesting, yes, I think that could work09:22
ogra_the problem is that we need to get rid of the image PPA or at least clean up massively in there09:23
ogra_we could start with it enabled, but then we need to make sure the package version for snapd is always higher in proposed before we build09:24
mupPR snapd#3339 opened: tests/lib/snaps: add a test store snap with a passthrough configure hook <Created by pedronis> <https://github.com/snapcore/snapd/pull/3339>09:24
pedronismvo: ^09:25
mvopedronis: thanks, on it09:26
morphiszyga: https://forum.snapcraft.io/t/hooks-calling-snapctl-are-broken-with-just-seccomp-enabled/65809:26
zygamorphis: I read it, thank you09:28
zygaI'm checking what the kernel allows09:28
zygaogra_: who is doing the work on upstraming parts of our PPA?09:28
mvopedronis: thanks, uploaded and shared with you09:29
mupPR snapd#3340 opened: Smany: snapctl outside hooks <Created by stolowski> <https://github.com/snapcore/snapd/pull/3340>09:33
pstolowskizyga, ^ reopened; I've addressed some of your comments but not all, don't worry, i'll address them based on comments from previous PR09:34
zygapstolowski: great, thank you!09:35
* zyga looks09:35
* zyga needs some breakfast09:35
fgimenezmvo: pi3 finished with just listing and interfaces-log-observe failing, no more crashes it seems, pi2 is good too so far (85/116), i'll trigger now the upgrade-from-stable scenario on pi3 (this one crahsed too on 2.26.1)09:35
morphiszyga: happy thing, latest golang git master has changed from an initializer to lazy support detection09:36
morphisso the func init() call is gone09:36
mvofgimenez: excellent, thank you. I'm working on 2.26.3 that fixes the listing and observer failures09:36
fgimenezmvo: great tahnks09:36
pstolowskifriendly neighbour drilling again... I need a walk...09:38
fgimenezmvo: pedronis should we upload test-snapd-with-configure to snappy-hub too and automate the upload to the store? it is not likely going to change too much, but to align it with the rest of test-snapd-*, i can prepare the lp branch and build09:39
zygamorphis: nice :)09:39
morphiszyga: however, doesn't really help us :-)09:39
zygamorphis: but still meh :( we won't be using that anytime soon09:39
morphiszyga: LD_PRELOAD would be another way but not sure if that would work09:40
morphisI guess golang doesn't go through libc for that09:40
morphishm, they use syscall()09:41
mupPR snapd#3331 closed: tests: remove unit tests task <Created by fgimenez> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/3331>09:41
zygamorphis: how would LD_PRELOAD help?09:45
morphiszyga: if it would use libc to call bind we could easily intercept the bind() call09:45
morphisbut we can't09:45
zygamorphis: ah, right09:45
zygamorphis: those are stright syscalls I'm afraid09:46
zygaalso sucks for strace09:46
zyga(golang tooling sucks here)09:46
morphiszyga: yes09:46
pedronismvo:  mmh, I haven't got the sharing email for that snap afaict09:50
mvopedronis: could you /msg me your primary sso email address please? there used to be a bug that it would only share it with this mail09:50
* zyga eats breakfast while reading seccomp sources09:51
ogra_mvo, a review of https://github.com/snapcore/core/pull/43 would be appreciated ... (in that course ... i wonder if we should drop cron, the only remaining thing left for  it is logrotate which we could switch to a systemd timer instead)10:11
mupPR core#43: remove generated logs, cleaner lsb-release removal <Created by ogra1> <https://github.com/snapcore/core/pull/43>10:11
mvoogra_: I don't want to make the cron removal call, I think its risky to do package removal on a stable core, I would prefer if we do this and the rsyslog change in 18 only. but thats just me10:16
morphiszyga: hm, looks like we have a problem with rshared on Fedora10:17
zygamorphis: tell me10:19
morphiszyga: not sure yet, but the snap-on-non-shared-root spread tests fails, explicitly here https://github.com/snapcore/snapd/blob/master/tests/main/snap-on-non-shared-root/task.yaml#L1810:19
morphiszyga: https://paste.ubuntu.com/24592098/10:20
zygamorphis: can you capture that with SNAP_CONFINE_DEBUG=yes ?10:21
pedronispstolowski: I think I'm a bit confused  about the relationship between Sanitize* and Validate* and default values for interface attributes (which is not a concept we use much, mind)10:22
morphiszyga: yes, rebooting the machine right now and will do that10:23
Chipacapedronis, mvo: is there an obvious way of adding info (e.g. apps) to overlord/snapstate's mock snaps that i'm missing?10:23
pedronisChipaca: what kind of snaps ? snaptest.MockSNap ?10:24
Chipacapedronis: most tests just start with a SideInfo10:25
pedroniswell, there's snaptest.MockSnap10:25
pedronisthat we use when you want something on disk10:25
Chipacaand it seems that changing that to something that has apps is a lot of repetitive typing10:25
* Chipaca looks10:26
pedronis(remember to undo the mocking of ReadInfo though)10:26
pedroniswe use it sometimes in snapstate10:26
pedronisthis is more for stuff already installed though10:27
Chipacayep. sounds like the basic answer is 'no' :-/ but let me see how far i get10:27
ogra_mvo, well, you should comment on the rsyslog thread at least ... i'll leave cron untouched for 16 then10:27
pedronisif you want to start from a .snap, there's  something else10:27
Chipacapedronis: yep. I was just wanting to avoid having to rewrite all the tests10:28
* zyga errands10:28
Chipacawell, 'all', 21 of them10:29
pedronisChipaca: there is also snaptest.MakeTestSnapWithFiles if you need a .snap10:29
abeatozyga, hi, what do you mean by "atomic write helpers"?10:30
ChipacaI'll probably remove the code that makes all the tests fail, and come back to it later10:30
mvoogra_: maybe, but it seems I'm just repeating something that has already been debated so I will not add much value to the discussion10:30
morphiszyga: https://paste.ubuntu.com/24592122/10:30
Chipaca(with the changes i made it's super easy to not add the {start,stop}-snap-services task if the snap has no services, so I thought I'd do that, but it breaks 21 tests :-) )10:30
ogra_mvo, well, it will add value in that it shows you agree with jamie ... i would have preferred to just be able to disable it but didnt find it worth to have an argument about it10:31
Chipaca(sorry, not the task, the backend call)10:32
morphiszyga: will be out for lunch now10:33
pedronisChipaca: ah, my experience is that making task optional is a recipe for pain10:34
Chipacapedronis: i can imagine :-) but it's not the task, just the backend call, so it should be doable10:35
Chipaca:-)10:35
Chipacapedronis: (and it'd avoid a lock/unlock of state, which is why i think it might be worth it)10:35
pedronisChipaca: anyway if you go that way what you want is remove those things from all tests and then just have a couple of tests about your case10:35
Chipacabut, completely secondary to the work i'm doing10:35
pedronisChipaca: not re-add services everywhere10:35
Chipacapedronis: !10:35
Chipacagood point10:35
Chipacain a later branch.10:36
* Chipaca tries to focus10:36
pedronisfgimenez: mvo: still getting main/compleation create-key time outs fwiw :/10:36
Chipacabasically in prep for 'snap start', i'm making wrappers.StartSnapServices -> wrappers.StartServices take a []*snap.AppInfo instead of a *snap.Info, and seeing how far into the beast this makes sense to let it bubble in10:37
Chipacai've reached the task level with no great changes, and i think this is good10:37
Chipaca(not touching tasks)10:37
fgimenezpedronis: that's bad, do you have a link to the build?10:38
pedronisfgimenez: no, I resterarted it10:38
pedronisbut nothing interesting10:38
pedronisjust expect on create-key giving time out10:38
pedronisin the prepare of main/completion10:38
fgimenezpedronis: ok did you notice which system was failing? now we should be installing and configuring rng-tools for all the ubuntu-* systems10:40
fgimenezmaybe that's not enough though, i think Chipaca suggested to use something else10:40
pedronisfgimenez: also here a prepare timed out: https://travis-ci.org/snapcore/snapd/builds/23316178110:41
pedronisfgimenez: no, sorry, I will try to check that the next time :/10:41
Chipacalook at the times on the prepares that succeeded10:41
pedronisfgimenez: it seems we are quite back into flaky land overall10:41
pedronisI see a green run everywhere I don't know many red ones10:41
pedronis:/10:41
fgimenezpedronis: nw, i'll try to keep an eye on it10:41
fgimenezpedronis: yep, the flaky switch10:42
abeatoChipaca, hey, how this thing about export_test.go works? don't really get it10:42
Chipacaabeato: because it's called foo_test, it only is looked at during tests10:42
Chipacaabeato: but you put it in the foo package, not the foo_test package10:43
Chipacaabeato: so you have code in the main package that is only looked at during tests10:43
pedronisabeato: you write most of your _tesst.go tests with "package pkg_test"  but you use "package pkg" in export_test.go10:43
pedronisgo test collects and compiles all _test.go  but export_test.go that way has access and can reexport give access to pkg internals10:44
Chipacaabeato: so there you can do things like make private methods public, or mock out external calls, or etc10:44
Chipacaabeato: hoping this makes sense in the context of that review :-)10:44
Chipacaabeato: as I said there, it looks good; the changes i asked for are idiomatic10:44
Chipacalooking forward to having that code :-)10:45
abeatoChipaca, does that mean that I need to add somewhat all private methods that I use in the tests to export_test.go?10:45
fgimenezpedronis: i've seen quite a few times the prepare timeout lately http://paste.ubuntu.com/24592153/, maybe we could remove the "quiet" call there now that we are folding the output in travis to see what's going on10:45
abeatoChipaca, sure, you know, I am starting with golang, so it is still hard for me :)10:45
Chipacaabeato: yep! we've all been there10:46
Chipacaabeato: wrt "all private methods", are there really that many?10:46
Chipacait's usually just a few, if any10:46
* Chipaca looks10:46
abeatoChipaca, well, just too, androidboot and newAndroidboot10:47
Chipacaabeato: androidboot is a type, but you can add accessors in export_test10:47
zygare10:47
Chipacaabeato: and yes, a constructor that lets you set more internal things makes sense10:48
Chipacain export_test i mean10:48
zygaabeato: look at osutil/io.go10:48
zygamorphis: thank you, reading10:48
abeatoChipaca, will try that, thanks10:48
Chipacaabeato: also it might help you write the tests more unit-y if you mock androidbootenv.NewEnv10:49
zygamorphis: DEBUG: share snap directory here... this (somewhat ugly) output says that we rshared /snap10:49
zygamorphis: let me triple check10:49
Chipacaabeato: but i'm not fussed about that one10:49
abeatoChipaca, ok10:49
Chipacaabeato: (mocking would usually involve something like “var newEnv = androidbootenv.NewEnv” in the main code10:49
Chipacaabeato: then you use newEnv10:50
zygamorphis: but this also shows the code is different in master,10:50
zygamorphis: which release was this?10:50
Chipacaabeato: and in export_test you have a Mock function that lets you overwrite it10:50
zygamorphis: and if you can, try master10:50
* zyga looks at email10:50
Chipacaabeato: those Mock functions usually are func MockThing(newThing) func(), and they return a function that resets things to how they were10:50
Chipacaabeato: so you can do e.g. restore := MockThing(newThing); defer restore()10:51
Chipaca(or directly “defer MockThing(newThing)()” but that's harder to read)10:51
Chipacaabeato: anyway i'll let you work :-)10:51
abeatoChipaca, thanks :)10:51
* zyga wonders what https://bugs.launchpad.net/snap-confine/+bug/1691405 is about10:52
mupBug #1691405: apt autoremove in removing snap-confine 2.24.1 cause mariadb galera crashes <galera> <mariadb> <snap-confine> <snap-confine:New> <https://launchpad.net/bugs/1691405>10:52
ogra_zyga, smells like coincidence10:53
Chipacazyga: quoth the raven, WAT10:53
ogra_(hard to tell with proper logs etc)10:53
zygaChipaca: my feeling exactly10:53
mupPR snapd#3341 opened: Release 2.26.3 <Created by mvo5> <https://github.com/snapcore/snapd/pull/3341>11:03
zygapstolowski: question about the validate methods: are they mandatory?11:07
zygapstolowski: if not, can we drop the no-op ones?11:07
pstolowskizyga, my understanding is they are not mandatory, most interfaces will not need attributes collected at runtime. ok, I'll drop the no-op ones11:09
zygapstolowski: thanks!11:09
pstolowskipedronis, re your earlier question.. we still need to discuss these aspects, i'm not sure if I know all I did matches what Gustavo had in mind last time we talked about it. the basic idea is that Sanitize* checks that attributes from yaml are fine and it can error out if a mandatory attribute is missing. It can also add missing attributes if it wants to. Whatever attributes are present after Sanitize* step, cannot be overwritten by snapctl at runtime.11:16
pstolowskiValidate* methods should validate all attributes collected from snapctl11:16
pedronispstolowski: the issue is whether, can Validate fill in defaults? because otherwise you cannot overwrite things with defaults left out form the yaml with those rules11:17
pstolowski*i'm not sure if all I did matches*11:17
mupPR snapd#3342 opened: this is a refactor branch, in preparation for 'snap start' etc <Created by chipaca> <https://github.com/snapcore/snapd/pull/3342>11:18
pedronispstolowski: in other words, my question is,  should we fill defaults after the yaml, or do we need to support filling in defaults once we have seen both yaml attrs and dynamic attrs11:18
pedronisI vaguely remember that we discussed the latter, but then I don't understand the roles and when called of Sanitize* and Validate* anymore11:19
pstolowskipedronis, Sanitize* is still called when plug or slot is added to the repo11:20
pedronisI know11:21
pedronisbut that doesn't help with defaults if we need to fill after dynamic attrs11:21
pedronisfgimenez: mvo: I'm seeing this kind of failures:  https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-xenial-snappy-dev-image/xenial/amd64/s/snapd/20170517_111137_b1b51@/log.gz11:22
juanrubioHi guys, I'm trying to figure out how to include a configure hook so that my application gets its configuration file updated before the first use. Going through the docs, I've placed a 'configure' script under 'tizonia/snap/hooks'.. see https://github.com/tizonia/tizonia-openmax-il/tree/master/snap/hooks... but the hook is not getting included in the snap11:22
pedronisit looks like we capture state.json when core is still being worked on somehow11:22
* zyga -> lunch11:23
pedronisfgimenez: mvo: error: snap "core" has changes in progress11:24
fgimenezpedronis: maybe because of the recent core publication? not sure11:24
pstolowskipedronis, shouldn't this decision be left out to the interface implementation? if it wishes to support some attributes from runtime, it needs to implement Validate* and supply defaults at Validate* time, or error out there if missing, Otherwise if interface doesn't support runtime attributes, they all need to come from yaml and be handled in Sanitize*11:24
pedronispstolowski: that's a decision but now we have two places where to support attributes, or we just move things from Sanitize* to Validate*11:25
pedronispstolowski: anyway I'm also interested to keep this thing under control because of the passing nil for attrs and methods trying to write them11:26
pedroniswe need a hackish fix for content11:26
pedronisfor that11:26
fgimenezpedronis: core with 2.26.3 has been just published to edge and beta, maybe the autorefresh detected it during the suite execution and started an update11:26
pstolowskipedronis, yes.. that's a valid concern. thanks for bringing it up11:27
morphiszyga: this is master between 2.25 and 2.2611:27
pedroniss/we need/we did/11:28
mupPR snapd#3335 closed: daemon: teach the daemon to wait on active connections when shutting down <Created by pedronis> <Merged by pedronis> <https://github.com/snapcore/snapd/pull/3335>11:29
pedronisfgimenez: ah11:29
pedronispstolowski: what's the current idea? an interface supports dynamic attrs only if it has Validate* ?11:35
pedronisotherwise we error?11:35
morphiszyga: rebased now, let me see if that helps11:36
pedronispstolowski: no, I remember discussing that, and the idea was to just ignore them?11:36
sborovkovhi, does service running inside the snap have access to /proc/$IT's_pid?11:39
pstolowskipedronis, if an interface doesn't implement Validate*, but its implementation supports any extra attributes not present in yaml and after Sanitize*, then it would work if they were supplied by a hook.11:40
Chipacasborovkov: mostly, yes11:41
jamespageQ: what does the syntax for consuming a snap for a specific track look like? Google is failing me and I'm trying to write some forward looking UX for the openstack snaps11:41
pstolowskipedronis, in other words, if want to specifically block this scenario, that it needs an extra check11:41
pedronisI don't think we want to block it11:41
Chipacajamespage: 'snap install --channel foo/bar thesnap'11:41
jamespagefoo being the track and bar being the channel?11:41
sborovkovChipaca: nice, I just want to know the number of threads my own process is using11:41
jamespageso that might be ocata/stable for me I think11:42
pedronispstolowski: we call Validate* even if there are no dyamic attrs if it's defined?11:42
Chipacasborovkov: where does that info come from?11:42
sborovkovChipaca: well /proc/$pid/status should give that info I think. Not sure if there is better way11:42
Chipacajamespage: see the 'snap info' output, might help11:42
pstolowskipedronis, yes. it receives plug or slot (same as Sanitize*), plus a dictionary with extra attributes (may be empty)11:43
pedronisjamespage:   --channel=track[/risk]  where risk defaults to stable11:43
pstolowskipedronis, btw, I feel that this discussion should happen in the forum11:43
jamespagepedronis: thanks11:43
Chipacapedronis: the defaulting to stable only recently landed in master11:43
Chipacaso you're right, but it might not be what jamespage is on yet :-)11:44
ogra_sborovkov, to find out such stuff, install hello-world ... then you can use hello-world.sh to spawn a shell inside the snap and check what it can read/access11:44
jamespagemy forward looking UX is sufficiently far out it will be by the time we have things in tracks...11:44
pedronispstolowski: do we have a topic already, I can write something there later11:44
ogra_sborovkov, "cat /proc/self/status" definitely works fine here11:44
pstolowskipedronis, no, this branch is older than the forum ;)11:44
sborovkovogra_: alright, thanks11:44
ogra_(self always points to your PID)11:44
sborovkovwow nice I did not know that11:45
pedronispstolowski: maybe you can start a topic then ;)11:45
Chipacato be precise, jamespage: pedronis: making --channel=foo (for foo not in stable,candidate,beta,edge) mean foo/stable landed in master 5 days ago, in snapd#329011:45
mupPR snapd#3290: add support for `snap install foo --channel=3.4` <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/3290>11:45
jamespage\o/11:46
Chipacajamespage: hurray for forward-looking UX11:46
Chipacajamespage: (also if you want to try it, use core from edge -- but it's called edge for a reason :-) )11:46
zygamorphis: thank you, capture another trace with SNAP_CONFINE_DEBUG11:53
mupPR snapd#3343 opened: WIP: Spread tests for fedora <Created by morphis> <https://github.com/snapcore/snapd/pull/3343>11:56
pstolowskipedronis, sure, will do11:56
pedronisthx11:56
diddledanI just released corebird 1.5 to stable11:56
diddledan(amd64 only atm, until the buildd works properly :-p - jhbuild doesn't like it)11:57
morphiszyga: https://paste.ubuntu.com/24592352/11:57
morphiszyga: the kernel and native arch values are wrong too11:57
morphiszyga: or these are raw printed values11:58
morphislooks like that is it11:59
Chipacadiddledan: looks good! why does it download libopenh264 outside of the snap?12:00
diddledanChipaca: because it's legal12:00
zygamorphis: the kernel / arch thing is just the way seccomp represents them, there's nothing better sadly12:00
zygamorphis: interesting,12:00
Chipacadiddledan: meaning you can't distribute libopenh264?12:00
zygamorphis: can you cp snap-confine-debug to snap-confine12:00
morphiswe could atleast do some string conversion so we print something like x86-64 but would be just for the reader :-)12:00
zygamorphis: and try again?12:01
diddledanChipaca: you're still liable for licensing costs if you distribute it yourself12:01
zygamorphis: it's not that easy, it's not just a string12:01
Chipacadiddledan: ew12:01
zygamorphis: and it's opaque to us, internal seccomp thing12:01
morphiszyga: right but there are defined values which you compare already12:01
diddledanChipaca: cisco are taking the hit for their compiled binary12:01
morphislike SCMP_ARCH_X8612:01
diddledanof course, I didn't think about that for arm.. must sort out whether it's possible to download an arm binary on those12:02
zygamorphis: where?12:02
morphisseccomp-support.c12:02
morphissc_add_seccomp_archs12:02
zygaah12:02
morphishost_arch and native_arch12:02
zygathe problem is that it not the whole view12:02
zygalet me look at the internals of seccomp12:02
zygaAFAIR there are bitfields and flags and other bianry garbage there12:03
morphiszyga: let me build the -debug varaint of snap-confine and retry12:03
zygamorphis: the debug variant is built too, just not intstalled12:03
zygamorphis: you may have it in your tree12:03
zygamorphis: but really12:03
morphiszyga: you do a switch on host_arch against SCMP_ARCH_X86_6412:03
zygamorphis: this is: mount --bind /snap /snap12:04
zygamorphis: what is wrong is clearly the path12:04
morphisso we can do something similar for a host_arch to string conversion12:04
zygamorphis: anyway, irrelevant to the problem and let's look at seccomp to be sure12:04
jdstrandmorphis, zyga: trying to get through your backscroll conversaton-- it is spread out over several hours. but to confirm a few things: a) you can't seccomp arg filter bind because it can't derefernce userspace pointers (that is a hard limitation of seccomp) and b) there is no such thing as a profile transition with seccomp (that is a limitation of the kernel) c) you may change the current seccomp filter, but only by making it more restrictive (ie, you12:05
morphiszyga: https://github.com/snapcore/snapd/blob/master/cmd/snap-confine/mount-support.c#L641 , should that use the configured SNAPMOUNTDIR?12:05
zygamorphis: ah12:05
zygayes12:05
zygasorry, I should have caught that!12:06
jdstrandmorphis, zyga: tyhicks is working on kernel changes that would allow us to not KILL but EPERM, which would make this non-fatal12:06
morphisjdstrand: hm, but a kernel change wouldn't really help in this case12:06
zygamorphis: shall you make a patch or do you want me to12:06
morphiszyga: let me do one12:06
zygajdstrand: we can already EPERM, what AFAIK is missing is the extra message that goes along with the currnet KILL12:07
zygamorphis: thank you12:07
zyga*current12:07
morphisjdstrand: very interesting12:07
zygajdstrand: though I really wonder how we plan to work with that, given the various kernels out there, is this something we can detect from userspace before we create the profile?12:07
jdstrandzyga: we absolutely do *not* want a network namespace. look at all the problems that the mount namespace has caused. we want fine-grained network filtering in the lsm. the netowkr namespace would tremendously complicate how the snap integrates into the system and how snaps interact12:07
zygajdstrand: maybe, maybe not, I'm not convinced12:08
zygajdstrand: I think vast majority of snaps would work inside a network namespace, you could opt-into a real-network-namespace interface to be free of that12:08
jdstrandzyga: with that we can use seccmark. ie, we tag each packet with an per-snap seccmark, and then firewalling can be used with that12:08
zygajdstrand: a network namespace + firewall is a portable way to handle this12:08
* Chipaca ponders lunch12:08
jdstrandzyga: remember, namespaces are for separation, not for integration into the system. selinux can do secmark too, so that shouldn't be an issue12:09
zygajdstrand: do you have any pointers to documentation about seccmark, I'm not faimilar with it12:09
zygajdstrand: oh and while you are here; a more relevant and pressing need12:10
zygajdstrand: is there _any_ way to replace the seccomp profile of a process?12:10
jdstrandmorphis, zyga: can you point me to the bug. I feel like I already discussed this and options but am having trouble finding that conversation12:10
zygajdstrand: (replace, not augment)12:10
zygajdstrand: ha, it is in fact the same problem12:10
zygasure12:10
* zyga gets the link12:10
morphisjdstrand: https://forum.snapcraft.io/t/hooks-calling-snapctl-are-broken-with-just-seccomp-enabled/658 , I didn't added the LP bugs yet, let me do that now12:10
zygahttps://forum.snapcraft.io/t/hooks-calling-snapctl-are-broken-with-just-seccomp-enabled/658/212:10
zygajdstrand: the instant idea was to give snapctl a dedicated apparmor profile (like snap-confine) but then we'd still be stuck on the seccomp profile12:10
jdstrandzyga, morphis: re separate profile for snapctl-- that won't work in the way you might be thinking-- there is no such thing as a profile transition in seccomp. you can do that if you cross IPC though12:11
morphisjdstrand: https://bugs.launchpad.net/snappy/+bug/164457312:11
mupBug #1644573: snapctl causes hooks to attempt to open ip/ipv6 tcp connection <Snappy:Triaged by zyga> <https://launchpad.net/bugs/1644573>12:11
zygajdstrand: yep, that's what we realized earlier today :(12:11
zygajdstrand: I just hoped I was wrong and there's (some) way12:11
morphisjdstrand, zyga: also added in https://forum.snapcraft.io/t/hooks-calling-snapctl-are-broken-with-just-seccomp-enabled/658/3?u=morphis12:12
zygathanks!12:12
jdstrandmorphis: as for kernel changes not helping-- we are going to need to be a little more agile about that sort of thing I'm afraid (not that there isn't something else we can do here), but we used to have a long list of patches that a certified snappy kernel needed. anyway, that's a digression12:14
jdstrandzyga: we can eperm, but it is either kill or EPERM now and if you EPERM you lose logging for everything12:14
zygajdstrand: the point is not that (that's all fine) but if we can detect such kernel in the first place so that we can make a compatible profile12:14
morphisjdstrand: I agree, however I am not sure how fast we could get such a change into the official kernel for already released versions of Fedora, openSUSE, ...12:14
zygajdstrand: right, that's my understanding as well (eperm and logging)12:14
jdstrandzyga: EPERM+audit will be detectable from userspace12:15
morphisjdstrand: actually for Ubuntu this isn't a problem, this is one for all !Ubuntu systems where we have no apparmor but seccomp12:15
jdstrandzyga: I can't say strongly enough that I think a network namespace is a mistake12:15
jdstrandzyga: there is no way to replace a seccomp profile or to transition out of it12:16
niemeyerMornings!12:16
jdstrandmorphis: I read that forum post, but there is a bug and other conversation on it12:16
zygajdstrand: note that I'm not doing anything towards that, it was just (any) idea that I had left12:16
* jdstrand is still getting through your responses to my responses to backscroll (might've waited for me to come online :P)12:16
zygajdstrand: hehe12:17
morphisjdstrand: :-)12:17
zygajdstrand: do you think we could _safely_ allow bind-on-localhost to in the default template?12:17
zygajdstrand: just bind, I don't think we need connect12:17
zygajdstrand: or even listen perhaps /me looks12:18
jdstrandzyga: bind-on-localhost: that isn't a thing. it is bind or no bind. we can't derefence the struct to see it is for localhost12:18
jdstrandok12:18
jdstrandI'm caught up12:19
zygajdstrand: not even listen!12:19
jdstrandlet me read everything and think a moment12:19
zygajdstrand: ah, then we've got no other options that I can think of12:19
zygait's a real shame seccomp cannot do this and apparmor cannot do this at the same time :/12:19
jdstrandthere is an option. just add the bind on systems without apparmor12:19
* Chipaca really lunch now12:19
zygaChipaca: ejoy12:19
zyganiemeyer: hey! :)12:19
jdstrandzyga: well, finegrained network mediation could come after the upstreaming-- you'd have to talk to ratliff and tyhicks about prioritizing that, but that doesn't solve anything here cause a) you said we can't patch kernels and b) this is for systems with only seccomp and not apparmor12:21
morphisjdstrand: would be an option12:21
jdstrandI guess morphis was the one who said we can't patch kernels12:21
jdstrandok, let me read12:22
morphisjdstrand: we maybe can but I guess this will be a longer process to get such a patch into Fedora, openSUSE etc.12:22
zygajdstrand: we cannot patch kernels on existing systems, consistently and predictably so we need anything else as plan B12:23
jdstrandmorphis: note that an early implementation decision was that the lsm and seccomp would work together and that we wouldn't pick one or the other, since both are needed for proper confinement12:23
morphisbut given that we run snaps "unconfined" on these distros anyway we could just allow bind12:23
morphisjdstrand: interesting, I was told we can use seccomp independently12:24
ogra_just default to snap install canonical-livepatch alongside snapd ...12:24
* ogra_ grins12:24
jdstrandzyga: I understand the problem but think about it-- we can only ever weaken the sandbox because we reach out farther and farther to systems that are running kernels that don't have features, may have bugs and at the same time reaching back in time to 3.412:25
morphisjdstrand: if that is true we should maybe make seccomp requiring apparmor being enabled inside snap-confine12:25
jdstrandI mean, everything was designed with a particular set of requirements. how is one supposed to fix bugs if we are now trying to support unupdateable ancient kernels? why are we even upstreaming anything-- it won't but something everyone can use so no one can use it12:26
jdstrand(that is not meant to be answered-- of course we need to upstream-- but it illustrates the point)12:27
* jdstrand really reads now12:27
* zyga agrees with jdstrand 12:28
zygaperhaps just disabling seccomp if incompatible LSM is found is the way to go?12:28
morphiszyga: I would say when --disable-apparmor disable seccomp too12:29
jdstrandoh, and we can't patch go either :)12:29
zygamorphis: we can just emit a no-op profile in snapd12:29
morphisjdstrand: yeah, however latest go is a lot better and doesn't seem to have this problem anymore :-)12:29
morphiszyga: why not disable it completely for snap-confine?12:29
jdstrandmorphis: iirc, my comments in bug #1674193 re the /run/snapd.socket are fixed now, right? ie, snapctl now chooses the correct socket12:30
mupBug #1674193: core snap's configuration hangs on debian | openSUSE | mainline kernel <Snappy:Fix Committed by morphis> <snapd (Debian):Fix Committed> <snapd (Fedora):Fix Committed by morphis> <snapd (openSUSE):Fix Released by morphis> <https://launchpad.net/bugs/1674193>12:30
morphisjdstrand: AFAIK, yes12:30
jdstrandbut there is no lsm on these other distros, so they can just talk to that socket12:30
zygamorphis: because it's a compile time decision12:31
morphisjdstrand: right, but they are blocked by seccomp12:31
mvofgimenez, pedronis, nessita: I see a new error in our tests: "error: Please buy test-snapd-control-consumer before installing it." - did anything change to this snap recently?12:31
* jdstrand would have to remind himself of the code on those12:31
jdstrandmorphis: not if they plugs network-bind which is autoconnected12:31
pedronismvo: that the spurious error we would get on a 40112:31
mvopedronis: aha, that explains it12:32
pedronismvo: is this a classic test or a core test12:32
mvopedronis: this happend on classic12:32
zygamorphis: ohhh, that thing you found earlier is a compile time choice :((((12:33
zygamorphis: we need to change that too12:33
pedronismvo: bit unexpected12:33
Chipacamvo: are you running with SNAPD_DEBUG_HTTP?12:34
Chipacamvo: (do you get that every time?)12:34
mvoChipaca: I think it was just a one off12:34
mvoChipaca: sorry for the noise12:35
Chipacamvo: if you were running with http debug on, i'd like to see the store repsonse12:35
Chipacaor its response12:35
Chipacaeither will do12:35
* mvo nods12:36
Chipacamvo: if this was in spread, it does have debug on :-)12:36
ChipacaSNAPD_DEBUG_HTTP=7 even12:36
mvoChipaca: it did happen there, but in snap download which has no debug enabled apparently (c.f. https://objectstorage.prodstack4-5.canonical.com/v1/AUTH_77e2ada1e7a84929a74ba3b87153c0ac/autopkgtest-xenial-snappy-dev-image/xenial/amd64/s/snapd/20170517_120423_15d84@/log.gz)12:38
Chipaca:-(12:38
jdstrandmorphis, zyga: let's just accept for the moment that seccomp without lsm is ok for now and assume we can't patch anything but snapd/snap-confine. I see a few options: a) add bind unconditionally everyone, b) add bind conditionally on if apparmor isn't there and seccomp isn't using EPERM and c) adjust snapctl to not make these calls12:44
jdstrandmorphis, zyga: I don't like 'a' at all. let's strike that12:44
pedronisit's go runtime that does these so c) is not an option12:44
pedronisafaiu12:44
nessitamvo, as pedronis said, is a misleading error, I thought pete worked on that before he left (maybe not?)12:45
pedronisnessita: no, after discussion it was decided to wait for the store to return better errors12:45
jdstrandpedronis: well, as its implemented. there would need to be investigating. perhaps reaching out to C and that wouldn't happen. out of process helper. fork a C program, etc12:45
jdstrandhowever, 'c' is complicated12:45
jdstrandso I suggest 'b'. zyga worked on code to conditionally add policy for snap try for ecryptfs, this is very similar to that12:46
jdstrandzyga, morphis: ^12:46
Chipaca+ snap install --dangerous basic-hooks_1.0_all.snap12:47
Chipacaerror: cannot read snap file: info failed to parse: yaml: control characters12:47
Chipaca       are not allowed12:47
Chipacafrom https://api.travis-ci.org/jobs/233194012/log.txt12:47
pedronisChipaca: weirdness++12:48
pedronisand flakiness on top12:48
Chipacaniemeyer: fgimenez: any chance we can fsck the images?12:48
mupPR snapd#3341 closed: Release 2.26.3 <Created by mvo5> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/3341>12:48
jdstrandzyga, morphis: that's totally doable this cycle. it's simple to understand and shouldn't be hard to implement. please request me as a reviewer12:48
nessitapedronis, but an inmediate fix can be done which will help users considerably: on 401 from the download url, if the local metadata says there is no price set, just return a different error and do not mention buy or price12:48
pedronisnessita: that was not my decision12:48
niemeyerChipaca: Do we have any issues there?12:49
Chipacaniemeyer: ^^^12:49
pedronisnessita: it's complicated because we don't the price information at that point12:49
Chipacaniemeyer: what i pasted12:49
pedronisin the code12:49
niemeyerChipaca: Sorry, a bit slow today.. I'm failing to make the correlation12:49
zygajdstrand: reading12:50
pedronisChipaca: we build the snaps, no?12:50
Chipacaniemeyer: how did 'control characters' get to the yaml?12:50
pedronisso it would flaky virtual disk not the image12:50
pedronisthat yaml comes from the checkout12:50
pedronissame12:50
niemeyerpedronis: Ah, but I think our snap builder doesn't read the files does it?12:50
niemeyerChipaca: That said, wouldn't that fail every single time?12:51
niemeyerIf it was the image12:51
zygajdstrand: I think b and c are possible and welcome; c is "free" on new golang stack but b feels more realistic quickly12:51
Chipacaniemeyer: probably? I don't know12:51
fgimenezChipaca: you can always check an instance of the images with "spread -reuse -shell <system>"12:51
zygajdstrand: I agree on 'b'12:51
fgimenezeven without -reuse12:51
mupPR snapcraft#1319 closed: kernel plugin: config check: remove DMIID option <Created by piso77> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/1319>12:51
niemeyerChipaca: If it was a broken image, how would it work sometimeS?12:51
ogra_must be a moody image :)12:52
Chipacaniemeyer: I don't have a hypothesis that could give this behaviour, so I was looking to eliminate things that could introduce failures12:53
Chipacas/give/explain/12:53
niemeyerAck12:53
zygaogra_: probability, image has a quantum state that when measured on full moon, crashes ;)12:53
ogra_haha, yeah12:53
morphiszyga: https://github.com/snapcore/snapd/pull/3344 doesn't work, as it happens before the call to sc_populate_mount_ns which mounts the /var/lib/snapd dir from the host into the core snap12:54
mupPR snapd#3344: cmd/snap-confine: use SNAP_MOUNT_DIR to setup /snap inside the confinement env <Created by morphis> <https://github.com/snapcore/snapd/pull/3344>12:54
mupPR snapd#3344 opened: cmd/snap-confine: use SNAP_MOUNT_DIR to setup /snap inside the confinement env <Created by morphis> <https://github.com/snapcore/snapd/pull/3344>12:55
morphisso that doesn't seem to be the real problem as this only seems to remount /snap onto /snap again12:55
morphislet me read through that code a bit more12:56
zygamorphis: no12:56
zygamorphis: 2nd line is wrong12:56
zygasc_do_mount(SNAP_MOUNT_DIR, "/snap", "none", MS_BIND | MS_REC,12:56
zygalet that just do SNAP_MOUNT_DIR *again*12:56
zygait will work :)12:56
* zyga afk12:56
zygamorphis: and please write a nicer commit message :D12:56
jdstrandmorphis, zyga: I'm commenting in the form12:57
jdstrandforum12:57
morphiszyga: ah I see, this is before the pivot_root call12:58
morphisjdstrand: thanks!12:58
abeatozyga, Chipaca https://github.com/snapcore/snapd/pull/3324 ready again, thanks for the thorough review!13:23
mupPR snapd#3324: partition,snap: add support for android boot <Created by alfonsosanchezbeato> <https://github.com/snapcore/snapd/pull/3324>13:23
Chipacaabeato: yep! i'd be on it if i weren't in a meeting :-)13:25
abeatoChipaca, :)13:26
Chipacamvo: in this case i think it was chrome and not pulseaudio funnily enough (or HO itself); pulseaudio was seeing my mics fine13:28
zygaabeato: thanks, I'll have a look in a moment, just need to refill my drink, it's super hot in spain today13:28
Chipacaabeato: the bit i got to look at so far looks much cleaner :-)13:29
morphisabeato: is that PR still WIP?13:31
abeatomorphis, not really, I will remove that13:34
morphisok13:34
mupPR snapd#3339 closed: tests/lib/snaps: add a test store snap with a passthrough configure hook <Created by pedronis> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/3339>13:42
mvoabeato: I added some feedback too, nice job I have to say :)13:45
zygaabeato: done13:46
abeatomvo, zyga thanks!13:46
morphiszyga: ok, it seems to work now, but running into other problems on restore now13:52
ogra_mvo, did you notice that the systemd in the image PPA is actually overridden by the archive now ? the one stuck in -proposed finally made it through ... do you think we can drop the systemd package from the PPA now ?13:53
ogra_(seems we are building with the archive version since a while already ... with no bugs or complaints)13:53
mvoogra_: yeah, this looks pretty good now, this can go now. very happy that this is finally fixed13:55
ogra_\o/13:55
* ogra_ removes the package13:55
ogra_mvo, resolvconf too i suppose ?13:56
mvoyes13:57
ogra_done13:57
mvota13:58
morphisPharaoh_Atem: can you include one minor fix in the 2.26.* package updates for fedora? just add --disable-seccomp for the snap-confine build13:58
mvomorphis: \o/&13:59
morphisPharaoh_Atem: but wait a second, just reading jdstrand's reply14:02
Pharaoh_Atemwhy is this broken again?14:02
morphisjdstrand: didn't you say before that the seccomp confinement shouldn't be used without an LSM?14:03
morphisPharaoh_Atem: https://forum.snapcraft.io/t/hooks-calling-snapctl-are-broken-with-just-seccomp-enabled/658/14:03
morphisPharaoh_Atem: it was never really fixed, just for the core snap which now plugs network-bind14:04
morphisjdstrand: " 'd' should not be used because it weakens the sandbox on systems where AppArmor is disabled (though the seccomp sandbox alone should not be considered strong confinement)" seems to contradict what you said before or do I miss something?14:04
Pharaoh_Atemif it's fixed in Go 1.8, I can just conditionally disable it14:07
jdstrandmorphis: maybe its the double negative. I'm saying that on systems without apparmor, forcing disabling seccomp is undesirable since it would mean no seccomp filtering on those systems14:08
jdstrandit's14:08
morphisjdstrand: right, and I agree that is not really what we want but trying to see what this whole thing is actually meant to be14:08
jdstrandmorphis: in the irc scrollback, I did say that using them separately wasn't part of the original design, yes14:09
morphisjdstrand: so with that said, !apparmor + seccomp is sth we want to support?14:10
jdstrandmorphis: but we are down that path now and it is easy enough to not disable seccomp by doing 'b'14:10
morphisjdstrand: ok, got it14:10
jdstrandmorphis: well 'support'? I mean, we are already doing it. let's see how long we can continue with it. it isn't strong confinement, but it is something14:10
Pharaoh_Atemwhich is precisely why I have it on14:11
Pharaoh_Atemit's better than zero14:11
morphisjdstrand: we could strongly say we don't want to support it14:11
Pharaoh_Atemmorphis: no14:11
morphisPharaoh_Atem: it's two sided, if it is unsupported you may run into problems upstream don't care about14:11
Pharaoh_Atembut upstream is supposed to care about it14:11
morphisif it doesn't fit into the confinement roadmap than we may better disable it14:11
morphisPharaoh_Atem: that is what I am trying to make clear14:12
Pharaoh_Atemthen by that logic, I should just remove fedora snapd because you guys can't support it properly :(14:12
Pharaoh_AtemI'd really like for support to not be regressive in nature14:12
Pharaoh_Atemand frankly, even openSUSE can't have apparmor+seccomp yet14:12
Pharaoh_Atemwe'll have it there this fall, but no earlier14:13
Pharaoh_AtemI'm pinning my hopes on the patches being merged before Factory is branched for SLE 1514:13
morphisPharaoh_Atem: no you shouldn't because this doesn't mean nobody cares14:14
morphisI am just trying to get a better understand of how things are supposed to work14:14
morphisbut I think option b as jdstrand described it is what we will do14:14
Chipacafgimenez: mvo: CPI is hitting multi-second response times 3x more than usual, 2x more than usual 5+ seconds responses. This might be impacting at least some of the flakiness we're seeing in tests.14:19
jdstrandmorphis: this corner case is the only thing that is like this that I'm aware of. that doesn't mean that others won't come up and distros always --disable-seccomp if they choose. I'd like to see how it goes for a while allowing seccomp without LSM before saying we can't support it14:20
jdstrandalways can*14:20
morphisjdstrand: ok14:20
morphisPharaoh_Atem, jdstrand: https://github.com/morphis/snapd/commit/a604e6e94cca5251a1a1ae31907832e023b38fa714:20
morphisdoes that look ok for you guys? (untested yet)14:20
jdstrandmorphis: I like the comment (thanks) up until NOTE14:21
Pharaoh_Atemlooks okay to me...14:21
Pharaoh_Atemthough I'm not sure why you couldn't just apply it in general?14:21
jdstrandmorphis: how I see this is that you determine if apparmor is available, then if it isn't, tack this snippet on14:22
fgimenezthanks Chipaca, good to know, i'm already seeing the effects in the core validation http://paste.ubuntu.com/24592937/14:22
jdstrandmorphis: ie, runtime, not compile time14:22
morphisjdstrand: it does, it's just meant a distro-patch for the mean time14:22
jdstrandmorphis: ok, I only see that commit, not the full PR. ping me when you want the PR reviewed14:22
jdstrandas that is written though, it clearly is just in the default template rather than appended to the default template based on a runtime check14:23
jdstrandpseudo code:14:23
morphisjdstrand: right, that is what I will work on next for 2.2714:23
jdstrandtemplate = what is there today14:23
jdstrandif apparmor not available:14:24
jdstrand  append bind and its comment14:24
morphisjdstrand: just want to land this patch into fedora/suse now14:24
jdstrandok14:24
jdstrandthen yes, that is fine as a distro patch14:24
morphisjdstrand: thanks14:24
morphisPharaoh_Atem: can you include that tiny patch in the next fedora pkg upload you're doing?14:34
Pharaoh_Atemyes14:35
mvozyga: silly question, I'm looking at the dbus branch currently and there is this issue that we want to only allow a single slot with a given dbus path in the entire system, i.e. no two snaps should be able to provide com.example.MyDbus. whats the best way to do this from inside e.g. dbusInterface.SanitizeSlot?14:36
zygamvo: aha, interesting problem14:38
zygamvo: I think that you should allow each interface to contribute whatever it wants14:38
zygamvo: but the backend can detect conflicts14:38
zygamvo: the problem is that at that time it is too late14:38
zygamvo: so this seems to hint that we should allow backends to veto interface connections14:39
zygamvo: then a backend could trivially do the same check (where it matters, it could be a no-op)14:39
zygamvo: and given this the interface may produce a useful error message14:39
zygamvo: func (i *iface) ConnectionConsistency(repo *Repository, plug *Plug, slot *Slot) error14:40
zygamvo: (+ interface attributes perhaps)14:40
zygamvo: this should IMO happen before we even go ask hooks14:41
zygamvo: perhaps both before/after, that is less clear14:41
Pharaoh_Atemmorphis: this list of snapd paths, what is this relative to?14:41
morphisPharaoh_Atem: /var/lib/snapd14:41
zygamvo: the question still remains, how exactly we'd veto that; is it the backend that does the veto or is it in each interface's responsibility14:42
zygamvo: what do you think?14:43
zygamvo: btw, this is already present in the systemd backend14:43
zygamvo: but we never had to run into the issue14:43
zygamvo: there the backend can simply fail14:43
zygamvo: but nothing would handle that nicely later14:43
zygamvo: maybe try this:14:43
zygamvo: just start with a conflict in the backend14:43
zygamvo: and see what happens14:43
zygamvo: maybe it's "nice" enough14:43
Pharaoh_Atemmorphis: what is hostfs?14:43
zygaPharaoh_Atem: it's the place where classic distribution filesystem is visible14:44
zygaPharaoh_Atem: I'd call it "classicfs" but that'd be just mean on the word classic14:44
mvozyga: thanks, I check it out14:45
mupPR snapcraft#1321 opened: tests: remove the reusable parts tour test <Created by elopio> <https://github.com/snapcore/snapcraft/pull/1321>14:45
zygamvo: the hook problem is going to spin this around14:47
zygamvo: as it means we fail when we told apps that we didn't14:48
zygamvo: but before hooks it is okay14:48
zygamvo: to fail in the backend14:48
mvozyga: ok, looking at this next then14:49
abeatomvo, zyga thanks for the quick reviews, https://github.com/snapcore/snapd/pull/3324 ready again for you ;)14:52
mupPR snapd#3324: partition,snap: add support for android boot <Created by alfonsosanchezbeato> <https://github.com/snapcore/snapd/pull/3324>14:52
Pharaoh_Atemwhat does /var/lib/snapd/device do?14:52
zygaPharaoh_Atem: I think it is where device-specific things go14:54
* zyga looks14:54
zygaPharaoh_Atem: things like device key and such14:54
* zyga takes a break14:56
Pharaoh_Atemmorphis: is /var/lib/snapd/hostfs a directory or a symlink?14:57
morphisPharaoh_Atem: a directory14:57
morphisthe host / gets bind mounted there14:57
Pharaoh_Atemmorphis: does the bind mount go away when snapd is stopped?15:00
morphisPharaoh_Atem: its not in the root mount namespace, it will get bind mounted in the mount namespace every snap gets15:01
morphisPharaoh_Atem: so, if I am not wrong, the one one the hostfs gets never used15:01
morphisonly one from the core snap15:01
Pharaoh_Atemokay then15:02
morphisPharaoh_Atem: I would guess we don't even have to create it if we don't use the rpm to include it in a core snap later on15:02
Pharaoh_Atemmorphis: https://paste.fedoraproject.org/paste/Nl-XU2nzkPUlVLHnnGFw515M1UNdIGYhyRLivL9gydE=15:03
Pharaoh_Atemlooks good?15:03
morphislet me check15:03
morphisPharaoh_Atem: what is with the snap and snaps directories15:04
morphisthey will have content too15:04
morphisI didn't saw them cleaned15:04
Pharaoh_Atemthose are getting erased already in snap-mgmt15:04
Pharaoh_Atemhmm15:04
morphisPharaoh_Atem: can you give this a quick try?15:04
abeatoogra_, where are the /boot/* created? Where should I do the change so we get /boot/androidboot ?15:09
Pharaoh_Atemhmm, interesting15:09
abeato(inside core snap)15:09
ogra_abeato, one sec15:10
abeatook15:10
Pharaoh_Atemthis is a bit tricky because /var/lib/snapd/snap and /var/lib/snapd/snap/bin exist15:10
pedronisfgimenez: niemeyer: anothere prepare timeout:  https://travis-ci.org/snapcore/snapd/builds/23325392215:10
Pharaoh_Atemand I want to erase them independently :/15:10
niemeyerfgimenez: Can we please bump the timing?15:10
ogra_abeato, add it there https://github.com/snapcore/core/blob/master/live-build/hooks/16-ensure-bootloaders.chroot ... but you also want the initrd to learnto handle it ... that is here https://github.com/snapcore/core-build/blob/master/initramfs/scripts/ubuntu-core-rootfs#L31315:12
niemeyerLunch, back shortly15:12
fgimenezniemeyer: sure i'll prepare a branch, given that we are folding the output in travis we could also remove the "quiet" call here https://travis-ci.org/snapcore/snapd/builds/233253922#L3999 to see where is it hanging15:12
abeatoogra_, yes, yes, I know :) Thanks!15:13
ogra_:)15:13
ogra_sorry for pointing to it every time :)15:13
abeatobetter that than not pointing at it at all :D15:14
Chipacaabeato: dunno if you saw you've got failing static tests15:18
Chipacaabeato: [...]/partition/androidbootenv/androidbootenv_test.go:42:2: ineffectual assignment to env15:18
abeatoChipaca, hmm, I see, thanks for pointing out...15:19
zygamvo: can I trigger a PPA build to get master into edge (eventually?) or will that still interfere with the release?15:23
zygamorphis: can you correct https://github.com/snapcore/snapd/pull/3344/files15:23
mupPR snapd#3344: cmd/snap-confine: use SNAP_MOUNT_DIR to setup /snap inside the confinement env <Created by morphis> <https://github.com/snapcore/snapd/pull/3344>15:23
morphiszyga: I am testing that right now15:24
zygamorphis: perfect!15:24
Pharaoh_Atemmorphis: https://paste.fedoraproject.org/paste/SaaKKnO-XBb-0cJvsnAc4V5M1UNdIGYhyRLivL9gydE=15:24
mupPR core#44 opened: Add hook for androidboot bootloader <Created by alfonsosanchezbeato> <https://github.com/snapcore/core/pull/44>15:24
abeatomvo, ogra_ ^^15:24
morphisPharaoh_Atem: looks good, does it work?15:25
Pharaoh_AtemI'm about to find out15:25
mupPR snapd#3345 opened: tests: bump kill-timeout and remove quiet call on build <Created by fgimenez> <https://github.com/snapcore/snapd/pull/3345>15:25
ogra_abeato, approved ... btw, can i remove the writable-path change ?15:25
ogra_(since you now mount a writable partition that shouldnt be needed )15:26
abeatoogra_, sure, let me close the PR15:26
ogra_thx15:26
Pharaoh_Atemmorphis: running a scratch build now: https://koji.fedoraproject.org/koji/taskinfo?taskID=1959777915:26
fgimenezniemeyer: pedronis snapd#3345 increases the project's kill-timeout to 20m, also removes "quiet" from the command that is actually timing out15:27
mupPR snapd#3345: tests: bump kill-timeout and remove quiet call on build <Created by fgimenez> <https://github.com/snapcore/snapd/pull/3345>15:27
mupPR core-build#9 closed: Add writable boot for android-boot "bootloader" <Created by alfonsosanchezbeato> <Closed by alfonsosanchezbeato> <https://github.com/snapcore/core-build/pull/9>15:28
Pharaoh_Atemmorphis: is there a new version of the distrolibexecdir patch for 2.26.1?15:33
Pharaoh_Atemit ftbfs with the current one15:33
* zyga works in an unusual place15:34
Pharaoh_Atemzyga: eh?15:36
zygaPharaoh_Atem: I'm sitting on a beach15:37
zygaogra_: is this recipe used? https://code.launchpad.net/~snappy-dev/+recipe/snappy-daily-xenial15:37
zygaogra_: it's ancient and hasn't built since 201615:37
zygaogra_: I want to rebuild snapd to the image ppa15:37
ogra_zyga, ask the owner _P15:37
zygaogra_: but I guess it is built from the vendorized repo15:38
zygaogra_: we're the owners15:38
ogra_it uses https://code.launchpad.net/~snappy-dev/snappy/trunk-github15:38
ogra_and the owner seems to be sergio15:38
zygathe url says the owner is snapp-dev15:39
ogra_zyga, yes, but thats moot ... it was createrd by sergio, no idea for what etc ... ask him15:39
morphisPharaoh_Atem: there is, just take the current PR15:39
ogra_zyga, the daily edge build of snapd is handled by elopio iirc15:40
morphisPharaoh_Atem: https://github.com/snapcore/snapd/pull/322215:40
mupPR snapd#3222: many: fix test cases to work with different DistroLibExecDir <Created by morphis> <https://github.com/snapcore/snapd/pull/3222>15:40
zygaelopio: ^^15:40
zygaelopio: do you handle the daily snapd -> ppa build?15:40
zygathe build process is so messy15:41
ogra_zyga, whatever that thing builds is called "ubuntu-snappy" ... "dpkg-source -i -I --before-build ubuntu-snappy-1.7.2+20160204ubuntu1" ... (from the build log of that receipe)15:41
Pharaoh_Atemmorphis: new scratch build run: https://koji.fedoraproject.org/koji/taskinfo?taskID=1959795515:42
fgimenezzyga: we have a spread-cron branch for that, after each merge + green build on master we update snapd-vendor on launchpad and trigger a build https://github.com/snapcore/spread-cron/blob/snapd-vendor-sync/target/tasks/snapd-vendor-sync/task.yaml15:43
zygafgimenez: can you trigger that manually now15:43
fgimenezzyga: sure 1sec15:43
ogra_zyga, also https://launchpad.net/~snappy-dev/+archive/ubuntu/edge?field.series_filter=xenial ... seems the last build was 2h ago15:44
ogra_do you need anything newer ?15:44
fgimenezogra_: zyga yes, no longer daily15:44
ogra_yep15:44
Pharaoh_Atemmorphis: patch does not apply15:45
ogra_since quite a while already IIRC15:45
Pharaoh_Atemmorphis: https://kojipkgs.fedoraproject.org//work/tasks/7958/19597958/build.log15:45
zygaogra_: hmmm15:46
zygaogra_: I was under the impression that we only use one ppa during builds, the image ppa15:46
ogra_zyga, ?15:47
zygaogra_: I think at this stage we should have a post that describes how this all works15:47
zygaogra_: I thought we use https://launchpad.net/~snappy-dev/+archive/ubuntu/image15:47
ogra_zyga, both PPAs are always enabled ... before doing a release a snapd with higher version gets uploaded to the image PPA ... that supersedes edge15:48
zygaaha15:48
zygaogra_: thank you15:48
ogra_(you did that plenty of times already ... why do you need it documented now)15:48
zygaogra_: I never realized this is how it works15:48
zygaogra_: or I forgot since15:48
ogra_ah, k :)15:48
zygaogra_: I think cleaning the ppas will make it more obvious as there will be less moving pieces15:48
zyga(or potentially moving)15:49
zygaogra_: thanks!15:49
zygaogra_: I want the core snap with master snapd to play with update-ns15:49
ogra_ah, right, then the release got in your way i guess15:50
zygayes15:50
zygathis is why I started the topic of how things are made in the first place15:50
mvozyga, ogra_: new edge deb is there and I triggered a build so you should have a new snapd edge in ~30min15:51
ogra_thx!15:51
zygamvo: thank you sir :)15:51
ogra_wow15:51
ogra_if you mess up the oser creation in a kvm image bad things happen15:51
ogra_*user15:51
mvobut +1 for actually documenting it, its relatively straghtfoward *once* used to it15:51
* ogra_ shakes fist at shadow15:54
ogra_(and higs mvo for fixing it)15:54
ogra_*hugs even15:54
mvoogra_: heh, was wondering what about it, hopefully not another security upload15:55
ogra_insecure crap ... always these CVEs!15:55
zygamvo: I was thinking about one thing15:55
Pharaoh_Atemmorphis: I'm disabling this patch and seeing if I can build without it15:55
Pharaoh_Atemmorphis: https://koji.fedoraproject.org/koji/taskinfo?taskID=1959808415:55
Pharaoh_Atemwe don't do unit testing yet anyway...15:55
zygamvo: about passing some compile time choices as variables from snapd to snap-confine15:55
zygamvo: this would allow us to enable reexec nearly everywhere where we can run unpatched master15:55
zygamvo: a single file in /var/lib/snapd/ say snap-confine.cfg15:56
zygamvo: key=value15:56
zygamvo: we'd pass a handful of things, mostly like force-devmode, snap-mount-dir and maybe something I'm not thinking about yet15:56
zygamvo: we could make it per security tag to also convey things like --classic without having snap-run care15:57
zygamvo: and we could finally fix the missing link between snap-run and snapd, snapd simply would write the new .cfg file15:57
zygamvo: (I recall that we had issues where snap run doesn't know something changed already and we kind of ignored it for now)15:58
zygamvo: so that snap-run doesn't have to wake anything up15:58
mupPR core#44 closed: Add hook for androidboot bootloader <Created by alfonsosanchezbeato> <Merged by ogra1> <https://github.com/snapcore/core/pull/44>15:59
=== chihchun is now known as chihchun_afk
mvozyga: yeah, I think we want to close this gap, maybe a forum post to discuss things?16:00
mvozyga: I will leave for dinner soon16:00
zygamvo: yes, sounds good, I'll write something onw16:02
mvota16:05
zygamvo: done https://forum.snapcraft.io/t/closing-the-gap-in-snap-confine-snapd-communication/66516:12
zygamorphis, jdstrand ^16:12
zygame has another core snap, again with 2.26.316:13
zyga:-(16:13
* zyga doesn't understand how this work16:13
zygaks16:13
zygaogra_: what is snappy devices ppa? https://launchpad.net/~snappy-dev/+archive/ubuntu/snappy-devices16:15
* ogra_ highly dounbts zyga's sense for "better" 16:15
zygasome things are 2017is16:15
zygaogra_: my sense for better is doing very good ;-)16:15
ogra_zyga, thats for the signed customer kernels for secureboot16:15
zygaogra_: aah16:15
ogra_ignore it :)16:16
zygaogra_: can I document it?16:16
mvozyga: meh, the edge ppa still has 2.26.2 not .316:16
zygamvo: on the upside, my modem needs to download only deltas16:16
zygaogra_: I edited the description on https://launchpad.net/~snappy-dev/+archive/ubuntu/snappy-devices16:17
ogra_zyga, looks fine16:17
mupPR snapd#3345 closed: tests: bump kill-timeout and remove quiet call on build <Created by fgimenez> <Merged by mvo5> <https://github.com/snapcore/snapd/pull/3345>16:17
fgimenezmvo: we can trigger an execution of spread-cron's sync by pushing to snapcore/spread-cron in the snapd-vendor-sync branch (this is done automatically after detecting a new merge + green build on snapcore/snapd's master)16:20
fgimenezprobably the flakiness of the tests made that this wasn't executed for a while (the "+ green build" part wasn't happenning)16:21
ogra_mvo, https://forum.snapcraft.io/t/bug-running-mir-kiosk-apps/657 might be a release blocker ...16:21
zygafgimenez: aha16:21
zygaogra_: yes, I was thinking about it16:22
zygait stopped working in beta because beta was updated16:22
ogra_mvo, seems edge and beta are broken ...16:22
zygaand it smells like netlink16:22
ogra_we should really have a log message for the netlink stuff :(16:22
ogra_not sure how to strace the kiosk apps to get valuable info16:23
zygaI think we do16:23
zygait's a seccomp kill16:23
zygaHUZZAH and SIGKILL16:23
ogra_well, we dont get it in the logs16:23
zygathen it's not occuring16:23
fgimenezzyga: mvo if you need it i can push a commit to trigger the build, let me know16:23
ogra_http://paste.ubuntu.com/24592960/16:23
ogra_the issue starts at line 16416:24
zygafgimenez: if you can, please16:24
ogra_which is a simple dlopen that fails for whastever reason16:24
zygaand we really need to fix master == edge && beta == whatever mvo promoted distinction16:24
* zyga looks16:24
zygawell16:25
zygano details why16:25
zygauseless error :/16:25
robinhood2017Hi, I'm just getting started with developing snap packages. I attempted to push my Hello World app (by entering 'snapcraft push hello-[username removed]_2.10_amd64.snap --release=candidate'), but I get the error message saying "The store was unable to accept this snap: You do not have access to modify this package."16:25
zyga"I cannot do that Dave"16:25
ogra_zyga, there are snapctl complaints above though16:25
jdstrandsnap.mir-kiosk-apps.mir-kiosk-app-daemon.service: Main process exited, code=exited, status=1/FAILURE16:25
jdstrandthat is not a KILL16:25
ogra_zyga, ipv6 related it seems16:25
zygarobinhood2017: did you snapcraft register that name?16:25
* jdstrand notes that mir interface was updated for netlink16:25
robinhood2017Yes, I did "snapcraft register hello-robinhood2017" beforehand.16:26
zygaogra_: the denials are harmless16:26
zyga(that's apparmor)16:26
ogra_jdstrand, well, check the paste above ... line 148-15316:26
zygajdstrand: aha, still with no seccomp I think my netlink idea was wrong16:26
ogra_zyga, harmless ? ... ok16:27
zygaogra_: that's snapctl, harmless16:27
ogra_ok16:27
ogra_well, then it boils down to dlopen again16:27
jdstrandogra_: the 148-153 is the normal snapctl denials and unrelated to this16:28
* zyga would love a call to dlerror16:28
ogra_jdstrand, yeah, zyga said so16:28
ogra_http://bazaar.launchpad.net/~phablet-team/platform-api/trunk/view/head:/src/ubuntu/application/base_module.h#L11316:28
ogra_thats the code that loads the module16:29
jdstrandit feels to my like something with the mount namespace16:29
zygayes, missing dleerr16:29
zygadlerror16:29
zygajdstrand: perhaps16:29
zygajdstrand: but what might it be...16:29
zygavery little changes16:29
jdstrandlike, mir-libs isn't mounted16:29
zygajdstrand: mmmmm,16:30
zygamaybe16:30
ogra_the script has checks for that16:30
zygaogra_: do you have a reproducer?16:30
ogra_see line 26 of http://paste.ubuntu.com/24593625/16:30
ogra_zyga, install mir-libs, mir-kiosk and mir-kiosk-apps ... thats all i have16:31
zygaogra_: on x86-64?16:31
zygaogra_: I don't have a VM handy16:31
ogra_zyga, mir-kiosk starts fine (you get a black screen with mouse cursor)16:31
ogra_but the apps cant16:31
zygaogra_: ok, can you look at /var/lib/snapd/mount16:31
zygaogra_: and tell me what you see in any of the files there16:31
robinhood2017So if I've registered the name, and it's still giving me that error, what's next?16:31
jdstrandzyga: I'm not saying it is that. it just kinda feels like it16:32
zygajdstrand: yes16:32
jdstrandoh16:32
ogra_ogra@pi3:~$ ls /var/lib/snapd/mount16:32
ogra_snap.mir-kiosk-apps.fstab                 snap.mir-kiosk-apps.mir-kiosk-app-daemon.fstab  snap.mir-kiosk.hook.configure.fstab16:32
ogra_snap.mir-kiosk-apps.hook.configure.fstab  snap.mir-kiosk.fstab                            snap.mir-kiosk.mir-kiosk.fstab16:32
zygajdstrand: would certainly be easiest issue :)16:32
zygaogra_: look at the one that fails to start please16:32
zygajdstrand: well16:32
zygaogra_: well, at the snap that fails to start16:32
zygaI need to stop writing per-app profiles16:32
zygathose are not used anywhere16:32
ogra_/snap/mir-libs/28/mirlibs0/usr/lib /snap/mir-kiosk-apps/16/mir-libs none bind,ro 0 016:32
ogra_thats the content16:32
jdstrandthere was one other thing. I remember when looking at kiosk I could get it to run once, then on subsequent runs I had to remove ~/snap/<snap name>16:32
zygaogra_: ok, can you now do this:16:32
jdstrandthat was unclear16:33
zygaogra_: sudo nsenter -m/run/snapd/ns/mir-kiosk-apps.mnt16:33
jdstrandthe app snap talking to mir, I could run it once, but then after I needed to clear out its user data16:33
ogra_zyga, done16:33
fgimenezzyga: the job is triggered https://travis-ci.org/snapcore/spread-cron/branches, snapd-vendor-sync branch, now with the latest edge core things are a bit busy :)16:33
zygaogra_: then look at /snap/mir-kiosk-apps/16/mir-libs16:33
ogra_i'm groot!16:33
ogra_err16:33
ogra_root16:33
zygafgimenez: thank you! :)16:33
zygaogra_: groot :D16:34
zygaogra_: is there anything there?16:34
jdstrandthis was with webbrowser-app though, so I was thinking this was something weird in the qt stuff, but maybe it is something with mirlibs16:34
ogra_zyga, yes, but not sure if it is actualyl the right stuff16:34
ogra_gimem a bit16:34
zygaogra_: ls16:34
ogra_*gimme16:34
ogra_zyga, 12847523478 files :P16:34
zygaogra_: !!!!?!??!?!16:34
zygaseriously?16:35
ogra_root@pi3:/# find /snap/mir-kiosk-apps/16/ -name '*libubuntu_application_api_test*'16:35
ogra_/snap/mir-kiosk-apps/16/usr/lib/arm-linux-gnueabihf/libubuntu_application_api_test.so.316:35
ogra_/snap/mir-kiosk-apps/16/usr/lib/arm-linux-gnueabihf/libubuntu_application_api_test.so.3.0.016:35
ogra_theer we go16:35
zygaogra_: ok, now do this16:35
ogra_ oh16:36
ogra_wait!16:36
zygaogra_: run cat /proc/self/mountinfo16:36
zygaand tell me if there's a bind mount in that directory16:36
zygawhat's going on?16:36
ogra_root@pi3:/# find /snap/mir-kiosk-apps/16/mir-libs/arm-linux-gnueabihf/ -name '*libubuntu_application_api_test*'16:36
ogra_root@pi3:/#16:36
ogra_it is not in the shared dir i think16:37
zygaogra_: so are snaps broken?16:37
zygaogra_: or is snapd broken?16:37
zygaogra_: which version of snapd is this?16:37
ogra_.316:37
zygaaha16:37
ogra_the most recent one16:37
zygaso pre update-ns16:37
zygawell, not maste R:)16:37
ogra_but .2 had it too if i can judge by the "broken in edge since a few days"16:37
zygacan you run /usr/lib/snapd/update-ns $SNAP_NAME (from outside the mount namespace) to confirm it says "Not implemented" or something ike that16:38
ogra_zyga, theory:16:38
* zyga listens16:38
ogra_mir-kiosk-apps ships the lib in  /snap/mir-kiosk-apps/16/usr/lib/arm-linux-gnueabihf ... but new snapd binmounts mir-libs one level above16:38
ogra_*bind16:39
ogra_so the shipped lib from the snap itself is gone16:39
ogra_and mir-libs doesnt ship it16:39
ogra_s/gone/hidden/16:39
zygaogra_: we just bind mount what the .fstab file says16:39
zygaaha16:39
zygamaybe the snap changed16:39
zygacan you look at /snap/$SNAP_NAME/current/meta/snap.yaml16:39
ogra_http://paste.ubuntu.com/24593671/16:41
* zyga looks16:41
ogra_it seems to lose $SNAP/usr/lib/$ARCH from its library path somehow16:41
zygaogra_: maybe environment handling broke?16:42
ogra_and uses $SNAP/mir-libs/$ARCH instead16:42
ogra_which comes from the interface16:42
zygaogra_: the snap mount profile looks correct16:42
zygaogra_: cna you please: cat /proc/self/mountinfo | grep mir-libs16:42
zygaogra_: (from the mount namespace)16:42
zygaogra_: I just want to ensure that is mounted16:43
zygaogra_: and we're not chasing ghosts16:43
ogra_http://paste.ubuntu.com/24593685/16:43
ogra_the last line seems to be the one we use ...16:43
zygalooks OK16:43
ogra_yeah16:44
zygayes16:44
ogra_does the mounting somehow mangle LD_LIBRARY_PATH ?16:44
zygano16:44
zygait's not related in any way16:44
zygaogra_: one more idea16:44
zygarun: snap run --shell snapname.appname16:44
zygaand inspect environment16:44
zygaenvironment16:44
ogra_hmm, does that work with daemons ?16:44
zygaogra_: it does, it runs shell instead16:45
zygaogra_: using the same confinement/environment16:45
ogra_k, let me try16:45
zygaogra_: also look at the launcher wrappers from snapcraft, they used to touch environment16:45
ogra_http://paste.ubuntu.com/24593692/16:46
morphiszyga: thanks!16:47
ogra_no LD_LIBRARY_PATH at all ...16:47
* ogra_ checks rteh wrapper16:47
zygaogra_: interesting16:48
* zyga checks if snapd sets it16:48
ogra_http://paste.ubuntu.com/24593700/16:48
ogra_wrapper16:48
ogra_it sets a bunch16:48
zygaogra_: snapd doesn't set it, it's purely under snap/snapcraft contorl16:49
ogra_right16:49
zygaok, that wrapper doesn't run in --shell16:49
zygano idea16:49
* zyga is underground16:49
ogra_so how does an app get the one from the namespace mount onto LD_LIBRARY_PATH ?16:50
morphiszyga: can you check https://github.com/snapcore/snapd/pull/3344/files again?16:50
mupPR snapd#3344: cmd/snap-confine: use SNAP_MOUNT_DIR to setup /snap inside the confinement env <Created by morphis> <https://github.com/snapcore/snapd/pull/3344>16:50
zygaogra_: I cannot parse that question16:50
ogra_something needs to add it there when the mount occurs ... is that snap-confine ?16:50
zygaogra_: no, it's a hard-coded thing in the wrapper16:50
zygaogra_: snap-confine doesn't care what is being mounted16:50
ogra_zyga, when you mount a shared lib space via a content interface nothing adds the new lib space dynamically ?16:51
ogra_(to the env that is)16:51
ogra_it somehow needs to end up in LD_LIBRARY_PATH16:51
zygayes16:52
zygait is impossible BTW16:52
zygait has to be predicted by the snap and just added unconditionally16:52
ogra_well, it used to work ... now it doesnt :) ...16:52
morphiszyga: thanks16:52
ogra_so something changed16:52
ogra_and that wasnt the snap16:52
ogra_(last upload was in feb)16:52
morphiszyga: but don't merge yet, still need to fix my spread tests with that16:52
zygamorphis: it's still wrong :)16:53
ogra_might be that the snap did it wrong before ... but it definitely used to work16:53
zygamorphis: commented16:53
zygaogra_: hmm16:53
zygaogra_: I'll check16:53
morphiszyga: only see "Just one trivial"16:54
zygamorphis: yeah, my connection died, I just commented again16:54
morphiszyga: ah that is what I wanted to ask16:54
morphiszyga: pushed again16:55
zygadone16:58
ogra_i added an "env" call to the daemon script ... http://paste.ubuntu.com/24593758/16:59
zygaogra_: we never set LD_LIBRARY_PATH according to git grep16:59
ogra_and i see /snap/mir-kiosk-apps/16/usr/lib/arm-linux-gnueabihf as well as /snap/mir-kiosk-apps/16/mir-libs/arm-linux-gnueabihf17:00
ogra_in LD_LIBRARY_PATH17:00
zygaso17:01
zygamaybe dlopen works17:01
zygabut without dlerror17:01
zyga...17:01
ogra_no, doesnt start17:01
zygawe're just guessing17:01
zygaer, s/dlopen/mount/17:01
ogra_zyga, well ask for it to be added :)17:03
zygaogra_: look at the forum17:03
ogra_zyga, yeah, got the same as ping in #ubuntu-mir17:04
zygamvo: don't look17:05
ogra_now ... why did that get removed17:05
zygamvo: I forsee 2.23.417:05
ogra_i dont17:05
zygamvo: er, 2.26.417:05
zygamore core builds (with same snapd)17:05
ogra_right17:05
ogra_unless libjson was a dep of snapd17:05
zygamaybe17:06
zygastill :/17:06
zygawe cannot remove anything17:06
ogra_zyga, we have no influencve on that ... if a package drops a dependency it is gone and we need to retroactively adjust17:08
zygaogra_: yes, we need better tooling17:09
zygaogra_: core ABI traces17:09
zygaogra_: and tests that ensure we don't break ABIs17:09
ogra_we have manifest files17:09
zygaogra_: we are missing testss17:09
zyga*tests17:09
zygawe need a 2nd review for https://github.com/snapcore/snapd/pull/334417:09
mupPR snapd#3344: cmd/snap-confine: use SNAP_MOUNT_DIR to setup /snap inside the confinement env <Created by morphis> <https://github.com/snapcore/snapd/pull/3344>17:09
zygaperhaps Chipaca or jdstrand can have a look, just a few lines of diff17:10
ogra_zyga, so libjson-c2 was pulled in by rsyslog before ...17:10
jdstrandI reviewed it17:13
zygaaha17:14
zygaogra_: nice find17:14
zygaogra_: can you add this to this thread?17:14
zygathanks jdstrand !17:14
ogra_zyga, in the light that we do not guarantee anything bug /bin/sh and libc the fact that the snap depends on something inside core is wrong though ... i'll seed it for now but the snap is broken IMHO17:14
ogra_s/bug/but/17:14
zygaogra_: in principle I agree but I think we need to be pragmatic17:15
zygaChipaca: I edited https://github.com/snapcore/snapd/pull/3342 - please keep nicer messages as those end up in changelogs and such17:16
mupPR snapd#3342: many: refactor in preparation for 'snap start' <Created by chipaca> <https://github.com/snapcore/snapd/pull/3342>17:16
zygamorphis: make fmt17:16
morphiszyga: yeah, saw that17:17
morphisthese formattign rules are nasty :-)17:17
zygamorphis: https://imgflip.com/i/1p7lz617:17
zygamorphis: I have something nicer brewing towards that end17:18
ogra_mvo, zyga http://paste.ubuntu.com/24593840/ can i get an ACK for this ?17:18
zygaogra_: ''17:18
morphiszyga: need a pre-commit hook for that :-)17:18
Saviqhey all, if I've a part (app) that builds against another part (library) in that same snapcraft.yaml, what's a good way of pointing the app at the library? ../parts/library/install/...?17:20
naccSaviq: you mean you need build-time linkage?17:30
Saviqnacc, yes17:30
ogra_niemeyer, i assume an opinion of a director/architect might come in handy here https://forum.snapcraft.io/t/bug-running-mir-kiosk-apps/65717:31
ogra_if you dont mind17:31
Saviqnacc, something along the lines of PKG_CONFIG_PATH=$SNAPCRAFT_STAGE..., but I just notice PKG_CONFIG_PATH is already set up to include the stage...17:31
naccSaviq: i would think that would 'just work', put your library in a part, make your app be a part that is 'after' the library part17:32
Saviqyeah I think my "after: " was wrong17:32
naccSaviq: or at least, it's explicitly mentioned as the uses case for after on https://snapcraft.io/docs/build-snaps/parts :)17:32
Saviqnacc, yeah I think PEBKAC17:32
Chipacazyga: github uses the first line of the commit message as the title; my commit message was quite a bit longer17:32
naccSaviq: happens to me all the time :)17:32
zygaChipaca: well, commit messages have rules :)17:33
elfgohogra_, any idea if there are updates on this thread? https://lists.ubuntu.com/archives/snapcraft/2017-April/003774.html17:33
zygaChipaca: first line is shorter (afair 60-something) then newline, then anything17:33
Chipacazyga: where are these rules? this is news to me17:33
elfgohAm trying to figure out where to get started on using GPIOs on a raspberry pi 317:33
ogra_elfgoh, you use the exposed gpio interfaces17:33
ogra_look at snap interfaces17:34
ogra_elfgoh, this didnt make it to the stable channel though since the pi3 gadgets can not be upgraded there and the interface comes from the gadget17:35
niemeyerogra_: Looking17:35
ogra_thanks17:35
elfgohogra_: so which channel is the change in now? I do have the flexibility to not use the stable channel for now17:37
ogra_elfgoh, should be in all channels but stable17:38
elfgohAnd any rough non binding forecast on when the change will be in stable?17:38
ogra_elfgoh, whenever upgradeable gadgets exist for the pi ... no idea17:38
zygaChipaca: one sec17:38
zygaChipaca: https://chris.beams.io/posts/git-commit/17:39
zygaChipaca: (quick google)17:39
zygaChipaca: http://stackoverflow.com/questions/2290016/git-commit-messages-50-72-formatting17:39
zygaChipaca: there are plenty of things like this17:39
ogra_afaik it was discussed at the last planning sprint how to handle such upgrades, but i wasnt there and havent seen any docs with details for this issue17:39
elfgohogra: who/what decides that? Canonical?17:39
zygaChipaca: frankly we as a team are utterly terrible at those17:40
ogra_elfgoh, currently it is a technical limitation and needs to be implemented ... upgrading bootloaders is risky so its not an easy or small task ... it will happen but is a matter of time17:40
zygaogra_: I would love to know when someone will start working on this17:41
morphiszyga: ok, that PR is good to go, there is a problem with my restore setup17:42
zygaogra_: are you planning to?17:42
zygamorphis: OK17:42
* zyga looks again17:42
elfgohogra: so means the upgrading of bootloaders is in all channels but no stable, due to the risk?17:42
ogra_zyga, on what ? gadget upgrades ?17:42
Chipacazyga: most of the log messages i see are "merge pull request #yadda from foo/barbaz"17:42
zygaChipaca: yes, that too (because rebase policy)17:42
zygaChipaca: honestly looking at our history is next-to-useless but I really think it's a shame and we could do better17:42
zygaogra_: yes17:42
Chipacazyga: i suggest opening a topic and having a discussion about it, then17:43
zygaogra_: not sure if we have design on that17:43
Chipacazyga: as it stands I'm not clear what it is exactly that you're wanting us to improve17:43
zygaChipaca: well17:43
zygaChipaca: two things17:43
zygaChipaca: the lines cannot be this long17:43
ogra_zyga, right, we dont ... i was expecting some design to have come out of the planning sprint17:43
zygaChipaca: they are way way too long usually17:43
zygaChipaca: and they are not scoped17:43
zygaChipaca: the rest is usually empty but I think it really should be different17:44
Chipacazyga: "too long" and "not scoped" seem to contradict each otehr17:44
zygaChipaca: (scope == many: ....)17:44
zygaChipaca: under 50 chars17:44
Chipacaexactly, but scope can easily eat up more than that17:45
zygaChipaca: it should not, usually it is very short (just directory name of 1/2nd level)17:45
zygaI think it's easy to use common sense17:45
Chipacazyga: I mean17:46
Chipacazyga: if the criteria is "--oneline needs to look good"17:46
Chipacazyga: that is very different from "you need to understand what the commit is about"17:46
ChipacaI thought we wanted the latter17:46
zygaChipaca: you want both actually17:47
zygaChipaca: and it's not hard17:47
zygaChipaca: one line summary, scope and short facts, + newline + poem of any size17:47
jdstrandogra_: have you observed the behavior of /var/log/syslog in edge?17:54
jdstrandogra_: claims a size of 2M but reads just hang17:55
jdstrandogra_: stat /var/log/syslog too17:55
jdstrandogra_: cp...17:55
ogra_jdstrand, i dont have that file on my current edge images anymore17:55
Chipacazyga: that's a nice article, the first one you linked17:55
Chipacaanyway, i need to go make dinner17:55
Chipacao/17:55
jdstrandogra_: core          16-2.26.3    1962  canonical  -17:56
ogra_jdstrand, where do yiou get it from ?17:56
jdstrandogra_: this is an upgrade17:56
ogra_nothing should create it anymore17:56
jdstrandsnap refresh core --edge17:56
ogra_so its an old file you have lying around17:56
ogra_not much we can do about that i fear17:56
jdstrandI don't know how it is there. I can't read it or do anything with it, yet, ls -l shows it17:56
jdstrand$ ls -l /var/log/syslog17:56
jdstrand-rw-r----- 1 syslog adm 1950368 May 17 09:53 /var/log/syslog17:56
ogra_ogra@pi3:~$ ls /snap/core/current/var/log/|grep syslog17:57
ogra_ogra@pi3:~$17:57
jdstrandogra_: that's a confusing bug that will trip up applications. they can't decide to read the journal or that file for example because the file exists17:57
jdstrandif they try to read, it'll just hang17:58
ogra_it definitely doesnt exist on fresh installs ... i'm not really sure what to do regarding upgrades where that file was created before but i wouldnt expect it to be any different than before we removed rsyslog17:58
ogra_it just doesnt get filled up17:58
jdstrandogra_: why can't that file be removed on upgrade? or zeroed out, or something17:59
ogra_do we have upgrade hooks that i dont know about ?17:59
=== elfgoh_ is now known as elfgoh
jdstrandogra_: it is different, that is why I am talking to you. I expected it to either not be there, or be whatever it was before and unchanging17:59
jdstrand:)17:59
ogra_yes, me too18:00
ogra_its just a text file after all18:00
ogra_just that nothing writes to it anymore18:00
ogra_permissions or anything didnt change18:00
jdstrandogra_: maybe it is journald18:00
ogra_and it was never readable by anyone but root anyway18:00
ogra_i dont think journalds cares about syslog18:00
jdstrandthat shouldn't be it...18:01
jdstrandogra_: oh, another issue:18:02
jdstrand$ find /etc/systemd -name "*rsyslog*"18:02
jdstrand/etc/systemd/system/multi-user.target.wants/rsyslog.service18:02
ogra_ouch18:03
ogra_juts dangling though18:03
jdstrandthat a dangling symlink18:03
ogra_but ugly ...18:03
jdstrandyeah18:03
ogra_mind filing a bug for that ... i'm not sure what we can do there though without upgrade hooks18:03
ogra_(apart from ugly hacks)18:04
jdstrandthere is something weird going on with this vm18:04
ogra_anyway ... i need to stop now GF starts looking angry that i work so late today18:04
jdstrandI can't remove that file18:04
ogra_ogra@pi3:~$ sudo rm /etc/systemd/system/multi-user.target.wants/rsyslog.service18:04
ogra_ogra@pi3:~$18:04
ogra_works fine on my pi318:05
ogra_i wonder if your syslog issue is also caused by this18:05
jdstrandthat's what I'm wondering18:05
jdstrandogra_: ok, see you later18:05
jdstrandogra_: fyi, https://bugs.launchpad.net/snapd/+bug/169152518:11
mupBug #1691525: dangling symlink /etc/systemd/system/multi-user.target.wants/rsyslog.service <snapd:New> <https://launchpad.net/bugs/1691525>18:11
pedronismvo: I now added a spread test to the default config PR18:16
* zyga calls it a day18:19
zygacore is not ready as a snap18:19
ogra_zyga, next build will be though18:20
zygaogra_: yes but 20:20 is the time for kids and books; :-)18:20
ogra_+118:20
ogra_(or TV ... )18:20
zygaI have a TV but I think it will stay in spain18:22
zygatoo big to move back18:22
zyganot worth it (old)18:22
zyganot CRT-old though18:23
zygaand TV has only one use anyway, to plug to PS4 :)18:23
zygayoutube/netflix/some games18:23
ogra_you will need a good spy-glass if you want to watch TV then though ... spain is quite a bit from poland18:24
ogra_:P18:24
zygaogra_: but we have big-brother TVs you know ;)18:25
ogra_hehe18:25
zygamaybe I should become a politician18:25
zyga"I'm not nuts and far-right religious extremist!"18:25
zygabut nobody votes for that18:26
ogra_yeah, not where you are going at least18:26
zygayeah18:27
ogra_compe to germany instead ;)18:27
ogra_*come18:27
ogra_(not the east part though ... there you also need to be fascist to be politican)18:28
zygai can live at the border, i can be both then ;)18:29
ogra_hah18:29
jdstrandogra_: fyi, it seems that vm was messed up. I created a new one from stable and refreshed to edge and I can cat /var/log/syslog. it is unchanging18:34
kyrofaDo we have any real documentation on tracks?18:58
Saviqkalikiana, hey, any idea about http://pastebin.ubuntu.com/24594439/ when trying to use project containers?18:58
* Saviq on lxd+ZFS, I suppose that matters18:58
davidcallekyrofa: anything missing from https://snapcraft.io/docs/reference/channels on the topic?18:59
SaviqI can launch via `lxc launch...` no problem18:59
kyrofadavidcalle, ah ha! I was looking in Build snaps19:02
kyrofaI should trust you more. You're always on top of things19:03
davidcallekyrofa: I wish! :D19:03
kyrofadavidcalle, good docs. A question I'm left with, though, is: by default, it seems I have one track, `latest`. Once I start creating tracks, what is latest pointing to?19:09
kyrofaCan I change it? And I assume people using latest change with it?19:09
kyrofaOr is `latest` still its own thing, a track to which I must release separately?19:10
Facukyrofa, "latest" is always the default, the one used when you don't specify one19:10
Facuright, you need to release to latest separately19:10
Facukyrofa, everybody start with "latest", so let's suppose you cut 5.10 of your project, at that point you'd have "5.10" track and latest (with latest stuff)19:11
kyrofaFacu, and it 5.10 IS latest, I release into both?19:11
kyrofas/it/if/19:11
kyrofacjwatson, does launchpad support releasing into multiple tracks? (it seems not)19:12
Facukyrofa, if 5.10 is latest, you don't need to request a track for it, just use latest19:13
Facukyrofa, there's no need to use a track, if you're ok with latest19:14
mupPR snapcraft#1321 closed: tests: remove the reusable parts tour test <Created by elopio> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/1321>19:15
kyrofaFacu, then there's no way for my users to say "I only want to stay on 5.x"19:18
kyrofaRight?19:19
noise][kyrofa: you would at some point before moving beyond 5.x, cut a 5.x branch and message users to move to it if they want to stay on 5.x19:20
noise][and give enough time before dropping a 6.x onto latest or whatever19:20
Facukyrofa, mmm... if you want users to say "I want to stay on 5.x" but currently 5.x is the ONLY thing you have... then you'd need to create a track, yes; you still would have "latest", but as 5.x is the only thing you have, no need for releases into latest19:20
kyrofaFacu, but then there's no way for users to say "I'm happy to roll to 6.x when it's out" :P19:21
kyrofaFacu, this is all academic anyway, I'm just giving you a hard time. Thanks for answering my questions!19:21
Facukyrofa, not sure if I understand that question or use case19:21
Facukyrofa, in any case there's no automatic switch between tracks19:22
kyrofaIndeed: if one wanted such a thing, they would need to be tracking `latest`, right?19:22
Facukyrofa, right19:23
kyrofadavidcalle, perhaps you should note that in your recommendation: "Eg. when you release the 2.0 version of your software in the latest track, open a track called 2.0 for users wanting to stay on 2.0 and subsequent 2.* releases."19:23
kyrofaYou'll need to release to both the 2.0 track _and_ latest19:24
mupPR snapcraft#1317 closed: recording: save the details of the source pulled <Created by elopio> <Merged by sergiusens> <https://github.com/snapcore/snapcraft/pull/1317>19:24
kyrofaAnd it seems that LP won't work with the workflow you're suggesting19:25
=== dpb1_ is now known as dpb1
mupBug #1638334 changed: snap install not properly generating ConnectedSlot policy when auto-connecting via snap-declaration-allowed connection <personal> <snapd-interface> <Canonical System Image:Fix Released by kgunn72> <Snappy:Fix Released by albaguirre> <https://launchpad.net/bugs/1638334>20:31
cjwatsonkyrofa: not at the moment, though it ought to be possible to add if we can work out a reasonable UI (maybe just space-separated tracks in that input box I guess)20:32
cjwatsonkyrofa: it's just a UI issue though - you can set snap.store_channels over the API, in which case you could set it to ['2.0/edge', 'latest/edge'] or something20:33
kyrofacjwatson, good to know, thank you!20:34
cjwatsonkyrofa: (I don't recall what the UI will do when it tries to display that)20:34
CantaloupMelonI think I have a quick question: Why would my snap not auto connect to plugs? I have them listed under each app, as plugs: [network, network-bind, etc]20:35
kyrofaCantaloupMelon, some plugs don't auto-connect as they can be a bit dangerous20:35
kyrofaCantaloupMelon, but network and network-bind should auto-connect fine20:35
CantaloupMelonI also have home for a few as well20:36
kyrofaThat one should also be automatically connected these days20:36
CantaloupMelonwhen I do a snap interfaces (after a snap try) they're not connected, and if I do it manually after the fact everything is great20:37
kyrofaCantaloupMelon, none of them? Not even the network ones?20:37
CantaloupMelonno, none.20:37
kyrofaThat doesn't seem right. Have you tried actually installing the snap? Does the same thing happen, or is it specific to tried snaps?20:38
CantaloupMelonAlso strangely one VM I could do a snap connect foo:network :network and it worked fine, but not in this other VM running ubuntu 16.1020:38
CantaloupMelonkyrofa: happened on installed ones too20:38
kyrofaCantaloupMelon, only in 16.10, though?20:39
CantaloupMelonwell, I did a fresh VM cause what I was doing wasn't compiling under my original VM Ubuntu 16.04. maybe I forgot to install something20:39
CantaloupMelonor update?20:40
kyrofaCantaloupMelon, jdstrand or zyga might have ideas for you... I'm not sure why interfaces wouldn't be auto-connecting on 16.1020:40
CantaloupMelonat least I'm not going nuts, I figured it should work20:41
kyrofaCantaloupMelon, agreed, I figure it should work as well20:42
mupPR snapcraft#1322 opened: state: ignore the 'any' architecture in the build packages apt cache <Created by elopio> <https://github.com/snapcore/snapcraft/pull/1322>22:18
mupPR snapcraft#1323 opened:  state: search for the build package that provides a virtual package <Created by elopio> <https://github.com/snapcore/snapcraft/pull/1323>22:49

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