the original topic of this post was how to properly setup multi-architecture support. Not the specific syntax of the architecture field.
All i care about is having a single snap that runs on multiple architectures! I have the binaries built fine, but creating the package and its dependencies seem to be a nightmare.
To be clear, my issue was solved, but i still feel like i’ve just hacked everything together.
in my case, I am shipping binaries which feels like a secondary feature of snap. (since I have to deal with setting lib search paths manually)
A specific example / how-to guide on setting this up is what is needed given the state of the documentation and inconsistent functionality of snapcraft. For it to have any value to anyone it needs demonstration staging packages (libraries) used by the different architectures. I would also recommend showing arm based package staging since out of the box arm packages don’t seem to stage correctly on an amd64…
if you are changing the specification, please include the above/below scenario as a it seems like a typical use case for any multi-arch platform snap of moderate complexity
lets say we create a snap: “SnapPans”
I see 2 generalized cases for artifacts that are deployed with snap:
platform agnostic (content, source files, man pages, etc )
platform specific ( compiled binaries, shared libraries, packages)
I would structure it as follows:
anyone would just install it using: “snap install SnapPans”
Depending on the host architecture, it would run the binaries and use the lib search path for that architecture.
it could download everything, or just the binaries tagged common and specific to that architecture. The latter is just an optimization to be implemented at some point.
The other option is: I could create multiple snaps: SnapPans-arm64, SnapPans-armhf, SnapPans-i386
This is obviously feels like a hack, but given the current state of snapcraft, it is something I know would work.