What's new

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: also known as snapd, this is core of the snap ecosystem, responsible for the day-to-day running, installation, management and removal of 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.

:information_source: For more general information about Snap, take a look at Getting started, and if you want to build your own snaps, see the Snapcraft overview.


Snap daemon

The current stable version of snapd (the snap daemon) is 2.63, released on the 6th June 2024.

Snap-based Ubuntu Core devices will benefit from many of our recent new features, including support for Offline remodelling, the use of Validation sets in the model assertion and setting a custom port for SSH. There’s also a new snap sign --chain argument to aggregate all the assertions required to create a new system user.

For snap, snapshots can now be dynamically excluded, and there’s been more work to improve Refresh awareness. Updates for running snaps are now downloaded in the background and only applied when their respective running applications are closed. This works in harmony with held updates, which were introduced in our previous release (snapd 2.58).

Snap refreshes for all and specific snaps can now be delayed (or held, in our terminology) for any period of time, including indefinitely:

$ snap refresh --hold=24h
Auto-refresh of all snaps held until 2024-05-26T14:25:58+01:00

Another great addition in snapd 2.59 is the ability to have your home directories anywhere you want. With a single new setting, snaps can now store there user data wherever you store your home. See Home directories for further details.

For more details on holding updates, see Postpone updates with refresh hold.

The previous release included quota group support for journal log limits and the ability for snaps to be signed with an alternative delegated authority with their own constraints.

Older updates

Previous releases in 2022 contain a lot of background engineering to support Ubuntu Core 22. However, there are a couple of user-facing features, including new support for :star: starred developers :star: and the ability to factory reset a device running Ubuntu Core.

Alongside support for side-loading multiple snaps via the API, and RISC-V support for snap’s security layer, the previous snapd release added a new shared-memory interface. This interface will help snap developers share messages and data between their snaps via the /dev/shm shared memory device. The kernel-module-load interface is also new and is going to be most useful on embedded devices that need to control their hardware.

Other recent releases have also added significantly to snap’s interface list, including scsi-generic for accessing SCSI Generic (sg) devices, the polkit interface to help with authorisation, 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, UC22 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 UC2x 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.

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.

For more details on snapd releases, take a look at our Release notes or the snapd roadmap on the forum.

Snapcraft

The current stable version of Snapcraft is 8.2, released on the 17th April 2024.

Recent updates have added plugin support for the new core24 base plus new remote-build functionality.

We also have automatic linting with recent bases, easy switching between LXD and Multipass build providers and a new store authentication mechanism. New plugins for Flutter plugin with core22 support, kde-neon extension with new content snaps and added core22 support to the SCons, Ant and Maven plugins

Snapcraft now includes its own linter functionality when working with snaps using the core22 base. Snapcraft linters run automatically when a snap is packed, and will report any detected errors unless otherwise disabled.

See Snapcraft release notes for a more detailed look at recent Snapcraft releases.

Documentation

For Snapcraft beginners, we’ve just published a Create a new snap tutorial, taking you through each step of the process.

There’s also new documentation on the Repair assertion, updated content and custom-device interfaces and a cleaned up How-to navigation menu.

We also finished a new Snapcraft quickstart guide to help new snap developers familiarise themselves with the process. But there’s also been new documentation on Quota groups, migrating from core20 to core22 and Snapcraft linters.

Last but not least, we’ve published new documentation on Snap performance

Older updates

The release of Ubuntu Core 22 (UC22) was accompanied by a glut of new documentation, including guides for the Raspberry Pi and Intel NUC. We also documented the remodelling process and provided a guide on using remodelling to upgrade a UC20 device to UC22. Another big part of this release, and the wider snap ecosystem, is the introduction of Quota groups. These allow you to set resource limits, such as memory or CPU usage, for a set of snaps.

New documentation has also 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 bases to help updating those old snaps to newer bases.

Other recent updates include pages on Debugging 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.

Our documentation is a community effort, published on snapcraft.io/docs via the Discourse forum hosted at forum.snapcraft.io. See Contribute to our documentation for more details.

We warmly welcome community contributions, suggestions, fixes and constructive feedback.

5 Likes

Good update, thanks. Nice to see the new plugins gaining momentum.

The thing I’m most interested to know is, when are we going to see gnome extensions for core20? Is there another gnome-3-XX due any time soon?

Cheers.

1 Like

The first 3 links are missing href. Maybe set them to bold etc if they were done so just for highlighting purposes.

Thanks for letting us know! I’ve fixed those links so they should finally work. Also, thanks for all your comments on the Create your own Ubuntu Core 20 image tutorial - I’m going to add your suggestions to the text now.

You are welcome, thanks for the great tutorials!

Not sure if this is the right way to leave comments:

  • “removal [or] your snaps”
  • “The 5.0 release was [a] milestone”
  • “Migrating between pages” link title really should say “Migrating between bases”, no?
  • “Debuging”

This is definitely the right place for this. You’re also welcome to make your own edits, if you want to. And thanks for pointing out these errors - I’ve fixed them.

There is no URL associated with the anchor “Snap install modes”.

Thanks - it was missing a forward slash. The link should work now.

Regarding the reference to TPM, is this TPM or TPM2? And is it worth making the distinction clear?

1 Like

Are “snap run” options --gdb and --experimental-gdbserver still experimental? As they’re still categorized options.

Could you elaborate a bit more about “extra snapctl commands to power-off a device after installation”, especially what’s new compared to the snapctl reboot --poweroff/--halt command introduced longtime ago?

@degville, minor typo – do you mean Oct 2023 for the beta?

Snap daemon

The current beta version of snapd (the snap daemon) is 2.61, released on the 19th October 2024.

You’re absolutely right (now fixed), thank you!