From Fedora Project Wiki

(Updating; systemd is no longer required per FAQ)
m (adding link to Flatpak docs)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
A [http://flatpak.org/ '''Flatpak'''] is a type of cross-distribution packaging format that is managed (including installation, configuration, upgrading, ''etc.'') with its own package manager that is invoked by the <code>flatpak</code> command. Other distributions that with Flatpak in official or unofficial (yet still maintained) repositories include: [https://www.archlinux.org/packages/extra/x86_64/flatpak/ Arch Linux], Debian ([https://packages.debian.org/jessie-backports/flatpak Jessie backports], [https://packages.debian.org/stretch/flatpak testing], [https://packages.debian.org/sid/flatpak unstable]), [https://github.com/fosero/flatpak-overlay Gentoo], [https://madb.mageia.org/package/show/application/0/name/flatpak Mageia], [https://software.opensuse.org/package/flatpak openSUSE Tumbleweed] (openSUSE Leap 42.1 and 42.2 have an unofficial repository with an outdated version of Flatpak) and [https://launchpad.net/~alexlarsson/+archive/ubuntu/flatpak Ubuntu 16.04 and later].  
A [http://flatpak.org/ '''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.  
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
* CentOS
* RHEL
* Linux Mint
* Ubuntu
* Debian
* Arch Linux
* Raspberry Pi OS
== Fedora flatpaks ==
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 [https://docs.fedoraproject.org/en-US/flatpak/ Fedora flatpaks] use rpms. This implies that only applications which are packaged as rpm can be converted into Fedora flatpaks. 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.


== External links ==
== External links ==
* [http://flatpak.org/#users Official Guide to using Flatpaks]
* [http://flatpak.org/#users Official Guide to using Flatpaks]
 
* [https://flathub.org/home Flathub - official flatpak store]
* [https://docs.fedoraproject.org/en-US/flatpak/concepts/ Fedora Docs: Flatpak]
* [https://docs.flatpak.org/en/latest/introduction.html Flatpak Documentation]
* [https://en.wikipedia.org/wiki/Flatpak Flatpak page on Wikipedia]
[[Category:Cross-distribution packaging formats]]
[[Category:Cross-distribution packaging formats]]
[[Category:Software Management]]

Latest revision as of 08:39, 30 September 2021

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
  • CentOS
  • RHEL
  • Linux Mint
  • Ubuntu
  • Debian
  • Arch Linux
  • Raspberry Pi OS

Fedora flatpaks

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. This implies that only applications which are packaged as rpm can be converted into Fedora flatpaks. 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.

External links