IRC logs for #buildstream for Tuesday, 2017-04-18

paulsher1oodi've just raised https://gitlab.com/BuildStream/buildstream/issues/1106:34
paulsher1oodis there anything written anywhere to tell me how to install buildstream on a new machine?06:35
*** franred has joined #buildstream06:38
paulsher1oodhmmm... 'ostree is already the newest version (2016.15-4).'06:52
*** brejoc has joined #buildstream07:10
Chrispaulsher1ood, the bst command is in ~/.local/bin/07:39
ChrisThe blog post you posted in #baserock (https://blogs.gnome.org/tvb/2017/04/10/buildstream-progress-and-booting-images/) was the best walkthrough I could find, but it's not comprehensive.07:41
*** tristan has quit IRC08:11
*** brejoc has quit IRC08:12
ChrisCan confirm that it does build.08:23
*** ssam2 has joined #buildstream08:23
*** jonathanmaw has joined #buildstream08:24
*** tiagogomes has joined #buildstream08:24
* paulsher1ood can confirm that the instructions *don't* work for him08:26
paulsher1oodsoftware rarely works for me08:26
paulsher1ood'git clone git@gitlab.com:BuildStream/buildstream.git' is a fail, for example08:26
ChrisI think gitlab is down, currently.08:27
paulsher1oodno, it's not that. Permission denied (publickey).08:27
ChrisAh. I had that, but it was because I hadn't added my public key to my gitlab profile yet.08:28
tiagogomesyou are trying  to clone over ssh08:28
* paulsher1ood is following 'instructions' that don't work :)08:28
tiagogomesThey should, for the ones that set up a SSH key :)08:29
paulsher1oodtiagogomes: why should that be a dependency? and if it is, where is that stated?08:30
* tiagogomes apologizes for his bad sensor of humour08:31
tiagogomesObviously the clone URL shouldn't use the ssh format08:32
paulsher1oodtiagogomes: no need to apologise, i appreciate your humour08:33
paulsher1oodbut i'm interested in getting to instructions that work, with minimum fuss.08:33
paulsher1ood'pip install --user -e .' - command not found08:33
paulsher1oodnothing has explained to me how to get a python3 default, with pip3 as default08:34
paulsher1oodthese things are probably obvious for an experienced/active gnome person...08:35
ssam2i think that's distro specific .. the instructions should probably say `pip3 install`08:35
paulsher1oodssam2: is there no way we could get to an equivalent of ybd's install_dependencies.sh, which would 'just do it'?08:36
paulsher1oods/equivalent/improvement on/08:36
ssam2probably08:37
ssam2(was trying to look at that file to comment, but got a 500 error from gitlab)08:37
paulsher1oodwhich file?08:37
ssam2install_dependencies.sh08:37
ssam2https://github.com/devcurmudgeon/ybd/blob/master/install_dependencies.sh08:38
Chriswfm, try it again.08:38
paulsher1oodnew question - why is buildstream LGPL, rather than GPL?08:38
ssam2looking at that script I'm sure it could be modified to work for buildstream08:39
ssam2that one I guess you'll have to ask tristan08:39
paulsher1oodwould it be worth having an equivalent install script, or is it 'just me'? :)08:39
ssam2well, the ideal would be that distros actually package buildstream08:40
ssam2and if it becomes widely used then that will happen08:40
paulsher1oodright... but in the meantime, with neither egg nor chicken? :)08:40
ssam2in the meantime, I don't know how many people would use an equivalent of install_dependencies.sh :-) do you know how many folk used it for ybd ?08:41
paulsher1oodssam2: everyone, afaik08:41
ssam2then it's probably useful for buildstream too at the moment08:42
paulsher1oodsorry, everyone except rjek, who refuses to use pip as root under any circumstances08:42
paulsher1oodok, so after supposedly 'Successfully installed BuildStream' using setup.py ...08:46
paulsher1ood-bash: bst: command not found08:46
Chris~/.local/bin/bst08:47
paulsher1oodChris: but *why*?08:47
ChrisOh I agree, it shouldn't be there, or made clear in the instructions.08:48
Chriss/or made/or should be made/08:48
ssam2some linux distros put ~/.local/bin in your PATH08:48
ssam2but others don't08:48
* paulsher1ood notes that he tried this on debian, because that's what .gitlab-ci.yml appears to use08:52
* paulsher1ood has bst running at last :)08:54
Chrisgitlab back upm08:59
Chriss/m//08:59
*** tristan has joined #buildstream09:08
*** ChanServ sets mode: +o tristan09:09
*** jude has joined #buildstream09:12
*** tristan has quit IRC09:21
*** tristan has joined #buildstream09:23
*** ChanServ sets mode: +o tristan09:23
tristanokaaaaay09:25
tristangood morning09:25
* tristan starts by going through the logger's backlog09:25
tristanA.) install_dependencies.sh thing should be taken care of entirely by having a standard setup.py with pip if I understand correctly09:26
tristani.e. the only thing install_dependencies.sh dealt with was distro agnostic python packages09:26
tristanB.) Should have some stock instructions for installing the ostree + ostree gir data + bubblewrap for known distros, but this will always be distro specific09:27
tristanC.) I raised the license thing months ago, nobody replied; I prefer LGPL, even if rms hates me (note flatpak-builder is also LGPL)09:28
tristanAs someone who lived through maintaining Glade and tried to relicense it LGPL, I can say that it was sad to not have a lot of support from, say Access company (previously palmsource), when they were considering using Glade as a part of their official SDK tooling09:29
tristanall because of restrictive GPL-ness09:30
tristanAfter struggling for a day with pip and trying to reproduce the clean initial install, but having some cruft installed in my system dirs, I seriously discourage anyone from ever running pip under sudo09:31
tristanand start to agree more with rjek on this09:31
tristanpeople in #pypa may also agree09:31
paulsher1ood'standard setup.py' - can't work out-of-the-box, afaict09:32
paulsher1oodyou're presuming the box already includes specific version of pip and python09:32
tristanbest in the horrible world of python packaging, is virtualenv; best possible future is "apt-get install buildstream", but wont happen for a while :)09:32
tristanYes I am assuming that, you need to install pip from your distro09:33
paulsher1oodpip3, python3, git...09:33
tristangit is a bit of a special case, it's only projects which use git which require git09:34
tristanthe user story for this should be that, during preflight, buildstream tells you with an error that git is not installed09:34
tristan(before any long time processing happens)09:35
* paulsher1ood just wants an out-of-the-box experience that doesn't require messing around for a couple of hours09:35
tristanYes, I was looking into that story last week and trying to find the best options09:35
tristanBecause I want to include a "Installing and Running" section in the full documentation, and I dont want Docker to be the "preferred" only story there09:36
tristanMy hope was that everything could be done inside virtualenv, but unfortunately you need virtualenv --enable-system-site-packages (or whatever that switch was)09:37
tristanbecause you cant install the pygobject parts with pip into a virtualenv, still, I'll include that story09:37
tristanFor a user, the best is `pip install --user .`09:38
tristanwhich can later be uninstalled with `pip uninstall buildstream`, but will have the side effect of user-installing the python deps09:38
tristanFor a developer, adding `-e` is better, but you dont get any man pages that way09:39
tristanpaulsher1ood, I'll try to add that section to the docs today, and change the repo's README.rst a bit to link out to things09:40
* tristan originally didnt want to have links in the README.rst because then he is stuck with more things to maintain whenever resources change09:40
tristanother than that my priorities this week are community outreach and submitting talk for guadec09:41
paulsher1oodafaict i need to be root to install things for buildstream in any case?09:46
paulsher1oodeg 'echo "deb http://ftp.uk.debian.org/debian/ testing main" >> /etc/apt/sources.list' doesn't work unless i'm root09:47
tristanpaulsher1ood, you need to be root to install the system requirements yes, including ostree and bubblewrap and pip itself09:47
paulsher1oodright. so setup.py can never address these things09:48
paulsher1oodhence in the absence of a 'packaged buildstream' i think think we *do* need something like (or better than) install_dependencies.sh09:49
tristanpaulsher1ood, the reason I strongly discourage using `sudo pip` is that having pip write to system folders is an invite for disaster, I had to manually delete things ("eggs" specifically) from my /usr/local/lib/python3.509:49
tristanin order to reproduce the installation, otherwise it was borked09:49
paulsher1oodi'm fine with that. my problems here are way earlier than that :)09:50
tristanpaulsher1ood, instead, a copy/pastable per-distro line like: `sudo apt-get install foo, bar, baz` in the getting started docs I think should be specific09:50
tristanerr s/specific/sufficient09:50
tristanI'm not fond of the idea of having a script which tries to determine what distro you have and launches the distro package manager for you09:51
paulsher1oodtristan: having a script is better imo, since it can be run by (say) a ci program09:51
tristanA ci program can know what distro it's running on09:51
tristanor conversely, it, itself can have it's own story of what it requires from the OS09:52
tristanI dont want to hear people saying "Your install_dependencies.sh does not work on arch/gentoo, this is a bug", that's a door better left closed09:53
paulsher1oodtristan: the current situation is worse than that, imo09:53
tristanpaulsher1ood, let me add the docs I've been meaning to add, then09:54
paulsher1oodsure09:54
tristanjonathanmaw, I've been wanting to ask you about some things btw...10:00
jonathanmawtristan: go ahead10:01
tristanjonathanmaw, since you are looking into some of the missing Sources, there are some things I find unsatisfactory about it's API10:01
tristanand wanted you to think a little on that10:01
tristanSome of that includes... right now we have get_unique_key(), and we have get_consistency(), which is a bit confusing...10:02
tristanOriginally, we did not have get_consistency(), and if get_unique_key() reported None, then it was assumed to be INCONSISTENT, but then there is also the required interrogation to see if the source is CACHED or not10:02
tristanjonathanmaw, it could be that what we have is best, or, it could be that adding a bool cached() abstract method would be better ?10:03
tristanjonathanmaw, the thing is, we might potentially be nearing a point where we can no longer make such drastic changes to the API10:03
tristanso it may be our last chances to have the most comprehensive API surface as possible10:04
tristanyou may have some creative ideas to make a smaller more elegant api surface while implementing Sources10:04
tristanjonathanmaw, another thing I'm not sure I like, is how we have track(), get_ref() and set_ref(), it feels a bit redundant10:05
tristanhowever get_ref()/set_ref() was done so that we can A.) report a newly tracked ref back to the master process after a track() activity,  B.) Set the ref in the master process data model before C.) rewriting the related elements in line10:06
jonathanmawtristan: hrm, I think track/get_ref/set_ref do different tasks, but they are often used together, the way we currently use them. I think they ought to be fine unless there's something wrong with the way we use them (I don't have enough experience with how that's done to have any opinions about that, currently)10:13
jonathanmawas far as consistency and get_unique_key, there does seem to be a bit of overlap, so I think we ought to consider if there's a way to make sure that's appropriate.10:14
jonathanmawI think get_unique_key is appropriate, so mostly I'm wondering whether there are parts of consistency that are redundant10:15
jonathanmawI think if we could rely on get_unique_key to return None when having a unique key is impossible (what currently has Consistency.INCONSISTENT), they get_consistency becomes a way of checking whether the ref is cached.10:17
jonathanmawthen again, I haven't had a look at the exact code, there might be issues of having the appropriate information at the appropriate time.10:17
*** jonathanmaw has quit IRC10:41
*** jonathanmaw has joined #buildstream11:34
tristanjonathanmaw, makes sense, yeah a None get_unique_key is redundant with an Consistency.INCONSISTENT value11:58
tristanthat is a sure thing basically11:58
tristanwe could have a cached() which replaces it, and possibly a documented guarantee in the Source docs that cached() will never be called if get_unique_key() has returned None11:59
tristanand remove get_consistency()11:59
tristanjonathanmaw, anyway, the building is not on fire but just wanted you to keep in mind that we can still make the API better, and if you have some ideas for that, around this time would be the best time :)12:00
tristanpaulsher1ood, https://buildstream.gitlab.io/buildstream/ now includes "Installing BuildStream" section, and the README now points to the docs12:02
* tristan is just heading out to lunch12:02
jonathanmawtristan: after a lot of fiddling with bzr, I have a quandary about url: Should it be the full URL, including branch name (e.g. https://launchpad.net/bzr/trunk), or just the repo name, with a separate field for the branch?12:26
jonathanmawgoing with just the repo name makes it easier to cache the repo and reduce duplication if we cache multiple branches12:27
jonathanmawthere doesn't seem to be any way to clone the entire bzr repo, AIUI12:28
jonathanmawhrm, I'll see if trove ever found a way to do that.12:28
jonathanmawaha, the tool I meant was "lorry"12:28
*** franred has quit IRC12:33
jonathanmawlooks like lorry expected it to be done by specifying a list of branches, so mystery black-box it is!12:33
*** franred has joined #buildstream12:35
jonathanmawalso, reading up on bzr, the revision number is unique to a repository, in principle, assuming every branch branched off the trunk at some point12:50
jonathanmawin reality, an individual revision is identified by the branch name and revision number12:50
jonathanmawso while I could copy the git model and have "track" for the branch, and "ref" for the revision, I would be using them for something significantly different compared to what git does.12:52
tristanjonathanmaw, I see...13:39
tristanSo... in that case, would it make sense that "For a bzr source, the 'track' parameter is a hard requirement to specify the branch, and running track() will update ref with the latest revision of that branch" ?13:40
tristansounds to me like it would work well enough13:41
jonathanmawyep13:41
jonathanmawand we want to make the revision number mandatory, to avoid changing from beneath us without us knowing about it.13:41
tristanyes, if the revision is stored as 'ref' and the regular 'ref' semantics apply, then buildstream will refuse to fetch (or consequently build) until that is resolved13:43
tristansounds like bzr greatly resembles svn13:44
jonathanmawhmm, to atomically branch within a repo, what I really need to do is create a tmpdir within the repo, and when I've finish branching, move the dir to its desired name15:48
jonathanmawthough I'm not sure if there's a way to atomically pull any new changes that might have come in15:49
*** tristan has quit IRC15:54
*** jude has quit IRC15:55
*** franred has quit IRC16:02
*** tristan has joined #buildstream16:02
*** ChanServ sets mode: +o tristan16:03
jonathanmawtristan: should I give up on atomicity, or accept that it'll pull the entire branch each time to make sure it's got the latest verson?16:04
tristanI16:04
tristansorry, I'm puzzled16:04
jonathanmawI'm not sure of any way to check I've got the right version that won't risk leaving the repo in a dodgy state16:04
jonathanmawsince it doesn't looks like bzr guarantees atomicity in its operations.16:04
tristanWell, there is no automation on our side for *creating* branches right ?16:05
tristanAnd what we need is only to find the latest revision of a given branch... to do that part, what is missing ?16:05
* tristan carefully rereads previous statements16:05
tristanI dont get "to atomically branch within a repo"16:06
jonathanmawtristan: bzr has unhelpful terminology to git users. branching with bzr includes pulling the source code in from a remote place16:07
tristanI see16:07
jonathanmawI do it in a repository, so we can make use of shared objects (or whatever their bzr equivalent is) when mirroring multiple branches16:07
jonathanmaw(bzr supports having branches that don't exist in a repository, if we're not actually interested in that)16:08
jonathanmawand bzr branch doesn't seem to be atomic, based on my experience of ctrl-C'ing branching from one dir to another16:08
tristanUmmm, ok I think I follow, so we have a "repository" for the mirror, as opposed to probably what a regular developer using bzr would use, which is something like a "checkout"16:08
jonathanmaw(du -sh reports different memory usage with a finished and unfinished dir)16:09
jonathanmawtristan: yep, we use a repository instead of a checkout, since ideally buildstream would be able to build without being connected to the internet16:09
jonathanmawassuming the code was all fetched beforehand16:09
tristanYep, ok so the concern now is that failing to mirror a branch can be bad16:10
jonathanmawyes16:10
tristanAnd possibly also, concurrent access to the same repo ?16:10
tristanthe second is corner case and plausibly workaroundable with file locking16:10
jonathanmawalso, that I don't think I can trust `bzr pull` (which fetches any new changes) to be atomic, either.16:10
jonathanmawI haven't thought about concurrent access, yet, but that's going to have trouble if we're not being atomic.16:11
tristanOk, so one solution about the branch you suggested is to get that branch into a temp directory, but then we lose out on shared objects ?16:11
jonathanmawtristan: unless that temp directory is in the repo, where we're using it for a random name that can't be guessed.16:12
tristanI was thinking that maybe, at the cost of some temporary disk space, we could A.) Mirror everything currently already mirrored into a temp dir, B.) Run the network operations in that temp dir instead and C.) If/When this succeeds, *replace* the original mirror with the now modified one ?16:13
tristanI have a feeling that we are going to want to fully prevent concurrency on some or all Sources16:14
tristan(unrelated to pull/fetch atomicity I think)16:14
tristanIt looks like ostree handles parallel fetches into the same mirror well16:15
tristanand git does not really lock for you16:15
tristani.e. https://gitlab.com/BuildStream/buildstream/issues/5 would also be "fixed" by this step16:16
jonathanmawok, so pulling a branch (taking in upstream changes) is a matter of: Branch into a tmpdir; Change the metadata so it recognizes the original upstream; bzr pull; move tmpdir on top of old branch.16:16
tristanand the core could handle it in one place so that Sources dont have to care, they just get the guarantee that "no Source shalt be operated on in parallel"16:16
tristanI dont understand the move tmpdir on top of the old branch16:17
tristanI was rather thinking, "Copy this whole mirror, all branches, everything, to tempdir"16:17
tristan"Do it there"16:17
tristan"If success, replace original mirror"16:17
jonathanmawtristan: aha, because we have no guarantee things are happening nicely to the shared object.16:18
tristanRight16:18
tristanand it feels a bit evil to step in and move things around internal of the repo16:18
tristans/evil/possibly error prone ?16:18
jonathanmawok16:21
tristanalright sounds like a sane solution16:21
tristanI guess nothing bad is going to happen when, e.g., we 'track' a bzr branch only to find that no new revision existed in the first place16:22
tristanno real need to case that differently16:23
*** ssam2 has quit IRC16:27
*** xjuan has joined #buildstream16:31
jonathanmawtristan: though if every time we check for updates it takes as much work as cloning from scratch, I don't think we're saving any thing by caching.16:34
tristanjonathanmaw, is that really true, though ?16:39
tristanjonathanmaw, I mean, in the above scenario, we double the local mirror into a temp dir and do the "Get me the latest of this branch, which might already be here" in there16:40
tristanJust for atomicity16:40
tristanWe still use that whatever bzr provides to get the latest of that branch in that tmp dir16:40
jonathanmawtristan: hrm, I suppose not in that case. I'll have to think about the other cases.16:40
*** ssam2 has joined #buildstream16:41
tristanthe case of "Ensure we have this ref" (i.e. fetch), is; we ideally want to download as little as possible16:41
tristanbut may need the entire 'track' specified branch16:41
tristanonly in the case that we find that, "we do not have this revision/branch locally"16:42
*** tiagogomes has quit IRC16:56
*** tristan has quit IRC16:57
*** jonathanmaw has quit IRC17:11
*** ssam2 has quit IRC17:14
*** xjuan has quit IRC19:01
*** xjuan has joined #buildstream21:18
*** xjuan has quit IRC23:57

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