- Sep 07, 2020
-
-
Simon McVittie authored
This adds a mechanism to redirect from the host to a sysroot, intended for unit testing, which we can (ab)use to redirect from the host to /run/host. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Sep 04, 2020
-
-
Simon McVittie authored
This lets us create /run/host and /run/pressure-vessel unconditionally, even if we're mostly using the host filesystem rather than a runtime. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Now that we export each subdirectory of the root separately, there's nothing to stop us from using the same function in the runtime and no-runtime cases. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This lets us separate them between those that will be processed as if via Flatpak --filesystem=host, and those that are dealt with individually. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
A lot of the code added here is #if 0. Normally we don't commit commented-out or #ifdef'd out code, but in this case it helps tools like gvimdiff to have enough context to figure out which parts of the file in Flatpak correspond to which parts of the file in pressure-vessel. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We want these to come after every other bind-mount. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If we're given a relative path, make it absolute before transforming it for the host. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
A reasonably common case is that the value on the host and in the container will be the same. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
When we have more than one layer of adverbs, this provides a way to tell which one we are. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This makes it a little clearer when we're exiting. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Sep 03, 2020
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Sep 02, 2020
-
-
Ludovico de Nittis authored
When the current namespace is a Flatpak environment launched with the `--filesystem` option to mount a directory that is under the user's home, e.g. `--filesystem=~/Games`, we don't want to convert the path to `~/.var/app/com.valvesoftware.Steam/[...]`, because on the host we expect to have the same path as we had in the Flatpak environment. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
When pressure-vessel is launched from inside a Flatpak container we are not allowed to create a parallel bwrap container. Using flatpak-spawn --host we can workaround this limitation. Please note that the permission to talk to "org.freedesktop.Flatpak" is required for this to work. For example you can use: `flatpak run --talk-name=org.freedesktop.Flatpak com.valvesoftware.Steam` Hopefully in the future we will be able to avoid the permission requirement of "org.freedesktop.Flatpak". Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
We keep a list of known environments that we might need inside the final bwrap container that will be launched by the host system. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
pressure-vessel had a few hard coded assumptions about the host system and where to look at for the graphics provider. For example it was assumed that the root was the same host system used by both pressure-vessel current environment (where pressure-vessel-wrap runs) and also later on by `bwrap`. But when we run pressure-vessel in a Flatpak container, the final `bwrap` command is expected to be executed against the real host system (mounted in `/run/host`, in Flatpak). Also when we are in a Flatpak container we might want to pick the graphics stack from the host system (`/run/host`), from the Flatpak container itself or it could even be a completely separate one. (T22373, T22371) Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
The filesystem that is providing /usr might not be mounted in the same place in the current namespace, and on the host system where bwrap will be run. If it isn't, we need to use one path to do file I/O when inspecting it, but pass a different path to bwrap. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
Ludovico de Nittis authored
With this new function it will be possible to test the existence or properties of a given filename under a specific sysroot. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Sep 01, 2020
-
-
Simon McVittie authored
The default for a FlatpakBwrap object is to copy the calling environment as a base for the environment that it will build up. However, that's wrong if we are going to merge more than one FlatpakBwrap together: the merged FlatpakBwrap's argv will be appended to the destination FlatpakBwrap, but the merged envp will overwrite the corresponding variables in the destination. Avoid this by making sure that every time we merge two FlatpakBwrap objects, one of them has an empty environment. Resolves: T23422 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Aug 20, 2020
-
-
Simon McVittie authored
This doesn't work for current scout because libpng has some weird symlinks, which are not shipped in the .deb but are created by ldconfig (see also Debian #706181, #713270), but a new version of libpng will fix that (T23209). Resolves: #3, T22126 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Aug 19, 2020
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Aug 18, 2020
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
-wrap eventually replaces itself with bubblewrap. If the bubblewrap process is killed, we want the adverb command to be terminated, passing the termination signal on to its own child process. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This can be used when launching Proton games, which consist of zero or more setup commands, which may launch background processes, followed by launching the game itself. A caller can wrap the game with pressure-vessel-adverb --subreaper to wait for all main-game processes (launchers, bug reporting systems, etc.) to exit before terminating the setup commands. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
While we control /run, we might as well be consistent. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This will let us have the following logic when sharing a container between multiple commands using -launcher and -launch: * For setup commands, don't wrap the launched command in the adverb. If the setup command starts background processes, they'll continue to run. This matches how installscript commands have historically worked for Windows (and Wine/Proton) games in Steam: the setup command is launched with system(), and can leak background processes like wineserver. * For the main game, wait for all processes to exit, by wrapping the launched command in the adverb, with --subreaper only. This matches how native Linux games, and the main command of Windows/Wine/Proton games, have historically worked in Steam. * When all processes belonging to the main game have exited, the -launcher can exit, at which point the subreaper that wraps it can clean up any background processes from the setup commands. --terminate-idle-timeout can be used to wait a few seconds before sending SIGTERM, if desired. Because the adverb now blocks SIGCHLD, we need to unblock it before running the child process; otherwise the child process will inherit the blocked signal, breaking things like g_spawn_async(). 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 makes the emulation closer, avoids GIOChannel getting in the way, and allows us to use the Unix fd source from non-default threads and main-contexts. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
signal_source and forward_signals_id were redundant. We only need one. 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 11, 2020
-
-
Simon McVittie authored
If we want to be able to use --filesystem=/tmp, then we can't set up the X11 socket until after we're finished with that. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Aug 05, 2020
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
To avoid needing special support for this on the launcher side, we implement this by wrapping the command in `env -u VAR`. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Aug 04, 2020
-
-
Simon McVittie authored
This allows a controlling process to terminate the launcher, even if it is wrapped in an "adverb" command like pressure-vessel-wrap that makes it non-straightforward to send signals to the launcher. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This terminates the server instead of running a command. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-