Skip to content
Snippets Groups Projects
Simon McVittie's avatar
Simon McVittie authored
In the code path where we copy a file that would not otherwise be
visible in the container, the copy doesn't actually work, because
glnx_file_copy_at() opens regular files with O_NOFOLLOW and so refuses
to read through the "magic symlink", failing with ELOOP.

This can be reproduced by having a Vulkan ICD manifest in
/etc/vulkan/icd.d/*.json whose `library_path` is just a SONAME.
pressure-vessel tries to copy the file, and fails.

It turns out glnx_file_copy_at() is not the right function here anyway,
because it tries to fchown() the destination file to match the source
file, which is going to work poorly if we are copying a file owned by
root (which we often are). Just use the important part of it, which is
glnx_regfile_copy_bytes().

Resolves: https://github.com/ValveSoftware/steam-runtime/issues/366


Signed-off-by: default avatarSimon McVittie <smcv@collabora.com>
31c96036
History

steam-runtime-tools — Steam Runtime integration for the Steam client

The steam-runtime-tools library provides low-level Unix-specific tools and functionality for the Steam client, including the pressure-vessel tool that runs Steam games in containers.

To support multiple architectures (currently only i386 and x86_64 are supported), you will need to build it once for each architecture and install at least the helper tools in /usr/libexec/steam-runtime-tools-0 (the libsteam-runtime-tools-0-helpers package) for every architecture in parallel.

The helper tools are located relative to the shared library, so it's OK to bundle steam-runtime-tools alongside some other stack in this layout:

anything/
    lib/
        x86_64-linux-gnu/
            libsteam-runtime-tools-0.so.0
    libexec/
        steam-runtime-tools-0/
            i386-linux-gnu-*
            x86_64-linux-gnu-*

as long as the program that is linked to libsteam-runtime-tools-0.so.0 can find it (via a RPATH or RUNPATH or by setting the LD_LIBRARY_PATH environment variable).

pressure-vessel — putting Steam in containers

The pressure-vessel/ subdirectory of this project contains the pressure-vessel utilities, which are used by Steam's Steam Linux Runtime compatibility tool to run games in individual game-specific containers. For background on pressure-vessel and SteamLinuxRuntime, please see: