Skip to content

Flatpak-related fixes

Simon McVittie requested to merge wip/flatpak into master

This fixes enough Flatpak regressions that we can at least do the sandbox-bypass-based approach to launching the game. The next step after this is to use https://github.com/flatpak/flatpak/pull/4018 to launch the game in a less sandbox-bypassing way (which will likely need --filesystem=/tmp, --filesystem=host-os:ro, and a non-setuid bwrap that can be told to share the pid namespace with Steam itself, but at least it shouldn't need a full sandbox bypass).

Includes !192 (merged) and !193 (merged). Still WIP, but can be reviewed commit-by-commit.

/cc @denittis


  • launch: Narrow scope of strv_builder

    We only need this in one branch.

  • launch: Add the ability to unset environment variables everywhere

    If we're doing the equivalent of flatpak-spawn or flatpak-spawn --host, we can emulate the unset-env option by running env -u.

  • pressure-vessel: In Flatpak, use pv-launch to run commands on the host

    Instead of asking flatpak-spawn to use Flatpak's D-Bus API, we can use pv-launch to talk to the same D-Bus API, which gives us one fewer component to align to get a working prototype.

  • pressure-vessel: Remap $HOME for Flatpak correctly

    Because we were testing for a prefix match with a trailing slash, when FlatpakExports exports /home/me, we would not rewrite it to /home/me/.var/app/com.valvesoftware.Steam.

    Instead of adding the necessary special cases, use a slightly refactored version of flatpak_has_path_prefix(), which already does what we need.

  • pressure-vessel: In Flatpak, put game in same userns/pidns as Steam

    Otherwise, pid-based IPC between the Steam client and the game will fail.

    This is not expected to work if bwrap on the host is setuid, so it will not work for users of Debian, Arch linux-hardened, etc., but it's better than nothing.

  • pressure-vessel-wrap: Remove --host-fallback option

    We are not going to be able to do this from within Flatpak, and it is unsuitable for running runtimes other than Steam Runtime 1 'scout', for which the LD_LIBRARY_PATH runtime mostly already works.

    If we need an automatic fallback to running on the host for scout games, we can do that better by running pressure-vessel-wrap --test.

Edited by Simon McVittie

Merge request reports