Snappy is a universal packaging format with sandboxing capabilities originally designed
for Ubuntu phone and Internet of Things (IoT) devices.
The packages are called snaps and the installer is called snapd or snap daemon.
One of the problems in Linux is too much verity, there are too many distributions, desktops,
and package managers.
From a developer point of view it makes Linux a less appealing system to release software
for, in comparison to Windows, MacOS, and Android which offer a far shorter list of
packaging formats.
Ubuntu have attempted to combat the fragmentation side of package management with a universal
packaging format called Snaps.
Snaps can be packaged and installed in any Linux distribution which has snapd daemon
installed.
In the future it may be possible to install Snap packages in MacOS and Windows.
All dependencies can be included within the Snap, which on the negative side does require
additional disk space, but on the positive side means you are not limited to having software
that was built at a specific time for a fixed release operating system.
I will admit there is not much of a benefit for users of rolling release distributions
like Arch, Gentoo, or openSUSE tumbleweed, but not everyone wants to be on the bleeding
edge.
For IoT devices or business critical systems it maybe completely impractical to have a
rolling release system.
Personal Package Archives (or PPA’s) can be added to Ubuntu and Debian to provide newer
applications to the older OS, however conflicts may arise with shared libraries.
When conflicts occur it is down to the user to resolve the problem.
Snaps can be updated up to four times a day by default or as specified by the user.
Automatic health checks can be implemented to verify that the update has been successful,
and it can automatically roll back to an earlier version should an update fail.
Updates are incremental, meaning that the overall download size will be smaller than
the original install.
Only the three most recent updates of a Snap are kept.
Snaps can be installed from different development stage channels.
By default there are four Stable
Candidate Beta
Edge
Stable is what most users will consume and as the name suggests, should be your most
polished, stable and tested version of the app.
Candidate is used to vet uploads that should require no further code changes before moving
to stable.
Beta is used to provide preview releases of tested changes.
Edge is for most recent changes, probably untested and with no guarantees attached.
Snaps are containerised using SquashFS – A read-only filesystem which gets mounted as
a loop device upon system bootup.
There are three levels of confinement for the Snap: Strict, Classic, and Devmode.
Strict is the default security policy applied to snaps.
The snap has read/write rights only in its own install space and selected areas.
It has access to any libraries it bundles, as well as the Core snap.
It can also access certain requested hardware interfaces.
For example a webcam viewer would request access to an attached camera.
This connection would be strictly controlled via the core Snap.
A snap in classic confinement behaves as a traditionally packaged application, with full
access to the system.
Snaps using this fully open security policy are manually reviewed in the Snap Store.
Devmode or Developer Mode has the same policies as Strict, however security denials are turned
into warnings.
Snaps using Devmode can not be released into Stable and Candidate store channels.
There are three main commands for using Snappy.
Snap find Snap install
Snap remove
Once installed an application can be accessed as though it was traditionally packaged either
via the terminal or desktop application searcher.
The easiest way of finding snaps is with the unofficial website uAppExplorer.
The main benefits of Snaps for users are: Easily add newer software without worrying
about conflicts.
Sandboxing capabilities and restricting apps ability to see your entire system
The main benefits of Snaps for developers are:
Easier to package applications for Linux Supply updates to users quicker
Thanks for watching I’ll see you later