Snapcraft 7, the one that supports core22, is now out for testing on latest/candidate and 7.x/candidate.
The goal is to have this relases on 7.x/stable by 2022-06-02T03:00:00Z and on latest/stable on 2022-06-09T03:00:00Z. The reason for this is that the store authorization flow has changed and would need some changes (explained in the release notes further down).
Before moving to core22, please ensure you have read the release notes to verify nothing will affect you by moving over.
Support for core22 as a base
Support for the
core22 base introduces a new lifecycle with the introduction of craft-parts.
These changes are applicable when switching to
snapcraftctl(this also requires replacing
snapcraftctl set-version <value>with
craftctl set version=<value>).
CRAFT_*environment variables during step execution, replacing
tryfrom advanced grammar, this enables a more predictable planning phase without requiring an execution environment to attest what is tried. With this change, grammar has been generalized enough to allow for adding grammar seamlessly to all snapcraft supported keywords.
- Error when duplicate keys are used in snapcraft.yaml.
- Root level
build-packagesno longer supported
- Snapcraft now makes use of the global environment keyword instead of command-chain (which allows for easy overriding)
Follow the migration guide for hints on (micro) Howto migrate from core20 to core22 for more information.
With the move to craft-providers, Snapcraft now defaults to LXD as the build environment.
Command Line Interface
Packing or Snapping
The snapping process, to align with other crafting tools, is now called pack. So instead of
$ snapcraft snap
$ snapcraft pack
The option of running with no arguments is still supported and defaults to packing:
Store operations with externally generated credentials
Snapcraft has migrated to usinng craft-store. The authentication mechanism has changed, impacting those integrating with CI/CD. The
snapcraft login --with command structure is no longer supported or required. The value of export login 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, instead of snapcraft login --enable-experimental-login, instead set
Listing snap names
While still supported, instead of running
$ snapcraft list
$ snapcraft names
Don’t migrate yet if you depend on any of these
- Support for the
- Automatic classic snap building support (ORIGIN paths and linker loader setup)
- Plugins: ROS, 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