IRC logs for #buildstream for Tuesday, 2017-02-21

*** xjuan has quit IRC03:19
*** csoriano has quit IRC04:04
*** tristan has quit IRC06:05
*** tristan has joined #buildstream06:39
*** ChanServ sets mode: +o tristan06:46
*** csoriano has joined #buildstream09:15
* ironfoot fails to use bst shell09:48
ironfootcurrently doing: `bst shell -b /root/buildstream/build/usbutils-c8lvnccq elements/foundation/usbutils.bst`09:48
tristanironfoot, yeah I was there too09:56
tristanironfoot, I dont understand yet what went wrong, been looking at busybox / bash artifacts from baserock / buildstream09:57
tristanironfoot, fwiw, /usr/bin/ldd exists, and it has this at the top: #! no09:57
tristanmaybe I should check glibc artifact09:58
tristanironfoot, however what I noticed is that when /bin/sh is a link to bash, usbutils passes09:58
tristanso I was wondering if perhaps in baserock at that stage, /bin/sh was bash instead of busybox09:58
ironfooti believe that /bin/sh was always busybox10:00
tristanOk10:00
tristanis there a /usr/bin/sh that is bash ?10:00
tristanbecause PATH has /usr/bin before /bin10:01
ironfootnope10:01
ironfootand /bin/sh is busybox10:01
ironfootif I run manually the bootstrap, i also get "/bin/sh: ./bootstrap: not found"10:02
tristanaha10:02
tristanfound it10:02
tristanironfoot, not if you make /bin/sh become bash, though10:02
tristanI tested that... but now I found the bug :)10:03
ironfootplease, tell me :)10:03
tristanironfoot, the problem is (as I suspected in build-essential, where I did needed to do some more hands on converting) with glibc10:03
ironfoot(`sh bootstrap` also "works")10:03
tristanironfoot, so with baserock, /usr/bin/ldd gets generated with #! /usr/bin/bash10:03
tristanwith buildstream, it's #! no10:04
ironfootaha10:04
tristansomething about detecting bash when building glibc10:04
ironfootrings a bell10:04
tristanperhaps its fakebash I got wrong or smth10:04
ironfootaaaaaaah10:04
ironfootyou need fake-bash :D10:04
tristanDo I not have it ?10:04
ironfootlet me have a look10:05
tristannope10:05
tristanhah10:05
ironfootit's there, but not included I guess10:05
tristanAha !10:06
* ironfoot ponders adding a check after building glibc, to see if some scripts have a `no` in the first line10:08
tristanironfoot, I'm rebuilding the world10:08
tristannah I dont think so10:08
tristanwell, up to you but...10:08
ironfootyeah, it will take a while, but that will fix some other broken bits10:09
tristanin any case, the conversion above build-essential being entirely automatic and with no commits is important10:09
ironfootindeed10:09
tristanand nice to see it's going well :)10:09
tristanhehe10:09
tristanironfoot, fwiw I did not encounter your findutils build error10:09
tristanit just built fine here10:09
*** ssam2 has joined #buildstream10:09
ironfoottristan: it worked well when i tried again10:10
ironfootand that is a bit scary10:10
tristanironfoot, so its possible we have an 'incident' which might occur again10:10
tristanyeah10:10
tristanironfoot, one thing I've been keeping a secret, is that the toolchain is not baserock in the triple after bootstrapping (instead it remains 'unknown')10:14
tristanI worked around that with the substitution of $TARGET with $(gcc -dumpmachine)10:15
tristanBut10:15
tristanironfoot, I maintain that whether we fix that problem or not, beyond the bootstrapping process itself $(gcc -dumpmachine) should be used *anyway*10:15
tristanthis makes build instructions more flexible for being built on top of different bases10:16
tristanalso, when we modularize the bst definitions, I dont even want that knowledge of %{target} to exist in depending projects10:17
tristan(core would not have %{target} which is defined in build-essential's project.conf)10:17
ssam2seems fair, i never thought of using $(gcc -dumpmachine)10:19
* ssam2 wonders if llvm/clang supports the same argument10:19
tristanssam2, I would think so10:22
tristanI mean, the compiler is the one who knows about the base runtime10:22
ssam2sure, just wary of hardcoding calls to `gcc` in our definitions -- it means we then have to always use a compiler called `gcc`10:23
ssam2but in practice we do anyway right now :-)10:23
tristanindeed, it could be changed to `cc`10:23
ssam2good plan10:23
tristanironfoot, moment of truth, stage3 glibc is building...10:24
ssam2i guess odd compiler configs (like having to use /opt/foo/xlC) won't be thing with BuildStream because there's no reason to have 2 x C compilers in an SDK10:24
ssam2*won't be a thing10:24
tristanssam2, that doesnt really change much actually10:25
tristanif you want to bootstrap a new runtime, you need the sysroots10:25
tristanwhether your host is your real host, or an imported SDK10:25
ssam2sure, my worry is that assuming `cc` from PATH is always the C compiler you want to use... but anyway, this is miles in the future10:26
tristanmaybe not so many miles :)10:26
ssam2i can imagine some weird legacy components that only build with a weird legacy C compiler, but the rest of your components all build with normal GCC10:26
tristanssam2, I'll test it with `cc` and if it works, we can convert definitions with that subst10:27
ssam2it'll work for Baserock definitions for sure10:27
ssam2anyway, I guess weird legacy components will need special case hacks in any case10:27
tristanSure, in practice every build chooses it's dependencies10:28
ssam2also true10:28
tristanthat will be strengthened by modularization too, but I need to write the recursive pipeline element for that to be possible10:28
tristanironfoot, something went wrong :-/10:31
tristanWe have #! /bin/bash in ldd10:31
tristanbaserock has #! /usr/bin/bash10:31
ironfootwow, bash.bst looks a bit weird10:34
tristanironfoot, yeah :-/10:35
tristanI've been struggling with that, it happens in another thing I'm working with too10:36
tristanruamel issue it seems10:36
tristanhave to figure out the case and work around that10:36
tristanironfoot, if you can figure out in what case the input produces that output, I would be grateful :)10:37
ironfoot:)10:37
tristanthen maybe we can just tweak the string in that case and side-step that10:37
*** leeming has quit IRC10:41
tristanssam2, might know actually10:41
*** ssam2 has quit IRC10:41
*** tiagogomes has quit IRC10:41
ironfoottristan: so, baserock implemented the usr merge, creating symlinks in fhs-dirs10:47
ironfootThen, the bit in bash.morph to make it go to /bin was removed10:48
ironfootThat's why works for them, but not for us10:48
tristandoes it not work for us ?10:48
tristanironfoot, well, I'm getting #! /bin/bash in that script, but I dont know that it 'doesnt work'10:49
ironfootFair10:49
tristanme will know momentarily for usbutils anyway10:50
ironfootThere isn't any /bin/bash in this build environment I was debugging before10:50
tristanNod, so what exactly is the change ?10:51
tristanironfoot, Am I out of date with fhs-dirs in build-essential ?10:51
tristanironfoot, I suspect so, as it failed usbutils again10:55
ironfoot7ae830f1bc4c355eaf76f99655160420edc520e9 in definitions10:55
*** ssam2 has joined #buildstream10:55
ironfootnot many changes really10:55
*** leeming has joined #buildstream10:55
*** tiagogomes has joined #buildstream10:56
tristanssam2, do you recognize this kind of garbage 'occasionally' produced by ruamel: https://paste.gnome.org/ptzrwks57 ?10:58
ssam2you mean the triple quoting ?10:59
ssam2triple escaping rather ?10:59
ssam2I guess the problem is it decided to put the whole line in " quotes10:59
tristanssam2, yeah the escaping stringification10:59
tristanof something that should just appear human readable10:59
ssam2but it already contains \\ quotes10:59
ssam2that looks actually valid, but yeah it's nasty10:59
ssam2you need to convince it to use the correct string representation11:00
ssam2I can't remember off the top of my head how to do that, but it's possible11:00
tristanI was hoping to avoid that11:00
tristanby determining the input characteristic which causes that, and tweaking input to sidestep that research (if thats more convenient)11:00
ssam2not sure.. i mean you pretty much never want to use " quoting for shell commands11:01
tristanwho knows, maybe just prepending a newline would get us out11:01
* ssam2 trying to remember what I used ruamel.yaml for in the past and whether I'll still have the code11:01
tristanyeah, and that stringification almost never happens11:01
tristanjust once in a rand(), ruamel pukes that up11:01
ssam2right11:02
tristanin this case, we will want to have a custom "dumper" anyway11:03
tristanso that might solve it11:03
tristanI.e. with custom dumper we can do cool things like: Put the 'kind:' field at the top of the file11:03
tristan(conversion now gives random dict order)11:03
ssam2shouldn't do...11:04
ssam2that's the main purpose of the RoundTrip loader11:04
tristanssam2, only if you loaded what you're saving11:04
ssam2ah I guess so11:04
ssam2are you setting default_style ? maybe passing default_style='plain' to the dumper would help?11:09
tristancurrently using yaml.round_trip_dump(data, f)11:12
tristanlets see11:12
tristanhah, no that's worse11:13
tristanhttps://paste.gnome.org/pqtezb6iw11:13
ssam2that's done the opposite of what I expected :-)11:31
ssam2maybe 'plain' doesn't mean what I thought it did11:31
ssam2fwiw in the migrations we pass default_flow_style=False11:33
ssam2that was to avoid all the dicts being messed up, but seems that isn't happening in your case anyway11:33
*** paulsher1ood has joined #buildstream11:34
paulsher1ooddid i hear someone say bst can now build gnome from baserock definitions?11:38
tristanpaulsher1ood, _almost_ :)11:38
* paulsher1ood is _almost_ excited, then :)11:38
tristanHaving an issue with usbutils, it looks like the manually converted build-essential needs to be updated for recent changes in baserock11:39
tristanthe good news is, not one manual change so far in the converted output (beyond build-essential) is required11:39
tristanand should not have to be any11:39
paulsher1oodthat is good news... kind of validates the whole premise (yaml ftw)11:40
tristanconversions are successful for two reasons: A.) Structured metadata (YAML) as you mention... and B.) Matching build topologies11:41
tristanironfoot, do you know if that commit is the only one I need ?12:01
tristanironfoot, odd, it didnt do what the commit message said it would12:04
* tristan rechecks12:04
ironfoottristan: hehe, I wouldn't be surprised :P12:05
paulsher1oodtristan: does bst have an equivalent of kbas?12:08
tristanpaulsher1ood, I intend to replace that with a readme of how to setup an ostree repo, but uploading to it is -ENOTIMPLEMENTED yet12:10
tristanit should be as easy as setting up an apache and hosting an ostree repo12:10
paulsher1oodthat sounds harder than kbas :)12:11
ssam2apache can be any web server12:12
tristanWell, setting up apache should be pretty universal knowledge12:12
tristanbut indeed "any webserver" will do12:12
ssam2the idea of OSTree was that the server doesn't require any special daemon, which means you can host an OSTree repo in Amazon S3 or anywhere12:12
tristanthe hope is to have less moving parts, not more12:12
ssam2because it's all just files12:12
tristanright, calling ostree --init-repo on a server and hosting it should be enough12:13
tristanexcept for the push part, we probably want to have it setup so that it recognizes your ssh public key12:13
ssam2providing a script that sets up Python SimpleHTTPServer or something correctly would be handy, maybe12:16
ssam2ostree test suite may already have something usable12:16
ironfootit's going to be quicker to implement than kbas, for sure12:17
* tristan thinks it's more attractive to say "just host this ostree repo" than to say "Install this custom software somewhere"12:22
paulsher1ood+112:22
ssam2yes, the script would just be for "i want to try this out quickly" usecase12:24
ssam2generally if a project's readme starts with "set up Apache", I postpone doing so :-)12:25
paulsher1oodyup... apache would stop me, too12:26
tristannod, a tiny python script is nice, with the headline "We only require that you host this ostree repo", and never mention apache12:28
tristanAnother nice thing, is ostree automatically provides some integrated gpg support12:29
tristannot sure _exactly_ how we can set it up with people who push things, but it means we can gpg verify with a public key on the user's side, that the artifact he is downloading did not get mitm attacked12:30
* tristan shakes fist at ironfoot and jjardon ... usr merge !12:30
tristanheh12:31
tristanlooks like all other commits are build-essential unrelated, only I have to debug why it's not working12:31
tristanstaging something that depends on stage2-fhs-dirs has /bin /sbin /lib /lib64 directories (not symlinks)12:32
jjardontristan: mmm?12:34
tristanjjardon, everything beyond build-essential was basically building with an auto-convert, except now I have to adjust my build-essential adaptation because, usr merge12:37
ironfoottristan: not my fault :/12:40
tristannah, it's most likely mine for one reason or another12:41
ironfoottristan: is there any kind of metadata in the filesystem? something like in baserock, the baserock/ folder?12:42
tristannope12:43
tristanIt may have to do with how we stage things...12:43
tristanand symlinks...12:43
ironfootso, I've tried also to convert those changes to buildstream-tests12:43
ironfootand yes, it only seems to be missing the symlinks12:43
tristanright I have a ported build-essential branch too12:44
ironfootexecvp /bin/sh: No such file or directory ?12:44
ironfootwell that's the error I have when fhs-dirs starts building12:45
tristanironfoot, I have it on linux-api-headers, but I have some local changes staged in buildstream12:48
tristannamely, dont assume the location of the shell12:48
tristanstage2-fhs-dirs artifact is correct, staging it is incorrect12:58
* tristan thinks he has fixed it13:31
tristanbut checking13:31
* ironfoot wonders what was it13:32
tristanironfoot, it's all to do with staging and symlinks13:33
tristanwhich ironically, is something I spent last weekend fixing in ybd13:33
ironfootbut I thought that symlinks were needed in other parts to make it all work13:34
tristan(albiet, for a crazy system which puts symlinks in weird places, and stages broken symlinks to libraries inside libdirs)13:34
tristanironfoot, not so far it seems13:34
ironfoot:)13:34
ironfootping me whenever you push the fix13:35
tristanOk think I got it13:49
* tristan stages commits13:49
tristanmhmmm14:05
tristanOk so, order of listed dependencies, should be meaningful ? or not meaningful ?14:05
* tristan had followed juergbi's advice that they were not meaningful, allowing one to change the list without effecting cache keys14:06
tristanhmm, yeah I think that is right14:08
tristanorder of staging should be explicitly declared through dependencies14:08
tristanWhich means, things which are meant to be staged *after* stage2-fhs-dirs, *must* depend on stage2-fhs-dirs14:08
tristaneven if they dont really depend on that14:09
tristanI suppose, just "run" depend is enough for that expression, though14:09
*** xjuan has joined #buildstream14:31
tristanwow14:38
tristanOk finally I got it14:38
paulsher1oodis 'wow' a good thing?14:39
tristannope14:44
tristanwow is, I just spent all of sunday on symlinks, its a hard problem14:44
tristanand now I have to make the same fixes here14:45
paulsher1oodhah!14:45
paulsher1oodshould be faster second time around :)14:45
tristanYeah, and now discovered another problem :'(14:47
tristanthis one was wrong for a while but it never mattered (or reared it's ugly face) until now14:48
tristanelement.dependencies() returns direct dependencies first and then descends14:48
tristanwhich is wrong if what it depends on directly is also depended on by another dep later in the lst14:49
tristanlist14:49
* tristan thinks a proper tsort may be needed14:49
*** tristan has quit IRC14:58
*** tristan has joined #buildstream15:30
*** ChanServ sets mode: +o tristan15:30
*** csoriano has quit IRC15:56
xjuanhmm for build deps, yeah you need a topological sort16:39
xjuanhttp://en.wikipedia.org/wiki/Topological_sorting16:39
xjuanhttps://git.gnome.org/browse/glade/tree/gladeui/glade-tsort.c16:39
tristanxjuan, :)16:39
xjuan:D16:39
tristanyeah it works properly already for build order, but not for stage order16:39
tristanthat's an oversight16:39
tristani.e. in buildstream jargon, staging means copying in the DESTDIR results of various make installs of each dependency16:40
tristanxjuan, and this only really makes a difference when 2 packages provide the same file, OR, when staging across symlink directory boundaries16:40
tristanso anyway, I've been wanting to unifiy some of the code, we have reliable build order, and we have a sort by depth16:42
tristanand we also have staging order16:42
tristanI want these to all be with the same loop16:42
tristanhopefully16:42
tristanwill look into it tomorrow16:43
xjuanright16:44
xjuanso tsort usually has multiple valid results16:45
xjuanso if you want it to be consistent, you have to sort the input first16:45
tristanyes, but its desirable for the result to be constant16:45
tristanand the input is sorted at load time already :)16:45
xjuanok thats good16:46
tristanbut its also tricky because of build vs runtime dependencies16:46
tristanso, dependencies can be one, the other, or both16:46
tristanand only runtime dependencies are transitive16:46
tristanin any case thats not *too* tricky, but the dependencies for any given element need to be calculated separately16:47
tristan(cant have one tsort of everything)16:47
tristan(well that wouldnt make sense anyway)16:48
tristanin case it's of interest; this is what needs fixing: https://gitlab.com/tristanvb/buildstream/blob/master/buildstream/element.py#L10916:50
tristanand this does something almost suitable: https://gitlab.com/tristanvb/buildstream/blob/master/buildstream/_pipeline.py#L4416:50
*** ssam2 has quit IRC18:25
*** xjuan has quit IRC23:07

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