- Jul 28, 2022
-
-
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
The documentation implied that --directory="" was the default, but actually it isn't. Perhaps it should be, but for now, make the man page document the reality. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Now that we're only using this tool for debugging and not for routine game-launching, we don't need to accommodate systems where the well-known D-Bus session bus is missing or broken. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Since the removal of PRESSURE_VESSEL_RELAUNCH_CONTAINER=0, we no longer use launcher-service for routine game launching, only for debugging. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Flatpak 1.12 supports the --app-path and --usr-path options, and was released a while ago. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jul 25, 2022
-
-
Simon McVittie authored
We're now looking at using descriptive tool names like "proton" and "container-runtme", rather than app-IDs. Follow that here. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If launcher-service is (mostly) mechanism, then this is policy. It uses argv[1] and $STEAM_COMPAT_LAUNCHER_SERVICE to decide whether to wrap a launcher-service around a game process. The idea is that Steam will set STEAM_COMPAT_LAUNCHER_SERVICE to the most appropriate layer of the stack at which to be inserting arbitrary debugging commands into a game. In previous prototypes, this was open-coded into each compat tool, but centralizing it is a lot easier for compat tool authors. Put a version in the name we use, to ensure that if we find we need to make breaking changes, we can rename to a new interface version (and optionally keep the old one around too). To minimize its startup time cost, this doesn't use GLib, only glibc. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
In the current prototypes, each compat tool is responsible for displaying a hint like this (if it wants to), but there are two problems with that: - each compat tool has to duplicate the code for finding a launch-client and suggesting how to launch it; - the compat tools can't know whether the service is providing multiple bus names via the --session option Move responsibility for this into the service. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
The precedence here was interpreted as s is not None or (t is not None and not h) instead of the intended (s is not None or t is not None) and not h resulting in an unintended second layer of xterm wrapper, even when using a container runtime. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jul 21, 2022
-
-
Simon McVittie authored
This allows the program on the service side to take the pseudo-terminal as its controlling terminal, giving it proper job control. steamrt/tasks#125 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jul 20, 2022
-
-
Simon McVittie authored
If stdin, stdout or stderr is a terminal, we want to set it as our controlling terminal to get things like job control. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jun 24, 2022
-
-
Ludovico de Nittis authored
For VA-API drivers we can expect to obtain the libva version they depend on. This is performed by looking for a symbol that starts with "__vaDriverInit_x_", where x represents the VA-API major version. The version check, when not needed, can be disabled with the flag `SRT_CHECK_FLAGS_SKIP_SLOW_CHECKS`. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Jun 23, 2022
-
-
Ludovico de Nittis authored
Create a function that opens a library and initializes its Elf. This allows us to reduce code duplication. Signed-off-by:
Ludovico de Nittis <ludovico.denittis@collabora.com>
-
- Jun 22, 2022
-
-
Simon McVittie authored
When this code moved into the shared library, it wasn't adapted to take into account pressure-vessel and steam-runtime-tools being separate log domains. The result was that PRESSURE_VESSEL_VERBOSE actually only made libsteam-runtime-tools verbose, and info/debug messages from the pressure-vessel directory were lost. Fixes: 2194b59a "Move pressure-vessel's logging setup into library code" Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jun 16, 2022
-
-
Simon McVittie authored
This can be combined with --no-stop-on-name-loss to make more than one instance of the same game accessible. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jun 15, 2022
-
-
Simon McVittie authored
Previously, the listener object would emit ::ready (because all of its zero remaining bus names have been acquired) and run the command as a subprocess even though the listener object is not really in the intended state. Now, if not run with --no-stop-on-name-loss, it will print an error message the first time a name cannot be acquired and exit unsuccessfully. Helps: steamrt/tasks#129 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This didn't account for the possibility of specifying both --terminate and a command. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is a convenient way to list possible targets. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
It's confusing if we say "launcher service" in one place and "launch server" in the other. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jun 14, 2022
-
-
Simon McVittie authored
This could be useful if we're routinely wrapping games in the launcher service: if that's the case, then we'll want to fall back to running the game without the launcher service if setup fails, rather than just not running any games until it's fixed. Resolves: steamrt/tasks#129 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This might make sense to be the default later, but for now it has to be requested explicitly. It currently only sets up com.steampowered.App1234. Additionally listening for ...App1234.Instance54321 could be added later if wanted. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This might be a useful way to have both per-app and per-instance bus names, for example com.steampowered.App1234 and com.steampowered.App1234.Instance54321 on the same server. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
These can be used to make the command-launcher service linger after a game has exited. For example, if the game crashes too soon after startup to be able to attach a debugger, this allows it to be re-run. Resolves: steamrt/tasks#127 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This can be used to keep the launcher service alive even if it has been replaced by another similarly-named launcher, for example when using a well-known name per Steam game. Resolves: steamrt/tasks#128 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Previously, the synopsis implied that --terminate was only allowed when not specifying a COMMAND, and the exit status description implied that `s-r-launch-client --terminate -- false` would exit 0 (in fact it propagates the exit status from false(1), and exits 1). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Previously, both success and failure came out as exit status 125, contradicting the man page, which said a successful --terminate was exit status 0. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Instead of using a GMainLoop, it's often clearer what is going on if we explicitly loop until a condition becomes false, and that seems to be the case here. Keeping better track of the circumstances under which we exit revealed that if we lose our D-Bus name (due to being replaced by a second instance with --replace), we would have exited after a short delay. This seems unfortunate, because we don't terminate our child processes in that situation, but exiting from the launcher-service process means that the launch-client processes cannot be informed when the child processes exit or given the opportunity to send signals to them, even if they are tracking the launcher-service by its unique name (as we started to do in a previous commit). Resolve this by continuing to not terminate the child processes, but also lingering until they have all exited, so that we can propagate their exit statuses back to the caller if it is watching our unique name. Similarly, in signal_handler() and exit_on_readable_cb(), previously we would unconditionally stop the main loop immediately. Now, we wait for child processes to exit and for a possible queue of D-Bus calls to be processed. Related to steamrt/tasks#128 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If the process we are terminating is not a process group leader, then killpg() will fail with ESRCH. This is particularly significant if we are terminating a wrapped process, for which we set `child_setup_data.keep_tty_session = TRUE` so that it will not give up its controlling terminal (if any). Before this change, `test_wrap_wait` in tests/pressure-vessel/launcher.py would leak its `sleep 600` subprocess, which was not correctly terminated by calling `s-r-launch-client --terminate`. Replace that with a `cat` subprocess so that we can detect when it has been terminated, and replace the previous use of stdout (which duplicated similar code in `test_wrap_info_fd`) to facilitate that. This will become more important when we keep better track of child processes in order to avoid exiting while there are still managed child processes running. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This wasn't particularly descriptive, and I now want to use the name pv_launcher_server_stop() for something else. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
With the `terminate-after` option, processes that make us exit are not necessarily the "main" process. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If the launched process is run directly (as opposed to via a wrapper script that runs it as a subprocess or puts it in the background), then this is a convenient way to attach a debugging tool like strace or gdbserver to the launched process (typically a game). The `MAINPID` variable name is borrowed from systemd.exec(5). Note that for tools that ptrace the game (like gdbserver and strace), this will not work on Ubuntu or other distributions that use YAMA, unless you set sysctl `kernel.yama.ptrace_scope=0` to remove the restriction on debugging non-child processes. main_pid remains set even after the main process has terminated, because this gives us a way to keep track of whether the process we are looking at was the main process (which we will want in a subsequent commit to clarify the message when implementing `terminate_after`), and to keep track of whether the main process was ever run (which we will want for steamrt/tasks#129). Resolves: steamrt/tasks#126 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
The launcher API is stateful: once we have asked an instance of the launcher to start a subprocess, we must send any subsequent Terminate() or SendSignal() messages to the original instance, not to a second instance that has taken over the same well-known bus name with `s-r-launcher-service --replace`. Similarly, we must listen for ProcessExited signals from the original instance, not a replacement. We can achieve this by resolving the well-known bus name (analogous to a DNS name) to a unique name (analogous to a dynamic IP address, but more so, since it is never reused during the lifetime of a dbus-daemon). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This bug was inherited from flatpak-spawn. Forwarded: https://github.com/flatpak/flatpak-xdg-utils/pull/59 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jun 08, 2022
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is a closer match for what Steam does, and provides ancillary features like logging and STEAM_COMPAT_LAUNCHER_SERVICE. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-