Dépôt#
Les dépôts Flatpak sont le mécanisme principal pour publier des applications, ainsi elles peuvent être installées par des utilisateurs.
Certains aspects des dépôts sont couverts par d’autres sections de cette documentation. Les commandes basiques pour ajouter, supprimer et inspecter les dépôts peuvent être trouvées dans la section Utiliser Flatpak. Additionnellement, la section sur Flatpak Builder couvre la façon la plus commune pour ajouter des applications à un dépôt.
To use a repository to publish an application, it is possible to either host your own (covered in the next section, Héberger un dépôt) or use Flathub, the primary publishing and hosting service for Flatpak applications.
Software center applications like GNOME Software or KDE Discover allow browsing repositories, and can also dynamically promote new or popular applications. If you use Flathub, the repository will typically have already been added by users, so adding an application to the repository is sufficient to make it available to them.
fichiers .flatpakref#
.flatpakref
files can be used in combination with repositories to provide
an additional, easy way for users to install an application, often by clicking
on the file or a download link.
Internally, .flatpakref
files are simple description files that include
information about a Flatpak application. An example:
[Flatpak Ref]
Name=fr.free.Homebank
Branch=stable
Title=fr.free.Homebank from flathub
Url=https://dl.flathub.org/repo/
RuntimeRepo=https://dl.flathub.org/repo/flathub.flatpakrepo
IsRuntime=false
GPGKey=mQINBFlD2sABEADsiUZUO...
As can be seen, the file includes the ID of the application and the location
of the repository that contains it, as well a link to information about
the repository that provides the application’s runtime. .flatpakref
files therefore contain all the information needed to install an application.
Note
Les fichiers .flatpakref
incluent une version encodée en base64 de la clé GPG qui a été utilisée pour signer le dépôt. Elle peut être obtenue avec la commande suivante:
$ base64 --wrap=0 < key.gpg
One advantage of .flatpakref
files is that they can be used to install
applications even if their repository hasn’t been added by the user. In this
case the repository that contains the application will either be automatically
installed, or the user will be prompted to install it. This will also happen
if the necessary runtime isn’t present.
.flatpakref
can be used to install applications from the command
line as well as with graphical software installers. This is done with the
standard flatpak install
command, which accepts both local and remote
.flatpakref
files. For example:
$ flatpak install https://flathub.org/repo/appstream/fr.free.Homebank.flatpakref
Ou, si le même fichier a été téléchargé:
$ flatpak install fr.free.Homebank.flatpakref
Publier des mises à jour#
Flatpak repositories are similar to Git repositories, in that they store every version of an application by keeping a record of the difference between each version. This makes updating efficient, since only the difference (or « delta ») between two versions needs to be downloaded when an update is performed.
When a new version of an application is added to a repository, it immediately
becomes available to users. Software centers are able to automatically check
for and install new versions. Those who are using the command line have to
manually run flatpak update
to check for and install new versions of
any applications they have installed.