A Flatpak is a relatively new way of cross-distribution application distribution. Unlike traditional package formats (deb, rpm) which targets specific OS, flatpaks target specific runtimes (see below).
The idea behind flatpak is to find the most common dependencies across many applications and bundle them into one package called runtime. These runtimes can be then targeted by other flatpak applications, which can use libraries from the runtime. However, many applications have dependencies which are not common. In these cases, dependency is bundled together with the application itself during the flatpak build process.
Flatpak applications are also sandboxed, which means they cannot interact with the host system. Interactions must be explicitly enabled.
While Flatpak is not officially affiliated with the Fedora Project, or GNOME Foundation, it is perhaps best supported by Fedora and the GNOME desktop environment. This is because Fedora releases 23 and later have all had Flatpak in their official repositories. The GNOME Software application also has support for installing Flatpaks.
Currently, flatpak is supported by many operating systems, for example:
- Fedora Workstation & Silverblue
- Linux Mint
- Arch Linux
- Raspberry Pi OS
Fedora has its own version of flatpaks. These differs from the regular flatpaks mainly what source is picked to build the applications. Standard flatpaks use source code, which is then rebuilt with /app prefix, but Fedora flatpaks use rpms. his implies that only application which is packaged as rpm can converted into Fedora flatpak. There is also a difference in the resulting format. Flathub uses OSTree for its flatpaks, while Fedora uses OCI.
Pros and cons of Fedora flatpaks
The biggest advantage stems from the input source of Fedora flatpaks. Their source code is proved and it is clean what is installed and where. There are also processes how to introduce new rpms and many other control mechanism which makes the whole process very robust and transparent. It is also a very comfort way how to use rpm-packaged application on other paltforms supporting flatpaks.
However, the whole process is a little tricky and sometimes it is neccessary to patch the rpm package. The most common issues are hardcoded paths, install scripts which do not respect prefixes other than /usr etc.