<?xml version='1.0' encoding='utf-8' ?>
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "AppStream.ent">
%BOOK_ENTITIES;
]>

<section id="sect-Metadata-GenericComponent">
	<title>Generic Component</title>

	<section id="spec-component-introduction">
	<title>Introduction</title>
	<para>
		For a distribution, it is good to know more about the content of a package. Which public interfaces (libraries? Python modules?) does it provide? Does it contain codecs? Does it
		contain firmware? Fonts? An application?
		All of this information can be used to automatically install missing software or to offer users a choice on what they want to install from a software center.
	</para>
	<para>
		To provide this information, we created the <emphasis role="italic">metainfo</emphasis> files, which allow <emphasis role="bold">upstream projects</emphasis> to describe the content of their software package.
		If a metainfo file contains a <literal>&lt;provides/&gt;</literal> tag, distributors must also ensure that the package providing the file contains all items referenced
		by that statement, or is installed by a metapackage depending on packages which provide these items. This gives upstream projects a (very light) way to influence distributor packaging.
		More information about that can be found below.
	</para>
	<para>
		Several specialized component-metainfo files exist, for example for applications or fonts. These are all based on this generic component XML specification, and are described in the
		following chapters.
	</para>
	</section>

	<section id="spec-component-location">
	<title>Filesystem locations</title>

	<para>
		Upstream projects can ship one or more metainfo files in <filename>/usr/share/metainfo/%{id}.metainfo.xml</filename>, where <literal>id</literal> is a unique
		identifier of this specific component.
	</para>
	<note>
		<para>
			Component metadata of type <literal>desktop-application</literal> as described in <xref linkend="sect-Metadata-Application"/> can be installed
			with an <filename>.appdata.xml</filename> extension as well for historical reasons.
			AppStream implementations will read the XML files as long as they end up in the right location on the filesystem.
		</para>
	</note>
	<important>
		<title>Legacy Path</title>
		<para>
			AppStream tools scan the <filename>/usr/share/appdata/</filename> path for legacy compatibility as well. It should not be used
			anymore by new software though, even on older Linux distributions (like RHEL 7 and Ubuntu 16.04 LTS) the metainfo path is well
			supported.
			Support for the legacy path will likely be dropped completely with a future AppStream 1.0 release.
		</para>
	</important>

	</section>

	<section id="spec-component-filespec">
	<title>XML Specification</title>

	<para>
		The XML for a generic component definition starts with a <code>&lt;component&gt;</code> tag as the root element.
		The <code>&lt;component&gt;</code> element must at least have an <literal>id</literal>, <literal>name</literal> and <literal>summary</literal> tag;
		a <literal>provides</literal> tag with appropriate children is highly recommended.
	</para>
	<para>
		In addition to the <literal>type</literal> attribute denoting the component type in case the component is not a <code>generic</code> component,
		the <literal>component</literal> tag may also have a <literal>date_eol</literal> attribute that sets a date when the component stops to
		be supported entirely (this may be the case for superseded legacy software like <code>org.python.python2</code>). The attribute value can be any
		complete date or time in <ulink url="https://en.wikipedia.org/wiki/ISO_8601">ISO 8601</ulink>.
	</para>
	<para>
		All possible tags which can be used with components of all types are:
	</para>

	<variablelist>
		<varlistentry id="tag-id-generic">
		<term>&lt;id/&gt;</term>
		<listitem>
		<para>
			The <literal>id</literal> tag is a unique identifier for this component. It must contain only alphanumeric ASCII characters, dots, hyphens and underscores. Spaces are
			not allowed. While hyphens are allowed for legacy compatibility, their usage is strongly discouraged to ensure interoperability of the AppStream ID with other tools such
			as D-Bus (and thereby making the ID more generic and useful). For the same reason it is also strongly discouraged to start any segment of the ID with a digit.
			Additionally, even though uppercase letters are permitted in a component-ID, it is strongly encouraged to only use lowercase letters for the ID.
		</para>
		<para>
			The ID must follow a reverse-DNS scheme, consisting of <literal>{tld}.{vendor}.{product}</literal>, for example <code>org.kde.gwenview</code>
			or <code>com.hugski.colorhug2</code>. Ownership of <literal>{vendor}.{tld}</literal> in the domain name system guarantees uniqueness of IDs.
		</para>
		<para>
			To increase the uniqueness and to distinguish between different pieces of a software suite, it is suggested to append the type name to the component-id in these cases.
			For example, one can use <code>com.hugski.colorhug2</code> for the client tools to control hardware, and <code>com.hugski.colorhug2.firmware</code> for the runtime firmware files.
		</para>
		<para>
			Note that the value of this tag must be <emphasis>unique</emphasis> across all distributions and software deployment platforms.
			In case it is not unique, distributors are expected to reject the conflicting components from inclusion into their metadata and notify the upstream projects about this issue.
		</para>

		<important>
		<title>Escaping characters in the component ID</title>
		<para>
			To ensures the greatest possible compatibility of an AppStream ID, it is recommended to replace any hyphens in the ID in all but the last segment of it with underscores,
			and prefix every leading digit of a segment with an underscore as well. Since the underscore is not a valid character in domain names, the uniqueness of the ID is kept.
			For example, the ID <code>org.7-zip.7-zip</code> could become <code>org._7_zip._7-zip</code>.
		</para>
		</important>

		</listitem>
		</varlistentry>

		<varlistentry id="tag-metadata_license">
		<term>&lt;metadata_license/&gt;</term>
		<listitem>
		<para>
			The <code>&lt;metadata_license/&gt;</code> tag indicates the content license that you are releasing the one
			metainfo XML file under. This is typically not the same as the project license. Omitting the license value will
			result in the metainfo data not being incorporated into metadata collections as used by Linux distributions.
			This tag is required for all metainfo files.
		</para>
		<para>
			The value of this tag has to be one of the recognized SPDX license IDs for <code>&lt;metadata_license/&gt;</code> tags, or a simple SPDX expression
			(only <code>AND</code> and <code>OR</code> operators allowed) allowing the use of the metadata file under one of the recognized licenses.
		</para>
		<para>
			We do recognize a set of <ulink url="https://en.wikipedia.org/wiki/Permissive_software_licence">permissive</ulink> licenses that have been vetted
			for mutual compatibility. This is important in order to allow the metainfo metadata to be combined with arbitrary other data in one file.
			While copyleft licenses like the GPL are great for code, it is not feasible to test every copyleft license for mutual compatibility and compliance
			when combining metainfo metadata with other data into one larger assembly fully automatically.
		</para>
		<para>
			Currently, the following licenses have been reviewed and can be used as metadata licenses:
		</para>
		<itemizedlist>
			<listitem>
			<para><literal>FSFAP</literal></para>
			</listitem>
			<listitem>
			<para><literal>MIT</literal></para>
			</listitem>
			<listitem>
			<para><literal>0BSD</literal></para>
			</listitem>
			<listitem>
			<para><literal>CC0-1.0</literal></para>
			</listitem>
			<listitem>
			<para><literal>CC-BY-3.0</literal></para>
			</listitem>
			<listitem>
			<para><literal>CC-BY-4.0</literal></para>
			</listitem>
			<listitem>
			<para><literal>CC-BY-SA-3.0</literal></para>
			</listitem>
			<listitem>
			<para><literal>CC-BY-SA-4.0</literal></para>
			</listitem>
			<listitem>
			<para><literal>GFDL-1.1</literal></para>
			</listitem>
			<listitem>
			<para><literal>GFDL-1.2</literal></para>
			</listitem>
			<listitem>
			<para><literal>GFDL-1.3</literal></para>
			</listitem>
			<listitem>
			<para><literal>BSL-1.0</literal></para>
			</listitem>
			<listitem>
			<para><literal>FTL</literal></para>
			</listitem>
			<listitem>
			<para><literal>FSFUL</literal></para>
			</listitem>
		</itemizedlist>
		<para>
			The license codes correspond to the identifiers found at the <ulink url="https://spdx.org/licenses/">SPDX OpenSource License Registry</ulink>.
			For instance, <literal>CC-BY-SA-3.0</literal> corresponds to the license at
			<ulink url="https://creativecommons.org/licenses/by-sa/3.0/">creativecommons.org/licenses/by-sa/3.0</ulink>.
			If you are looking for the simplest license to use for your metadata, using the <code>FSFAP</code> license is suggested.
		</para>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-name">
		<term>&lt;name/&gt;</term>
		<listitem>
			<para>
			A human-readable name for this software component. For example, if the component ID was "libc", its name might be "GNU Standard C Library".
			</para>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-summary">
		<term>&lt;summary/&gt;</term>
		<listitem>
			<para>
			A short summary of what this component does. If the component is "PackageKit", the summary could be "Provides a package-management abstraction layer".
			This element is translatable.
			</para>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-icon">
		<term>&lt;icon/&gt;</term>
		<listitem>
			<para>
				The <code>&lt;icon/&gt;</code> tag describes the component icon. It is mostly used for GUI applications (component-type <literal>desktop-application</literal>).
				It can be of type <literal>stock</literal>, <literal>local</literal> or <literal>remote</literal>.
			</para>
			<para>
				<literal>stock</literal> icons are loaded from the icon stock (the current or hicolor/locolor fallback themes).
				The icon name must not include any file-extension or path.
			</para>
			<para>
				<literal>local</literal> icons are loaded from a file in the filesystem.
				They should specify a full file path.
				This icon type may have <literal>width</literal> and <literal>height</literal>
				properties. If targeting a hi-DPI screen, this icon type may have a <literal>scale</literal> property.
			</para>
			<para>
				<literal>remote</literal> icons loaded from a remote URL. Currently, only HTTP/HTTPS urls are supported.
				This icon type should have <literal>width</literal> and <literal>height</literal> properties.
				If targeting a hi-DPI screen, this icon type may have a <literal>scale</literal> property.
			</para>
			<para>
				The semantics of each property in the <code>&lt;icon/&gt;</code> tag are the same as for the <code>&lt;icon/&gt;</code> tag
				for catalog metadata. See <xref linkend="tag-ct-icon"/>.
			</para>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-description">
		<term>&lt;description/&gt;</term>
		<listitem>
		<para>
			A long description of this component. Some markup can be used.
		</para>
		<para>
			Do not assume the format is HTML. This list contains all currently supported formatting options:
		</para>
		<itemizedlist>
			<listitem>
			<para>Paragraph (<literal>p</literal>)</para>
			</listitem>
			<listitem>
			<para>Ordered list (<literal>ol</literal>), with list items (<literal>li</literal>)</para>
			</listitem>
			<listitem>
			<para>Unordered list (<literal>ul</literal>), with list items (<literal>li</literal>)</para>
			</listitem>
			<listitem>
			<para>
				Within paragraphs and list items, emphasis (<literal>em</literal>) and inline code (<literal>code</literal>) text styles are supported.
				The emphasis is commonly rendered in italic, while inline code is shown in a monospaced font.
			</para>
			</listitem>
			<listitem>
			<para>Nested lists are not supported</para>
			</listitem>
		</itemizedlist>
		<para>
			In MetaInfo files, this tag should be translated by-paragraph. For enumerations, items are translated individually as well, and not the
			whole enumeration block. This means that in a translated file, only <literal>&lt;p/&gt;</literal> and <literal>&lt;li/&gt;</literal>
			elements may carry an <literal>xml:lang</literal> property.
		</para>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-categories">
				<term>&lt;categories/&gt;</term>
				<listitem>
					<para>
						This tag can contain one or more <code>&lt;category&gt;</code> entries, describing the categories this software component
						is associated with.
						This tag is usually applied to components of type <literal>desktop-application</literal>, but can be used with any component.
						A list of valid category names can be found in the
						<ulink url="https://specifications.freedesktop.org/menu-spec/latest/category-registry.html">Freedesktop menu specification</ulink>.
						Example:
					</para>
					<programlisting language="XML"><![CDATA[<categories>
    <category>Game</category>
    <category>ArcadeGame</category>
</categories>]]></programlisting>
				</listitem>
		</varlistentry>

		<varlistentry id="tag-keywords">
				<term>&lt;keywords/&gt;</term>
				<listitem>
					<para>
						This tag can contain one or more <code>&lt;keyword&gt;</code> children, describing keywords for the component,
						to make it easier to find in a software center.
						For translated keywords in metainfo files, the individual <literal>keyword</literal> tags should be translated.
					</para>
					<para>
						Example:
					</para>
					<programlisting language="XML"><![CDATA[<keywords>
  <keyword translate="no">IDE</keyword>
  <keyword>development</keyword>
  <keyword>programming</keyword>
  <keyword xml:lang="de">entwicklung</keyword>
  <keyword xml:lang="de">programmierung</keyword>
</keywords>]]></programlisting>
				</listitem>
			</varlistentry>

		<varlistentry id="tag-url">
		<term>&lt;url/&gt;</term>
		<listitem>
			<para>
				Defines web URLs for this component. There are several different URL types allowed:
			</para>

			<variablelist>
			<varlistentry>
				<term>homepage</term>
				<listitem>
				<para>
					Should be a link to the upstream homepage for the component.
				</para>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>bugtracker</term>
				<listitem>
				<para>
					Should point to the software's bug tracking system, for users to report new bugs.
				</para>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>faq</term>
				<listitem>
				<para>
					Should link a FAQ page for this software, to answer some of the most-asked questions in
					detail, something which you cannot do in the component's description.
				</para>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>help</term>
				<listitem>
				<para>
					Should provide a web link to an online user's reference, a software manual or help page.
				</para>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>donation</term>
				<listitem>
				<para>
					URLs of this type should point to a webpage showing information on how to donate to
					the described software project.
				</para>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>translate</term>
				<listitem>
				<para>
					URLs of this type should point to a webpage where users can submit or
					modify translations of the upstream project.
				</para>
				<para>
					Typically this should be a link to the project page in Weblate, Transifex or Zanata, but could also be a
					link to an upstream-hosted wiki page describing how to send translations upstream.
				</para>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>contact</term>
				<listitem>
				<para>
					URLs of this type should allow the user to contact the developer.
				</para>
				<para>
					This could for example be an HTTPS URL to an online form or a page describing how to contact the developer.
				</para>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>vcs-browser</term>
				<listitem>
				<para>
					URLs of this type should point to a webpage on which the user can browse the sourcecode.
				</para>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>contribute</term>
				<listitem>
				<para>
					URLs of this type should point to a webpage showing information on how to contribute to
					the described software project.
				</para>
				</listitem>
			</varlistentry>
			</variablelist>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-launchable">
		<term>&lt;launchable/&gt;</term>
		<listitem>
		<para>
		         This tag indicates possible methods to launch the software described in this component.
                         It is allowed to appear multiple times in MetaInfo data.
		</para>

		<para>
		  The <code>&lt;launchable/&gt;</code> tag has a required <literal>type</literal> property indicating the system that is used to launch the component.  The following types are allowed:
                </para>
                <variablelist>
                  <varlistentry>
                    <term>desktop-id</term>
                    <listitem>
                      <para>
                        The application can be launched via a desktop file. The value of the tag is a
			<ulink url="https://specifications.freedesktop.org/desktop-entry-spec/latest/file-naming.html#desktop-file-id">desktop-file id</ulink>.
                      </para>
                      <para>
                        In case a software component has multiple launchable entries,
			the software center might display a dialog to choose which entry to launch.
                        If possible though, it should be avoided to add multiple <literal>launchable</literal> tags of type <literal>desktop-id</literal>.
                      </para>
                    </listitem>
                  </varlistentry>
                  <varlistentry>
                    <term>service</term>
                    <listitem>
                      <para>
                        The software can be started, stopped, and monitored by the OS "init"
                        facility, such as systemd. The value of the tag is a name that can be
                        used with that facility, such as a systemd unit name.
                      </para>
                      <para>
                        Multiple <literal>launchable</literal> tags of type <literal>service</literal> are not
                        alternatives to start the same service, but the
                        component does contain multiple services that might all need to be
                        started.
                      </para>
                      <para>
                        Only those services should be listed as launchables that the user is
                        actually expected to start and stop manually.  Services that are
                        started/stopped indirectly via dependencies of other services should
                        not be listed.
                      </para>
                      <para>
                        For systemd units, the services listed as launchables are expected to
                        support enabling and disabling.
                      </para>
                    </listitem>
                  </varlistentry>
                  <varlistentry>
                    <term>cockpit-manifest</term>
                    <listitem>
                      <para>
                        The software can be launched from the menus of
                        the <ulink url="https://cockpit-project.org">Cockpit</ulink> admin interface.
                        The value of the tag is the name of a <ulink
                        url="https://cockpit-project.org/guide/latest/packages.html">Cockpit
                        package</ulink>.
                      </para>
                    </listitem>
                  </varlistentry>
                  <varlistentry>
                    <term>url</term>
                    <listitem>
                      <para>
                        The application is a web site that is viewed through a browser.
                        The value of the tag is a direct HTTP/HTTPS URL that the browser must navigate to.
                      </para>
                    </listitem>
                  </varlistentry>
                </variablelist>
		<para>
			Example:
		</para>
		<programlisting language="XML"><![CDATA[<launchable type="desktop-id">org.gnome.sysprof2.desktop</launchable>]]></programlisting>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-releases">
		<term>&lt;releases/&gt;</term>
		<listitem>
			<para>
				The <code><![CDATA[<releases>]]></code> tag contains multiple <literal>release</literal> children that
				themselves contain metadata about releases made for this software component.
				The release information XML is described in-depth in <xref linkend="sect-Metadata-Releases"/>,
				examples for a valid <literal>releases</literal> tag with artifacts are also provided there.
			</para>
			<para>
				Release information can be embedded in the component's metainfo file, following the XML
				description outlined in <xref linkend="sect-Metadata-Releases"/>. Alternatively, it can also
				be split into its own metadata file as described in that section. In case of external metadata,
				a <literal>releases</literal> tag must still be present in the component's metainfo file, and
				must have a <literal>type</literal> property set to value <code>external</code> (if the <literal>type</literal>
				property is missing, a value of <code>embedded</code> is implicitly assumed for it).
			</para>
			<para>
				In case of external metadata, the <literal>releases</literal> tag may also have an <literal>url</literal>
				property linking to a web location where the release XML can be found and updated separately from the
				main component metadata. An <literal>url</literal> property must not be present without <literal>type</literal>
				set to <code>external</code>.
			</para>
			<para>
				Only HTTPS links are allowed for the web URL, and any <literal>artifact</literal> defined in a
				release description from an external website should not be trusted without further verification, as external
				release information can currently not be signed.
			</para>
			<para>
				AppStream catalog metadata generators may choose to update the locally provided release information with the data from
				the web location provided by the URL in <literal>url</literal>.
				This allow projects to complete release localization after a release was made, or include further information that was
				not yet available directly at release time.
				The generated catalog XML data must be complete and must not contain references to external release information.
			</para>
			<para>
				Example for a <literal>releases</literal> block that points to an external metadata file:
			</para>
			<programlisting language="XML"><![CDATA[<releases type="external" url="https://example.org/releases/org.example.myapp.releases.xml" />]]></programlisting>
			<important>
				<title>Local Release Data</title>
				<para>
					Please note that even if release data is external and also provided on a remote location, it also <emphasis>must</emphasis> be
					available locally, installed as a file into <filename>/usr/share/metainfo/releases/%{cid}.releases.xml</filename>.
					The local file may not contain all information (for example it may not have a complete release description or all translations),
					but basic data such as the released versions and their release dates should be present.
				</para>
				<para>
					It is an error to reference an external release data file, but not provide a local copy of it.
				</para>
			</important>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-provides">
		<term>&lt;provides/&gt;</term>
		<listitem>
			<para>
			The <literal>provides</literal> tag and its children describe the public interfaces this application provides.
			A public interface can be anything which other applications, which are not part of the upstream project, can access or reference.
			This includes binaries and libraries. Private interfaces should never be added to a <literal>provides</literal> tag.
			</para>
			<para>
			A <literal>provides</literal> tag contains a number of children describing the type and name of the provided public interface items.
			It is suggested that the build system auto-generates this tag and its children.
			Currently allowed item types are listed below. If you miss something,
			<ulink url="https://github.com/ximion/appstream/issues/new">file a bug against AppStream</ulink> so we can add the new type.
			</para>

			<variablelist>
			<varlistentry>
				<term>&lt;mediatype/&gt;</term>
				<listitem>
				<para>
					Describes the media types (also known as MIME types) this software supports, meaning it can open, edit or otherwise handle them.
					This tag is especially useful for generic components and addon-type components. For applications, the metadata may automatically
					be fetched from their <filename>.desktop</filename> files by the distribution's metadata generator if a desktop-entry file is set
					as <xref linkend="tag-launchable"/>.
				Example:
				</para>
				<programlisting language="XML">
