The team behind Snapcraft is pleased to announce the release of Snapcraft 7.2.0, a major update to the tool used to build snap packages.
Among the many any other updates, fixes and additions, the following are what we consider its highlights:
- Automatic linting with the
core22
base - Easy switching between LXD and Multipass build providers
- A new store authentication mechanism
For general details, including installation instructions, see Snapcraft overview, or take a look at Snapcraft release notes for other Snapcraft releases.
Snapcraft linting
Snapcraft now includes its own linter functionality when working with snaps using the core22
base. Snapcraft linters run automatically when a snap is packed, and will report any detected errors unless otherwise disabled.
The following two linters are currently supported:
-
classic
: verifies binary file parameters for snaps using classic confinement -
library
: verifies that no ELF file dependencies, such as libraries, are missing
Default provider switching
Linux users of Snapcraft can now switch the default provider (LXD) to Multipass. Do to so, run:
snap set snapcraft provider=multipass
To go back to LXD, run:
snap set snapcraft provider=lxd
See Build providers for more details.
Store changes
Store
Validation Sets
Incorrectly formatted YAML for Validation Sets, or those not completely accepted by the store, can now be interactively edited for further iteration:
On Prem Store
Supported commands are:
- upload
- release
- list-revisions
- close
- status
- login
- export-login
- logout
- whoami
To work with a deployed on premises store, the following must be set:
STORE_DASHBOARD_URL=http[s]://<store-IP>/publisher
STORE_UPLOAD_URL=http[s]://<store-IP>
SNAPCRAFT_STORE_AUTH=onprem
Credentials Format
Snapcraft 7.2 now outputs a new standard (to the tools that require it) export login. This format is usable by Ubuntu Image and snapd.
Existing exported credentials remain compatible, however these newly exported tokens are not backwards compatible with versions lower than Snapcraft 7.2.0
Full list of changes
The following is the complete list of features and issues worked on for 7.2.0. See The Snapcraft 7.2.0 GitHub release for further details.
List of changes for Snapcraft 7.2.0
- linters: add linting infrastructure by @cmatsuoka in #3847
- lint: lint legacy code with isort by @mr-cal in #3852
- lint: lint legacy code with black by @mr-cal in #3853
- lint: lint legacy code with flake8 by @mr-cal in #3854
- linters: add classic confinement linter by @cmatsuoka in #3849
- Release/7.1 merge by @sergiusens in #3861
- store: move package out of commands by @sergiusens in #3862
- whoami command: account for missing expires by @sergiusens in #3863
- Add binding for amdgpu.ids by @sergio-costas in #3859
- names command: move presentation logic to StoreClientCLI by @sergiusens in #3864
- plugins command: support for core22 by @sergiusens in #3870
- meta: get content provider dirs from snap metadata by @cmatsuoka in #3871
- linters: add missing library linter by @cmatsuoka in #3872
- lint: lint legacy code with black by @mr-cal in #3865
- meta: fix content plug detection by @cmatsuoka in #3874
- store: on prem base client by @sergiusens in #3880
- extensions: replace execs with source by @sergio-costas in #3869
- ua: add support to ua token management by @cmatsuoka in #3883
- store: initial support for an onprem store by @sergiusens in #3885
- store: support status for an onprem store by @sergiusens in #3887
- Hotfix/7.1.2 merge by @sergiusens in #3888
- Write passthrough to meta data and add some missing fields by @valentindavid in #3882
- DT-500 Fix Cups for Gtk support in Gnome-42 by @sergio-costas in #3867
- ua: specify and enable ua services by @cmatsuoka in #3886
- ua: enable ua services in legacy by @cmatsuoka in #3890
- store: support close for an on prem store by @sergiusens in #3892
- Merge 7.1.3 release by @sergiusens in #3894
- Hotfix/7.1.4 merge by @sergiusens in #3900
- config: add snap config model by @mr-cal in #3898
- store: on prem support for list-revisions by @sergiusens in #3901
- commands: update lifecycle docstrings by @cmatsuoka in #3902
- providers: choose default provider from snap config for core 22 by @mr-cal in #3899
- providers: choose legacy default provider from snap config by @mr-cal in #3903
- providers: pass http-proxy and https-proxy to craft-providers by @mr-cal in #3906
- parts: minor refactoring in instance log capture by @cmatsuoka in #3905
- tests: minor refactoring in shell/shell-after tests by @cmatsuoka in #3904
- parts: use part validator from craft-parts by @cmatsuoka in #3909
- tests unit: add for on prem store list-revisions by @sergiusens in #3908
- store: improve error message for 401 error by @sergiusens in #3907
- unit tests: minor improvement to fixture usage by @sergiusens in #3910
- requirements: update craft-providers to 1.4.2 by @mr-cal in #3911
- discovery.py: correct comment, âextensionsâ should say âpluginsâ by @rpjday in #3912
- build(deps): bump oauthlib from 3.2.0 to 3.2.1 by @dependabot in #3914
- legacy: install unpinned build packages by @cmatsuoka in #3915
- cli: move remote build out of legacy by @sergiusens in #3919
- schema: allow the gnome extension by @sergiusens in #3920
- store: correctly logout when credentials are invalid for legacy by @sergiusens in #3921
- providers: move
get_instance_name()
to providers.py by @mr-cal in #3926 - requirements: update craft-parts to 1.14.2 by @cmatsuoka in #3924
- providers: move
get_command_environment()
to providers.py by @mr-cal in #3927 - build(deps): bump protobuf from 3.20.1 to 3.20.2 by @dependabot in #3923
- test_pip.py: correct typo âenviromentâ consistently so things keep wo⌠by @rpjday in #3916
- tests: mock and test provider calls from lifecycle.py by @mr-cal in #3928
- providers: move mount logic to lifecycle.py by @mr-cal in #3930
- providers: refactor clean_project_environments by @mr-cal in #3929
- providers: refactor
launched_environment()
by @mr-cal in #3932 - providers: install snaps and packages via craft-providers API by @mr-cal in #3933
- providers: deprecate SnapcraftBuilddBaseConfiguration by @mr-cal in #3934
- providers: refactor
capture_logs_from_instance()
by @mr-cal in #3935 - commands: make help message consistent by @nteodosio in #3917
- tests: add unit test for
capture_logs_from_instance()
by @mr-cal in #3937 - providers: move
confirm_with_user()
call to providers.py (#91) by @mr-cal in #3938 - linters: allow ignoring files per-linter by @tigarmo in #3931
- providers: move
get_provider()
to providers.py by @mr-cal in #3940 - command: update edit-validation-sets to craft-cli by @sergiusens in #3939
- lint: support the existence of âvenvâ by @tigarmo in #3941
- commands: allow re-editing validation sets on error by @sergiusens in #3942
- providers: use new craft-providers interface by @mr-cal in #3943
- tests: fix electron spread test by @mr-cal in #3944
- requirements: craft-store 2.3.0 for new credentials by @sergiusens in #3945
- fix: confirm provider install when using experiental extension by @Guillaumebeuzeboc in #3866
- requirements: update by @sergiusens in #3948