IRC logs for #buildstream for Wednesday, 2017-09-27

*** tristan has quit IRC03:26
*** jude has joined #buildstream08:00
*** tlater has joined #buildstream08:18
*** jonathanmaw has joined #buildstream08:39
*** ssam2 has joined #buildstream09:10
jonathanmawI'm getting errors when I try to build that seem to be caused by project.conf not having a host-arches field. (stack trace from https://pastebin.com/1VejnNxK)09:15
jonathanmawlooking at the code, my first guess is that project.conf's format has changed, and the sam/buildstream-bootstrap doesn't convert it properly any more, but buildstream-tests doesn't seem to have made the host-arches field mandatory, so I'm guessing not.09:16
jonathanmawI went into the code and made sure it checked a field exists before it tries to delete it, and then it managed to finish loading the elements, but hangs when checking elements09:17
jonathanmawso I suspect there's something going wrong when loading the elements09:18
ssam2project.conf should have arches, not host-arches09:26
ssam2must be a recent regression, anyway09:26
ssam20a4f05f6a0486d6a58a83d50e9b607ddb747befe has worked fine for me09:27
jonathanmawI'll try that commit out and cross my fingers :)09:29
*** semanticdesign has joined #buildstream09:30
ssam2latest commit of buildstream works for me too09:43
jonathanmawssam2: yep, and the commit you linked has the same problem for me.09:50
jonathanmawssam2: do you know how buildstream figures out the arch to pick one of the items in host-arches, by the way?09:52
ssam2the --host-arch argument09:52
ssam2which defaults to the --arch argument09:52
jonathanmawI'm not sure whether I should be adding a field named "aarch64", "armv8" or "armv8l64"09:52
ssam2which defaults to $(uname -m)09:52
ssam2buildstream itself has no notion of architecture name09:52
ssam2baserock defines the moonshot's arch as "armv8l64"09:53
ssam2but (maybe this is the issue?) if `uname -m` reports something different you'll need to run `bst --arch=armv8l64`09:53
ssam2when building etc.09:53
jonathanmawseems not , unfortunately.09:54
ssam2ok09:54
jonathanmaw`bst --host-arch=armv8l64 build gnu-toolchain/base.bst` is still giving me KeyError: 'host-arches'09:54
ssam2weird09:54
gitlab-br-botpush on buildstream@cross_platform (by Tristan Maat): 1 commit (last: .gitlab-ci.yml: Add fallback integration tests to CI) https://gitlab.com/BuildStream/buildstream/commit/7d57ea24a63374520d28be7c9c4624423036907609:56
gitlab-br-botbuildstream: merge request (cross_platform->master: Cross platform) #81 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/8109:58
adds68Could anyone point me in the direction of what i could build using bst as a first time project?10:21
adds68Something preferably small so i can get a hang of the syntax and commands?10:21
ssam2i can only point you to baserock. it's not small though :-)10:23
tlaterTristan has told us to build this for testing: https://gnome7.codethink.co.uk/gnome-modulesets.git/10:23
tlaterAlso not small, but I end up just repeatedly building base/ninja.bst10:23
tlaterYou'll find the size doesn't matter much because you can specify individual elements :)10:24
adds68Thanks guys, i shall take a look10:26
adds68tlater, any idea on where to start with building the modules, any guides?10:28
tlaterThere's the buildstream documentation, and bst --help.10:28
tlaterAh, also this blog post: https://blogs.gnome.org/tvb/2017/06/01/continuous-bst-conversions-of-gnome-modulesets/10:30
adds68thanks :)10:32
gitlab-br-botpush on buildstream@cross_platform (by Tristan Maat): 1 commit (last: .gitlab-ci.yml: Add fallback integration tests to CI) https://gitlab.com/BuildStream/buildstream/commit/bd1edb840350fd21916e107cf0737f5d14929bc411:40
gitlab-br-botbuildstream: merge request (cross_platform->master: Cross platform) #81 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/8111:41
*** tristan has joined #buildstream12:06
tlatertristan: Still not sure what your time zone is, do you mind touching on a few of the comments on cross_platform?12:21
gitlab-br-botpush on buildstream@sam/embed-fusepy (by Tristan Van Berkom): 4 commits (last: bst push: Check connectivity to cache before trying to push) https://gitlab.com/BuildStream/buildstream/commit/0cf6c6bcd8e69554872b05efb267f5530a6b86d412:21
gitlab-br-botbuildstream: merge request (sam/embed-fusepy->master: Embed fusepy and add support for ppc64 platforms) #95 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/9512:21
tristantlater, shoot :)12:24
tlaterOn this comment: https://gitlab.com/BuildStream/buildstream/merge_requests/81#note_4145944812:24
tlaterI simply removed it because it was annoying me and forgot about it x) Supposedly this should check for the version at least in setup.py12:25
tlaterBut how exactly should it react if we don't find ostree - do we warn somewhere, perhaps even when running buildstream?12:25
tristanYup, so - I asked where it ended up, suspecting you left it out but thinking perhaps it might have become a runtime check12:25
tristanit's a good question12:26
tlaterAlso, checking for the version when running buildstream is probably not a bad idea - just in case we bump version requirements or something12:26
tristanNow, I think the way you have it setup, at the time you look for a platform; you are doing some checks for what is installed instead of checking the os with python12:26
tristanWhich is also a bit weird, and somewhat related to this12:27
tristanI.e., it's not really a great idea to say; oh well, you didnt install bwrap so I'll just require you be root and use chroot12:27
tristanit's better to say: You are on linux, get off your ass and install the requirements12:28
tlaterHeh. Should they still be hard requirements though, given that buildstream can run without those requirements if need be?12:28
tristantlater, what you say about runtime checks and upgrades is practically true; but I dont want to care about that honestly12:28
tristanI.e., people are currently running from gits12:29
tristanBut they should be installing releases12:29
tristanWe havent made any releases yet, of course12:30
tristanbut conceptually speaking, I can't really vouch for a version in the field unless it's a release, nor should we have to care about developer git checkouts, installing should be an expected step12:31
tristanNext: Should it be a hard requirement12:31
tristanNot necessarily, but if it's optional (which it need not be), it should be a configuration before install12:31
tristani.e. ./configure --with-platform=unix12:32
tristansomething like that12:32
tristanIt should certainly not start behaving differently12:32
tlaterHow would this work in python/setuptools land? I don't think we have anything similar yet12:33
tristansetuptools is horse crap12:33
tristanand since it's certainly not something we need, I am perfectly fine not allowing one to install without the linux requirements, when installing on linux12:34
tristantlater, if someone cares that much about being able to run with tar caches and chroots instead of ostree/bwrap, on a perfectly linux host; they can put in that effort12:35
tristanbut I dont suspect anyone would, and I wouldnt want to recommend that12:35
tlaterAlright, that clears that up. So I suppose add back the setuptools checks, and additionally add a runtime check, as well as detecting the host OS?12:36
tristantlater, on another point; please dont worry too much about configurability of network access in chroot sandboxes; if you can see an easy way to control that; it's nice to have: More importantly is reasonable assumption that at least non-malicious/runtimes build instructions cannot access the network12:37
tristan(where malicious would mean: Does some crazy mounts or writing to dev / proc to attempt to forcibly break out of a chroot jail)12:38
tlatertristan: Heh, that was going to be my next question - there is a reasonably sensible way to do this with ctypes, but exclusively for linux.12:38
tlaterI'd be using unshare for that.12:38
tristanI see, so it doesnt apply here12:39
tristanbecause chroot is specifically for !linux12:39
tlaterThere doesn't really seem to be any cross platform way to deal with this, unfortunately.12:39
tlaterUnless ssam2 has more insights.12:39
tristanHowever, I recall that ybd shells did not generally have network access12:39
tristanwith sandboxlib12:40
tristanAnd looking at the code yesterday, which is not large... I cannot explain _why_ it does not have network access12:40
tlatertristan: atm buildstream shells don't *really* since the host configuration isn't copied. You could certainly force it though.12:40
tristanI want to know that12:40
tristanheh12:40
tlaterI think sandboxlib might have the same 'fix' x)12:40
benbrownby passing --unshare-net to linux-user-chroot12:41
tristanbenbrown, with the chroot backend specifically, though12:41
benbrownAFAIA, there is no network sandboxing with chroot12:42
tristan(to be honest, linux-user-chroot never really worked for me, I would constantly get too many mounts and such)12:42
tristanOk so that's unfortunate; I might have thought that... excluding any network devices from being mounted into /dev would make any runtime running in there unable to use it12:43
tristanand that a malicious runtime/build instructions might try to mknod one or smth12:44
tristan(and would have to guess that it's the right device for your laptop)12:44
tlatertristan: If that *does* prevent network access, then buildstream already does that.12:44
tristanyeah12:44
tlaterBut I think that processes simply create new network devices.12:45
tristanThis is what I dont know, and would really like to12:45
* tlater probably knows less about the linux networking interface than you do :) I can have a read at least though.12:46
tristantlater, I wouldnt be so quick about that honestly12:46
tristanif there is one area of knowledge I am alergic to... its that12:46
tristanin one ear, out the other12:46
tristanwhat did you say ? you want to have dinner on the routing table ?12:47
tristanok12:47
tlaterIf I ever get bored of programming I'm starting a restaurant whose gimmick is routing tables.12:47
tristanSo... tlater I wont block on that; it's been known to work with YBD, code looks quite similar enough - just make sure there is a note in _sandboxchroot.py about this uncertainty12:48
tristana FIXME comment or such, most important is we keep knowing about this12:48
tristanwhich is why, ideally I would have liked that comment to be an explanation about why this *happens* to work12:49
tristanor such, if we had certainty :)12:49
tlaterAlright, that makes things a lot simpler. I'll see if I can find something on that quickly, and then I should be through your comments - once again.12:50
*** xjuan has joined #buildstream12:51
tlatertristan: Actually, adding network support would probably be possible simply by copying the host /etc/resolv.conf12:51
gitlab-br-botbuildstream: issue #95 ("please provide some real examples") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/9512:51
tlaterShould I add that functionality?12:52
tristantlater, not for now no12:54
tristantlater, lets keep that idea separate; and if we look into that; we'll have to check if it actually works with bwrap12:55
tristanand then if it does, we'll have to wonder *why* it works with bwrap, when the runtime does not have the hosts resolv.conf12:56
tristanso yeah, rabbit hole... too deep12:56
gitlab-br-botbuildstream: issue #83 ("FUSE SafeHardlinkOps filesystem doesn't work on ppc64") changed state ("closed") https://gitlab.com/BuildStream/buildstream/issues/8313:04
gitlab-br-botbuildstream: merge request (sam/embed-fusepy->master: Embed fusepy and add support for ppc64 platforms) #95 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/9513:04
gitlab-br-botpush on buildstream@master (by Tristan Van Berkom): 2 commits (last: Fork and embed fusepy) https://gitlab.com/BuildStream/buildstream/commit/bf0f2863e8cea73e41d5d9efca3126e4075fc3ae13:04
gitlab-br-botbuildstream: Tristan Van Berkom deleted branch sam/embed-fusepy13:04
gitlab-br-botpush on buildstream@cross_platform (by Tristan Maat): 4 commits (last: mount_simple.py: Add mount tests) https://gitlab.com/BuildStream/buildstream/commit/844d25525897efb0d59d2b6994fb3c2f15f8136713:11
gitlab-br-botbuildstream: merge request (cross_platform->master: Cross platform) #81 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/8113:12
gitlab-br-botpush on buildstream@75-source-bundle-generated-script-fails-when-a-build-element-has-no-source (by Tristan Van Berkom): 3 commits (last: Fork and embed fusepy) https://gitlab.com/BuildStream/buildstream/commit/bf0f2863e8cea73e41d5d9efca3126e4075fc3ae13:15
gitlab-br-botbuildstream: merge request (75-source-bundle-generated-script-fails-when-a-build-element-has-no-source->master: build-module.sh.in: Don't attempt to copy empty sources) #97 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/9713:15
ssam2tristan, sandboxlib chroot backend didn't do anything to block network access, but it also didn't copy in /etc/resolv.conf which meant DNS would usually break13:25
ssam2which effectively blocks most kinds of network access that builds would be doing13:25
* tlater was right \o/13:28
tristanssam2, I presume that `bst shell` doesnt really see the network for this same reason13:31
ssam2probably yeah13:32
tristanseeing as we only omit the bwrap --unshare-net13:32
ssam2`docker run` automatically links in /etc/resolv.conf IIRC13:32
ssam2as does `flatpak run`, it seems13:32
tristanbut this is starting to look pretty runtime specific, would be bad for the build tool to start looking at a whole category of bugs in bst shell that are not really relevant to building and debugging13:33
tristanMaybe we should just drop that tentative ability to allow networking from a shell sandbox from the start13:34
gitlab-br-botbuildstream: issue #75 ("source-bundle: generated script fails when a build element has no source") changed state ("closed") https://gitlab.com/BuildStream/buildstream/issues/7513:46
gitlab-br-botpush on buildstream@master (by Tristan Van Berkom): 1 commit (last: build-module.sh.in: Don't attempt to copy empty sources) https://gitlab.com/BuildStream/buildstream/commit/5d5d388e9894c575ecc982caf78e957dab9875d213:46
gitlab-br-botbuildstream: merge request (75-source-bundle-generated-script-fails-when-a-build-element-has-no-source->master: build-module.sh.in: Don't attempt to copy empty sources) #97 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/9713:46
gitlab-br-botpush on buildstream@cross_platform (by Tristan Maat): 9 commits (last: Move sandboxes to separate directory) https://gitlab.com/BuildStream/buildstream/commit/1b029555dded3d2d6b75e988fdb78847a7836fe713:48
gitlab-br-botbuildstream: merge request (cross_platform->master: Cross platform) #81 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/8113:48
tlatertristan: Alright, that concludes the newest changes. With a bit of luck the coverage issue is finally fixed too. Should I open an issue about the networking thing as suggested or is a FIXME enough?13:50
*** semanticdesign has quit IRC13:51
tristantlater, just a comment is fine; I have to think about this networking thing; it may be needed for accessing the local session bus (without needing resolv.conf hacks); which is important for running anything13:51
*** semanticdesign has joined #buildstream13:51
tristananyway, just comment is fine13:51
jonathanmawtristan: do you know if there have been any significant changes to the yaml loading logic? I'm getting errors whenever something tries to delete the "host-arch" field from a dict loaded from project.conf, or host-arch from an element, depends from an element, or variants from an element.13:58
jonathanmawthough it's also perplexing that I'm the only one encountering it with master, too :/13:59
tristanjonathanmaw, your KeyError note I saw in the irc logs... looks like a bug that you managed to reproduce14:00
tristan"deleting a field from a dict" as far as I know, is not something that there is any way to do whatsoever14:00
tristanwhat did I miss ?14:00
gitlab-br-botbuildstream: Tristan Maat created branch 81-non-empty-read-only-directories-not-handled-during-bst-build-and-others14:00
jonathanmawtristan: https://gitlab.com/BuildStream/buildstream/blob/master/buildstream/_loader.py#L178 for example14:01
tristanjonathanmaw, honestly I dont immensely care about a bug with how 'arches' conditionals work, assuming that for right now; if you follow ssam2's instructions it should still work14:02
tristanthat would be because, I'm in the process of nuking those conditionals from existence in favor of more generic project options14:02
tristan(so the fix will be obsolete, hopefully next week)14:02
tristanfor now; using it the way that it works would be better :)14:02
jonathanmawlooking beyond arch conditionals, it also fails to load elements here https://gitlab.com/BuildStream/buildstream/blob/master/buildstream/_loader.py#L41314:03
jonathanmawbecause my "base" element doesn't have any depends14:03
jonathanmawafaict14:03
jonathanmawand it also fails at https://gitlab.com/BuildStream/buildstream/blob/master/buildstream/_loader.py#L25614:04
ssam2note that base.bst has a host-arches switch statement14:04
ssam2which sets 'sources' for that element14:04
ssam2if your --host-arch doesn't match anything in the switch, base.bst will end up with no sources14:04
ssam2and thus buildstream will complain that it can't build it14:04
ssam2it's a bit unintuitive, but i'm not sure how to give a better error in that situation14:05
tristanjonathanmaw, I find that very strange (*every* project starts with an import that has no dependencies), but making like 413 safer is not a bad thing14:05
tristanok looking at 256 which is same thing14:06
tristanit would seem that you have a python that behaves differently on 'del' ?14:06
tristanvery odd, though14:06
jonathanmawpython 3.5.214:06
tristanespecially if this is on the moonshot14:06
jonathanmawyep, moonshot14:07
tristanvery odd14:07
tristananyway yeah, I have 3.5.3 locally and havent seen this14:09
tristanthat is *supposed* to raise KeyError, and never has14:11
tristanjonathanmaw, yeah just fix those sillinesses14:11
tristancant really explain why it's triggering for you and not me, but fixing it is certainly harmless14:12
jonathanmawso far, I've been working off the assumption that it's related to the cause of things going wrong down the line14:12
jonathanmawi.e. I'm currently hanging on Checking elements14:12
jonathanmawI think I've figured out why it was hanging. I was using a source of kind "local", which was a chroot I'd populated to build with.14:29
jonathanmawit has devices set up in /dev, so it was trying to read all of /dev/random14:29
ssam2wow, that's a good one14:30
jonathanmawshall I submit a bug for that?14:30
jonathanmawor is it suitably weird that it's practically forbidden?14:30
ssam2i don't know how to really defend against that14:32
tristannobody would ever do that :)14:32
tristanhehe14:32
jonathanmawhrm, now the build's failing because ruamel.yaml has no attribute 'round_trip_dump'14:40
ssam2your ruamel.yaml is broken, then14:42
jonathanmawyep, going to try a ruamel.yaml installed from pip14:42
jonathanmaw\o/ it's building!14:56
*** jonathanmaw has quit IRC15:01
*** jonathanmaw has joined #buildstream15:01
gitlab-br-botpush on buildstream@cross_platform (by Tristan Maat): 1 commit (last: setup.py: Add note about requirements) https://gitlab.com/BuildStream/buildstream/commit/7ca36931aff4bbf7ca5921889215c4790bbf96de15:27
gitlab-br-botbuildstream: merge request (cross_platform->master: Cross platform) #81 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/8115:27
*** jonathanmaw has quit IRC15:36
*** jonathanmaw has joined #buildstream15:36
jonathanmawaw, build failed at stage2-glibc because gawk was missing from the toolchain I provided15:48
*** tlater has quit IRC16:11
*** ssam2 has quit IRC16:59
*** jonathanmaw has quit IRC17:03
*** semanticdesign has quit IRC19:42
*** xjuan has quit IRC20:15

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