Comment 4 for bug 1260079

Revision history for this message
Jamie Strandboge (jdstrand) wrote : Re: Can't store temp files anymore

On image 60, when I launch the app I see (this is also what is seen in comment #3):
Dec 12 20:25:51 ubuntu-phablet kernel: [ 449.802198] type=1400 audit(1386879951.569:119): apparmor="DENIED" operation="mkdir" parent=1394 profile="com.ubuntu.developer.daker.rad-io_rad.io_0.7" name=2F686F6D652F706861626C65742F2E6C6F63616C2F73686172652F51742050726F6A6563742F pid=2857 comm="qmlscene" requested_mask="c" denied_mask="c" fsuid=32011 ouid=32011

name=2F686F6D652F706861626C65742F2E6C6F63616C2F73686172652F51742050726F6A6563742F decodes to:
$ aa-decode 2F686F6D652F706861626C65742F2E6C6F63616C2F73686172652F51742050726F6A6563742F
Decoded: /home/phablet/.local/share/Qt Project/

rad.io.qml correctly has this in MainView:
applicationName: "com.ubuntu.developer.daker.rad-io"

as for the other apparmor denials:
 * /run/shm/lttng-ust-wait-5 - I'm not seeing this on grouper with surface flinger. I believe it is harmless though.
 * /sys/devices/virtual/timed_output/vibrator/enable - this is fixed in apparmor-easyprof-ubuntu 1.0.43 and should not affect the usability of the app
 * /run/user/32011/confined/com.ubuntu.developer.daker.rad-io.Ti6827 - I was able to confirm that TMPDIR is not being set correctly. If a start with aa-exec-click, it correctly set TMPDIR to '/run/user/32011/confined/com.ubuntu.developer.daker.rad-io', but when launching under upstart-app-launch, it is being set to '/run/user/32011/confined/'. I saw another time that upstart-app-launch set it is '/run/user/32011/confined//home/phablet/.local/share'

I am going to assign to upstart-app-launch for now. Since it isn't setting TMPDIR correctly, it might not be setting other variables correctly.

My testing:
1. Create /opt/click.ubuntu.com/com.ubuntu.developer.daker.rad-io/current/foo with:
#!/bin/sh
echo "TMPDIR=$TMPDIR"
echo "APP_ID=$APP_ID"

2. chmod 755 /opt/click.ubuntu.com/com.ubuntu.developer.daker.rad-io/current/foo

3. adjust /home/phablet/.cache/upstart-app-launch/desktop/com.ubuntu.developer.daker.rad-io_rad.io_0.7.desktop to have:
Exec=/opt/click.ubuntu.com/com.ubuntu.developer.daker.rad-io/current/foo

4. run upstart-app-launch:
$ start application APP_ID=com.ubuntu.developer.daker.rad-io_rad.io_0.7 ; sleep 5 ; tail /home/phablet/.cache/upstart/application-click-com.ubuntu.developer.daker.rad-io_rad.io_0.7.log
application start/running, process 3733
libust[3765/3768]: Error: Error opening shm /lttng-ust-wait-5-32011 (in get_wait_shm() at lttng-ust-comm.c:715)
libust[3765/3767]: Error: Error opening shm /lttng-ust-wait-5 (in get_wait_shm() at lttng-ust-comm.c:715)
libust[3765/3768]: Error: Error opening shm /lttng-ust-wait-5-32011 (in get_wait_shm() at lttng-ust-comm.c:715)
TMPDIR=/run/user/32011/confined//home/phablet/.local/share
APP_ID=com.ubuntu.developer.daker.rad-io_rad.io_0.7

5. run aa-exec-click:
$ aa-exec-click -p com.ubuntu.developer.daker.rad-io_rad.io_0.7 -- /opt/click.ubuntu.com/com.ubuntu.developer.daker.rad-io/current/foo
TMPDIR=/run/user/32011/confined/com.ubuntu.developer.daker.rad-io
APP_ID=com.ubuntu.developer.daker.rad-io_rad.io_0.7