<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
<title></title>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
<meta http-equiv="Content-Style-Type" content="text/css"/>
</head>
<body>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">Thank you Jamie, </span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">those links are very helpful and I was able to do some progress with my snaps. </span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">On snappy vm (amd64) my framework snap installs and registers on dbus, I can also see
dbus config generated for it.</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">But today I was doing more tests on RPi2 image (latest, 15 Apr build) and I got permission
error after snap install. I have tried the package-dir-fwk example but got the same error:</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">Jun 1 17:39:09 localhost kernel: [ 3787.848606] audit: type=1400 audit(1433180349.509:13):
apparmor="STATUS" operation="profile_load" profile="unconfined"
name="hello-dbus-fwk_srv_1.0.0" pid=1786 comm="apparmor_parser"</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">Jun 1 17:39:09 localhost systemd[1]: Reloading.</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">Jun 1 17:39:09 localhost systemd[1]: Started hello-dbus-fwk test service.</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">Jun 1 17:39:09 localhost systemd[1]: Starting hello-dbus-fwk test service...</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">Jun 1 17:39:09 localhost dbus_service.start[1803]: FAIL:
org.freedesktop.DBus.Error.AccessDenied: Connection ":1.26" is not allowed to own the
service "com.canonical.hello-dbus-fwk" due to security policies in the configuration file</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">Jun 1 17:39:10 localhost systemd[1]: hello-dbus-fwk_srv_1.0.0.service: main process exited,
code=exited, status=1/FAILURE</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">Jun 1 17:39:10 localhost systemd[1]: Unit hello-dbus-fwk_srv_1.0.0.service entered failed
state.</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">Jun 1 17:39:10 localhost systemd[1]: hello-dbus-fwk_srv_1.0.0.service failed.</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">I am using last version of snappy-tools while building snap. </span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">Is there something I'm missing? </span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">Below is my system info:</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">(RaspberryPi2)ubuntu@localhost:~$ sudo snappy list</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">Name Date Version Developer</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">ubuntu-core 2015-04-10 4</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">hello-dbus-fwk 2015-06-01 1.0.0</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">pi2 2015-04-15 0.11 lool</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">(RaspberryPi2)ubuntu@localhostlsb_release -a</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">No LSB modules are available.</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">Distributor ID: Ubuntu</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">Description: Ubuntu Vivid Vervet (development branch)</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">Release: 15.04</span></font></div>
<div align="left"><font face="Arial" color="#7f7f7f" size="2"><span style=" font-size:10pt">Codename: vivid</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">-Sergey </span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt">On 29 May 2015 at 12:31, Jamie Strandboge wrote:</span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> On 05/29/2015 10:29 AM, Sergey Demyanov wrote:</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> > Hi everyone,</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> > </span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> > </span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> > I wanted to reiterate question on the way snap developers would configure dbus</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> > permissions if needed. Since we have to use System bus for snaps by default we</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> > cannot own and register objects on the bus. </span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> > As of now the only way is to copy own .config file</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> > into /etc/dbus-1/system.d/ but in recent builds that partition is read only and</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> > remounting seems like a big hack. </span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> > May be it is possible to allow some namespace prefix for snaps to own or include</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> > config into snap package and make snappy apply it during install?</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> > </span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> > Should I open bug for this or first discuss here the way to do it? </span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> </span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> This was implemented just before 15.04 was released via 'bus-name' in the</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> package.yaml for frameworks[1]. Under the hood, when a framework snap service</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> specifies 'bus-name', snappy will update the system service to include BusName=</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> and Type=dbus and snappy will also create simple bus policy in</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> /etc/dbus-1/system.d. You can see 'hello-dbus' from the snappy-examples[2] for a</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> working example, or install them on your system:</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> </span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> $ sudo snappy install hello-dbus-fwk</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> $ sudo snappy install hello-dbus-app</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> $ hello-dbus-app.client</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> PASS</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> </span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> [1]https://developer.ubuntu.com/en/snappy/guides/frameworks/</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> [2]http://bazaar.launchpad.net/~snappy-dev/snappy-hub/snappy-examples/files/head:/hello-dbus/</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> </span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> -- </span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> Jamie Strandboge http://www.ubuntu.com/</span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> </span></font></div>
<div align="left"><font face="Arial" color="#7f0000" size="2"><span style=" font-size:10pt">> </span></font></div>
<div align="left"><font face="Arial" size="2"><span style=" font-size:10pt"><br />
</span></font></div>
<div align="left"> </div>
</body>
</html>