Packaging Runtimes

As we’ve seen, each Flatpak targets a particular runtime, which provides shared binaries, libraries, and data files, and is mounted at /usr when the Flatpak is run.

Most Flatpaks in Fedora target the org.fedoraproject.Platform runtime, which is referred to as runtime-name: flatpak-runtime in container.yaml. It is similar to the latest version of the upstream org.gnome.Platform runtime, with some additions. In general, you will not need to modify this runtime when creating an application, since any additional packages you need will be bundled with the application. However, if you find a bug in the runtime and want to help fix it, or want to help participate in maintainance of the Fedora runtimes, then it’s useful to know how runtimes are built.

In addition to the org.fedoraproject.Platform, five other runtimes are built in Fedora infrastructure:

org.fedoraproject.Sdk

This is a SDK that extends org.fedoraproject.Platform with compilers and header files to enable building applications against it using the flatpak-builder tool.

org.fedoraproject.KDE6Platform

This runtime includes Qt 6 and KDE Frameworks 6. It is similar to the latest 6.x version of the upstream org.kde.Platform runtime. Referred to as runtime-name: flatpak-kde6-runtime in container.yaml.

org.fedoraproject.KDE6Sdk

The SDK corresponding to org.fedoraproject.KDE6Platform

org.fedoraproject.KDE5Platform

This runtime includes Qt 5 and KDE Frameworks 5. It is similar to the latest 5.15-YY.MM version of the upstream org.kde.Platform runtime. Referred to as runtime-name: flatpak-kde5-runtime in container.yaml.

org.fedoraproject.KDE5Sdk

The SDK corresponding to org.fedoraproject.KDE5Platform

Runtimes are defined in a similar way to Flatpaks. The content of the runtimes is defined in each runtime’s container.yaml file: flatpaks/flatpak-runtime. flatpaks/flatpak-sdk. flatpaks/flatpak-kde6-runtime. flatpaks/flatpak-kde6-sdk. flatpaks/flatpak-kde5-runtime. flatpaks/flatpak-kde5-sdk. These git repositories should be kept tightly in sync with each other, but don’t need to be modified very often.

The package lists in each container.yaml are maintained with scripts which generate definitions for a runtime and SDK in tandem. For more information about the maintenance scripts, see the README.md for flatpak-runtime and flatpak-sdk, or the README.md for the KDE runtime and SDK.