/srv/irclogs.ubuntu.com/2015/12/17/#ubuntu-app-devel.txt

=== chihchun_afk is now known as chihchun
dholbachgood morning07:38
dpmbzoltan_, zbenjamin, good morning! Quick question: what's the best command to remove stale sdk schroots in my system?08:37
zbenjamindpm: remove the sessions? or remove the schroots completely?08:37
zbenjamindpm: schroot --all-sessions -e   removes all sessions08:37
zbenjamindpm: click chroot -a <arch> -f <framework> destroy removes them completely08:38
dpmthanks zbenjamin I had tried the first command, but it ended up with "E: chroot:click-ubuntu-sdk-15.04-armhf: Chroot not found"08:38
dpmas per the second command, the chroots themselves don't seem to be on my system, yet 'mount' lists them08:39
dpmzbenjamin, e.g. this is an extract of the output of 'mount': http://paste.ubuntu.com/14071919/08:40
dpmwhereas in Qt Creator I only have a 15.10 chroot (which does not appear in the output of mount)08:41
dpmzbenjamin, any ideas? ^^08:50
dpmok, in case anyone was having the same problem, deleting the one chroot from Qt Creator and then running 'schroot -a -e' seemed to clean everything up09:01
davmor2popey: on you 8.5 device if you open the terminal and type cat /var/log/syslog does it ever stop scrolling?10:58
popeytakes a while to do anything here11:00
popeyi typed it and pressed enter and nothing has happened11:00
popeyoh, there we go11:00
davmor2popey: now tap enter again11:00
popeyyes, it finishes11:00
davmor2popey: yeah mine finally stopped but was scrolling long enough for the screen to dim twice11:01
popeyits a big file :)11:01
popeyand when the screen dims it adds to the file11:01
zbenjamindpm:  sorry i just saw the question, but seems you already solved it11:17
dpmzbenjamin, yes, no worries11:18
mcphailpopey: looked at Spout last night. The git log shows one commit in the past 5 years, saying "Bug: Segfaults on Ubuntu". It might take a bit more hacking than I thought :p13:29
popeyhaha13:33
=== davidcalle_ is now known as davidcalle
=== davidcalle__ is now known as davidcalle_
beunostore is having some issues atm14:34
RTE68hey there15:00
RTE68can someone please point me to a current tutorial on developing an app mostly in C++? The one I could find is from 201315:02
RTE68I want to keep logic out of the QML if possible15:03
mcphailRTE68: to be honest, the default Ubuntu qml/c++ template is a good start. After that, there is the QML Cadaques book online15:05
RTE68nice, I didn't know about that book. Thanks15:06
mcphailRTE68: There isn't a good text about qml best practice, as far as i've found. I find it hard to avoid making it like a 1990's web page15:07
RTE68hehe15:07
slvn_Hello,15:12
slvn_I am developping native games (eg C/C++) for ubuntu devices.15:12
slvn_it appears that I am saving some configuration file into a directory, and that directory is erased after rebooting the phone.15:12
slvn_The directory is : $XDG_RUNTIME_DIR15:12
slvn_I save everything into $XDG_RUNTIME_DIR/confined/$APP_ID15:12
slvn_(more precisely $APP_ID, but without the prefix-version)15:12
slvn_Which directory could I use for persistent storage ?15:13
rbasakslvn_: see http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html. I think that applies to the Ubuntu phone but I'm not entirely sure.15:13
rbasakslvn_: so $XDG_DATA_HOME presumably.15:14
rbasakOh, for configuration files, $XDG_CONFIG_HOME.15:14
slvn_that matchs a former comment in my code  :)15:14
slvn_"TODO : XDG_CONFIG_HOME does not work"15:15
slvn_but that was one year and a half ago15:15
=== jgdxx is now known as jgdx
slvn_I will try again ...15:15
slvn_thanks rbasak15:16
rbasakI'm using xdg_cache_home/appid/...15:17
RTE68Is there a straightforward way to work with sqlite? I see I can use LocalStorage from QML, but what is available to use from the C++ side?15:17
rbasakRemember you have to construct the path if the env var isn't set.15:17
slvn_you use "xdg_cache_home" as a value for $XDG_CONFIG_HOME ?15:18
slvn_but, is it really possible. I mean, there should be some "confined" protection15:18
dobeyslvn_: configuration should be in XDG_CONFIG_HOME15:19
slvn_yep I agree.  I will check that ..15:19
slvn_actually, I would need the help of someone to test my app one a ubuntu phone or tablet ...15:20
dobeythe variablese are set per-app under confinement15:20
dobeyso you don't need to append additional $APPID or anything15:20
slvn_ok!15:21
slvn_do you have time to test a .click package ?15:22
mcphailslvn_: the site seems to be down just now, but have a look at https://developer.ubuntu.com/en/start/platform/guides/app-confinement/ and scroll down to the Runtime Environment section, which tells you what you need to know15:22
dobeynot really, no15:23
slvn_I totally agree ... but 1.5 year ago XDG_CONFIG_HOME wasn't working I think !  because I tried that first. .. and then I switched to XDG_RUNTIME15:23
slvn_dobey,  no pb, thanks anyway for the help !15:23
dobeynot sure what you were doing then, but XDG_CONFIG_HOME was definitely working then15:24
dobeyslvn_: if you don't have a device, i'd recommend you try to at least get the x86 emulator working enough to test basic things like this for yourself15:25
rbasak<dobey> the variablese are set per-app under confinement15:25
rbasakThat's a little surprising to me. It suggests I should notice a difference between confinement and without, but I test in both scenarios and nothing broke.15:25
rbasakI'm using Python's xdg.BaseDirectory module.15:25
dobeyrbasak: right, without confinement it's a different directory, but you're app is unconfined, so it has the permissions to write to it15:26
rbasakI hadn't noticed that the paths are different.15:26
rbasakBecause I write logs to $XDG_CACHE_HOME/appid/... for convenience.15:27
rbasakI never did figure out how to run something under confinement and have access to its stdio directly.15:27
mcphailslvn_: If you can pull together a solitaire app with the new paths, I can test it later. Was going to grumble about my config settings getting lost on reboots ;)15:28
dobeyrbasak: stdout/stderr?15:29
dobeyrbasak: confined apps all have their stdout/stderr directed to a log under ~/.cache/upstart/15:29
rbasakdobey: yeah, so no stdin, etc. It's painful.15:31
rbasakI ended up using aiomanhole (like Twisted's manhole) to interactively examine state.15:32
dobeyrbasak: oh, well you have to grab stdin from its /proc/ i guess15:32
mcphailbeuno: I don't think it is just the store which is down15:32
dobeybut eh, why would you be mucking with stdin for a phone app?15:32
dobeymcphail: it's not15:33
mcphaildobey: I smell melted server :)15:33
beunomcphail, it isn't just the store  :)15:33
slvn_mcphail, yes, this is the issue ... rebooting will make the setting disappears (if you want to pull your setting just copy the files from the phone named dbstat dbconf)... I will prepare a .click package15:34
mcphailslvn_: Merci :)15:38
slvn_mcphail, Avec plaisir !15:40
RTE68What is the component I need to use for the bottom edge swipe?15:47
mcphailRTE68: I don't think there is one on the standard image just now. Most people have been using a community-made one. I think there is a new bottom-edge component being added in the next SDK update15:49
=== hasselmm1 is now known as hasselmm
mcphailRTE68: DirectionalDragArea is going to be the new one15:50
mcphailRTE68: https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/143580515:50
ubot5Ubuntu bug 1435805 in unity8 (Ubuntu) "Expose DirectionalDragArea in the UITK" [Undecided,Confirmed]15:50
RTE68mcphail, I see. What is the recommended component to use for now though?15:52
mcphailRTE68: I think people are using PageWithBottomEdge from https://ubuntu-component-store.readthedocs.org/en/latest/15:53
* mcphail hopes the Ubuntu Component Store will stir back into life15:55
RTE68mcphail, thanks!15:57
slvn_... from this link : https://wiki.ubuntu.com/SecurityTeam/Specifications/ApplicationConfinement16:00
slvn_it says "Explicitly set XDG_CACHE_HOME, XDG_RUNTIME_DIR, XDG_DATA_HOME and XDG_CONFIG_HOME to system values (ie, not app specific values). "16:00
RTE68mcphail, the Component Store ppa is failing with a 404 error...16:00
RTE68how can I manually download the component?16:01
slvn_I was using XDG_RUNTIME_DIR/confined/$APP_ID16:01
slvn_I believe i need something similar for XDG_CONFIG_HOME.16:02
slvn_(sorry for interleaving messages ...)16:02
mcphailpopey: can you ping aq and ask him to defibrillate the component store server for RTE68 ^^ ?16:04
popeyhaha16:04
popeyRTE68, mcphail he's checking16:05
mcphailpopey: ta16:06
aquarius_yo16:06
popeymy spell of 10 invocation worked16:06
aquarius_is it working now?16:06
mcphailaquarius_: RTE68 would like to pinch PageWithBottomEdge from the component store but he's getting a 404 from the PPA16:07
aquarius_RTE68: can you show the command that's failing?16:07
RTE68aquarius_, sudo apt update16:07
aquarius_(I don't think that that's the component store server's problem; PageWithBottomEdge is a Curated component, so it lives purely in Launchpad)16:07
RTE68W: Failed to fetch http://ppa.launchpad.net/ubuntu-touch-community-dev/ppa/ubuntu/dists/wily/main/binary-amd64/Packages  404  Not Found16:08
aquarius_ah, then you want nik90 for that, not me, I'm afraid16:08
mcphailaquarius_: is it possible to d/l the component irect from lp?16:08
aquarius_yup. https://launchpad.net/component-store16:10
mcphailRTE68: http://bazaar.launchpad.net/~ubuntu-touch-community-dev/component-store/trunk.14.10/files/head:/curated-store/ComponentStore/PageWithBottomEdge/ looks like it. Thanks aquarius_16:11
RTE68thanks aquarius_16:12
RTE68mcphail, thanks. Is it a single qml file?16:12
RTE68(first qml app here :P)16:12
mcphailRTE68: looks like it, with docs at the previous "readthedocs" link. I haven't used it, though16:13
RTE68mcphail, ty g2g16:20
slvn_rbasak, dobey, I have tried to save file in $XDG_CONFIG_HOME/$APP_ID   (minus whatever is after "_"). And I can not save !17:01
slvn_I get an App Armor Log17:01
=== BOHverkill_ is now known as BOHverkill
slvn_apparmor="DENIED" operation="open" profile="com.ubuntu.developer.1bsyl.cartes_cartes_1.01" name="/sys/class/" pid=14546 comm="main.out" requested_mask="r" denied_mask="r" fsuid=32011 ouid=017:01
slvn_any idea ?17:03
ogra_looks like your app tries to read /sys ...17:05
ogra_teach it not to ;)17:05
slvn_No, I don't think it tries to read /sys ...  I have tried to write/read to "$XDG_CONFIG_HOME/$APP_ID   (minus whatever is after "_")"17:08
slvn_after a debug message, I try to write into "/home/phablet/.config/com.ubuntu.developer.1bsyl.cartes/"17:12
ogra_ name="/sys/class/"17:20
ogra_thats the path it tries to read17:20
ogra_from the command "main.out"17:20
slvn_ogra_,  yep, I read the log also  :)  ... but my app is not reading /sys/class (neither /sys/bus ... because there is also a log for /sys/bus)17:22
slvn_it's just a fopen17:22
slvn_with previous path + file name17:22
slvn_maybe the directory is not created17:23
slvn_will try that ..17:23
rbasakslvn_: you could put a sleep statement in maybe, and then strace attach to it. Then you'll be able to see what it's actually trying to do.17:25
rbasak/sys/class apparmor denial looks like a red herring to me.17:25
slvn_rbasak, ... the device is at popey's home .. so I will need a 24h sleep to get there :)17:31
slvn_actually17:31
slvn_the app armor appears / disappears with my fopen s17:31
slvn_*log*17:31
slvn_some it might be related ...17:31
slvn_oups sorry ...17:32
slvn_maybe not related,17:32
slvn_surely not related17:33
slvn_the log is incremented17:33
slvn_and it's probably mir that is trying to do something ...17:33
slvn_in my ".deskop" file, I run my app with "Exec=main.out"17:39
slvn_maybe there is a mis match of permission between XDG_CONFIG_HOME and launcher or something17:40
mcphailslvn_: I don't think those apparmor denials are anything important, as your version 1.00 app does that as well. Perhaps you have to create the $XDG_CONFIG_HOME/$APP_PKGNAME directory before writing to it?17:45
slvn_mcphail, indeed the apparmor are not related. I have been mislead by the log being increase. I have also tried quiclky to create the directory  ... I need to check the UID, GID, and some error code to see what's wrong17:47
popeyslvn_, we've added the feature you asked for (text description field) but I need to bounce everything for the change to be deployed17:51
popeyslvn_, so you'll have to hold off marvin for a few minutes :)17:51
slvn_can I give a last try ?17:51
popeysure17:51
popeylet me know when you're done17:51
dobeyslvn_: if you specify extra directories after $XDG_CONFIG_HOME, you will have to create them17:52
dobeyslvn_: you do not need to append $APP_PKGNAME to the path17:53
dobeyslvn_: $XDG_CONFIG_HOME already contains the $APP_PKGNAME under confinement17:53
mcphaildobey: no, it doesn't17:53
dobeymcphail: yes, it does17:54
slvn_popey, done ! thanks !17:54
mcphailOh nod it doesn't </panto>17:54
popeyok17:54
dobeyif it doesn't, then you are not running the app confined, or you've found a bug17:54
dobeymost likely the former17:55
popeyslvn_, ok, it's back17:55
slvn_dobey,  I use $XDG_CONFIG_HOME/$APP_PKNAME   because the doc says that .. https://wiki.ubuntu.com/SecurityTeam/Specifications/ApplicationConfinement17:57
mcphaildobey: https://developer.ubuntu.com/en/start/platform/guides/app-confinement/ doesn't support your assertion17:57
slvn_maybe I should tried directly XDG_CONFIG_HOME ..17:57
mcphaildobey: nor does the output of slvn_'s app which dumps all environment variables17:58
slvn_lstat reutns 0, with uid=32011 gid=3201117:58
slvn_and my uid is Get Uid ret=32011 ret=3201117:58
dobeymcphail: are you sideloading a click that is "debug" ?17:58
dobeyanyway, whatever17:59
slvn_Use $XDG_CONFIG_HOME doesn't work neither :(18:05
slvn_Could this be the partition that is mounted read-only ??18:06
mcphailslvn_: no - definitely not read only on my device18:14
slvn_When write the file, I got errno=13 "Permission denied"18:21
mcphailslvn_: did you try to create the directory first?18:22
slvn_I think it is created because lstat works on it.18:23
slvn_maybe it has wrongs perms18:23
slvn_will do a chmod on it maybe18:23
mcphailthat shouldn't be needed18:23
=== dpm is now known as dpm-afk
slvn_chmod returns 0, so it worked .. but I still cannot write ...18:31
slvn_I write with "w+"18:31
slvn_I solved $my xdg_config_dir issue .. probably mix of mistake+creation of directory. thanks for the help.23:14

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