- Nov 14, 2019
-
-
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
Enable and squash compiler warnings See merge request steam/pressure-vessel!11
-
Simon McVittie authored
This might give us more/different compiler warnings. 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
We assume that GArray aligns memory "nicely". Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
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
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
It's inconsistent to ask for this in warning_cflags, and immediately disable it in no_warning_cflags. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
libglnx assumes gcc/clang extensions to variadic macro syntax. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We're using GLib, and GLib explicitly doesn't support pedantic Standard C compilers: it assumes and requires the ability to cast between function pointers and data pointers. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Getting warnings when an unlikely code path isn't inlined is not actually very interesting for fixing bugs. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Go back to non-native versioning See merge request steam/pressure-vessel!15
-
Simon McVittie authored
Versioning pressure-vessel as a native package interacts poorly with the combination of the Open Build Service pseudo-binNMU suffix and the deb-build-snapshot tool used for prereleases: 0.20190927.0+7+g1234567+srt1 is less than 0.20190927.0+srt1, so 0.20190927.0 would wrongly be preferred over the prerelease at commit 1234567, 7 commits later than 0.20190927.0. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This avoids needing to install steam-runtime-tools there if we want to run "ninja dist". Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
https://gitlab.gnome.org/GNOME/libglnx/merge_requests/13 upstream. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This doesn't really matter, since it only happens when our process is about to exit anyway, but it makes it easier to use AddressSanitizer and similar tools. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This accidentally requires GLib 2.36. This reverts commit a652ede2. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
https://gitlab.gnome.org/GNOME/libglnx/merge_requests/13 upstream. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
wrap: Don't bind-mount ~/.steam/steambeta etc. if they don't exist See merge request steam/pressure-vessel!13
-
Simon McVittie authored
wrap: Fix logic for whether Steam Runtime is passed through See merge request steam/pressure-vessel!12
-
- Nov 11, 2019
-
-
Simon McVittie authored
This doesn't really matter, since it only happens when our process is about to exit anyway, but it makes it easier to use AddressSanitizer and similar tools. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
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
https://gitlab.gnome.org/GNOME/libglnx/merge_requests/13 upstream. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
-
Simon McVittie authored
Otherwise, clang diagnoses it as unused. It is - deliberately - only allocated and cleaned up, with no other use. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Build successfully on GLib 2.32 See merge request GNOME/libglnx!7
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If you're building on a really old GLib, you might not have GTask, GSubprocess or g_markup_parse_context_unref(), among others. This gets libglnx compiling (and apparently working) on GLib versions as old as 2.32. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-