<![CDATA[<provides>
    <mediatype>text/html</mediatype>
    <mediatype>image/jpeg</mediatype>
    <mediatype>application/rss+xml</mediatype>
 </provides>]]></programlisting>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>&lt;library/&gt;</term>
				<listitem>
				<para>
					Contains the name of a shared library placed in a publicly accessible library path, such as <filename>/usr/lib</filename>, <filename>/usr/lib/&lt;triplet&gt;</filename>
					or <filename>/lib</filename>.
					For example, for the <literal>libappstream</literal> library, the value for <literal>library</literal> would be <code>libappstream.so.1</code>.
				</para>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>&lt;binary/&gt;</term>
				<listitem>
				<para>
					Name of a binary installed into a location in <envar>PATH</envar>.
				</para>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>&lt;font/&gt;</term>
				<listitem>
				<para>
					Full name of a font provided by this component. See <xref linkend="sect-Metadata-Fonts"/> for more information.
				</para>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>&lt;modalias/&gt;</term>
				<listitem>
				<para>
					A modalias glob representing the hardware types (for example USB, PCI, ACPI, DMI) this component handles.
					Useful for installing printer drivers or other USB protocol drivers for smartphones, firmware, and
					out of tree kernel drivers.
				</para>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>&lt;firmware/&gt;</term>
				<listitem>
				<para>
					This provided element is described in detail for the <literal>firmware</literal> component type, where it is mandatory.
					Please see <xref linkend="tag-firmware-provides"/> for more information.
				</para>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>&lt;python3/&gt;</term>
				<listitem>
				<para>
					Name of a Python 3 module this component provides.
				</para>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>&lt;dbus/&gt;</term>
				<listitem>
				<para>
					Contains the well-known name of a D-Bus service as its value. The type of the service must be specified using the <literal>type</literal> property
					of this tag. Allowed values are <code>user</code> and <code>system</code>.
				</para>
				<para>
					Example:
				</para>
				<programlisting language="XML"><![CDATA[<provides>
  <dbus type="system">org.freedesktop.packagekit</dbus>
</provides>]]></programlisting>
				</listitem>
			</varlistentry>

			<varlistentry>
				<term>&lt;id/&gt;</term>
				<listitem>
				<para>
					Contains the component-ID of another software component. The presence of this tag indicates that the software component containing it is able to
					provide all functionality of the one referenced in the <code>&lt;provides/&gt; ↪ &lt;id/&gt;</code> tag.
				</para>
				<para>
					This is useful in case a component-id had to be renamed in the past, e.g. because its domain-name changed.
				</para>
				</listitem>
			</varlistentry>

			</variablelist>
		</listitem>

		</varlistentry>

		<varlistentry id="tag-relations">
		<term>&lt;requires/&gt;, &lt;recommends/&gt; &amp; &lt;supports/&gt;</term>
		<listitem>
			<para>
				The <literal>requires</literal> tag denotes an <emphasis>absolute</emphasis> requirement on a different entity.
				For example, a component can require certain hardware to be present, require a specific minimum kernel version,
				or another component to be installed first. If a requirement specified in a <literal>requires</literal> tag
				is not met, AppStream clients should prevent the installation of the particular software component.
			</para>
			<para>
				If it is not essential that a certain requirement is met by the system, but just recommended to be available, a
				<literal>recommends</literal> tag should be used. In this case, AppStream clients should allow the installation of the software
				component, but may display a warning before allowing the installation.
				It is permissible, but not required, to prevent installation of software which does not have all items specified as
				<literal>recommends</literal> met on the system that it is installed to.
			</para>
			<para>
				Components may also set a <literal>supports</literal> tag. This is an even weaker relation than <literal>recommends</literal>,
				and means the particular component can make use of certain hardware capabilities or other software if it is available, but will
				also be usable if it is not.
			</para>
			<para>
				A <literal>requires</literal>, <literal>recommends</literal> or <literal>supports</literal> tag contains children describing the type,
				value and version relation of the required item.
				Each child can have a <literal>version</literal> and a <literal>compare</literal> property, to allow depending on a certain minimal
				version of the respective item.
				The <literal>version</literal> property contains the version to be compared against, while the <literal>compare</literal> property contains
				a two-letter code denoting how to compare the version of a present item with the version listed in the property.
				If no <literal>compare</literal> property is given, but a <literal>version</literal> property is found, AppStream implementations should
				implicitly assume a value of <code>ge</code> for comparison of the versions. The installed version is on the left side of the required version
				when comparing them. See <xref linkend="sect-AppStream-Misc-VerCmp"/> for a description of the version comparison algorithm.
			</para>
			<para>
				Possible two-letter codes for version comparisons are:
			</para>
			<itemizedlist>
				<listitem><para><code>eq</code> - Equal to</para></listitem>
				<listitem><para><code>ne</code> - Not equal to</para></listitem>
				<listitem><para><code>lt</code> - Less than</para></listitem>
				<listitem><para><code>gt</code> - Greater than</para></listitem>
				<listitem><para><code>le</code> - Less than or equal to</para></listitem>
				<listitem><para><code>ge</code> - Greater than or equal to</para></listitem>
			</itemizedlist>
			<para>
				Please note that not all item types are valid for all relation types.
				Generally valid item types are listed below, with information as for which relation kins they are valid.
			</para>

			<variablelist>
			<varlistentry id="tag-relations-id">
				<term>&lt;id/&gt;</term>
				<listitem>
				<para>
					A relation to another software component. The value should be another component-ID. Example:
				</para>
				<programlisting language="XML"><![CDATA[<requires>
  <id version="1.0" compare="ge">org.example.my_software</id>
</requires>]]></programlisting>
				<para>Valid for: <literal>requires</literal>, <literal>recommends</literal>, <literal>supports</literal></para>
				</listitem>
			</varlistentry>

			<varlistentry id="tag-relations-modalias">
				<term>&lt;modalias/&gt;</term>
				<listitem>
				<para>
					Check for specific hardware to be present via its modalias. The modalias may contain a wildcard expression.
					Example:
				</para>
				<programlisting language="XML"><![CDATA[<recommends>
  <modalias>usb:v1130p0202d*</modalias>
</recommends>]]></programlisting>
				<para>Valid for: <literal>requires</literal>, <literal>recommends</literal>, <literal>supports</literal></para>
				</listitem>
			</varlistentry>

			<varlistentry id="tag-relations-kernel">
				<term>&lt;kernel/&gt;</term>
				<listitem>
				<para>
					Check for a specific kernel to be running on the system. The kernel name is the output of <command>uname -s</command>.
					Example:
				</para>
				<programlisting language="XML"><![CDATA[<requires>
  <kernel version="4.14" compare="ge">Linux</kernel>
</requires>]]></programlisting>
				<para>Valid for: <literal>requires</literal>, <literal>recommends</literal></para>
				</listitem>
			</varlistentry>

			<varlistentry id="tag-relations-memory">
				<term>&lt;memory/&gt;</term>
				<listitem>
				<para>
					Set a relation to the amount of physical memory (RAM) the system should have to run the software component.
					The memory size is set in MiB. You usually only want to use this with the <literal>recommends</literal> tag,
					because users might want to install the software on systems even if they have a lesser amount of memory
					compared to what would be ideal.
					Example:
				</para>
				<programlisting language="XML"><![CDATA[<recommends>
  <memory>2048</memory> <!-- recommend at least 2GiB of memory -->
</recommends>]]></programlisting>
				<para>Valid for: <literal>requires</literal>, <literal>recommends</literal></para>
				</listitem>
			</varlistentry>

			<varlistentry id="tag-relations-firmware">
				<term>&lt;firmware/&gt;</term>
				<listitem>
				<para>
					Depend on a specific device firmware. The value of this tag should either be a name like <literal>bootloader</literal>, be
					empty to reference the firmware itself described by the <literal>firmware</literal>-type component this tag is contained in,
					or contain a GUID.
					This tag is commonly used and interpreted by the <ulink url="https://fwupd.org/">LVFS</ulink>.
					Example:
				</para>
				<programlisting language="XML"><![CDATA[<requires>
  <firmware compare="ge" version="0.1.2">6de5d951-d755-576b-bd09-c5cf66b27234</firmware>
  <firmware compare="ge" version="0.1.2"/>
  <firmware compare="ge" version="0.3.4">bootloader</firmware>
</requires>]]></programlisting>
				<para>Valid for: <literal>requires</literal>, <literal>recommends</literal></para>
				</listitem>
			</varlistentry>

			<varlistentry id="tag-relations-hardware">
				<term>&lt;hardware/&gt;</term>
				<listitem>
				<para>
					Require, recommend or support a specific system hardware configuration. The value of this item is a
					<ulink url="https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/using-chids">Computer Hardware ID (CHID)</ulink>
					without any surrounding braces.
				</para>
				<para>
					On Linux systems, the CHIDs of the system can be queried using the <command>sudo fwupdtool hwids</command> command.
				</para>
				<para>
					This tag is commonly used and interpreted by the <ulink url="https://fwupd.org/">LVFS</ulink> and fwupd tool.
					Example:
				</para>
				<programlisting language="XML"><![CDATA[<requires>
  <hardware>be6ab11f-af5f-572e-be18-84301d880764</hardware>
</requires>]]></programlisting>
				<para>Valid for: <literal>requires</literal>, <literal>recommends</literal>, <literal>supports</literal></para>
				</listitem>
			</varlistentry>

			<varlistentry id="tag-relations-control">
				<term>&lt;control/&gt;</term>
				<listitem>
				<para>
					This item type can be used to indicate support for or require certain ways a user can control the software. This usually maps to certain methods
					of input. If multiples <literal>control</literal> tags with different values are found within a requires/supports block, only one of them needs
					to be satisfied on the system to mark an application as compatible. This means if <literal>touch</literal> and <literal>pointing</literal> are both
					supported as controls for an application-type component, a system that only has a mouse and no touchscreen will still be considered able to run
					the application. Valid values for this tag are:
				</para>
				<itemizedlist>
					<listitem><para><code>pointing</code> - Input via mouse/cursors/other pointing devices is possible</para></listitem>
					<listitem><para><code>keyboard</code> - Keyboard input is possible</para></listitem>
					<listitem><para><code>console</code> - Control via a console / command-line interface</para></listitem>
					<listitem><para><code>tablet</code> - Graphics tablet input</para></listitem>
					<listitem><para><code>touch</code> - Input by touching a surface with fingers is possible</para></listitem>
					<listitem><para><code>gamepad</code> - The component supports gamepads (any game controller with wheels/buttons/joysticks)</para></listitem>
					<listitem><para><code>tv-remote</code> - Input via a TV remote (with arrow keys, number pad, other basic inputs) is supported.</para></listitem>
					<listitem><para><code>voice</code> - The software can be controlled via voice recognition/activation</para></listitem>
					<listitem><para><code>vision</code> - The software can be controlled by computer vision / visual object and sign detection</para></listitem>
				</itemizedlist>
				<para>
					If a control type is <emphasis>supported</emphasis> (= in a <literal>supports</literal> block), it means the software supports the given method of user
					input. As long as one of the input methods is available on the system, the software can be used. Installation on systems without the given control may
					still be permitted, but the software may not be easily usable.
				</para>
				<para>
					If a control type is <emphasis>recommended</emphasis> (= in a <literal>recommends</literal> block), it means the software prefers the given method of
					user input. The software may still be installed if the input control method is not available, but functionality may be severely degraded.
				</para>
				<para>
					If a control type is <emphasis>required</emphasis> (= in a <literal>requires</literal> block), the same applies, but the software installer should refuse
					to install the software on devices which do not have at least one of the input methods. It is therefore advised to only use the <code>control</code> tag
					in <code>supports</code> and possibly <code>recommends</code> blocks, and avoid to use it in <code>requires</code>.
				</para>
				<para>
					For certain component types, some permitted controls are implicitly assumed: For <link linkend="sect-Metadata-Application">desktop-application</link>
					and <link linkend="sect-Metadata-WebApplication">web-application</link> components, <literal>pointing</literal> and <literal>keyboard</literal> controls
					are assumed supported, unless explicit support is defined by the metadata author.
					For <link linkend="sect-Metadata-ConsoleApplication">console-application</link>, control via <literal>console</literal> is assumed.
				</para>
				<para>
					For any other, non-application-like component types, the <literal>control</literal> relation item is currently considered unsupported.
				</para>
				<para>
					Example control support block:
				</para>
				<programlisting language="XML"><![CDATA[<supports>
  <control>pointing</control>
  <control>keyboard</control>
  <control>touch</control>
</supports>]]></programlisting>
				<para>Valid for: <literal>requires</literal>, <literal>recommends</literal>, <literal>supports</literal></para>
				</listitem>
			</varlistentry>

			<varlistentry id="tag-relations-display_length">
				<term>&lt;display_length/&gt;</term>
				<listitem>
				<para>
					Set a relation to the display length defined as an integer value in <emphasis>logical pixels</emphasis> (device pixels divided by scaling factor,
					roughly equivalent to 0.26mm (1/96in), also known as device-independent pixels).
					Setting the <literal>side</literal> property to either <code>shortest</code> or <code>longest</code> will apply the selected size constraint to
					either the shortest or longest side of the display rectangle, with <code>shortest</code> being implicitly assumed if no value is set.
				</para>
				<note>
					<title>About Pixel Dimensions</title>
					<para>
						One logical pixel (= device independent pixel) roughly corresponds to the visual angle of one pixel on a device with a pixel density of
						96dpi and a distance from the observer of about 52cm, making the physical pixel about 0.26mm in size.
						When using logical pixels as unit, they might not always map to exact physical lengths as their exact size is defined by the device providing
						the display.
						They do however accurately depict the maximum amount of pixels that can be drawn in the depicted direction on the device's display space.
					</para>
				</note>
				<para>
					Relations for the display length can be defined using a <literal>compare</literal> property as described in <xref linkend="tag-relations"/>.
					If this property is not present, a value of <code>ge</code> (greater-or-equal) is implicitly assumed.
				</para>

				<note>
					<title>Determining Device Types</title>
					<para>
						Please note that a display with a lot of vertical space may not be a television screen, but could also be a large gaming monitor.
						Similar logic applies to the smaller screen sizes. Therefore, to indicate that an application runs well on a certain <emphasis>device</emphasis>
						and not just on a certain <emphasis>display</emphasis>, additional metadata is needed, like the application's supported
						input controls as defined via <xref linkend="tag-relations-control"/>.
					</para>
				</note>
				<note>
					<title>Sizes for Reference</title>
					<para>
						The sizes below are for reference if you do not know the exact dimensions your application will fit into,
						and just need a rough guideline as to what device type you can expect at a given size:
					</para>
					<itemizedlist>
						<listitem><para>Very small screens, as used in watches, wearables and other small-display devices: about &lt;= 360px</para></listitem>
						<listitem><para>Small screens often used in handheld devices, such as phone screens, small phablets: about &lt; 768px</para></listitem>
						<listitem><para>Screens in laptops, tablets: about &gt;= 768px</para></listitem>
						<listitem><para>Bigger computer monitors: about &gt;= 1024px</para></listitem>
						<listitem><para>Television screens, large projected images: about &gt;= 3840px</para></listitem>
					</itemizedlist>
				</note>

				<para>
					This tag may appear up to four times to set a minimum and maximum dimension required.
					If multiple displays are connected to a device, it is acceptable to test against either the largest screen attached to the device, or the combined
					amount of display space (depending on what makes the most sense for the respective device / setup).
					A software center application may test for the maximum possible resolution of an attached display, and not the currently set display resolution in case
					it wants to check against hardware capability and not be influenced by user configuration.
				</para>
				<para>
					If used in a <literal>requires</literal> block, this relation can be used to restrict an application to only be installable on systems which have a minimum
					usable display length available for it. If used in a <literal>recommends</literal> block, the application will still be
					installable, but the user may be shown a warning.
				</para>
				<para>
					If no <literal>display_length</literal> relation is present, a minimum required display (<code>ge</code>) relation
					of <code>768px</code> is implicitly assumed to preserve backwards compatibility (so applications capable of running on smaller screens
					need to make their support for that configuration explicit).
				</para>
				<para>
					Examples:
				</para>
				<programlisting language="XML"><![CDATA[<!-- recommend at least 600 logical pixels of space -->
<recommends>
  <display_length compare="ge">600</display_length>
</recommends>

<!-- ensure this application is not run on a very large screen, or
     very small screen (no tiny handhelds or television screens) -->
<requires>
  <display_length compare="lt">3840</display_length>
  <display_length compare="gt">360</display_length>
</requires>]]></programlisting>
				<para>Valid for: <literal>requires</literal>, <literal>recommends</literal></para>
				</listitem>
			</varlistentry>

			<varlistentry id="tag-relations-internet">
				<term>&lt;internet/&gt;</term>
				<listitem>
				<para>
					Require, recommend or support connectivity to the internet. The value of this item one of the following:
				</para>
				<itemizedlist>
					<listitem><para>
							<code>always</code> - Needs internet connectivity to work. If used in a <literal>recommends</literal> element,
							then this indicates that the app can work without internet, but the experience will be degraded.
					</para></listitem>
					<listitem><para>
							<code>offline-only</code> - Never uses the internet, even if it’s available.
					</para></listitem>
					<listitem><para>
							<code>first-run</code> - Uses the internet the first time the application is run, but not normally afterwards.
					</para></listitem>
				</itemizedlist>
				<para>
					If the value of <literal>&lt;internet/&gt;</literal> is not <literal>offline-only</literal>, the <literal>bandwidth_mbitps</literal> attribute can be
					set to a bandwidth (in Mbit/s) which is the minimum internet bandwidth needed for the application to be usable. If this attribute is not set, it’s
					assumed that the application is usable with all internet connections.
				</para>
				<para>
					Examples:
				</para>
				<programlisting language="XML"><![CDATA[<!-- always needs the internet -->
<requires>
  <internet>always</internet>
</requires>

<!-- always needs the internet and has a degraded experience if it’s not at least 2Mbit/s -->
<requires>
  <internet bandwidth_mbitps="2">always</internet>
</requires>

<!-- never uses the internet, even if available -->
<requires>
  <internet>offline-only</internet>
</requires>

<!-- the software explicitly supports running offline (but may also be able to use online features) -->
<supports>
  <internet>offline-only</internet>
</supports>

<!-- requires the internet on first run -->
<requires>
  <internet>first-run</internet>
</requires>

<!-- can work without the internet, but with a degraded experience -->
<recommends>
  <internet>always</internet>
</recommends>

<!-- recommends the internet for when it’s first run, but can work without -->
<recommends>
  <internet>first-run</internet>
</recommends>

<!-- requires the internet on first run, can run without it afterwards but with a degraded experience -->
<requires>
  <internet>first-run</internet>
</requires>
<recommends>
  <internet>always</internet>
</recommends>]]></programlisting>
				<para>Valid for: <literal>requires</literal>, <literal>recommends</literal>, <literal>supports</literal></para>
				</listitem>
			</varlistentry>

			</variablelist>
		</listitem>

		</varlistentry>

		<varlistentry id="tag-replaces">
		<term>&lt;replaces/&gt;</term>
		<listitem>
			<para>
				The <literal>replaces</literal> tag denotes indicates that the given component completely replaces
				another one on the system. In most cases, the replaced component and the one that replaces it can not be
				coinstalled. Compared to a <xref linkend="tag-provides"/> ↪ <literal>id</literal> relationship,
				for a replaced component there is no common interface that two components can provide at once.
			</para>
			<para>
				A <literal>replaces</literal> tag has <literal>id</literal> children which have the component-IDs of the
				components that the current component replaces as value.
			</para>
			<para>
				This feature is usually used for components that have to change their ID. While metainfo data may
				contain <literal>replaces</literal> tags, software repository providers should filter these tags
				carefully to ensure that the new component has the right to replace an old one.
			</para>
			<para>
					Example:
				</para>
				<programlisting language="XML"><![CDATA[<!-- the 7-zip application changes its ID and therefore replaces the component with its old ID -->
<id>org._7_zip._7zip</id>
[...]
<replaces>
  <id>org.7-zip.7zip</id>
</replaces>]]></programlisting>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-mimetypes">
		<term>&lt;mimetypes/&gt;</term>
		<listitem>
			<para>
			This tag can contain one or more <code>&lt;mimetype/&gt;</code> children, describing the MIME types this application supports.
		</para>
		<important>
			<title>Deprecation</title>
			<para>
				This tag is deprecated and should not be used for new metadata. Please use <xref linkend="tag-provides"/> ↪ <literal>mediatype</literal> tags
				instead.
			</para>
		</important>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-project_group">
		<term>&lt;project_group/&gt;</term>
		<listitem>
		<para>
			If you include the <code>&lt;project_group/&gt;</code> tag then this identifies your project with a specific upstream umbrella project.
			Known values include <literal>GNOME</literal>, <literal>KDE</literal>, <literal>XFCE</literal>, <literal>MATE</literal> and <literal>LXDE</literal>,
			although other umbrella projects like Yorba or Mozilla make sense too.
		</para>
		<note>
			<para>
				You should only identify with an umbrella project if you use <emphasis>all</emphasis> their infrastructure and policies, for instance string
				freezes dates, bugtracker and source control instance.
			</para>
		</note>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-compulsory_for_desktop">
		<term>&lt;compulsory_for_desktop/&gt;</term>
		<listitem>
			<para>
				The <code><![CDATA[<compulsory_for_desktop>]]></code> tag indicates that the component which the metadata belongs to is essential for the
				functionality of the defined desktop environment. Examples for compulsory components are the <literal>GNOME Shell</literal> by the GNOME Project,
				or the <literal>Plasma Desktop</literal> by KDE, as well as things like <literal>iBus</literal> or the desktop login manager.
			</para>
			<para>
				Software centers are expected to detect the running desktop environment and disable uninstallation for compulsory components of that desktop,
				so users will not be able to damage their currently running, primary desktop environment.
			</para>
			<para>
				Multiple occurrences of the <code><![CDATA[<compulsory_for_desktop>]]></code> tag are allowed, so a project can be essential for many desktops.
				The distributor decides which components should be made compulsory, however it is generally a good idea to follow upstream's recommendations on that matter.
			</para>
			<para>
				A list of all allowed values for this tag is defined in the <ulink url="https://specifications.freedesktop.org/menu-spec/latest/onlyshowin-registry.html">XDG Menu Specification</ulink>.
				Software center applications will only recognize these values.
			</para>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-project_license">
		<term>&lt;project_license/&gt;</term>
		<listitem>
			<para>
				The <code>&lt;project_license/&gt;</code> tag is indicating the license of the component (application/library/addon/font/etc.) described in the metadata document.
				It should be an <ulink url="https://spdx.org/specifications">SPDX license expression</ulink>. Please note the SPDX license IDs are case-sensitive in AppStream.
				Possible values include:
				<itemizedlist>
					<listitem><para><literal>GPL-2.0</literal></para></listitem>
					<listitem><para><literal>LGPL-3.0+ AND GPL-3.0+</literal></para></listitem>
					<listitem><para><literal>MIT</literal></para></listitem>
					<listitem><para><literal>CC-BY-SA-2.0</literal></para></listitem>
					<listitem><para><literal>LicenseRef-proprietary=https://example.com/mylicense.html</literal></para></listitem>
				</itemizedlist>
				A full list of recognized licenses and their identifiers can be found at the
				<ulink url="https://spdx.org/licenses/">SPDX OpenSource License Registry</ulink>.
			</para>
			<para>
				Custom licenses which are not in the SPDX registry, like proprietary licenses, can be denoted using the <code>LicenseRef</code> notation.
				<code>LicenseRef-proprietary</code> can be used to denote a proprietary license, with an optional URL to the license text following after
				a <code>=</code> sign.
			</para>
			<para>
				The license given in the <literal>project_license</literal> tag should be the ‘main’ license of the project. For a software project, this
				is typically the license for the code. It is not recommended to include the license for accompanying documentation (for example) in
				<literal>project_license</literal>, as that could confuse users. In particular, the <literal>CC-BY-SA-3.0</literal> license which is commonly
				used for documentation is not an (FSF or OSI) approved license for free software, so including it in <literal>project_license</literal> results in the
				project as a whole being considered non-free.
			</para>
			<para>
				Although the <literal>project_license</literal> tag is not mandatory, it is highly recommended to include it.
			</para>
			<para>
				Examples:
			</para>
			<programlisting language="XML"><![CDATA[<project_license>LGPL-3.0+ OR MPL-2.0</project_license>
<project_license>LGPL-3.0+ OR MPL-2.0</project_license>
<project_license>GPL-3.0-or-later</project_license>
<project_license>LicenseRef-proprietary=https://code.visualstudio.com/license</project_license>]]></programlisting>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-developer">
		<term>&lt;developer/&gt;</term>
		<listitem>
		<para>
			The <code>&lt;developer/&gt;</code> element is designed to represent the developers or project responsible for development of the project described in the metadata.
			It must appear only once per component.
		</para>
		<para>
			The element should have a <literal>id</literal> property, containing a unique ID to identify the component developer / development team. It is recommended to use
			a reverse-DNS name, like <code>org.gnome</code> or <code>io.github.ximion</code>, or a Fediverse handle (like <code>@user@example.org</code>) as ID to achieve a
			higher chance of uniqueness.
		</para>
		<para>
			A <literal>developer</literal> element must have one <literal>name</literal> tag as child, which contains a translatable name for the component developer or
			development team. Values might be for example "The GNOME Foundation" or "The KDE Community".
			Hyperlinks or emails must not be used in the name; if you want to link to the developer's homepage, use the <xref linkend="tag-url"/>-tag instead.
			The <literal>name</literal> tag is translatable, it must only exist once in its untranslated form.
		</para>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-developer_name">
		<term>&lt;developer_name/&gt;</term>
		<listitem>
		<para>
			The <code>&lt;developer_name/&gt;</code> tag is designed to represent the developers or project responsible for development
			of the project described in the metadata.
		</para>
		<important>
			<title>Deprecation</title>
			<para>
				This tag is deprecated and should not be used for new metadata. Please use <xref linkend="tag-developer"/> instead.
			</para>
		</important>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-screenshots">
		<term>&lt;screenshots/&gt;</term>
		<listitem>
		<para>
			Visual components (like fonts or graphical applications) may choose to add one or multiple screenshots to their metadata.
			Screenshots can be either a video or a static image.
		</para>
		<para>
			The <code>&lt;screenshots/&gt;</code> tag contains multiple <code>&lt;screenshot/&gt;</code> children, where at least one of them must have the property
			<code>type="default"</code> to indicate the primary and most representative screenshot of the software.
		</para>
		<para>
			Optionally, a <literal>screenshot</literal> may also have an <code>environment</code> property.
			This string property denotes the GUI environment the screenshot was recorded in, in the form of <code>{env}:{style}</code>,
			where <literal>{env}</literal> is a desktop-environment name in lowercase and <literal>{style}</literal> is a specific style
			that the desktop environment recognizes, e.g. <code>light</code> and <code>dark</code> for light and dark themes.
			See <ulink url="https://github.com/ximion/appstream/blob/main/data/desktop-style-ids.txt">desktop-style-ids.txt</ulink> for a list
			of currently recognized environment and style combinations.
		</para>
		<para>
			Software centers displaying the component will usually prefer screenshots of the current environment and style, and display them first,
			even before the screenshot marked as <literal>default</literal>.
		</para>
		<para>
			In general, screenshots should be displayed in the order the are defined in in their <literal>screenshots</literal> block
			for the respective component on a per-environment basis (all screenshots of the same environment/style will be displayed in the order
			they are listed in the XML, but may be moved to the front of the list as a whole depending on the current environment).
		</para>
		<para>
			Every <code>&lt;screenshot/&gt;</code> element must have at least one <code>&lt;image/&gt;</code> <emphasis>or</emphasis> <code>&lt;video/&gt;</code> child,
			but never an <literal>image</literal> <emphasis>and</emphasis> <literal>video</literal> at the same time.
		</para>
		<para>
			Screenshots containing videos must not be the default screenshot.
		</para>
		<para>
			The value of the <code>&lt;image/&gt;</code> tag is a direct HTTP/HTTPS URL to a screenshot uploaded to a public location on the web.
			Images should ideally be provided in the PNG format; using JPEG or WebP is also permitted for images in metainfo files.
		</para>
		<para>
			The <code>&lt;image/&gt;</code> tag may have the following properties:
			<itemizedlist>
				<listitem>
					<para><code>type</code></para>
					<para>
						The type of the image: <code>source</code> for the source image, and <code>thumbnail</code> for a thumbnail image.
						In case the type is <code>thumbnail</code>, the <code>width</code> and <code>height</code> properties must be present.
					</para>
				</listitem>
				<listitem>
					<para><code>width</code></para>
					<para>
						The width of the image in pixels.
					</para>
				</listitem>
				<listitem>
					<para><code>height</code></para>
					<para>
						The height of the image in pixels.
					</para>
				</listitem>
				<listitem>
					<para><code>scale</code></para>
					<para>
						A scaling factor for the image, if it is intended for a HiDPI display.
						If a scaling factor > 1 is set, the <literal>width</literal>/<literal>height</literal> values
						are not adjusted to scale. They always represent the exact image dimensions in pixels.
					</para>
				</listitem>
				<listitem>
					<para><code>xml:lang</code></para>
					<para>
						The language this screenshot image is translated in. This property should only be present if there are multiple images with
						different locales present.
					</para>
				</listitem>
			</itemizedlist>
		</para>
		<para>
			The value of the <code>&lt;video/&gt;</code> tag is a direct HTTP/HTTPS URL to a video uploaded to a public location on the web. The video must be in a
			<ulink url="https://www.matroska.org/">Matroska (.mkv)</ulink> or <ulink url="https://www.webmproject.org/">WebM</ulink> container and use either the
			<ulink url="https://www.webmproject.org/vp9/">VP9</ulink> or <ulink url="https://aomedia.org/av1-features/">AV1</ulink> codec.
			The video should ideally work without any audio, but if audio is needed, the <ulink url="https://opus-codec.org/">Opus</ulink> codec should be used.
			Software centers may still play the video without any sound though. Additionally, AppStream metadata repositories (like in distributions such as Fedora and Debian)
			may impose size limitations to video files delivered by their CDN, so it is recommended to keep the video file size below 10MiB.
			There is also a chance that software centers do not display any video at all, so a video must never be in a default screenshot.
		</para>
		<para>
			The <code>&lt;video/&gt;</code> tag may have the following properties:
			<itemizedlist>
				<listitem>
					<para><code>container</code></para>
					<para>
						The video container that is used, can be <code>webm</code> or <code>matroska</code>.
					</para>
				</listitem>
				<listitem>
					<para><code>codec</code></para>
					<para>
						The video codec used, can be <code>av1</code> or <code>vp9</code>.
					</para>
				</listitem>
				<listitem>
					<para><code>width</code></para>
					<para>
						The width of the video in pixels.
					</para>
				</listitem>
				<listitem>
					<para><code>height</code></para>
					<para>
						The height of the video in pixels.
					</para>
				</listitem>
				<listitem>
					<para><code>xml:lang</code></para>
					<para>
						The language this video is translated in. This property should only be present if there are multiple videos with
						different locales present.
					</para>
				</listitem>
			</itemizedlist>
		</para>
		<para>
			Optionally, a <code>&lt;screenshot/&gt;</code> tag may have a translatable <code>&lt;caption/&gt;</code> child, defining a short (ideally not more than 100 characters)
			description of what the user can see on the referenced screenshot.
		</para>
		<para>
			A <code>source</code> video should be concise, easy to understand and not have an overly large file size.
			Try to use a reasonably large image for <code>source</code> images, as they may be scaled down to <code>thumbnail</code> images in metadata processing.
			It is suggested to have videos and images in 16:9 aspect ratio, as long as that is sensible for the displayed application.
		</para>
		<para>
			Example:
		</para>
		<programlisting language="XML"><![CDATA[<screenshots>
  <screenshot type="default">
    <caption>The FooBar main window.</caption>
    <image type="source" width="1600" height="900">https://example.com/foobar/screenshot-1.png</image>
  </screenshot>
  <screenshot>
    <caption>Foobar showing the frobnicate functionality.</caption>
    <image type="source" width="1600" height="900">https://example.com/foobar/screenshot-2.png</image>
  </screenshot>
  <screenshot>
    <video codec="av1" width="1600" height="900">https://example.com/foobar/screencast.mkv</video>
  </screenshot>

  <screenshot environment="plasma-mobile">
    <caption>The FooBar main window, but on Plasma Mobile</caption>
    <image type="source" width="1600" height="900">https://example.com/foobar/screenshot-1_plasma-mobile.png</image>
  </screenshot>

  <screenshot environment="gnome:dark">
    <caption>The FooBar main window, on GNOME in dark mode</caption>
    <image type="source" width="1600" height="900">https://example.com/foobar/screenshot-1_gnome_dark.png</image>
  </screenshot>
 </screenshots>]]></programlisting>

		</listitem>
		</varlistentry>

		<varlistentry id="tag-translation">
		<term>&lt;translation/&gt;</term>
		<listitem>
		<para>
			The <code>&lt;translation/&gt;</code> tag is an optional tag which can be added to specify the translation domain used for this software component.
			It may be used by the AppStream distro metadata generator to determine the translation status of the respective software (e.g. which languages the
			software is translated into and how complete the translations are).
		</para>
		<para>
			The tag must have a <literal>type</literal> property, assuming the value of the translation system which is used. Right now, allowed translation systems and
			values for <literal>type</literal> are:
			<itemizedlist>
				<listitem><para><literal>gettext</literal></para></listitem>
				<listitem><para><literal>qt</literal></para></listitem>
			</itemizedlist>
			In case a software components gets its translation from multiple translation domains, the <code>&lt;translation/&gt;</code> tag may be defined more
			than once.
		</para>
		<para>
			The source strings in the component are assumed to be in the <code>en_US</code> locale. If that is not the case, specify the source locale
			in POSIX format using the <code>source_locale</code> attribute on the <code>&lt;translation/&gt;</code> tag. The metadata generator will
			use the source locale to synthesize a <code>&lt;lang/&gt;</code> tag for the source locale, with 100% translation.
		</para>
		<para>
			For Gettext translations, localization data will be looked for in <filename>${prefix}/share/locale/${locale}/LC_MESSAGES/${id}.mo</filename>, where
			<code>${id}</code> is replaced with the translation domain specified in the <code>&lt;translation/&gt;</code> tag.
			For Qt translations, if the ID string contains slashes, we will look for translations following either the <filename>${prefix}/share/${id}_${locale}.qm</filename>
			or the <filename>${prefix}/share/${id}/${locale}.qm</filename> pattern. If no slashes are contained, we will look for translation data in
			<filename>${prefix}/share/locale/${locale}/LC_MESSAGES/${id}.qm</filename>.
		</para>
		<para>
			Example:
		</para>
		<programlisting language="XML"><![CDATA[<translation type="gettext">foobar</translation>
<translation type="gettext" source_locale="de_DE">foobar</translation>
<translation type="qt">FooBar/translations/foobar</translation>]]></programlisting>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-suggests">
		<term>&lt;suggests/&gt;</term>
		<listitem>
		<para>
			The <code>&lt;suggests/&gt;</code> tag is an optional tag which can be added to specify the component-ids of other software this components suggests.
			Software centers might present the suggested software on the installation page of the described component.
		</para>
		<para>
			The tag may have a <literal>type</literal> property, with the value <code>upstream</code>, indicating that this suggestion originates from the upstream project.
			If no <literal>type</literal> property is given, <code>upstream</code> is implicitly assumed as value. Metainfo files must not define other <literal>suggests</literal>
			types, those are reserved for AppStream catalog XML (see <xref linkend="tag-ct-suggests"/> in catalog XML).
		</para>
		<para>
			The <literal>suggests</literal> tag must have one or more <code>&lt;id/&gt;</code> tags as children, specifying the IDs of the suggested other software components.
		</para>
		<para>
			Example:
		</para>
		<programlisting language="XML"><![CDATA[<suggests>
  <id>org.kde.gwenview.desktop</id>
  <id>org.inkscape.inkscape</id>
</suggests>]]></programlisting>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-content_rating">
		<term>&lt;content_rating/&gt;</term>
		<listitem>
		<para>
			The <code>&lt;content_rating/&gt;</code> tag is an optional tag which can be added to specify age ratings for the respective software components.
			These maybe be used for parental control or to display their information in software centers.
		</para>
		<para>
			The tag must have a <literal>type</literal> property, indicating the type of the rating system that is used. At the moment, the
			<ulink url="https://hughsie.github.io/oars/">Open Age Ratings Service</ulink> (value <code>oars-1.0</code>) is supported natively, but more services might be
			added in future.
		</para>
		<para>
			The <code>&lt;content_rating/&gt;</code> tag may have <code>&lt;content_attribute/&gt;</code> children which each must have an <literal>id</literal> property indicating
			the specific section that is rated. Their value indicates the intensity of the rated section and can be one of:
		</para>
		<itemizedlist>
			<listitem><para><literal>none</literal> - no rating given</para></listitem>
			<listitem><para><literal>mild</literal></para></listitem>
			<listitem><para><literal>moderate</literal></para></listitem>
			<listitem><para><literal>intense</literal></para></listitem>
		</itemizedlist>
		<para>
			In case the <code>&lt;content_rating/&gt;</code> tag is empty (no <code>&lt;content_attribute/&gt;</code> is present), it is assumed that the component was checked
			for age ratings and no age restrictions apply.
		</para>
		<para>
			The website of the Open Age Ratings Service provides <ulink url="https://hughsie.github.io/oars/generate.html">an online form</ulink> which will automatically generate AppStream
			compatible metadata based on a set of questions answered about the content.
		</para>
		<para>
			Example:
		</para>
		<programlisting language="XML"><![CDATA[<content_rating type="oars-1.0">
  <content_attribute id="drugs-alcohol">moderate</content_attribute>
  <content_attribute id="language-humor">mild</content_attribute>
</content_rating>]]></programlisting>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-agreement">
		<term>&lt;agreement/&gt;</term>
		<listitem>
		<para>
			The <code>&lt;agreement/&gt;</code> tag is an optional tag which can be added to specify agreements the user has to accept or acknowledge before using the software.
			This tag can appear multiple times, if multiple agreements are required for a software component.
		</para>
		<para>
			The tag should have a <literal>type</literal> property, indicating the type of the agreement. If the <literal>type</literal> property is missing,
			an agreement of type <code>generic</code> is assumed.
			Currently recognized agreement types are:
		</para>
		<itemizedlist>
			<listitem><para><literal>eula</literal> - an  end-user license agreement the user has to accept before installing the software.</para></listitem>
			<listitem><para><literal>privacy</literal> - a privacy statement for the software, usually a <ulink url="https://www.eugdpr.org/">GDPR</ulink> compliant statement</para></listitem>
		</itemizedlist>
		<para>
			The <code>&lt;agreement/&gt;</code> tag must have a <literal>version_id</literal> property, containing a version identifier for the license. It may be used by client applications to
			determine whether an agreement needs to be shown again after it has been accepted already by the user.
		</para>
		<para>
			Every <code>&lt;agreement/&gt;</code> must have <code>&lt;agreement_section/&gt;</code> children which each have an <literal>id</literal> property indicating
			the specific section that they describe (e.g. <code>introduction</code>). These values may be used to automatically jump to a specific section.
			Each <code>&lt;agreement_section/&gt;</code> has a translatable <literal>name</literal> child denoting the name or title of the respective section, and a <literal>description</literal>
			child that is translated according to the same translation rules that apply to the <xref linkend="tag-description"/> tag.
			The <literal>description</literal> contains the content of the respective agreement section.
		</para>
		<para>
			Example:
		</para>
		<programlisting language="XML"><![CDATA[<agreement type="privacy" version_id="1.0">
    <agreement_section id="introduction">
      <name>Introduction</name>
      <description>
        <p>
          We hold personal data about vendors, administrators, clients and other
          individuals for a variety of purposes.
          [...]
        </p>
      </description>
    </agreement_section>

    <agreement_section id="scope">
      <name>Scope</name>
      <description>
        <p>
          This policy applies to all users who have access to any of the personally
          identifiable data.
        </p>
      </description>
    </agreement_section>

    [...]
</agreement>]]></programlisting>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-update_contact">
		<term>&lt;update_contact/&gt;</term>
		<listitem>
		<para>
			The <code>&lt;update_contact/&gt;</code> tag is an optional tag which can be added to provide an email address distributors can use to contact the project
			about invalid or incomplete metadata or – in case the specification has changed – about old metadata. It can also be used to ask general questions in case of
			an update of the component described in the metadata file.
		</para>
		<para>
			The <code>&lt;update_contact/&gt;</code> tag must <emphasis>only be used by distributors</emphasis>. It is not included in the distribution-provided
			AppStream XML file, and therefore not exposed to the end user via any kind of UI.
		</para>
		<para>
			Upstream authors might decide to add an email address in cleartext, but spam protection using <code>_AT_</code> is also valid.
			The value of this tag is generally treated a case-insensitive way.
		</para>
		<para>
			Example:
		</para>
		<programlisting language="XML"><![CDATA[<update_contact>developer_AT_example.com</update_contact>]]></programlisting>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-name_variant_suffix">
		<term>&lt;name_variant_suffix/&gt;</term>
		<listitem>
			<para>
				Variant suffix that software centers may append to the component name on lists in case multiple components have the same name.
				This is currently primarily used for firmware, where components only need to be distinguished if multiple variants are displayed.
				A name variant suffix could e.g. be 'Prerelease' or 'China'.
			</para>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-branding">
		<term>&lt;branding/&gt;</term>
		<listitem>
		<para>
			The <code>&lt;branding/&gt;</code> tag is an optional tag which defines properties affecting the branding and presentation of the
			component. It usually affects how the component is displayed in software centers and on websites.
		</para>
		<para>
			The tag may currently only contain <literal>color</literal> tags as children, defining accent colors for the component. Each
			<literal>color</literal> element contains an HTML hexadecimal color string as its value. This string must start with a <literal>#</literal> character.
			An accent color may for example be used as the background behind the logo/icon of an application.
		</para>
		<para>
			A <literal>color</literal> tag must have a <literal>type</literal> attribute which denotes the color type. The color type
			may currently only be <literal>primary</literal>.
			A <literal>color</literal> tag may have an optional <literal>scheme_preference</literal> attribute which denotes a preference
			for a particular color scheme where this color should be used over other colors. Values for this attribute may either be
			<code>light</code> or <code>dark</code> for a light or dark theme preference.
			Each color type/scheme combination may only appear once.
		</para>
		<para>
			Example:
		</para>
		<programlisting language="XML"><![CDATA[<branding>
  <color type="primary" scheme_preference="light">#ff00ff</color>
  <color type="primary" scheme_preference="dark">#993d3d</color>
</branding>]]></programlisting>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-tags">
		<term>&lt;tags/&gt;</term>
		<listitem>
		<para>
			The <code>&lt;tags/&gt;</code> tag is an optional tag which can be used to give the component one or multiple arbitrary labels.
			For example, it can be used for apps to tag themselves as "featured" in specific software centers, or to group software together
			by some well-defined criteria.
		</para>
		<para>
			The interpretation of tags is completely defined by the client application that is reading AppStream metadata. Tags defined
			in metainfo files may be filtered by catalog metadata generators, and may even be completely ignored by clients. Components
			must not rely on the presence of specific tags to behave correctly.
		</para>
		<para>
			The <literal>tags</literal> tag must have <literal>tag</literal> children which must have a value comprised only of lower-case
			ASCII characters, dots, hyphens and numbers. Spaces are not allowed. The tag must also have a <literal>namespace</literal>
			attribute to designate a namespace where the particular tag is valid. The namespace is an arbitrary string which has the
			same character limitations as the tag value. It may for example be the name of the client too that consumes the data, or
			the name of the organization the tag belongs to.
		</para>
		<para>
			Example:
		</para>
		<programlisting language="XML"><![CDATA[<tags>
  <tag namespace="lvfs">vendor-2021q1</tag>
  <tag namespace="plasma">featured</tag>
</tags>]]></programlisting>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-references">
		<term>&lt;references/&gt;</term>
		<listitem>
		<para>
			The <code>&lt;references/&gt;</code> element is an optional tag to indicate references to this component in other registries.
			This is primarily used for scientific registries, citation information and DOI
			(<ulink url="https://en.wikipedia.org/wiki/Digital_object_identifier">Digital Object Identifier</ulink>) associations.
		</para>
		<para>
			This information is primarily consumed by specialized tools, but may also be shown by software centers or read by the
			applications themselves to compose references.
		</para>
		<para>
			The <literal>references</literal> element may have <literal>doi</literal> children containing DOI identifier strings as value,
			<literal>citation_cff</literal> children containing a link to a citation file in CFF (<ulink url="https://citation-file-format.github.io/">Citation File Format</ulink>)
			format or <literal>registry</literal> children.
			A <literal>registry</literal> child must have a <literal>name</literal> property containing the name of a registry referencing this component,
			while the value of it must be the identification string in the respective registry.
		</para>
		<para>
			Example:
		</para>
		<programlisting language="XML"><![CDATA[<references>
  <doi>10.1000/182</doi>
  <registry name="SciCrunch">SCR_000000</registry>
  <citation_cff>https://example.org/CITATION.cff</citation_cff>
</references>]]></programlisting>
		</listitem>
		</varlistentry>

		<varlistentry id="tag-custom">
		<term>&lt;custom/&gt;</term>
		<listitem>
		<para>
			The <code>&lt;custom/&gt;</code> tag is an optional tag which can be used as a key-value store for custom values that are not covered by the AppStream specification.
			The tag is usually stripped out or filtered by catalog metadata generators, such as <literal>appstream-generator</literal>.
			When present, the data contained in a <literal>custom</literal> can be read by all tools making use of AppStream metadata, making it an ideal extension point when using
			an existing AppStream library is desired and some custom additions to the metadata are still required.
			The <literal>custom</literal> tag is also often used for prototyping new features in AppStream.
		</para>
		<para>
			The tag must have <literal>value</literal> children which must have a <literal>key</literal> property. The value of the <literal>value</literal>
			tag denotes a user-defined value, while the key string set for the <literal>key</literal> property denotes a user-specified key string.
			The key must be unique; multiple keys with the same name are not allowed.
		</para>
		<para>
			To avoid name conflicts, it is recommended to prefix keys with a vendor prefix, like <code>GNOME::</code> or <code>KDE::</code>.
		</para>
		<note>
			<para>
				Before using a <literal>custom</literal> tag, please consider if there is a better way to achieve your goal than adding the data to the AppStream metainfo file,
				or whether AppStream maybe already contains a way to achieve what you want.
				Additionally, if you think that the purpose you use the <literal>custom</literal> tag for is generally useful, please file a feature request against AppStream,
				so we can discuss adding the new feature to the specification and make it more usable for a bigger audience.
			</para>
		</note>
		<para>
			Example:
		</para>
		<programlisting language="XML"><![CDATA[<custom>
  <value key="MyCorp::app_color">#FF0000</value>
  <value key="MyCorp::special_id">284fd262-6870-42a6-89a4-b189d3109e3e</value>
</custom>]]></programlisting>
		</listitem>
		</varlistentry>

	</variablelist>

	<para>
		An example for a very basic component file could look like this:
	</para>
	<programlisting language="XML">
<![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<component>
  <id>com.example.foobar</id>
  <name>Foo Bar</name>
  <summary>A foo-ish bar</summary>
  <url type="homepage">https://www.example.org</url>
  <metadata_license>CC0-1.0</metadata_license>

  <provides>
    <library>libfoobar.so.2</library>
    <font>foo.ttf</font>
    <binary>foobar</binary>
  </provides>
  <releases>
    <release version="1.2" date="2015-02-16" />
  </releases>
  <developer id="org.example">
    <name>FooBar Team</name>
  </developer>
</component>]]></programlisting>

	<para>
		For a component of type <literal>generic</literal>, the minimal amount of required tags is: <xref linkend="tag-id-generic"/>, <xref linkend="tag-name"/>,
		<xref linkend="tag-summary"/>, <xref linkend="tag-metadata_license"/>.
	</para>

	</section>
</section>
