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
, supersedesCRAFT_ARCH_TRIPLET
CRAFT_ARCH_TRIPLET_BUILD_ON
CRAFT_ARCH_BUILD_FOR
, supersedesCRAFT_TARGET_ARCH
CRAFT_ARCH_BUILD_ON
For core20
,
SNAPCRAFT_ARCH_TRIPLET_BUILD_FOR
, supersedesSNAPCRAFT_ARCH_TRIPLET
SNAPCRAFT_ARCH_TRIPLET_BUILD_ON
SNAPCRAFT_ARCH_BUILD_FOR
, supersedesSNAPCRAFT_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 featureforce-fallback
to force the legacy feature of tarballing the sources
This is the basic workflow:
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
, andcatkin-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:
- https://snapcraft.io/docs/ros2-humble-content-extension
- https://snapcraft.io/docs/ros2-foxy-content-extension
- https://snapcraft.io/docs/ros-noetic-content-extension
Changelog
- tests: remove arch_triplet from unit test by @mr-cal in #4160
- requirements: update craft-archives by @tigarmo in #4174
- core18: removal by @sergiusens in #4177
- Hotfix/7.4 merge by @sergiusens in #4191
- requirements: bump craft-providers by @mr-cal in #4192
- elf_utils: add missing triplet for i386 by @valentindavid in #4188
- ros: remove generator warnings from linter spread tests by @cmatsuoka in #4202
- For consistency, rename new kernel plugin file to "kernel_plugin.py" by @rpjday in #4164
- Remove trailing slashes from tools/staging_env.sh by @tartley in #4201
- requirements: update craft-parts to 1.21.0 by @cmatsuoka in #4183
- providers: remove deprecated
build_base
parameter by @mr-cal in #4204 - build(deps): bump tornado from 6.2 to 6.3.2 in /docs/.sphinx by @dependabot in #4179
- lint: fix for pyright 1.1.312 by @mr-cal in #4205
- build(deps): bump requests from 2.30.0 to 2.31.0 by @dependabot in #4171
- build(deps): bump requests from 2.28.1 to 2.31.0 in /docs/.sphinx by @dependabot in #4169
- requirements: update craft-parts to 1.21.1 by @cmatsuoka in #4208
- Revert "ros: remove linter warnings from spread tests (#4202)" by @cmatsuoka in #4212
- fix(catkin): rosbash is an unofficial ros package from Debian by @Guillaumebeuzeboc in #4206
- build(deps): bump cryptography from 40.0.2 to 41.0.0 by @dependabot in #4195
- kde-neon-extension: remove extra build environment variables that are… by @ScarlettGatelyMoore in #4193
- dependencies: update craft-cli to 2.0.0 by @tigarmo in #4215
- ros: make linter tests more flexible by @mr-cal in #4223
- meta: omit LD_LIBRARY_PATH and PATH in classic confinement by @mr-cal in #4216
- kernel_plugin.py: doc cleanup by @rpjday in #4218
- ci: do not check coverage of tests dir by @mr-cal in #4222
- type: workaround for pyright bug by @lengau in #4233
- spread: improve resilience of lxd-type-base test by @lengau in #4239
- plugins: add riscv into kernel plugin for build dtbs by @AristoChen in #4252
- Hotfix/7.4 merge by @sergiusens in #4213
- snap: migrate to core22 by @sergiusens in #4186
- Added comments to indicate where the desktop-launch script source is by @kenvandine in #4250
- docs: enable RTD builds by @dboddie in #4258
- remote-build: Use personal access tokens by @cjwatson in #4270
- docs: remove obsolete submodule by @dboddie in #4272
- docs: add command reference by @dboddie in #4267
- extensions: plugin aware part_snippet values by @sergiusens in #4271
- bases: improve errors for ESM bases by @sergiusens in #4274
- cli: catch craft-provider errors by @mr-cal in #4295
- build(deps): bump certifi from 2023.5.7 to 2023.7.22 by @dependabot in #4292
- build(deps): bump cryptography from 41.0.0 to 41.0.3 by @dependabot in #4301
- Merge 7.5 hotfixes by @sergiusens in #4304
- packaging: allow installing without git by @branchvincent in #4306
- Merge 7.5 hotfixes by @sergiusens in #4311
- build(deps): bump pygments from 2.13.0 to 2.15.0 in /docs/.sphinx by @dependabot in #4286
- cli: use "_ALL_PROVIDERS" as for provider options by @rpjday in #4308
- build(deps): bump certifi from 2022.12.7 to 2023.7.22 in /docs/.sphinx by @dependabot in #4291
- environment: add build-on and build-for envvars for core20 by @mr-cal in #4313
- build(deps): bump tornado from 6.3.2 to 6.3.3 in /docs/.sphinx by @dependabot in #4325
- docs: fix tox doc builds by @dboddie in #4273
- project: output version value with error message by @aritra24 in #4284
- manifest: use
--enable-image-information
inside instances by @mr-cal in #4330 - cli: prioritize
--use-lxd
overSNAPCRAFT_BUILD_ENVIRONMENT
by @mr-cal in #4329 - kernel plugin: properly generate Ubuntu kernel .config by @arighi in #4210
- Sgmoore/kde neon ext updates by @ScarlettGatelyMoore in #4299
- requirements: update craft-parts to 1.23.1 by @cmatsuoka in #4327
- enable "streaming brief" CLI mode by @tigarmo in #4331
- environment: error when build-for arch variable cannot be evaluated by @mr-cal in #4332
- build(deps-dev): bump pyramid from 2.0.1 to 2.0.2 by @dependabot in #4335
- requirements: update craft-parts to 1.24.1 by @cmatsuoka in #4334
- refactor(parts): move yaml utils out of lifecycle by @mr-cal in #4338
- refactor(parts): separate yaml parsing from base errors by @mr-cal in #4342
- chore: remove unused list_registered legacy code by @sergiusens in #4345
- feat(remote-build): check base before executing by @mr-cal in #4343
- docs(readme): add readthedocs build badge by @mr-cal in #4350
- chore(docs): bump requirements and build environment by @mr-cal in #4351
- feat(remote-build): check SNAPCRAFT_REMOTE_BUILD_STRATEGY envvar by @mr-cal in #4353
- Hotfix/7.5 merge by @sergiusens in #4359
- docs(architectures): add how-to, reference, and explanation by @mr-cal in #4349
- style(docs): fix linter errors for auto-generated commands by @mr-cal in #4358
- docs(architectures): reword how to section by @mr-cal in #4362
- extensions: support for content sharing for ROS by @artivis in #4221
- ci(deps): configure renovate by @lengau in #4352
- fix(environment): sort core20 project variables before replacement by @mr-cal in #4366
- feat(remote-build): add GitRepo class by @mr-cal in #4368
- Rust plugin: rewrite the Rust plugin for core20 by @liushuyu in #4297
- test(spread): make ros linter test less strict by @mr-cal in #4369
- feat(remote-build): check if project is in a git repository by @mr-cal in #4370
- ci: fix weekly spread tests, add status badge by @mr-cal in #4371
- Stop fontconfig from loading from host’s /etc/fonts/conf.d by @gunnarhj in #4257
- chore(deps): add pygit to doc requirements by @mr-cal in #4375
- docs: update sphinx theme by @sergiusens in #4367
- build(deps): bump cryptography from 41.0.3 to 41.0.4 by @dependabot in #4374
- build(deps): bump craft-parts from 1.24.1 to 1.25.1 by @cmatsuoka in #4377
- chore: rename remote-build test by @mr-cal in #4383
- tests: use less mocks in remote-build by @mr-cal in #4382
- tox: exclude submodules from spread-shellcheck by @lengau in #4240
- refactor(remote-build): reorganize functions by @mr-cal in #4384
- ci: download snap to tests dir by @mr-cal in #4380
- feat(remote-build): get build id by @mr-cal in #4385
- build(deps): bump urllib3 from 1.26.15 to 1.26.17 by @dependabot in #4388
- build(deps): bump urllib3 from 1.26.13 to 1.26.17 in /docs/.sphinx by @dependabot in #4387
- fix: add part in snapcraft.yaml to build libgit2 by @sergiusens in #4393
- chore(remote-build): migrate LaunchpadClient and WorkTree by @mr-cal in #4390
- fix(remote-build): warn instead of error when using unsupported bases by @sergiusens in #4396
- feat(remote-build): new command logic by @mr-cal in #4395
- chore: ignore types by @mr-cal in #4406
- chore(deps): update craft-providers to 1.18.0 by @mr-cal in #4409
- python v2 plugin: support building parts conforming to PEP 518 by @brlin-tw in #4087
- build(deps): bump urllib3 from 1.26.17 to 1.26.18 in /docs/.sphinx by @dependabot in #4405
- build(deps): bump urllib3 from 1.26.17 to 1.26.18 by @dependabot in #4404
- chore: update Python version metadata by @lengau in #4415
- style: fix ruff format tox environment by @lengau in #4416
- chore(deps): update ruff to 0.1.1 and fix lint issues by @lengau in #4417
- chore(pyproject): quote versions by @mr-cal in #4423
- fix(remote-build): parse
--launchpad-timeout
argument by @mr-cal in #4426 - chore: migrate dev environment to ubuntu 22.04 and python 3.10 by @mr-cal in #4425
- docs: update stale commands for running local tests in TESTING.md by @stephensp in #4428
- build(deps): bump craft-providers to 1.19.1 (#4421) by @syu-w in #4429
- fix(remote-build): improve logging and catch exceptions by @mr-cal in #4432
- feat(linter): show missing libraries corresponding package by @syu-w in #4430
- tests(spread): add remote-build spread test by @mr-cal in #4433
- chore(log): hide command in output when pack failed by @syu-w in #4434
- ci: colorize tox and collapse sections by @mr-cal in #4435
- build(deps): bump craft-providers to 1.19.2 by @mr-cal in #4437
- docs(architectures): remove shorthand notation for core22 architectures by @mr-cal in #4436
- feat: enable chisel by @sergiusens in #4441
- feat: improve lifecycle messages by @sergiusens in #4431
- chore(ci): publish snaps for feature/ branches by @tigarmo in #4447
- fix(metadata): add f-string to debug message by @mr-cal in #4453
- test(spread): check for new lifecycle message by @mr-cal in #4452
- remote-build: Add riscv64 by @cjwatson in #4450
- Merge 7.5 hotfixes by @sergiusens in #4458
- chore(deps): update dependencies by @lengau in #4448
- fix: push tags for remote-build by @sergiusens in #4460
- fix: improve lifecycle messages by @sergiusens in #4461
New Contributors
- @tartley made their first contribution in #4201
- @branchvincent made their first contribution in #4306
- @arighi made their first contribution in #4210
- @liushuyu made their first contribution in #4297
- @gunnarhj made their first contribution in #4257
- @stephensp made their first contribution in #4428
Full Changelog: 7.5.4...8.0.0