← Back to issue list

Add metadata describing the architectures that a snap can be built for

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1533713
Type
issue
State
closed
Author
~cjwatson
Labels
personal
Created
Updated
Closed

Current evaluation

Core20 added build-on/build-for platform metadata in 2018, enabling CI to derive builds and build-for: [all] for architecture-independent snaps.

Resolution: closed resolved

Reason: The 2019-07-24 maintainer closing comment states that architecture support for configuring CI was defined and released in 2018. It was implemented through core20 build-on/build-for platform metadata, including build-for: [all].

Evaluated by: mr-cal-bot

No scores available.

Issue body

<cjwatson> sergiusens: I'm pretty confused about how the "architectures" field in a snapcraft.yaml is meant to work. It seems to override the architectures of the generated snap package, not specify which architectures the snap might be built for - is that right? <sergiusens> cjwatson, architectures in snapcraft.yaml should probably just go away; it is only there since people wanted it on special request (using prebuilt binaries and manually constructing a fat package). <sergiusens> but yes, it is an override, not a "built this for" :-/ <cjwatson> sergiusens: Have you put any thought into metadata that describes the architectures that the source code for a snap can be built for? It would be useful for the LP/store interaction. <cjwatson> sergiusens: debs have this for a reason ;-) <sergiusens> cjwatson, can you log a bug, I agree, but I'll forget https://bugs.launchpad.net/snapcraft :-) To elaborate on this: it would be useful to be able to make a single build request to Launchpad which would build the snap for all architectures it supports. At the moment you can configure this in Launchpad, but it really belongs with the snap's metadata instead. Each individual (non-fat) snap that comes out of this should still have just a single architecture in its metadata. As with debs, there should be a value that indicates that the snap is portable code that you can build anywhere reasonable (like "Architecture: any"). It may also be useful to have a value that indicates that the snap only needs to be built once and will then consist of architecture-independent code that can be used on any architecture (like "Architecture: all"), although I don't know how common that situation is given Snappy's approach of bundling everything.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Core20 added build-on/build-for platform metadata in 2018, enabling CI to derive builds and build-for: [all] for architecture-independent snaps.
stealth/space-bunny-alpha — closed resolved Resolved by core20's 2018 `build-on`/`build-for` platform metadata, which supports multi-architecture CI and `build-for: [all]`.
stealth/space-bunny-alpha — closed stale Architecture build metadata was acknowledged as useful but left unimplemented and abandoned in Launchpad snapcraft#1533713; no resolving Snapcraft PR or commit was identified.
qwen/qwen3.6-35b-a3b — — Closed and abandoned. The maintainer acknowledged the request for architecture build metadata but redirected it to a Launchpad bug tracker without implementation. No changes were applied to snapcraft.
qwen/qwen3.6-35b-a3b — — Closed and redirected to Launchpad. The request to add build architecture metadata to snapcraft.yaml was acknowledged but never implemented. The feature was abandoned.
qwen/qwen3.6-35b-a3b — — Closed and redirected to a Launchpad bug. The maintainer agreed architecture build metadata for snapcraft.yaml would benefit store interactions, but the request was abandoned without implementation.
qwen3.6-35b-a3b-mtp-q6 — — Closed and abandoned. Developer redirected the feature request to a Launchpad bug tracker for external tracking. No architecture metadata was implemented in snapcraft.yaml.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#5606 schema: add build-for in architectures for core22 snapcraft merged Merged as c9822a38c via snapcraft#5606, adding build-for to the core22 architectures schema in snapcraft.json.
74%
#3821 meta: architectures snapcraft merged Merged core22 architecture support, including build-on/build-for handling, host and build-instance selection, and SNAPCRAFT_BUILD_FOR filtering, via commit 4876b53.
74%
#4150 meta: use build-for in snap.yaml architecture snapcraft merged Merged #4150 as 77d3454d: build-for: all now writes architectures: all to meta/snap.yaml instead of the build-on architecture, fixing CRAFT-1535.
72%
#1999580 core22: wrong arch in snap.yaml when building for all archs snapcraft (launchpad) closed Fixed in merged canonical/snapcraft#4150 (commit 77d3454d): core22 snap.yaml now records build-for (all) instead of the build-on architecture.
71%