Build snappy apps - General-Beck/ethereum-snappy GitHub Wiki

Build snappy

Dependencies:

sudo add-apt-repository ppa:snappy-dev/snapcraft-daily
sudo add-apt-repository ppa:snappy-dev/tools
sudo apt-get update  
sudo apt-get upgrade  
sudo apt-get install snappy-tools bzr snapcraft ibgmp3-dev golang snapcraft aufs-tools ubuntu-core-security-utils

To build snappy apps use snappy build in apps directory.

Advanched about security

https://developer.ubuntu.com/en/snappy/guides/security-policy/ https://wiki.ubuntu.com/SecurityTeam/Specifications/SnappyConfinement

Helpful degugging commands

  • sudo sysctl -w kernel.printk_ratelimit=0 will disable kernel rate limitingof denials
  • snappy-debug.security scanlog: follow /var/log/syslog` and show AppArmor and seccompg denial
  • snappy-debug.security disable-rate-limiting: disable kernel rate limiting
  • snappy-debug.security reload [<name>.<origin>]: reloads apparmor security policy into the kernel
  • snappy-debug.security regenerate [<name>.<origin>]: regenerate apparmor security policy from snappy packaging
  • sudo aa-profile-hook -f will regenerate all the apparmor-profile profiles in /var/lib/apparmor/profiles
  • sudo snappy service stop <snap name> and sudo snappy service start <snap name> to stop and start services

This is often helpful when developing your app or policy for it:

  • In one terminal launch snappy-debug.security scanlog: sudo snappy-debug.security scanlog
  • In another: sudo snappy service logs <snap name>
  • Then launch the app with snappy service start like above, or launch manually under confinement with: aa-exec -p <profile name> -- /apps/<pkgname>/<version>/...
⚠️ **GitHub.com Fallback** ⚠️