- Jan 23, 2020
-
-
Simon McVittie authored
Taken from Flatpak. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This keeps us more in sync with the equivalent code in Flatpak, helping us to merge fixes from there. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jan 06, 2020
-
-
Simon McVittie authored
Non-OFD locks don't propagate across fork(), and bwrap needs to clone() itself (which behaves like fork() in this respect) to separate itself into a parent outside the container and a child inside the container. This change adds a weak dependency on Linux 3.15. If we run on an older version, everything should still *work*, but there will be a short period of time during which we have already decided to use the runtime, but it is not locked (and in particular not protected from deletion). Fixes: 959fd338 "wrap: Take out a lock on the container's runtime for the duration" Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
These more modern locks, introduced in Linux 3.15 and not yet included in POSIX, propagate across fork(), dup(), fd-passing etc. the way you'd expect: as long as at least one copy of the inherited or fd-passed file descriptor remains open, the lock remains held. This allows us to pass a lock fd to a child process across bwrap's fork-and-exec the way we were already trying to, and have it actually work. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is redundant with us passing the fd to be held by pressure-vessel-with-lock, and it causes bwrap to produce the wrong exit status (see https://github.com/containers/bubblewrap/issues/336 and https://github.com/containers/bubblewrap/pull/325 ). It should have been removed when the "pass the lock fd" code path was added. Fixes: 959fd338 "wrap: Take out a lock on the container's runtime for the duration" Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Dec 13, 2019
-
-
Simon McVittie authored
When we're using a non-trivial runtime, we need to make pressure-vessel-with-lock available to the container. Previously, if your pressure-vessel installation was visible via your home directory (if shared), via $(realpath ~/.steam/steam), or via the current working directory at the time of running pressure-vessel-wrap, then it would exist in the container at the same path as outside the container, so this would work. However, if you have installed it in an alternative Steam library such as /media/big/library, none of these mount points would make it visible and bwrap would fail to run it. Circumvent this by mounting the relocatable pressure-vessel prefix on /run/pressure-vessel, which lets us run it via that path. Bug: https://github.com/ValveSoftware/steam-runtime/issues/204 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Nov 14, 2019
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We can use this in the SteamLinuxRuntime depot to deploy and garbage-collect runtimes stored in tarballs. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If we upgrade from runtime 0.20191024.0 to 0.20191108.0 while an app or game is still running under runtime 0.20191024.0, then deleting the app or game's shared libraries out from under it will probably break it. Flatpak solves this problem with a read/write lock on the file `files/.ref` - for runtimes this is `/usr/.ref` in the container. Each instance of `flatpak run` takes a read-lock on that file. Any number of processes can hold a read-lock at the same time. Before a package-manager-style operation like `flatpak uninstall` does anything destructive to a runtime, it takes a write-lock, which only succeeds if there are currently no read- or write-locks. Depending on the operation, the lock is either taken directly or by asking bubblewrap to do it. We'll use the same scheme. Different families of locking APIs interact unpredictably, so it's important that we use the same locking API as bubblewrap, namely POSIX byte-range (record) advisory locks via fcntl F_SETLK. In particular, this means flock(1) and flock(2) are not going to help us: they use POSIX file-level advisory locks. One difference between our locking and flatpak's is that we support runtimes that are not "merged /usr". In this case, we could either take a lock on files/.ref (/.ref in the container) or on files/usr/.ref (/usr/.ref in the container). I've chosen to do the former here, so that it's always files/.ref. It doesn't matter, as long as we're consistent. (For apps the lock file is `/app/.ref` and for extensions it's `$mountpoint/.ref`, but pressure-vessel doesn't have an equivalent of Flatpak apps or extensions yet.) This version is only a partial solution. We can't use bwrap --lock-file or bwrap --sync-fd without also using --unshare-pid, which breaks gameoverlayrenderer.so; so we do the next best thing, by leaking the lock fd to the bubblewrap process, which will leak it to the game's main process. This won't work if the game forks background processes, but it's good enough for a straightforward execve() chain. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is inspired by `ostree --version` and `docker version`. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Instead of {0, 0}, represent the absence of a short option with '\0' and the absence of flags with G_OPTION_FLAG_NONE. To support older GLib, provide a compatibility definition for the latter. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Nov 12, 2019
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Detected by scan-build. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This ensures that we include it in every translation unit. Rename it to _pressure-vessel-config.h to avoid accidentally including the wrong config.h in the presence of submodules. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Nov 11, 2019
-
-
Simon McVittie authored
If opt_runtime is NULL, it makes no sense to look at what happens if it is dereferenced. The intention here was to treat both NULL and the empty string as no runtime. Detected by clang scan-build. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This fixes failure to run with --unshare-home on systems where the Steam internal beta has never been used. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Sep 27, 2019
-
-
Simon McVittie authored
The NVIDIA proprietary EGL, GLES and Vulkan ICDs depend on libnvidia-eglcore and libnvidia-glvkspirv, but do not have DT_NEEDED entries for them (presumably they dlopen() them instead). capsule-capture-libs can only follow DT_NEEDED entries, so we have to special-case those hidden dependencies. Ideally we'd have a syntax for "libnvidia-*.so.* except libnvidia-gtk*", but currently we don't, so just include all the known libraries. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Sep 26, 2019
-
-
Simon McVittie authored
Otherwise, we can't rely on supported GPUs working inside the container. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
When doing the development build on a non-SteamRT OS (Debian buster), this means we need to take steam-runtime-tools from git. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Sep 25, 2019
-
-
Simon McVittie authored
This reverts commit 0d801cd9, which turns out to be unnecessary with a bit of restructuring. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Sep 24, 2019
-
-
Simon McVittie authored
The Vulkan code that I'm about to add uses a variable whose type cannot be used with g_autoptr. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This lets us use it as a GStrv-style string array. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Sep 12, 2019
-
-
Simon McVittie authored
This avoids relying on the host system (if using the host system) or the container (otherwise) having both its configured locales and the frequently-hard-coded en_US.UTF-8. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Sep 11, 2019
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Sep 10, 2019
-
-
Simon McVittie authored
We'll need this when we enter the container to generate locales. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Recent glibc versions dlopen this instead of libcidn.so.1. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Sep 05, 2019
-
-
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>
-
- Sep 04, 2019
-
-
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
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Aug 23, 2019
-
-
Simon McVittie authored
This opens up the possibility of amd64-only or i386-only runtimes, and in particular a SteamRT chroot created by setup_chroot.sh is either amd64-only or i386-only. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
It was previously named run_in_container, but it actually ran the executable on a read-only copy of the host system, with the runtime mounted on the "scratch" path (a tmpfs). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-