Snaps are universal Linux packages
github.com
github.com
- Snappy
- FlatPak
- AppImage
- Nix
Snappy is an Ubuntu/Canonical project and FlatPak is a Fedora/RedHat/FreeDesktop project. Snappy and FlatPak are remarkably similar and kind of mirror the DEB/RPM spit. Nix and AppImage are independent.
AppImages resemble macOS's app bundles in that they can be run directly without installation. Snappy, FlatPak, and Nix need to install to a root directory, /snap, /var/lib/flatpak/, and /nix respectively. FlatPak and Snappy need a runtime daemon but Nix and AppImage don't.
AppImage, Snappy, and FlatPak include all of the dependencies in one package. Nix packages just include hash names and install as needed.
This isn't actually a good analogy, because Flatpak was designed from the ground-up to be vendor-neutral. For example, the "runtimes" that provide the virtual Linux distribution for applications to work in are built with packages and tools from the Linux Foundation's Yocto project. Similarly, the code is deliberately hosted on GitHub with no CLA so that all contributors are on neutral ground (there is at least one Debian developer involved). The main developer is a Red Hat employee, and could have used Fedora or CentOS packages, tools and infrastructure, but explicitly chose not to do that, to protect Flatpak's neutrality. He also builds Flatpak for Ubuntu, Arch and other distributions, so that people can freely use Flatpak on their systems even where it isn't currently supported by their distribution of choice.
> because Flatpak was designed from the ground-up to be vendor-neutral
As have all the others, hence the "distro-agnostic" part of Matthew's comment.Even if you look at the terms used : https://snapcraft.io/docs/core/store :
"The main way of distributing snaps to snapd systems is through the Ubuntu Store"
So indeed there is the "other store" section which mention you can host your own store but it's clearly not emphasized.
Even the term of Snap "store" vs Flatpack "repo" seems to indicates a more decentralized/agnostic direction of Flatpack.
On flatpak.org/apps.html you can see LibreOffice hosted by documentfoundation.org and MonoDevelop hosted by mono-project.com. They're not all hosted by their respective foundation/website, but still it kinda seems like it is the direction flatpack is pushing for.
So "technically" they all are distro-agnostic, but in terms of distribution system one is pushing for a centralized Canonical-hosted store while the other seems to be going towards a "each foundation will host their app"
Not sure about Snappy and FlatPak, but Nix can use any directory as its "root"; users can run it from somewhere in their home directory without any need for admin rights.
The downsides to doing that, compared to a global /nix directory, are a) waste of disk space if multiple users have Nix running from their home directories and b) having to build stuff locally, since the official binary caches are built with /nix as the root.
Also, there are other distro-agnostic package managers like 0install, Autopackage and Listaller; packagekit is arguably related, as it provides a distro-agnostic abstraction layer; systemd's "portable services" are another recent addition to this space.
In contrast, Snappy aims for much more "Package any app for every Linux desktop, server, cloud or device" https://snapcraft.io/
I cannot find how many packages they have currently. I hope that FlatPak has more than the 11 applications listed on the website. http://flatpak.org/apps.html
FlatPak does not provide a central repository, while Snap has https://uappexplorer.com/. After install flatpak, it takes three (!) commands (on cli) to install LibreOffice. http://flatpak.org/apps.html
Snap has stuff like pulseaudio (audio daemon) or ogre (rendering engine) in the repo. That seems weird, because these are not applications. The first belongs into the base system, the second into a development environment.
This is something I particularly like about FlatPack. I hope we can go towards a decentralized package distribution system where the app store just has a list of official flatpack repos. You update the latest Firefox from the repo at mozilla.org, the latest Blender from blender.org, etc... of course this needs mozilla, blender.org, etc... to package the app (but they already do it for win, mac and .deb anyway). So you always have the latest version and it is provided by the official website and not a central Canonical repo
You can install flatpaks locally without root.
This is why Debian has dominated Linux distros for decades. Debian's apt-get is a good package management system. Not perfect, not the best, but good. But, no one can compete with Debian for quality and quantity of well maintained packages.
Only time will tell if any of these next-gen package managers will succeed.
If you want a nice-from-first-principals approach to package management for desktop apps, Flatpak is the shit: it uses a Git-like distribution system that's specifically built for operating system size snapshots. You get to pick your underlying distribution (or roll your own) and the sandboxing mechanism just wraps around secomp-bfp so it stacks well with SELinux or AppArmor or whatever.
But now we are going to have yet-another-bifurcation of OSS solutions: RPM vs DEB, KDE vs GNOME, Wayland vs Mir.
Canonical, stop trying to be Apple, please.
Is security compatibility the primary advantage over docker? When I see these I always think, why not docker? Git like distribution, pick underlying / roll your own. I'm not sure why these are better than a docker or rkt.
[1] https://insights.ubuntu.com/2016/04/13/stephane-graber-lxd-2...
That might be XQuartz's fault rather than Docker's - I only tried on macOS.
The git-like version control available with docker or rkt (and apparently these package manager based systems too).
I love that they try to be Apple, before them only Mandrake and SuSE cared for what actually matters to desktop users.
As for "yet-another-bifurcation of OSS solutions", that is the nature of the game.
Isn't that what so many praise about FOSS?
Welcome to the UNIX wars, re-edited as GNU/Linux wars.
Source?
Snaps require AppArmor which is used by Ubuntu and openSUSE. This makes it harder to integrate Snaps into Red Had (SELinux) distros, but I wouldn't say that this is something RH does actively to cripple them.
Calling to attention about that is not anti-canonical trolling. It's avoiding creating a dependence on a third-party.
As for all the mentioned package/image managers, IMO they all bring more problems then solutions (except maybe nix). Dependency resolution brings sloppiness and keeping the programs dependencies up to date would kill the internets and hard drives (compared to a normal package manager). They should just build a build bot and amen (or just not do anything). The only "problem" they solve is proprietary program distribution, and that is solved by a Filesystem Hierarchy Standard (and fd.o) compliant installer such as MojoSetup (as used by GoG).
Edit: somebody answered to my doubts in a comment here https://news.ycombinator.com/item?id=13559060
You could call the broader community's refusal to adopt the Canonical solution NIH too, but my view is more that Canonical's shipped - but usually inferior for non-Ubuntu users - solutions prompt the community to stop trying to perfect their version's architecture and just polish and release it already.
And upstart maybe. And Unity.
Because they have their own stuff and no one else has, roughly speaking (there's no Fedora desktop environment, no RedHat init system, okay, now there's systemd, but that's seen as Lennart's not RH's, or whatever).
Also, it's mostly noise, don't take it too seriously.
How are they trying to force it on anyone?
I understand that there is a Canonical / Red Hat rivalry. But I think language like this adds more heat than light to the discussion which should really be about the merits of the different solutions.
That said, I will hand it to Fedora on ARM, where I use it quite extensively on dev boards.
- Loadable versions. We use lmod (https://www.tacc.utexas.edu/research-development/tacc-projec...), so we can provide multiple versions of software for end users to leverage (they run a command like 'module load sas/4'). The user's environment then gets modified appropriately. Can snap do something like that?
- Driver dependencies are annoying. For example, TensorFlow requiring a specific CUDA, the packages for which require a specific version of the nvidia driver.
If Snap could help with those issues, that would be great!
Snaps might be good for deploying big complex things. But in case of smaller "apps" like some featured in their site (VLC, Blender, Krita...) this seems like a lazy solution. Lazy because we loose control over knowing which libraries are running in our system.
For example, if there's a security issue with libssl, I can quickly patch my libssl instances with apt, pacman or whatever my system uses. But with snap?
I think the way forward is the nix way [1]. It's a bit harder, but it pays off. Some big HPCs use it already, and it seems to work quite well.
Of the ones I looked at NIX looks particularly promising, having dependencies based on checksums sounds pretty cool.
If you don't like that, you can install snaps from a local file (in which case you need to handle updates yourself), or run your own snap store (I think some assembly still required)
AppImages even more so then. For the end user though either are simpler and allow people to get up to date versions of their apps, which is difficult when using shared libraries. Plus Snaps are also cross-distro which saves a lot of work for authors.
Snap makes a distinction between a minimal set of critical core system dependencies, and application dependencies.
So on every system with a snap, there is also a 'core' snap, which has the base root fs, including glic, libssl, bash, etc. This core snap is updated regularly by its publisher (just Canonical's ubuntu core snap right now, but nothing stopping some other core snap). So a lot of critical updates are applied by default, as per normal distro policy, but just in a better way (rollback, transactional, qa, etc).
The application snap is only responsible for keeping its own dependencies up to date, it uses the base libraries from the core snap. It's distinct from docker in this way, it tries to define a line between core and app dependencies, to get the best of both worlds. I.E. critical components are updated ASAP by the disro security team, but apps are free to use a specific version of a library (e.g gnome, qt) that they want to use, rather than being stuck on the distro maintained version. Which, of course, they can still use if they want :)
It does push the burden on updating libraries to the app vendor, but on the flip side, snaps run in a very confined environment, which mitigates the scope of most CVEs there might be in an older library.
A lot of careful trade-offs considered and involved in the design - we'll see they're the right trade offs or not :)
And then as soon as an app decides to not use the base version of a library, it will still be vulnerable when you update the base snap, so you still need to check every app for updates. That's not an improvement at all.
Coincidence?
Anyway, it's not too hard to see why they have so many commits: https://github.com/snapcore/snapd/commits/master?after=Y3Vyc...
They're taking "make lots of tiny commits" advice to an almost comical extreme.
And they also have terrible commit messages.
What does Intel RealSense have to do with any of this?
Is it a GitHub bug, showing an issue from another repo?
Stackoverflow question: http://askubuntu.com/questions/787149/how-do-snap-packages-h...
From my understanding it is, in fact, a cross distro/cross version package manager.
To have something on GNU/Linux similar to what the mainstream desktop and mobile platforms already offer.
Yes, snaps make it so that the upstreams don't have to worry about repackaging their app for every distro. Just makes a snap and your app instantly works in a growing list of places: https://snapcraft.io/docs/core/install
But it also simplifies the work for distros. You don't need careful human review of every upload when you can trust that the app is adequately sandboxed. You don't turn away upstreams because your distro is frozen for release.
Much as I use Ubuntu myself, I find it sad that its success has created a high bar for smaller distros: the bulk of software vendors provide an Ubuntu-specific repo and nothing else (hello Spotify). Hopefully snaps will give distros broader reach and free them to innovate in more interesting areas.