Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]

2.16 Runtime

2.16.1 Introduction

Components of type runtime describe a collection of interdependent software components that are required to run other software. They set a baseline of dependencies that other software can rely on and link against. A very simple runtime may for example be a chroot environment of a minimal Linux system bootstrap. Runtimes are often employed by software distribution systems such as Flatpak (https://flatpak.org/) or Valve's Steam, but may be used by others and may even be directly distributed as part of tranditional Linux distributions.

Runtimes can ship metainfo files in /usr/share/metainfo/%{id}.metainfo.xml.

2.16.2 Example file

A runtime metainfo file can look like this:

<?xml version="1.0" encoding="UTF-8"?>
<component type="runtime">
  <id>org.freedesktop.Platform</id>
  <metadata_license>FSFAP</metadata_license>
  <project_license>LicenseRef-free=https://freedesktop-sdk.gitlab.io/</project_license>

  <name>Freedesktop Platform</name>
  <summary>Basic libraries to run Linux desktop applications</summary>

  <description>
    <p>
      The Freedesktop Platform is a runtime that contains the most basic libraries
      and files needed to run a Linux desktop application.
      ...
    </p>
  </description>
  <url type="homepage">https://freedesktop-sdk.gitlab.io/</url>

  <releases>
    <release version="10.0" />
    <release version="9.0" date="2020-01-12" />
    ...
  </releases>
</component>

2.16.3 File specification

Note that the XML root must have the type property set to runtime. This clearly identifies this metainfo document as describing a runtime.

<id/> 

For runtimes, the value of the <id/> tag must follow the AppStream ID naming conventions (it should be a reverse-DNS name).

<requires/> 

The requires tag may be used if multiple runtimes are based on top of each other, or if the runtime actually describes a software development kit (SDK) that wants to require its base runtime. See <requires/> & <recommends/> for a detailed description of this tag.

In order to depend on other runtimes, their component-ID should be referenced in a requires tag. Example:

<requires>
  <id version="1.0" compare="ge">org.freedesktop.Sdk</id>
</requires>
<project_license/> 

The <project_license/> tag usually indicates the license of the component (refer to <project_license/> for details). This is tricky for runtimes, as they are usually comprised of many individual pieces of software under different licenses, which would create a very long and complex SPDX license expression. It is therefore recommended to have the tool that builds the runtime collect all the licenses and generate a document or website containing. This document can then be linked using LicenseRef-free=URL if the runtime is free software, or LicenseRef-proprietary=URL in case it contains non-free elements.

Example:

<project_license>LicenseRef-free=https://example.com/licenses.html</project_license>
<provides/> 

This tag is described in detail for generic components at <provides/>.

The runtime may use the <provides/> tag to denote the individual modules it is comprised of, using their component IDs.

For a component of type runtime, the following tags are required and must be present for a valid document: <id/>, <name/>, <summary/>, <metadata_license/>, <project_license/>.