/srv/irclogs.ubuntu.com/2016/01/18/#snappy.txt

imnicholI'm playing around with creating a znc snap, and I'm running into an issue where "snapcraft stage" fails, but running "./configure" succeeds.  Is there any way to see what snapcraft is doing differently?02:27
imnicholIs there a way to configure a post-install script to run after a snap is installed?  I need to kick off the generation of a configuration script03:20
imnicholOh wait, I could probably use the copy section of snapcraft.yaml and copy over a template config03:21
imnicholBut if I do that, will the user be able to modify it with their own configuration?03:21
imnicholIs there something like a home directory for snaps?  znc looks for it's config file in ~/.znc/config/znc.conf so if I can't place the config file there, then I need to hack on znc itself, which is more work :/04:09
=== chihchun_afk is now known as chihchun
* tsimonq2 is gone: 05:59
=== bigcat__ is now known as bigcat
zygagood morning08:02
fgimenezgood morning08:12
LefterisJPHey guys I have a question for framework/app filesystem structure. I have some data that keeps growing and need them to persist over upgrades and it would be nice if they are not duplicated at all upgrades. Where can I place such data?09:23
JamesTaitGood morning all! Happy Monday, and happy Martin Luther King Jr. Day! 😃09:44
=== chihchun is now known as chihchun_afk
=== chihchun_afk is now known as chihchun
=== chihchun is now known as chihchun_afk
blah1I'm working through the snapcraft tutorial, and it doesn't have a step for editing package.yaml.  What step should I do that in?13:24
sergiusensblah1, I don't follow13:31
blah1sergiusens: I'm playing around with building a snap from znc just to get an idea of how snaps are built13:32
blah1I can get it staged just fine13:32
sergiusensblah1, I don't follow the specific question you asked ;-)13:32
blah1ah13:32
sergiusensblah1, oh, but I misread13:32
sergiusenspackage.yaml, you are not supposed to edit13:32
blah1uh, how about this: "is package.yaml automatically generated or do I have to create it?13:32
sergiusensit is automatically generated from snapcraft.yaml13:33
blah1Ok, is there a way to call the program with specific flags then?13:33
sergiusensblah1, are you using 1.x or 2x?13:33
blah1sergiusens: of what software?  snappy?13:34
sergiusensthe version of snapcraft is what I ask for13:34
blah11.013:34
sergiusensblah1, so in snapcraft.yaml you must have a binaries or services entry; if your command is a binary, add an exec, if it is a service add it to start13:35
sergiusensblah1, here's an example https://github.com/ubuntu-core/snapcraft/blob/1.x/examples/ros/snapcraft.yaml13:35
blah1sergiusens: oh ok that makes sense13:35
sergiusensthere are two binaries, named listener and talker, each exec'ed with what is in exec13:36
blah1sergiusens: so I could do something like "binaries: server: exec: znc --whatever flags here"?13:37
blah1I'm assuming that the "talker" and "listener" entries tehre are arbitrary13:37
sergiusensblah1, there is one minor problem in params here, envvars are not allowed do to security problems; we've solved that in 2.x though with some magic wrappings (might backport it or not)13:37
sergiusensblah1, those are the names you want your binaries exposed as13:37
blah1sergiusens: ok makes sense13:37
blah1what do you mean by problem with params?13:37
sergiusensblah1, once installed on Ubuntu Core, they will be accessed as 'ros-example.listener' and 'ros-example.talker'13:38
sergiusensblah1, the one you gave as an example should work fine13:38
blah1ok awesome13:38
sergiusensblah1, this won't work though 'exec: znc --tmpdir $TMP' ... as '$' is a non valid char13:38
sergiusensit would work in 2.x though13:39
blah1sergiusens: ok yeah, that shouldn't be an issue13:39
blah1Is there a way for me to put a config file somewhere where the user could modify it?13:39
blah1I'm working with znc and obviously everyone's going to need to put unique data in the conf file13:39
blah1Otherwise everyone would be connecting to the same IRC channel ;)13:40
ogra_blah1, i have a bip package with a "snappy config" hook ... perhaps you want to look at that one ... though that does only use global configs13:56
ogra_http://bazaar.launchpad.net/~ogra/+junk/ircproxy/files13:57
blah1ogra_: that should do what I need13:59
blah1thanks13:59
ogra_mind you, most people wouldnt consider shell good for parsing yaml though ... yxou might want to look inot a python or GO way or some such14:00
ogra_(talking about config.sh here)14:00
blah1ogra_: actually, I think I can do it even more simply since I can point znc to an arbitrary conf file14:01
ogra_well, but then you need to edit the config by hand14:01
blah1I just need to know where to put it so that someone can edit the .conf once they install the snap14:02
blah1ogra_: true14:02
ogra_instead of using snappy config14:02
blah1Oh yeah I see what you mean14:02
blah1ogra_: that looks really cool but kind of a "running before I walk" kind of deal.14:08
Chipacablah1: https://github.com/ubuntu-core/snappy-testdata/blob/master/config-example/meta/hooks/config14:18
sergiusensblah1, doing it the snapcraft way, look at the config stuff in the webcam-webui example (one level above the link I gave you)14:19
blah1sergiusens: thx14:21
kyrofasergiusens, saw your PR. How is this not a problem on amd64?14:24
kyrofaelopio, travis doesn't offer any way to run tests on arm, I assume?14:24
sergiusenskyrofa, I am not sure; no denials there14:25
sergiusenskyrofa, well we don't run the tests on arm or x86 using travis14:25
elopiokyrofa: you are right.14:25
sergiusenskyrofa, are you back in action?14:25
sergiusensor just lurking?14:25
kyrofasergiusens, bizarre. But you can confirm it continues to work on amd64?14:25
kyrofasergiusens, no I need to bring my brother back to DC here pretty quick, but I will be after that14:25
sergiusenskyrofa, it should; right after that line of code, there's a CMAKE_PREFIX_PATH.insert(os.path.abspath(__file__), 0)14:26
sergiusenswell you get the gist of it, __file__ being _setup_util.py which coincides with rosdir (dirname)14:27
kyrofasergiusens, gotcha14:28
kyrofasergiusens, does the face detector work on the rpi, then? Or more problems?14:30
sergiusenskyrofa, same problems14:34
sergiusenskyrofa, might be good to setup a hangout14:34
kyrofasergiusens, hmm... and no denials? Maybe I'll flash regular-old Ubuntu on my rpi and see if it's a snappy thing or an rpi thing or what14:35
kyrofasergiusens, sure, I'll ping you when I'm back :)14:36
sergiusenskyrofa, great, I found more logs btw http://paste.ubuntu.com/14567191/14:41
sergiusenskyrofa, and http://answers.ros.org/question/212847/how-to-get-usb-camera-frame/14:56
* ogra_ would rather want the picture, not the frame :P14:57
sergiusenskyrofa, so in summary I think I need to learn how to change the capture pixel fmt from mjpeg to yuyv with roslaunch files (as I can't change that could, well, hmmm15:44
fgimenezelopio, jenkins master is building after pushing your changes to my fork https://hub.docker.com/r/fgimenez/snappy-jenkins/builds/15:59
elopiofgimenez: thank you!15:59
noise][1for 16.04 I assume snappy will be periodically checking all installed packages for updates, is that implemented yet?16:01
renatHi guys! Are you planning to include support of snaps running in chroot?16:05
noise][1Chipaca: do you happen to know about my updates question ^^^ ?16:05
ogra_renat, for desktops, yes .... iirc that is what the libertine project does16:06
renatorga_, thanks! Let me investigate it.16:06
Chipacanoise][1: yes, but 16.04 is that which we break all the time16:08
Chipacanoise][1: that is your answer about your question about updates, not your answer to you question about your updates question16:09
Chipacanoise][1: in particular, if the 16.04 you're talking about is pre-all-snaps, I don't think it'll continue updating16:10
* noise][1 shakes head in confusion :)16:10
noise][1Chipaca: 2 followups: how often is that check going to be, and I don't think we have a bulk query api for CPI so that'll be one CPI hit per installed package right?16:11
Chipacanoise][1: we have a bulk query api for cpi16:11
Chipacanoise][1: I think we settled on checking a few times throughout the day, downloading when available, and installing once a day16:12
noise][1ah, (checks CPI APIs again - click-metadata endpoint), that's good.16:12
noise][1Chipaca: excellent, thx for the details16:12
Chipacanoise][1: right now it'll just run update once an hour though16:13
Chipacagive or take 15 minutes16:13
ChipacaOnCalendar=hourly16:14
ChipacaAccuracySec=15min16:14
noise][1Chipaca: we'll probably want that to be less often by launch16:16
Chipacanoise][1: that's in a snappy system, fwiw16:16
Chipacanoise][1: I have no idea how often (nor how) snappy mode would do it16:16
blah1I've managed to build and sideload a snap, but when I try to start the service it fails with the error here: https://paste.ubuntu.com/14567702/16:16
renatorga_, seems it's not what we want. We need ultra light approach, for example with systemd-nspawn?16:17
blah1I thought that running "snapcraft stage" was meant to add the libraries in the right location and take care of that, or did I misunderstand?16:17
ogra_renat, well, there are lxd and docker frameworks16:17
renatogra_, thanks!16:19
blah1To solve my own problem, I've probably got to use a stage package, huh?16:20
Chipacablah1: you're building against the wrong libcxx16:22
Chipacablah1: libstdc++ i mean16:22
sergiusensblah1, most likely, is znc from source?16:22
blah1sergiusens: yes16:22
blah1if it matters: I'm building it on a 15.10 box, but snappy core is running on a 15.04 box16:23
sergiusensblah1, maybe create a container or vm on 15.04 to get that out of the way16:27
sergiusensblah1, the quick solution though is to add a stage-package stanza and add libstdc++ in there16:28
sergiusensiirc that is the package name16:28
blah1Alright, thanks!16:28
sergiusenselopio, any idea what's wrong with https://github.com/ubuntu-core/snapcraft/pull/240 ?17:05
elopiosergiusens: it seems coveralls is not parsing the coverage file.17:08
elopionothing wrong on our side.17:08
sergiusenselopio, ok then; once that's in I think we are good for a 2.017:10
sergiusenselopio, did you update the changelog btw?17:10
elopiosergiusens: I'm just looking now at all your comments regarding missing bugs.17:11
elopioI'll start searching for them.17:11
kyrofasergiusens, elopio okay I'm actually here now18:12
sergiusenskyrofa, great, I'm leaving for lunch :-P18:12
kyrofasergiusens, hahaha18:12
sergiusenskyrofa, but I have been succesful!18:13
kyrofasergiusens, no way! Awesome!18:13
sergiusenskyrofa, well, almost; no more camera errors18:13
kyrofasergiusens, but no image?18:13
sergiusenskyrofa, now I need to figure out rosrun imgviewer18:13
kyrofasergiusens, ah, that I can help with :)18:13
kyrofasergiusens, go eat, ping me18:13
sergiusenskyrofa, ok; will be back in a bit :-)18:13
sergiusenskyrofa, ok, hangout?18:31
kyrofasergiusens, give me 2 mins18:33
kyrofasergiusens, alright, standup url18:38
sergiusenskyrofa, sure18:40
elopiosergiusens: I don't understand what you meant with the 1.0 changelog.18:40
kyrofasergiusens, for your reference: http://wiki.ros.org/ROS/NetworkSetup18:45
sergiusenskyrofa, ok, got it working19:01
sergiusenskyrofa, the hz thing19:02
kyrofasergiusens, excellent! The next step you pretty much have: `rosrun image_view image_view image:=<topic you want to view>`19:02
kyrofasergiusens, use /camera/image_raw to get the raw feed, and the faces one to get faces19:02
kyrofasergiusens, image_view does require X19:02
kyrofasergiusens, so make sure you have that reversed or something19:03
sergiusenskyrofa, \o/19:03
kyrofasergiusens, yeah? Fantastic!!19:03
kyrofasergiusens, how is the performance of the face detection on that thing?19:03
kyrofasergiusens, is it useable?19:04
sergiusenskyrofa, with patience :-)19:04
kyrofasergiusens, hahaha19:05
kyrofasergiusens, I could write a much more performant one, it would just take more time19:06
sergiusenskyrofa, this is fine19:06
sergiusenskyrofa, http://imgur.com/2EtrDqB19:07
kyrofasergiusens, awesome :)19:07
kyrofasergiusens, I'm sorry that was such a painful experience19:08
sergiusenskyrofa, so, network latency even though it is all wired comes into effect, I am also doing two streams19:08
sergiusensand the webcam is low res19:08
sergiusenskyrofa, and it is an rpi2 :-P19:08
kyrofasergiusens, yeah, definitely19:08
sergiusenskyrofa, this was a good excersice that got rid of plenty of bugs19:08
kyrofasergiusens, so did you end up needing an apparmor/seccomp workaround in the yaml?19:09
sergiusenskyrofa, only due to lazyness19:10
sergiusenskyrofa, http://paste.ubuntu.com/14569194/19:11
kyrofasergiusens, so it definitely needed more permissions than it could get from snappy? If you weren't in a hurry, would we just be waiting for capabilities?19:12
sergiusenskyrofa, yeah, we are basically waiting on zyga; and the udev thing is probably fixable; the mounts is totally ignorable19:12
kyrofasergiusens, okay so none of those things are things we'll never be able to access?19:13
sergiusenskyrofa, mounts is probably a never allowed lightly19:14
kyrofasergiusens, but non-fatal19:14
sergiusenskyrofa, I don't know what we may encounter with other packages, but this one is pretty sane19:14
kyrofasergiusens, okay, good deal19:14
sergiusensI'll experiment more and polish now19:14
kyrofasergiusens, thanks for doing that man19:15
sergiusenskyrofa, heh, well I'll probably spend some family time as I travel in 12 hours (5:30 AM flight)19:15
sergiusenskyrofa, and polish on the way :-)19:15
kyrofasergiusens, yeah do that!19:15
sergiusenselopio, btw with 1.0 I mean, grab the changelog corresponding to 1.0 from the 1.x branch, copy and paste in between 0.6 and 2.0 :-)19:18
elopiosergiusens: I thought about that but it didn't seem correct. Many of the 1.0 entries are from backports from the master branch.19:19
elopiothey would be duplicated, and they refer to stuff that never happened in this branch.19:19
sergiusenselopio, yeah, but it seems to be the way it is done19:26
sergiusenselopio, this is what dholbach did before19:26
elopiosergiusens: if you say so, it's coming...19:26
camakoWhere does snappy redirect an app's stdout?19:57
camakoi.e. where do printfs go?19:57
=== mwhudson is now known as Guest86296
=== Guest86296 is now known as mwhudson
=== mwhudson is now known as Guest65934
=== Guest65934 is now known as mwhudson
bellyfeelI understand that snappy uses a read-only filesystem, but why am I able to write to certain files within the hierarchy? What's the distinction?20:31
kyrofabellyfeel, each app has its own read/write space which must be on writable partitions21:06
kyrofabellyfeel, check out /etc/fstab on the snappy system-- the labels should clue you in21:07
kyrofabellyfeel, err, paths21:07
kyrofacamako, nothing special is done with the stdout. For binaries you should see it on the terminal, for services the syslog21:09
bellyfeelkyrofa, ok so it's the user vs os space distinction21:10
camakokyrofa, thanks21:10
kyrofabellyfeel, yeah more or less21:11
bellyfeelso what determines if a directory or file is writable within the ~/ directory?21:14
beunobellyfeel, apps can only write to their own space, they are confined from the rest21:15
bellyfeelfor example i can modify /etc/sysctl but not /etc/modules21:15
beunoyou shouldn't be able to modify anything outside of your own writable space when confined21:16
beunonot even the app's own files21:16
beunois this on 15.04 or rolling?21:16
bellyfeelrolling21:17
beunoso there are 2 levels of confinement21:17
beunosome parts of the system are hardcode read-only21:17
beunoand some of them you will be confined when building a proper snap21:17
beunoat least snaps that can be uploaded to the general store for others to install21:18
bellyfeelso the latter is when a snap is trying to access some part of the os/kernel21:20
beunocorrect21:21
beunoor a file outside of its own realm21:22
beunolike a file from another app21:22
beunothe general idea is that people can generally safely install apps and trust they won't be stealing data or otherwise being malicious outside of themselves21:22
enoch85kyrofa, hey! just got home21:29
kyrofaenoch85, hey there!21:30
enoch85so ownCloud is in now=21:30
enoch85?21:30
enoch85(haven't checked)21:30
kyrofaenoch85, it's in progress. I got the answer to my mysql extension question by looking at the owncloud src, and it's PDO21:31
kyrofaenoch85, so I'm working on that now. Looks like I need a few more PHP extensions enabled as well21:31
enoch85kyrofa, ok cool21:31
kyrofaenoch85, but I have the owncloud error page working telling me what I'm missing, so I feel quite close21:31
enoch85kyrofa, I have the full list in my code21:31
enoch85kyrofa, have you checked?21:31
kyrofaenoch85, no-- some of these are probably included in the .deb, so I'm letting owncloud tell me21:32
enoch85kyrofa, https://github.com/enoch85/ownCloud-VM/blob/master/beta/owncloud_install.sh#L88-L10621:32
enoch85kyrofa, okok21:32
enoch85kyrofa, need any help?21:36
kyrofaenoch85, nah, this shouldn't take too long21:37
LefterisJPwhen I have architecture set to armhf in snapcraft and use node.js in a part like this: parts:22:12
LefterisJP   test-webserver:22:12
LefterisJP     plugin: nodejs22:12
LefterisJP     node-packages:22:12
LefterisJP       - web322:12
LefterisJPCan't the staged node binary have the armhf architecture somehow?22:13
LefterisJP(right now it does not)22:14
kyrofaLefterisJP, snapcraft doesn't support cross-compilation right now23:12
kyrofaelopio, you around?23:12
elopiokyrofa: yes23:13
kyrofaelopio, can you think of any reason why an app in my .snap would be linking to /usr/lib/arch/libkrb5.so.3 when there's a perfectly good one in $SNAP_APP_PATH/usr/lib/arch/libkrb5.so.3 ?23:14
kyrofaelopio, I see $SNAP_APP_PATH/usr/lib/x86_64-linux-gnu in the .wrapper LD_LIBRARY_PATH, which to me means it should have precedence over the one in /usr/lib23:15
elopiokyrofa: yes. The only related change I can think of was renaming the $SNAP_APP_PATH var, but afaik the old was has not been removed.23:17
elopiokyrofa: sorry, I don't know.23:17
kyrofaelopio, that's alright, I wanted to whine more than anything23:17
kyrofaelopio, glad to know you're still here23:17
elopiokyrofa: ok, then keep going :)23:18
kyrofaelopio, :P23:18
elopiokyrofa: I was about to leave for the gym, and bbl. Do you need me here?23:18
kyrofaelopio, haha, no but thanks for the offer23:19
elopiojust double checking...23:19
xnoxlooks like snappy doesn't know about s390x architecture.23:53
LefterisJPkyrofa: The solution right now was to simply include an armhf-node binary and copy it inside the staging aread by using the copy plugin in snapcraft. Not elegant but working. Guess this can be later improved in snapcraft itself.23:56
kyrofaLefterisJP, you you have the right idea. That way you can create a .snap that can be run on multiple architectures23:56
LefterisJPkyrofa :)23:58
LefterisJPkyrofa: one other question that you or someone else may be able to answer.23:58
kyrofaLefterisJP, sure23:59
LefterisJPkyrofa: What would be a directory for a framework to write data to that should be persistent across updates? I am making a framework for ethereum, which runs a client and downloads the blockchain. Re-syncing the blockchain with each upgrade would be a no-go.23:59

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