github canonical/snapcraft 8.0.0

latest releases: 8.4.4, 7.5.8, 8.4.3...
11 months ago

What's changed

core18 base removal

This is the largest change and the main reason for the major version bump. Builds requiring core18 should stick to Snapcraft 7.x. You should be able to parallel install Snapcraft by following https://snapcraft.io/docs/parallel-installs to have both instances of Snapcraft working.

Remote building for this base will still work, but issue a warning.

Command Line

The command line has been improved so that messages are streamed in the default brief mode, with additional tuning of the wording, replacing the message Executing , to Pulling, Building, Staging and Priming, making the message much more compact and to the point.

Store

Store operations no longer require a working keyring, Snapcraft will correctly fallback to a file based keyring in these scenarios when working on headless systems or when the system's keyring is not fully configured. The documentation on https://snapcraft.io/docs/snapcraft-authentication has been updated to reflect this, with additional edits to streamline for the new features and hiding away the legacy ones.

New environment for architecture

New environment is available to refer to the build-on and build-for architectures, for core22:

  • CRAFT_ARCH_TRIPLET_BUILD_FOR, supersedes CRAFT_ARCH_TRIPLET
  • CRAFT_ARCH_TRIPLET_BUILD_ON
  • CRAFT_ARCH_BUILD_FOR, supersedes CRAFT_TARGET_ARCH
  • CRAFT_ARCH_BUILD_ON

For core20,

  • SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR, supersedes SNAPCRAFT_ARCH_TRIPLET
  • SNAPCRAFT_ARCH_TRIPLET_BUILD_ON
  • SNAPCRAFT_ARCH_BUILD_FOR, supersedes SNAPCRAFT_TARGET_ARCH
  • SNAPCRAFT_ARCH_BUILD_ON

More on this can be read at https://canonical-snapcraft.readthedocs-hosted.com/en/latest/reference/architectures.html#project-variables

Remote Build

Remote build has an improved behavior. In the past any local source would have been tarballed, generating a new snapcraft.yaml before pushing to launchpad to ensure that all sources could be read. This presented many problems, one of which was that the remote build process was not building as it would have when running locally.

All this has been fixed with the new git first workflow in remote-build, there's now an environment variable, SNAPCRAFT_REMOTE_BUILD_STRATEGY that can be set to:

  • disable-fallback to force the new feature
  • force-fallback to force the legacy feature of tarballing the sources

This is the basic workflow:

image

Linter

The linter is now capable of showing what package could be provided through stage-packages to satisfy a potential missing library.

Chiseling

Chiseled packages can now be referenced through stage-packages, the chiseled slices can be referred to by their name. The current behavior is that when you would opt-in for chiseled packages, you can not mix that with regular debian packages.

This is a great option for creating bases or when using bare as a base.

More about Chisel can be found at https://github.com/canonical/chisel

Plugins and Extensions

Rust plugin

The rust plugin has been significantly improved for core20 and core22 bases. The requirement to speficy the rust toolchain is no longer there and the plugin will fetch the toolchain using rustup as previous versions of this plugin once did.

More information about the new options for rust can be found at https://canonical-craft-parts.readthedocs-hosted.com/en/latest/reference/plugins/rust_plugin.html

Kernel plugin

The kernel plugin can now properly generate Ubuntu kernel configs.

Python plugin

The plugin finally supports PEP 518, essentially meaning that projects can be driven through a pyproject.toml.

ROS content sharing

Support for content sharing for ROS powered by the extensions that make building a ROS content sharing snap seamless.

To that effect several snaps meant to distribute ROS through content-sharing were created and are available on the store (hidden, e.g. ros-foxy-ros-base & ros-foxy-ros-base-dev)

The support is introduced for

  • the core20 & core22 bases (ROS Noetic, Foxy, Humble)
  • the colcon, catkin, and catkin-tools plugins

To note, this requires the dev snap providing the build-time material to execute a script listing all ROS packages it contains when it's built.

The general architecture is neatly described at https://ubuntu.com/robotics/docs/ros-architectures-with-snaps
And more on each extension behavior can be found at:

Changelog

New Contributors

Full Changelog: 7.5.4...8.0.0

Don't miss a new snapcraft release

NewReleases is sending notifications on new releases.