- Mar 17, 2021
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
When using Exherbo as the host system, the locales are located in "/usr/${gnu_tuple}/lib/locale". For this reason if we notice that the canonical "/usr/lib/locale" is missing, we also try the Exherbo's paths before skipping it. Partially addresses: #67 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Simon McVittie authored
This fixes two separate issues: * It's parsed by all known versions of libasound.so.2, so it will work for both Steam Runtime 1 'scout' and Steam Runtime 2 'soldier', as well as future runtimes. Previously, we were using a path that only works in runtimes newer than scout. * It's a direct child of /etc, which in our case is a tmpfs, so we don't need to worry about whether we will be able to create a mount point in a subdirectory. Fixes: 1b720eb7 "wrap: Set PulseAudio as the default ALSA driver if available" Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Otherwise, the first time we use a particular runtime, GC will fail with a user-visible warning. We're going to create the variable directory moments later anyway, so this should be no big deal. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
If the host system stores the shared libraries in a directory that is not what we expect, we try as a last resort `/usr/share`, in an effort to increase the number of OSs that we are able to cover. For example this should help Exherbo to find the right libdrm and drirc.d directories. Fixes: #68 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Mar 16, 2021
-
-
Ludovico de Nittis authored
If a library has different SONAMEs, called aliases in "steam-runtime-abi.json", it might lead to errors when a game tries to load a SONAME that is not the "real" library SONAME (the DT_SONAME that objdump shows). Because `ld.so.cache` will not consider the aliases when searching for the right match. To workaround this problem we create a directory called "aliases" that contains symlinks of the libraries aliases that we know about. By adding these directories, one for every multiarch, in the `LD_LIBRARY_PATH`, we ensure that even games that were linked to an alias will be able to find the library they were looking for. Helps: https://github.com/ValveSoftware/steam-runtime/issues/246 Fixes: T26816 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Mar 04, 2021
-
-
Simon McVittie authored
When using Primus/Bumblebee, having this available is apparently enough for at least some games to work, and having this not available will result in the driver failing to load. Note that Primus/Bumblebee is not really supported by any of the GPU or driver vendors. Using PRIME render offloading (DRI_PRIME=1 for open-source Mesa drivers, __NV_PRIME_RENDER_OFFLOAD=1 for the proprietary NVIDIA drivers) is likely to work more reliably. Helps: https://github.com/ValveSoftware/steam-runtime/issues/372 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Mar 03, 2021
-
-
Ludovico de Nittis authored
Respect the `STEAM_COMPAT_FLAGS` values in pressure-vessel. Currently the only expected flag is `search-cwd` that is used to append the game current working directory, stored in `STEAM_COMPAT_INSTALL_PATH`, to the `LD_LIBRARY_PATH`. Resolves: https://github.com/ValveSoftware/steam-runtime/issues/371 Fixes: #46 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Feb 26, 2021
-
-
Simon McVittie authored
Flatpak subsandboxes don't have sufficiently powerful control over the container to use bubblewrap or FlatpakExports directly. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
My Flatpak branch puts it at /run/parent/app, alongside /run/parent/usr. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is experimental and subject to change. It requires branches of Flatpak that have not yet been reviewed or merged, so it's guarded by (deliberately undocumented) environment variables by default. Only enable this if you are a pressure-vessel developer and know precisely what you're doing. This feature also requires a non-setuid bwrap executable, and a kernel that allows the non-setuid bwrap to create new user namespaces. Fedora, Ubuntu, Debian >= 11, and Arch Linux's default kernel are examples of systems that should be OK; Debian <= 10, SteamOS 2, and Arch Linux's linux-hardened are not. I'm landing this despite its experimental status because leaving it in a branch means we have to rebase it all the time, which just slows us down. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
If we are using the provider graphics stack, including mesa, we should also bind the drirc settings. Otherwise we would end up using the older settings from the runtime. The default configuration file is expected to be located under `/usr/share/drirc.d`, with an additional system-wide configuration file called `/etc/drirc` and a per-user configuration `$HOME/.drirc`. The only one that has been left out by this commit is the one that comes from `$HOME`, because we normally already share the whole home directory, so we expect it to be already available in the container. Fixes: #60 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
By generalizing pv_runrime_collect_libdrm_data() and pv_runtime_finish_libdrm_data() we will be able to reuse these functions when we need to import other directories that are expected to be located under `/usr/share`, like `drirc.d`. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Feb 25, 2021
-
-
Ludovico de Nittis authored
This allows us to reduce the code duplication in pv_bwrap_run_sync(). Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Simon McVittie authored
If we are using a non-Debian-based runtime's terminfo, in particular if we're in Flatpak, then it won't normally search /lib/terminfo. This is problematic for PRESSURE_VESSEL_SHELL, because ncurses-base puts the xterm-256color terminfo in /lib/terminfo. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Feb 24, 2021
-
-
Simon McVittie authored
This was meant to use the graphics stack from the container itself, but we don't normally test that case (having graphics drivers is considered useful if you want to run games!) so it regressed. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We mostly don't actually use this to bind ICDs, so the name is misleading. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Feb 23, 2021
-
-
Ludovico de Nittis authored
Instead of calling bwrap every time we need to bind a library, or the dependencies of a library, we group them together to speed up the whole process. In `bind_icd()`, to decide whether to use a numbered subdir or not, we check if a symlink for the same library already exists. It also compares the directory size before and after the binding to check if we were actually able to capture it. For this reason we decided to not group together the ICDs/Layers, to avoid having side effects like in the previous commit "runtime: improve ICDs binding speed" and to avoid an overly complicated hard to follow implementation. Instead we group together only the libraries that need to be binded in `arch->libdir_in_current_namespace`. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Simon McVittie authored
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>
-
Simon McVittie authored
This is opt-in: the idea is that the shell scripts will enable this option when they switch from doing deployment themselves to letting the C code do it. The soldier and scout names are hard-coded, because those are the only legacy runtimes that have ever had public releases. 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>
-
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>
-
- 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>
-
- 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>
-