Future release to include Alpine Linux as snapd host?

Probably your first step is to build snapd from source for Alpine using their packaging system, you can take a look at the other distro packaging we have for snapd in the source tree @ https://github.com/snapcore/snapd/tree/master/packaging

After you have built it, then you’ll probably need to tackle these things in order:

  1. You need to setup snapd to run at boot (I assume Alpine has some sort of service capability)
  2. You either need to implement a new systemd backend which actually is not systemd but something else that supports writing out new service units which get treated with the same semantics that systemd does, this includes not just services which run at boot, but also mount units and probably other sorts of things too, and also taking note that we need services to use ordering, so we need to be able to write service units that say “start A after B”, etc. There’s a lot of features here so you will probably spend the bulk of your time here.
  3. You also will probably need to hunt down all the instances over the codebase of calling “systemctl” since we tend to use that extensively for getting the state of services and lots of other operations, and either refactor those to use some other tool to interact with the init system, or you need to write a wrapper systemctl shell script on your system which translates everything in between
  4. If you do manage to get this far with a working snapd that can install snaps with services, congratulations. I’m sure there’s probably more work to be done at this point too, but I don’t know yet. At this stage though you could start looking at adding Alpine as a system in our spread testing matrix and run our integration tests on Alpine to see what else you need to modify to get it fully supported
2 Likes