121 points · by hydrot3k · 8y ago · 99 comments
Furthermore these metrics are amongst the least important when discussing "next gen" package managers. I am more interested in hearing about developer tools, sand-boxing capabilities, the update mechanism, OS support, private distribution, enterprise pricing. I don't care if one packaging system uses slightly more memory or whatever because of how it handles shared libraries, and if I do care I would still be interested in hearing what the trade off for that increased memory usage is.
These are the actual sizes for these snaps:
$ snap info vlc | grep stable:
stable: 3.0.4 (555) 204MB -
$ snap info libreoffice | grep stable:
stable: 6.1.2.1 (86) 501MB -
$ snap info gimp | grep stable:
stable: 2.10.6 (47) 192MB -From what I could understand, placing the update process under the control of snap app developers - rather that device owners - is deliberate design decision.
At least Arch and Alpine has a simple and human readable PKGBUILD format that only takes 15 minutes to understand and update your own packages. They have up-to-date packages for pretty much everything, even though Debian and Ubuntu have been around longer.
I'm all for containerizing a Linux distro, and think it is a great idea, but Canonical hasn't exactly proven to be the best at this. Right before Ian Murdock passed while working at Docker, he didn't have many positive things to say about Canonical and their leadership. Most reviews on Glassdoor also talk about the poor leadership there. Therefore I see no reason to use Snap at this time.
https://forum.snapcraft.io/t/disabling-automatic-refresh-for...
For those that understandably won't want to go through it all, the short version is that by design snaps will force the update eventually, so that a system isn't simply left behind, but since snapd came out a few years ago we've been constantly working on multiple methods to offer control over when exactly the update takes place. These are features such as:
- Fine scheduling of updates (https://forum.snapcraft.io/t/refresh-scheduling-on-specific-...)
- Disabling over metered connections (https://forum.snapcraft.io/t/snap-refresh-over-metered-conne...)
- Holding of refreshes after boot (https://forum.snapcraft.io/t/delaying-refreshes-and-registra...)
- Manual delaying of updates (can't find topic)
So, the goal is actually to offer control, but we are indeed trying to prevent systems from getting out of date for good. Maybe that's a bad idea, and if it turns out to be we can change that in the future, but we've been making an honest effort to try to fix the problems of automatic updates instead of simply giving up. Once we give up, there's no going back since the dynamics around package updates will change. We have plenty of experience around these aspects with the traditional systems.
The ability to pin at specific version is needed not just because, but for multitude of reason: the newer version breaks something, or you have only license for up to certain version (think non-subscription Jetbrains products), etc.
The inability to disable updates removes that packaging system from further consideration. It is a showstopper.
You think? Someone saw all the complaints about Windows 10's forced updates and thought "we should totally do that too"? Seriously?
[1]https://community.spotify.com/t5/Desktop-Linux/Linux-client-...
Flatpak has been good when I've used it; it works more similarly to how apt functions, and seems to need less faffing to get going on my system.
Snap is almost good. I found the documentation for how to actually make snaps incredibly frustrating (hard to explain, it was like lots of little steps were missing) and I find the permissions model with them more awkward. I tried installing Gitea on my home server via snap the other day, and promptly got annoyed enough to just give up, as I wasn't that invested in it.
Example when you launch i3-dmenu-desktop instead of dmenu_run.
As an aside I suggest you check out rofi. Its a better looking, more featureful alternative to dmenu. Compared to dmenu it offers
-Themes
-The option to show as a window in the middle of the screen or dmenu style at the bottom/top
-Optional icons
-slightly faster at showing apps vs binaries compared to i3-dmenu-desktop
-Configurable hotkeys
-The ability to launch a typed command in a terminal with a hotkey
-The ability to launch a typed command as is or complete from a history much like a shell history. Example I have it set to run as is with Enter or complete first choice for history with control+Enter
-A built in tool to list/switch windows, select from a list of applications like i3-dmenu-desktop, list available ssh connections
https://build.i3wm.org/docs/i3-dmenu-desktop.html#DESCRIPTIO...
For myself, I've only needed to use AppImage once, and that's for a program that I only bother using from a terminal anyway; other than not showing up in dmenu out-of-the-box, I haven't had any other complaints.
I understand that this situation is problematic with vendors who want to distribute their apps. But to me it feels like that the packaging situation has always been an excuse for them to drop Linux support.
If they consider desktop Linux supported during development, providing a couple statically linked deb and rpm files is no big deal. And a lot of vendors are doing that nowadays.
Sandboxing would've been nice for sure. But again, I don't have a security problem with my Linux Desktop as of right now.
well, yes it is, because it only covers two families of distros over many. I develop a software with a fairly small niche and you wouldn't believe the weird distros on which people test it. With the AppImage, everyone is happy - and also the software can be installed without administrative permissions which is fairly useful when you want to use it in a class room without having to spend a week with the local system administrators to get the .deb deployed and just have the students download the AppImage and execute it.
There's also the issue of dependencies on other non-default packages. Do you ask the user to install another repository? Do you host your own repository and distribute the dependent packages in it along with yours? (Note this is much more complex than building and hosting a single .deb/.rpm)
Not to mention "desktop Linux" is not a thing. Supporting Fedora, Ubuntu and opensuse, for example, are all distinct efforts with only minimal overlap in terms of effort (think not just initial dev, but ongoing maintenance and testing).
You can have static linked Deb's and RPM's as well. That's what most of the vendor-provided deb's and rpm's do.
They usually use dynamic linking, but then ship those dynamically linked libraries in the package.
This has the advantage that the user can still replace the libraries if they want (e.g. for games this is sometimes useful to replace the sdl build with one with more options enabled), and I've heard rumblings that the support for static linking on linux isn't all that great.
Sure, you can do static linking, you just don't have to and this is not how snaps work.
Many developers don't have the resources to go through the whole process needed to get their app into the distro repo. In that case, I'd consider these package formats better than deb and rpm.
After your user adds your repo updates will be handled automatically with the rest of the system and installs can be done in the same software management gui as anything else.
Matthew Garrett (who does internal Linux desktop security at Google) gave a great talk at GUADEC about the current state of Linux desktops: https://www.youtube.com/watch?v=DUa-nnjjQcc
TLDR: It's not good. User-level processes have free, unrestricted access to all of your data, unless you use Wayland and desktop containerization.
[1] https://github.com/AppImage/AppImageKit/wiki/Similar-project...
Treating "Can run without sandboxing" as a feature is dubious.
$ snap info vlc | grep stable:
stable: 3.0.4 (555) 204MB -
$ snap info libreoffice | grep stable:
stable: 6.1.2.1 (86) 501MB -
$ snap info gimp | grep stable:
stable: 2.10.6 (47) 192MB -The app I'm working on, Polar (https://getpolarized.io/) is a cross platform document repository. The Windows and MacOS builds are pretty straight forward.
But with Linux I now have Appimage, deb, rpm, snap, flatpak, and of course tar.gz (but maybe that doesn't count).
I haven't used Flatpak but Snap is quite annoying and it was one of the reasons I switched from Ubuntu to Debian. Even if you unininstall snapd in Ubuntu 18 you are still stuck with the annoying mount points. That and the auto-updates.
For some reason the application is not automatically in my path after installation. That’s enough for me to go back to apt, and unfortunately Polarized is collateral damage.
I preferred installing from a ‘repo’ which updates my software automatically, something it seems that your deb does not do.
Wow, tough customer! I have resigned myself to the need to do the equivalent of `dpkg -L | grep /bin/` to discover where the binaries are.
I was hoping for something interesting about the technical tradeoffs between the three formats and why I might want to have Fedora support Snap in the future (or why I might not to), etc.
Interesting to read the other comments and discover that Flatpak's really oriented towards desktop software only. I didn't know that.
I see nothing special about package managers that makes competition undesirable. I think creativity and competition are good for package managers. Besides why does an upstream dev need to maintain these new formats? They can choose to support whatever they want.
Personally I don't understand why this is a big deal. Any fragmentation is the result of reasonable people disagreeing on the best approach. The plethora of different ideas is a feature of the ecosystem not a bug.
Android had to lock it down almost completely to gain acceptance.
If that was the goal, why not just distribute statically-linked binaries or distribute into /opt package prefixes, which would be the natural solution? I guess there's no problem that can't be solved by another layer of abstraction, except the problem of too many layers of abstractions. Again, https://xkcd.com/927/ comes to mind.
Flatpak and AppImage aren't limited in this fashion, but have few packaged apps, and they're generally all the apps I already have access to.
In practice, I've found Guix, Nix, and Docker to be most useful solutions to missing/outdated apps, though these are more complicated than Snap, Flatpak, or AppImage.
A more serious issue with snaps is that they rely on AppArmor as a security mechanism, which is not actually present on most Linux systems (only Ubuntu variants, SUSE and Solus). The snaps will still run elsewhere, but not with the same security as you might think you were getting.
It can't, because AppArmor is a kernel-level feature that also requires some level of integration into the rest of the distribution. Red Hat/Fedora-based distributions already use SELinux in place of AppArmor, so using snap on those systems can't have full security capabilities (making SELinux and snap work together would be non-trivial, and I don't think anyone is motivated to do it).
Flatpak uses other mechanisms for limiting the access that applications have, so does not rely on either AppArmor or SELinux being on the host system.
> Almost all popular applications on flathub come with filesystem=host, filesystem=home or device=all permissions, that is, write permissions to the user home directory (and more), this effectively means that all it takes to "escape the sandbox" is echo download_and_execute_evil >> ~/.bashrc. That's it.
> To make matters worse, the users are misled to believe the apps run sandboxed. For all these apps flatpak shows a reassuring "sandbox" icon when installing the app (things do not get much better even when installing in the command line - you need to know flatpak internals to understand the warnings).
I have not used flatpack. Is this description accurate? Also:
> Up until 0.8.7 all it took to get root on the host was to install a flatpak package that contains a suid binary (flatpaks are installed to /var/lib/flatpak on your host system). Again, could this be any easier? A high severity CVE-2017-9780 (CVSS Score 7.2) has indeed been assigned to this vulnerability. Flatpak developers consider this a minor security issue.
If I remember well the second argument was about update not being frequent enough.
So nothing fundamentally about Flatpak but more about the infrastructure (lack of updates) and the use of it (we should not allow home access and use Portals or we should disable bashrc).
Says who? The purpose of a home directory to contain user-specific files including executables. Developers compile their software and write their scripts in their home directory. Even if we made the absurd decision that no file may be executed from the directory, there are many ways to cause harm by simply editing user-specific configuration files (e.g. in ~/.config).
Arguing that the problem is with executables in $HOME rather than Flatpak is incredibly delusional.