IRC logs for #baserock for Wednesday, 2016-06-29

*** edcragg has quit IRC00:02
*** gtristan has quit IRC02:58
*** gtristan has joined #baserock03:41
*** gtristan has quit IRC04:35
*** gtristan has joined #baserock04:35
*** fay_ has joined #baserock07:10
*** toscalix has joined #baserock07:28
*** ctbruce has joined #baserock07:37
*** edcragg has joined #baserock08:01
*** anahuelamo_ has joined #baserock08:33
*** anahuelamo has quit IRC08:33
*** jonathanmaw has joined #baserock08:39
*** edcragg has quit IRC08:48
*** edcragg has joined #baserock09:16
*** lc_ has joined #baserock09:17
*** lc_ has quit IRC09:34
*** locallycompact has joined #baserock09:41
*** gtristan has quit IRC12:54
leemingyaml question for the python people13:22
leemingyy=yaml.load(open('this-is-my.morph','r')) ... if I try to print yy['build-commands'] the newlines seem to be escaped13:23
leemingis there some magic other than a dirty looking : print "%s"%yy['install-commands'][0]13:24
leeming^ assume install<>build13:24
edcraggit might just escape it when it prints it?13:24
richard_mawthere's a couple of levels of escaping involved, with print, it should only be the newline escaping of shell commands13:25
jmacsCan you paste your morph?13:25
jmacsI only see the escaped newlines when I print the entirety of the 'install-commands' array13:28
jmacsprint yy['install-commands'][0] is fine13:28
*** gtristan has joined #baserock13:35
*** tiagogomes has quit IRC13:39
leemingjmacs, ahh i didnt try the simple combo, yea that works13:42
leemingany reason why it is a list anyway?13:42
pedroalvarezinstall-commands is a list, so that you can put various commands, and not only one?13:44
pedroalvarez*-commands13:44
jmacsYes13:47
pedroalvarezhere some documentation, although might not be the best: https://docs.baserock.org/spec/#definitions-file-syntax13:47
franredor complete13:48
franredI think system-integration-commands are missing there13:49
*** tiagogomes has joined #baserock13:52
leemingpedroalvarez, oh that will be of use for my tool.... I wonder why my silly little brain didn't think to look for baserock docs for definitions :S13:56
locallycompactwhen id baserock get such pretty docs13:57
leemingas for the list of commands... not sure if there is a reason (or if it matters - styling?) why the chunks im currently working with just have ' -| ' then ALL build commands in a single block13:58
jmacsCan you point us at an example?13:58
* leeming points at locallycompact 13:58
leemingexamples are all... urm proprietary13:58
* locallycompact sets an example13:58
pedroalvarezlocallycompact: 4 months ago: https://gerrit.baserock.org/#/c/1934/13:58
locallycompactleeming, make a simple non-proprietary example13:59
locallycompactthen we can have a test case for this13:59
pedroalvarezleeming: every line on  the list of *-commands will be executed in a new shell14:00
jmacsAll the examples I can find have all the commands as separate YAML elements, which I think I'd prefer14:00
leemingname: foo14:00
leemingkind: morph14:00
leemingbuild-commands:14:00
leeming-|14:00
leeming  cd somewhere14:00
leeming  cp files /to/here/please14:00
leeming  make14:00
pedroalvarezexecuting all of it in a single - | will let you do things like "cd to somewhere", or "set environment variables"14:00
locallycompact^14:00
leemingnew shell per item in list? ah so any cd/exports set will not survive14:01
pedroalvarezif splitting into different elements in that list, the build tool might give you better error messages14:02
leeming^ well ive noticed that, error is closer to origin, instead of just saying ' error somewhere in this block'14:02
leemingpedroalvarez, wait... i think i miss-understood... new shell per {build-commands, install-commands, etc} , or new shell per item in the list (inside build-commands)14:04
pedroalvarezper item in every *-commands list14:04
leeminghttp://paste.baserock.org/jaziromipu14:06
leemingor ....14:06
pedroalvarezyes14:06
persiaFor build sanity, using subshells per-command helps one deal with changes more easily.14:07
pedroalvarezin that example, #shell-1 is useless14:07
leeminghttp://paste.baserock.org/vuqirazemu14:07
persia(yes, this means no cd, no foreach, etc.)14:07
pedroalvarezleeming: the first example, http://paste.baserock.org/jaziromipu, is the right one14:07
leemingah ok then14:08
leemingthen it isn't clear when/why you wouldn't want to use a block " -| " then14:08
persialeeming: Rather than cd; cp try `cp ${cd destination}/files /to/here/please`14:08
leemingurgh bash 1 liners14:08
persiaUsing a block means that you have a shell script in yaml ,which is prone to the same class of bugs as shell scripting in make.14:09
persiaSo, as with make, the best practice is to write each shell command to be self-sufficient.14:09
leemingI see14:10
persia(one of the most common mistakes in such situations is failing to double-escape newlines)14:10
leemingbut in rpm spec world, using a block per 'section' is sane then14:10
leemingtranslating spec2def that is14:10
leemingnice to know there is actaully a difference between '-|' and multiple '-'. I thought it was just a styling thing14:12
persiaWhere 'section' is %build, %install, %files, etc.?14:12
*** janderJLR has quit IRC14:13
persiaUgh.  I like spec files even less than I did before.  Yes, you would want one block per section if you don't want to hand-edit anything.14:13
*** janderJLR has joined #baserock14:14
persiaThat said, you'll need some way to expand or work around macros: there's nothing equivalent as far as I know.  Of course, most macros are irrelevant, as they do things like unpack tarballs.14:15
persiaAnd %files isn't actually a shall script, so needs to be treated differently.  As far as I can tell, %files is processed line-by-line, rather than in a block, so ought be individual YAML elements.14:16
persiaNote also that any use of %post will mean the installation isn't reproducible, so take care there14:18
franredit is line by line but in blocks or sections AFAICR14:19
persiaI believe spec files have one %files section for each split artifact (this is how they do artifact splitting).  Translating that to definitions artifact splitting may be tricky.14:22
persiaBut each line is independent, so if any line has side effects, this should not affect the other lines, etc.14:23
*** tiagogomes has quit IRC14:42
leemingpersia, Sorry missed that there, yes section = %thingies. I've done some basic expansion on macros commonly used in my project specs14:54
*** tiagogomes has joined #baserock14:54
leemingnot sure how reusable my tool is yet. give me a few days and i will report back on how generic it is/ if it breaks on certain stuff14:55
leeminglocallycompact, is this helpful/known about/still maintained http://git.baserock.org/cgit/baserock/baserock/spec.git/tree/schemas/baserock.owl14:55
leeming^ re ontologies14:55
locallycompactIt's certainly maintained yes14:56
leeming"This will involve14:56
leemingremoving the current 'Chunk', 'Stratum', 'System' and 'Cluster' classes, and14:56
leemingadding something like 'thing with build instructions' and 'thing that contains14:56
leemingother things' instead. Name suggestions are welcome :-)"14:56
leeminghow close/ has there been any movement on that statement?14:57
locallycompactwhere is that statement14:57
leeminghttp://git.baserock.org/cgit/baserock/baserock/spec.git/tree/schemas/README.schemas14:57
locallycompactAh k14:59
leemingjust unsure if there is crossover with some of the things youve mentioned to me15:00
leemingif it is still active/forgotten about/not related15:00
*** anahuelamo has joined #baserock15:01
*** anahuelamo_ has quit IRC15:01
locallycompactleeming, that repo is the official baserock spec, the "idea" was to use automated reasoning tools to do ontology translation between other things that are things capable of being used to build artifacts15:02
locallycompactthe problem is I don't know/am not familiar with any such tools15:02
locallycompactand also rdf/owl is a pain which is which I'd rather aim towards FQL/OPL/AQL15:03
leemingi dont know very much when it comes to ontology languages15:03
locallycompactbut getting rdf/owl doing something interesting would be a massive win15:03
leemingi just pointed just en case it was a hidden/not thought of route15:03
paulsher1oodleeming: ybd already does its best to treat 'chunks' and 'strata' as 'contents'15:04
* leeming wouldn't mind learning and implementing some abstract model/ontology for all this, but time and stuff15:04
*** gtristan has quit IRC15:06
*** gtristan has joined #baserock15:08
*** CTtpollard has quit IRC15:57
*** jonathanmaw has quit IRC16:01
*** ctbruce has quit IRC16:19
*** ctbruce has joined #baserock16:23
*** fay_ has quit IRC16:28
*** gtristan has quit IRC16:45
*** gtristan has joined #baserock16:46
*** ctbruce has quit IRC16:57
*** tiagogomes has quit IRC16:58
pedroalvarezoh, support for openssl 1.0.1 ends in September17:22
pedroalvarezmaybe in December (after reading https://www.openssl.org/policies/releasestrat.html)17:24
pedroalvarezbut anyway, this year17:24
pedroalvarezI'll upgrade that and other bits soon, needed for Genivi Baselin17:24
pedroalvareze17:24
*** toscalix has quit IRC17:45
*** janderJLR has quit IRC17:56
*** janderJLR has joined #baserock17:56
*** locallycompact has quit IRC17:57
*** edcragg has quit IRC18:48
*** benbrown_ has quit IRC19:02
*** locallycompact has joined #baserock19:05
*** gtristan has quit IRC19:05
*** benbrown_ has joined #baserock19:09
*** gtristan has joined #baserock19:18
*** gtristan has quit IRC19:50
*** gtristan has joined #baserock19:50
*** gtristan has quit IRC20:01
*** edcragg has joined #baserock22:20
*** locallycompact has quit IRC23:33
*** edcragg has quit IRC23:58

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