sir_reginald, (edited )
@sir_reginald@lemmy.world avatar

Your options are reduced to the following:

Flatpak

Linux only package manager that works across distros. It supports sandboxing via bubblewrap, but be cautious because by default most programs in Flathub are not as sandboxed as they should. You can host your own repository but it is heavily centralized towards Flathub, controlled by Red Hat, IBM.

Flatpak uses OSTree to distribute and deploy data. The repositories it uses are OSTree repositories and can be manipulated with the ostree utility. Installed runtimes and applications are OSTree checkouts.

AppImage

You’re basically packaging your program and every single dependency up to the C library. Linux only.

An AppImage is basically a self-mounting disk image that contains an application and everything the application needs to run on the target systems

source (incredibly biased towards AppImage)

Snap

Canonical’s take at flatpaks. They are quite similar, but snaps use AppArmor instead of bubblewrap and the server is proprietary, so an inferior option and should be avoided. The only “advantage” is that it’s used by default in Ubuntu.

Nix/Guix

multi distro package manager with reproducible builds support, more akin to a traditional package manager (eg apt)

Snappy and Flatpak talk about how they make library versions work better together and blabla and how they solve a lot of issues but that’s just a praetext, the real elephant in the room is that they are a big wink to proprietary software, they were designed for that, they just can’t say it so they focus on other things in their PR statements.

How Nix and Guix work is that they are traditional “package managers” as such the user or the distributor must have access to the source code to compile it into a package, the interesting difference is that it is capable of keeping library versions apart and will automatically share libraries if they are exactly the same. But packaging still occurs downstream, not upstream.

Snappy and Flatpak allow packaging to occur completely upstream at the developers side, which means they no longer have to cough up source code to whomever who will package. Which leads to an inferior solution to the user with far higher memory and storage consumption.

source

Pkgsrc

this one is something in between Nix and traditional package managers. It’s main advantage is that it works in other UNIX-like OSs, like FreeBSD, NetBSD, IllumOS as well as in Linux. The only not Linux specific option in this list (other than docker, which is not a package manager but a container)

Docker

I wouldn’t recommend this one, since it requires packaging a whole OS that creates a lot of overhead. And it can be tricky to use with GUI programs.

Overall, I think that Nix/Guix present the most advantages, with Pkgsrc being a less known close second and Flatpak being in the third position due to it’s relative popularity and overall advantages over snaps and docker. Docker might be decent option if it’s a program designed for servers, tho.

I’d also recommend that you add your program to the AUR, because even if it only works on Arch and Arch based distros, it’s incredibly easy to do and maintain as long as the building of your program doesn’t change drastically between versions.

Edit: formatting

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #