- Nov 21, 2022
-
-
Simon McVittie authored
Adding annotations to these functions means mypy will attempt to analyze them. It doesn't have particularly good information for PyGI code, but something is better than nothing. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Nov 17, 2022
-
-
Simon McVittie authored
This has three main functions: - If stdout and/or stderr are /dev/null, send warnings to the systemd Journal so they don't get lost, along with debug messages if enabled. - If the user requests it, redirect stdout and/or stderr to the systemd Journal so that everything will be logged in one place. - If stdout and/or stderr is already a Journal file descriptor inherited from a parent process, reopen it with our own details, and send our log messages with a bit more metadata. This obsoletes _srt_util_set_up_logging(), which did the first two of those. This is a per-application opt-in, because each application that will make use of this needs to be aware that it might redirect stdout and stderr. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This does a few closely related things. If standard input, standard output and standard error are closed, we open them to point to /dev/null, and if they are close-on-exec, we clear their close-on-exec flags. This is to avoid weird side effects: most APIs like open() that create new file descriptors guarantee to use the lowest-numbered fd that is not already in use, but users of those APIs do not expect to be overwriting stdin/stdout/stderr. Because that operation can involve changing the meaning of stdout and stderr, we now optionally save a duplicate of the original standard output and standard error, so they can be put back later. Because we're now saving a duplicate of the original standard output and standard error, it also makes sense to implement SRT_LOG_FLAGS_DIVERT_STDOUT here. This avoids needing to call _srt_divert_stdout_to_stderr() separately in most callers. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If we are going to write to the systemd Journal, we will want the program name to already be known, so that we can use it as the syslog identifier (first argument to sd_journal_stream_fd() and openlog()). This also reduces duplication a bit, and brings us one step closer to combining _srt_util_set_up_logging() with _srt_util_set_glib_log_handler(). Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Nov 16, 2022
-
-
Simon McVittie authored
These were intended to be written to the original stdout, but we didn't do that until after we'd already replaced stdout with stderr to avoid random diagnostic messages appearing on the original stdout. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Nov 03, 2022
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
We can use this to set up different types of logging with a single log handler, which will make it easier to add new flags, such as a flag to make the log more deterministic to minimize diff. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Sep 07, 2022
-
-
Simon McVittie authored
Recent betas of Steam have the steam-launch-wrapper, an exec'd adverb which runs "inside" the Launch Options (if any) and the reaper, but "outside" compatibility tools. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Aug 25, 2022
-
-
Simon McVittie authored
Let's keep all the examples together. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is now the default in released versions, as part of the batch of quality-of-life changes in steamrt/tasks#145. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
As of 2022-08-25, the copy of scout in the GA Steam Client has a suitable version of s-r-launch-client, and the default branches of soldier, sniper, scout-on-soldier, Proton 7.0 and Proton experimental include the integration glue for s-r-launcher-interface-0. This lets us remove various warnings and caveats. Proton 6.0 and 5.13 will presumably never get this. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Aug 19, 2022
-
-
Simon McVittie authored
We need to do this before the earliest point where we might g_debug(). This fixes corrupted TAP output during build-time tests on Steam Runtime 1½ 'heavy' when G_MESSAGES_DEBUG=all and at least one of stdin, stdout or stderr is a terminal. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is fine for its use in steam-runtime/setup.sh, but could be a problem if used more generally. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jul 29, 2022
-
-
Simon McVittie authored
When a version with commit a792ef90 gets into stable releases, we'll no longer need to consider the behaviour that previously existed. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jul 28, 2022
-
-
Simon McVittie authored
I contributed this to flatpak-spawn in early 2021. It avoids the variables' values being visible in /proc/*/cmdline to other users' processes, and also avoids having a very long command-line if a lot of environment variables need to be propagated. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This ensures that an interactive shell gets the right TERM set, even if Steam itself was not run from a terminal. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This provides a way to undo previous or automatically-set environment variables. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This makes it a little bit easier to run shell logic like s-r-launch-client ... -c 'if foo; then bar; fi' or s-r-launch-client ... -c 'kill -INT $MAINPID' for which a shell interpreter is required. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This matches the behaviour of ssh, pkexec and similar tools. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
When we are behaving like flatpak-spawn(1), its behaviour of inheriting the current working directory makes sense: flatpak-spawn is meant to run a command with different sandboxing, but as though it was a child of the current process. Also, the current working directory for the flatpak-portal and flatpak-session-helper services is uninteresting (99% of the time it will be the user's home directory), so it will not usually be useful to inherit. However, when we are inserting commands into a running game, it makes more sense to inherit the game's current working directory, which is non-trivial (usually but not always the game's top-level installation directory). Change s-r-launch-client so it does that by default, instead of forcing its own working directory. steamrt/tasks#145 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 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>
-