IRC logs for #buildstream for Thursday, 2018-02-22

*** mcatanzaro has quit IRC00:42
*** mrmcq2u[m] has left #buildstream03:24
*** tristan has joined #buildstream08:15
*** tm has joined #buildstream08:18
*** tm has quit IRC08:39
*** tm has joined #buildstream08:40
*** valentind has joined #buildstream08:49
*** toscalix has joined #buildstream08:51
*** jonathanmaw has joined #buildstream09:00
tlaterjuergbi: Regarding #205 (Workspace builds might not rebuild correctly when dependecies are updated), is there anything left to discuss regarding it?09:31
tlaterI don't see any issues with what you proposed on the gitlab issue, but I didn't actively follow the conversation09:31
*** aday has joined #buildstream09:34
*** dominic has joined #buildstream09:59
*** adds68 has joined #buildstream10:04
juergbitlater: i assume you mean #21510:04
*** adds68 has quit IRC10:04
tlaterAck, sorry, yes10:04
juergbii'm not aware of any issues with that per se10:05
juergbihowever, the part with the failed builds feels a bit odd10:06
juergbiadding those files to the workspace metadata10:06
tlaterWhy do we make a distinction between failed builds and successful builds for workspaces anyway?10:07
tlaterRegarding incremental builds, anyway10:08
tlaterIf I understand this correctly, we'll update the timestamps for files from both successful and failed builds10:08
juergbiwe essentially update the timestamps of files since the last successful build10:09
juergbihowever, intermediate failed builds could have involved various changes in dependencies10:09
juergbiand we need those file lists to figure out what files were changed since the last successful build10:10
tlaterRight, I guess there's no way around that then10:10
juergbiwe could handle it closer to regular builds but that would be a big change10:11
juergbiand would depend on incremental build support for non-workspace builds10:12
juergbii.e., just copy files from the workspace into the build tree, don't actually mount the workspace10:12
juergbi(and then cache the build tree same as for incremental non-workspace builds)10:12
*** aday has quit IRC10:13
juergbione issue is the last sentence in my comment. reopening a workspace10:13
*** ssam2 has joined #buildstream10:14
juergbiwe don't currently have a way to force a clean rebuild, afaik10:14
jmacNo10:14
jmacOther than deleting all the refs in ostree10:14
juergbii meant with regards to workspaces10:14
juergbireopening a workspace with a dirty build tree would cause issues10:15
tlaterHm, I suspect that would be difficult to do in general as well10:15
tlaterBecause we can't rely on `make clean`10:15
juergbii was always favoring separating source and build tree for workspaces (handled internally)10:15
juergbithis would also simplify the cache key situation with workspaces10:16
juergbibut without overlay/union fs available, we'd need to physically copy things around10:16
juergbimaybe we should still switch to that approach once incremental non-workspace builds are available10:16
tlaterHow would we handle code-modifying builds?10:17
tlaterI.e., systems that replace @something@ in a shell script or somesuch10:17
* tlater realizes this is awful practice, but spent his weekend working around that in an ebuild file10:17
juergbithe file from the workspace should take precedence10:18
juergbii.e., with such conflicts, the workspace file should win and be staged with updated timestamp10:18
juergbiit might make incremental build slow in such cases but projects should just be fixed10:18
juergbimodifying vcs-controlled files is a big no-go10:18
tlaterYup, that makes sense10:19
jmacBuildStream modifies vcs-controlled files!10:19
juergbiwith explicit track, ok10:19
juergbi;)10:19
juergbibut not as part of bst build without explicit track-save10:19
tlaterMaybe we should rephrase as "modifying vcs-controlled files without user intervention is a big no-go"10:20
tlaterOtherwise simply modifying code counts as a big no-go ;P10:21
* tlater gathers from this that the solution to #215 is more-or-less temporary until we get to implementing a nicer way to separate workspace files from built files10:22
juergbithere hasn't been a decision on this but i'd go into that direction10:23
juergbihaving to stage the sources may be a performance disadvantage for big projects, not sure whether relevant10:24
jmacIs our current release 1.1.0?10:26
juergbidevelopment release, yes10:27
juergbistable is 1.0.110:27
* tlater wonders how one packages something with this versioning scheme10:28
ssam2same as any of the other 1000s of projects that use it10:29
ssam2basically 1.1.x should only ever go in "unstable" distros10:29
ssam2stable distros should have either 1.0.x or 1.2.x (when it arrives)10:29
tlaterI guess bleeding edge distros then just ignore the fact that uneven is considered unstable10:30
*** valentind has quit IRC10:36
ironfootshould we change the topic to point to 1.0.1 then?10:39
gitlab-br-botbuildstream: merge request (jmac/configurable-logging->master: WIP: Configurable log line formatting) #282 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/28210:39
tlaterjmac: I believe you need to enable gitlab's CI runners10:40
tlaterOn your private branch10:40
* tlater wonders if we should make a point about this in Hacking.rst or something10:40
juergbii'd recommend creating branches in the main branch10:41
juergbi*repo10:41
juergbiany contributor will be given access10:41
*** ssam3 has joined #buildstream10:41
jmacI don't think that's appropriate for all contributors10:42
jmacI mean I'm happy for anyone to get access but I don't want to ask permission before I fork and start hacking10:42
*** aday has joined #buildstream10:42
juergbiyou don't have to ask permission to fork it, of course10:42
tlaterJust having a note about this somewhere might help confused first-time contributors10:43
juergbimy recommendation is purely based on being able to use the buildstream CI with cache and allowing rebases in MRs10:43
*** ssam2 has quit IRC10:43
juergbiif someone wants to work in their own repo, that's fine, but it can cause some inconveniences for MRs10:43
jmacDoes CI get me much more than running the tests locally? I've never seen a CI job pass so I'm not sure what it does.10:43
juergbiit also tests the fallback backend10:44
juergbiand it also runs the integration tests. those can be run locally as well but are not run by default10:44
juergbiand it generates docs, which can also fail10:44
tlaterjmac: The integration tests are the most important reason IMO, as the time to run them locally is atrocious10:44
juergbiwith sam's Alpine branch merged it's much better, though10:45
tlaterOh, that happened?10:45
tlater\o/10:45
* tlater wanted to make that part of his refactoring, but tristan vetoed10:45
juergbiyes, shouldn't have taken so long but test was failing first10:45
juergbihe commented that he has no issues with using Alpine, iirc10:46
juergbijmac: regarding #38. not sure whether that's already clear to you but given the constraints, it may not make sense to change anything in buildstream itself at this point10:46
juergbii.e., it's not clear whether it makes sense to handle those parts that we could handle even though we can't handle everything10:47
juergbiso we might just document best practice how to live with this limitation for now10:48
juergbi(or we could implement subuid support but with this projects that use this could only be built on hosts that have subuids configured)10:50
jmacI have no intention of changing anything at the moment; I expect it'll take me today and tomorrow just to figure out what the problem is10:53
juergbimakes sense, just wanted to make the above clear10:53
jmacIndeed, thanks10:54
*** aday has quit IRC11:31
tlaterBB standup notes:11:44
tlater  - The project-generation script is going to be open sourced, should hit our repo soon (1-3 days, as far as I can tell)11:44
tlater  - 1-2 people from the London team will join the catch up meeting11:44
tlaterlaurence ^^11:45
jonathanmawdid you mean that for a different window?11:45
tlaterErm, yep11:45
*** aday has joined #buildstream11:45
*** tm has quit IRC11:52
gitlab-br-botbuildstream: merge request (239-use-pylint-for-linting->master: WIP: Resolve "Use pylint for linting") #283 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/28311:58
*** tm has joined #buildstream11:59
tristanjuergbi, after discussing a lot with Michael in the dead of night, I'm pivoting to focus on better support for 'running stuff in bst shell', and right now looking back at https://gitlab.com/BuildStream/buildstream/merge_requests/26512:06
tristanjuergbi, I think I'll throw away my concerns about sandbox flags API, we started with that pattern already, maybe we need to keep it and maybe it makes sense to have this granularity12:07
tristanasides from this, I'm wondering about optionality and how to control it12:07
gitlab-br-botbuildstream: merge request (sam/disable-ostree-free-space-check->master: _ostree.py: Disable OSTree's minimum disk space check in our repos) #285 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/28512:08
tristanI think for a start; a single user facing switch to control "Is this a weak sandbox or a strong one" is better than exposing SandboxFlags granularity on the cli12:09
juergbii agree on the CLI switch12:11
juergbitristan: as the sandbox API is public, we have to be careful about what new flags we expose, though12:11
tristanYeah12:11
juergbibut yes, it does fit with the existing pattern which is why i've implemented it that way12:11
tristanThat's annoying12:11
tristanright, I now sort of wish we had less details exposed there12:12
juergbior could we have additional private/internal members of that flags enum?12:12
juergbinot sure what the policy on something like this is12:12
juergbiwould be an issue for plugins consuming flags (which doesn't exist) but shouldn't be an issue for just using/constructing flags12:13
tristanRight now, sandboxes are only implemented by us12:13
tristanAnd shell is a feature that only we use12:13
juergbiexactly12:14
tristanThe only part of SandboxFlags which really needs to be public is ROOT_READ_ONLY12:14
tristanafaics12:14
juergbiwe don't want plugins to create sandboxes with holes12:14
juergbi(strictly speaking, this wouldn't be a hole but still)12:14
tristanyeah, but existing things allow plugins to poke holes12:15
juergbiright12:15
tristanok so, regarding that; I'll file an issue for it and we can yank that part of the API, maintaining only ROOT_READ_ONLY for compatibility, and claiming that nobody should have been using those flags anyway12:16
tristani.e. removing those from public view is technically API break, but only for plugins which were broken12:17
tristanbut for now expedite fixing Michael's more pressing issues12:17
tristansounds reasonable ?12:17
tristanRegarding optionality; I think default `bst shell` of whichever brand, is a weak sandbox and not a strong one12:18
tristanbecause that will be least frustrating12:18
tristanAny ideas for a `bst shell --option-name` to denote that the sandbox should be... strong/isolated ?12:22
juergbisounds reasonable to me12:23
skullman`bst shell --sandbox=restrictive`?12:24
skullmanor just --sandbox=strict12:24
gitlab-br-botbuildstream: issue #265 ("SandboxFlags API allows too much control, remove some") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/26512:24
tristanskullman, do you envision more than 2 "modes" ?12:25
juergbinaming things, one of the hard problems in computer science ;)12:25
tristanI am thinking; either there is one mode, or specific things are controllable12:25
tristanwhile later we could add specific things if it ever became important (like --enable-network, --root-rw, etc)12:25
juergbithere might be a project-specific setup for passthrough12:26
tristanyeah, damn names12:26
juergbibut that would not be on the command line12:26
juergbias hardcoding X and DBUS env variables is really bad12:26
tristanjuergbi, I would really hope to not have project-specific passthrough if it touches the builds, rather an option to specify specific build uid12:27
juergbithis would be for the weak/interactive shell, not for the build process, of course12:27
tristanright12:27
tristanindeed, that can possibly make sense12:28
juergbijust something to consider when thinking about future CLI12:28
tristanjuergbi, yes that hard code also has to turn into project defined shelling setup options12:28
tristanso anything similar could sit under a `shell:` dictionary in project.conf12:28
juergbiyes, makes sense12:29
juergbibut we might still want a CLI option12:29
tristanwe still need at least one12:29
juergbior maybe some sort of profiles in project.conf? and CLI just specifying the profile12:29
juergbimight be too fancy12:29
tristanif default is for weak sandbox with testing capability; we want something to debug the actual build environment12:30
juergbiwe have --build12:30
tristanI know; but a really unfortunate thing; is that people like Michael, *want* to work inside a `bst shell --build`12:30
juergbiright12:31
tristanThere is also a reasonable need for openness in the --build shell12:31
tristani.e. `make distcheck`12:31
tristanfor people who write a `make check` that assumes it will run in a full login session on a desktop12:32
juergbi--secure12:32
tristanan assumption which I think is wrong for `make check`, but; in fact I have to admit that is a matter of opinion12:32
juergbi--unshare12:32
juergbii share your opinion given that this makes CI impossible12:33
tristan--secure/--unshare/--restrictive12:33
tristanjuergbi, or on the other hand; it explains why most meta-build systems rarely run a module's `make check`12:34
tristani.e. only some rpm spec files do it; probably same for debian12:34
tristanonly the ones which are probably known to work in isolation12:34
tristan--isolated12:34
tristan--strict is off the table, that's a `bst` toplevel option12:34
juergbi--protect12:35
tristan--sealed12:36
juergbi--restrict / --isolate / --protect12:36
tristanI think I'm liking --isolate12:38
tristan--secure and --protect dont seem to convey the right thing12:38
tristanlike damage can be done12:38
juergbiyes, the focus is more about the sandbox not being influenced by the host, not the other way round12:38
juergbi(although the latter is also important)12:38
juergbi--isolate works for me12:38
* tristan has to make sure that that is also what is being used in the interactive debug session12:39
juergbibtw: one thing i'm missing with bst shell is support for multiple targets12:39
tristani.e. when a build fails; we want --isolate12:39
juergbiunfortunately, it's problematic to add this the syntax12:39
juergbiright12:39
tristanmultiple targets... yes very difficult to express12:40
tristanit could theoretically leverage the -- separator12:40
tristanbut lots of work12:40
tristanjuergbi, Michael asked for something which struck me as pretty wild, too, but I think this is going to be a matter of educating people and managing expectations12:42
tristanwild thing: A.) I open a shell.... B.) I modify something else in the stack... C.) I build again... D.) How come my open shell does not reflect the built result ??12:42
tristanHa!12:43
juergbiah, yes12:44
tristanAnyway, amusing - it could be interesting to set a PS1 dynamically for a non-isolated `bst shell`, to reflect the abbreviated cache key in the prompt12:44
tristanmaking it clear that this is the shell for *this* cache key12:44
* tristan runs with --isolated, and should have a patch up in an hour or so12:45
tristan--isolated or --isolate, yeah just --isolate12:45
juergbiright, could be helpful12:45
juergbiagree, i prefer the latter12:45
juergbiit might actually be possible to support something close to what Michael asked for12:46
tristanI think that educating people that "There is no constant sysroot" is the best path; because developers will later discover they have more power12:46
juergbibut it's very tricky12:46
tristanjuergbi, yeah; I thought of something like that before :)12:46
juergbicould keep something like a workspace open12:47
tristanKeeping some local state around to track that12:47
tristanand keep a build dir updated, pretty wild though12:47
juergbiyes, i don't think we want/need to focus on this now but it could be interesting12:47
tristanssam3, btw; what was your env var hack thing which made one of the integration commands run much faster ?12:48
juergbifor many things a sensible alternative could be to directly run bst shell some-command instead of really executing an interactive shell12:48
tristanssam3, I think disabling fdatasync on every write or smth12:48
*** cs_shadow has quit IRC12:49
*** cs_shadow has joined #buildstream12:51
tristaneeesh12:52
tristanI just noticed one more flaw :-/12:52
tristanwell, maybe not12:52
persia*please* don't disable fsync by default.12:52
tristanjuergbi, how about root read only unconditionally in the shell ?12:52
persiaThere's a reason the package to do that in Debian is called "eatmydata"12:53
tristanpersia, I'm talking about `ENV_VAR=True specific-long-running-integration-command` to be set in gnome-build-meta12:53
tristanjust for that command12:53
tristanjust for that project, for that command12:54
persiaAs long as you understand why it is usually critically important to never do that, I won't tell you not to if you have a good reason.  That you are asking about syntax suggests the former may not be the case.12:54
tristanjuergbi, right now; we root-read-only for the isolated case only, and allow writing to `/` in testing mode; which would mean `make dist` of epiphany would break on too many open fds again12:56
tristanbut if we root-read-only, you can no longer `echo "nameserver 8.8.8.8 > /etc/resolv.conf"` in the shell12:57
juergbiright. i so hate it that linux doesn't have sensible immutable files. so painful12:57
tristanWell, ok I'll handle this; and will make root-read-only across the board for now; and add the default nameserver to gnome-build-meta for now12:58
juergbishouldn't it rather be mount-bind from the host?12:58
tristanpeople will want more exotic things; like knowing about your host, and knowing that your host has a file named `/etc/resolv.conf`12:58
tristanbut that will have to go into `shell:` configuration in project.conf, along with env vars and other payload/host specifics12:59
juergbihttps://gitlab.com/BuildStream/buildstream/commit/dcc23d64cfbc7c08dc468162116ef6ec8cd920da12:59
juergbiyes, we should make this all configurable in the end12:59
tristanI couldnt find that MR yesterday, when Michael said it existed13:00
juergbitristan: btw: the uid thing is not sufficiently helpful without also having suitable passwd/group entry13:00
juergbiit's not in a MR13:00
tristanlooking at that link, I still cannot find that MR13:00
juergbiit's the juerg/gnome branch13:00
tristanoh13:00
juergbias it was just an experiment13:00
tristanI'll root-read-only across the board for shell, and then consider a separate option if anyone complains they cannot modify the rootfs there13:01
juergbiok13:02
juergbiwe should also add a shell script to gnome-build-meta that quickly spins up a VM of GNOME but without having to go through image generation etc. for really fast testing in proper environment13:02
tristanI think that is a long way off; we still dont depend on freedesktop-sdk from GNOME13:03
tristanwe need a bootable payload13:03
*** ernestask has joined #buildstream13:06
ssam3tristan, it was `PKGSYSTEM_ENABLE_FSYNC=0`13:09
ssam3I think it only has an effect for `update-mime-database`13:09
ssam3https://bugzilla.redhat.com/show_bug.cgi?id=1052173 and https://bugs.freedesktop.org/show_bug.cgi?id=70366 have lots of overheated debate on the subject13:10
tristanright that one13:15
ssam3i also wonder about making fsync and fdatasync no-ops in the SafeHardlinks backend13:17
ssam3which is not "dangerous" for sandboxes, as sandboxes don't get reused if anything goes wrong13:17
ssam3could be risky if we use that filesystem for other stuff that can be storing precious data though ...13:18
tristanssam3, right, the sandbox is throwaway if you lose power13:19
tristanssam3, the conclusion I'm tempted to draw, is to disable that in gnome-build-meta; and sync the disks once at sandbox exit time13:19
juergbiyes and for anything that is committed to OSTree, OSTree is in charge13:19
tristanThat too, if you get to ostree or collecting an artifact; it must either be synced or buffered and end up in the artifact13:20
tristanso maybe not even required to sync the disk; syncing the artifact might be interesting, but it's a separate issue13:21
tristanlooks like main.py got chopped up into main.py/cli.py13:35
tristanGood idea !13:35
tristan:)13:35
* tristan hits 3% remaining disk space issue with 11GB free on his SSD13:41
ssam3just in time :-) https://gitlab.com/BuildStream/buildstream/merge_requests/28513:43
tristanheh13:44
tristanssam3, crap; I just made space though !13:44
tristanI wont be able to use this opportunity to test it13:44
tristanbut lets merge that anyway13:44
ssam3oh no!13:44
ssam3you could do `truncate --size=10GB` :-)13:45
gitlab-br-botbuildstream: issue #216 ("Spurious min-free-space-percent error") changed state ("closed") https://gitlab.com/BuildStream/buildstream/issues/21613:45
gitlab-br-botbuildstream: merge request (sam/disable-ostree-free-space-check->master: _ostree.py: Disable OSTree's minimum disk space check in our repos) #285 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/28513:45
tristanssam3, did you try that btw ?13:45
ssam3the truncate test ? actually no13:45
ssam3let me test it now13:46
tristanYeah that would be nice :)13:46
ssam3i verified that it added the config13:46
tristanshould be effective13:46
gitlab-br-botbuildstream: merge request (tristan/isolate-shell->master: Tristan/isolate shell) #286 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/28613:48
gitlab-br-botbuildstream: merge request (juerg/dbus->master: WIP: Inherit user id and group id for bst shell) #265 changed state ("closed"): https://gitlab.com/BuildStream/buildstream/merge_requests/26513:50
tristanjuergbi, if you want to give !286 a glance... it's pretty straight forward though13:51
tristanjuergbi, I am going to build GNOME with some modifications I made to gnome-build-meta and try some things13:51
tristanmaybe I should try gnome-control-center13:51
tristanjuergbi, any other ideas of exercising/testing the inherited uid/gid such that D-Bus works ?13:52
ssam3ok, i built something with 99% full disk and it committed to the repo fine13:56
juergbitristan: dbus-monitor is the simplest test13:57
juergbiit immediately fails if dbus doesn't work13:57
juergbii can take a look at !286 later, not right now13:58
*** tristan has quit IRC13:58
*** tristan has joined #buildstream14:01
tristangah, pages deployment is less stable than usual these days14:05
*** xjuan has joined #buildstream14:13
*** mcatanzaro has joined #buildstream14:53
* tlater also noticed the occasional dnf failure15:01
tlaterjuergbi: I'm struggling to figure out how I would do a diff with the OSTree internals15:06
tlaterAs far as I can see, there's an OSTree.walk of sorts, is your suggestion to use that to compare the shas of all files of two artifacts?15:07
juergbii actually haven't checked yet whether this is (efficiently) possible with the library15:07
tlaterRight15:07
juergbiwalk sounds interesting15:07
juergbias long as you can also get the directory SHA, this should be useful15:07
tlaterI'm not entirely sure it does what we want, I'll have to see...15:07
juergbias you could skip unmodified directories completely15:08
tristanYes it's possible, but tricky; colin pointed me to some internal code which walks and looks at file metadata iirc15:08
tlaterAny chance you could point me to colin's pointer? ;)15:08
tristanI would say, a walk in ostree, is not a walk in the park ?15:08
juergbibut there are trees in the park15:08
tlaterI'll call some pigeon Merkel, I guess15:09
tristanfor this case, tlater; maybe this is more helpful: https://github.com/ostreedev/ostree/blob/master/src/libostree/ostree-diff.c15:10
tlaterAh, tyvm tristan15:10
tristanmaybe using https://github.com/ostreedev/ostree/blob/master/src/libostree/ostree-diff.c#L199 directly from python is possible15:10
juergbiyes, even public API15:11
juergbii think15:11
tlaterYeah, it is, but it doesn't quite do what we want15:11
tlaterIt only compares within the same artifact in our case15:11
tristanostree_diff_dirs looks public15:11
tlaterAt least, the python bindings don't seem to quite get there15:11
tlaterMaybe I should look more into what they do in detail though15:12
juergbijust repeat it for every dep?15:12
tristanis there some context of this ? is this `bst diff ...` ?15:33
tristanif so, wouldnt you want recursion into dependencies to be an optional thing anyway ?15:34
tristanhrmmm, this was working before; what is the thing you have to do to get fonts working in guis again ?15:35
tristanfc-cache smth-or-other ?15:36
tlaterit's something along those lines, yeah15:37
* tlater has to google it all the time15:38
tlatertristan: The context is #215, where we want to compare the files in the latest successful build artifact with the latest built artifact15:38
tristanyeah, ok I see, what I'm seeing is a different problem than fc-cache, though15:39
*** xjuan has quit IRC15:39
tristantlater, ohhhhh that15:39
tristanI feel unsure if `PKGSYSTEM_ENABLE_FSYNC=0 update-mime-database /usr/share/mime` is really making a difference here15:56
tristanwell, I'll leave it in because it should; and verified that's the right env var15:57
* persia doesn't understand why update-mime-database is required at build time15:58
tristanpersia, it's probably not16:00
tristanpersia, however we never yet implemented any split between what integration commands are, and which arent16:00
tristanso there is only one place so far for integration commands16:00
tristanprobably worth opening an issue for16:01
tristanldconfig is required, and things like, querying pixbuf loaders is, otherwise GTK+ wont build16:02
tristanthe "safest" bet is to have all of them run before every build, however separation by domain is possible here16:02
tlaterGah, I think I misunderstand how OSTree works16:07
tlaterSo, the way I interpret this is that I need to use OSTree.Repo to access the repository, which contains all our artifacts16:07
tlaterThese artifacts are represented as trees16:07
persiaupdate-mime-database is a critical integration command.  My confusion is now gone.16:07
tlaterAnd I should be able to traverse those trees individually, and then compare files between them16:08
tlaterMy problem is that there doesn't seem to be any way to access these trees through the api16:08
tlaterSo clearly my understanding must be wrong?16:08
tristantlater, yep; but I think the ostree_dir_diff() can do the heavy lifting for you16:08
tristanoh there is16:08
tristantlater, I think you might be missing the point that ostree uses abstract GLib data types to represent things16:09
tristanGFile and friends16:09
tlaterAs I understand them they aren't actually files, but simply represent paths that could be accessed?16:10
tristanI couldnt say without spending a fair amount of time reading the code16:10
tlaterAh, fair16:10
tristanbut I think if you look at the ostree-repo-checkout.c, you will find a similar walk16:10
tristanwhich uses public API to achieve it16:11
tlaterOk, I'll try to read through it again, ta for the patience here...16:12
tlaterRight, so an ostree repo is also a GFile?16:14
* tlater thinks he's starting to understand16:14
tristanan ostree repo is ostree-repo.c, I think it's an object on it's own16:15
tristanbut it will give you GFile16:16
* persia thought that an ostree was a merkle tree containing GFiles16:18
tristanpersia, in an abstract sense, yes; at the implementation level, well also, but how to navigate that isnt super intuitive and clear16:21
* tlater has somehow managed to avoid ever coding with GLib, so I still get to build that intuition ;)16:24
tlaterGah, I feel like I might need to go through a GLib 101 first or something... Frustrating given the targets I set myself for today16:29
tristantlater, aaaand there is no way to use that convenience diff function that is public in the library for our purposes ?16:30
tristanI still dont understand why that's not an option, and you want to walk the tree manually16:30
tlaterI think there is, I simply don't understand how to use it16:30
tlaterBecause it takes two GFiles, and I can't figure out how to give it trees16:31
* tlater still has a disconnect because he doesn't quite understand the data structures16:31
tristanah16:33
tristanso you need to get the toplevel dir16:33
tristanor not that, but you need to get files/16:33
tristanand then you can use that, yep16:34
tristanindeed16:34
persiatlater: You can use g_file_equal () to get course granulatity, if you write your own tree walker.  diff seems harder.16:34
* persia imagines something involving g_file_read()16:35
tristanpersia, I think you're missing the point; he needs to *get* the GFiles, then he can use the convenience function16:36
tristanpersia, rather, he needs to understand how ostree works with respect to GFiles and how they actually fit into the picture16:36
tlaterI think it's quite simple, as soon as I understand how to manipulate this :)16:36
tristanpersia, it will be very very far from "easy" - and the code will be probably very "simple"16:37
persiatristan: Oh, yeah, that works too.  I was thinking of avoiding actually instantiating the files except as memory structures.16:37
persia(but my way involves much uglier code)16:37
tristanpersia, if you assume an extracted artifact, that would be much more easy; but very heavy in terms of resources, and far less simple code :)16:38
tlaterHeh, yeah, I think I could do that ;)16:39
jennistristan, https://gitlab.com/jennis/buildstream/blob/master/buildstream/plugins/elements/compose.py#L75 would you be able to explain to me why the you've made the 'integrate' and 'include' values tuples?16:39
jennispls :)16:40
persiatristan: In that case, I think we're talking past each other and had similar ideas :)16:40
tristanjennis, I dont see tuples on that line16:42
tristanjennis, `integration` is bool, `include` is list16:42
tlatertristan: Note the ',' at the end of each line16:43
tlater-> makes them tuples16:43
tlaterBut should probably be a syntax error16:43
jennistristan, here is what they return: https://paste.codethink.co.uk/?407316:44
jennisHence the latter method does not work16:44
jennishence probably wasn't the right word there... but implementing the latter method doesn't work16:44
tristanjennis, tlater; not to my knowledge; you can simply call that a total fuckup16:45
tristanI can explain how the fuckup happened16:45
jennishaha ok, well to make it more explicit I've done this:16:45
jennis        key = {}16:45
jennis        key['integrate'] = (self.integration, )16:45
jennis        key['include'] = (sorted(self.include), )16:45
jennis        key['orphans'] = self.include_orphans16:45
tristanIt was originally key = { 'integrate': self.integration, ... } like that16:46
tlatertristan: Do tell16:46
tristanAnd then we added `exclude`16:46
tristanSo we changed it to be all: key['foo'] = bar16:46
tristanand a final `if`16:46
tristanwith the intention of remaining cache-key compatible16:46
tristanafter adding a new config option16:46
jennisCan you not still have  key = { 'integrate': self.integration, ... } with an if statement following it...? I'm sure you can16:47
tristanBut `,` on the end of line, for some crazy unknown reason; did NOT produce a compilation error.16:47
tristanjennis, Yes, but a code style change should be fine too16:47
* tlater finds this very amusing - especially because it means that we'll have to keep them as tuples to avoid breaking the cache key16:47
jennisoh just a style issue16:47
* jennis was just about to make tlater's point16:47
tristanjennis, tlater; its technically pretty alright to fix this in master; it's not alright to backport to `bst-1.0`16:48
tristanI would favor fixing it especially if the linter found this16:48
tristanwe've already broken cache keys since 1.0, it's not an immensely huge deal if it's worth the benefit16:49
* tlater suspects the linter disagreed with the repeated key['something'] calls, and that jennis found this while debugging16:51
tlaterMight complain about both, though16:52
tlaterOh, it does :)16:52
tlater"trailing-comma-tuple"16:52
jennisyes tlater, hence the quick fix mentioned above16:53
jennisalso makes it v. explicit that it's tuple packing to anyone else who comes across it and doesn't spot that comma ;P16:53
gitlab-br-botbuildstream: merge request (tristan/isolate-shell->master: Tristan/isolate shell) #286 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/28616:54
gitlab-br-botbuildstream: issue #227 ("Allow building releases") changed state ("closed") https://gitlab.com/BuildStream/buildstream/issues/22716:54
gitlab-br-botbuildstream: merge request (tristan/isolate-shell->master: Tristan/isolate shell) #286 changed state ("merged"): https://gitlab.com/BuildStream/buildstream/merge_requests/28616:54
tristanoh crap16:54
tristanjuergbi, fuck me ok I can revert it16:55
* tristan wanted to solve AT LEAST the optionality problem, the inherit UIDs problem, and one more problem in one day16:55
* tristan can add to that the few fixes he has not yet pushed to gnome-build-meta16:56
*** aday has quit IRC16:56
tristanbut if we revert the the UID inheritance, then that's gonna wait way long time16:56
tristanlike a whole week16:56
tristanwhoami here happly reports that it does not know the username associated to 100016:57
persiaAs it shouldn't, without configured shadow (or equivalent) installed.16:57
tristan /etc/passwd16:58
tristanpersia, and BuildStream should never know about that16:58
tristanand as far as I see, it's totally fine16:58
tristansurely some things will fail16:58
persiaOh, yes, I suppose BuildStream should not have information about the contents.16:58
persiaBut I can imagine BuildStream running a build with a build-time dependency on configured shadow, if someone wanted to do that.16:59
tristanSo project.conf has to grow a `shell:` section describing all the customizations and commands you wanna run to prepare an open testable shell16:59
tristanwhat ?16:59
tristanbuild-time dependency *of BuildStream* ?17:00
tristanoh17:00
persiaNo.  Build-time dependency of an element.17:00
tristanpersia, no no no17:00
tristanpersia, you can never know the UID17:00
tristanpersia, so the build cannot have static info in it, knowing the outside users UID17:00
persiaThat worries me, as it is possble to construct a source element that contains /etc/passwd.17:00
juergbitristan: we can also leave it in if it doesn't cause more issues than what we had before17:01
persiaIf the rule is "you must always function even if you don't know the ID", then I'm less worried.17:01
tristanpersia, I think you are again mixing your subjects17:01
tristanpersia, are you aware that we are talking about https://gitlab.com/BuildStream/buildstream/merge_requests/286 ?17:01
persiaYes.17:01
tristanpersia, which is dup of https://gitlab.com/BuildStream/buildstream/merge_requests/26517:02
persiaI only thought it was related to 265, but I now see it is a dup.17:03
tristanpersia, ok; so you cannot introduce user noise into the build; that is just a fact17:03
persiahence "Oh, yes, I suppose BuildStream should not have information about the contents"17:03
persiaI suspect the confusing thing was that I used the word "contents", which doesn't actually mean anything in the context of BuildStream.  I apologies.17:04
persiaAnd, yes, introducing user noise into a build would be terrible, and should not ever be done.17:05
tristanAnyway, there is no way to "have a configured shadow"17:05
tristanas far as I can see17:05
tristanThat needs customization in project.conf that sets up stuff in the build environment before you shell into it17:06
tristanso that one can know what to do17:06
tristansame kind of deal with copying in /etc/resolv.conf, or specifying special env vars to allow passing on to the build env17:07
persiaRight (returning the conversation to the pre-confused state, from "what?" above).17:07
tristanor not the "build env" I should say the "shell env"17:07
persiaYes.  "shell env": none of that influences the build at all.17:07
*** jonathanmaw has quit IRC17:11
*** xjuan has joined #buildstream17:13
*** aday has joined #buildstream17:18
gitlab-br-botbuildstream: merge request (239-use-pylint-for-linting->master: WIP: Resolve "Use pylint for linting") #283 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/28317:30
*** toscalix has quit IRC17:36
*** dominic has quit IRC17:46
*** valentind has joined #buildstream17:49
*** aday has quit IRC17:57
gitlab-br-botbuildstream: merge request (239-use-pylint-for-linting->master: WIP: Resolve "Use pylint for linting") #283 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/28318:10
*** ssam3 has quit IRC18:16
gitlab-br-botbuildstream: merge request (239-use-pylint-for-linting->master: WIP: Resolve "Use pylint for linting") #283 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/28318:19
*** tm has quit IRC19:40
*** ernestask has quit IRC19:50
*** tm has joined #buildstream19:53
*** Prince781 has joined #buildstream20:47
*** Prince781 has quit IRC20:51
*** aday has joined #buildstream21:09
*** tm has quit IRC21:22
*** aday has quit IRC21:30
mcatanzaroBuildstream's bash prompt changed to "I have no name!@victory-road:/buildstream/build$" (victory-road is my hostname)21:39
mcatanzaroProbably shouldn't include the username there21:39
*** tm has joined #buildstream21:44
*** valentind has quit IRC22:09
*** tm has quit IRC22:29
*** tristan has quit IRC22:46
*** cs_shadow has quit IRC22:48
*** Prince781 has joined #buildstream23:15
*** xjuan has quit IRC23:25
*** Prince781 has quit IRC23:29
*** Prince781 has joined #buildstream23:30

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