this post was submitted on 16 Jul 2023
11 points (100.0% liked)

Linux

2 readers
1 users here now

founded 2 years ago
 

TLDR at bottom.

On most linux forums, it seems that everyone is trash talking flatpaks, snaps, docker, and other containerized packages with the statement that they are "pre-compiled". Is there a real-world affect that this has with performance and/or security, and does this have to do with canonical and/or redhat leaving a bad taste in people's mouths due to previous scandals?

Also, it is easier for the developer to maintain only one version of the package for every user. All of the dependencies come with the package meaning that there aren't distro-specific problems and everything "just works" out of the box.

I understand that this also makes the flatpaks larger, but there is deduplication that shrinks them as you install more by re-using libraries. Do the drawbacks of a slightly larger initial disk usage really outweigh all of its advantages?

I have heard that flatpaks are slower than distro-specific compiled binaries but haven't seen a case where this affects performance in the real world.

TLDR: In most forums linux users tend to take the side of distro-specific packages without an explanation as to why.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 15 points 1 year ago* (last edited 1 year ago) (3 children)

There are a few obvious security implications with the rise of containerized packaging. One of the first is the move away from true centralized, least trust packaging. With traditional packages, you are trusting your distro maintainer (be it Debian, Canonical, RedHat, Arch, SUSE, etc.) To provide patched versions of software from their trusted repository mirrors to your computer. This does a few things like limiting the amount of places that you need to download software binaries from, as well as having other potential benefits like checksum validation on downloaded packages.

Most containerized package platforms including Docker, Snap, Flatpak tend to have a centralized set of repository mirrors, but anyone may compile and publish their own software to it. Flatpak is kind of the exception to this. Some distros (i.e. Fedora) publish their own sets of repos with flatpak packages. This is because Flatpak allows for more than one source repo for packages. I do believe Docker, Podman allow for the same as well. Snap infamously doesn't allow any repos other than Canonical's proprietary community repo.

Most of these containerized packages solutions also offer varying levels of sandboxing, which is a good set of security features that could benefit individual hosts from potentially vulnerable software. One could argue that flatpaking Firefox or other browsers and jailing them to limited capabilities and filesystem access is a good thing given the potential for malware propagation through such applications.

In particular though, most containerized solutions aren't generally hated by online user communities except Snap, which has both been among the most restrictive as well as furthest behind in features, performance parity, and general user experience. Snap was for the longest time significantly far behind Flatpak for user land applications and still wouldn't be my first choice for server applications compared to Podman or Docker due to just not being nearly as flexible as the other two.

The performance of the platforms can vary compared to native. For the desktop-oriented platforms (Snap, Flatpak) they generally perform insignificantly different from native packages, although Snap packages that are built compressed have had horrific IO performance for the loading of package files (leading to atrociously slow startup times of applications in the past). This is supposedly better now, though I have no intention of installing Snapd to find out.

As a note for culture, people particularly also dislike Snap because of how badly Ubuntu (Canonical's Linux distro) is depending on it, including having Snap automatically reinstall after removal and dropping many packages from apt only to throw redirects in to pull the snap package when requested from apt. This is why de-snapped derivatives of Ubuntu are also popular.

As for package sizes, they tend to be a bit bigger than native, as well as the added cost of a second set of libraries. Many users online don't get the 'why' when their first package from Flatpak is nearly a 3 GiB download, despite the following packages will hardly be any different in size from native packages. In a way, these packaging solutions do remove an advantage of the singular set of libraries. If you use netbooks, SBCs, IoT devices, or other similar minimal storage devices, you might feel this impact. However most systems will only have a marginal increase of storage utilization overall from a second set of libraries being installed.

[–] [email protected] 6 points 1 year ago* (last edited 1 year ago) (2 children)

I'll add my 2 cents to your very well written comment.

My biggest gripe with flatpaks notably, is the more difficult integration into the system. I use about a dozen flatpaks, and for every single one I had to tinker with flatseal to give them the correct access permissions, that I had to research online. One specific flatpak coulnd't even work with those additional permissions. Half of those flatlaks also will not follow my system theme and their GUI looks broken or out of place.

[–] [email protected] 1 points 1 year ago

Half of those flatlaks also will not follow my system theme and their GUI looks broken or out of place.

This always struck me as weird: the entire point of flatpak is to be isolated and not integrate into your system, why would you expect it to integrate with your theme?

I know they try anyway, but it just seems like a conceptual problem to me. They want to solve packaging by pretending it doesn't exist.

load more comments (1 replies)
load more comments (1 replies)