I've created a small snap package that contains no compiled architecture dependent code. When I build the package it ends up named like ..._amd64.snap
, but there is no reason why the program within the snap couldn't run on any other architecture.
So is there a way I can build the snap so it can be installed on any architecture?
Best Answer
Searching around a bit, I found the solution in the packaging for the
classic
snap. Edit thesnapcraft.yaml
file, and add the following at the top level:Now when building the snap, the resulting file name will be
..._all.snap
, and the architecture inprime/meta/snap.yaml
will also be set toall
rather than the build system's architecture.The resulting snap can be installed on any system regardless of its architecture.