snapcraft remote-build snapcraft.yaml validation too strict
Metadata
Current evaluation
Strict validation in snapcraft remote-build rejected empty LD_LIBRARY_PATH for core22 snaps. Resolved by the new remote builder, which fixes the legacy core18/20 implementation bug.
Resolution: closed resolved
Reason: The issue was resolved by the introduction of the new remote builder, which no longer exhibits the strict validation error for empty environment variables on core22 snaps.
Evaluated by: mr-cal-bot
No scores available.
Issue body
When attempting to use `snapcraft remote-build` I get this error:
$ snapcraft remote-build --build-on arm64
snapcraft remote-build is experimental and is subject to change - use with caution.
Issues while validating snapcraft.yaml: The 'environment/LD_LIBRARY_PATH' property does not match the required schema: '' is not of type 'number' or '' is too short
Using an empty LD_LIBRARY_PATH is an requirement for some classic snaps [0][1] and building the snap locally or indeed through the Launchpad snap package infrastructure causes no issue.
Why does the `snapcraft remote-build` command impose this restriction, and can it be lifted?
0: https://github.com/juju/charm-tools/blob/977ec1ff795f5a8692f8061fc16aa01adf9478cf/snap/snapcraft.yaml#L14-L23
1: https://github.com/openstack-charmers/octavia-diskimage-retrofit/blob/6de2a47491df9e983b458bc7d24f0e035c55c9c3/snap/snapcraft.yaml#L32-L44
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | closed resolved | Strict validation in snapcraft remote-build rejected empty LD_LIBRARY_PATH for core22 snaps. Resolved by the new remote builder, which fixes the legacy core18/20 implementation bug. | |
| stealth/space-bunny-alpha |
Impact:
40
Quick Win:
15
Complexity:
58
Confidence:
96
Actionability:
91
|
close resolved | remote-build rejected a valid empty LD_LIBRARY_PATH for core22 snaps through the legacy builder; current Snapcraft uses the Craft Application builder, and the legacy path was removed in 9.0. | |
| stealth/space-bunny-alpha |
Impact:
28
Quick Win:
18
Complexity:
32
Confidence:
97
Actionability:
95
|
close stale | Legacy core22 remote-build rejected empty LD_LIBRARY_PATH while parsing core22 architecture syntax; related to #2007789, and the legacy path was removed in Snapcraft 9.0. | |
| stealth/space-bunny-alpha |
Impact:
40
Quick Win:
20
Complexity:
42
Confidence:
84
Actionability:
86
|
needs triage | Empty LD_LIBRARY_PATH is rejected by remote-build manifest validation, although local and Launchpad builds accept it; this untriaged request to relax the schema remains open. | |
| qwen3.6-35b-a3b-mtp-q6 |
Impact:
40
Quick Win:
28
Staleness:
95
Complexity:
30
Confidence:
55
Support Request:
20
|
close stale | snapcraft remote-build validation rejects empty LD_LIBRARY_PATH in environment, blocking some classic snaps. Issue is 4 years old with no maintainer engagement. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
40
Confidence:
75
Support Request:
10
|
needs triage | snapcraft remote-build rejects empty LD_LIBRARY_PATH in snapcraft.yaml despite local builds accepting it. Unlabelled, zero maintainer comments, inactive for over three years. | |
| qwen/qwen3.6-35b-a3b |
Staleness:
95
Complexity:
40
Confidence:
85
Support Request:
10
|
needs triage | Reports strict validation in snapcraft remote-build rejecting empty LD_LIBRARY_PATH in snapcraft.yaml, breaking classic snaps. Unlabelled, zero maintainer comments, inactive for over three years. | |
| qwen3.6-35b-a3b-mtp-q6 |
Staleness:
95
Complexity:
60
Confidence:
80
Support Request:
10
|
close stale | Reports strict validation in snapcraft remote-build rejecting empty LD_LIBRARY_PATH, which works locally and on Launchpad. Unlabeled, no maintainer comments, inactive for over 3 years. |
Update history
| Date | Change |
|---|---|
| created |
Related work
-
Related To:
snapcraft (launchpad)#2007789
(confidence 90%)
Maintainer noted this issue shares the same root cause as bug #2007789 regarding legacy remote-build implementation.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #4895 fix(remotebuild): require core20 snaps to use the legacy remote builder | snapcraft | merged | Merged in #4895 (d9c8781a1), requiring core20 remote builds to use the legacy builder because the new builder could not parse core20 snapcraft.yaml files; fixes #4886. | |
| #4144 remote build: legacy builder cannot parse core22 snapcraft.yaml syntax | snapcraft | closed | Marked won't fix: legacy-builder schema support was descoped in favor of the new remote builder, which accepts build-for; legacy support was removed by PR #5994 in Snapcraft 9. | |
| #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. | |
| #2011842 Incorrect default LD_LIBRARY_PATH | snapcraft (launchpad) | open | Core22+ Snapcraft emits unsupported shell expansion for LD_LIBRARY_PATH; the behavior is reproduced and remains blocked on snapd environment-list support. | |
| #1723208 Snapcraft snap doesn't work natively on trusty | snapcraft (launchpad) | closed | Fixed Trusty classic-snap builds by preventing bundled-library LD_LIBRARY_PATH values from leaking into build commands; merged in snapcore/snapcraft#1635 as da9181487. | |
| #1976221 Missing linker base while building with core22 base | snapcraft (launchpad) | closed | Resolved by upgrading from legacy Snapcraft to Snapcraft 7.x, which correctly builds core22 snaps; no code fix or linked PR was recorded. | |
| #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. | |
| #6336 Snapcraft 9: snapcraftctl errors in core22 snaps | snapcraft | closed | Fixed a validator bug preventing core22/core24 snaps without a `base` key from using `snapcraftctl`. Merged as #6499, resolving #6336. | |
| #300 Remote-build: use craft-application for core22 | craft-application | closed | Core22 remote builds moved to craft-application in merged Snapcraft PR #4724 (commit 9905f2831), removing the legacy core22 build path. | |
| #2064639 snapcraft remote-build core20 armhf openssl error | snapcraft (launchpad) | closed | armhf/riscv64/ppc64el/s390x remote-build failed on core20 after cryptography 42.0.5 broke the OpenSSL legacy provider. Fixed by merged PR canonical/snapcraft#4784 (commit 7aeffed19), setting CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1 in the snap manifest; LP#2064639 closed as fixed. |