I am trying to write installation instructions for users of my snap and want to include a step ensuring that they have an updated version of snapd since we’ve hit some issues where people have an older version. Is having them install the
core snap the best way to do this now and going forward?
My understanding is the core snap is currently based on Ubuntu 16.04 and bundles snapd. Is there a plan for how this will change in the future as Ubuntu 16.04 reaches its end-of-life?
I considered telling users to install the snapd snap, but this doesn’t work on Debian.
Well, the hope would be that the native distro packaging of snapd in Debian, etc. would be new enough to allow directly installing snapd, but if that is not the case (i.e. I see that in debian we have snapd 2.39 which is too old to allow directly installing the snapd snap I think), then the best strategy would be:
- Update snapd as new as possible using traditional linux distro packaging methods (i.e. debs, rpms)
- Try installing the snapd snap
- If installing the snapd snap fails, install first the core snap
- After installing the core snap, install the snapd snap
At this point the user’s system will be setup to get snapd from the snapd snap which will continue to be maintained perpetually, as it is independent of the Ubuntu releases. The hope would be that eventually places like Debian get a new enough snapd such that nobody ever makes it to step 3 in the above process.
The plan has already been put in place, which is that snapd has been split into it’s own snap, the “snapd” snap as you noticed, and base snaps are now independent of snapd, so we have the core (16.04 based), core18 (18.04 based) and core20 (20.04 based) base snaps (with core still being special and bundling snapd).
Thanks for the detailed explanation!
What if we just tell our users to install the
core snap? I understand it’s larger than the
snapd snap and many of them could get away with just using the
snapd snap, but are there any other downsides? Is there a plan to break
snap install core in the future? Will users who only installed the
core snap and not the
snapd snap stop getting updates at some point?
The only real downsides are that they will end up downloading more data than if they only had the snapd snap installed, and that they will use slightly more disk space than if they just installed the snapd snap as well. We will continue to support users with just the core snap until we implement an automatic migration for those users to the snapd snap.
No we will never break that. Eventually we plan on removing snapd from the core snap and migrating everyone to use the snapd snap instead for bandwidth/disk space reasons, but this plan will include automatically installing the snapd snap when the core snap is installed, so installing the core snap will continue to always work.
Perfect. Thanks again for your help!