- Apr 14, 2021
-
-
Simon McVittie authored
For a working Steam overlay, we need either a per-app-ID /dev/shm (flatpak#4214), or /dev/shm shared with the host. Similarly, for a working Steam overlay web browser, we need either a per-app-ID /tmp (flatpak#4093), or /tmp shared with the host. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Now that we're parsing /.flatpak-info, we can check whether we are able to talk to the session helper to run arbitrary code on the host. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Now that the ability to specify a custom path for /usr and /app has been merged into Flatpak git master, we can mostly assume that if the user has a git snapshot of Flatpak, they have that feature available. 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
wrap.c is too big, and main() in particular is too big, so anything we can reasonably factor out here is quite welcome. 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>
-
- Apr 13, 2021
-
-
Simon McVittie authored
Since !269, on systems where PulseAudio is available, we set PULSE_SERVER to a suitable non-empty value, and "lock" it into the environment to avoid it getting overridden by pressure-vessel-launch (in use-cases where we're using that). We also create an /etc/asound.conf in the container's namespace that will make PulseAudio the default for applications that use the ALSA user-space library libasound.so.2, such as Shadowrun Returns. Conversely, on systems where PulseAudio is *not* available (for example where the system is using plain ALSA), we "lock" PULSE_SERVER to a null value so that we will actively remove it from the environment if set. However, this caused a regression: we created /etc/asound.conf based on whether PULSE_SERVER was "locked", which effectively meant this was done unconditionally. An /etc/asound.conf that configures PulseAudio to be the default is not going to work on non-PulseAudio systems. Instead of checking whether PULSE_SERVER is "locked", check whether it's null. This has the desired effect: we configure PulseAudio to be the default if and only if we detected that it's available. Helps: https://github.com/ValveSoftware/steam-runtime/issues/344 Helps: https://github.com/ValveSoftware/steam-runtime/issues/384 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
libdrm.so.2 is not included in the freedesktop.org GL Platform runtime and this leads us to search for the libdrm directory in the wrong place. For this reason we first look at libdrm_amdgpu.so.1 and use libdrm.so.2 as a fallback. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
When we are in a Flatpak environment there are two issue: - It's common to have multiple data directory, usually one for every multiarch - If we bind the data directory in "/usr/share/${dir_basename}" there is no guarantee that it will be in the library search path For this reason we avoid raising a warning if we have multiple data directory and also we bind them preserving their original path. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
If we modify "/app" we want to bind it to the new subsandbox instead of always binding an empty directory. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
When we are in a Flatpak environment there are two issue: - It's common to have multiple data directory, usually one for every multiarch - If we bind the data directory in "/usr/share/${dir_basename}" there is no guarantee that it will be in the library search path For this reason we avoid raising a warning if we have multiple data directory and also we bind them preserving their original path. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
If we modify "/app" we want to bind it to the new subsandbox instead of always binding an empty directory. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Apr 12, 2021
-
-
Ludovico de Nittis authored
Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Apr 09, 2021
-
-
Ludovico de Nittis authored
When we are in a Flatpak environment we want to pick "localedef", "locale" and "ldconfig" from the Flatpak runtime instead of the ones provided by Scout/Soldier. By searching in the "provider_in_current_namespace" we can ensure to create a subsandbox where these executables are symlinked to the "/run/parent" counterpart. Fixes: T27438 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
When we search for gconv in the provider, if the directory we derived from libc starts with "/app/", we should not prepend "/usr/" because we don't expect to have "/usr/app/" in the provider. Without this patch, pressure-vessel in a Flatpak container fails to load i386 gconv with the following message: "We were expecting the gconv modules directory in the provider to be located in "/app/lib/i386-linux-gnu/gconv", but instead it is missing" Fixes: T27437 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Apr 06, 2021
-
-
Simon McVittie authored
Only root can do this. Updating libglnx has given us the ability to skip that step, so do so. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
pressure-vessel doesn't support having the Steam Library under `/usr`. When this happens, pressure-vessel fails without a clear indication of what went wrong. For this reason we add a warning message to point out that pressure-vessel was asked to bind a directory that will not appear in the resulting container. Helps: https://github.com/ValveSoftware/steam-runtime/issues/288 Helps: #30 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Mar 25, 2021
-
-
Simon McVittie authored
Helps: T27110 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Mar 23, 2021
-
-
Ludovico de Nittis authored
If we don't want to share the host home directory we expect to have either --home, --freedesktop-app-id, --steam-app-id or $SteamAppId. There are cases where this might not happen. For example if Steam has been launched with the PRESSURE_VESSEL_SHARE_HOME=0 env variable and we try to run "Help->System Information", the variable $SteamAppId will not be set and the container creation will fail. To avoid this issue we can use a tmpfs for the home directory when we are in batch mode. In this way the tmpfs will not be used if we need to run an actual game, because we want to retain the home directory on exit. Fixes: #66 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Mar 17, 2021
-
-
Simon McVittie authored
This regressed in steamlinuxruntime!32 when we stopped setting the deprecated PRESSURE_VESSEL_COPY_RUNTIME_INTO environment variable. If getenv() returns NULL, we need to keep the previous setting - TRUE in a Flatpak app or FALSE otherwise - instead of overriding it to FALSE. Fixes: steamlinuxruntime!32 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>
-
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
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>
-
Simon McVittie authored
When we're not using a runtime, we don't know for sure whether PulseAudio is even available, and we also won't be able to create a mount point in /etc because we're using the host's /etc as-is. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Mar 16, 2021
-
-
Simon McVittie authored
These arguments take a G_OPTION_ARG_DOUBLE, which is documented to be parsed using either the user's locale or the C locale (in fact they use g_strtod(), which parses it both ways and takes the longer match). The locale matters in locales like de_DE that use a decimal comma instead of a decimal point: we can always parse 2.000000 in the C locale, but we can only parse 2,000000 if we are in a correctly-set-up locale that uses the decimal comma. If we needed to generate new locale files inside the container, then pv-adverb needs to be able to parse its command-line before we have generated those locale files. This means that --terminate-idle-timeout=2,000000 won't work reliably, so we need to use the C locale format, --terminate-idle-timeout=2.000000. Using g_ascii_dtostr() has the side benefit that it uses the shortest possible representation that does not lose precision; in the common case that the timeout is an integer number of seconds, we'll just print it as an integer. Helps: https://github.com/ValveSoftware/steam-runtime/issues/381 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
To avoid audio issues, if we have successfully bound a PulseAudio socket, we should also set it as the default driver in ALSA. Addresses: #65 Partially addresses: https://github.com/ValveSoftware/steam-runtime/issues/371 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
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 12, 2021
-
-
Simon McVittie authored
This is how Flatpak behaves, and it's necessary to prevent the game-specific $HOME from being mounted over the top of some of the exports, preventing (for example) ~/.steam from being exposed to the container. We only do this for $HOME rather than completely reverting 3a8e939d, so that it won't be a regression for a symlink at /var/tmp. If the logical and physical paths to the real $HOME differ, we now also mount the game-specific $HOME onto the real $HOME's physical path, and replicate the logical path's symlinks in the container. This matches how Flatpak works, and avoids a similar regression. Fixes: 3a8e939d "pv-wrap: Delay --dir, etc. until after FlatpakExports are processed" Resolves: #63 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Mar 11, 2021
-
-
Simon McVittie authored
If we're not using a runtime, then all of /run/systemd is shared between host and container anyway. Mounting a socket over the top of an existing socket fails with "No such device or address" due to a bubblewrap bug (fixed in <https://github.com/containers/bubblewrap/pull/409 >). Signed-off-by:
Simon McVittie <smcv@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>
-
Ludovico de Nittis authored
Previously we were missing to include the Vulkan shaders in the relocatable pressure-vessel tarball. This leaded to `check-vulkan` to fail because it didn't find the required shaders. Fixes: #62 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@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>
-
Ludovico de Nittis authored
nss-resolve uses systemd-resolved to resolve hostnames and, since systemd 247, it utilize the varlink API. To make it run inside the container we need to expose the varlink socket. Check the upstream commit for more info https://github.com/flatpak/flatpak/commit/e5da98ff4b12a080044d58b4cd2fb4edb4491132 Fixes: #61 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Mar 01, 2021
-
-
Simon McVittie authored
Resolves: https://github.com/ValveSoftware/steam-runtime/issues/369 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-