IRC logs for #buildstream for Monday, 2017-10-16

*** tristan has quit IRC04:22
*** tristan has joined #buildstream04:28
tristanImplementing declarative array composition directives (<), (>) and (=) is a damn PITA... but starting to have passing tests \o/07:40
*** tiagogomes has joined #buildstream08:27
adds68hi, would anybody here know how to compile OSTREE with a http back-end?08:28
adds68I can't find any flags to enable http at build time08:29
*** jude has joined #buildstream08:29
tristanadds68, http backend ? I didnt even know that exists, what is it supposed to do ?08:31
adds68tristan, i'm not too sure, but it's used by Flatpak08:32
adds68error: This version of ostree was built without libsoup or libcurl, and cannot fetch over HTTP08:32
adds68I recieve this error when trying to pull anything from a http/https url08:32
tristanAhhh right that08:33
tristanThe pulling side08:33
tristanHmmm, I wonder why you would have an ostree that lacks that08:34
tristankind of abnormal, yes we also require that08:34
tristanadds68, if you compiled ostree yourself, then you need to install the right dependencies (usually means the corresponding -dev packages with your package manager)08:35
tristanso you probably want something like libcurl-dev to be installed08:35
tristanthen reconfigure/rebuild/reinstall08:35
tristan ./configure should normally tell you in the output summary what it's going to build08:35
tristanif it says something like: http backend:   None08:35
tristanthen you dont have the deps08:35
tristanconsult with configure.ac as usual to know exactly what it's looking for08:36
adds68tristan, yep that would make sense, the last time i built it it reported a http backend, but i had issues with my build, so now i'm rebuilding again it can't seem to find the http backend08:36
adds68tristan, i shall try that and report back, thanks :)08:36
*** jonathanmaw has joined #buildstream08:40
*** tiagogomes has quit IRC08:53
*** tiagogomes has joined #buildstream08:54
adds68tristan, even with libcurl4-openssl-dev install, i still get 'none' in the http backend when i configure the install09:04
adds68tristan, i think it's the openssl curl that is installed on debian, but i've also tried the gnu variant with no luck09:05
tristanand what did a reading of configure.ac tell you ?09:06
*** tlater has joined #buildstream09:08
tristanadds68, to me, https://github.com/ostreedev/ostree/blob/master/configure.ac#L120 this looks like it's not going to even check for your curl if you dont tell it to with --with-curl09:08
tristanmaybe it prefers libsoup, I personally would prefer curl09:09
*** ssam2 has joined #buildstream09:11
adds68tristan, not much that i can deduce09:11
adds68tristan, but i think you're correct as it's saying ' configure: error: libsoup is enabled but could not be found' when i do ./configure --with-curl09:12
* tlater finds that very amusing - why even give the curl option if you won't allow it?09:13
adds68Yep libsoup is now enabled, deduced by the --with-curl option :D09:15
adds68Ostree is awful to build09:15
*** bochecha has joined #buildstream09:17
tristanI very much doubt that it cannot be used09:20
tristanthe configure.ac specifies a minimal bound version of curl that it needs if it's going to use it, that might not have been found09:20
tristanOr, your distro may have not provided a .pc file for pkg-config to find it with09:21
*** jude has quit IRC09:24
gitlab-br-botbuildstream: merge request (sam/no-install-python-deps->master: .gitlab-ci.yml: Use `pip3 install --no-index` when installing BuildStream) #110 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/11009:28
*** jonathanmaw has quit IRC09:29
*** jonathanmaw has joined #buildstream09:29
tristanDoes using a declarative list composition directive to apply to a list which doesnt exist cause an error ?09:33
tristanssam2, thoughts ^^^ ?09:34
tristanDoesnt really make the code more easy or more difficult to write, just a decision to make09:34
bochechatristan: you mean the >> to append, etc.. ?09:35
tristanyeah it's going to be (<), (>) and (=)09:35
tristanWhere (=) is the same as not using any, but just for the sake of tedious completeness09:36
tristanThere is some added safety I guess in raising an error09:36
bochechaIMHO, if I try to append to a list which doesn't exist, it's because I expect the list to exist09:36
bochechait could happen if I made a typo in the list name09:37
tristanyes09:37
bochechaat the very least, there should be a very visible warning about the list not existing09:37
tristanYeah ok I'm sold, I think better start with an error09:37
tristanI dont like it being a gray area of warnings09:37
bochechaotherwise, people could waste hours trying to figure out why the build doesn't do what they expect, and debugging this would be hell09:37
bochechaerrors work to :)09:38
tristanbochecha, what can potentially happen, is that you eventually modify your project.conf to remove something that elements are compositing to09:38
tristanwhich means you need to explicitly update elements in that case09:38
tristanI guess that's the main downside to the error09:38
bochechait's also easier to later open it up by making it a warning, than transforming a warning into an error (which breaks existing projects)09:38
tristanAlso, with validation currently in place, there is not much room for typos, but they could indeed happen in public data09:39
tristanwhich is more free form... any element/source configuration is validated quite strongly09:39
tristanAnd variables/environment are not allowed to have lists anyway09:39
tristanmeh -> error for now :)09:40
bochechawhat about configure-commands? isn't that a list in a variable?09:41
tristanyes but if you put comfigure-corrands into a BuildElement's config... you will get an error09:41
tristanOh but... no that is not a "variable"09:42
tristanbochecha, by variable I mean, what you declare as "variables:" and can expand as %{foo}09:42
tristanvariables:, like environment: is a flat list of strings09:43
tristanbochecha, so yeah... this could probably be documented better (and I think I have libreoffice draw images from my initial designs which could help)09:44
tristanbochecha, basically; configure-commands is a part of an elements "configuration", which appears strictly under the "config:" section of any element09:45
tristanbochecha, what that configuration is, is in the domain of the element implementation to document and validate09:45
tristandepends, sources, description (if specified), and core features like conditionals... is in the domain of buildstream core... "config:" is the domain of the plugin defining it, and is private to that plugin... while "public:" is data that any element may read off of it's dependencies09:46
*** jude has joined #buildstream09:48
tristansources themselves are a bit different; instead we delete some things that buildstream core parses (i.e. 'kind') and just give the rest of the dictionary to the source plugin09:48
bochechaah, so if in `config:` I mistype `configure-comands` I'll get a validation error?09:49
tristanyes09:49
*** anahuelamo has quit IRC09:49
bochechacol09:49
bochecha* cool09:49
*** jonathanmaw has quit IRC09:49
tristanhttps://gitlab.com/BuildStream/buildstream/blob/master/buildstream/buildelement.py#L11909:49
tristanlinking that just cause I think it's cool how it works :)09:50
*** jonathanmaw has joined #buildstream09:50
* tristan not sure that comment is worth a "FIXME" prefix09:52
tlaterYou should prefix it with a FIXME to remove the FIXME09:55
*** anahuelamo has joined #buildstream10:03
*** givascu has joined #buildstream10:24
tlatertristan: About the integration tests... Any .bst file that imports a local tar file has to be modified to load from $(pwd), since buildstream only supports the 'file://' protocol for those. Avoiding to dirty some of the source tree seems to be impossible.10:30
tristantlater, I'm losing context of what you are commenting on, maybe better to comment on that inline with discussion and link to it here ?10:31
tlaterSure10:31
tlatertristan: https://gitlab.com/BuildStream/buildstream/blob/master/integration-tests/autotools-test/elements/amhello.bst#L1210:37
tristantlater, ummm that's a link to something... your message here implies you are responding to something I said, no ?10:38
tlaterWhoop, sorry, had the wrong thing in my clipboard10:39
tlaterhttps://gitlab.com/BuildStream/buildstream/issues/108#note_4340959910:39
tristanah yeah, found it via inbox10:39
tristantlater, that is not unavoidable at all10:39
* tristan comments inline, better10:40
tlaterAh, right, that's a way to do it. ta :)10:42
tristanOk... another question for the team ! ... Shall we just drop the buildstream-tests repository entirely, after having addressed https://gitlab.com/BuildStream/buildstream/issues/96 ?10:43
tristanDoes anyone have any work floating around in there ?10:43
ssam2we already merged the gnu-toolchain branch into baserock/definitions.git10:43
tlatertristan: It has some useful old test branches, such as the one detailing how x86images work10:43
* tristan starts by archiving it10:44
ssam2tlater, is that not defs2bst.git ?10:44
tlaterssam2: It refers to a branch in buildstream-tests10:44
ssam2ah right10:44
tristanSo at least buildstream-tests is now read-only10:44
tristanthe defs2bst.git readme should probably new refer to baserock stuff instead10:45
tristan*now10:45
* tlater should hopefully clean the x86image documentation soon anyway10:45
tristanx86image had an .omit test, all that omitted stuff, and omitting mechanics, has been removed10:46
tristanAnd whatever it was, if revived, should appear in bst-external, which jonathanmaw is looking into10:46
ssam2tristan, i've been thinking about artifact caches more11:51
ssam2getting ostree-push to work over http(s) would be pretty non-trivial11:51
ssam2so trying to picture how things would look if #111 (tarball push & receive) got fixed ...11:52
ssam2i'd say we should have a http endpoint that serves tarballs, and a change to bst-artifact-receive such that tarballs can be pushed over SSH11:52
ssam2and we keep 'push over https' as a separate task entirely. I guess my question is, do you care enough about push-over-https that it's worth me writing up my thoughts on that?11:53
tristanssam2, I think push over https is orthogonal, and adding such support in the future would not break any user configuration right ?12:00
tristanssam2, if we have one kind of url that we can push/pull from, and another that can only be pulled from; that seems reasonable12:00
tristanand in the future if we handle https push, that becomes a feature12:01
ssam2that makes sense12:01
ssam2i think the main arguments for push-over-https are (a) push behind firewalls that block ssh, and (b) more flexibility with user auth12:02
ssam2but (b) can be achieved by customizing the ssh daemon too... and (a) can be achieved with corkscrew12:02
tristanIt's better to think about enclosing this into a nice black box that we can reimplement behind the scenes without breaking peoples workflow on upgrades12:03
tristanyeah; other features will be nice, and having that box should let us grow features :)12:04
ssam2i think "black box" isn't really practical server-side12:05
tristanI guess in any world, push/pull over ssh will always require some admin (or maybe one day a web interface ?) has to obtain a user's private key12:05
ssam2it's always going to require some http server config12:05
ssam2and we don't want to force people to use a specific http server12:05
tristanyeah, as horrible as that is; we'll have to live with it12:05
tristanso I guess, some upgrades might require a sysadmin on the artifact server side12:05
ssam2yeah12:06
ssam2but sysadmins are used to stuff like this https://git-scm.com/docs/git-http-backend12:06
tristanbut user/client configuration and such is always stable and back compat12:06
ssam2right12:06
*** semanticdesign has joined #buildstream12:31
tristanwhew... ok so now I have test cases asserting all the declarative list composition works; think I have the whole surface covered, with single / double compositions; i.e. one can append to a list where the intermediate layer is prepending to the same list, or double append/prepend12:45
tristanThat all works; what I am left with... is a huge mess in _yaml.py with waaay to much procedural code :)12:46
tristanso boil it down to about half the loc count... and should be good to close the book on that12:46
gitlab-br-botpush on buildstream@108-integration-tests-not-idempotent-and-self-contained (by Tristan Maat): 20 commits (last: tests/format/assertion.py: Added tests for the (!) assertion directive) https://gitlab.com/BuildStream/buildstream/commit/f9df02735253ce530a7fa6c5fb11a4d9ded97a2914:11
gitlab-br-botpush on buildstream@102-run-ci-as-non-root-user (by Tristan Maat): 16 commits (last: Ensure that artifact file permissions are set in the right order) https://gitlab.com/BuildStream/buildstream/commit/a968bab76201856a67c876be25745fee912c136b14:28
gitlab-br-botbuildstream: merge request (102-run-ci-as-non-root-user->master: WIP: Resolve "Run CI as non-root user") #104 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/10414:28
*** tristan has quit IRC14:36
*** tristan has joined #buildstream14:40
*** jude has quit IRC14:48
jjardon[m]Hi, FYI I have completed  https://wiki.gnome.org/jjardon/BuildSystemComponentBuildstream a little  more, but unfortunatelly Im blocked by  https://gitlab.com/BuildStream/buildstream/issues/9215:12
jjardon[m]Any help from anyone using a distro different from Arch would be appreciated!15:12
tristanjjardon[m], ohh that's a shame, but arch is like, highly configurable thing right ? there is no user namespaces available for arch ?15:30
* tristan finds this very surprising, as he thinks jjardon[m] normally runs blood-on-the-floor-bleeding-edge stuff :)15:30
tristanjjardon[m], I wanted to give it a go but... I actually did a ton of other work this weekend, and am closing in on solving the last "hard feature" that needs to land for 1.015:31
tristanjjardon[m], ssam2... others who have baserocking history: I feel like just dropping the pre-/post- notations for all commands in BuildElements15:32
jjardon[m]tristan: Its possible, but I have to recompile my kernel15:33
tristanSeeing as you can now prepend, append or override lists declaratively15:33
tristanAny thoughts on that ?15:33
tristanit would be a bit annoying to change the migrations, but would give us something cleaner after I think15:33
jjardon[m]not sure we can ask that to all the Arch users; convince arch kernel maintainer is probably the best approach15:33
tristanjjardon[m], I agree15:33
tristanjjardon[m], I'm surprised though, seeing as debian even now has it in "stable"15:34
tristanwith a pretty slow release cadence15:34
tristanI bet if we look for it, arch probably already has a bug where that is being discussed15:34
jjardon[m]tristan:  is not about having the latest features, but about security15:35
tristanwe could at least weigh in there15:35
jjardon[m]Arch consider that option to not be secure15:35
tristanjjardon[m], I know, but it's not enabled by default on debian either15:35
tristani.e., you have to either be superuser to use it; or, you have to explicitly enable it through /proc or /sys as superuser15:35
tristanstill the kernel lets you do it, and one can either enable it, or decide to install setuid binaries they trust, to do it15:36
tristanweighing in on a probably-existing discussion in arch linux is probably a good idea15:37
ssam2tristan, mm... how would that look? something like this? https://pastebin.com/s3Puj1nJ15:37
jjardon[m]ah yeah; seems Arch doesnt like that neither : "# CONFIG_USER_NS is not set"15:37
tristanjjardon[m], note that; that also would mean no flatpaks for arch15:37
jjardon[m]in my /proc/config.gz15:37
tristanssam2, approximately yes, you dont have the indent at the right location I think15:38
ssam2oh yeah15:38
jjardon[m]tristan: I know, I know; lets not block on this. I think is Arch what it needs to change, only wanted let you know15:38
ssam2so it's slightly more typing than before, but probably worth it for consistency15:38
tristanhttps://bpaste.net/show/b5854922444115:38
tristanyeah15:38
tristanit removes an unneeded feature15:39
tristanand makes things probably all around less confusing15:39
tristanjjardon[m], so you dont have flatpak on arch ?15:39
ssam2yes, people did often use pre-configure-commands for things they weren't intended for15:39
tristanI guess not15:39
jjardon[m]https://wiki.archlinux.org/index.php/Bubblewrap and https://bugs.archlinux.org/task/3696915:40
jjardon[m]tristan: I have15:40
tristanhmmm, how do you have flatpak without user namespaces I wonder ?15:40
tristandoes flatpak fallback to only seccomp ?15:40
tristanmaybe15:40
* jjardon[m] wonders now as well15:41
tristanjjardon[m], it looks anyway like that discussion is on the right track and coming to the same conclusions as debian15:42
tristani.e. not enabled by default, with warning15:42
* tristan doesnt think you can do an unprivileged chroot without user namespaces and only seccomp15:42
gitlab-br-botpush on buildstream@sam/use-via-docker-2 (by Sam Thursfield): 1 commit (last: Add `bst-here` script and document it) https://gitlab.com/BuildStream/buildstream/commit/c52a57d0c789164b99d91ada7ded373f2d82a2e015:57
tristanssam2, is there any significant overhead in running bst-here / docker ?15:58
tristanasides from downloading the image and the disk space it takes ?15:58
* tristan never tried docker in any way whatsoever15:59
tristanclueless15:59
ssam2if set up properly, overhead is pretty negligible15:59
tristanmaybe memory and diskspace but processing is just fine ?15:59
ssam2docker has multiple storage backends, some of which are pretty inefficient15:59
tristanah15:59
ssam2but the buildstream cache lives in a separate volume independent from the copy-on-write storage backend stuff in any case16:00
tristanso a passthrough, especially buildstream is filesys intensive, can get annoying16:00
ssam2in my limited testing the bst-here wrapper worked fine16:00
tristanAnyway sounds great - but still I guess unfortunately, we cannot recommend that as an alternative for arch users right ?16:00
ssam2no, because it still uses the host kernel16:01
tristanssam2, if you can make a note somewhere in your docs, as to whether or not it drops the requirement of CONFIG_USER_NS that would be good :)16:01
tristanyeah I guess16:01
* tristan was wishful thinking16:02
gitlab-br-botpush on buildstream@sam/use-via-docker-2 (by Sam Thursfield): 1 commit (last: Add `bst-here` script and document it) https://gitlab.com/BuildStream/buildstream/commit/e3462b664f035e38fc558eb33ec4729c50aa0d0316:07
gitlab-br-botbuildstream: merge request (sam/use-via-docker-2->master: Add `bst-here` script and document it) #113 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/11316:08
tlaterIs there an artifact share for the baserock artifacts? /me is getting tired of building gcc16:18
tlaterUnfortunately testing means frequently flushing caches :/16:19
tlaterssam2: I recall you saying something about fuse, do you have an idea what might be causing this: https://gitlab.com/BuildStream/buildstream/-/jobs/36402818?16:21
ssam2that's weird16:23
ssam2missing `fuse` package would cause it ... but i'm sure that's present in the buildstream-fedora image16:24
tlaterI just rebased it, so I'm a little confused. Note this does *not* run as root anymore16:25
tlaterMaybe we can't run fuse in the CI without privileges?16:25
ssam2maybe, but that wouldn't explain that error16:25
ssam2actually, fusermount *isn't* present in the iamge16:25
ssam2*image16:25
ssam2but I guess it's only called in an exception handler codepath16:26
ssam2so we didn't notice til now16:26
tlaterHm. It seems that exception also ends up in a loop, since gitlab doesn't detect it failing16:26
ssam2about your previous question, https://ostree.baserock.org/cache/ might have what you need16:26
ssam2also the ci that populates that is currently broken16:26
tlaterssam2: Doesn't matter, at least the actual artifacts should work. ta :)16:27
* tlater will try to find the exception handler that causes that error then16:27
* ssam2 presents tlater with https://gitlab.com/BuildStream/buildstream-docker-images/merge_requests/316:28
tlater\o/16:28
*** ssam2 has quit IRC17:01
tristanfusermount is setuid and called by libfuse in the case of not being root17:01
tristanthat's the conclusion I think juergbi said17:01
tristanMaybe we need to also require fusermount in setup.py17:02
juergbiyes, while libfuse attempts to mount without the setuid helper, mainline kernels don't allow this for unprivileged users, afaik, so libfuse falls back to the setuid helper17:08
juergbiafaik, it's not allowed in user namespaces either (where some mount(2) calls are allowed)17:08
gitlab-br-botbuildstream: issue #116 ("BuildStream usually requires fusermount") changed state ("opened") https://gitlab.com/BuildStream/buildstream/issues/11617:17
tristanit's filed... so it happened.17:17
tristan:)17:17
*** jonathanmaw has quit IRC17:18
*** tlater has quit IRC17:20
*** givascu has quit IRC18:22
*** jude has joined #buildstream20:35
*** jude has quit IRC22:16

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