Release notes: Snapcraft 7
The team behind Snapcraft is pleased to announce the release of Snapcraft 7.0, a major update to the tool used to build snap packages.
This release marks the end of an initial process to rebuild our tools to work across a variety of projects, and many of the changes reflect that development work. This includes a new lifecycle and the introduction of Craft Parts as a generic cross-project mechanism for obtaining data from different sources.
Among the many any other updates, fixes and additions, the following are what we consider its highlights:
- Support for the new
- LXD promoted to be the new default build environment
- A new store authentication mechanism
These changes are now applicable when switching to
- A new
This change also requires that:
craftctl set version=<value>replaces
snapcraftctl set-version <value>
CRAFT_*environment variables are defined during step execution, replacing
tryhas been removed from advanced grammar.
This enables a more predictable planning phase without requiring an execution environment to attest what is tried. Grammar has now been generalised enough to allow for it to be added seamlessly to all snapcraft supported keywords.
- An error is now generated when duplicate keys are used in snapcraft.yaml.
- Snapcraft now makes use of the global environment keyword instead of command-chain (which allows for easy overriding)
The following are not currently supported with
- Automatic classic snap building support (ORIGIN paths and linker loader setup)
- Plugins: crystal, qmake
- Some source handlers: 7zip, mercurial, bazaar, deb, rpm
- Support for user-defined plugins.
Missing features will be ported and added to upcoming 7.x releases. If your snap relies on any of these features, please wait for the next releases to port them to use
See How to migrate from core20 to core22 10 for help on migrating your snaps to the new base.
Command Line Interface
Packing or Snapping
To align with the other craft tools, the snapping process now uses the pack command rather than the now deprecated snap command:
snapcraft with no arguments is still supported and defaults to packing.
Store operations with externally generated credentials
Snapcraft has migrated to using a new Craft Store tool to access the snap store. As a result, The authentication mechanism has changed, impacting any project already using CI/CD.
snapcraft login --with command structure is no longer supported or required. The value of export login now needs to be exported into the appropriate environment variable (i.e.;
Additionally, a working keyring is required to be able to store credentials locally.
To change the authentication mechanism, replace
snapcraft login --enable-experimental-login, with
Listing snap names
snapcraft list command to show which snap names are associated with your account has been deprecated and replaced with
Last updated 1 year, 4 months ago.