Sunday, 10 June 2018

Linux Solutions: Snappy, Flatpak, and AppImage

It wasn't all that long ago the idea of binary packages were seen as salvation from having to compile software packages for one's Linux system.

In 2018, we've jumped ahead even further, with distro independent package installation solutions. In this article, we're going to look into three rising stars in this area: Snappy, Flatpak and AppImage.

AppImage is a software disk image that just works

I'm a huge fan of AppImage as you simply make the individual application you wish to run executable, then double click it. AppImages are just that simple. According to their website, the idea is that you get the software directly from the author of said program. Using the AppImage format, installing an application can feel similar to how one might do it with Windows.

The advantage of running an AppImage is that there is no need for sudo, root or even the need to be bothered with system dependencies. You're basically mounting a disk image, similar to how one might mount disk images in OS X.

Perhaps the biggest advantage to running AppImages is that you're running an application that can be removed by simply deleting a single file. This single file/disk image approach is both great and a hardship depending on how you look at it. AppImages are great in that they're easily distributed and simple to run.

The downside of AppImages are that even when you get the software directly from the author's website, you still don't really know if the application has been tampered with. This problem of trusting software is best demonstrated with what happened to OS X users and the application known as Transmission. This application allowed ransomware to infect those individuals who ran the application on their Macs.

So as much as I like AppImages, I take issue with the bold print statement that AppImages are to be trusted absolutely. Fact is, they're just disk images and instead we need to trust the distributor of each individual AppImage. Thankfully if one chooses to run an AppImage within a sandbox, this prevents things from getting out of hand should the downloaded AppImage become exploited on the source website.

Flatpak provides isolated runtimes

Updates and applications installed by Flatpak are handled by individual runtimes. The idea is that this provides more streamlined package handling than running typical Linux package updates. Now here's where Flatpak shines - it's designed for desktop Linux distros. So the applications that are distributed with Flatpaks are going to be designed for desktop Linux users. This is a characteristic also found with AppImages, however Flatpaks differ in that they allow for individual application updates.

Flatpaks share similarities with Ubuntu PPAs in that they're using individual repositories for application installation and updates. I'll be first to admit that I honestly don't love this element of Flatpaks as it's time consuming to have to chase down individual repos. On the positive side, however, it does provide a better system for installation/updates as it's distro independent.

Another consideration is that installing the framework for Flatpaks requires the installation of needed components to make the Flatpak available software installable. The irony takes place with distros such as Ubuntu whereas you must add an Ubuntu PPA for the Flatpak framework. In short, install a PPA repository to install a framework to install Flatpak repositories. While it's not difficult to do this, it is a bit redundant.

The benefit of running Flatpak installed applications is that you can run the latest software on any distro you choose. Additionally, to curb the headache of seeking out individual Flatpak repos, Flathub's Application section makes finding software easy.

Flathub provides the ability locate software in one location, even though historically Flatpaks aren't located in a singular location. It's actually a great idea and it makes using Flatpaks a lot more appealing. Perhaps most importantly, Flathub's software categories are packed full of tons of software to choose from.

To repeat an item from above: Like AppImages, Flatpaks are designed for Linux desktops. This is an important consideration as we roll into the next section of this article.

Snap Packages are a compressed file system

Snap packages are a packaging concept created by Canonical and designed for Linux and IoT (internet of things). When you arrive at the Snapcraft website the first impression you find yourself with is that Snaps put the developer ahead of the end user. I don't mean that as a negative statement, however the Snaps web presence backs up my statement completely. The two buttons on the front page are "Build your first snap" and "Get started using Github."

Both button links mentioned above assume you're a developer. This differs substantially from the front page of the Flatpak. The Flatpak front page is dedicated to getting Flatpak software onto the PCs of end users. Snaps only offers end user solutions if you look to the very top navigation bar and click on store. Once you click the store link, you're presented with available Snaps to install onto target PCs and servers.

Snaps also share similarities with AppImage in that you're mounting a software image vs installing software. Another benefit with Snaps is being able to roll back to an earlier version of software. Additionally, updates are made easy since Snaps share a single repository.

The biggest downside some people find with Snaps is the fact it provides a centralized packaging format that Canonical controls. Granted, Snaps are available across multiple distros, but the control of available Snaps remains in a single location. It's also worth noting that notable open and closed source software is welcome in Snap's repository.

One last important point with Snaps is that they're not limited to the Linux desktop as I mentioned previously. They're also designed to provide packaging solutions for IoT (internet of things). This is the biggest difference between Snaps and both Flatpak and AppImage. Snaps are heavily focused on IoT with Linux being an added bonus.

Which packaging type is best for Linux?

After looking at the differences and advantages of each packaging type mentioned above, we're left wondering which one is best. In terms of simplicity, I'd argue that AppImage wins this one. But if you want to be able to update your software using one of these packaging formats, then Flatpak or Snaps make more sense.

One approach might be to try out each of them and see which packaging type has the user experience and the software titles you're looking for.

What say you? Do you have a preference? If so, what is your rationale as to your choice of software packaging. Hit the Comments, let's hear your perspective.



Read the full article here by Datamation.com

No comments: