IRC logs for #buildstream for Monday, 2018-03-05

*** tristan has joined #buildstream03:55
*** mcatanzaro has quit IRC03:56
*** noisecell has joined #buildstream07:10
*** valentind has joined #buildstream09:00
* tristan now discovered how to make pulseaudio work09:40
* tristan just had to ask valentind, would have saved time :)09:40
*** ernestask has joined #buildstream09:41
valentindWhat about pulseaudio?09:42
tristanvalentind, I've been trying to make `bst shell` more friendly for testing out programs, which is possible mostly only where your host system marginally resembles the stack/runtime you are building09:44
tristanwhich is a typical case for e.g. GNOME devs09:44
tristanSo I found I need to find the pulse server socket, mount it into the sandbox for testing shells, and resolve PULSE_SERVER09:45
* tristan noticed that valentind enhanced this in flatpak recently09:45
tristanvalentind, did you consider running `pactl info` on the host rather than all that intimate knowledge of pulse's config files ?09:46
valentindThe point was to limit dependencies.09:47
tristanyeah, I guess it's sensible to assume that, if the host has pulseaudio at all, it might have a utility that tells you where the socket is09:47
tristanbut, maybe not :)09:47
valentindThe question is can you have a pulseaudio server running without pactl installed.09:49
tristanTrue, I presume you can; a different question is whether you should expect apps to discover the socket without it; the answer is yes I guess since I suppose the expectation is to go through libpulse09:51
tristanvalentind, Then again, a flatpak recommended dependency to distros might be another sane approach09:52
tristani.e. flatpak has implicit knowledge of pulse already (with build-finish --socket="pulseaudio")09:53
tristanSo telling distros that flatpak should imply `pactl info` might also be reasonable09:53
tristanfrankly, I'm just happy that after a day I have audio in `bst shell`, though :)09:54
tristanWell, I'll have to figure out how to make it possible to achieve from a project.conf, but that's all just implementation details09:54
tristanjuergbi, any thoughts on that ? I've already been thinking of allowing project.conf to run host-side shell scripts...09:57
tristanin the case of pulse, a host side shell script would have to A.) discover the location of the socket on the host... B.) set the PULSE_SERVER var in the shell's env09:58
tristanfor GNOME purposes, I suppose that just automated %{uid} expansion in the `host-files`, plus a way to explicitly set env vars allowing %{uid} expansion would "work"09:59
tristanthe assumption that the socket is in /run/user/%{uid}/pulse is not entirely horrible for this purpose09:59
juergbiwouldn't it be better to allow expansion of host XDG_RUNTIME_DIR?10:00
tristanI dont know if that is always set, though10:00
juergbithere might be a default, have to check the spec10:01
tristanflatpak checks it, and I followed the g_get_foo..() API path and... says that defaults to the cache dir10:01
juergbiIf $XDG_RUNTIME_DIR is not set applications should fall back to a replacement directory with similar capabilities and print a warning message10:01
juergbiquote from the spec10:01
tristan g_get_user_cache_dir()10:01
juergbigiven that a warning is specified in the spec, all reasonably set up systems should have it set10:01
tristanThe above is from the g_get_user_runtime_dir() docs10:02
juergbiand there is no clear default10:02
juergbimaybe we should allow a host script to generate env variables10:02
juergbicould be sensible10:03
tristanyeah, I guess just supporting $ENV var expansion in `host-files`, and also addition of explicit env var assignments, also with env var expansion support, would work10:03
tristanallowing host scripts to run for customizing `bst shell` behavior I think is a good idea too10:03
tristanbut maybe as a further step10:04
tristani.e. I can mostly say "Hey, GNOME apps run with audio and video in the `bst shell`" with not too much work10:05
tristanwhich would be nice to say... like tomorrow :D10:05
juergbi:)10:07
*** tristan has quit IRC10:10
*** tiago has joined #buildstream10:13
juergbijmac: is it just not clear that the discussion maps to the examples or are the examples themselves still unclear?10:18
juergbiand yes, in each file the added 'build:' node is a toplevel node in the file10:19
jmacThe example is clear, the discussion is not10:19
* juergbi wonders what's so unclear in the discussion10:20
jmacWhen you say 'toplevel' I imagine project.conf at the top and element files underneath that10:20
juergbiah ok, with toplevel i mean with respect to a particular yaml file10:20
jmacNow I think you mean a key in each file10:20
juergbiyes10:20
jmacAlso the decisions (e.g. why this needs to be a new tree, rather than v10:22
jmacariables or config)10:22
jmacI'm sure you and tristan have a clear model of this in your head, but it's not getting through to me10:22
juergbi'config' is completely in the hands of Element subclasses. the buildstream core doesn't define the structure of it10:23
juergbiwhile some Element subclasses (BuildElement and ScriptElement) aren't plugins, we still maintain a separation between the core (Element itself, Project, Context, etc) and the different Element kinds (subclasses)10:24
juergbithis is a policy decision and it's not obvious purely from the name 'config:', of course10:25
juergbibut i hope it's starting to make a bit more sense to you10:26
juergbias the uid of the sandbox should be affected for all sandbox invocations (incl. integration handled by core Element), this can't be implemented solely in Element subclasses10:27
juergbiand thus the configuration also needs to be placed appropriately10:28
juergbihowever, i think it anyway fits well with the future expected execution environment configuration, as hinted in the example10:28
juergbiso it anyway makes sense to be core config, imo10:28
jmacDefinitely don't call something 'config' if it's not allowed to be in a yaml key called 'config'10:29
juergbiwell, whole project.conf is a config file...10:29
juergbithe name of the 'config:` key may not be ideal10:30
jmacWhy are Buildelement and Scriptelement not plugins, btw?10:34
*** valentind has quit IRC10:37
jmacPerhaps calling 'config' something like 'element-config' would make it clearer, I can understand why you wouldn't want to change it now though10:39
juergbiactually not sure anymore. we shouldn't really be poking internals. there was an issue with subclassing across plugins, iirc. don't remember whether this was the reason10:39
juergbiyes, i can understand the confusion but i think it's indeed too late to change now10:39
jmacI don't really see why you should not have a config in project.conf and have elements override it; that doesn't require any element to take any notice of the project-wide config unless it wants to10:40
juergbiwould also have been a possibility but adding core 'config' to 'config:' now would lead to inconsistency10:41
juergbiwe should follow existing core 'config' such as the 'environment:' dict10:41
juergbidoesn't make sense to increase the confusion10:41
jmacWell, that's another possibility - we could use 'environment' or 'variables' and save having another top-level key10:43
juergbiif we couldn't think of any future uses of the new top-level key, we could consider it. however,10:45
juergbia) pretending for uid/gid to be env. variables wouldn't be ideal10:45
juergbib) as per my example, i expect we will need further configuration possibilities that fit in there (execution environment such as os and arch)10:45
juergbithis will allow building freebsd packages from a linux bst client using a VM or remote worker that runs freebsd10:46
juergbiand that's why i think a new top-level key is sensible10:47
jmacI'll wait and see if tristan has any opinions10:51
tlaterHrm, still struggling with glib/ostree :|11:32
tlaterI think I finally managed to figure out how the diff_dirs interface is supposed to work11:33
tlaterBut it doesn't do what I expect it to11:33
tlaterI have this: https://pastebin.com/fs2icm2D11:33
tlaterNow, as far as I understand, if I give this two refs that point to different trees, I should get some values in modified, removed and added11:33
tlaterI try that, and despite them having different checksums, I get nothing in the arrays :(11:34
* tlater suspects he needs something fancier than lists, but can't find what that would be in the pygobject docs11:38
jmacDoes anyone have any thoughts on how continuous benchmarking should work when we have two repositories? Can we have the main BuildStream repository use the benchmark repo, for example?11:43
tlaterHm, when we did that for tests it got quite messy. Might be more appropriate here though.11:44
juergbijmac: not sure. if the idea is to benchmark the older buildstream versions with newer benchmark repo versions as well, shouldn't it be the other way around?11:45
juergbialthough we would still want to trigger it on main repo updates, of course, hm11:46
jmacYeah, triggering is the main thing11:46
aidentlater, looks like you have to pass different argument types to diff_dirs11:46
juergbitlater: it's also possible that the ostree introspection annotations are incomplete/incorrect11:46
aidenhttps://lazka.github.io/pgi-docs/OSTree-1.0/functions.html#OSTree.diff_dirs11:46
juergbithe question is whether pygobject properly handles the mutation of the lists11:47
tlateraiden: Well, three different types of lists, unfortunately that doesn't map to python typing11:48
tlaterUnless I misunderstand you11:49
juergbii suspect it's only marshalling (empty) python list to GPtrArray but not the other way round with this binding11:49
tlaterI honestly have no idea how I'd get around that11:49
*** jennis_ has quit IRC11:50
tlaterHrm, I suppose I should read into the pygobject source :|11:50
juergbii can try and take a look11:50
juergbibut feel free if you like :)11:50
tlaterHeh, would you mind *also* taking a look, juergbi? I suspect it will take me quite a while to find an answer on my own here.11:52
juergbisure, i'm already familiar with g-i. or rather, i was, it's been a while11:52
aidenok, excuse ignorance, i guess that you're not using this Gio thing11:55
tlateraiden: I am for the other parameters - well, kind of. The root_{a,b} variables contain OSTree.RepoFiles, which are subclasses of Gio.File11:58
aidenbut OSTree.DiffItem and Gio.File seem to be python types11:58
tlaterAnd from the c code I'm pretty sure OSTree.RepoFile is supported11:58
tlaterThe only types I'm not sure about are those lists - as juergbi says there's probably a gotcha to be found in the source code somewhere11:59
juergbithe gobject-introspection test cases don't seem to cover that usage12:00
*** mcatanzaro has joined #buildstream12:00
juergbialso see no other examples where mutable arrays are used as arguments12:04
juergbiit might not be supported by gobject-introspection. wondering whether we could work around it12:04
* tlater recalls python actually creating a copy of lists in arguments12:05
tlaterMaybe I should ask on their IRC channel12:05
juergbinot sure whether pygobject has a lower level API that would allow this or whether the only choices are direct ffi usage or writing a bit of C code12:05
tlaterjuergbi: I think if we're going that far it's best just to roll our own12:06
tlaterThere are enough methods to help traverse these trees12:06
juergbiyes, if this is all exposed (and usable from python) and not a performance issue, sure12:07
juergbimight be worth filing a bug in any case, though12:07
juergbieither for ostree to provide a introspectable API or gobject-introspection to support this API style (if it doesn't yet)12:08
tlaterI'll see what #python says first, I suppose12:08
juergbiyes, or possibly #introspection12:08
aidentlater, at risk of exposing my ignorance further; why can't you just pass arguments of the types in that docs link?12:13
tlateraiden: Python doesn't have typed lists12:14
aiden?12:14
tlaterThe three latter arguments all want mutable lists, into which it writes its results12:14
tlaterFairly common thing in C, iirc12:14
tlaterBut C lists have types12:14
tlaterPython lists don't12:14
tlaterSo, in C, you'd have a [Gio.GFile], in python you'd have a [] that happens to contain a Gio.GFile12:15
tlaterI *can't* supply a typed list12:15
juergbithe C list doesn't have types either12:16
aidenwhy can't you just instantiate one OSTree.DiffItem and two Gio.Files and then pass them as `modified, removed, added` respectively?12:16
tlateraiden: Ah, you're missing the arrays ;)12:17
juergbiGPtrArray simply stores pointers (well, it does have an optional element free func)12:17
tlateraiden: If you have a close look at this: https://lazka.github.io/pgi-docs/OSTree-1.0/functions.html#OSTree.diff_dirs12:17
tlaterYou'll see that the modified, removed and added arguments are lists12:17
aidenaff12:17
tlaterNot OSTree.DiffItem/Gio.File12:17
aidensorry12:17
aiden_o_12:17
* tlater really needs to look into gobject for C code - the library seems to make a whole lot of things a lot nicer :)12:18
* juergbi won't mention Vala ;)12:19
*** jennis has joined #buildstream12:35
*** xjuan has joined #buildstream13:00
jennisHi guys, I can't seem to get the new style tests to pass for dpkg-build13:10
jennisI'm getting this error: https://paste.gnome.org/p3nquma8w13:11
jennisHas anyone got any ideas?13:11
tlaterjennis: Looks like you need to add the gnome gpg key13:13
tlaterThat is, this file: https://gitlab.com/BuildStream/buildstream/blob/master/tests/integration/project/keys/gnome-sdk.gpg13:14
tlaterjuergbi: Looks like gi plain doesn't support mutable lists as arguments13:16
juergbi:/13:17
* tlater already started on rolling his own function though, it seems possible enough13:18
*** xjuan_ has joined #buildstream13:33
*** xjuan has quit IRC13:34
*** xjuan_ is now known as xjuan13:34
*** xjuan_ has joined #buildstream13:37
*** xjuan has quit IRC13:39
*** xjuan_ is now known as xjuan13:39
*** anymous has joined #buildstream14:02
*** anymous has left #buildstream14:03
jennisthanks tlater14:11
jennisTemporary work around is to just cp that into a keys/ dir in bst-external14:11
jennis^ not as big of an issue as copying testutils/ but still should be avoided?14:12
nexusfor the test, i think it's fine to have that there, but i'm not sure14:16
tlaterjennis: definitely not an issue14:20
tlaterTestutils is special because it *can* be avoided, since it's a python module in Buildstream, which is installed in bst-external's runner anyway.14:21
*** jennis has quit IRC14:33
*** noisecell has quit IRC14:33
*** tiago has quit IRC14:34
*** jennis has joined #buildstream14:34
*** noisecell has joined #buildstream14:34
*** tiago has joined #buildstream14:35
*** jennis_ has joined #buildstream14:59
*** tiagogomes has joined #buildstream15:00
*** tiago has quit IRC15:00
*** jennis has quit IRC15:00
jmacHaving some weird problems with docker in the benchmarks repository15:06
jmacIt seems to think 'client.images' is a function rather than an object15:06
jmacProbably a docker thing but wondered if anyone involved in the benchmarks repo had seen that15:06
jmacChanged between 1.9.0 and 3.1.0 apparently, I'll add that to the docs15:23
tlaterDo I actually have to clean up Gobject variables in python?15:43
* tlater can see this make sense, but still feels weird calling fre()15:43
tlaterfree()*15:43
jmacI just removed bst-external from the benchmarking setup, and it still seems to build baserock without any problems. Does anyone know why it's there?16:38
juergbitlater: no, i don't think this should normally be necessary, but there may be exceptions16:59
*** xjuan_ has joined #buildstream18:19
*** xjuan has quit IRC18:19
*** xjuan_ is now known as xjuan18:22
*** toscalix has joined #buildstream18:42
*** valentind has joined #buildstream19:26
*** toscalix has quit IRC19:30
*** toscalix has joined #buildstream19:30
*** Prince781 has joined #buildstream19:40
*** Prince781 has quit IRC20:15
*** toscalix has quit IRC20:30
*** xjuan has quit IRC21:46
*** valentind has quit IRC22:21
*** ernestask has quit IRC22:35
ssssam[m]jmac: it's needed to build the systems/minimal-system-image-x86_64.bst target22:41
ssssam[m]jmac: originally I wanted to benchmark building that target instead of just stage1-binutils, but I hit https://gitlab.com/BuildStream/buildstream/issues/27022:42
*** toscalix has joined #buildstream23:13
*** toscalix has quit IRC23:35
*** toscalix has joined #buildstream23:39

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