Thanks to automatic updates, the tools that make up the snap ecosystem are constantly upgrading and evolving in the background, and this can make it difficult to track changes and new features as they appear.
Below, we outline some of the more significant recent changes to these snap-related tools and their associated documentation:
- Snap daemon: snapd, the core of the snap ecosystem, responsible for the day-to-day running, installation, management and removal or your snaps
- Snapcraft: the command line tool that easily builds snaps from a huge range of sources
- Documentation: where you’ll find everything from quickstart guides to in-depth technical specifications
The current stable version of snapd (the snap daemon) is 2.52, released 13th October 2021.
This release, and the 2.51 release before it, add many new interfaces. These include desktop-launch to launch snaps from other snaps, raw-input for accessing raw devices directly and the netlink-driver to help transfer data between kernel and user space.
Ubuntu Core remains a focus for snapd development, with new options for setting the swap size, kernel command line customisation (with UC20 and Grub gadgets), API support for recovery systems and extra snapctl commands to power-off a device after installation and for probing the system mode. These feature follow earlier developments to customise UC20 kernel command line arguments and to create a solution to avoid the need for synchronous kernel and DTB update on a Raspberry Pi, using the little-known (but powerful!) assumes keyword. See Changes in pi/pi-kernel DTB handling for further details.
To stop downloads blocking updates, snapd 2.49 now monitors download speeds and can cleanly abandon slow downloads, and the snap try command now works within LXD containers.
Additional recent new features include better XDG desktop portal support, improvements to the CUPS interfaces, and our initial support for disk space awareness. For devices, there’s a new
snap reboot command to help a system boot into a recovery mode, and there’s now an option to disable
console-conf when initialising an Ubuntu Core device.
There’s also a variety of new interfaces, including system-packages-doc to help read system documentation, the uinput interface to access user devices from
/dev/uinput, and the system-source-code interface to allow snaps access to the host’s kernel config, source code and headers.
Another new feature, an experimental gdbserver option, can help when a snap is crashing or not behaving as expected.
$ snap run --experimental-gdbserver test-snapd-tools-core18.echo "hello gdb"
The above compliments the
snap run --gdb option that can already be used to debug executables running within a snap environment. For more information, see gdbserver option.
A lot of recent work in snapd has been to integrate and support
core20, a new base for snap deployment and development. It’s built on the most recent Ubuntu 20.04 LTS (Focal Fossa) release, and brings with it many of the same advantages.
This work has also been integral to the creation of Ubuntu Core 20, the next generation of Ubuntu-built-from-snaps. Ubuntu Core 20 features full disk encryption via TPM, a recovery mode and recovery chooser, along with enhanced Raspberry Pi support. See Ubuntu Core 20 for more details.
For more details on what’s planned for each snapd release, see the snapd roadmap.
The current stable version of Snapcraft is 5.0 (released 29th July 2021).
The 5.0 release was milestone that marked the end of a significant development cycle while adding several new and important features, including a new snapcraft metrics command, Metadata links added to snapcraft.yaml and the complete removal of legacy code.
In combination with recent changes to snapd, Validation sets can now be used to manage updates by listing specific snaps that are either required to be installed together or are permitted to be installed together on a device or system.
On the 30th April 2021, Ubuntu 16.04 LTS (Xenial Xerus) reached the end of its five years of standard support and entered the Extended Security Maintenance (ESM) phase. This has an impact on using certain bases with Snapcraft, which now has an optional
--qa-token argument to add extended support for snaps built with older releases. Until April 2024, users with an Ubuntu Advantage (UA) subscription will continue to benefit from security updates for Ubuntu 16.04 LTS, and this includes snap publishers and Ubuntu Advantage subscriptions are available for free to individual developers and community members.
See Snapcraft and Extended Security Maintenance for further details.
Snapcraft 4 promoted the
--use-lxd option to stable, allowing you to build snaps within an LXD container for faster and less-resource heavy builds. Setting this argument can now be avoided across all builds by setting a
SNAPCRAFT_BUILD_ENVIRONMENT=lxd environment variable.
See Snapcraft release notes for a more detailed look at recent Snapcraft releases.
Significant new documentation has tracked both snapd and Snapcraft releases, with documentation for all the new interfaces, a new interface template with examples, and new docs on Snapcraft metrics, Snap install modes and Super-privileged interfaces.
Before this, there were new pages on Validation sets and Customising UC20 kernel command line arguments. We also have new installation instructions for one of the latest and most rapidly evolving Linux distributions, Installing snap on Rocky Linux.
Now that Ubuntu 16.04 LTS has reached the end of its standard support period, we’ve documented the process of Snapcraft and Extended Security Maintenance to keep old snaps built with patched packages, plus there’s a new page on Migrating between pages to help updating those old snaps to newer bases.
Ubuntu Core documentation has been migrated to https://ubuntu.com/core/docs and its source files can be freely edited, updated and commented on from https://discourse.ubuntu.com. There’s also a new section on Ubuntu Core 20.
Other recent updates include pages on Debuging snaps with snap try, Progressive releases, which enable you to deploy your snap in phases, and Package repositories to add extra package sources to your snap build.
We’ve also made some tentative first steps to produce a troubleshooting page to help users identify the most common issues and hopefully their solutions. And with the recent additions of Flutter and ROS (1 and 2) extensions, the list of Snapcraft extensions has grown enough to warrant a separate page, which we’ve called Supported extensions.
For snap developers, we’ve added a guide to help build Flutter applications, a page to describe the differences between Public, Private and Unlisted snaps, the technical details behind our Security policy and sandboxing, and some guidance for Debugging snaps. The latter has been expanded to include details on using the excellent (and snap embedded) gdb and gdbserver.
We’ve also added an example implementation and, some real-world example scripts, to the Add snap configuration documentation. This hopefully makes adding configurable options to your own snaps easier.
Most of this documentation can be collaboratively discussed and changed on the respective topic in the doc category of the Snapcraft forum. See the documentation guidelines if you’d like to contribute.
Last updated 5 days ago.