Page 1 of 1

Is there a benefit to using a portable package like Flatpak over a package installed through APT?

Posted: Tue Oct 09, 2018 10:06 am
by manyroads
In case you have not seen this Q&A re: Flatpak/snap/appimage and the like. Enjoy. :lipsrsealed: Be advised: I do NOT have a dog in this fight. This not authored by me. :lipsrsealed:

Debating-package-formats asks: Is there a benefit to using a portable package like Flatpak over a package installed through APT? (see original article here: https://distrowatch.com/weekly.php?issue=20181008#qa)

DistroWatch answers: When we use a traditional package manager, such as the APT utilities, DNF or pacman, we are almost always using them to pull in packages which were provided by our distribution's developers. These packages were built specifically for our distribution and are built to work with the libraries and components of our operating system. This allows the individual packages to be small as they do not need extra support or compatibility tricks to make them work.

Flatpak packages, and other portable formats such as Snap and AppImage, bundle their dependencies together in one spot. This allows the Flatpak/Snap/AppImage package to run on virtually any version of any distribution which has the required framework (such as Flatpak) installed. This means the Flatpak package will likely be a lot larger as it needs to carry around its dependencies, but it means we should be able to transfer the package to another distribution and still have it work.

In short, portability is one of the main benefits, but there are some others. Distributions typically only ship one version of an application or library in their repositories. Sometimes trying to install an alternative version will break things on the system. Since portable packages bundle their dependencies and are kept separate from the rest of the operating system we can install any version of a Flatpak we like without breaking anything. This is especially useful if we are running a conservative distribution (such as CentOS or Debian) while wanting to run the latest version of an application that is not in the official repositories.

In other words, portable packages allow us to uncouple the end user application from the rest of the operating system and use a newer (or older) version of an application without upgrading or downgrading the entire distribution.

There are some potential downsides to portable packages. Apart from the size issue mentioned above, there are concerns about whether a package maintainer is keeping up with the security fixes in all the bundled dependencies. Official distribution repositories usually keep up with the latest bug fixes in shared libraries, but Flatpak bundles will also need to be updated with bug fixes separately. Users are at the mercy of portable package publishers to keep up to date with security fixes in all of a Flatpak's dependencies.

Finally, there is a question of vetting new software. Distribution packagers usually perform some basic tests on software to confirm it does what it says it will and does not introduce security holes. Portable packages often come pre-built from upstream publishers and the end-user must trust that the package behaves as expected without the benefit of any auditing.

Personally, I prefer to use the package provided by my distribution and only use a portable package if there is no suitable version available through the default software manager.

Re: Is there a benefit to using a portable package like Flatpak over a package installed through APT?

Posted: Tue Oct 09, 2018 10:21 am
by asqwerth
I agree with Dolphin's position in his blog post:

https://mxlinux.org/flatpak-application ... -installer

It's another option. But there are no guarantees it will always work well or integrate looks-wise, and I would prefer the packages from the distro's own repos.

The size thing is a big issue for me, since I multiboot and generally just give each distro a root partition of between 25-40GB. My data is in a large Data partition, so I never bothered to have big root partitions.

And of course, since Manjaro is my other main distro (like you; I've seen your posts on that forum!), I can always boot into Manjaro and run the latest version or a package or install from AUR if I really desperately need it. Most things I can get in MX though, so the newness of the package version is not such a big thing.

Re: Is there a benefit to using a portable package like Flatpak over a package installed through APT?

Posted: Tue Oct 09, 2018 10:40 am
by Jerry3904
I thought the DistroWatch response was well done, and agreed with its conclusions--which are those of DO and asqwerth, as it happens.

Re: Is there a benefit to using a portable package like Flatpak over a package installed through APT?

Posted: Tue Oct 09, 2018 10:56 am
by asqwerth
The biggest use of flatpak for me is in MX15/16, which being Debian Jessie-based was at gtk+ 3.14 only. Since I love Lollypop the music player but that can't be ported so far back, I use flatpak lollypop in MX15/16.

But in MX17 the lollypop package could be built and placed in the MX Repos, so I'm using that one.

Re: Is there a benefit to using a portable package like Flatpak over a package installed through APT?

Posted: Tue Oct 09, 2018 2:31 pm
by manyroads
@asqwerth I did see a great reason to recommend flatpak earlier today... where a Linux newbie wanted to try a lot of different office suites out. Seems like a great fit... try it, test it...and if you want to remove it all the cruff goes away when you remove it. But I agree with folks the bloat can get to be severe when you're dragging a bunch of dependencies around in a 'sealed container'. :bagoverhead:

Re: Is there a benefit to using a portable package like Flatpak over a package installed through APT?

Posted: Wed Oct 10, 2018 9:01 am
by stevedude