The universal package is the future of Linux and both Canonical and Red Hat have their own take. Which is the better solution? Or should there be a third?
Canonical recently unleashed Universal Snap Packages onto the world. The announcement was huge. Especially considering they'd worked with other distributions who were all ready to accept Canonical's offering.
Only that never really happened.
It came out later (thanks to one of the Red Hat developers), that:
"The sum total of communication between Canonical and Fedora before the release of this press release was that they mailed us asking about the process of packaging snappy for Fedora, and we told them about the main packaging process and COPR. They certainly did not in any way inform Fedora that they were going to send out a press release strongly implying that Fedora, along with every other distro in the world, was now a happy traveler on the Snappy bandwagon."
So many of us were fooled by Canonical's claim of universality. However, that does not detract from how impressive Snap Packages are. On Ubuntu, you can be up and running with Snappy with a single command:
sudo apt-get install snappy
This will install all the required dependencies necessary for Snappy to function. Next, to install a snap package, you simply have to issue a command like:
sudo snap install docker
The Docker snap package will install and be ready to run.
That's Snappy Packages in a nutshell. But what about that universality? That was a bit of a stretch on the part of Canonical.
It doesn't really matter though. Why? Because yet another universal packaging system has arrived.
Actually it's just a rebranding of GNOME's sandboxing technology, xdg-app.
Ladies and gents, I give you Flatpak.
Before you get to excited, let me outline to you how Flatpak works. Flatpak works like Snappy: Packages are distributed as apps with bundled runtimes that make them cross-distribution. In theory it sounds great. And if what they have to offer is as easy to use as Snappy, this could get really exciting.
However, what I've experienced of Flatpak isn't nearly as user-friendly as Snap Packages. Let me walk you through the process of using Flatpak. I installed Flatpak on Ubuntu with the following commands:
- sudo add-apt-repository ppa:alexlarsson/flatpak
- sudo apt update
- sudo apt install flatpak
Once installed, here's the process for installing a Flatpak package:
- wget https://sdk.gnome.org/keys/gnome-sdk.gpg
- flatpak remote-add —gpg-import=gnome-sdk.gpg gnome https://sdk.gnome.org/repo/
- flatpak remote-add —gpg-import=gnome-sdk.gpg gnome-apps https://sdk.gnome.org/repo-apps/
Install a runtime with the command:
flatpak install gnome org.gnome.Platform 3.20
Install an app:
flatpak install gnome-apps org.gnome.gedit stable
I can already hear what you're saying. "But you installed it on Ubuntu and not Fedora!" Well, Flatpak is supposed to be a universal packaging system. And it is. Bravo to the the developers for getting their system to work on Ubuntu. That is certainly much more than Canonical can say about Snap. At the moment, one cannot call Snap a "universal" packaging system, as it only runs on a handful of distributions.
I'll get to that in a moment.
Considering the process of using Flatpak is the same on all distributions, you can see how Flatpak has a way to go before it'll be accepted as "universal". By that I mean, it needs to be streamlined. Should the developers of Flatpak simplify the process, they'll have something seriously universal on their hands. At the moment you can use the GNOME Software tool in conjunction with Flatpak, but you still have to go through the initial process of adding Flatpak repositories and runtimes.
What does this all mean?
It seems like a convoluted mess. On one hand you have the incredibly simple Snap Packages that are limited to certain distributions.
Or is it?
You can actually install Snap on Fedora. How you say? It's a bit more complex than installing a standard application. Here are the commands:
- dnf install 'dnf-command(copr)'
- dnf copr enable zyga/snapcore
- dnf update
- dnf install snapd
Once you've done that, you must set SELinux into permissive mode by opening the /etc/selinux/config file and changing the line SELINUX=enabled to SELINUX=permissive. Reboot your system and you can now install snaps with the usual process.
In the end, here's what we have:
- Flatpak that can be very easily installed on any distribution and, with a bit of command line prowess, install packages.
- Snap can, with effort, be installed on most distributions and, with incredible ease, install packages.
See how that works?
The conclusion to draw
It's the future of Linux.
All we need now is to come together for a single, simple solution to make this truly universal. Linux is incredibly close to doing something no other platform has done. The only thing in its way is itself. I say it's time to pull together and create a single, universal packaging system that not only has the true universality of Flatpak, but the ease of Snap. That, my friends, would be truly impressive.
We could call it Snappak or Packy.