- Aug 05, 2021
-
-
Simon McVittie authored
We could inherit any RLIMIT_NOFILE from Steam or another caller, but we want to give games a predictable execution environment. If a game uses select(), allocates memory proportional to the soft limit on file descriptors, or loops for a number of iterations proportional to the soft limit on file descriptors (as we did prior to commit 97b5a8f6 "pressure-vessel: Let short-term subprocesses inherit non-CLOEXEC fds"), then file descriptors numerically greater than 1023 are going to be a problem. If the soft limit is more than 1024 (= FD_SETSIZE), reduce it to 1024 to avoid this. Conversely, if we're launched with a soft limit strictly less than 1024, let's try to raise it to 1024 if the hard limit allows that. Related to <https://github.com/ValveSoftware/steam-for-linux/issues/7970 >. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Aug 04, 2021
-
-
Simon McVittie authored
There's no point in giving it an option that it will just ignore. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
According to ld.so(8), either is equally valid for LD_PRELOAD (although note that LD_AUDIT only accepts colons). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Aug 03, 2021
-
-
Simon McVittie authored
This will allow pv-wrap to translate a host `LD_PRELOAD` item like `/usr/$LIB/libMangoHud.so` into a pair of `--ld-preload` options, each looking like `--ld-preload=/usr/lib32/libMangoHud.so:abi=i386-linux-gnu`. The only character that cannot appear in a `LD_PRELOAD` path entry is `:`, so we're free to use that as our representation for extra options. Instead of just appending the ABI tuple, use a key/value notation so we can extend later if we need to. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
At the moment the only way for this to get populated is when we guess it for gameoverlayrenderer.so, but a future commit will add a way to set it explicitly on the command-line. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This restructuring will let us add fields to the struct in future, in particular for architecture-specific modules. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We only have two elements and we're iterating over them linearly. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We didn't handle the case where SHARED_LIBRARY_GUARD_CONFIG is already set to a custom value. It could conceivably also be in /usr or /lib*, which need the same remapping. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This avoids having two different tables of supported architectures: we can just add gameoverlayrenderer_dir to the table we already have. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We can share this between PvRuntime and pv-adverb, which both want to know overlapping sets of details of known architectures. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We only need to do this once, and it's harmless to do this even if libshared-library-guard isn't even in use, so we might as well move it out of the loops. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
I think this makes it a bit clearer what's going on: we populate one list (currently a PreloadModule[]) from the command-line options, then translate it to form a second list (in -wrap it's a plain GPtrArray, in -adverb it's implicit in the environment variables we're setting). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This provides some more design-for-test that we can use when unit-testing wrap-setup.c. Forwarded: https://github.com/flatpak/flatpak/pull/4352 Applied-upstream: 1.11.3, commit:c392e5ad Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Three nested loops with non-indicative iterator names are enough to get confusing, so let's index this array with an iterator with a meaningful name. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Equivalent to <https://github.com/flatpak/flatpak-xdg-utils/pull/54 > in flatpak-spawn. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Aug 02, 2021
-
-
Simon McVittie authored
Resolves: T29581 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jul 29, 2021
-
-
Ludovico de Nittis authored
Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Jul 28, 2021
-
-
Simon McVittie authored
With the previous two commits, we are in sync with 1.11.2. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
/usr/local points to ../var/usrlocal on Fedora Silverblue. Originally Flatpak commits 3aaea7d2 and 97d1eb84, thanks to Casey Jao and Alexander Larsson. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Originally commit 08f69296 in Flatpak. Thanks to Phaedrus Leeds. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jul 22, 2021
-
-
Simon McVittie authored
Previously, we assumed that if OS files on the provider are in a location that is not /usr or a related directory, for example if the OS has /lib/ld-linux.so.2 -> /some/odd/path/i386/ld.so, then they will appear below the same path_in_container_ns as /usr, for example /run/host/some/odd/path/i386/ld.so. However, nothing sets this up for directories other than /usr, /lib*, /bin, /sbin and /etc, so it's a bad assumption. A previous commit handled /etc by redirecting it to /run/host/etc, /run/parent/etc or /run/gfx/etc as appropriate, so we don't need to worry about that here. For the rest, assume that if they appear in the container at all, they'll appear at a path that matches their location in the provider. For the common case where provider = host, which is the only one where we really need to support non-FHS layouts, this means that users can work around lack of explicit support for a particular non-FHS directory with something like PRESSURE_VESSEL_FILESYSTEMS_RO=/some/odd/path. In particular, if we didn't have explicit support for /nix, NixOS users would have been able to use that workaround to get it mounted. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If the realpath() of an OS file is below /etc, each of our code paths ends up with it visible below /run/host/etc, /run/parent/etc or /run/gfx/etc, as appropriate. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We must expose /nix in the sandbox as /nix, not /run/host/nix, because hard-coding paths below /nix is ubiquitous on NixOS. There's already a special case in wrap.c to mount /nix read-only. This resolves a regression that occurred when we switched to a runtime structure that relies on PRESSURE_VESSEL_COPY_RUNTIME. Resolves: https://github.com/ValveSoftware/steam-runtime/issues/431 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jul 21, 2021
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jul 20, 2021
-
-
Simon McVittie authored
This neatly separates the processes for the game (which can be numerous, for example for Proton games that need to run wineserver and winedevice.exe) from the processes for Steam. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Taken from Flatpak 1.11.2. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
When a game is launched with the Steam Overlay feature enabled (it's on by default), we end up with an LD_PRELOAD that contains `gameoverlayrenderer.so` two times, one for 32-bit and the other for 64-bit processes. However this leads to a warning that is harmless but scary for users and developers unaware of that: `ERROR: ld.so: object '/home/me/.local/share/steam/ubuntu12_64/gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.` And every 64-bit process prints something similar about the ELFCLASS32. By creating a temporary directory and using the dynamic linker token expansion `$PLATFORM` we can let a process preload only the `gameoverlayrenderer.so` for the right ABI. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Simon McVittie authored
This was only necessary because we were reusing a single container across multiple entry-point invocations, and expecting "most" arbitrary environment variables from each new invocation to be taken into account for commands running in the container, which meant that we needed to keep track of which environment variables had to be exceptions to that rule for technical reasons. Now that we're no longer injecting multiple commands into the same container like that, we don't need this complexity. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If we have libGLX_nvidia.so.0 for *any* architecture - even if we are msising some instances - then we still want to share /usr/share/nvidia with the container. Because we always use libGLX_nvidia.so.0 from the graphics stack provider and do not have a concept of whether it is older or newer, and we do not expect our runtime to have a copy of libGLX_nvidia.so.0, we do not need to worry about giving the runtime's library an incompatible version of the data files from the provider. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
The NVIDIA driver hard-codes /usr/share/nvidia even if it is installed in /opt or something, so instead of deriving ${prefix} from the library path and then checking for ${prefix}/share/nvidia followed by /usr/share/nvidia as a fallback, we do the opposite: check for /usr/share/nvidia first, followed by ${prefix}/share/nvidia as a fallback. Signed-off-by:
Simon McVittie <smcv@collabora.com> Resolves: #73 (T29292)
-
- Jul 14, 2021
-
-
Ludovico de Nittis authored
If we have libGLX_nvidia.so.0 from the provider, we should also bind `/etc/nvidia` and `/usr/share/nvidia` because they usually contain the application profiles. http://us.download.nvidia.com/XFree86/Linux-x86_64/470.42.01/README/profiles.html#ApplicationProf9ccbe Fixes: #73 Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Jul 05, 2021
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jul 01, 2021
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-