How to use Ubuntu 22.10 packages in a Snap?

I’ve got a GTK4 application I’d like to package up as a Snap, but it requires the version present in 22.10 as the version in 22.04 is too old to use.

It doesn’t look like there’s a core22.10 base though, so what would be the best approach if I need to pull in packages from Ubuntu 22.10?

EDIT: Invalid answer, I didn’t remember that the package-repositories is not scoped to specific packages.


I think you can achieve this by adding the 22.10 package repository in your snapcraft.yaml as described in the docs:

Haven’t tried this myself, so maybe someone more experienced can chime in on the implications. You probably want to watch out for subtle version inconsistencies, especially if you pull in the GNOME platform extension.

Snaps do only support LTS releases.

If you would blindly add a non LTS repository at build time you will get libraries linked against the wrong libc and pull in lots of incompatible dependencies… you could either use a PPA and backport all your required packages to 22.04 or build the libs from source in a part of your snapcraft.yaml

If it’s the main application that’s only in 22.10, you can build it from the upstream sources (which is always an option even if you have the same application in the 22.04 archives – if you build it from sources you can update it as new versions are released instead of being limited to what the distribution offers).