<div dir="ltr"><div><div><div><div><div><div><div>"This is an old yaml format and the policy vendor and version you are using<br>
indicate this is from tools from before the 15.04 release (and there was a lot<br>
of snappy activity prior to release)."<br><br></div>I ran the new packaging tool and it generated an apparmor file like this:<br>{<br>  "template": "default",<br>  "policy_groups": [<br>    "networking"<br>  ],<br>  "policy_vendor": "ubuntu-core",<br>  "policy_version": 15.04<br>}<br><br></div>It would be tempting to insert my read_path and write_path statements like previously except that the packaging tool always overwrites this file whenever I generate the package. It may be the limitation of my mental capabilities but a file like this:<br><a href="https://github.com/ubuntu-core/snappy-testdata/blob/master/hello-dbus/package-dir-fwk/meta/svc.apparmor" target="_blank">https://github.com/ubuntu-core/snappy-testdata/blob/master/hello-dbus/package-dir-fwk/meta/svc.apparmor</a><br></div>or this:<br><a href="https://github.com/ubuntu-core/snappy-testdata/blob/master/hello-dbus/package-dir-fwk/meta/svc.seccomp">https://github.com/ubuntu-core/snappy-testdata/blob/master/hello-dbus/package-dir-fwk/meta/svc.seccomp</a><br></div>exceeds what I am capable of.<br><br></div>Is there any way to modify somehow the apparmor file that is generated into my meta directory and make sure that the packaging tool does not overwrite my changes?<br><br></div>Regards,<br></div>Gabor<br><div><div><div><div><br><div><br></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 30, 2015 at 2:17 PM, Jamie Strandboge <span dir="ltr"><<a href="mailto:jamie@canonical.com" target="_blank">jamie@canonical.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 10/30/2015 03:13 AM, Gábor Paller wrote:<br>
> "Let us know how it goes updating your snap."<br>
><br>
> Let me grab this opportunity to talk about my AppArmor file that breaks the<br>
> install. :-)<br>
><br>
> The whole purpose of that exercise is to access the /dev/ttyO1 device that I use<br>
> to talk to my GSM machinery. So if there's an easy way to provide access, I<br>
> happily drop that AppArmor file. :-)<br>
><br>
<br>
</span>On a 15.04 system, use:<br>
$ sudo snappy hw-assign cameraagent.sideload /dev/ttyO1<br>
<span class=""><br>
> Meanwhile, it looks like this:<br>
> {<br>
>     "template": "default",<br>
>     "policy_vendor": "ubuntu-snappy",<br>
>     "policy_version": 1.3,<br>
>     "policy_groups": [<br>
>         "networking"<br>
>     ],<br>
>     "read_path": [<br>
>         "/dev/ttyO1"<br>
>    ],<br>
>    "write_path": [<br>
>         "/dev/ttyO1"<br>
>    ]<br>
> }<br>
><br>
> Referenced like this from package.yaml:<br>
><br>
> binaries:<br>
>  - name: bin/cameraagent.sh<br>
>    security-policy:<br>
>       apparmor: meta/cameraagent.apparmor<br>
><br>
<br>
</span>This is an old yaml format and the policy vendor and version you are using<br>
indicate this is from tools from before the 15.04 release (and there was a lot<br>
of snappy activity prior to release).<br>
<br>
In the future, you can use the review tools to catch these issues (assuming they<br>
are up to date. These are the same tools that the store will use). Eg:<br>
$ click-review /path/to/you/snap<br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
--<br>
Jamie Strandboge                 <a href="http://www.ubuntu.com/" rel="noreferrer" target="_blank">http://www.ubuntu.com/</a><br>
<br>
</font></span><br>--<br>
snappy-devel mailing list<br>
<a href="mailto:snappy-devel@lists.ubuntu.com">snappy-devel@lists.ubuntu.com</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snappy-devel" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailman/listinfo/snappy-devel</a><br>
<br></blockquote></div><br></div>