← Back to issue list

Snapcraft 7 fails with inline deb822 signing blocks

View original Github issue

Metadata

Project
snapcraft
Number
#4408
Type
issue
State
open
Author
lengau
Labels
Status: Triaged Type: Bug
Created
Updated
Closed
—

Current evaluation

Snapcraft 7's core20 LXD fallback failed on valid inline deb822 Signed-By keys; the affected legacy/core20 code has since been removed.

Suggested action: close stale

Reason: The traceback pinpoints Repo.is_package_installed() in the legacy LXD provider, and maintainer @mr-cal says the distro-package check can probably be dropped; #4960 exercises the same function. The affected snapcraft_legacy implementation was removed in ffb164b7a, while fa7952b4d (#6019) dropped core20 support, leaving the multipass/core22 migration as only historical workarounds.

Evaluated by: mr-cal-bot

Impact: 45 Quick Win: 33 Complexity: 22 Confidence: 97 Actionability: 94

Issue body

### Bug Description Modern apt (unsure since when) supports inline `Signed-By`, which is the default way to add PPAs in mantic. However, when using LXD (at least for a core20 charm), this breaks snapcraft. WORKAROUND: use the (default) multipass backend. ### To Reproduce 1. Put the following file in `/etc/apt/sources.list.d/deadsnakes-ubuntu-ppa-mantic.sources` ``` Types: deb URIs: https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu/ Suites: jammy Components: main Signed-By: -----BEGIN PGP PUBLIC KEY BLOCK----- . mQINBFl8fYEBEADQmGZ6pDrwY9iH9DVlwNwTOvOZ7q7lHXPl/TLfMs1tckMc/D9a hsdBN9VWtMmo+RySvhkIe8X15r65TFs2HE8ft6j2e/4K472pObM1hB+ajiU/wYX2 Syq7DBlNm6YMP5/SyQzRxqis4Ja1uUjW4Q5/Csdf5In8uMzXj5D1P7qOiP2aNa0E r3w6PXWRTuTihWZOsHv8npyVYDBRR6gEZbd3r86snI/7o8Bfmad3KjbxL7aOdNMw AqQFaNKl7Y+UJpv1CNFIf+twcOoC0se1SrsVJlAH9HNHM7XGQsPUwpNvQlcmvr+t 1vVS2m72lk3gyShDuJpi1TifGw+DoTqu54U0k+0sZm4pnQVeiizNkefU2UqOoGlt 4oiG9nIhSX04xRlGes3Ya0OjNI5b1xbcY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r4FffLmnvFC9w== =7hFk -----END PGP PUBLIC KEY BLOCK----- ``` 2. Get a core20 snap (e.g. `git clone git@github.com:canonical/charmcraft.git`) 3. `snapcraft --use-lxd` ### Environment Kubuntu Mantic plus the sources file above (yes I know I shouldn't be pointing to a jammy source...) ### snapcraft.yaml ```shell N/A ``` ### Relevant log output ```shell $ snapcraft --verbose --use-lxd Starting Snapcraft 7.5.3 Logging execution to '/home/lengau/.local/state/snapcraft/log/snapcraft-20231018-125641.121134.log' Sorry, an error occurred in Snapcraft: E:Invalid value set for option Signed-By regarding source https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu/ jammy (not a fingerprint), E:The list of sources could not be read. We would appreciate it if you anonymously reported this issue. No other data than the traceback and the version of snapcraft in use will be sent. Would you like to send this error data? (Yes/No/Always/View) [no]: n You can find the traceback in file '/tmp/tmp3m36qgt8/trace.txt'. trace: Traceback (most recent call last): File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/cli.py", line 255, in run _run_dispatcher(dispatcher, global_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/cli.py", line 228, in _run_dispatcher dispatcher.run() File "/snap/snapcraft/9726/lib/python3.8/site-packages/craft_cli/dispatcher.py", line 448, in run return self._loaded_command.run(self._parsed_command_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 265, in run super().run(parsed_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/commands/lifecycle.py", line 138, in run parts_lifecycle.run(self.name, parsed_args) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 179, in run yaml_data = process_yaml(snap_project.project_file) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/parts/lifecycle.py", line 142, in process_yaml yaml_data = yaml_utils.load(yaml_file) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft/parts/yaml_utils.py", line 94, in load raise errors.LegacyFallback(f"base is {build_base}") snapcraft.errors.LegacyFallback: base is core20 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft_legacy/cli/legacy.py", line 27, in legacy_run run() File "/snap/snapcraft/9726/lib/python3.8/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/snap/snapcraft/9726/lib/python3.8/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/snap/snapcraft/9726/lib/python3.8/site-packages/click/core.py", line 1635, in invoke rv = super().invoke(ctx) File "/snap/snapcraft/9726/lib/python3.8/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/snap/snapcraft/9726/lib/python3.8/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/snap/snapcraft/9726/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft_legacy/cli/_runner.py", line 139, in run snap_command.invoke(ctx) File "/snap/snapcraft/9726/lib/python3.8/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/snap/snapcraft/9726/lib/python3.8/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft_legacy/cli/lifecycle.py", line 405, in snap _execute(steps.PRIME, parts=tuple(), pack_project=True, output=output, **kwargs) File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft_legacy/cli/lifecycle.py", line 141, in _execute build_provider_class.ensure_provider() File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft_legacy/internal/build_providers/_lxd/_lxd.py", line 90, in ensure_provider if repo.Repo.is_package_installed("lxd") or repo.Repo.is_package_installed( File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft_legacy/internal/repo/_deb.py", line 535, in is_package_installed with AptCache() as apt_cache: File "/snap/snapcraft/9726/lib/python3.8/site-packages/snapcraft_legacy/internal/repo/apt_cache.py", line 58, in __enter__ self.cache = apt.Cache() File "/snap/snapcraft/9726/lib/python3.8/site-packages/apt/cache.py", line 170, in __init__ self.open(progress) File "/snap/snapcraft/9726/lib/python3.8/site-packages/apt/cache.py", line 232, in open self._cache = apt_pkg.Cache(progress) apt_pkg.Error: E:Invalid value set for option Signed-By regarding source https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu/ jammy (not a fingerprint), E:The list of sources could not be read. ``` ### Additional context This will probably be fixed with the core22 move, but it's strange that snapcraft would be checking the repositories on the host at all (unless in destructive mode).

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 45
Quick Win: 33
Complexity: 22
Confidence: 97
Actionability: 94
close stale Snapcraft 7's core20 LXD fallback failed on valid inline deb822 Signed-By keys; the affected legacy/core20 code has since been removed.
stealth/space-bunny-alpha
Impact: 35
Quick Win: 22
Complexity: 28
Confidence: 96
Actionability: 87
keep open Snapcraft 7 core20 LXD builds fail on valid inline deb822 Signed-By host sources; the obsolete provider check is identified, but the bug remains open.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 24
Complexity: 0
Confidence: 90
Actionability: 80
close resolved Snapcraft 7 fails with inline deb822 signing blocks when using LXD for core20 builds. The error originates from snapcraft_legacy code that has since been removed from the project.
qwen/qwen3.8-27b
Impact: 35
Quick Win: 26
Staleness: 85
Complexity: 25
Confidence: 85
Support Request: 10
close stale Snapcraft 7 core20 LXD builds fail on hosts with modern apt deb822 Signed-By blocks due to a legacy apt package check in snapcraft_legacy. Triaged; root cause identified, but snapcraft_legacy and core20 have since been removed from the codebase.
qwen/qwen3.6-35b-a3b
Staleness: 15
Complexity: 20
Confidence: 85
Support Request: 5
keep open Snapcraft 7 fails when using LXD with modern apt's inline deb822 Signed-By blocks due to legacy host apt source parsing. Triaged and under maintainer analysis with a proposed fix.
qwen3.6-35b-a3b-mtp-q6
Staleness: 65
Complexity: 15
Confidence: 90
Support Request: 0
keep open Snapcraft 7 fails with LXD backend when modern apt uses inline deb822 Signed-By blocks. Triaged bug with maintainer-identified root cause in legacy code; awaiting fix.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#5420 (confidence 100%)

    The later report was closed as a duplicate of this issue, confirming the same LXD/core20 host-source failure.

  • Related To: snapcraft#4960 (confidence 99%)

    A maintainer explicitly linked it to the same legacy function, with the failure occurring in a different provider check.

  • Superseded By: snapcraft#6019 (confidence 97%)

    PR #6019, commit fa7952b4d, dropped core20 support; the complete legacy implementation was subsequently removed in ffb164b7a.

