Releases: canonical/snapcraft
Snapcraft 3.10
The Snapcraft team is delighted to announce the availability of version 3.10.
Core
Configurable system usernames
Snapcraft now supports the configuration of system usernames for daemons. This functionality was recently added to snapd, and enables a daemon to run as the user specified within an application's command entry, for example, among other functions.
Primed stage packages
Snapcraft now tracks the files within a snap that are derived from those listed under staged-packages.
A build manifest already includes the set of all staged packages in staged-packages, but the build manifest also includes files that were installed, then removed or filtered out, from the resulting snap.
The resulting list of staged and tracked packages is maintained within primed-stage-packages. Security notices will eventually use primed-stage-packages to reduce the number of false positive alerts that are caused by staged-packages listing packages that are not eventually present in the snap.
CLI
CLI configuration file
Snapcraft now reads a configuration file to populate the default snapcraft command-line options.
- Location:
$HOME/.config/snapcraft/config.yaml - Syntax:
YAML - Valid configuration options: Anything that matches a snapcraft CLI command option (e.g.
bind-ssh,debug,http-proxy,https-proxy) for arguments. The configuration file uses YAML syntax and supports any option that matches a valid snapcraft argument.
The following is an example configuration file:
use-lxd: true
bind-ssh: true
http-proxy: http://192.168.1.10:3128
https-proxy: http://192.168.1.10:3128 ```The above configuration file matches the following command line options:
snapcraft --use-lxd \
--bind-ssh \
--http-proxy http://10.155.149.232:3128 \
--https-proxy http://10.155.149.232:3128Note: While an argument can be overridden, it cannot be unset. For instance, if using
http-proxyordebug, here is no method to currently unset these values.
Remote Build
Many improvements have been made to Remote build, including the removal of unnecessary options such as entering a Launchpad ID, which is provided via the login process.
To build snaps, remote build previously used snapcraft from the edgechannel. From this release, snaps are created using snapcraft from the stable channel.
The user interface has also been cleaned-up, with more changes on the way.
Build providers
HTTP proxies
Snapcraft now supports passing http_proxy and https_proxy through to LXD and Multipass build environments. Options have also been added to specify these using --http-proxy <proxy> and -https-proxy <proxy>.
Bind SSH
Local SSH configuration can now be passed through to LXD and Multipass environments.
The user’s SSH directory, (eg. ${HOME}/.ssh), is bind-mounted to the build-environment, enabling SSH configuration within that build environment. This option is enabled by using --bind-ssh with the LXD or Multipass providers.
Plugins
Rust
The Rust plugin now correctly works with cargo workspaces.
From this release, the default is to now use the minimal rust profile for building, which solves a problem of generally building on s390x, arm64 and ppcel64 architectures.
A few smaller issues, such as using the same path for CARGO_HOME and RUSTUP_HOME, have been fixes with this release, and Cargo.lock files are now also properly respected.
Go
The Go plugin has been cleaned-up and, as part of this release, now includes support for Go Mod
If a project makes use of the Go Modules feature, the right things will happen.
Catkin
A long lived workaround has been removed from the robotics tooling. This includes the rospack workaround now that rosdep -i works correctly.
Another improvement to the plugin includes fixing an issue when using --destructive-mode, where some installation paths from the host machine leaked into the list of paths,considered by the Catkin plugin. This resulted in dependencies being found in the host path and consequently not being installed by the plugin in the expected parts path.
Python
From this release, the Python plugin will process its requirements separately from setup.py. This helps to better satisfying local dependencies declared in install_requires`. As a result, building becomes less costly as wheels are not unnecessarily generated with every build.
The Python plugin also creates a cleaner sitecustomize that no longer leaks Snapcraft's site-packages into the part that the plugin processes.
Extensions
Projects using extensions will gain better performance with this release, thanks to the scaffolding to bring up desktop applications being improved.
These improvements include pre-checks being run before spawning shells to run some setup commands (even if they were idempotent - pre-checking avoids their cost).
Icon caching pre-checks are now also in place, and can reduce the time to bring up an application by up to 10 seconds.
Information Parsing
AppStream
Several AppStream fixes arrive with this release. These include a fix related to silently breaking XSLT transformations, when comments were present in the AppStream file, and support for the recently specced <em> and <code> tags. These are now supported by Snapcraft when using the parse-info functionality with AppStream files.
The full list of features and issues worked on are listed below
Adam Collard:
- snap: add license to snapcraft.yaml
Anatoli Babenia:
- docker: test image builds with Travis CI (#2851)
Anton Maminov:
- crystal plugin: add flags to use during shards build (#2740)
Chris Patterson:
- cli: add new YAML configuration file support
- cli: enable experimental snapcraft configuration file
- cli: introduce --provider
- spread tests: unset SNAPCRAFT_BUILD_ENVIRONMENT=host for lxd tests
- cli: explicitly set show_envvar=False for --provider
- spread tests: ensure multipass tests use multipass for clean
- xattrs: introduce internal xattrs support
- xattrs: handle case where attribute may be too long
- manifest: track and annotate
primed-stage-packages - cli: treat "managed-host" as separate provider than "host"
- cli: annotate return type for _sanity_check_build_provider_flags()
- cli: generic handling for provider-specific flag errors
- cli: introduce get_build_provider_flags
- cli: introduce http and https proxy options
- cli: introduce apply_host_provider_flags for host providers
- cli: apply provider flags for each provider
- build providers: introduce build provider flags
- build providers: set configured environment flags in
run() - build providers: add
hide_outputflag to abstract _run() definition - build providers: passthrough flags for http_proxy and https_proxy
- tests: introduce unit tests for options
- tests: mock patch sys.argv for CLI runner
- cli: exempt containers from requiring --destructive-mode
- tests: add env-passthrough spread tests for LXD and host
- base provider: introduce generalized _get_home_directory()
- multipass provider: rename _mount to __mount
- build providers: introduce _mount() and _is_mounted()
- build providers: unify per-provider mount_project()
- build providers: unify per-provider _mount_prime_directory()
- multipass provider: remove now-unused __mount() method
- build providers: implement support for bind-ssh
- cli: introduce --bind-ssh option
- meta: fix string comparison operator in Snap validate
- snapcraft: add missing imports for typing
- requirements-devel: uprev flake8 to 3.7.9
- requirements-devel: uprev coverage to 4.5.4
- codespell: various spelling fixes
- codespell: add snapcraft.spec to ignore list
- codespell: address codespell error in test_common unit test
- codespell: address codespell error in circular-dependencies test
- requirements-devel: uprev codespell to 1.16.0
- requirements-devel: uprev pycodestyle to 2.5.0
- requirements-devel: uprev pyflakes to 2.1.1
- requirements-devel: uprev pyftpdlib to 1.5.5
- requirements-devel: uprev pyramid to 1.10.4
- project loader: remove noqa on import that's no longer required
- conda plugin: simplify source url/checksum handling
- repo: fix fetch_binary()'s return type for deb repo
- cli: add missing argument to click.BadOptionUsage()
- cli: label Optional types in lifecycle
- meta: declare optional types for Snap
- meta: fix Slot from_dict() to handle case where interface is undefined
- meta: fix Plug's from_dict() if interface is undefined
- meta: fix typing error in ContentPlug's from_dict()
- meta: various fixes to better annotate type definitions and optionals
- cmake plugin: declare type for _Flag.value
- python plugin: declare return type Optional for _find_file()
- python plugin: declare Optional arguments for _process_package_args()
- extractors: ensure valid loader available in setuppy's extract()
- appstream: fix mypy typing error in _get_icon_from_theme()
- extractors: set Optional types in ExtractedMetadata
- extractors: use None as default parameter value for ExtractedMetadata
- store: remove incorrect default for
storeparameter in (_try)_login() - tests: fix incorrect regex format strings in test_store_push
- storeapi: verify snap information before using
- storeapi: only use errors with codes in StoreErrorList
- storeapi: update return definition in acl()
- storeapi: annotate Optional types in Channel
- store: validate type for snap_ids in _human_readable_acls()
- plugin handler: annotate Optionals in PluginHandler
- plugin handler: a...
Bug Squash
meta: assume command-chain fix for prepending snapcraft-runner (#2864)
prepend_command_chain was not checked when determining the need for assuming command-chain.
- Add & update a test to ensure coverage of `assumes`.
- Check for use of `prepend_command_chain`.
- Update expected snap.yaml for adapter spread test.
spread tests: limit adapter test to amd64 (#2866)
The expected_snap.yaml includes the architecture definition, which breaks when building on other architectures. Since adapter isn't relevant to arch, simply limit the tests to amd64.
snap: set PYLXD_WARNINGS to inhibit unknown LXD attribute warnings (#2870)
pylxd is designed in such a way that it will display warnings every attribute coming from the server that is unknown to the client.
pylxd 2.2.10 adds a way to inhibit these warnings.
build providers: use multipass from stable (#2869)
Multipass 1.0 has been released to the stable channel. Consume multipass from there from now on.
cli: do not report KeyboardInterrupt errors (#2865)
If the user chooses to kill snapcraft prematurely, that's OK but it shouldn't be reported to Sentry.
Fixes SNAPCRAFT-1D
spread tests: use source-depth: 1 for plainbox tests (#2863)
Bug squash
Improvements over 3.9 which include
spread tests: set en_US.UTF-8 locale to plainbox run
Plainbox tests require a unicode locale to be set.
travis: use stable channel for shellcheck snap
Fixes failure with:
shellcheck: src/ShellCheck/Analytics.hs:1825:10-27:
No instance nor default method for class operation mappend
colcon plugin: support ROS 2 Eloquent
Add support for the newest ROS 2 release, Eloquent Elusor. For more information about the release, see ros2/ros2#734.
catkin plugin: remove rospack workaround now that rosdep -i works (#2833)
Reverts a change made in #2585 now that rosdep has grown the ability to ignore source packages on its own.
plugs/slots: use default interface if none is specified (#2840)
Avoid a Traceback for when a plug has no subelement.
meta: convert Application's adapter from string to enum (#2856)
Introduce enum ApplicationAdapter to use instead of strings. Remove the unused Adapter equivalent found in project loader.
meta: do not set snapcraft-runner when adapter is "none" (#2853)
When adapter == "none", snapcraft should not modify the command or command-chain. However snapcraft presently ignores the adapter setting when it comes time to set the command-chain.
Instead, honor when adapter is "none". With these changes, given a snapcraft yaml:
<snipped>
apps:
adapter-none:
command: test-cmd
adapter: none
adapter-full:
command: test-cmd
adapter: full
adapter-legacy:
command: test-cmd
adapter: legacy
wrapped-default:
command: test-cmd --test "@"
<snipped>
Will now yield:
apps:
adapter-full:
command: test-cmd
command-chain:
- snap/command-chain/snapcraft-runner
adapter-legacy:
command: test-cmd
command-chain:
- snap/command-chain/snapcraft-runner
adapter-none:
command: test-cmd
wrapped-default:
command: command-wrapped-default.wrapper
command-chain:
- snap/command-chain/snapcraft-runner
Snapcraft 3.9
Core
Improved commands for snap.yaml
Snapcraft will now attempt to avoid using unnecessary wrappers:
command-chainis used to create an environment wheresnap --shell <snap-name.app-name>can be run without the previously required environment setup- when a previously generated
.wrapperfile is detected, Snapcraft will work out whether it too can be avoided - if feasible, the snapcraft command will be modified to avoid using a wrapper. The user is also informed of what's changed
note that wrapper creation will not be allowed for core20.
Binary dependency crawling
A snap developer may inadvertently exclude a snap's required libraries, either by filtering them out during stage and prime, through a script, or when libraries are linked against the host (amongst other reasons).
To help mitigate these missing libraries, Snapcraft creates an internal list of libraries that may be missing. Prior releases of Snapcraft would output this list as file names.
With this release, Snapcraft outputs the exact stage-packages syntax to fix the missing dependencies. This can be pasted directly into the relevant part.
Additionally, false positives from snaps that rely on the content interface for their runtime have been reduced.
Support for core20
The core20 base snap (see https://snapcraft.io/docs/base-snaps) is now a first class citizen in Snapcraft.
As core20 itself is still under development, plugin support will be added closer to its finalisation, and snaps built against its non-stable channel releases will be marked with a grade of devel.
Support for AppStream Title and Version
Titles and versions are now extracted from AppStream data.
Consequently, both are now passed into the resulting snap.yaml where they can be used by the Snap Store on first push, or after a snapcraft push-metadata call.
core18
Internally, Snapcraft has fully migrated to core18. This allows for easier continued development and improved robustness.
Extensions
KDE Neon
Creating KDE application snaps is now even easier, thanks to a new KDE Neon extension.
This new extension integrates seamlessly with the KDE Neon content snap and builds on the foundations of the work done for the Gnome extension.
Documentation for this extension is being worked on at https://snapcraft.io/docs/kde-neon-extension.
Gnome 3.28 improvements
The Gnome extension has been fixed when using only a snap name as the default provider, and launch performance has also been improved.
For documentation, see https://snapcraft.io/docs/gnome-3-28-extension.
Build providers
Remote Build
With snapcraft remote-build, Snapcraft gains the ability to run a multi-architecture build process on remote servers, using Launchpad (https://launchpad.net/), directly from the snapcraft executable.
While remote build is still considered a preview in this release, it's now fully accessible. Setup has also been simplified thanks to using HTTPS for git transport to push assets to the build server (removing the reliance on ssh).
CLI
Error Messages
The underlying implementation behind error message generation has changed, becoming more structured.
This allows for more specific messages about what may have gone wrong, why it went wrong, and how it can be fixed. Additional ancillary data, such as links to further documentation, is also presented for some of the error messages.
Guided login and register
Prior to this release, using the 'register' command with snapcraft running under an interactive shell would generate an error message if the user was not logged in.
With Snapcraft 3.9, the user is instead prompted for their credential to continue with the registration. Similarly, when trying to push a snap, if the snap-name is currently unregistered, the user will be asked if they want to register the snap-name for the snap to be pushed, and then continue with the process.
The full list of features and issues worked on are listed below
Sergio Schvezov
- tests: print journal logs when spread tests fail
- meta: new application handler
- meta: add desktop file handling to application
- meta: move desktop file cleanup to a separate method
- meta: replace logic in _SnapPackaging with Application
- tests: completely mock bzr tests
- tests: completely mock mercurial tests
- tests: completely mock 7z tests
- snap: migrate to core18
- ci: move unit tests to spread
- build providers: inject core18 instead of core
- tests: completely mock subversion tests
- docs: add a Code of Conduct (#2724)
- pluginhandler: remove the exception for elf patching go
- project: support for base bare
- tests: update rust-toolchain test so it pulls from beta
- storeapi: use the channels attribute in push
- meta: take no command-chain being prepended into account
- cli: add -s back to clean for legacy (LP: #1834628)
- cli: prompt for login if required
- extensions: new kde-neon extension
- cli: use click utilities for login prompts
- meta: warn about command mangling
- storeapi: add StoreErrorList to handle store errors
- cli: clean up StoreClientCLI
- tests: move cli store push/upload tests to FakeStoreCommands...
- cli: use click utilities for registering on push (LP: #1805211)
- meta: support the case of a plug without a default provider
- remote build: switch from core to core18
- make plugin: support for core20
- snaps: invalidate cache on refresh or install
- snaps: allow installation of non stable bases
- meta: force grade devel when using non stable bases
- build providers: inject snapd snap for latest feature availability
- repo: convey proper error message when refreshing to invalid channel
- cli: pass channels None when not doing a push --release
Chris Patterson
- tests: change default spread provider to lxd outside of travis
- meta: handle desktop files with multiple sections
- meta: preserve desktop file Exec= arguments
- snaps: if snap is installed, don't check is_valid()
- mypy.ini: set python version to 3.6
- tests: minor fixups for mypy to run successfully
- runtests: add mypy coverage of unit tests to static target
- errors: add new abstract base class for snapcraft exceptions
- cli: add support for new-style snapcraft exceptions
- tests: fix mypy error with test_errors.py
- meta: introduce snap, hook, plug, and slot types
- application: refactor to work with introduced snap meta objects
- command: refactor to work with Snap meta
- project: instantiate snap meta
- project: introduce _get_content_snaps() and _get_provider_content_dirs()
- project-loader: initialize project._snap_meta when data is updated
- runner: install content snaps when installing build snaps
- meta: remove create_snap_packaging from init to prevent import loop
- snap-packaging: refactor to use Snap
- pluginhandler: refactoring dependency resolution
- elf: consider content directories for determining dependencies
- common: rename get_core_path() to get_installed_snap_path()
- pluginhandler: add some type annotations
- fixtures: mock patch Project._get_provider_content_dirs()
- spread tests: update unicode-metadata expect_snap.yaml's ordering
- snap-packaging: do not write command-chain wrapper if there are no apps
- project options: add compatibility shims for tests
- elf: handle missing dependencies not found on system
- tests: update gnome-3-28 extension spread test to use gtk
- tests: update gnome extension spread task to account for content snaps
- tests: update kde extension spread task to account for content snaps
- remote-build: detect early build errors (#2642)
- fixtures/SnapcraftYaml: rewrite snapcraft.yaml on updates
- remote-build: fully preserve local sources
- remote-build: introduce --package-all-sources flag
- git: add init, add, commit, push, version, check_if_installed functions
- remote-build/launchpad: pivot to git source handler
- remote-build: use project name in build-id for launchpad git repo
- remote-build: error if --user is required
- requirements: add lazr.restfulclient dependency for launchpad
- windows: update snapcraft.spec for new remote-build dependencies
- remote-build: make --user required and drop config file handling
- remote-build: only prepare project if starting build
- project: add
_get_project_directory_hashmethod - remote-build: use project directory hash for id
- remote-build: introduce LaunchpadGitPushError
- tests/remote-build: minor cleanup for mock usage
- remote-build: update launchpad to support git https tokens
- tests/remote-build: cleanup usage of mock_lp
- remote-build: graduate from preview -> experimental
- errors: migrate handful of errors to SnapcraftException
- project: truncate project directory hash (#2766)
- setup.py: convert classifiers from tuple to list
- sources: add some initial support for win32
- file_utils: fix create_similar_directory on Windows platforms
- file_utils: add cross-platform rmtree (Windows support)
- remote-build: use file_utils.rmtree for Windows support
- remote-build: use posix pathing when creating paths for snapcraft yaml
- remote-build: gunzip downloaded log files
- manifest: sort package and snap lists for consistency
- remote-build: cleanup and fix architecture handling
- remote-build: explicitly default build arch to host arch
- remote-build: remove
alloption for--arch - remote-build: remove old TODO comment
- erorrs: preserve quotes when printing SnapcraftPluginCommandError
- remote-build: improve resiliency for https connection issues
- remote-build: add unit tests for errors
- remote-build: support autorecovery of builds
Claudio Matsuoka
Snapcraft 3.8
Core
Windows installer
Support for a Windows installer has been fully fleshed out and ready to be delivered, this means that Snapcraft will soon be able to run natively from Windows.
Improved build-base support
Support has been added to be able to use the build-bases keyword together with the following snap types:
- kernel
- snapd
Extensions
GNOME 3.28
An extension supporting GNOME 3.28 is part of this release, for discovery run
snapcraft list-extensions
Read about what it does by running
snapcraft extension gnome-3-28
Add it to an existing snapcraft.yaml by adding gnome-3-28 to the apps entry that requires it
and to see how it extends the snapcraft.yaml, at the root of the project, run
snapcraft expand-extensions
Plugins
colcon
New syntax is available to ignore packages:
- colcon-packages-ignore:
(list of strings)
List of colcon packages to ignore. If not specified or set to an empty
list ([]), no packages will be ignored.
And a fix to enforce parallel building hints from snapcraft is now in place.
catkin
In contrast with colcon, a fix to enforce parallel building hints from snapcraft is also now in place.
rust
Support for properly building on s390x (natively) has been added.
--
The full list of features and issues worked on are listed below
Chris Patterson
- elf: handle invalid elf files
- cli: handle exception when cleaning a part with a fresh project
- spread: fix unbound variable error
- docs: quick init for lxd in HACKING.md
- windows: drop cx_Freeze support in setup.py
- cli: use absolute import paths instead of relative imports
- requirements: update to python 3.7 for PyYaml wheel
- requirements: uprev all OS to pexpect 4.7.0
- requirements: add pyinstaller 3.5 for win32
- windows: add snapcraft.ico icon
- windows: add pyinstaller spec file to generate frozen snapcraft.exe
- dirs: find Windows data directory for currently-known scenarios
- lxd: conditionally import pylxd based on OS
- windows: add inno-installer script
- windows: add powershell script to generate self-signed certificate
- tests: fix snapcraft command for win32 virtual env
- appveyor: build Windows inno-installer
- windows: add MSIX/AppX installer
- dirs: raise SnapcraftDataDirectoryMissingError() if paths not set
- multipass: update ProverNotFound url to https://multipass.run
- indicators: windows fix for is_dumb_terminal
- multipass: add installation support for windows
- travis: use apt addon to prevent apt update issues in CLA-check
- multipass: fix setup exception when multipass is not found in PATH
- dirs: check for existence of required data directories
Sergio Schvezov
- test: autopkgtest beta
- debian: minimal deb package for autopkgtest
- extensions: new gnome extension (#2655)
- deltas: code cleanup
- tests: move meta testing to its own package
- yaml utils: move OctInt from meta
- spread tests: minor performance improvements
- meta: move _errors to errors with related error classes
- meta: decouple DesktopFile logic
- schema: schema: build-base support for the snapd type
- rust plugin: support for s390x
- schema: build-base support for the kernel type
- spread tests: update gnome extension tests
- extensions: rename extension classes to known names
- extensions: create the gnome-platform directory
- extensions: improve docsting (used in the cli)
- spread tests: fine tune arch support for autopkgtests
Anatoli Babenia
- lifecycle: add support for building inside podman containers (#2659)
- docker: remove snapcraft-wrapper
Jeremie Deray
- catkin plugin: forward parallel build count (#2669)
- colcon plugin: forward parallel build count (#2670)
Kyle Fazzari
- spread tests: install package marker into ament index
- colcon plugin: add ability to ignore packages (#2687)
Stefano Rivera
- repo: properly handle install query for unknown apt packages (#2692)
Small Improvements
This is a minor release to fix a few issues in Snapcraft and sets some groundwork fixes to easily enable new extensions
Sergio Schvezov
- meta: transparently support command-chain
- extensions: structure the base extension class
- extensions: refactor checks into the extension base class
- extensions: support confinement restrictions
- appstream: xslt support for ul nested in p
Colin Watson
- store: send snapcraft-started-at in push requests
Chris Patterson
Paper cuts
This is a minor release to fix a few issues in Snapcraft.
Sergio Schvezov
- ant plugin: correct default channel and improve help
- cli: improve help for push-metadata
- project, cli: clean up snap asset messages
- file utils: better error for NotADirectory
- cli: only say sorry for in-snapcraft issues
Chris Patterson
- deprecations: add deprecation notice for version-script (dn10)
Carlo Lobrano
- meta: add InvalidAppCommand errors for non-existent and not-found (#2539)
A New Hope
Most of the improvements seen in this release are thanks to the great work done in collaboration with the attendees of the Snapcraft Summit that took place in Montreal this past northern hemisphere Spring time.
Core
Support for more building scenarios
So far Snapcraft has used the existence of the base keyword in snapcraft.yaml to trigger new behavior, this behavior did not consider the creation of bases, that is, a snapcraft.yaml that has:
type: base
In this scenario, the name set in snapcraft.yaml should be used to determine what build environment should be setup, thus:
name: core18
type: base
# base: not set
Shall create an Ubuntu 18.04 based build environment.
For the cases where the base has not been bootstrapped, it shall be possible to set build-base to the name of a base to use in order to setup the build environment, thus, the following will fail due to there not currently being a build environment for core20:
name: core20
type: base
# base: not set
But, can work with:
name: core20
type: base
build-base: core18
# base: not set
Additionally, a new value for type is now allowed, snapd, which would allow the snapd team to move forward in using snapcraft to create a snap for it.
Enhanced support for apps
Added snapcraft schema support (snapcraft.yaml) for recently introduced app properties supported by snapd (snap.yaml), along with additional improvements with regards to error handling and schema checks:
- Explicitly specify type string for existing options with unspecified type:
stop-commandreload-command
- Add daemon type
dbus - Add daemon options:
bus-name(for use withdaemon: dbus) with regex pattern found in snapdrestart-delaystart-timeouttimerwatchdog-timeout
- Add
on-watchdogforrestart-condition - Add
autostartfor apps installing autostart desktop files - Specify dependencies on daemon for new daemon options, as well
as existing options (stop-timeout,restart-condition) - Update some descriptions to match https://docs.snapcraft.io/snap-format
- Add regex patterns for stop timeout (to match introduced timeouts).
Faster iterations when using --use-lxd
Since the general availability of snapd 2.39 it was made possible to retrieve snaps with a proper API in order to inject them into a build environment without requiring root. This provided a common implementation for
build providers (i.e.; LXD and Multipass) to use. In effect this brings the same experience of snap injection (no wasted time re-downloading snaps) when working with snapcraft on a snap enabled system (i.e.; when running snapcraft from the snap).
The end result is that iterating on a snap should be much faster now when using LXD as there is no network overhead.
Improved missing file experience
After priming, instead of simply providing a list of missing dependencies that likely need to be included in the snap, the user is now offered suggestions of stage-packages that may satisfy these dependencies (and build a functioning snap).
This work will be extended in upcoming versions of Snapcraft in order to take into account plugs using the content interface.
Plugins
crystal (new plugin)
This is a new plugin developed by the crystal upstream to work with their recently released crystal snap.
Currently, the following keyword is accepted by the plugin:
- crystal-channel:
(string, default: latest/stable)
The Snap Store channel to install Crystal from.
The crystal developer that attended the recent Snapcraft Summit, wrote a nice summary and example on how to use this plugin, available at https://crystal-lang.org/2019/06/19/snapcraft-summit-montreal.html
conda (new plugin)
This is a new plugin co-developed during the summit with the Anaconda developers.
The conda plugin is pretty straight forward, the following keywords are understood by the plugin:
- conda-packages
(list of strings)
List of conda packages to install. - conda-python-version
(string)
The python version to use for the conda packages.
Defaults to the latest supported by miniconda. - conda-miniconda-version
(string)
The version of miniconda to bootstrap.
Defaults to the latest release of miniconda.
rust
A rust developer has reviewed the plugin and suggested improvements which have made it into this release.
One of those improvements was defaulting to the usage of the rust-toolchain file (if present), unless explicitly overridden by use of rust-channel or rust-revision.
Rebuilding is now also possible using this plugin.
ant
The publisher for ant has released a snap and after a review of the plugin from the publisher, the ant plugin was updated to support the use of this new snap for building ant-based projects.
The following new keywords are accepted by the plugin:
- ant-channel:
(string)
The channel to use for ant in the snap store, if not using tarball from
the ant archive (see ant-version and ant-version-checksum).
Defaults to latest/stable.
The publisher for ant has also reviewed the plugin to satisfaction.
colcon
Support for dashing was added to the colcon plugin in order to support this latest ROS release.
Bug fixes
There have been many bug fixes in this release, of those worth mentioning are:
- improved error handling.
- additional appstream icon extraction scenarios taken into account.
- modified handling of in-snap symlinks, specifically to better accommodate the merged /usr directory scheme.
- click.prompt and click.confirm expanded to query the existence of tty for stdin.
--
The full list of features and issues worked on are listed below
Sergio Schvezov
- static: use beta channel for black (#2606)
- catkin spread tests: dump apt-config on failures for legacy (#2610)
- rust plugin: use toml to dump the config (#2611)
- rust plugin: use rust-toolchain by default if present (#2613)
- conda plugin: new plugin (#2608)
- build providers: support injection for LXD (#2621)
- schema: remove support for os when using bases (#2626)
- appstream extractor: skip non icon file paths (#2630)
- spread tests: enable LXD build provider tests (#2631)
- build environment: detect base type and use name as base
- plugins: use get_build_base to determine base support
- project: add support for build-base
- repo: add support for querying file ownership
- pluginhandler: suggest stage-packages for missing DT_NEEDED
- tests: add python3-toml for autopkgtests
- spread tests: limit conda plugin to non autopkgtests x86-64 systems
- spread tests: crystal tests should only run on x86-64
Chris Patterson
- black: minor format changes from updated black (#2603)
- sources: introduce SnapcraftSourceNotFoundError (#2604)
- spread: use more workers to reduce job times
- catkin/legacy-pull: set test to manual
- cli: convert users of click.confirm/prompt to echo.confirm/prompt
- echo: respect SNAPCRAFT_HAS_TTY for is_tty_connected()
- ant plugin: switch to using ant snap for building (by default)
- general spread tests: set base for cwd test (#2618)
- errors: refactor exception/error handling (#2602)
- tests/unit/pluginhandler: introduce tests to repro symlink preservation bug
- file_utils/create_similar_directory: drop follow_symlinks option
- pluginhandler: honour symlink directory paths for filesets (LP: #1833408)
- test_pluginhandler: remove faulty (redundant) tests
- schema: synchronizing snapd supported schema to snapcraft (#2627)
Brian J. Cardiff
- crystal plugin: new plugin (#2598)
Mike Miller
- build providers: enforce well-known temp dir (#2607) (LP: #1833292)
Pawel Stolowski
- schema: allow snapd as snap type (#2609)
Claudio Matsuoka
- echo: add wrappers for click.prompt() and click.confirm()
Kyle Fazzari
- colcon plugin: add support for dashing (#2593)
anatoly techtonik
- cli: add -h short option for help (#2527) (LP: #1807423)
Stefan Bodewig
- use the stable risk level now that ant has been released
Chris MacNaughton
- rust plugin: add ability to rebuild (#2620) (LP: #1825858)
Carlo Lobrano
- tools: let environment-setup.sh skip unnecessary steps (#2625)
Less paper cuts
Hello Snapcrafters! The Snapcraft team is pleased to announce that version 3.6 is out.
This is a minor release to fix some outstanding issues and bring in an improvement to the ant plugin.
New in this release
Plugins
ant
It is now possible to specify the build file location with the ant-buildfile keyword.
This is the full change set for 3.6
Sergio Schvezov
- docker images: update to be self contained (#2591)
- static: update to newer black (#2599)
- repo: set priority to critical for debs (LP: #1821313)
Kyle Fazzari
- docker images: use build stages and generate locale (#2588)
- {catkin,colcon} plugin: remove old ROS key (#2586)
- catkin plugin: check workspace for dependencies (#2585) (LP: #1832044)
Stefan Bodewig
- ant plugin: make build file location configurable (#2596)
Chris Patterson
- tools: add
blacksnap to environment-setup.sh (#2595)
dependabot[bot]
- requirements: bump pyxdg from 0.25 to 0.26 (#2587)
Minor improvements
Hello Snapcrafters! The Snapcraft team is pleased to announce that version 3.5.1 is out.
This is a minor point release to fix some outstanding issues.
New in this release
Core
Legacy re-execution CLI
The CLI logic has been reworked in a way that re-execution into the legacy code base is only done for the build commands. This enables users of snapcraft with projects that have not migrated to bases to use the newer versions of the store commands.
Warnings when not using bases and links to upgrade paths are also presented now.
Destructive Mode
The clean command is now enabled with --destructive-mode.
This is the full change set for 3.5.1
Sergio Schvezov
- requirements: update to requests-toolbelt 0.8.0 (#2565)
- kernel plugin: correctly download the os.snap (#2566) (LP: #1828843)
- docs: consolidate on a simple HACKING.md (#2568)
- plainbox spread tests: lock down python packages (#2579)
- cli: refactor re-execution into legacy (#2571)
- plainbox spread tests: use https for the git source entries (#2583)
- catkin spread tests: finer system filter for legacy-pull (#2584)
- unit tests: stricter file checking on store download tests
- LEGACY common: add is_deb method
- LEGACY lifecycle: warn about bases
- LEGACY unit tests: stricter testing for common.is_deb
- LEGACY common: take into account dpkg not being found
- LEGACY common: check if running from snap before deb
- LEGACY common: check for relative argv0 in is_deb
Ian Metcalf
- dotnet plugin: fix parsing of newer sdk releases (#2537)
Kyle Fazzari
- catkin spread tests: use kinetic instead of indigo (#2575) (LP: #1830769)
- keyrings: update ROS signing key (#2578)
- LEGACY tests: stop testing indigo in catkin spread (#2572)
- LEGACY catkin plugin: remove default rosdistro (#2576)
Adam Collard
- cli: add --destructive-mode to clean (#2577)
Michael Vogt
- cli: do not prompt when there is no tty available on stdin (#2570)
dalance
- rust plugin: fix linker on i386 (#2580)