Concepts propres à Flatpak
ID de l’application
Chaque application a besoin d’un identifiant unique, basé sur un nom de domaine inversé. Par exemple org.gnome.Maps
. Toutes les ressources exportées par l’application doivent utiliser cet identifiant comme préfix. Cela inclut le https ://standards.freedesktop.org/desktop-entry-spec/latest/[fichier de bureau], le fichier appdata pour l’application, et toutes les icônes référencées par le fichier de bureau.
Appdata
Le fichier appdata d’un Flatpak est utilisé pour afficher des informations sur l’application avant l’installation. Voir https ://fedoraproject.org/wiki/Packaging :AppData [Directives d’empaquetage de Fedora pour les fichiers AppData].
Runtimes and bundled libraries
Lorsqu’un Flatpak est exécuté, les fichiers que l’application voit proviennent de deux endroits :
-
The Flatpak runtime, mounted at
/usr
. This contains libraries and data files shared by all Fedora Flatpaks. There are runtimes for each Fedora release. -
The Flatpak application, mounted at
/app
. This contains the application code itself, but also contains any libraries that are bundled with the application. The application and libraries must be rebuilt with this prefix - this is done by rebuilding them for flatpaks.
RPM builds
Packaging flatpaks in Fedora makes use of RPM builds. The application and bundled libraries are rebuilt in Fedora’s build system (Koji) with a special build target - this gives a couple of advantages:
-
The same RPM spec file used to create the regular RPM build is also used to create the Flatpak RPM build.
-
The Flatpak RPM build target has a different buildroot configuration with macros that result in RPMs being built with a prefix of
/app
.
Note that Flatpak RPM builds will not work outside the Flatpak context, since they are rebuilt with a prefix of /app
with the same name as system libraries - you cannot use dnf install
to install them.
Images OCI
For Fedora, Flatpak runtimes and applications are built as OCI Images and distributed via https://registry.fedoraproject.org. This allows Flatpaks to be handled in a very similar way to server side containers. (Flatpaks are also commonly distributed via ostree.)
Want to help? Learn how to contribute to Fedora Docs ›