"ERROR: Invalid policy version" when generating apparmor profiles

Jamie Strandboge jamie at canonical.com
Mon Jun 8 14:12:03 UTC 2015


On 06/08/2015 08:41 AM, Bjorn Tillenius wrote:
> On Mon, Jun 08, 2015 at 08:36:31AM -0500, Jamie Strandboge wrote:
>> On 06/07/2015 03:13 PM, Bjorn Tillenius wrote:
>>> Hi,
>>>
>>> I'm trying to build a snap for Ubuntu Core on a Raspberry Pi2. I'm using
>>> the image lool generated here:
>>>
>>>     http://people.canonical.com/~lool/pi2-device-and-oem/
>>>
>>> I've built a simple snap using this package.yaml:
>>>
>>>     name: piglow-examples
>>>     vendor: Björn Tillenius <bjorn at tillenius.me>
>>>     architecture: armhf
>>>     version: 0.2
>>>     binaries:
>>>         - name: bin/linux_arm/disco
>>>           caps: []
>>>
>>> After installing it, I get this error:
>>>
>>>     aa-exec: ERROR: profile 'piglow-examples_disco_0.2' does not exist
>>>
>>> If I run 'sudo aa-clickhook -f', I get this error:
>>>
>>>     ERROR: Invalid policy version for 'piglow-examples_disco_0.2.json'. Skipping
>>>
>>> I also tried installing pastebinit.mvo from the store, and that fails
>>> with the same problem.
>>>
>>> Can someone please explain what's going on here? 
>>
>> What is the output of 'system-image-cli -i'?
> 
>     RaspberryPi2)ubuntu at localhost:~$ system-image-cli -i
>     current build number: 4
>     device name: generic_armhf
>     channel: ubuntu-core/devel
>     last update: 2015-04-10 20:58:12
>     version version: 4
>     version ubuntu: 20150410.3
>     version raw-device: 20150410.3
> 
> 
>> What is the output of 'cat
>> /apps/piglow-examples*/current/meta/disco.apparmor'?
> 
>     (RaspberryPi2)ubuntu at localhost:~$ cat /apps/piglow-examples/current/meta/disco.apparmor 
>     {
>       "template": "default",
>       "policy_groups": [],
>       "policy_vendor": "ubuntu-core",
>       "policy_version": 15.04
>     }

I think the image you are using may be out of date. Does
/usr/share/apparmor/easyprof/templates/ubuntu-core/ contain the 15.04 directory
or just 1.3? If 15.04 is not present, the rootfs is out of date.


-- 
Jamie Strandboge                 http://www.ubuntu.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/snappy-app-devel/attachments/20150608/5c03edca/attachment.pgp>


More information about the snappy-app-devel mailing list