Last update: October 31, 2018
In recent years, three different distribution independent package formats have gained a lot of popularity. There are already a few Linux distributions like Endless OS and Fedora Silverblue that depend solely on distribution independent packages to run desktop applications. Are these package formats ready to become main packages formats for Linux distributions?
In this article we will take a look at the advantages and disadvantages of each package format individually, and of distribution independent package formats in general.
How do distribution independent package formats work?
Distribution independent package formats bundle software with all its dependencies required to run the software into a single package. This should allow a package to be run on nearly any system which supports the framework for that package format. This is different from traditional package formats like .deb and .rpm that require the dependencies of a software package to be installed on the system, and which are build to run on a specific system. Developers can thus build their software into a single package that could be run on most Linux distributions, instead of having to repackage their software to target specific Linux distributions.
Because a developer will bundle software packages with all dependencies included, he also has te responsibility to keep the dependencies included in the package up to date with the latest security updates. If a package is not properly maintained by the software developer, then the distribution independent software package could pose a security risk to the system. This is also a contrast to the traditional software packages for which dependencies are maintained by the Linux distribution developers through the distribution’s repositories.
Because distribution independent packages include dependencies, they are in general also larger than traditional counterparts. The same dependency might be included in a number of different distribution independent packages, while traditional packages would all use the same dependency that only needs to be installed on the system once. This can also be an advantage if you want to be able to use different versions of software or certain libraries, which is more difficult to achieve when all your software uses the same version of a library or package.
Snap is a distribution independent package format created by Canonical for Ubuntu, with a first release in 2014. Since then, other major distributions like Arch, Gentoo and Fedora have also integrated support for the Snap framework.
The online app store Snapcraft can be used to find and install Snap packages. This centralized app store can be seen as both an advantage and disadvantage for Snap packages. It is great that a user has a single location where he can find all available Snap packages, but this app store is controlled and maintained solely by Canonical.
On Snapcraft, developers can also find guides to help them with publishing their software as Snap packages. Both open and proprietary software can be published on the Snapcraft app store.
Besides Linux, Snap packages are also targeted towards IoT (internet of things) and embedded devices running Ubuntu Core, a minimalistic version of Ubuntu.
Based on the count provided by uappexplorer there are currently 1804 Snap packages available.
The Flatpak package format is developed as an independent open-source project, with a first release in 2015. The main contributor to the Flatpak project is Fedora, but the Flatpak framework is also supported by most major Linux distributions. You can find the Flatpak source code on Github.
The Flathub website can be used to find and install Flatpak packages. Although the Flatpak package format has no restrictions regarding open-source or proprietary software, the Flathub app store initially only allowed open-source software to be published on their website. Recently some proprietary software has made it into the app store as well.
In contrast to Snap’s single repository controlled by Canonical, Flatpak does allow you to use multiple repositories to install and update Flatpak packages from.
For general information on the Flatpak framework and for guides on how to publish Flatpak packages, refer to the Flatpak documentation.
One major disadvantage of Flatpak is that it does not have server support, unlike Snap and AppImage. It is reliant on certain desktop session services that are not available on most Linux servers.
On Flathub there are currently 418 Flatpak packages available, but because Flatpak does not have a single repository that contains all packages, the total amount of available Flatpak packages is likely higher.
AppImage is a portable package format, first released in 2004 under the name kik. Because it is a portable package format, no installation is required to run an AppImage. The AppImage is a single file that can immediately be run. The source code for AppImage is available on Github.
A list of available AppImage packages can be found on the AppImage website. There are currently 502 packages listed on the website.
AppImage does not make use of repositories to provide updates. Instead, an AppImage package can contain information on how the package can be updated. For AppImages that do contain this update information, a tool like AppImageUpdate can help you to manually update your AppImage packages.
I have tested two software packages that are available in the three different package formats. In this section we’ll compare the size and performance of these packages to see if there are significant differences between the package formats. I have also included the performance of the eopkg packages, which are native on this Solus system.
The first application I tested is VLC, a free and open-source media player.
To have an easily repeatable test for the performance of VLC, I have measured the resource usage of VLC while playing the same video for each package version of VLC.
The Snap package for VLC is available from Snapcraft. The Snap package is installed in folder /snap/vlc with a size of 204 MB.
Resource usage for the VLC Snap package:
VLC is available as a Flatpak package from Flathub. The Flatpak package is installed in folder /var/lib/flatpak/app/org.videolan.VLC with a size of 78 MB.
Resource usage for the VLC Flatpak package:
The VLC AppImage can be downloaded from Github. The AppImage file has a size of 53.2 MB.
Unfortunately the VLC AppImage package was not able to run on my system. It showed the following error message on startup:
Failed to load module: /usr/lib64/gio/modules/libgiognutls.so
Installed size for the VLC eopkg package: 57.8 MB.
Resource usage for the VLC eopkg package:
I also tested LibreOffice, an open-source office suite.
The test case I used to inspect the resource usage of the different LibreOffice packages was to open an ODT file and export it to PDF.
The Snap package for LibreOffice is available from Snapcraft. The Snap package is installed in folder /snap/libreoffice with a size of 501 MB.
Resource usage for the LibreOffice Snap package:
LibreOffice is available as a Flatpak package from Flathub. The Flatpak package is installed in folder /var/lib/flatpak/app/org.libreoffice.LibreOffice with a size of 627 MB.
Resource usage for the LibreOffice Flatpak package:
The LibreOffice AppImage can be downloaded from the LibreOffice website. The size of the AppImage file is 220MB.
Resource usage for the LibreOffice AppImage package:
Installed size for the LibreOffice eopkg package: 686.1 MB.
Resource usage for the LibreOffice eopkg package:
Finally, I took a look at the open-source image editor GIMP.
My test case for GIMP was to open an image, apply a distortion filter to the image, and export it to another format.
The Snap package for GIMP is available from Snapcraft. The Snap package is installed in folder /snap/gimp with a size of 192 MB.
Unfortunately the GIMP Snap package did not run on my system. The following error is shown on startup:
execv failed: No such file or directory
GIMP is available as a Flatpak package from Flathub. The Flatpak package is installed in folder /var/lib/flatpak/app/org.gimp.GIMP with a size of 214 MB.
Resource usage for the GIMP Flatpak package:
The GIMP AppImage package can be downloaded from the GIMP website. The size of the AppImage file is 89.7 MB.
Resource usage for the GIMP AppImage package:
Installed size for the GIMP eopkg package: 95.7 MB.
Resource usage for the GIMP eopkg package:
Each of the three package formats we have taken a look at in this article have their own advantages and disadvantages. In my opinion, each of these package formats still has improvements to make to really become a viable option as a main package format for Linux distributions. The great thing is that these package formats can coexist, so the end user does not have to pick a single package format, they can enjoy software from the different package formats.
The comparison of software in the different package formats shows that AppImages are the smallest in size in all our test cases. For VLC, the Snap package was a lot larger than the Flatpak package, while in the other test cases Snap packages were a bit smaller than the Flatpak alternatives. Snap packages seem to be more resource heavy compared to the other package formats. The resource usage of Flatpak and AppImage packages were very similar in all test cases.