=== chihchun_afk is now known as chihchun [05:03] morning [05:08] mvo: hey [05:08] mborzecki: good morning [05:08] mborzecki: how are things? anything important I missed last week? [05:09] mvo: no, don't think so, no fires or anything [05:11] mborzecki: great [05:11] * mvo dives into core18 and reviews then [05:11] mborzecki: anything exciting happened? how are parallel installs coming along, I'm quite excited about this one [05:13] mvo: i've bastardized snap-confine and snap-update-ns to accept the _ in snap names, then on friday i was looking into mounting foo_bar as foo [05:13] mvo: i should be opening some PRs today with some introductory changes in structs [05:13] mborzecki: sweet! [05:13] mborzecki: I was wondering how the internal changes will look like, was it a lot of fiddling? [05:14] let me show you a patch [05:15] mvo: https://paste.ubuntu.com/p/xNBgYhWcMp/ that's a work in progress version [05:17] mborzecki: aha, nice. StoreName() is a good helper [05:18] mborzecki: that is surprisingly short, nice [05:18] mvo: tried to make it least invasive :P [05:18] mborzecki: heh :) looks like a success to me [05:22] mvo: s-c bits are a bit fiddly, the mounts, i'm trying tmpfs over $SNAP_MOUNT_DIR, oh an the store part, you can't really install foo and foo_bar right now, because the store complains that you have the same snap appearing twice in the request [05:23] * mvo nods [05:33] https://www.bloomberg.com/news/articles/2018-06-03/microsoft-is-said-to-have-agreed-to-acquire-coding-site-github wat? [05:35] mborzecki: I heard rumors about this on the weekend [05:35] mborzecki: definitely in the waaat catgeory [05:35] mborzecki: source-safe-2018 [05:35] 5251 is an easy win if someone wants to review [05:35] hahah, well, at leas this one is usable :) [05:36] mborzecki: yeah :) [05:39] PR snapd#5251 closed: tests: reprioritise a few tests that are known to be slow [05:39] good morning! [05:39] zyga: hey, good morning [05:39] hey hey, how are things [05:39] zyga: hey [05:40] so Microsoft keeps snapd source safe ;) [05:40] PR snapd#5249 closed: interfaces/home: remove redundant common interface assignment [05:44] I will be here shortly, need to set the little one for a school trip [05:46] mborzecki: there is one open question by zyga in 5244 otherwise it looks good afaict [05:50] mvo: just pushed a fix [05:51] mborzecki: ta [05:51] PR snapd#5238 closed: tests: skip appstream-id test for core systems 32 bits [05:53] PR snapd#5232 closed: interfaces/tpm: Allow access to the kernel resource manager [05:53] https://www.youtube.com/watch?v=VYOXuOg9tQI haha look at the publish date [06:17] mborzecki: hahaha [06:32] tests are not happy :/ [06:34] unattended upgrades? https://www.irccloud.com/pastebin/Txy5hEt3/ [06:43] zyga: possible, yes === pstolowski|afk is now known as pstolowski [06:56] morning [06:58] ok [06:58] * zyga got stressed because of sudden call that the school trip rule sheet must be brought by all children [06:58] school is so poorly organised [06:59] I signed that paper last week [06:59] and suddenly they tell me I need to keep it (I got a blank copy) and -bring it-, as if they couldn't find their own copy [06:59] sigh [06:59] but all is good now [06:59] * zyga tries to forget about non coding stuff === chihchun is now known as chihchun_afk [07:14] could anyone please review https://github.com/snapcore/snapd/pull/5245 [07:14] PR #5245: cmd/snap-update-ns: add PathIterator === chihchun_afk is now known as chihchun [07:17] zyga: i'll do it in a while [07:17] thanks [07:59] any clues what happened to lxd? restoring google:ubuntu-16.04-32:tests/main/lxd seems to consistently fail across a number of jobs [08:00] the job hits a kill-timeout when issuing `lxd.lxc stop my-ubuntu` === chihchun is now known as chihchun_afk [08:00] mborzecki: I saw this as well, I have not looked yet but probably worthwhile to do a local spread run with -debug [08:01] Chipaca: hey, thanks for pushing the fixes for shellchecks :) [08:03] mborzecki: I was very bored :-) === chihchun_afk is now known as chihchun [08:20] PR snapd#5252 opened: store, jsonutil: move store.getStructFields to jsonutil.StructFields [08:24] damn, that lxc issue does not reproduce when running locally :/ [08:26] mborzecki: the one where it doesn't stop? [08:26] Chipaca: yes [08:26] mborzecki: it's not 100% on spread either [08:26] that is, it's racy [08:27] heh, i must be super lucky then :) [08:27] i've seen it sporadically since friday [08:27] (while iterating on those shellcheck tests) [08:28] mvo: extra bonus idea for --format=help: use tags to add brief explanation to fields [08:28] mvo: I can push a tweaked helper to grab you that if we agree on a format for 'em [08:29] (or, you can, it's not brain rocketry) [08:34] 2018-06-04 08:29:45 Failed task restore: 1 [08:34] - google:ubuntu-16.04-32:tests/main/lxd [08:34] i saw that over the weekend too [08:35] mborzecki: ah, it seems like what you mentoned above [08:40] Chipaca: feel free to do that, I'm wrestling firstboot to skip looking for core [08:41] mvo: aw [08:41] mvo: wrestl wrestl [08:58] * zyga -> tea [09:03] PR snapd#5253 opened: snap: introduce new fields for parallel snap installation [09:17] and now i got a failure on journal cursor in the google:ubuntu-14.04-64:tests/main/snap-confine-from-core test [09:22] mborzecki: hi, could you write in a forum topic how you plan to refactor things on the way to parallel installs, small PRs are good but is hard to guess the full picture. [09:22] pedronis: sure [09:23] pedronis: btw. https://paste.ubuntu.com/p/xNBgYhWcMp/ if you'd like a quick peek at the current changes [09:25] pedronis: as you commented in the PR, SnapSetup.Name() has been updated too, just that it's not included int the patchset [09:25] mborzecki: there are no changes to tests there, bit hard to judge if those changes are sufficient, also the change in store is a bit strange [09:26] mborzecki: any place dealing with info.Name needs a new test [09:27] in theory not, but in practice it sort of does [09:29] pedronis: hmm i think i'm more afraid of the places that poke the struct directly rather than calling its methods, iirc there was one place where SuggestedName was accessed this way (store?) [09:29] mborzecki: wrappers I think [09:29] pstolowski: I think the journal change is racy and it somehow doesn't always work [09:30] mborzecki: anyway new tests in managers_test and spread are probably welcome [09:30] zyga: yes.. and somehow it's only on 14.04 (afair) [09:30] pedronis: sure, will be adding those [09:30] I don't know, think I saw that across the board [09:31] hmm ack [09:31] offtopic, so the GitHub news seems true, [09:31] I wonder what this means for us [09:32] zyga: what is it about github? [09:32] pstolowski: ms bought it [09:33] woot [09:35] zyga, they did ? i thought they only think aloud about it yet ... was there an official statement ? [09:36] (they also said they might only invest in shares and not buy the whole company afaik) [09:37] mborzecki: also store changes are a bit buggy , that code was sometimes assuming that instanceKey == snapID which is not true anymore and doesn't seem fully updated [09:41] ogra_: I don't know for sure, there's plenty of news but also rumour around this topic [09:41] I think we'll just wait and see [09:41] yeah [09:42] afaik most is speculation atm [09:44] (what is clear is that MS has "some interest" in GH ... but perhaps thats only to the level like they had interest in imagination tech. where they hold a third to have influence on the graphics driver development) [09:44] http://www.bloomberg.com/news/articles/2018-06-03/microsoft-is-said-to-have-agreed-to-acquire-coding-site-github [09:45] ogra_: heh, how imagination tech. handled being up for sale was a fiasco :) at least for imagination... [09:46] yeah, totally [09:46] haha "Bill Gates and Paul Allen co-founded the company to give hobbyists a way to program a new micro-computer kit, the MITS Altair." [09:46] thats soo ... LOL ... [09:47] s/to give hobbyists a way/to lock in hobbyists that already had ways to/ [09:49] heh, this one is also great: [09:49] "GitHub preferred selling the company to going public and chose Microsoft partially because it was impressed by Nadella ..." [09:50] ... "he looks so good" ... :P [09:50] you look good, are you exercising? [09:50] haha [10:00] pedronis: good morning! I updated 5217 based on your feedback [10:02] mvo: hi, looking [10:03] pedronis: thank you. I'm looking at the firstboot changes right now, I think I will need to reuse bits from 5217 here :) [10:05] PR snapd#5162 closed: overlord/hookstate: support undo for hooks [10:10] mvo: I think snapd should come first in the snaps installed sequence [10:11] pedronis: ok, let me fix this [10:11] we then take care again of that in first boot [10:11] but we should keep being consistent I think [10:12] pedronis: yeah, makes sense [10:15] pedronis: updated === Wimpress_ is now known as Wimpress [11:00] pstolowski: is your -1 because of the last comment, it wasn't super clear (the other one is wondering and one is a nitpick so I suppose so) [11:02] pedronis: yes just about Empty(); and i prefer to call it "requesting a change", not -1 because I'm +1 for you change overall :) [11:02] pstolowski: well, it really means "requesting a change and wanting to look again" [11:07] fair enough, it's just a minor thing, that's all i'm saying === pstolowski is now known as pstolowski|lunch [11:16] I'm under the impression that I can download any revision of a previously published store if I have the right developer access. Is that correct, or is there some kind of retention/expiry policy? [11:16] I'm trying to download r429 of git-ubuntu from the store, since r430 in edge broke what previously worked. [11:16] snap download --revision=430 git-ubuntu [11:16] worked [11:16] snap download --revision=429 git-ubuntu [11:16] says: error: cannot find snap "git-ubuntu": snap not found [11:17] I tried logging in with snap login, but after credentials that failed and suggested sudo [11:17] * cachio afk [11:17] sudo snap login works, with both credentials and a further prompt for 2fa [11:17] But even then, both snap download and sudo snap download still fail [11:20] hello [11:21] is there a "install" button widget or something I could add on my website to point to snapcraft.io/vlc ? [11:31] I found https://dashboard.snapcraft.io/snaps/git-ubuntu/revisions/429/ which has a download link which works. But that gives me only the snap, not the assertion. [11:33] rbasak: that's correct, it should be possible if you have developer access [11:34] rbasak: can you open a bug https://launchpad.net/snapstore/+bugs [11:38] pedronis: thanks. The dashboard link shows me " [11:38] Submitted by [11:38] nacc (nish.aravamudan@gmail.com) [11:38] " [11:39] Which isn't me. [11:39] Could that be the reason? [11:39] Some kind of team/individual confusion. [11:39] It should all be handed over to me, and this was done before that revision was pushed. [11:39] I remember having to re-auth Launchpad to the store. [11:39] rbasak: if you can push to it it shouldn't matter [11:42] PR snapd#5244 closed: tests: shellchecks part 3 === chihchun is now known as chihchun_afk [11:43] rbasak: what architecutre is the snap? [11:43] rbasak: if you are logged in, you can ask for any published revision, as long as it's for the current architecture [11:43] All amd64 [11:44] rbasak: 'snapcraft revisions git-ubuntu' agrees? [11:44] oh [11:44] wait [11:44] *snap download* [11:44] ah, download [11:45] me missed that [11:45] As opposed to what - publish? [11:45] rbasak: install [11:45] Ah [11:45] rbasak: download doesn't talk to snapd to get your tokens [11:46] Let me explain a little more what's going on [11:46] edge was working [11:46] I made an innocuous push to master in our codebase, which triggered a Launchpad build recipe to push to edge [11:47] That tripped some kind of non-determinism in snapcraft and pushed a broken snap to edge [11:47] rbasak: QOTM right there [11:47] I'd like to do two things: 1) restore edge; 2) examine the snap that Launchpad produced, which is broken, since that isn't what our CI did, which was OK [11:47] “I made an innocuous push to master in our codebase” :') [11:48] :) [11:48] rbasak: ok, so if edge is currently broken and that's the one you want to download, why not snap download it right now? [11:48] there's a bit of a dance to be done to get it to use the right tokens otherwise [11:48] https://forum.snapcraft.io/t/launchpad-post-build-pre-upload-testing/5545 has some broken [11:48] Chipaca: I've downloaded the broken one no problem. [11:48] ah ok [11:48] Chipaca: I'd like to download the previous good one too [11:49] I have managed to get the snap from the dashboard UI [11:49] rbasak: once you have the bad one, use snapcraft to re-pubish the good one, and download that one [11:49] But I was confused as to why "snap download" didn't work since I was under the impression that it would [11:49] Also that the dashboard web UI didn't give me the assertion file, but I presume I will just get a new one when I re-publish the good one? [11:50] sorry, I misunderstooed, download doesn't work in that case (unless you pass it tokens manually) [11:50] but that's known bug, not prioritized for a fix yet though [11:51] https://dashboard.snapcraft.io/snaps/git-ubuntu/revisions/429/ has a Release button [11:51] https://forum.snapcraft.io/t/improvements-in-snap-download/1422/8 [11:51] Can I stick it back in edge through there? [11:51] rbasak: yes [11:52] Great! I think I know how to do everything I need then. [11:52] Thank you for your help - it's much clearer to me now what is going on. [12:00] pstolowski|lunch, mborzecki: updated 5245 [12:00] and I have a working follow-up that uses it extensively [12:01] and drops all segments from the code [12:01] zyga: ok, looking [12:10] skomorokh: it isn't currently possible to do what you want. I suggest creating a forum topic at https://forum.snapcraft.io [12:13] pstolowski|lunch, mborzecki: I pushed the other PR to https://github.com/snapcore/snapd/pull/5254 [12:13] PR #5254: cmd/snap-update-ns: discard the concept of segments [12:13] PR snapd#5254 opened: cmd/snap-update-ns: discard the concept of segments [12:13] jdstrand: hey, good morning :) [12:14] hey zyga :) [12:14] jdstrand: I'm working on trespassing, went on a small tangent to clean up validation interface, ended up killing segments [12:16] cool [12:16] I have one last cleanup on top, to make error messages less duplicated, shorter and to the point [12:16] then the stack unwinds and validation is back, also with fuse validation [12:16] I didn't see fuse as a problem but now I do :/ [12:17] anything fuse has one filesystem type number [12:17] so we no longer know read-only squashfs from writable fuse-exfat or whatever [12:17] I'd love if there was a way to see if a filesystem is read-only without trying to write to it === pstolowski|lunch is now known as pstolowski === chihchun_afk is now known as chihchun [12:29] zyga: doesn't statfs's ST_RDONLY work? [12:30] mmmm :D [12:30] maybe, I didn't think about that ! [12:30] Thank you John, I'll check that [12:30] wouldn't be surprised if it didn't, because it being fuse means somebody would have to care :-) [12:34] PR snapd#5255 opened: cmd/snap-confine: applied make fmt [12:36] PR snapd#5256 opened: cmd/libsnap-confine-private: helper for extracting store snap name from local-name [12:45] mborzecki: can we not use the word base there [12:45] it's not about the code but the word would become overloaded and confusing [12:45] what's the terminology for the instances/parallel installation etc [12:46] haha ok ;) [12:47] if we had a list of forbidden words, i'd nominate classic [12:48] * zyga should take the dog for a walk [12:52] mborzecki: you should call it 'root', that way it's unambiguous [13:07] Chipaca: sc_snap_root_name sounds good [13:08] mborzecki: I was being facetious [13:09] Chipaca: heh, given the limited possibilities root actually make sense :) [13:27] mborzecki: sc_snap_uninstanciate_name [13:27] mborzecki: sc_snap_deinstance_name [13:28] mborzecki: sc_snap_get_rid_of_this_instance_nonsense_in_the_name [13:28] sc_snap_drop_instance_name [13:28] mborzecki: sc_snap_what_is_this_instance_stuff_just_i_dont_even [13:28] sc_snap_why_u_name [13:29] mborzecki: sc_snap_wat [13:29] mborzecki: putting my serious hat on for a moment, sc_snap_drop_instance_name might be the best one so far [13:31] pstolowski: can you look at the iterator PR again please [13:31] zyga: will do [13:31] feel free to open more points there, I changed the code much after really using it [13:33] niemeyer: $7.5B in stock [13:33] niemeyer: the PR I mentioned is here: https://github.com/snapcore/snapd/pull/5221 [13:33] PR #5221: [RFC] snap: parse connect instructions in gadget.yaml [13:33] zyga: How much is that divided by the number of developers? [13:33] Just trying to figure how much I'm worth :P [13:34] niemeyer: ~100 AFAIK [13:34] ah sorry [13:34] 745 exactly [13:34] man, that's even nice to divide :P [13:35] 10M each, even for the guy mending the coffee machine [13:41] pedronis: Looking [13:46] cachio: is gce cleaner using timer services? [13:46] mborzecki, yes [13:46] nice [13:46] mborzecki, :) [13:47] working very well so far [13:57] noticed the banner at the top of the github page? [14:02] mborzecki, yes [14:04] pedronis: Reviewed.. probably needs a quick sync, on that last question.. going into a call now, and we can sync after it === ErichEickmeyer_ is now known as ErichEickmeyer === chihchun is now known as chihchun_afk [14:16] PR snapd#5257 opened: snapstate: ensure fakestore returns TypeOS for the core snap [14:16] back from the walk [14:16] so so so hot [14:22] * zyga made some ice coffee and gets back to work === andyrock_ is now known as andyrock [14:25] @niemeyer eh [14:25] https://gitlab.com/Zyga [14:25] :-( [14:25] who is pawel z? [14:29] zyga: uh...new face of cybersquatting [14:38] * zyga enjoys some brief breeze of wind [14:52] niemeyer: oops, I got confused and thought your meeting was 1h [14:53] pedronis: It wasn't too far from it :) [14:54] PR snapd#5258 opened: tests: fix lxd test which hangs on restore [15:00] PR snapd#5217 closed: asserts,image: add support for models with bases [15:03] robert_ancell: o/ === chihchun_afk is now known as chihchun [15:23] pstolowski: updated [15:24] pstolowski: the error from the constructor fits the rest very nicely, I will now update the remaining PR [15:27] cachio: hey, can you take a look at https://github.com/snapcore/snapd/pull/5248? The only issue with travis is that the lxd fix hasn't made it to 2.33 [15:27] PR #5248: tests: add test to ensure /dev/input/event* for non-joysticks is denied - 2.33 [15:27] }jdsure [15:27] zyga: great, thanks [15:27] at least I think I'm remembering that right [15:27] cachio: thanks [15:47] mvo: let me know if I'm bikeshedding too much on your RFC PR [15:49] oops [15:50] PR snapd#5259 opened: devicestate: support seeding from a base snap instead of core [15:53] Chipaca: just read it, its great [15:53] Chipaca: thank you! [15:59] pstolowski: can you re-review that PR please, it would get me unblocked [16:04] niemeyer: I'm available for the next hour for that chat, otherwise tomorrow [16:10] zyga: doing [16:10] Thanks :) [16:12] zyga: looks good, although you made it strict in all cases now, that's intended? i thought you would have to variants? [16:12] *two [16:12] ah, cleanpath should succeed generally [16:14] pstolowski: no, I thought so too but the usage down the line is fine as-is [16:17] +1 [16:17] \o/ thanks! [16:18] let's hope tests are lucky now [16:26] PR snapcraft#2153 opened: project_loader: allow loading null parts === chiluk_ is now known as chiluk [16:32] pedronis: Hey, give me a couple and will be with you [16:33] PR snapd#5245 closed: cmd/snap-update-ns: add PathIterator [16:36] pedronis: https://meet.google.com/ftn-sqmv-kwy [16:37] pstolowski: follow-up in #5254 [16:37] PR #5254: cmd/snap-update-ns: discard the concept of segments [16:37] now shorter and just to the point [16:38] PR snapcraft#2151 closed: Debian [16:39] zyga: i'll take a look tomorrow morning [16:39] pstolowski: sure [16:41] pedronis, hey, any idea why it could be happening? https://paste.ubuntu.com/p/F8fwwrYHVt/ [16:41] it is not retrying the assertions === pstolowski is now known as pstolowski|afk [16:44] I'm having some problems understanding how to create a snap. I have a binary, a few depencencies, and a wrapper script. Nothing is being compiled. I'm not sure how to go about doing this. I'm looking at the site, but not having much luck understanding it. [16:44] jdstrand: hey, do you have some time for a small refactor review? [16:45] zyga: which PR? [16:45] Trel: see what snapcraft does, it allows you to bundle your binary (using the copy plugin AFAIK but kalikiana can correct me), you can also define your dependencies which will be added to your snap [16:45] Trel: with some iteration you should get it going [16:45] jdstrand: #5254 please [16:45] PR #5254: cmd/snap-update-ns: discard the concept of segments [16:45] jdstrand: this is related to trespassing, the segment verification was unable to verify rootfs and was super confusing with off-by-ones [16:45] zyga: I've been trying to use snapcraft the entire time. I'm not getting it [16:46] Trel: snapcraft defines how various parts should be combined (perhaps built, perhaps not) into a snap and what the snap itself should export [16:46] Trel: I'd suggest installing hello-world [16:46] looking at what the snap actually contains (in /snap/hello-world/current) [16:47] specifically focus on meta/snap.yaml [16:47] Trel: then run snap run --shell hello-world [16:47] and explore how the filesystem looks like, it's not the same as before [16:47] this should give you some feeling of how snaps execute [16:47] after that the question is "how to build one for myself" [16:47] there are many paths, snapcraft is the most complete and automated one [16:47] but for experimentation and learning you can hand-make one with a few commands [16:48] all you need is meta/snap.yaml [16:48] some files you want to have in your snap [16:48] then you can "snap try" from the directory containing the "meta" directory (this becomes the top level directory in your snap) [16:48] and see what happens [16:48] "snap try" is fantastic for iteration IMO [16:48] you can even get started by copying hello-world snap into a directory of your own [16:48] and tweaking some things [16:49] and "snap try" that [16:49] once you are more comfortable research snapcraft and see how you can take your binary and ship it as a snap [16:49] and people here will no doubt help you out with specific questions [16:49] See, I'm not following any of what you said. [16:49] Trel: ok, start from the top, [16:49] run "snap install hello-world" [16:49] then see that you can run it [16:50] would it be possible to not base it off another? [16:50] then look at how it is defined by looking at various files present in /snap/hello-world/current/ [16:50] Trel: sure but I'm trying to show you how snaps look like [16:50] Chipaca, do you have any idea why it could be happening? https://paste.ubuntu.com/p/F8fwwrYHVt/ [16:50] you don't have to start from hello-world, this was just a working example you can tweak [16:50] I'll try that but without understanding what I'm looking at, I'm not sure what I'll get out of it that I'm not getting from the docs [16:51] Chipaca, it is not retrying the assertions [16:51] Trel: do you have some basic understanding of how snaps operate? [16:51] Trel: I think snapcraft docs _may_ explain that but I'm not the best person to judge that given I develop snapd [16:51] Trel: having this basic feeling of what snaps do will let you build an understanding of what it takes to build one [16:51] Trel: and finally how to use snapcraft to accomplish your goals [16:51] depends on what you mean, I get the general concept, but not the operation. [16:52] But I'm not understanding what I'm doing to try and add this at all [16:52] Trel: ok, then exploring hello-world will be useful IMO [16:52] Trel: you should learn about what meta/snap.yaml does, looking at hello-world is a good quick idea [16:52] I installed hello-world, I'll look, but I get the feeling it's not going to help me understand because I'm not understanding the examples that use it in the docs either [16:52] Trel: you should also understand how snaps execute, running a command is nice but running "snap run hello-world --shell" is eye-opening [16:53] hint: it's not like your regular system, this is what makes snaps so portable [16:53] Trel: e.g. go to / and run "ls" in that shell, it's not your root filesystem [16:54] Also when I do snapcraft init, I don't get a meta directory at all [16:54] Trel: in the end snap really just ship arbitrary binaries and have a meta-data file describing what those are, snapcraft will let you build snaps ranging from most trivial to most complex but the documentation may use concepts that are unfamiliar at first [16:54] Trel: the source layout is not the same as binary layout, if you follow the snapcraft tutorial and build the first snap there, look at the contents of the prime/ directory [16:54] that is what is inside a built binary snap [16:54] Trel: most of what is in snapcraft.yaml ends up in meta/snap.yaml [16:55] (except for the parts that define how to build it) [16:55] Trel: did you follow this, for example? https://docs.snapcraft.io/build-snaps/your-first-snap [16:56] That's what I'm looking at and not getting. It's talkign about parts, and snapcraft says parts is required, but hello-world has none [16:56] Trel: parts only exist at build time [16:56] after your snap is built parts play no role [16:56] yes....that's the whole portion I'm not getting [16:56] compare snapcraft.yaml with prime/meta/snap.yaml [16:56] well, now you do :) [16:56] parts only exist at build time [16:56] at runtime you only have a snap [16:57] I honestly am not getting it [16:57] hold on a sec [16:58] Trel: are you familiar with any classic packages (like deb/rpm?) [16:58] Trel: maybe I can make an analogy if you are [16:58] cachio: not sure why i didn't see the notification for your question, sorry [16:58] cachio: what command are you running, there? [16:59] I'm not, no. [16:59] https://pastebin.ca/4037224 here's what I put in snap.yaml [16:59] that's what you would put in a snapcraft.yaml [16:59] that's what I meant [16:59] sorry [17:00] snapcraft uses snapcraft.yaml to build a snap and generate an appropriate snap.yaml file [17:00] ah, perfect then [17:00] Chipaca, we run [17:00] su -c "/usr/bin/env SNAPD_DEBUG=1 snap download --edge test-snapd-huge 2>snap-download.log" test & [17:00] cachio: if it's the same 'snap download' from econnreset/task.yaml, .... i don't know [17:00] Trel: the plugin on line 17 is what tells snapcraft how to build a given part [17:00] Trel: you used nil which literally does nothing at all [17:00] Chipaca, yes, it is the same [17:00] cachio: but [17:00] Trel: you probably want one that builds the program or one that copies a pre-made binary from somewhere else [17:01] cachio: the assert is downloaded after the snap [17:01] https://docs.snapcraft.io/build-snaps/plugins has more info about plugins [17:01] cachio: but we only wait for the snap [17:01] zyga: pre-made, and I thought that's what I'm doing there [17:01] Trel: almost, the nil plugin is not the right one [17:01] kalikiana: around? [17:01] kalikiana: can you please help Trel ^ [17:02] Chipaca, so, in this case it is ok the assert is not retried [17:02] because in the error, it is not starting the download [17:02] cachio: which is the failure? [17:02] it is creation el partial file [17:02] Trel: AFAIR you want to use "dump" plugin [17:02] https://docs.snapcraft.io/reference/plugins/dump [17:02] but emprty [17:02] https://docs.snapcraft.io/reference/plugins/ is also useful [17:02] cachio: ah! [17:03] I looked there and googled around, from what I read if I was supplying the binary, I should've been using nil [17:03] let me switch it to dump and try [17:03] Trel: you want to switch nil to dump and add a source line that defines where to get the pre-build binary [17:03] Chipaca, the problem is that the snap does not start to be downloaded [17:03] I think nil would work iff you'd keep the binary in the same place as snapcraft.yaml [17:04] cachio: maybe 20 seconds is too short a time, and we should wait more? [17:04] but I'm a snapd person not a snapcraft person so I may not be fully used to how things are done on the build side [17:04] Trel: please ask kyrofa_, sergiusens or kalikiana as they know this code inside out [17:04] Chipaca, I don't know if it is the problem [17:04] Chipaca, we could try [17:05] Can I run the snap it generates without installing it to see what it does? [17:05] wait more time and see if the problem is this one [17:05] Trel: yes, (well), "snap try" does that [17:05] it is like "snapcraft && snap install *.snap" but much faster [17:05] Hey there Trel [17:05] as long as you don't change snapcraft.yaml (or meta/snap.yaml) you can also change the snap in your source tree live [17:06] needs sudo to try? [17:06] yes [17:06] or sudo snap login [17:06] then snap works without sudo [17:07] Trel, indeed, as zyga was saying the nil plugin literally does nothing. You can still use it, but you'd have to do all the copying yourself, whereas the dump plugin sounds more like what you want [17:07] ("take this tarball and dump it all into the snap") [17:07] * zyga hugs kyrofa_ [17:08] kyrofa_: I thought I DID do all the copying, which is what I'm really not getting here [17:09] Trel, let me take a look at the pastebin [17:09] It's taking quite some time to load for me [17:09] and hold on I'll also pastebin a recursive ls [17:09] there a better pastebin site? [17:10] Trel, mind using pastebin.ubuntu.com? [17:10] About as simple as it gets [17:12] Trel: there's a pastebinit command that helps :) [17:12] Dir listing: https://pastebin.ubuntu.com/p/Dx7G84c7V4/, snapcraft: https://pastebin.ubuntu.com/p/Y22k9QpD7V/ [17:12] I think the "filesets" is confusing there [17:13] its meant to help organise how a given part contributes to the snap [17:13] not how to install files in general [17:13] jdstrand: is that code sensible? [17:13] jdstrand: I have some cleanups on top of that [17:14] mainly error handling that's nicer [17:14] zyga: I haven't had a chance to look at it yet [17:14] hopefully in a bit [17:14] ack [17:14] thank you :) [17:14] but what is the RIGHT way to do it, I've found a lot of ways that aren't working >< [17:14] Trel, yeah, so you have a good start here, but you're using some more advanced features (filesets) without actually doing the basics. So let's start simpler [17:15] Trel, you have a bin directory that you want in the snap, right? [17:15] yes [17:15] You can do that in two easy ways [17:15] And if it's doing it virtually, I'd prefer that it considers it /usr/bin but that's not necessary, thought it would be good in the case of libraries that I can't reloacte [17:16] *relocate [17:16] One is using the dump plugin like this: https://pastebin.ubuntu.com/p/zhDMDmDBBS/ [17:17] Saying "copy the root of my project (which only contains the bin directory) into the snap" [17:18] What about with nil? [17:18] The other one, which I don't recommend but illustrates that the nil plugin isn't doing anything for you, looks like this: https://pastebin.ubuntu.com/p/GnDjR9Fb8T/ [17:19] But where should I be putting the binary directory in that case [17:19] Both accomplish the same thing with the bin directory in the place you have it now [17:20] And both place it into the root of the snap [17:20] If you want to reorganize it, you can copy it to a different place using the nil plugin, or you can use the `organize` keyword with the dump plugin [17:22] kyrofa_: except where I have it now, with nil, doesn't work [17:23] Trel, even using the code I gave you? [17:24] Wait, I'm confused, does nil do nothing or does it execute that line? [17:28] I tried both ways, I get a snap, but it doesn't run [17:28] mborzecki: hey [17:28] mborzecki: small review on #5256 [17:28] PR #5256: cmd/libsnap-confine-private: helper for extracting store snap name from local-name [17:28] Trel: does it contain the files you expected? [17:29] I think so, and running them from /snap/qrencode/x1/bin/ works [17:29] excellent [17:29] nope [17:29] what does your binary link with? [17:30] you need to bring those dependencies into your snap [17:30] should just be libpng was the only non-static part [17:30] cannot perform readlinkat() on the mount namespace file descriptor of the init process: Permission denied [17:30] that's what I get when I try to run it normally [17:30] Trel: hmm, what is your "snap version"? [17:30] and can you paste "dmesg | grep DENIED" [17:30] 2.32.8 [17:31] Trel: please provide the rest of the version output, it's useful [17:32] dmesg: https://pastebin.ubuntu.com/p/FcwChNF28V/ version: https://pastebin.ubuntu.com/p/HHzBvMWBQN/ [17:33] kernel 3.13.0-35-generic this is unusual [17:33] or maybe I'm forgetting what's in xenial [17:34] is this a cloud machine? [17:34] you should be on a 4.4 kernel [17:34] not on a 3.13 one [17:34] nope, machine I built a while back [17:34] 3.13 won't work AFAIR [17:35] but snapcraft does [17:35] xenial ships with a 4.4 kernel, did you update from 14.04? [17:35] (aka trusty) [17:35] I may have [17:35] it's been a while [17:35] Is there a way to check that? [17:35] can you update all of your packages, including the kernel and then reboot [17:36] you should see a boot selection if you have multiple kernels [17:36] but the most recent one should be default [17:36] unless you changed that [17:37] mvo: should we add minimum kernel detection to self-tests? [17:38] mvo: I think this could be perhaps, somewhat disruptive [17:38] but I think it would be worth it [17:38] The server is remote to where I am. I won't see the boot screen. I can do all but that part (in that way). I'm looking right now at grub.cfg and don't see any entries referencing 4.x? [17:39] BTW, apt doesn't seem to be offering a kernal update [17:39] Trel: you can install linux-image-generic, that should pull in the right kernel [17:40] yeah, I'm about to try that, that will boot me from IRC though when I reboot, I'm going to quit now gracefully prior to doing this, be back in a bit [17:41] PR snapcraft#2154 opened: tests: disable sentry [17:48] zyga: can we detect this reliable? [17:49] mvo: well, we can do some things that are smart, e.g. recommend a reboot when using ubuntu 14.04 and 3.13 kernel, say that 2.x kernels are not supported and a few others [17:49] I'm looking at your self-test PR as base, let me post some RFC ideas [17:54] I think the kernel bit worked [17:54] I need to try the build again [17:54] Trel: excellent [18:02] Ok, one thing to ask before I try testing, if I have a script, that refers to a binary in the snap, how does the path relate inside? [18:09] Trel: you can use the $SNAP variable [18:09] it refers to the top-level directory in your snap [18:09] so if your snap has bin/someniceapp to run [18:09] you can have your wrapper script run $SNAP/bin/someniceapp [18:11] mvo: this is what I was thinking about https://github.com/snapcore/snapd/pull/5260/commits/50119c96a87952b4af92a8d224cece1bc90e292a [18:11] PR #5260: sefltest: advise reboot into 4.4 on trusty running 3.13 [18:11] mvo: but the concept can be extended into new areas [18:11] PR snapd#5260 opened: sefltest: advise reboot into 4.4 on trusty running 3.13 [18:11] like flagging ancient openvz kernels that don't work [18:12] since it is restricted to classic it should not harm any product kernels that may have kept old version id but have all the extra patches that make snaps work [18:12] ok, let me try that, if it works, is there anywhere I can the resulting snap file assuming it works on my machine? [18:13] Trel: just ensure that you run your snap as "snap run yoursnapname" [18:13] as running the binary from /snap/yoursnapname/bin/whatever doesn't really use snaps [18:13] once your snap works you can share it with a friend for quick testing [18:13] or register the name on the store and upload it there [18:13] (the binary that is) [18:13] snapcraft has commands for all of that [18:15] I added /snap/bin to my path, is that the same as snap run? [18:15] Trel: yex [18:15] yes, exactly the same [18:15] if you look at what is in /snap/bin [18:15] I THINK it's working [18:16] you will find symbolic links to /usr/bin/snap [18:16] which detects this and behaves as if you ran "snap run" [18:17] ah, so I should now try it with strict mode I'm guessing [18:17] for strict mode you will need to start using some interfaces, [18:17] switch your snap to strict mode (confinement: strict) [18:17] re-build it [18:17] install it [18:17] and see what happens when you run your app [18:17] but congratulations, in development mode your application is already a snap :D [18:19] What do you mean by interfaces in this case? [18:20] Trel: snapd interfaces are a system that allows to change the set of things that snaps can run and to allow snaps to work together [18:20] https://docs.snapcraft.io/core/interfaces [18:20] https://docs.snapcraft.io/reference/interfaces is also useful [18:21] I'll give them a look, though I'm not sure how necessary they'll be for this one [18:21] Trel: it depends on what your snap does [18:21] PR snapd#5261 opened: tests: wait more time until snap start to be downloaded [18:22] In my case, it uses a pre-compiled binary, with a wrapper script. I will try later to have it compile it rather than use a pre-compiled one [18:22] it's wrapping this specifically: https://github.com/fukuchi/libqrencode [18:24] Trel: it's not about the binary being precompiled or not [18:24] it's about what the resulting process tries to do [18:25] which system calls it wants to access, which files it wants to access, which IPC system it wants to access [18:25] it is all about runtime [18:25] I'm not sure how'd I'd even determine that let alone work with it [18:25] Trel: you run your app and see what happens [18:25] we have tools and people that can help [18:26] it ran [18:31] which is to say, I have no clue if that means I'm done or there's something else I'd need with what you're saying about interfaces? [18:32] Trel: interfaces allow snaps to do things, at runtime, that are not allowed by default; if your application was never confined it could do anything it wanted. [18:33] the App Store model is built on confinement so untrusted applications can be used without code review [18:33] as long as the set of permissions they have is understood and managed [18:33] that's what interfaces allow [18:34] if the confinement system gets in the way from accessing some critical resource then you will need to look at interfaces for solutions [18:35] Since my wrapper script passes text either as a parameter or piped in, and the result is just spit to the terminal, I'm guessing it doesn't apply for this usage? [18:35] almost [18:35] piping things means the process inherits a file descriptor [18:35] it depends on where it is coming from [18:36] but just try it and see [18:39] jdstrand: will you have time for that review today? [18:39] zyga: my today, yes [18:39] jdstrand: thank you, perfect, I will iterate with cleanups on top [18:40] zyga: jdstrand: thanks for the reviews on #5256, pff silly me :/, i've pushed fixes just now [18:41] PR #5256: cmd/libsnap-confine-private: helper for extracting store snap name from local-name [18:42] mborzecki: can you patch tests to ensure that things are correct [18:42] like with the off by one [18:48] zyga: I'm a bit lost there, I've tried it both ways and it works [18:48] without anything else so far [18:48] Trel: that's fine then [18:48] Trel: I'm not sure what your app is doing [18:48] Trel: but if it works, that's what you want :) [18:48] it works, ship it [18:51] taking text as a parameter or piped and generating a QRCode using unicode characters, and outputting it to the terminal (the actual libqrencode can make files as well) but my wrapper is what resticts it ot just doing text [18:53] that should be fine [18:53] it might be more complex if you want to redirect to/from a file in ~/.ssh/secret for example [18:53] but for normal usage it should work just fine [18:54] * cachio afk [18:57] There any way to avoid "Copying needed target link from the system", I'm guessing I'd need to add the package somewhere, but I'm not sure where. [18:58] can you please be more specific, which command gave you that error? [18:59] zyga: i've added more tests, also the temp buffer is filled with some known pattern to check for the code doing proper termination with \0 [18:59] thanks! [19:00] This is if I try to compile it rather than copy the binary directly [19:00] full line is: Copying needed target link from the system /lib/x86_64-linux-gnu/libz.so.1.2.8 [19:01] that's something for kyrofa_ I think [19:02] I thought it was just adding it to build-packages or similar but I can't seem to reference it anywhere that stops that line [19:03] build packages are the packages you need to build [19:03] stage packages are the packages you need to run [19:03] yes, that's to build, not run [19:03] precompiled doesn't seem to need it [19:03] but does your binary link to libz in the end? [19:03] what does ldd say? [19:04] not sure, that I can check when I'm back on the pc [19:05] just run ldd /path/to/your/binary [19:06] Can't run it on my phone >< [19:06] :-) [19:07] (weechat relay, not actually at the machine) [19:08] PR snapcraft#2155 opened: build_providers: support for communicating with a qemu VM [19:18] Trel, that means whatever you're building depends on libz.so, but you're not staging it [19:19] So it takes it from the system instead. You can disable this behavior by adding `build-attributes: [no-system-libraries]` to the part definition [19:19] But then that part will be broken, so I suggest you stage that lib [19:24] jdstrand, what does this review error mean? [19:24] The store was unable to accept this snap. [19:24] - found binaries for architecture 'all' [19:26] (and then it gives a list of stuff) [19:35] This is an `architectures: [all]` snap, does that have something to do with it? [19:35] The error message is very opaque [19:35] roadmr, do you know what that ^ means? [19:43] kyrofa_: let me see [19:45] kyrofa_: testing that out now [19:46] kyrofa_: non-gadget snaps with architectures: all can't have compiled binaries inside, because a single binary to rule all architectures is not possible [19:46] kyrofa_: it should either be arch-specific or not have anything compiled inside (i.e. should contain only interpreted code, .py, .sh, and so on) [19:48] hey guys, i'm trying to build my first snap of mastodon which has a ruby, nodejs, and nginx component. my question is first: can i use a nodejs AND ruby plugin in the same part? [19:49] my second question is, for building ruby packages, I need some extra apt repos for the build-packages. what's the right way to add those? [19:50] roadmr, so it's impossible to ship multiple binaries along with a shell script to decide which to run? [19:50] I thought that was the definition of "fat" snap [19:51] kyrofa_: I see what happened, I forgot I got the pre-compiled one mostly static, that's why it didn't need that lib. Looks like it may be good now [19:52] Trel, well, it looks like it _think_ it needs that lib ;) [19:52] (ldd) [19:55] what's the relation between snappy and snapcraft? [19:55] is snappy a deprecated name? [19:59] snapcraft is the command line tooling that builds snap packages to run via snapd [19:59] snappy ubuntu core is a distribution of Ubuntu that relies entirely on snaps [19:59] kyrofa_: I think so, that's at least the logic in the reviewer tools, jdstrand might definitely know more [20:01] Luke, more and more the entire system is referred to as "Snapcraft" with the CLI tool being known as "the snapcraft CLI" [20:01] Alright, thanks roadmr. jdstrand curious to get your thoughts on that [20:02] cool thanks [20:04] is there a snapcraft specific channel? [20:08] PR snapcraft#2146 closed: project_loader: process parts in consistent order [20:08] Luke, nah, we're all together here! Do you have snapcraft-specific questions? [20:09] yeah 1) can I use multiple plugins for a single part and 2) what's the right way to apt-add-repository for build-packages? [20:09] thanks btw! [20:10] (1) yes, just use the same `source` for multiple parts, (2) this is not recommended [20:11] ok cool on #1. the source is a tar to be downloaded. I'm assuming it will be cached? [20:11] kyrofa_: for #2, it's because I'm trying to build ruby stuff. It needs all these rbenv things (I don't know much about building ruby packages) [20:11] Luke, use the ruby plugin, it'll build a specific version from source [20:12] and the #3 question is actually: I need to run pgsql and nginx as a part of this app, should I just jam that into it's own part? [20:12] Luke, that's up to you, you can ship them on their own, but then they need to communicate with each other somehow. Depending on your requirements, it may be easiest to just bundle everything together [20:13] That way you can update them all in one go as well [20:13] yes I want to bundle all together for sure [20:13] So yeah, just new parts [20:13] just not sure the right way to represent bundling in one snap [20:13] ok thanks [20:13] yeah you're spot on: anything that's supposed to be in the snap is a part [20:13] great [20:14] you've saved me like 3-5 days of experimenting and forum questions :) [20:14] is there any ruby-specific snaps you recommend looking at? it seems the least well-represented in snapcraft given the ruby plugin is in beta? [20:15] is the concept that anyone should be able to run the build part of the snap on any box or is the portability just for the snap once it's packaged? [20:16] I don't know of any off the top of my head, but the idea is that the build process should be able to run in CI, a clean xenial image [20:17] ok thought so. that was my goal [20:17] i just dont know what I'll do about these build deps for ruby then [20:17] rbenv and ruby-build [20:17] https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Production-guide.md here's the build guide i'm following btw if you're interested [20:22] kyrofa_: what file would I be using ldd on in that case? [20:25] Trel, well, you can start with the one in bin [20:25] you're talking about AFTER it builds right? My pre-compiled one is what I'm saying doesn't link to the external version of that file [20:27] One other question, which command for would display the 'description' field. Info (even with verbose) is only showing the summary. [20:47] PR snapcraft#2153 closed: project_loader: allow loading null parts [20:47] PR snapcraft#2154 closed: tests: disable sentry [20:51] roadmr: hi! hey, can you pull r1086? when that is live, we can turn on resquash [20:57] jdstrand: hehe sure! tomorrow, most likely; I've just deployed r1082 [20:58] roadmr: thanks! tomorrow sounds good [22:02] PR snapcraft#2156 opened: snap: use apt from the archive instead of compiling === wxl_ is now known as wxl