IRC logs for #buildstream for Monday, 2017-06-26

*** tristan has quit IRC07:20
*** tristan has joined #buildstream07:49
*** tlater has joined #buildstream08:02
*** jonathanmaw has joined #buildstream08:09
*** tristanmaat has joined #buildstream08:20
*** tristanmaat has quit IRC08:21
jonathanmawtristan: Would I be correct in thinking that the dpkg conversion script task should generate all the necessary .bst metadata, but creating a repository of the source is the user's responsibility?08:40
*** ChanServ sets mode: +o ironfoot08:43
jonathanmawtristan: I can forsee us having problems with assuming that a debian package's dependencies can be translated into a .bst08:48
jonathanmawchiefly, that one source can generate multiple packages, and the dpkg build element is performed on a source and creates packages as splits within it08:49
jonathanmawand packages aren't always prefixed with the source package (i.e. python3-defaults-debian produces idle3, python3-* and libpython3-*)08:52
*** tiagogomes has joined #buildstream09:09
*** ssam2 has joined #buildstream09:09
*** tiagogomes has quit IRC09:13
*** tiagogomes has joined #buildstream09:14
ssam2just to check, the script element's 'layout' config option can't deal with artifact splits right ?10:01
ssam2I need a separate 'compose' element first to remove junk that I don't need from my image ?10:01
jonathanmawssam2: yep10:02
gitlab-br-botbuildstream: merge request (artifact-share->master: Artifact Cache Sharing) #38 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/3810:03
ssam2\o/10:03
tristanjonathanmaw, ok so taking dpkg-deploy discussion here...10:07
tristanjonathanmaw, agreed that scriptlets pre/post inst/rm scriptlets are generic enough that they may apply to multiple packaging systems10:07
tristanjonathanmaw, *however* there is a catch10:07
tristanif we're going to make something generic for this kind of scriptlet, we have to recognize the different semantics of these with different packaging systems10:08
tristanand document the specifics and limitations around this10:08
tristanfor instance, as I recall the rpm scriptlets are invoked with an argument10:08
tristanI forget exactly the detail, but it's a number10:09
tristanprobably something convenient can be done so that pre/post inst/rm scriptlets can be embedded into a generated package scriptlet and fit the bill for multiple package based deployment systems10:09
tristanregarding debian/control10:10
tristanI'm still unclear about what you mean by this, i.e.: I dont know what is in that control file, you do10:10
tristanheh10:10
tristanI know it's a file with some metadata, I dont know what exactly the metadata is10:10
tristantlater, your patch is getting warmer... lemme add some comments...10:11
tlaterOkay :)10:12
jonathanmawtristan: debian/control contains all of the package's metadata. Information that would be potentially useful is that it lists pre-depends (not sure what that is), depends, suggests, replaces and provides10:13
jonathanmaw(potentially useful to non-debian deployment)10:19
jonathanmawtristan: as for rpm scriptlets, they usually go10:23
jonathanmaw<command-name> [-n <package>][-p <interpreter>]10:23
jonathanmaw<script body>10:23
jonathanmawwhich should be parsable from the metadata available currently if we parse the shebang for the appropriate interpreter10:25
tristantlater, ok comments up !10:25
tlaterOk10:26
tristanjonathanmaw, right that is what is in a spec file, and that's not exactly what I mean :)10:26
tlaterThe comment on the subshell (set -e thing), some build scripts seem to assume that each command is executed in its own shell. In particular, glibc fails without that.10:27
tristanjonathanmaw, I mean, you will find that some %postinst scriptlets start with `if [ "$1" -eq "0" ]; then ...`10:27
jonathanmawah10:27
jonathanmawhrm10:27
tristantlater, good point10:28
tristantlater, in which case, it makes more sense then to have the function return an array of script strings, instead of returning one fat script string10:28
tristanMaybe or maybe not10:29
tristanlets think of that a bit10:29
tlaterI think it makes more sense to the user not to need to know that subshells may be necessary.10:29
tristantlater, one argument for keeping it that way, is that the buildelement.py itself is the one responsible for calling the sandbox with `sh -e`10:29
tristanso in theory, if an element wants to create a script without that criteria, they no longer can if we make an api that doesnt allow it10:30
*** jonathanmaw has quit IRC10:33
tristantlater, I think I redact that comment, and that you are right, it should generate a single script fragment10:35
tristanalthough we should take also a moment to consider what criteria and guarantees buildstream makes about the execution environment of that fragment, and document that on the public API10:36
*** jonathanmaw has joined #buildstream10:49
*** jonathanmaw has quit IRC11:28
*** jonathanmaw has joined #buildstream11:44
tristanjuergbi, so... I sort of feel gross about passing a plugin object down into the guts of _ostree.py directly; on the one hand, I dont want to delay this merge further; on the other hand, I feel like I'm really going to have this itching desire to just create a utils._call() utility method similar to the current Plugin.__call() but without the self references (probably by just having output_file as an optional parameter defaulting to sys.stdout)12:12
juergbiyes, it's not ideal12:13
juergbitristan: would you prefer passing a function reference to plugin.call down to ostree.py instead of the plugin itself?12:14
juergbigoing via plugin is convenient with regards to logging etc.12:15
tristanjuergbi, I would prefer that utils.py offer a utility for doing the call(), and that plugin.py use that function12:15
tristana private utility12:15
jonathanmawhrm, writing split-rules in public data doesn't override the defaults, so I can't cut out the "packages" variable from dpkg-deployment elements12:16
tristanI feel like, from the high levels, I really dont mind that say, _pipeline.py is doing self.toplevel.call()12:16
tristanjuergbi, but I just feel gross about crossing the stack that way, while _ostree.py is a rather low level utility layer12:17
gitlab-br-botbuildstream: merge request (tristan/source-bundle->master: Add source-bundle command) #35 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/3512:17
juergbitristan: yes, i understand the concern12:17
juergbitristan: hence my question about passing a function reference. strictly speaking, _ostree.py wouldn't know anything about Plugin class in that case12:17
juergbiit just knows the function signature12:17
juergbiif we can move it to util with clean logging etc. with ease, that would definitely be fine, of course12:18
tristanI would still want to shuffle things around12:18
juergbiok. after merge or shall i give it a try before?12:19
tristanjuergbi, it would mean that in plugin.py, self.__call() would itself have to do the __note_command()12:19
tristanand it would have to pass the self._output_file()12:19
tristanto the utility12:19
tristanjuergbi, well, I already made one more comment that I think we should change12:19
tristandid you see, regarding the bin/ scripts ?12:20
juergbiyes, i agree, it makes sense12:20
juergbiit's not for users12:20
juergbijust have to figure out how to handlethis with setuptools12:20
juergbi(don't really know that at all)12:20
tristanah, there are a couple more things too12:21
tristanjuergbi, so put it in the same place data/ directory12:21
tristanand with setup.py add those to the same place as the default configs12:21
tristanjuergbi, then add a line to _site.py, which will tell you the absolute path of where to find it in the installation12:22
juergbiok, thanks for the info12:23
tlaterI've finished making the changes for my PR, would you mind checking tristan? In particular, I'm not sure if the API doc is detailed enough.12:23
tristanjuergbi, added one more comment there regarding `bst fetch` expected behavior12:25
tristanjonathanmaw, I again dont understand12:25
tristanjonathanmaw, I dont know what the "packages" variable is12:26
juergbiok, makes sense12:26
jonathanmawtristan: I'm using the "packages" variable as a way to identify which packages should be generated12:26
tristanjonathanmaw, still not following, ok so; first of all; is it not correct to just make one for every defined split domain ?12:27
jonathanmawboth for which packages to be staged into subdirs, and which subdirs to have `dpkg-deb --build` called in12:27
jonathanmaw"every defined split domain" includes the defaults12:27
tristanAnd in that case, do we have a problem inasmuchas, we are unable to remove the defaults ?12:28
tristanjuergbi, one last thing; I heard wind of your working on documentation for this, I would like it to be an added rst file to docs/sources12:31
tristanprobably a stand alone section in the beginning about hosting an artifact share would be good (not a moving part / wiki page / have to maintain separately kind of thing)12:31
tristantlater, I'm mostly happy with your new MR12:32
tristantlater, please stop making python files 075512:32
tristanand rebase12:32
tlaterI wasn't even aware of that. I'll have to check why that happens.12:34
tristan:)12:34
tristanactually, _frontend/main.py is executable, but even that is unnecessary, not sure why I did that12:35
tristanor if it was me12:35
tlaterShould I add a "Fix all permissions" commit?12:36
tristantlater, sure I'm fine with that12:36
tristanas it'll save you time in rebasing12:36
jonathanmawtristan: I'm not sure how I would go about removing the defaults in that specific case.12:39
* jonathanmaw has a look at how the split rules are generated12:40
*** tlater has left #buildstream12:41
*** tlater has joined #buildstream12:41
tristanjonathanmaw, right so... sorry I've been looking at other patches12:43
tristanbut you have a legitimate issue12:43
tristanjonathanmaw, there are a couple of things to consider here, one is that with an Element.set_public() API, we should be able to explicitly manipulate the public data how we want12:44
tristanjonathanmaw, another thing though, is that it may be desirable to eliminate things explicitly12:44
tlaterJust to make sure I'm doing the right thing here, should I rebase to make things neat and then --force push onto my branch?12:45
tristanjonathanmaw, Now one way, is to say something explicit like public-data: bst: split-rules: devel: []12:45
tristanjonathanmaw, I think that should entirely wipe out the content of 'devel' for instance, which might be meaningful12:46
jonathanmawok, so override the split-rules by making them an empty dict12:46
jonathanmawright, that should work12:46
jonathanmawta tristan12:46
tristanbut it doesnt provide a YAML semantic for nuking a dict member either12:46
tristanjonathanmaw, I still think this is a sub-par solution to this kind of problem, so I'll see if I can come up with better maybe after sleeping on that12:47
tristanlet me know if you have any ideas, I think ideally it would be nice to have the option of wiping out an entire dict, but the way we do dictionary compositing doesnt currently allow for something like that12:48
tristanjonathanmaw, maaaybe if an empty dict is specified in yaml format (I dont know, is that expressed as {} ?) then we could handle that as a case in the compositing code to allow wiping out a dict completely ?12:49
tristantlater, you should rebase your local branch against fresh upstream/master, and overwrite your gitlab branch with that yes12:49
tristantlater, I normally do this as `git push origin :my-branch && git push origin my-branch:my-branch` (I delete and recreate)12:50
tristanbut I think I heard rumors about a --force option to git push12:50
tristanI just dont know what that does :)12:50
tlaterPretty sure it does just that ;)12:51
tristan:)12:53
* tristan disappears for the night12:59
tlatero/13:00
tristan\o13:00
jonathanmawo/13:01
*** tristan has quit IRC13:04
gitlab-br-botbuildstream: merge request (tristan/source-bundle->master: Add source-bundle command) #35 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/3513:12
gitlab-br-botbuildstream: merge request (tristan/source-bundle->master: Add source-bundle command) #35 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/3513:15
*** tristan has joined #buildstream13:28
*** tlater` has joined #buildstream14:00
*** tlater has quit IRC14:01
*** jude has joined #buildstream14:27
gitlab-br-botbuildstream: merge request (sam/docker->master: contrib: Add Docker image for running BuildStream) #39 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/3915:48
gitlab-br-botbuildstream: merge request (jonathan/dpkg-build->master: WIP: Jonathan/dpkg build) #37 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/3715:49
*** jonathanmaw has quit IRC16:20
gitlab-br-botbuildstream: merge request (tristan/test_tests->master: WIP: Add integration tests) #40 changed state ("opened"): https://gitlab.com/BuildStream/buildstream/merge_requests/4016:37
*** tlater` has quit IRC16:41
*** ssam2 has quit IRC16:59
*** ssam2 has joined #buildstream17:00
*** ssam2 has quit IRC18:30
*** jude has quit IRC18:42
*** jude has joined #buildstream19:23
*** jude has quit IRC20:15

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