4.2
Pre-releaseThe team behind Snapcraft is pleased to announce the release of Snapcraft 4.2.
Special thanks to the contributors that made this release happen: @GamePad64, @Saviq, @cjp256, @igorljubuncic and @sergiusens
New Features
ROS 2 Extension and colcon v2 plugin with base core20
This allows you to target ROS 2 Foxy Fitzroy which is the latest ROS 2 LTS
that runs on Ubuntu 20.04 (Focal Fossa).
This feature allows building ROS2 applications with a snapcraft.yaml
as simple as:
name: ros2-talker-listener
version: '0.1'
summary: ROS2 Talker/Listener Example
description: |
This example launches a ROS2 talker and listener.
grade: devel
confinement: strict
base: core20
parts:
ros-demos:
plugin: colcon
source: https://github.com/ros2/demos.git
source-branch: foxy
source-subdir: demo_nodes_cpp
build-packages: [make, gcc, g++]
stage-packages: [ros-foxy-ros2launch]
apps:
ros2-talker-listener:
command: opt/ros/foxy/bin/ros2 launch demo_nodes_cpp talker_listener.launch.py
plugs: [network, network-bind]
extensions: [ros2-foxy]
A nice walkthrough on how to work with the plugin and extension can be found on https://snapcraft.io/blog/how-to-build-a-snap-using-ros-2-foxy
Ninja generator support when using cmake with base core20
The default generator is set to create Makefiles when using the cmake
plugin on core20
. A new plugin property has now been introduced to allow for setting that to ninjas. To do so as an example a part can be configured to look like
hello:
source: .
plugin: cmake
cmake-parameters:
- -DCMAKE_INSTALL_PREFIX=/usr
cmake-generator: Ninja
Listing Snap Channel Tracks from Snapcraft
A long missing feature in Snapcraft since the introduction of Channel Tracks and the possibility
to have a default one was to view the available Tracks created for a given snap.
There is now a new command available to retrieve such information, snapcraft list-tracks
that
has an alias for convenience and can be called with snapcraft tracks
.
The list will show the list of tracks together with their state:
- default (implicit active)
- active
- hidden
- closed
And their creation date together with their assigned Version Pattern (version string required in a given
Snap Revision to be able to release to a given Track).
Bug Fixes
- meta: detailed warnings for resolution of commands @cjp256 (#3219)
- file utils: introduce get_host_tool_path() to find commands on host @cjp256 (#3244)
- plugins v2: use repo.Repo not repo.Ubuntu in colcon @cjp256 (#3257)
- remote-build: use requests.get() instead of urlopen() @cjp256 (#3255)
- spread tests: fix classic patchelf linker regex to match all arches @cjp256 (#3247)
- tests: restrict colcon / ros2-foxy test to amd64 & arm64 @cjp256 (#3254)
- extensions: prepend the snapd glvnd path @Saviq (#3253)
- build providers: honour http proxy settings for snapd @cjp256 (#3251)
- snapcraft: use system certificates by default for https requests @cjp256 (#3252)