Fwd: Member not found

Gábor Paller gaborpaller at gmail.com
Fri Oct 30 08:13:47 UTC 2015


"Let us know how it goes updating your snap."

Let me grab this opportunity to talk about my AppArmor file that breaks the
install. :-)

The whole purpose of that exercise is to access the /dev/ttyO1 device that
I use to talk to my GSM machinery. So if there's an easy way to provide
access, I happily drop that AppArmor file. :-)

Meanwhile, it looks like this:
{
    "template": "default",
    "policy_vendor": "ubuntu-snappy",
    "policy_version": 1.3,
    "policy_groups": [
        "networking"
    ],
    "read_path": [
        "/dev/ttyO1"
   ],
   "write_path": [
        "/dev/ttyO1"
   ]
}

Referenced like this from package.yaml:

binaries:
 - name: bin/cameraagent.sh
   security-policy:
      apparmor: meta/cameraagent.apparmor

And produces this hideous error message when I try to install:
/tmp/cameraagent_20150802_all.snap failed to install: hook command
/usr/bin/aa-profile-hook failed with exit status 1 (output: "Traceback
(most recent call last):\n  File \"/usr/bin/aa-profile-hook\", line 147, in
<module>\n    sys.exit(main())\n  File \"/usr/bin/aa-profile-hook\", line
114, in main\n    '--cache-loc=%s' % apparmor_cache])\n  File
\"/usr/lib/python3/dist-packages/apparmor/click.py\", line 121, in
load_profiles\n    (rc, output))\napparmor.common.AppArmorException:
\"policy load failed with errno 1: b'AppArmor parser error for
/var/lib/apparmor/profiles/profile_cameraagent.sideload_cameraagent.sh_IEOSKaWaHEPQ
in
/var/lib/apparmor/profiles/profile_cameraagent.sideload_cameraagent.sh_IEOSKaWaHEPQ
at line 1: syntax error, unexpected TOK_OPEN, expecting TOK_ID\\\\n'\"\n")

Any ideas what went wrong? I know it is one of the most boring excuses but
I have been using this AppArmor file for months.

Regards,
Gabor

On Fri, Oct 30, 2015 at 5:02 AM, Leo Arias <leo.arias at canonical.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
>
> Hello!
>
> On 2015-10-29 19:28, Gábor Paller wrote:
>
> > Note that I don't like this. With an embedded device, all the
> > updates should be controlled. This time I got an update that I
> > didn't request and my package is still uninstallable (this time it
> > is the AppArmor file, maybe my mistake, it worked before).
>
> The auto-update feature is on by default, but it can be disabled. Take a
> look here:
> https://github.com/ubuntu-core/snappy/blob/master/docs/autopilot.md
>
> Let us know how it goes updating your snap. Make sure to try the new
> snapcraft to generate the package, it has some cool things.
>
> pura vida.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
>
> iQIcBAEBCAAGBQJWMuvEAAoJEIUvYw0No8DgFsIQAIwYq+iojYPUKXs4FrsnikZ1
> zYfc/ZvTwVtfdsmomu7cRmGQajwmNFQCOV2XPrBKWhan2VaEsgdW7Nfxg4e7p87i
> ubXpwvdZJOqrd2GPdlfl5K3BlOioNz4m+vQIjBXJ26ZqblmfTOgeaq0GYtzUdHLi
> qF4JYDIioaKtRyzIyE6R458MdBLkmanTTCcpsuAKdfyg85O7kK3EyxHSNcR1blcD
> CE+AnRx2vAjzlocGQbPd71zFVX2wgTbiM3ZNWd5qBFX5uebtqCsiNFNKT7ZcZrdE
> 7BX6QIpdXXVyniNwQGaCxgTT0RopROGjFChXqajF42UFsaItGlTQxbkcKRaoGFkn
> 7OH9NAqf1AXFUtXMCju9mjyFng0sb93MnbFhqToe3pHRE5ZH5x84NC4Pax+BwNFu
> 58qdAH//st3zIXOSr6j1YmY8YLcCzAuMcZhwkqTduAviR5Bow6eiFysJ3Or27BpQ
> rsGzaZkUSOz2NnIYxKWZla8XPzA2n5ADer3QR/A0MeApZH+HuKEkIL+UOB8+T3tc
> aypmF/fidRU3NBBXQzyKn8m93fryXX0hKg2yGE19CAZffukVrUWmV7DSJVLAuxm3
> 8KMd025ijjU/YYG3sIebUmO45/S/6NM1ziYCHFoj+YMtf6kg8i2x3aG7FG5MFWQn
> IgtAh+hxHH9CR/yERd+G
> =qIig
> -----END PGP SIGNATURE-----
>
> --
> snappy-devel mailing list
> snappy-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/snappy-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-devel/attachments/20151030/744b5f0a/attachment.html>


More information about the snappy-devel mailing list