Related issues

Issue Project State Summary Similarity
#1866300 snapcraft fails to build core20 snap snapcraft (launchpad) closed Closed without a documented fix after core20 Multipass/LXD failures; core20 build-base support was unavailable and the workaround was destructive mode.
76%
#2099923 Snapcraft builds are failing: install of snap "snapcraft" failed snapcraft (launchpad) open Reported Launchpad Bionic non-i386 builds cannot install Snapcraft 7.x/stable because core20 needs snapd 2.61; the issue remains open, untriaged, and unanswered.
74%
#2012074 snapcraft cannot build snap by default on aarch64 snapcraft (launchpad) open ARM64 default builds failed on Snapcraft 7.3.1 because core20 selected amd64-only Multipass images; later defaults use core22/LXD on Linux, addressing the reported path.
72%
#1750642 Snapcraft fails in LXD container on Debian 9 snapcraft (launchpad) closed Closed as stale in September 2026 because Debian 9 and the reported Snapcraft version were outdated; no fixing PR or commit was identified.
71%
#1981979 snapcraft 7.0.8+ stopped working on non debian systems snapcraft (launchpad) closed Fixed in snapcore/snapcraft#3843 (commit ed49405fb, merged as 57ecab3bc) by deferring the Debian package import so Snapcraft starts on non-Debian hosts.
71%
#2014963 Snapcraft fails to build snap if Snapcraft itself is installed using `snap try` snapcraft (launchpad) open `snap try` Snapcraft could not self-inject into legacy LXD builds because snapd cannot download a try snap; the affected provider is removed, but current behavior needs retesting.
70%
#1795827 Snapcraft doesn't install snapcraft inside the lxd container snapcraft (launchpad) open Historical LXD builds failed because Snapcraft was not injected into the container; the modern Craft Providers LXD path injects Snapcraft and resolves the legacy failure.
70%
#5420 Snapcraft 7 fails to launch a LXD container based on host apt sources entries snapcraft closed Closed as a duplicate of canonical/snapcraft#4408; no separate fix was made for this report.
70%
#1862256 snapcraft should complain loudly when building base: core20 snap on i386 snapcraft (launchpad) closed Closed as superseded: improved architecture parsing rejects unsupported core20/i386 builds, making a dedicated check unnecessary; snapcraft#4392 improved this handling.
70%
#4960 Can't build Core20 snaps on non-snap distros snapcraft open Core20 LXD builds reject distro-installed LXD on NixOS/Arch; a maintainer specified a backport, while core20 support now requires Snapcraft 8.
70%