IRC logs for #buildstream for Tuesday, 2017-06-20

*** tristan has joined #buildstream05:06
*** ChanServ sets mode: +o tristan05:11
*** tlater has joined #buildstream07:49
*** ssam2 has joined #buildstream08:30
*** ssam2 has quit IRC08:34
*** ssam2 has joined #buildstream08:35
*** jonathanmaw has joined #buildstream08:50
*** tiagogomes has joined #buildstream09:11
gitlab-br-botpush on buildstream@master (by Tristan Van Berkom): 1 commit (last: _sandboxbwrap.py: Fix race condition when removing bwrap devices) https://gitlab.com/BuildStream/buildstream/commit/e72fb745e2c4d2934988403ea3de48d697672a3e09:20
tristantlater, you need to fix your MR branch09:27
tristantlater, it looks like you have some weird merges on your branch09:28
tlaterI'll have a look in a bit, I had to fix a few commits because they included work on the source-bundle command09:29
tristantlater, what you are going to need to do is: git remote add upstream git@gitlab.com:BuildStream/buildstream.git09:29
tristangit fetch upstream09:29
tristangit checkout master09:29
tristangit rebase upstream/master09:29
tristangit checkout except09:30
tristangit rebase master09:30
tristanand fix the conflicts09:30
tristantlater, in other words, your proposed MR branches always have to be composed of only a clean series of commits ahead of upstream/master09:30
tlaterI thought I did. Might have been the wrong branch09:31
jonathanmawtristan: part of dpkg build elements is generating the split rules from what's been built.09:36
jonathanmawlooking at how the splits are stored (Element.__splits), it seems there won't be a simple way of altering it09:37
jonathanmawmy first idea was to give element.py a set_public_data method09:37
jonathanmawbut it seems I'd also have to call __init_splits() afterwards, anyway.09:38
jonathanmawwhich if I understand python class idioms correctly, I should only use members with __ prefixed in  the classes that own them09:38
tristanjonathanmaw, that's the part I wanted you to set aside for now right ?09:40
tristanjonathanmaw, dont bother with that part... it needs artifact refactoring first09:40
tristanjonathanmaw, what we're going to do, is allow the assemble method to set_public_data() before returning, and the final public data will be recorded in the artifact09:41
jonathanmawtristan: ok, should I go straight into mangling __splits for my own purposes?09:41
tristanjonathanmaw, when the next element builds, it will have to reload some state taking artifact encoded metadata into account09:41
tristanjonathanmaw, I dont think you should do that at all no.09:42
tristanjonathanmaw, instead, you should go ahead and try to create a packaging element, with hardcoded data encoded into the split-rules09:42
tristani.e. assume that all that is all taken care of09:42
tristanso you edit foo-build.bst and add stuff to the public split data09:42
tristanthen you run foo-package.bst to package that element09:43
jonathanmawok09:43
tristanI had better implement globbing on the split rules before we start using them too much09:43
tristanjuergbi, ssam2 what do you guys think about that too ?09:44
tristanMy thoughts are that regexes are write-only read-never crazy crap that normal humans dont understand, including seasoned developers09:44
tristanand if we're wildcarding filename paths, glob is a much more human friendly syntax for that09:44
ssam2hmm09:45
tristanAlso, I have code which does proper globbing on lists of filenames in python09:45
ssam2globs for spit rules would be fine I think09:45
juergbiyes, globs make more sense for custom split rules09:45
juergbipower of regexps shouldn't be needed for that09:45
tristan(the default python glob module only works with a filesys in context, but I have something already in tarball source plugin)09:45
tristanOk good, we agree on that :)09:46
ssam2I've not seen any rules in Baserock that actually did more than /usr/lib64/.*09:46
ssam2another concern is how they override each other09:46
tristanssam2, look at glibc09:46
tristanssam2, that is actually not a concern, intentionally09:46
tristanssam2, in otherwords, there is no rule that split rules may not overlap with eachother09:47
ssam2ok, so in the case of overlaps how do you decide where to put a file ?09:47
tristanwell, first, split rules is public data, so any element can do whatever they want with it09:48
tristanbut I think your question is mostly regarding the compose element09:48
tristanwhich is the only element in buildstream which uses it :)09:48
ssam2right09:48
tristanhttps://buildstream.gitlab.io/buildstream/elements/compose.html#module-elements.compose09:48
tristanssam2, I think it's pretty straightforward docs, is there something still unclear after looking at that ?09:49
ssam2hmm09:49
ssam2so if I want to produce foo-bin and foo-devel, I'd have *two* compose elements, one for each ?09:49
ssam2and foo-bin would include whatever domains existed in the elements.. yeah seems fine09:49
tristanssam2, correct09:50
tristanssam2, however I suspect that the debian packaging element for instance, will also consume split rules on it's own terms09:50
ssam2OK cool. This sounds much more easy to reason about than the Baserock system, anyway09:50
ssam2which was the main issue with it ... i could never actually figure it out :-)09:50
tristanso you wont need to compose things before feeding composed things to a dpkg creating element09:50
tristanssam2, we have a thread about it's brokenness09:51
ssam2right, I guess compose would be for things like the Freedesktop 'Base' and 'SDK' sysroots ?09:51
tristanI concluded that thread with a statement that nobody has actually been able to demonstrate that it actually ever worked, ever09:51
tristanAnd Paul made a smart alec retort that I was not able to prove that it never did :)09:52
tristanHowever it's irrelevant09:52
tristanssam2, yeah compose will be useful to GNOME for composing flatpak runtimes indeed09:53
tristanssam2, but we also use it for composing an initramfs system (integrated with some fat cut out of it)09:53
tristanand for composing a full system to feed to an x86image element (we want a staged, *integrated* system in a sub directory where we can wrap it all up into a bootable image)09:54
ssam2ah yes09:54
ssam2I even copied that initramfs.bst definition but obviously didn't read it enough :-)09:55
tristannow you know what it does :)09:55
gitlab-br-botbuildstream: merge request (except->master: WIP: Add a --except flag to show, fetch and track) #26 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/2610:10
tristannice, the storaged-project devs ate up my patches quickly10:35
gitlab-br-botbuildstream: merge request (except->master: Add a --except flag to show, fetch and track) #26 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/2610:36
* tristan now has a very strange bug10:36
tristanIt seems phodav builds fine in jhbuild but craps out in buildstream sandbox10:37
tristanand the really weird thing... is that it craps out on autogen.sh, before doing anything10:37
tlatertristan: Is the MR ok like that?10:37
tristanI am between things :)10:54
tristanlemme see10:55
*** tristan has quit IRC11:54
*** tristan has joined #buildstream12:54
*** ChanServ sets mode: +o tristan12:56
*** tlater has quit IRC13:18
*** tlater has joined #buildstream13:19
tristanoh holy crap13:34
tristanwhat did I do13:34
tristannah, I dont think I screwed it up okay13:35
tristanwhew13:35
tristantlater, ok I dont know what your doing there, but you dont have a proper branch13:38
tristanit's all screwed with merges13:38
tlater:(13:38
tristantlater, just never, ever, run "git merge"13:38
tristanalways rebase13:38
tristanI just fetched again13:38
tristanand when I checkout the except branch and try rebase against master, it conflicts right away on: Applying: WIP: add `bst source-bundle` command13:39
tristanthat commit should not even be on the branch13:39
tristantlater, you can see there is something wrong right away looking at https://gitlab.com/BuildStream/buildstream/merge_requests/26 ... the merge request has 68 (!!) commits13:40
tristantlater, at this point, I think you screwed your local workflow somehow, so I suggest you do something a bit different13:41
tristanoh, crap, ok so... you have commits on your fork's master, even13:41
tristanouch13:41
tlaterI've always merged, discovered rebase the other day... This should still be fixable, I think.13:42
tristantlater, not sure exactly how you are going to untangle it but I suggest you start over... i.e.: locally keep your git repo, delete your gitlab fork and create a new one13:42
gitlab-br-botpush on buildstream@master (by Tristan Van Berkom): 3 commits (last: sandbox.py: Added INTERACTIVE sandbox flag) https://gitlab.com/BuildStream/buildstream/commit/640d014d404198bd9d074cc88914989e636c710a13:42
tristantlater, then, in your local checkout of your new gitlab fork, first *create a branch* (never commit to your fork's master, that'll break your workflow)13:43
tristanand then what you can do is restage new commits from your old repo that you keep on hand13:43
tristantlater, I have a feeling that will be easier than trying to deal with the franken-git you have created13:44
tlaterAnd then rebase the result?13:44
tristanIt will already be rebased since it's a new fork13:44
tlaterWell, I'll do that. Should hopefully not be too bad.13:45
tristantlater, the point is that you always work on branches that you regularly rebase against upstream master13:45
tlaterI did that - unfortunately I regularly merged with upstream master, instead of rebasing.13:45
tristanso, you will need that 'git remote add upstream <upstream-buildstream-url>' stuff I showed you above13:45
tristanand all of your work goes into local *branches*13:46
tristanyou can regularly get *your* master in sync with upstream master, by doing `git fetch upstream && git checkout master && git rebase upstream/master && git push origin master`13:47
tristanthat'll update your remote gitlab repo with the upstream changes in master13:47
tlaterOn the upside, realizing rebase exists is going to fix a lot of issues I've had in the past.13:47
tristanin fact, in that case, you can do `git merge upstream/master` and it will be equivalent, as long as you never merge *your* branches into *your* master13:48
tristantlater, ok... so since you learned rebase... note that in your own wip branches, before submitting MRs, you should probably normally do `git rebase --interactive master`13:48
tristantlater, that is one of the coolest things that git does for you13:48
tristanlets you prepare a sane history and remove/squash commits that are not sane for master's history, before submitting13:49
tristanI.e. we want a few, comprehensive commits in a merge request, not 20 commits that include reverts of things you were trying out while developing13:49
tristantlater, I think what might help you stage new commits from your old git would be to, from your old git, do the `git remote add upstream && git fetch upstream`... and then, from your except branch, run `git diff upstream/master`13:54
tristanthat will give you both changes which occurred in master and in your branch13:55
tristanbut might be helpful13:55
tristanor maybe you have intimate knowledge enough of which patches/commits should be there and which should not13:55
ssam2tristan, it seems that utils._relative_symlink_target() is causing an issue13:56
ssam2what problem is that function there to solve?13:56
tristanssam2, could be, that thing is a bit wild, what's the issue ?13:56
ssam2urgh, the issue is also wild13:57
tristanssam2, it ensures that we never stage any absolute path symlinks13:57
ssam2basically my /lib in the armv8l64 rootfs contains this:13:57
ssam2ld-linux-aarch64.so.1 -> ../tools/lib/ld-linux-aarch64.so.113:57
ssam2now, that would be fine except /lib is actually a symlink to /usr/lib13:57
tristanRight13:57
ssam2and from /usr/lib the relative symlink doesn't work any more13:57
tristanAh interesting13:58
tristanssam2, Ok so, I have a similar issue13:58
ssam2this doesn't hit other platforms I guess cus they use /lib64, which isn't a symlink13:58
ssam2i guess x86_32 must also suffer this, though13:58
tristanwhich is that /usr/sbin/init is a symlink to /usr/lib/systemd or similar13:58
tristanand then the link doesnt make sense at boot time13:58
tristanssam2, do you think that using a realpath expansion on the target might work ?13:59
ssam2i can try it13:59
tristanlike, before relativ-izing it ?13:59
ssam2hmm, no because we're not in a sandbox here14:00
ssam2so os.realpath(target) gets /mnt/build/src/definitions/usr/lib14:00
tristanssam2, fwiw, that code comes originally from YBD, without ensuring relative symlinks, YBD (running as root), silently overwrites things on your host while staging things14:00
ssam2but I guess we could snip off the root afterwards14:00
ssam2ha, i guess that's also bad14:01
tristanssam2, yes, that is why I said *before relativizing it*14:01
tristanbut it is a bit hairy in there I admit :)14:01
gitlab-br-botbuildstream: merge request (except->master: Add a --except flag to show, fetch and track) #26 changed state ("closed"): https://gitlab.com/BuildStream/buildstream/merge_requests/2614:12
tlaterThere we go. I just used cherry pick to apply the commits I wanted. Not the first time I've done this - I just always stupidly thought things got messy if you lag behind the main branch.14:13
tristantlater, thats not stupid at all, just keep your main branch clean and dont put any commits on it14:19
tristananyway, its good to constantly rebase against master (and keep your master up to date with upstream/master)14:21
tlaterYeah, this is going to change my workflow quite significantly. Either way, the MR is up (without merges this time), have a peek when you have time :)14:23
tristanok, 10 commits is better14:26
tristantlater, now you can do `git rebase --interactive master` in your except branch14:26
tristantlater, there is no need for "Fix styling issues" commits in master14:27
tlaterWhat do I do to those?14:27
tristantlater, i.e. you should be able to compose a history that just does what you intend to submit, not all this history of fixups and stuff14:27
tristaneh, well in that case, since you have commits which go and modify many files at once14:28
tristanI would do a soft reset and reconstruct the branch from scratch14:28
tlaterThis could just be one commit, in this case14:28
tristantlater, to make sure you dont get stuck in a corner... create a temp branch first14:29
tristanlike14:29
tristangit checkout except && git checkout -b temp14:29
tristanthen: git reset master14:29
tristannow you have all your changes against master unstaged14:29
tristangit diff --stat14:29
tlaterI can also just squash them all14:29
tristanok, git commit buildstream/_pipeline.py -m "Adding some API to pipeline ..."14:29
tlaterAnd give them a better name14:30
tristansquash all into one commit ?14:30
tristana bit yuck14:30
tristanit would be one huge commit with https://gitlab.com/BuildStream/buildstream/merge_requests/27/diffs14:30
tristantlater, I think this MR is 3 commits logically14:31
tristan1.) Add some API to the pipeline14:31
tristan2.) Update frontend commands, removing the old unused function14:31
tristan3.) Added test case14:31
tlaterOk, that's probably better14:31
tristanthe code looks pretty fine fwiw, but lets get used to creating a nice history :)14:32
tristanit pays off in the long run to have a nice comprehensive history14:33
tlaterMessy histories have been the bane of every project I've done by myself. This git command is a revelation to me.14:34
tlaterAlright, so this should hopefully not be a problem anymore.14:51
tlaterMR is up :)14:51
ssam2yay! armv8l64 sysroot now has a working native compiler14:57
ironfootssam2:  :D15:07
jonathanmawIs there a good way of testing whether my split-rules have been applied?15:08
tristanjonathanmaw, I have to run but... compose element ?15:09
jonathanmawtristan: aha15:10
*** tristan has quit IRC15:13
gitlab-br-botbuildstream: merge request (except->master: Add a --except flag to fetch, track and show) #27 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/2715:23
ssam2bah, scripts/config from linux.git requires bash15:55
ssam2my plan for a stage2-linux.bst is perhaps foiled15:56
ssam2ah wait, it's my host tools that need Bash15:57
ssam2so that's easier15:57
gitlab-br-botbuildstream: merge request (except->master: Add a --except flag to fetch, track and show) #27 changed state ("closed"): https://gitlab.com/BuildStream/buildstream/merge_requests/2716:31
gitlab-br-botbuildstream: merge request (except->master: Add --except to fetch, track and show) #28 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/2816:37
*** tlater has quit IRC16:41
*** jonathanmaw has quit IRC17:01
*** ssam2 has quit IRC17:08
*** tristan has joined #buildstream18:02
*** ChanServ sets mode: +o tristan18:06
gitlab-br-botbuildstream: merge request (sam/symlinks-fix->master: utils.py: Fix corner case in relative_symlink_path() that breaks builds) #29 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/2918:25
gitlab-br-botbuildstream: merge request (jonathan/fix-bzr-source->master: bzr source: Make sure the stage directory exists before bzr fetching) #30 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/3019:38

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