Config requirements

What configs required for snap and snapcraft, I am searching for a list of all the configs that required.

My device nanopi-dou2 have the following configs.
I have also add:
CONFIG_SECURITY_APPARMOR=y CONFIG_SECURITY_APPARMOR_HASH=y CONFIG_SECURITY_APPARMOR_HASH_DEFAULT=y CONFIG_SQUASHFS=y

When using nmcli from inside the snap on the nanopi-dou2 it return empty results and I am searching what can solve this, the same snap work on my laptop.

take a look at:

if your kernel is older you perhaps also want one of the “outoftree” branches from:

https://gitlab.com/apparmor/apparmor-kernel

1 Like

When adding CONFIG_SECURITY=y I cannot run installed snaps anymore.
Getting this error:

cannot open base directory /tmp/snap.hello-world: Permission denied

  1. Is there a way to fix this?
  2. Is lack of this config can be related to nmcli command not working inside the snap ?

did you add the right apparmor patches ?

Thanks Ogra

It seems that although I add apparmor in the .config CONFIG_SECURITY_APPARMOR=y CONFIG_SECURITY_APPARMOR_HASH=y CONFIG_SECURITY_APPARMOR_HASH_DEFAULT=y
my device didn’t had it installed at all, adding CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1 fixed the that.

I still have the same error.

Found out that when installing snapd I had this error message:

update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults diff: /var/lib/apparmor/profiles/.apparmor.md5sums: No such file or directory Setting up squashfs-tools (1:4.3-3ubuntu2.16.04.3) ... Setting up snapd (2.40) ... md5sum: /etc/apparmor.d/usr.lib.snapd.snap-confine: No such file or directory snapd.failure.service is a disabled or a static unit, not starting it. snapd.snap-repair.service is a disabled or a static unit, not starting it.

I don’t have the file usr.lib.snapd.snap-confine but I do have the file usr.lib.snapd.snap-confine.real

Will try to learn how to add the apparmor patches when I have time and will post update.