Goodbye rpm and deb. Hello Snaps!

Cross-distribution support for Snaps will turn the fragmented Linux desktop into one big platform.

mark

Mark Shuttleworth

Credit: Swapnil Bhartiya

Mark Shuttleworth today announced that Snaps, a new method Canonical developed for packaging applications is coming to other distributions.

A brief history of Linux's packaging mess

Unlike Mac or Windows Linux applications share the same libraries across the system and the main job of a package manager is to to find dependencies (libraries) needed by the application to install it.

Linux distributions are mainly divided into two packaging formats: rpm and deb. Distributions like Red Hat Enterprise Linux, SUSE Enterprise Linux, openSUSE, Fedora and CentOS are based on rpm, while the Debian family, including Ubuntu, Linux Mint, elementary OS are based on deb. And there are many other distributions that have their own package formats.

That causes three major problems for app developers and Linux users:

1: Developers can’t take advantage of the latest libraries and offer more features to their users if the distribution is still using older libraries.

2: Developers have to write and maintain apps for different distributions as well as different versions of a single distribution because they all are using different versions of libraries.

3: Mixing libraries leads to broken systems, so those Linux users who often live on the bleeding edge are continuously fixing their systems.

In a nutshell, the Linux desktop is a mess.

Even Linus Torvalds is not fan of this approach. For a long time he didn’t offer executables (binaries) of his SubSurface software for the Linux desktop even though he does offer binaries for Mac OS X and Windows. Using Debian as an example, he said, “…you don’t make binaries for Debian stable because Debian stable has libraries that are so old that anything that was built in the last century doesn’t work.”

As Dirk Hohndel, the maintainer of SubSurface, explained, “The current situation with dozens of distributions, each with different rules, each with different versions of different libraries, some with certain libraries missing, each with different packaging tools and packaging formats... that basically tells app developers 'go away, focus on platforms that care about applications'.”

Is Snaps the answer Linux is looking for?

Snaps initially started off as Click, a new packaging format for Ubuntu Mobile. It bundled all dependencies and libraries so that developers didn’t have to worry about dependency resolution.

Click evolved into Snaps, which targeted servers, Internet of Things (IoT) devices and desktop. This April, Canonical brought Snaps to the desktop world with the release of Ubuntu 16.04.

Snaps' arrival on desktop got attention from different communities and developers started asking Canonical if they can port it to their distribution. “That was surprising as Snaps were tied in with Ubuntu Core, an Ubuntu distribution where the whole system  was a Snap.” Shuttleworth told me during the media call. “When community members of other distributions asked about porting Snaps to their distribution we started working with them.”

Since Snaps was tied to Ubuntu, Canonical worked with developers from Gentoo, Fedora and Arch Linux to generalize some aspects of Snaps and create hooks for different distributions. Snaps now works natively on Arch, Debian, Fedora, Kubuntu, Lubuntu, Ubuntu GNOME, Ubuntu Kylin, Ubuntu MATE, Ubuntu Unity, and Xubuntu.

That leaves out many other major distros but Canonical is working on validating Snaps on CentOS, Elementary, Gentoo, Mint, OpenSUSE, OpenWrt and RHEL.

The future according to Snaps

With Snaps, the Linux desktop will become one huge platform similar to macOS and Windows. App developers will have to write their app once and it will run on every Linux distribution.

That’s not all. Snaps also brings much-needed security to the Linux desktop as Snaps are sandboxed and containerized and don’t have system-wide access. Another advantage of Snaps is easier and quicker distribution of apps. Since developers don’t have to worry about system libraries, as soon as new versions of their apps are ready they can push them through repositories and users can install them instantly.

As someone who has been covering Snaps since the Click days, and someone who cringes every time he can’t install the latest software on his Linux box, I am very excited about cross-distribution support for Snaps.

I hope the Linux community will come together and move away from .deb and .rpm and adopt Snaps as the default package format for their apps.

Let me know what you think about it.

This article is published as part of the IDG Contributor Network. Want to Join?

To comment on this article and other CIO content, visit us on Facebook, LinkedIn or Twitter.
Related:
Download the CIO Nov/Dec 2016 Digital Magazine
Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.