*** edcragg has quit IRC | 00:02 | |
*** gtristan has quit IRC | 02:58 | |
*** gtristan has joined #baserock | 03:41 | |
*** gtristan has quit IRC | 04:35 | |
*** gtristan has joined #baserock | 04:35 | |
*** fay_ has joined #baserock | 07:10 | |
*** toscalix has joined #baserock | 07:28 | |
*** ctbruce has joined #baserock | 07:37 | |
*** edcragg has joined #baserock | 08:01 | |
*** anahuelamo_ has joined #baserock | 08:33 | |
*** anahuelamo has quit IRC | 08:33 | |
*** jonathanmaw has joined #baserock | 08:39 | |
*** edcragg has quit IRC | 08:48 | |
*** edcragg has joined #baserock | 09:16 | |
*** lc_ has joined #baserock | 09:17 | |
*** lc_ has quit IRC | 09:34 | |
*** locallycompact has joined #baserock | 09:41 | |
*** gtristan has quit IRC | 12:54 | |
leeming | yaml question for the python people | 13:22 |
---|---|---|
leeming | yy=yaml.load(open('this-is-my.morph','r')) ... if I try to print yy['build-commands'] the newlines seem to be escaped | 13:23 |
leeming | is there some magic other than a dirty looking : print "%s"%yy['install-commands'][0] | 13:24 |
leeming | ^ assume install<>build | 13:24 |
edcragg | it might just escape it when it prints it? | 13:24 |
richard_maw | there's a couple of levels of escaping involved, with print, it should only be the newline escaping of shell commands | 13:25 |
jmacs | Can you paste your morph? | 13:25 |
jmacs | I only see the escaped newlines when I print the entirety of the 'install-commands' array | 13:28 |
jmacs | print yy['install-commands'][0] is fine | 13:28 |
*** gtristan has joined #baserock | 13:35 | |
*** tiagogomes has quit IRC | 13:39 | |
leeming | jmacs, ahh i didnt try the simple combo, yea that works | 13:42 |
leeming | any reason why it is a list anyway? | 13:42 |
pedroalvarez | install-commands is a list, so that you can put various commands, and not only one? | 13:44 |
pedroalvarez | *-commands | 13:44 |
jmacs | Yes | 13:47 |
pedroalvarez | here some documentation, although might not be the best: https://docs.baserock.org/spec/#definitions-file-syntax | 13:47 |
franred | or complete | 13:48 |
franred | I think system-integration-commands are missing there | 13:49 |
*** tiagogomes has joined #baserock | 13:52 | |
leeming | pedroalvarez, 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 :S | 13:56 |
locallycompact | when id baserock get such pretty docs | 13:57 |
leeming | as 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 block | 13:58 |
jmacs | Can you point us at an example? | 13:58 |
* leeming points at locallycompact | 13:58 | |
leeming | examples are all... urm proprietary | 13:58 |
* locallycompact sets an example | 13:58 | |
pedroalvarez | locallycompact: 4 months ago: https://gerrit.baserock.org/#/c/1934/ | 13:58 |
locallycompact | leeming, make a simple non-proprietary example | 13:59 |
locallycompact | then we can have a test case for this | 13:59 |
pedroalvarez | leeming: every line on the list of *-commands will be executed in a new shell | 14:00 |
jmacs | All the examples I can find have all the commands as separate YAML elements, which I think I'd prefer | 14:00 |
leeming | name: foo | 14:00 |
leeming | kind: morph | 14:00 |
leeming | build-commands: | 14:00 |
leeming | -| | 14:00 |
leeming | cd somewhere | 14:00 |
leeming | cp files /to/here/please | 14:00 |
leeming | make | 14:00 |
pedroalvarez | executing all of it in a single - | will let you do things like "cd to somewhere", or "set environment variables" | 14:00 |
locallycompact | ^ | 14:00 |
leeming | new shell per item in list? ah so any cd/exports set will not survive | 14:01 |
pedroalvarez | if splitting into different elements in that list, the build tool might give you better error messages | 14:02 |
leeming | ^ well ive noticed that, error is closer to origin, instead of just saying ' error somewhere in this block' | 14:02 |
leeming | pedroalvarez, 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 |
pedroalvarez | per item in every *-commands list | 14:04 |
leeming | http://paste.baserock.org/jaziromipu | 14:06 |
leeming | or .... | 14:06 |
pedroalvarez | yes | 14:06 |
persia | For build sanity, using subshells per-command helps one deal with changes more easily. | 14:07 |
pedroalvarez | in that example, #shell-1 is useless | 14:07 |
leeming | http://paste.baserock.org/vuqirazemu | 14:07 |
persia | (yes, this means no cd, no foreach, etc.) | 14:07 |
pedroalvarez | leeming: the first example, http://paste.baserock.org/jaziromipu, is the right one | 14:07 |
leeming | ah ok then | 14:08 |
leeming | then it isn't clear when/why you wouldn't want to use a block " -| " then | 14:08 |
persia | leeming: Rather than cd; cp try `cp ${cd destination}/files /to/here/please` | 14:08 |
leeming | urgh bash 1 liners | 14:08 |
persia | Using 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 |
persia | So, as with make, the best practice is to write each shell command to be self-sufficient. | 14:09 |
leeming | I see | 14:10 |
persia | (one of the most common mistakes in such situations is failing to double-escape newlines) | 14:10 |
leeming | but in rpm spec world, using a block per 'section' is sane then | 14:10 |
leeming | translating spec2def that is | 14:10 |
leeming | nice to know there is actaully a difference between '-|' and multiple '-'. I thought it was just a styling thing | 14:12 |
persia | Where 'section' is %build, %install, %files, etc.? | 14:12 |
*** janderJLR has quit IRC | 14:13 | |
persia | Ugh. 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 #baserock | 14:14 | |
persia | That 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 |
persia | And %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 |
persia | Note also that any use of %post will mean the installation isn't reproducible, so take care there | 14:18 |
franred | it is line by line but in blocks or sections AFAICR | 14:19 |
persia | I 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 |
persia | But each line is independent, so if any line has side effects, this should not affect the other lines, etc. | 14:23 |
*** tiagogomes has quit IRC | 14:42 | |
leeming | persia, Sorry missed that there, yes section = %thingies. I've done some basic expansion on macros commonly used in my project specs | 14:54 |
*** tiagogomes has joined #baserock | 14:54 | |
leeming | not 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 stuff | 14:55 |
leeming | locallycompact, is this helpful/known about/still maintained http://git.baserock.org/cgit/baserock/baserock/spec.git/tree/schemas/baserock.owl | 14:55 |
leeming | ^ re ontologies | 14:55 |
locallycompact | It's certainly maintained yes | 14:56 |
leeming | "This will involve | 14:56 |
leeming | removing the current 'Chunk', 'Stratum', 'System' and 'Cluster' classes, and | 14:56 |
leeming | adding something like 'thing with build instructions' and 'thing that contains | 14:56 |
leeming | other things' instead. Name suggestions are welcome :-)" | 14:56 |
leeming | how close/ has there been any movement on that statement? | 14:57 |
locallycompact | where is that statement | 14:57 |
leeming | http://git.baserock.org/cgit/baserock/baserock/spec.git/tree/schemas/README.schemas | 14:57 |
locallycompact | Ah k | 14:59 |
leeming | just unsure if there is crossover with some of the things youve mentioned to me | 15:00 |
leeming | if it is still active/forgotten about/not related | 15:00 |
*** anahuelamo has joined #baserock | 15:01 | |
*** anahuelamo_ has quit IRC | 15:01 | |
locallycompact | leeming, 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 artifacts | 15:02 |
locallycompact | the problem is I don't know/am not familiar with any such tools | 15:02 |
locallycompact | and also rdf/owl is a pain which is which I'd rather aim towards FQL/OPL/AQL | 15:03 |
leeming | i dont know very much when it comes to ontology languages | 15:03 |
locallycompact | but getting rdf/owl doing something interesting would be a massive win | 15:03 |
leeming | i just pointed just en case it was a hidden/not thought of route | 15:03 |
paulsher1ood | leeming: 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 stuff | 15:04 | |
*** gtristan has quit IRC | 15:06 | |
*** gtristan has joined #baserock | 15:08 | |
*** CTtpollard has quit IRC | 15:57 | |
*** jonathanmaw has quit IRC | 16:01 | |
*** ctbruce has quit IRC | 16:19 | |
*** ctbruce has joined #baserock | 16:23 | |
*** fay_ has quit IRC | 16:28 | |
*** gtristan has quit IRC | 16:45 | |
*** gtristan has joined #baserock | 16:46 | |
*** ctbruce has quit IRC | 16:57 | |
*** tiagogomes has quit IRC | 16:58 | |
pedroalvarez | oh, support for openssl 1.0.1 ends in September | 17:22 |
pedroalvarez | maybe in December (after reading https://www.openssl.org/policies/releasestrat.html) | 17:24 |
pedroalvarez | but anyway, this year | 17:24 |
pedroalvarez | I'll upgrade that and other bits soon, needed for Genivi Baselin | 17:24 |
pedroalvarez | e | 17:24 |
*** toscalix has quit IRC | 17:45 | |
*** janderJLR has quit IRC | 17:56 | |
*** janderJLR has joined #baserock | 17:56 | |
*** locallycompact has quit IRC | 17:57 | |
*** edcragg has quit IRC | 18:48 | |
*** benbrown_ has quit IRC | 19:02 | |
*** locallycompact has joined #baserock | 19:05 | |
*** gtristan has quit IRC | 19:05 | |
*** benbrown_ has joined #baserock | 19:09 | |
*** gtristan has joined #baserock | 19:18 | |
*** gtristan has quit IRC | 19:50 | |
*** gtristan has joined #baserock | 19:50 | |
*** gtristan has quit IRC | 20:01 | |
*** edcragg has joined #baserock | 22:20 | |
*** locallycompact has quit IRC | 23:33 | |
*** edcragg has quit IRC | 23:58 |
Generated by irclog2html.py 2.15.3 by Marius Gedminas - find it at mg.pov.lt!