Files
flatpak/doc/flatpak-flatpakref.xml
Phaedrus Leeds 53a0b528bf Add DeploySideloadCollectionID flatpakref/flatpakrepo key
When Flatpak's P2P updates support was replaced with the "sideloading"
implementation in 1.7.1, a new server side repo config key
"deploy-sideload-collection-id" was added which gets set when you pass
"--deploy-sideload-collection-id" to "flatpak build-update-repo", and
has the effect of setting "xa.deploy-collection-id" in the repo metadata
that is pulled by clients, which itself causes a collection id to be set
on the remote for clients using Flatpak >= 1.7.1.

This commit adds an analogous key in flatpakref and flatpakrepo files,
so the collection id can be set when the remote is configured, rather
than later on when the repo metadata is pulled and acted upon. As before
with DeployCollectionID, it has no difference in function compared to
DeployCollectionID or CollectionID and the only difference is which
Flatpak versions are affected.

It would've been better if this were added in 1.7.1 when the sideload
support was added, but alas here we are.

(Also update the docs and unit tests)
2022-08-16 10:37:36 +02:00

178 lines
8.7 KiB
XML

<?xml version='1.0'?> <!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<refentry id="flatpak-flatpakref">
<refentryinfo>
<title>flatpakref</title>
<productname>flatpak</productname>
<authorgroup>
<author>
<contrib>Developer</contrib>
<firstname>Alexander</firstname>
<surname>Larsson</surname>
<email>alexl@redhat.com</email>
</author>
</authorgroup>
</refentryinfo>
<refmeta>
<refentrytitle>flatpakref</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refnamediv>
<refname>flatpak-flatpakref</refname>
<refpurpose>Reference to a remote for an application or runtime</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
Flatpak uses flatpakref files to share information about a remote for
a single application. The <filename>flatpakref</filename> file contains
enough information to add the remote and install the application.
Use the <command>flatpak install --from</command> command to do so.
</para>
<para>
flatpakref files may also contain additional information that is useful
when displaying the application to the user, e.g. in an app store.
</para>
<para>
The filename extension commonly used for flatpakref files is <filename>.flatpakref</filename>.
</para>
<para>
A flatpakref file can also refer to a remote for a runtime.
</para>
</refsect1>
<refsect1>
<title>File format</title>
<para>
The flatpakref file is using the same .ini file format that is used for
systemd unit files or application .desktop files.
</para>
<refsect2>
<title>[Flatpak Ref]</title>
<para>
All the information is contained in the [Flatpak Ref] group.
</para>
<para>
The following keys can be present in this group:
</para>
<variablelist>
<varlistentry>
<term><option>Version</option> (uint64)</term>
<listitem><para>The version of the file format, must be 1 if present.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>Name</option> (string)</term>
<listitem><para>The fully qualified name of the runtime or application. This key is mandatory.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>Url</option> (string)</term>
<listitem><para>The url for the remote. This key is mandatory.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>Branch</option> (string)</term>
<listitem><para>The name of the branch from which to install the application or runtime. If this key is not specified, the "master" branch is used.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>Title</option> (string)</term>
<listitem><para>The title of the application or runtime. This should be a user-friendly name that can be displayed e.g. in an app store.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>Comment</option> (string)</term>
<listitem><para>A short summary of the application or runtime, for display e.g. in an app store.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>Description</option> (string)</term>
<listitem><para>A longer description of the application or runtime, for display e.g. in an app store.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>Icon</option> (string)</term>
<listitem><para>The url for an icon that can be used to represent the application or runtime.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>Homepage</option> (string)</term>
<listitem><para>The url of a webpage describing the application or runtime.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>DeploySideloadCollectionID</option> (string)</term>
<listitem><para>
The collection ID of the remote, if it has one. This uniquely
identifies the collection of apps in the remote, to allow peer to peer
redistribution (see <citerefentry><refentrytitle>flatpak</refentrytitle><manvolnum>1</manvolnum></citerefentry>).
It is recommended to use this key over DeployCollectionID or CollectionID because
only newer clients (Flatpak 1.12.8 or later) pay attention to it (and older clients don't handle
collection IDs properly).
</para></listitem>
</varlistentry>
<varlistentry>
<term><option>DeployCollectionID</option> (string)</term>
<listitem><para>This is deprecated but still supported for backwards compatibility. Use DeploySideloadCollectionID instead.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>CollectionID</option> (string)</term>
<listitem><para>This is deprecated but still supported for backwards compatibility. Use DeploySideloadCollectionID instead.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>IsRuntime</option> (boolean)</term>
<listitem><para>Whether this file refers to a runtime. If this key is not specified, the file is assumed to refer to an application.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>GPGKey</option> (string)</term>
<listitem><para>The base64-encoded gpg key for the remote.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>RuntimeRepo</option> (string)</term>
<listitem><para>The url for a .flatpakrepo file for the remote where the runtime can be found.
Note that if the runtime is available in the remote providing the app, that remote may be
used instead but the one specified by this option will still be added.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>SuggestRemoteName</option> (string)</term>
<listitem><para>A suggested name for the remote.</para></listitem>
</varlistentry>
</variablelist>
</refsect2>
</refsect1>
<refsect1>
<title>Example</title>
<programlisting>
[Flatpak Ref]
Title=gedit
Name=org.gnome.gedit
Branch=stable
Url=http://sdk.gnome.org/repo-apps/
IsRuntime=false
GPGKey=mQENBFUUCGcBCAC/K9WeV4xCaKr3NKRqPXeY5mpaXAJyasLqCtrDx92WUgbu0voWrhohNAKpqizod2dvzc/XTxm3rHyIxmNfdhz1gaGhynU75Qw4aJVcly2eghTIl++gfDtOvrOZo/VuAq30f32dMIgHQdRwEpgCwz7WyjpqZYltPAEcCNL4MTChAfiHJeeiQ5ibystNBW8W6Ymf7sO4m4g5+/aOxI54oCOzD9TwBAe+yXcJJWtc2rAhMCjtyPJzxd0ZVXqIzCe1xRvJ6Rq7YCiMbiM2DQFWXKnmYQbj4TGNMnwNdAajCdrcBWEMSbzq7EzuThIJRd8Ky4BkEe1St6tuqwFaMZz+F9eXABEBAAG0KEdub21lIFNESyAzLjE2IDxnbm9tZS1vcy1saXN0QGdub21lLm9yZz6JATgEEwECACIFAlUUCGcCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEArkz6VV0VKBa5cH/0vXa31YgEjNk78gGFXqnQxdD1WYA87OYxDi189l4lA802EFTF4wCBuZyDOqdd5BhS3Ab0cR778DmZXRUP2gwe+1zTJypU2JMnDpkwJ4NK1VP6/tE4SAPrznBtmb76BKaWBqUfZ9Wq1zg3ugvqkZB/Exq+usypIOwQVp1KL58TrjBRda0HvRctzkNhr0qYAtkfLFe0GvksBp4vBm8uGwAx7fw/HbhIjQ9pekTwvB+5GwDPO/tSip/1bQfCS+XJB8Ffa04HYPLGedalnWBrwhYY+G/kn5Zh9L/AC8xeLwTJTHM212rBjPa9CWs9C6a57MSaeGIEHLC1hEyiJJ15w8jmY=
DeployCollectionID=org.gnome.Apps
</programlisting>
</refsect1>
<refsect1>
<title>See also</title>
<para>
<citerefentry><refentrytitle>flatpak</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>flatpak-install</refentrytitle><manvolnum>1</manvolnum></citerefentry>
<citerefentry><refentrytitle>flatpak-flatpakrepo</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
</para>
</refsect1>
</refentry>