flatpak uses a hardcoded default PATH=/app/bin:/usr/bin. The
Freedesktop runtimes have a /usr/sbin -> bin symlink, and Flathub apps
will override sbindir with /app/bin where needed. OTOH the Fedora
runtime consists of RPM packages with distinct /usr/bin and /usr/sbin,
and apps compiling from RPM spec files and therefore might end up with
binaries in /app/sbin too.
https://gitlab.com/fedora/sigs/flatpak/fedora-flatpaks/-/issues/8
This copies the merge-dirs setup from org.freedesktop.Platform//21.08
and adds symlinks to hook into /etc/glvnd and /etc/vulkan.
Mesa and other rpm-packaged drivers install into /usr/share/glvnd and
/usr/share/vulkan, leaving /etc/glvnd and /etc/vulkan for sysadmin
overrides. Since there are no sysadmin overrides in flatpak we can use
this by making /etc/glvnd and /etc/vulkan symlinks to /usr/lib/GL/glvnd
and /usr/lib/GL/vulkan, which will then be filled in by the extensions.
See https://bugzilla.redhat.com/show_bug.cgi?id=1785251 for the discussion
of this setup.
We sadly can't use the same setup for OpenCL as there doesn't appear to
be a similar /etc/OpenCL and /usr/share/OpenCL split. It's probably
necessary to split mesa extension out of org.fedoraproject.Platform in
the future to get OpenCL correctly hooked up.
This matches with the flatpak-xdg-utils change that added flatpak
prefix to flatpak-xdg-utils versions of xdg-email and xdg-open.
With this change, we now include _both_ xdg-utils and flatpak-xdg-utils
in the module build, and overwrite the xdg-utils versions of xdg-email
and xdg-open with the flatpak-xdg-utils versions when building the
container.
Just adding the appdata to the flatpak-runtime-config wasn't sufficient -
we also have to run appstream-compose to get it in the right place for
flatpak build-bundle to find.
We need a separate repository for each runtime branch, since Bodhi always
overwrites the testing/latest tags in the repository when a build is pushed
to testing or stable.