/srv/irclogs.ubuntu.com/2015/10/15/#snappy.txt

tedgsergiusens: So feeling a bit weird, I have to put the getting source options in setup_stage_packages() now00:03
tedgsergiusens: Because I need the source to know which packages we need.00:03
tedgsergiusens: It seems to be working, but seems kinda broken.00:03
sergiusenstedg, ok, but what are you talking about, I am missing some context00:06
tedgsergiusens: Porting catkin to snapcraft 0.300:07
tedgsergiusens: So I need to get the source if it's on git or something to get the packages.xml00:07
sergiusenstedg, right, but this problem was alway there, right?00:10
sergiusenstoo many right don't make a wrong ?00:10
sergiusensrights00:10
sergiusenstedg, http://bazaar.launchpad.net/~ted/snapcraft/ros-catkin-plugin/view/head:/snapcraft/plugins/catkin.py#L12100:10
tedgsergiusens: Hmm, it worked before....00:10
tedgsergiusens: And I just changed my pull to override setup_stage_packages()00:11
sergiusenstedg, in your MP you inverted the setup_stage_packages and pull calls00:11
sergiusenstedg, I think that's why00:11
tedgsergiusens: What changed is the ordering in pull()00:11
tedgOh, I must have unmerged that change.00:11
tedgSo do you like reordering that or overrideing setup_stage_packages() better?00:12
sergiusenstedg, I'll answer with another question; are we ever going to need something from stage pacckage to satisfy a pull00:12
sergiusenstedg, ftr https://code.launchpad.net/~ted/snapcraft/ros-catkin-plugin/+merge/273048#diff-line-50800:14
sergiusensthat's the inversion00:14
sergiusenstedg, I haven't checked if this change would break pip and friends00:15
tedgI'm curious if we just have bad naming.00:15
tedgIf we shouldn't just call it "pre-stage-packages" and "post-stage-packages"00:15
tedgIt's not that we don't need both, but we need to be clear about how they go.00:16
tedgOr, perhaps, put setup_stage_packages in the pull() for the super class.00:16
tedgThen the subclass could move it where it needs it.00:16
sergiusenstedg, I was wanting to implement pull in the base class today but I am waiting for your plugins to not cause one more update you need to do ;-)00:19
tedgHa00:21
tedgThis has touched more files than I expected00:21
tedgEverything is at least building now.00:22
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
=== fgimenez_ is now known as fgimenez
JamesTaitGood morning all; happy Thursday, and happy Conflict Resolution Day! 😃08:15
biezpalHi all! We have a problem with random string in package version and apparmor profiles09:13
biezpalApparmor profile:09:13
biezpalprofile "ovs_init-db_0.0.1" {09:13
biezpalBut system is waiting for:09:13
biezpalovs_init-db_IDKQMVPQVIGN09:13
biezpalWe cannot specify random version while preparing snap package. How should we handle it?09:13
jjohansenbiezpal: did you have a chance to talk to jdstrand09:13
biezpaljjohansen, nope :(09:14
biezpalseems like we have a 12-hours difference in time :)09:14
jjohansensadly I am going to give the same recommendation, he is the guy you should talk to09:14
jjohansenbiezpal: yeah, that is a problem, I can ping him about it tomorrow for you but I don't know how much time he will have, so he may not get back right away09:15
biezpaljjohansen, thanks09:16
ChipacaOoops, I did it again.11:45
Chipacahttps://code.launchpad.net/~chipaca/snappy/lock-ness/+merge/27454711:45
Chipaca1k lines11:45
Chipacahow did that happen11:45
davmor2Chipaca: they let you write the code, that's normally how it happens11:47
Chipacaand i'm lovin' it11:48
Chipacamvo_: ogra2: fwiw, the lock adds 5ms, or 10%, to the quickest rest query on bbb12:14
ogra_Chipaca, stop taling to that test guy :P12:19
ogra_*talking12:19
Chipacaogra_: why? beuno hardly ever has time for epic dissing contests these days, so i'll take it piecemeal from davmor212:20
ogra_haha12:20
davmor2ogra_: someone has to deflate his head otherwise he can't get through doorways and it's expensive to get building modifications done in the UK12:24
ogra_oh, and i always thought that was a beard !12:24
jdstrandbiezpal: fyi, your profile name is due to the fact that you are sideloading. there was a change in snappy not too long ago that does that. it changes not only the profile name but install dir, etc, etc12:28
jdstrandjjohansen: (fyi ^)12:28
Chipacaoh, missed that12:29
Chipacabiezpal: jjohansen: holler if you need more help with that12:29
Chipacajdstrand: good catch :)12:29
jdstrandbiezpal: if this isn't working right for you, I suggest talking to Chipaca or someone else here12:29
* Chipaca wonders what the problem is12:30
biezpaljdstrand, we know about random string version for sideloaded apps. The problem is that we cannot specify apparmor profile because of random string version12:36
biezpalbefore, we could specify number version in apparmor profile, but now it doesn't work12:37
Chipacawhere/why do you have to specify the version?12:37
biezpalprofile name contain version which is now random12:37
biezpalapparmor profile config, first line12:38
biezpalprofile "ovs_init-db_0.0.1" {12:38
jdstrandbiezpal: are you using 'security-policy' in your yaml?12:38
biezpaljdstrand, yes12:39
jdstrandbiezpal: see this: http://bazaar.launchpad.net/~snappy-dev/snappy-hub/snappy-examples/view/head:/framework-template/meta/svc.apparmor.boilerplate12:39
jdstrandbiezpal: basically, have ###VAR### in there, and use ###PROFILEATTACH###, then it all gets filled in for you12:40
biezpaljdstrand, so, we can use {APP_VERSION} in our profiles, right?12:41
jdstrandyes12:41
jdstrand###VAR### gets expanded to all those vars12:41
mvo_Chipaca: nice12:42
biezpaljdstrand, ok, thanks, we'll try it now12:45
biezpaljdstrand,  seems like I didn't get you right.. How should we define @{APP_VERSION} for our app before installation?12:57
Chipacabiezpal: so13:03
biezpalah, I see now..13:03
jdstrandbiezpal: you don't have to. it gets filled in for you on install13:03
Chipacabiezpal: do you have click-review?13:03
Chipacabiezpal: click-review would've told you about ###vars### and ###profileattach###13:03
biezpaljdstrand, Chipaca yes, I see how it works now, thanks13:04
Chipacabiezpal: holler if you get stuck again please13:06
biezpalChipaca, sure, I will :)13:07
biezpalthanks13:07
tbraj13:29
tbrEWINDOW13:29
Chipacatbr: ENOCOOKIE13:35
* davmor2 gives Chipaca a Cookie now will you stop complaining?13:36
Chipacadavmor2: http://i.imgur.com/05bXjHW.jpg13:38
davmor2Chipaca: say Cookie one more time......I dare you!13:39
kenvandineCookie13:39
* Chipaca gets behind the bulletproof glass13:41
kenvandine:)13:42
longsleepHey folks, what does "support for secure boot" mean with the latest stable release mean?13:59
longsleep-mean14:00
mvo_longsleep: that you can enable uefi and secure boot and the system will boot signed kernels14:04
mvo_longsleep: useful for systems who need a higher level of trust etc14:04
ogra_longsleep, after you switched yu rodroid to UEFI you can use signed kernels ;)14:05
ogra_*your14:05
longsleepmvo_: signed kernel wit UEFI and microsoft keys you mean?14:10
mvo_longsleep: yes14:10
longsleepmvo_: ah ok - thanks - so not relevant for arm14:10
mvo_well, the shim is signed with the microsoft key and that uses our key for the subsequent steps14:11
mvo_longsleep: yeah14:11
longsleepyes true, is it the same shim as with normal ubuntu?14:11
mvo_yes14:11
tbrwell AArgh64 servers with UEFI...14:11
tbrif they ever ship14:11
ogra_longsleep, the last two releases were rather irrelevant to arm overall14:11
mvo_I guess the mail should have clarified that its about uefi secure boot14:11
longsleepogra_: yeah i figured that, my odroids updated flawlessly from 5 to 6 and 7 though14:12
ogra_and the next one likely as well14:12
longsleepogra_: did you look into possibilies for secure boot on armhf?14:12
ogra_not really ... would that be possible with uboot at all ?14:13
longsleeptbr: somewhere i read that 2016 will be the year of arm64 servers14:13
ogra_wasnt that arm64 laptops ?14:13
longsleepogra_: mhm could have been laptos - i remember it not very good14:14
longsleepogra_: i saw some code in u-boot with which was labled secure boot using some keys fused into the soc14:14
longsleepogra_: did not look closes yet though14:15
ogra_"fused into the soc" heh14:16
ogra_might be hard to do if you are not a manufacturer14:16
longsleeptrue, but getting the uboot signed might be possible somehow14:16
tbrHS silicon often uses keys from a PROM inside the soc14:17
longsleepyeah - without knowing anything .. how are the phones which use u-boot protect their bootloader?14:18
ogra_usualyl from the preloader as i understand14:19
longsleepright, and how is the preloader protected from beeing overwritten with a preloader which does not validate anything?14:20
tbrlongsleep: e.g. QC usually only loads a signed loader and will not boot if it's not signed14:22
ogra_yeah14:22
tbrand most phones don't use u-boot but a-boot or that other thing14:22
ogra_and you cant easily overwrite it either14:22
longsleepright14:22
ogra_some use uboot, but only chainloaded14:23
longsleeptbr: so i asume it is pretty hard to get secure boot on arm when the soc would boot any loader14:23
tbrlongsleep: just as on x86, it's not an arch dependent problem14:24
longsleeptbr: right, i see - thanks!14:24
longsleepogra_: are there any device which do not chain load uboot with some binary boot loader blob?14:24
tbrintel will also want your firstborn if you want the secure version of their CPUs14:24
longsleephehe14:24
ogra_longsleep, yeah, most of them ...14:25
ogra_uboot on phones is rather a rare case ... it exists though14:25
tbrTI SoCs can usually be booted with u-boot directly14:25
tbre.g. the BB with its AM335x14:25
tbrMLO is just a minimal u-boot14:25
longsleepoh, thats cool, so no proprietary part required to boot them up?14:25
tbrcorrect14:25
tbrnot like RPi that requires that ginormous blob to boot the GPU before it even thinks about ARM cores14:26
tbralso u-boot on x86 works well14:26
tbrand I don't mean chain loaded14:26
longsleepis that in use on x86 in some machines one can buy?14:27
tbryes, the minnowboard max for example14:27
tbrI'm not sure if it still requires the FSP blob or if someone figured that out yet14:28
ogra_i think you can re-flash the bnootloader on ALIX boards easily14:29
ogra_they come with coreboot preinstalled though14:29
longsleepcoreboot is nice, though i read that most coreboot devices still load some blob to make hardware components work14:30
ogra_might be, i have two alix boards but never examined that level14:30
tbrthat's the FSP and SM14:30
tbryou can get around those in some cases14:31
tbryou will still very much need the microcode updates though14:31
longsleepyeah - i would like to know what this stuff is doing though14:32
tbrthe microcode in the soc is most often barely functional14:32
tbrfsp mostly sets up RAM timings and such IIRC14:32
tbrI've heard of a coreboot fork called libreboot (how inventive!) that manages on a few devices without those14:32
longsleepoh let me google that14:33
longsleepMinistry of Freedom (UK) lol14:33
longsleepthey support the t400 - not so bad14:34
ogra_t400 ... pfft ...14:36
* ogra_ wants a t1000 to mow his lawn14:37
longsleepeheh14:37
ogra_but thats still 600 revisions away14:37
longsleepthe t400 is a little old14:38
longsleeplibreboot can be flashed on the bbb14:39
longsleepthat would be awesome if it then could boot snappy14:39
* tbr fails to see the appeal on BBB, it already has a fully open source boot process14:39
longsleepoh it has? sorry then i was just ignorant14:40
tbr14:25:22< tbr> TI SoCs can usually be booted with u-boot directly14:40
tbr14:25:42< tbr> e.g. the BB with its AM335x14:40
tbr14:25:50< tbr> MLO is just a minimal u-boot14:40
longsleepso the sources for MLO are public - i did not know that14:41
longsleepi do not have a BBB either though14:41
ogra_longsleep, MLO is uboot on a diet :)14:58
tbrwhich is necessary due to the internal SoC ram being only 32k or such. so all it does is try to set up the RAM and find the proper U-Boot binary15:40
elopiosergiusens: I'll review your code iff you upload the licensed snap.15:59
elopiothat's my price :)15:59
sergiusenselopio, deal16:02
Chipacaelopio: "licensed snap"?16:03
elopiosergiusens: do you like or dislike docstrings?16:03
sergiusenselopio, wait, can we upload now?16:03
sergiusenselopio, I like!16:04
* ogra_ buys a license from elopio 16:04
elopioChipaca: yes, the one that has a funny paragraph that you have to agree with.16:04
Chipacaelopio: dude16:04
sergiusenselopio, I've just never done them properly, but I want to document the base plugin with docstrings16:04
Chipacaelopio: snappy-examples/licensed16:04
elopioI suspect you wrote that one.16:04
sergiusensChipaca, he wants me to upload that ;-)16:04
sergiusensChipaca, to the store16:04
Chipacato the stoar16:04
Chipacaok :)16:05
* Chipaca gets it now16:05
sergiusenselopio, I'll check on the 'all reviews must be manual' thing first16:05
elopioogra_: the first one is free.16:05
ogra_yay16:05
* ogra_ feels the greed for more coming up 16:05
elopiosergiusens: I was just thinking that it's so hard for me to understand the snapcraft code because it doesn't have comments. Like this compose method.16:06
elopioI think I'd even like an example in the docstring.16:06
sergiusenselopio, ah, give me an example on how to write a 'proper' docstring and I'll do it :-)16:06
sergiusenselopio, it is not as easy as it was to do in go ;-)16:06
elopiosergiusens: https://www.python.org/dev/peps/pep-0257/16:07
sergiusenselopio, in go I jst started writing them and all was fine, the world was happy; in python there are many iplicit semantic rules :-P16:07
elopiosergiusens: I'll start documenting some things I understand.16:08
elopiothen you can copy the format.16:08
sergiusenselopio, does that work for you http://paste.ubuntu.com/12791820/16:18
sergiusenselopio, ignore the runtests.sh part (that will be a separate MP)16:18
sergiusenselopio, wht is the correct way to add an example?16:19
elopiosergiusens: looks good, but not perfect.16:32
elopiosergiusens: instead of Returns, it should be Return.16:33
elopioand the first sentence should be a single line.16:33
elopiothere are some tools that take the first line of the docstring as a summary.16:33
sergiusenselopio, so I have around 50 chars to express it?16:33
elopiosergiusens: yes, the short summary. Then you write as many lines you want in the following paragraphs.16:34
sergiusenselopio, it seems there are many ways to write docscrings16:35
sergiusenswhich I dislike16:35
sergiusenselopio, http://paste.ubuntu.com/12791994/16:35
elopiosergiusens: yes. The form we tried to follow in the tests was to stick to pep 257 as much as possible, using the sphinx tags.16:36
sergiusenselopio, I found that and then a ::param ...:: format16:36
sergiusenselopio, I saw ``keyword`` as well16:36
sergiusenselopio, just show me one docsrting from a test I can follow and I will write awesome docstrings16:37
sergiusensI dislike the fact that there is choice on how to do this ;-)16:37
ogra_but linux ius abouot choice !16:38
elopiosergiusens: https://bazaar.launchpad.net/~ubuntu-sdk-team/ubuntu-ui-toolkit/trunk/view/head:/tests/autopilot/ubuntuuitoolkit/_custom_proxy_objects/_common.py#L12116:38
elopiosergiusens: there's free will, but we crush it on code reviews.16:39
sergiusenselopio, does help(something) pretty format all those ::param:: declaratons btw?16:39
sergiusenselopio, should I use ''' or """ ?16:39
elopiosergiusens: I don't know about help. But the idea is to generate an sphinx html out of this.16:39
elopiosergiusens: """16:39
sergiusenselopio, is multiline allowed after ::param keyword:: ?16:41
elopiosergiusens: yes.16:41
sergiusenselopio, ah, I see it now16:41
sergiusenselopio, how do I ref a :param keyword: in return?16:42
sergiusenselopio, see, this is why I did not start doing this :-)16:42
sergiusensvmayoral, hey, since you joined, I'm interested in knowing if you have tried experimenting with faster sdcards16:43
vmayoralhey @sergiusens,16:44
sergiusensvmayoral, I talked about some of the i/o slowness with ogra_ and mvo_ and there are some ideas floating around aside from just slow sdcard that might affect you; primarily the shared usb bus16:44
elopiosergiusens: uhm, I don't know. Just name it.16:44
vmayoralsergiusens: we've ordered them, should be able to test it soon16:44
elopiohttp://sphinx-doc.org/domains.html#cross-referencing-python-objects16:45
elopiosergiusens: it seems you can reference attr, but not parameters.16:45
elopiosergiusens: this is the examples I mostly follow: http://sphinx-doc.org/domains.html#info-field-lists16:46
sergiusenselopio, how about this http://paste.ubuntu.com/12792139/?16:52
elopiosergiusens: perfect.16:53
elopioI tend to be more verbose on the second paragraph instead of the return keyword.16:53
elopiobut as you prefer.16:53
sergiusenselopio, I wasn't sure, I just saw duplication and then saw the doc you sent me and the example from ui-toolkit :-P16:54
elopiosergiusens: just choose whatever makes you happy, and we'll copy that style. The things that are important for me are the param and return tags, and the one line summary.16:55
sergiusenselopio, great, I'll stick to this, I don't like free form :-)16:56
sergiusenselopio, the paragraph could be used to go into detail with examples16:56
sergiusenselopio, which I haven't seen how to do yet16:56
elopiosergiusens: ah, right.16:57
elopiothere are two options for the examples. You can write doctest  https://docs.python.org/3/library/doctest.html16:57
elopioor you can make it free form with the sphinx syntax. Let me see if I can find a nice one.16:58
sergiusenselopio, I don't mind doctest as long as they can access the network or if that won't be a problem we will be facing on and on in the future16:58
elopiosergiusens: we don't necessarily run the doctests. We need to add a command that runs them, and we can choose not to run them while the package is being build, for example.16:59
sergiusenselopio, I'll table the doctest/examples with sphinx for now then and think about it17:00
sergiusenselopio, I've already pushed the docstring while you weren't looking17:00
sergiusens:-)17:01
elopiosergiusens: https://bazaar.launchpad.net/~autopilot/autopilot/trunk/view/head:/autopilot/matchers/__init__.py#L4917:01
sergiusensvmayoral, great, we are looking forward to isolating the issue17:01
* sergiusens will brb17:06
sergiusenselopio, I uploaded licensed.canonical18:02
sergiusenstedg, is the catkin plugin ready for review? I saw some code changes but not sure if I should start code review yet18:03
zygasergiusens: hey!18:03
zygasergiusens: how are you18:03
sergiusenszyga, doing good, what's up?18:03
zygasergiusens: holidays, a bit ill, enjoying rain and wind in Poland :)18:04
elopiosergiusens: thanks. I'm still confused by your branch.18:05
elopioI'm slow today.18:06
sergiusenselopio, the tests don't make it clear either?18:06
elopiosergiusens: it's like you are filling the missing properties with the values from the wiki, right?18:07
sergiusenselopio, exactly; and you might ask why I don't use .update() I guess18:07
sergiusenselopio, 1 I've had issues with it, 2 there is more to come (properties from the wiki will also do var expansion for the values)18:08
elopiosergiusens: no, I would just phrase the comments differently.18:08
sergiusenselopio, this is why we have reviews :-)18:10
sergiusenszyga, well go and relax if you are on holidays AND ill ;-)18:10
elopiosergiusens: yeah, but I don't know how to make it better. I'm trying...18:11
sergiusenselopio, exactly, I tried to explain using only a few words, maybe compose is what causes confusion and that word needs to be changed18:12
elopiosergiusens: :return: a dictionary that fills the missing values from the properties passed as an argument with values from the part in the wiki.18:12
elopiosergiusens: just a suggestion. Not sure if yours is better.18:13
elopiosergiusens: also I don't understand why would you return something if there is no wiki part. Shouldn't it raise an exception?18:13
sergiusenselopio, ah, I was trying to not use the word dictionary as that was implied in the type, but if that is fine, I don't mind using that18:13
sergiusenselopio, I can raise an exception too, that is debatable; I don't mind18:13
elopiosergiusens: I think it's clearer to raise an exception than to return a null value that later has to be interpreted.18:14
sergiusenselopio, I will raise an exception18:14
sergiusenselopio, right, as it is now, it is not a nul value, it is a nop18:14
elopiosergiusens: also, the docs are to be read by people, so make them as readable as possible. Don't worry that much about the metadata or duplication.18:14
elopiosergiusens: ah, I see. You return the same thing you get.18:15
elopioI'm inclined for the exception. The caller can take care of catching it to make it no-op.18:17
sergiusenselopio, ok, let me change that18:18
elopiosergiusens: and about the tests, I think that the name is the most important thing to make them readable.18:20
elopioinstead of test_compose, I see three tests. something like18:20
elopiotest_compose_must_update_missing_value_from_wiki -> you pass no source as argument18:20
elopiotest_compose_must_keep_value_from_properties -> you pass source as an argument18:20
elopiotest_compose_unexisting_wiki_part_must_raise_exception18:20
elopiosergiusens: and starting to nitpick, s/part1/part-from-wiki.18:20
sergiusenselopio, the nitpick I refuse as the part lives in both places :-)18:20
sergiusenselopio, but if it makes it clearer, then yeah, for the test it is fine18:21
elopiosergiusens: well, it wouln't hurt to make it more verbose like: part-that-exists-in-wiki18:22
elopionot a big deal if the name of the test is clear. And you can always throw comments instead.18:22
elopiosergiusens: anyway, now that I get what your branch does, +1. It looks correct to me.18:22
elopioI'll top approve after lunch.18:23
sergiusenselopio, I'll be fixing in the meantime :-)18:23
elopiosergiusens: and I would throw in an integration or example test.18:23
elopiobut maybe not yet. We only have the curl part in the wiki, and there's no much sense in overwriting its properties. Maybe an example when we have more parts that make sense to extend18:26
mvo_Chipaca: *if* you are still around, I followed up on the snappy-snapfs-mount MP would love to hear your thoughts, but no rush, I call it a day now18:52
sergiusenstedg, maybe envvars can all be driven by the plugin and no need to have it in the parts?19:54
tedgsergiusens: Eh, I'm not sure that many people will use plugins though. I'd like to have less of them.19:57
tedgsergiusens: For instance if ROS didn't have so many relocation issues, it'd be nice if that didn't have to be a plugin. Just a repo and some stage-packages in the wiki.19:57
tedgI'm just not sure we're ever gonna live in a world where the libraries end up where we want.19:58
tedgAnd I hate pushing people to write shell scripts all the time.19:58
sergiusenstedg, well the thing is, for a part, we can't20:06
sergiusenstedg, as in, hey look for stuff here too20:06
tedgsergiusens: I guess I was thinking that the part would provide environment variables for things it builds. For instance "I put my data here"20:10
sergiusenstedg, right, I have that email in draft :-)20:12
sergiusenstedg, The wrapper thing is all fine and dandy to some extent for running, but building is so disparate20:12
tedgI feel like we're walking a dangerous path with encouraging so many wrappers.20:14
sergiusenstedg, so I replied and not sure if it will be for the worse :-)20:34
sergiusenstedg, wrt actual things in the pipeline, just leave a coment in the catkin branch when it is ready for another look20:34
tedgsergiusens: I think that it is, I'm building a test snap to see if it still all works.20:44
=== chihchun is now known as chihchun_afk
=== moul_ is now known as moul

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