- Feb 23, 2021
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If we want to delete outdated temporary deployment directories such as deploy-soldier_x.y.z, then we have to wait until we have decided which one is current, so we can avoid deleting that one. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Feb 22, 2021
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Previously, this was done by the deploy-runtime script in SteamLinuxRuntime. Moving it into C code gives us better error handling and more reliable locking. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
pv_runtime_init_variable_dir() creates it if it doesn't already exist, so we don't need to check that it already exists, which in turn means we don't need to pre-create it in main(). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We need to hold an exclusive lock while carrying out GC, because any number of processes could be trying to create temporary copies there at the same time, and if that's happening then it's unsafe for the GC pass to be looking at the temporary copies concurrently. Only do the GC pass opportunistically, if we can get an exclusive lock without waiting. Conversely, while we're creating the temporary copies, we continue to take out a non-exclusive lock; but if another process is in the middle of a GC pass, we want to wait for it instead of just failing. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
At the moment the only use for the variable directory is for --copy-runtime-into, but in future we will also use it to unpack temporary runtime archives. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Feb 19, 2021
-
-
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:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
_srt_resolve_in_sysroot raises a GError, so it's a bug to set the GError again. Just put an explanatory prefix on the error we already had. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Putting a prefix on the rather opaque error should make it more obvious what we were trying to do. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
This includes a fix to propagate the X11 cookies that have an address equal to XAUTHLOCALHOSTNAME. Useful especially for OpenSUSE systems. Fixes: #53 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Feb 18, 2021
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Feb 16, 2021
-
-
Simon McVittie authored
We'll need this if we want to put a Flatpak subsandbox in our process ID namespace, so that Steam and the game can use process-ID-based IPC. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This was added in Flatpak 1.10.0. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Feb 09, 2021
-
-
Ludovico de Nittis authored
If we are not going to use the locales temp dir, we remove it immediately. Otherwise it will be left in /tmp/ forever (usually until a system reboot). Fixes: #56 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Feb 04, 2021
-
-
Simon McVittie authored
Previously, if we were using a Flatpak-style runtime, the argument to --runtime= had to be its ./files subdirectory. Now we accept the top-level directory as an alternative. This will make it more straightforward for pressure-vessel-wrap to take responsibility for unpacking and deploying runtimes that are shipped as a tarball, which is currently done in the SteamLinuxRuntime shell scripts, resulting in error handling and locking being less robust. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This avoids the Steam fossilize and overlay layers being duplicated in the container's search path. Resolves: T26160 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This will break the ability to find .desktop files, etc., in their default search paths. Default to /usr/local/share:/usr/share as per the specification. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Feb 03, 2021
-
-
Simon McVittie authored
When a JSON manifest in the graphics provider contains an architecture-specific absolute library path (like Mesa in most distributions), we relied on the kind being set to ICD_KIND_NONEXISTENT when we tried the other word size; otherwise, we would create a duplicate JSON manifest, which apparently confuses at least Proton. This reverts commit ee73d5bd. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jan 29, 2021
-
-
Ludovico de Nittis authored
Instead of repeatedly calling "capsule-capture-libs" we combine all the libraries that we need with the same destination directory, greatly reducing the number of processes that needs to be spawn. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Jan 27, 2021
-
-
Simon McVittie authored
We share /tmp with the host, and it seems odd to share /tmp but put /var/tmp on our private tmpfs, particularly when /var/tmp is traditionally longer-lived and more spacious than /tmp (for example, /tmp on a small tmpfs and /var/tmp on a large disk is common). In the unusual case where we are using a fake $HOME, we mount its ~/.cache/tmp on our container's /var/tmp, consistent with Flatpak. That doesn't change here, and it's still persistent unless explicitly deleted. Prompted by <https://github.com/ValveSoftware/steam-runtime/issues/313#issuecomment-766526963 > Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Normally it does, so applications might misbehave if they can't create files and directories inside it without needing to create it first. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
The root filesystem of the container is a tmpfs anyway, so we don't need a separate tmpfs. This is consistent with what Flatpak does. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We could make a symlink /etc/amd -> /run/host/etc/amd or /run/gfx/etc/amd, as appropriate, but this seems neater. Resolves: https://github.com/ValveSoftware/steam-runtime/issues/313 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We'll use this in more places in a subsequent commit. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We take the same action for each of these files, so let's make the code more data-driven. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Similar to the previous commit, if the graphics stack provider is not the host, we want to put its /etc in /run/gfx/etc, alongside /run/gfx/usr. Partially addresses <https://github.com/ValveSoftware/steam-runtime/issues/313 >. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
There are three user-space Vulkan driver stacks for recent AMD GPUs: - Mesa RADV, open-source drivers from the Mesa community - AMDVLK, open-source drivers from AMD - AMDGPU-PRO, proprietary drivers from AMD (presumably based on AMDVLK) At least one of the two AMD-maintained drivers requires files that are installed in /etc/amd. Partially addresses <https://github.com/ValveSoftware/steam-runtime/issues/313 >. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jan 18, 2021
-
-
Ludovico de Nittis authored
If we parse the "env-if-host" options as "G_OPTION_ARG_STRING_ARRAY", Glib assumes them to be encoded with the current locale. This can be an issue when pressure-vessel needs to run the main game, because Steam will set "LC_ALL=C", but the "env-if-host" might still contain characters that are not ASCII. To solve this we use "G_OPTION_ARG_FILENAME_ARRAY" that treats the options as opaque byte-blobs. Fixes: #52 Fixes: steam-runtime#349 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Jan 13, 2021
-
-
Simon McVittie authored
Previously, pv_capture_output() always inherited pressure-vessel-wrap's own environment, and bwrap->envp was ignored. Thanks to @mawww on Github for spotting this. Fixes: f584a55c "runtime: Don't assume container's env is in the PATH" Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Making this configurable as an environment variable will help us to move the logic for unpacking and GC'ing runtimes from SteamLinuxRuntime shell scripts into pressure-vessel C code. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Making this configurable as an environment variable will help us to move the logic for unpacking and GC'ing runtimes from SteamLinuxRuntime shell scripts into pressure-vessel C code. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jan 12, 2021
-
-
Simon McVittie authored
This is a container-manager-agnostic version of probing /.flatpak-info and /run/pressure-vessel. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jan 11, 2021
-
-
Simon McVittie authored
Clear Linux uses the same cross-architecture ld.so.cache as most distributions (Debian, Fedora, etc.), but puts it in /var/cache/ldconfig to meet their goal of /etc being empty. Create a symlink so that when their glibc tries to load that filename inside the runtime, what it gets is the runtime's /etc/ld.so.cache. Exherbo uses a ld.so.cache per architecture, which we added to a table of known per-architecture ld.so.cache filenames in commit c10e8831. Create symlinks for those too, similar to the Clear Linux case; this has not yet been verified to work, but it can't hurt. It's looking as though NixOS might be adding a Nix-specific filename for the ld.so cache (currently they don't have one at all). When that happens, we can add it to the same array as the Clear Linux filename. Other distributions that turn out to need this can be treated like Clear Linux if they share one cache between all architectures, or like Exherbo if they have a separate cache per architecture. Partially addresses <https://github.com/ValveSoftware/steam-runtime/issues/345>, which also needs <https://gitlab.collabora.com/vivek/libcapsule/-/merge_requests/43>. Also partially addresses <https://github.com/ValveSoftware/steam-runtime/issues/230 >. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
If we don't use `--setenv` directly, the process that we create with "pv_bwrap_execve()" could throw some errors because it is unable to preload the libraries that we specified, because they are valid only in the container structure. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Jan 08, 2021
-
-
Simon McVittie authored
This will reduce the diff in later commits that actually change logic, hopefully making them easier to review. Best reviewed with `git diff --ignore-space-change` or similar. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-