- 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>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If opt_verbose is true, then we know we'll display these even if they are only at debug severity. Using g_debug instead of g_message gives them the correct prefixes in the log. Signed-off-by:
Simon McVittie <smcv@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
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>
-
Simon McVittie authored
These are the client side for <https://github.com/flatpak/flatpak/pull/4018 >. We'll use them to put the Steam Runtime on /usr and an empty directory on /app. Because the corresponding Flatpak change has not been merged, make it fail unless an undocumented environment variable has been set. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If the FlatpakExports has set these up to be symlinks, it's harmless to use --dir redundantly; but if we do these too soon, the FlatpakExports would be unable to create its symlinks and would fail. Resolves: https://github.com/ValveSoftware/steam-runtime/issues/368 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
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>
-
Simon McVittie authored
These indicate which lines are harmless and which lines are really bad, without taking up too much space. The mapping from GLib log level to message is not 100% obvious, because G_LOG_LEVEL_ERROR is "worse than" an error. We diagnose "can't happen" situations (assertion failures, etc.) as "Internal error". Ideally, users should never see these: they indicate a bug. For situations that will cause pressure-vessel to exit with an error, introduce a new log level flag PV_LOG_LEVEL_FAILURE and map it to the apt-style "E:" prefix. pv_log_failure() is a convenience macro to log at level PV_LOG_LEVEL_FAILURE. Conceptually this is a fatal error, but it's a fatal error prompted by something external to pressure-vessel, for which we want pressure-vessel to clean up "nicely" and exit gracefully, even though it's going to fail - so we can't use g_error() for this. In the parts of main() that involve parsing command-line arguments, add usage_error() as syntactic sugar for pv_log_failure(). I might eventually turn these into G_OPTION_ERROR_FAILED as we factor out more of main() into helper functions, but for now they're handled separately. For less-severe log levels, use single-letter prefixes similar to apt's. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Feb 25, 2021
-
-
Simon McVittie authored
wrap.c is generally too big, and so is main() specifically. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
wrap.c is generally too big, and so is main() specifically. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
The Flathub Steam app loads a LD_AUDIT module to ignore bundled libraries in games where they cause problems. We want to treat that essentially the same as LD_PRELOAD, at least until we take on its functionality. While we're changing this, also change the misleading name of the option. It was called --host-ld-preload, but it actually took the LD_PRELOAD module from the current execution environment, not the host. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Ludovico de Nittis authored
If needed, try to run `nvidia-modprobe` to load the necessary `nvidia_uvm.ko` kernel module. Fixes: #59 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
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>
-