"ERROR: Invalid policy version" when generating apparmor profiles

Bjorn Tillenius bjorn at tillenius.me
Mon Jun 8 15:25:48 UTC 2015


On Mon, Jun 08, 2015 at 09:12:03AM -0500, Jamie Strandboge wrote:
> 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.

15.04 is not present. So I guess the next question is, how do I build a
new image? I tried with some variants of the instructions on
http://people.canonical.com/~lool/pi2-device-and-oem/, but finally it
fails:

    snappy-dev:~/pi2> sudo ubuntu-device-flash core --oem pi2.lool \
        --enable-ssh --device-part=device-pi2-0.11.tar.xz --channel=edge \
        -o pi2-2015-06-08.img 15.04
    Determining oem configuration
    Starting download of pi2.lool
    2.09 MB / 2.09 MB [======================================] 100.00 % 198.46 KB/s 
    Done
    2015-06-08 15:22:18 ERROR snappy logger.go:199 pi2.lool failed to
    install: package name with namespace not supported
    pi2.lool failed to install: package name with namespace not supported




-- 
Björn Tillenius | https://launchpad.net/~bjornt



More information about the snappy-app-devel mailing list