Hi, this is a post about standalone linux apps (the ones the title starts with) and how to do them the gentoo way (personally I use arch).
As a note aside, I do not think the support for these type of apps is first priority. After all, user-space linux is firstly about letting people share each other’s work (through system packages), and only after that - about being a recognized platform that all software vendors should have support for.
Nevertheless, a couple of years ago, when snap and flatpak started to emerge, I was curious about it and have listened to various talks at FOSDEM, GUADEC and so.
I learnt about the 3 technologies present in this title, also about nix/guix (that in principle can serve the same purposes but their usage has been on the server side mostly).
But I realised recently that there can be a simpler way for doing this, that is conceptually close to how a regular distro is organized. After a little of googling I found that the idea has already been implemented in Gentoo Prefix. The idea is you install software in some prefixed path like
/gentoo/prefix/ instead of
/. The prefix is a hardcoded path and does not ever change. I think they even use the same gentoo packages. You can use the software installed in prefix in any distro - the main requirement is fulfilled.
The prefixed approach has all advantages and drawbacks of a regular distro:
does not allow multiple versions of an app
which is not a problem, i think rolling release works well for apps. The users generally need just the latest version of your app. If the system has moved to a next snapshot in the testing channel you have enough time to fix the app if needed.
forces you to use specific versions of libraries (the latest stable, for example)
While being a restriction, this also means more consistency, easier and smaller updates, etc.
So, my question is - what do you think of Gentoo Prefix as a solution for cross-distro apps and why nobody is talking about it?