/srv/irclogs.ubuntu.com/2015/08/06/#snappy.txt

sergiusenselopio: I hinted earlier that if we get the right mocking level I don't mind extending the unit tests for snapcraft itself00:18
sergiusenselopio: but there is no test code for that in there and I didn't want to deviate from the current status quo in my first contribution ;-)00:19
sergiusenselopio: and you last comment taken into account00:21
elopiosergiusens: top-approved.00:23
elopiosergiusens: I think I wouldn't want to mock hg, or git. But I don't like the tests written in those plainbox commands.00:23
sergiusenselopio: \o/ one more MP and I can build py2 and hg projects from the ether00:23
elopioI would prefer to have integration tests written in python.00:23
sergiusenselopio: heh, feel free to change it all ;-)00:24
sergiusenselopio: would it be python snippets given plainbox?00:24
elopiowell, I first need a good reason to re-do all the work.00:24
elopioI'm not sure why do we want plainbox here. So I'll wait for our qa meeting next week to talk about it with zyga.00:25
sergiusenselopio: what I like of it being a script is that I can read all about it when it fails really easily, aside from that, nothing else; I prefer compiled languages these days to not run things and find typos along the way ;-)00:25
elopiohe did a lot of work to get it working with plainbox, so...00:25
elopiowhat I don't like is the lack of cleanups, fixtures, assertions.00:26
sergiusenselopio: latest snapcraft is broken for me, can you check? I think it's 'self.recommends = options.recommends or False' whereas we probably want getattr there00:46
elopiosergiusens: what command are you running? Some commands work for me using trunk.00:48
sergiusenselopio: right, it's when executing certain projects that use the ubuntu plugin00:49
sergiusenselopio: http://paste.ubuntu.com/12010834/00:49
sergiusenselopio: that's what I mean00:50
elopioright, that looks good.00:50
elopiosergiusens: + one test, it would look perfect :)00:50
sergiusenselopio: let me propose an MP and see if I can write a small test00:50
elopiosergiusens: there's test_ubuntu_plugin.py00:52
sergiusenselopio: is there an assertNotRaises?00:55
elopiosergiusens: no, for that case what I do is just to end the test with the call.00:56
elopioif it raises something, the test will fail.00:56
elopioa comment saying like # The call should not raise an error. would be nice.00:57
sergiusenselopio: https://code.launchpad.net/~sergiusens/snapcraft/recommendedOptions/+merge/26711901:02
sergiusenselopio: took a slightly different approach01:02
sergiusenselopio: https://code.launchpad.net/~sergiusens/snapcraft/setuptools/+merge/26712102:16
sergiusenssee if you have a better idea there02:16
=== bigcat is now known as bigcat[brb]
elopiosergiusens: can't you specify the python-setuptools dependency in the yaml of your package?03:39
elopiothere are other setup packages, so not all will require setuptools.03:40
sergiusenselopio: I can, but I thought it be pretty common03:43
sergiusenselopio: well now that I know about the 'after' keyword; but the PYTHONPATH gimmick would go where?03:44
sergiusensanyways, bed time :-)03:44
=== chihchun_afk is now known as chihchun
ToyKeeperSnapcraft looks very helpful...  am hoping to try it this week.  :)04:06
ToyKeeper(building and packaging a python-based network game)04:07
=== chihchun is now known as chihchun_afk
fgimenezgood morning07:05
=== bigcat_ is now known as bigcat
dholbachgood morning07:13
=== guest42345 is now known as o
=== o is now known as Guest57566
=== chihchun_afk is now known as chihchun
JamesTaitGood morning all; happy Fresh Breath Day! 😃08:54
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
=== utlemming is now known as utlemming_away
=== chihchun is now known as chihchun_afk
longsleepi think i have found a bug in snapcraft ubuntu plugin, it does not fix up symlinks to folders, but it seems that os.walk does list symlinks to directories which exist in dirs rather than in files and the plugin only checks the files.10:29
ogra_well, i guess at this state snapcraft bugs are still pretty expected ;)10:29
ogra_file it :)10:30
longsleepright - my Python got a little rusty since Go is around ..10:30
hiowhat is the ETA?11:17
ogra_7am on a sunday11:18
hioi mean the ETA of snappy11:18
ogra_for what exactly ?11:18
hioso that i can use it as my production server environment11:18
ogra_snappy is out there and is used by projects already ...11:19
hioogra_: i cant find the iso download?11:20
ogra_really depends what you want to do with it11:20
hiowell i told you: server for my webapps11:20
sergiusenshio: it's available on the major cloud envs already fwiw11:20
hiowell i have a VPS / root server11:20
hioi need to install it there with an ISO11:21
longsleepogra_: made a patch instead https://code.launchpad.net/~longsleep/snapcraft/snapcraft-dirs-symlink/+merge/26717611:21
hioand on vmplayer too11:21
ogra_there is no installer yet and it is currently mainly focusing on IoT, cloud and embedded11:21
ogra_you would have to boot from some other media and then dd the img file to disk ... not sure that will work with a VPS at all though ... since you often dont have control over the kernel in such setups11:22
ogra_and snappy has pretty specific requirements on the kernel config11:22
ogra_(and on the bootloader for all the rollback functionality)11:23
Mikaelahio: https://developer.ubuntu.com/en/snappy/start/11:53
=== chihchun_afk is now known as chihchun
=== rickspencer3_ is now known as rickspencer3
longsleepSo, someone would be so kind to review https://code.launchpad.net/~longsleep/snapcraft/snapcraft-dirs-symlink/+merge/267176 please12:44
=== JamesTai1 is now known as JamesTait
sergiusensmterry: do you have your snapcraft project for the webcam thing available anywhere?13:50
mterrysergiusens, my own code for the demo is lp:~mterry/snapcraft/mitdemo (mostly just trunk's webcam-webui example + go-on-arm branch + a couple change to the webcam code to work in my case)13:53
longsleepmterry: have you seen https://code.launchpad.net/~longsleep/snapcraft/snapcraft-dirs-symlink/+merge/267176 - i think it is important to merge that asap to avoid problems with absolute directory links with the ubuntu plugin.14:00
mterrylongsleep, yeah I did, thanks!  Good catch.  I approved it, but then noted that I realized that you weren't in the contributor agreement LP team.  Have you signed the contributor agreement?14:01
longsleepmterry: no i did not - can it be signed on compay level?14:01
longsleepcompany14:02
mterrylongsleep, yes -- I gave a link in the MP14:02
mterrylongsleep, www.ubuntu.com/legal/contributors14:02
longsleepoh i missed that sorry14:02
mterrylongsleep, no worries, LP mail gets delayed or filtered weird sometimes  :)14:02
longsleepmterry: I gave the contributor agreement to my boss and he will eventually sign it. I think the symlink patch is trivial and you can just merge that. I will let you know when the agreement is signed. Let me know if you have any further comments to the debs plugin.14:15
mterrylongsleep, I'm off tomorrow (and am switching teams shortly) -- you may want to poke mvo or rsalveti after today.  Just heads up  :)14:16
mterrylongsleep, but understood re: symlink14:16
=== utlemming_away is now known as utlemming
longsleepanyone got thoughts how to run multiple services from a single snap? I consider to use supervisord similar like it is used with Docker. What do you think?14:43
ogra_ARGH !14:46
ogra_(RaspberryPi2)ubuntu@localhost:~$ ifconfig14:46
ogra_enxb827eb04db1c Link encap:Ethernet  HWaddr b8:27:eb:04:db:1c14:46
ogra_          inet6 addr: fe80::ba27:ebff:fe04:db1c/64 Scope:Link14:46
ogra_yay for discoverable interface names14:46
longsleeplol14:47
ogra_but even worse :/14:47
ogra_(RaspberryPi2)ubuntu@localhost:~$ fw_printenv14:47
ogra_Warning: Bad CRC, using default environment14:47
ogra_damn14:47
longsleep4 byte 5 byte problem?14:48
longsleepcheck the hexdump14:48
ogra_could be, not sure14:48
ogra_though no, the snappy code fails too14:48
ogra_and that should be safe against the header byte issues14:49
longsleephow did you create the file? saveenv?14:49
ogra_mkenvimage -s 131072 -o uboot.env uboot.env.in14:49
longsleepuh14:49
ogra_well, it works just fine in uboot14:49
ogra_and i see onyl 4 bytes in hexedit14:50
longsleepogra_: try adding -r parameter to mkenvimage14:50
ogra_then uboot doesnt accept it anymore14:51
longsleepbut the snappy tool loads it?14:51
ogra_though let me try again, might have been the other build14:51
longsleepthen you have 4 bytes header if you did not add -r14:51
longsleepyou have to use 5 bytes to make fw_* tools work14:51
longsleep(or change their config)14:52
ogra_reading uboot.env14:52
ogra_*** Warning - bad CRC, using default environment14:52
longsleepright, make sure you have #define CONFIG_ENV_SIZE                 (128 * 1024) and #define CONFIG_SYS_REDUNDAND_ENVIRONMENT in your u-boot config14:53
longsleepthen you will have 5 bytes header and i guess it will just work14:54
ogra_ah, the latter was missing14:54
ogra_thanks !14:54
longsleepi hope that was it14:54
joc_could someone provide some assistance in checking whether an app we have snapped is running unconfined? (app is plainbox)14:55
longsleepogra_: still trouble that the snappy tool fails to parse the env file with 4 byte though14:55
=== chihchun is now known as chihchun_afk
ogra_longsleep, thanks, that helped, looks all fine now15:01
longsleepogra_: great15:02
ogra_so what the heck do i do with the NIC now :/15:06
=== chihchun_afk is now known as chihchun
joc_ogra_: ricmm might one you be able to help with the above please?15:07
ogra_joc_, sorry, i dont know how to determine that, perhaps from syslog15:08
longsleepogra_: where does that name come from? Check /etc/udev/rules.d/70-persistent-net.rules i think it should define the name alias there15:08
ogra_well, where would that file come from on a readonly system ? :)15:09
longsleepthat file is writable15:09
ogra_hmm, true15:09
longsleepif you do not have it, it explains the strange name15:09
ogra_right15:10
ogra_so why dont i have it :P15:10
longsleepnow you are closer to the solution :D15:10
longsleepbut it is good that you have a problem with that file, because i have one too :P15:11
longsleep(my nic is there twice with the same MAC)15:11
longsleepelopio: Hi, the symlink directory problem can be seen in openssl for example. I pull in the openssl debs file with my debs plugin.15:13
joc_hmm i'm seeing a lot of..15:18
joc_Aug  6 15:14:12 localhost kernel: [ 8857.835029] audit: type=1400 audit(1438874052.138:70): apparmor="DENIED" operation="open" profile="plainbox.sideload_plainbox_0.23.dev0" name="/proc/1162/fd/" pid=1162 comm="python3.4" requested_mask="r" denied_mask="r" fsuid=1000 ouid=100015:18
elopiolongsleep: ok, let me see if I can reproduce it.15:19
elopiothanks for the patch btw.15:19
ogra_joc_, that looks like confined (and with wrong profile actually)15:21
longsleepelopio: sure, to reproduce just add openssl package to a snapcraft file using the ubuntu plugin15:23
joc_ogra_: what looks wrong about the profile?15:23
ogra_you get denials15:23
sergiusensogra_: seb128 is input known to not work in a kvm for ubuntu personal?15:28
ogra_worked for me ... but i last tested a month ago or so15:28
ogra_(mouse input)15:29
sergiusensogra_: yeah, thats what I recall too, not anymore it seems :-P15:29
=== chihchun is now known as chihchun_afk
ogra_pitti, bah ... i cant get the network on my rpi 15.04 imae up anymore ... what was the magic incarnation to force it to be called eth0 ?15:42
pittiogra_: see /usr/share/doc/udev/README.Debian.gz15:43
ogra_hmpf15:43
pittiogra_: either boot with net.ifnames=0, or touch /etc/udev/rules.d/80-net-setup-link.rules15:43
pittiwhatever is better15:43
ogra_i cant really fiddle with udev rules, this is a released image15:44
ogra_ah, that was what i was lookin for15:44
ogra_kernel cmdline ;)15:44
ogra_(for this image i can only change the bootloader setup actively )15:44
longsleepogra_: Starting with v197 systemd/udev will automatically assign predictable, stable network interface names for all local Ethernet, WLAN and WWAN interfaces. This is a departure from the traditional interface naming scheme ("eth0", "eth1", "wlan0", ...), but should fix real problems.15:47
longsleepogra_: haha - "should fix real problems"15:47
ogra_http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/15:47
ogra_i got that in front of me :)15:47
longsleepinteresting read15:48
ogra_doesnt mention the boot option at all !15:48
longsleepi wonder why the odroid does get named eth015:48
ogra_oh, it does15:48
longsleepit does15:48
ogra_i just gave up reading to the end :P15:48
longsleepogra_: why do you need to change it by the way, or why does the interface need to be named eth0?15:49
ogra_because the 15.04 image has /etc/network/interfaces.d/etc0 hardcoded by default15:50
ogra_*eth015:50
longsleepah15:50
ogra_that was only fixed in the rolling image15:50
ogra_(RaspberryPi2)ubuntu@localhost:~$ fw_printenv board15:51
ogra_board=rpi_215:51
ogra_:D15:51
longsleep(ODROIDC)root@odroid:~# fw_printenv board15:51
longsleep## Error: "board" not defined15:51
longsleepshould i have that?15:51
ogra_(RaspberryPi2)ubuntu@localhost:~$ cat /proc/cpuinfo |grep erial15:51
ogra_Serial          : 000000008b04db1c15:51
ogra_\o/15:51
ogra_i doubt the odroid uses board= anywhere15:52
ogra_(i even doubt the rpi does :P but it is in teh default env)15:52
longsleep(ODROIDC)root@odroid:~# cat /proc/cpuinfo |grep Serial15:52
longsleepSerial: 1b0000000000000015:52
longsleepi am not sure that serial of mine makes any sense15:52
ogra_well, nothing you need it for, do you ?15:53
ogra_rpi needs it for the codecs15:53
longsleepyes - well some snaps might want it15:53
ogra_mine here gets seeded from the binary blob bootloader15:53
longsleepmhm in u-boot i have a more complicated serial15:55
ogra_the rpi kernel accepts a cmdline option to set it15:56
ogra_perhaps the odroid has somethin similar15:56
longsleepno - i think the kernel has the means to read the serial directly15:57
longsleepwhat i do not understand why i get eth0 in my image15:58
longsleepshouldnt i have some other name as well ?15:58
longsleepwell the serial is the same for the stock kernels from Hardkernel - at least its not my fault :)16:01
longsleepdpkg -l|grep systemd16:03
longsleepsorr16:03
longsleepy16:03
ogra_while you say systemd http://blog.darknedgy.net/technology/2015/08/05/0-androidinit/16:06
ogra_:D16:06
ogra_such an awesome trolling attempt :)16:06
longsleepahaha16:06
longsleepnice16:06
sergiusensstgraber: hey, do you have an lxd snap for armhf?16:22
cwaynebarry: hiya, was it you that was working on snaps based on .pex files?16:27
cwayne barry: hiya, was it you that was working on snaps based on .pex files?16:32
cwayne(sorry if that repeated, my irc's been a bit wonky lately)16:32
ogra_( RaspberryPi2)ubuntu@localhost:~$ cat /proc/device-tree/soc/i2c\@7e804000/status16:33
ogra_okay16:33
ogra_\o/16:33
barrycwayne: yep: http://www.wefearchange.org/2015/04/creating-python-snaps.html16:48
cwayne_barry, yeah, so I believe we'd basically followed that, and we seem to be having some confinement issues :/  getting the following denial: Aug  6 15:14:12 localhost kernel: [ 8857.835029] audit: type=1400 audit(1438874052.138:70): apparmor="DENIED" operation="open" profile="plainbox.sideload_plainbox_0.23.dev0" name="/proc/1162/fd/" pid=1162 comm="python3.4" requested_mask="r" denied_mask="r" fsuid=1000 ouid=100016:52
cwayne_was wondering if that looked familiar16:52
ogra_tyhicks might be able to help16:56
ogra_being our fake jdstrand this week :)16:57
tyhicksI can but I'll need a bit so I can finish something up16:58
cwayne_tyhicks, hiya :)  any advice ^  I think we have security_template: unconfined set, so i imagine we should have access16:58
cwayne_ah, ok16:58
* ogra_ tries snappy update on the rpi and crosses fingers17:20
ogra_(using image 8 from 15.04 alpha)17:21
elopiomterry: longsleep: https://code.launchpad.net/~elopio/snapcraft/symlinks/+merge/26721817:24
elopiothere are tests that check symlinks to directories. I think your bug is slightly different to that.17:24
ogra_yay, boots from b :D17:25
* ogra_ tries rollback17:26
barrycwayne: yeah, that doesn't ring a bell.  must be a new constraint since i wrote that blog17:28
tyhickscwayne_: ok, looking now17:34
elopiolongsleep: these are your problematic links, right?17:38
elopio/tmp/stage/usr/lib/ssl/private17:38
elopio/tmp/stage/usr/lib/ssl/certs17:38
elopioum, no, those should work fine too.17:39
elopioI'm confused.17:39
stgrabersergiusens: sorta. I have one but it doesn't work. It's on my todo for next week to fix.17:41
=== utlemming is now known as utlemming_away
=== utlemming_away is now known as utlemming
elopioahh, I get it.17:55
elopiothe link destination must be an existing directory.17:55
longsleepelopio: yes17:55
elopiothat's the bug in the original test.17:55
longsleepif it is existing (means not broken) then it ends up as dir17:55
sergiusensstgraber: thanks for the update!17:57
longsleepelopio: and for openssl these dirs probably always exist17:57
longsleepother question, snappy port conflicts - is the negotiable key actually implemented? How do i know which port i should listen?18:00
cwayne_tyhicks, the thing we're talking about is plainbox btw, (lp:checkbox, then the manifest is in checkbox/plainbox/Makefile)18:02
ogra_elopio, if you feel like http://people.canonical.com/~ogra/snappy/test/ has two rpi images, one built from stable 15.04 that i plan to release and one built from the 15.04 alpha channel with --revision=-1 for testing upgrade/rollback18:13
ogra_(not urgent, but i would like someone else but me test it additionally before i release ... as extra datapoint)18:14
ogra_kivi, ^^^18:14
kiviogra_, ?18:14
elopiolongsleep: sorry for being so dense. This should expose the bug and confirm your fix:18:14
elopiohttps://code.launchpad.net/~elopio/snapcraft/symlinks-2/+merge/26724018:14
ogra_kivi, err, ignore that ... tab mistmatch :)18:15
ogra_kyrofa, ^^^18:15
elopioogra_: ok, I'll check after lunch.18:15
elopioogra_: I thought updates were not psosible with rpi.18:15
ogra_i plan to release it tomorrow, so no hurry18:15
ogra_elopio, kernel/oem updates arent18:16
ogra_ubuntu-core wasnt until we fixed our uboot setup to use the uboot.env file ;)18:16
ogra_so now pi users can at least get rootfs updates :)18:16
elopioI see, that's nice.18:16
ogra_yep18:17
ogra_i2c should work too18:17
ogra_(not that we ship any tools to test it actually though :P )18:17
elopiowoot for i2c.18:19
elopionow I don't want to have lunch.18:19
ogra_lol18:20
ogra_there is also a way to use pverlay DTBs but i need to document that ... it isnt straightdforward until sergio adds directory support for oem snaps to u-d-f18:20
ogra_*overlay18:21
kiviogra_, Aww... I thought I was special...18:21
* ogra_ hugs kivi 18:21
kivi!hugs18:23
kiviubottu can't hug...18:23
tyhickscwayne_: my apologies, too many distractions for me today18:41
tyhickscwayne_: can you paste the relevant plainbox file in /var/lib/apparmor/profiles/ ?18:42
tyhickscwayne_: there should be 1 per binary but it looks like you only have 1 binary18:43
cwayne_tyhicks, sorry, was afk for a bit: http://paste.ubuntu.com/12013969/19:34
tyhickscwayne_: ah, that's definitely not the unconfined template19:35
tyhicks# Description: default AppArmor template19:35
cwayne_ah, so are we setting it incorrectly?19:40
tyhickscwayne_: that's what I'm looking into19:41
tyhickshttps://wiki.ubuntu.com/SecurityTeam/Specifications/SnappyConfinement19:42
tyhickscwayne_: ^ that page suggests that security-template is specified underneath 'binaries:'19:43
tyhicks(all the examples show it underneath 'services:' but I think that should be interchangeable)19:43
cwayne_tyhicks, hm ok, i think that may be it then, will play around with it19:57
cwayne_tyhicks, thanks for taking a look!19:57
tyhickscwayne_: no problem - let me know if you still have trouble and I can dig some more20:01
=== kivi is now known as harvo
=== harvo is now known as kivi
=== kivi-a is now known as barosa
=== barosa is now known as harvo
=== harvo is now known as kivi

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