- Jul 26, 2024
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
tests: Add sample code to print GLib messages with a priority prefix See merge request !731
-
Simon McVittie authored
logger: Add an early call to g_ascii_strtoull() to avoid a GLib bug See merge request !733
-
Simon McVittie authored
logger: Propagate error through _srt_syslog_level_parse See merge request !734
-
Ludovico de Nittis authored
log: Optionally prepend a priority level marker to each message See merge request !730
-
- Jul 25, 2024
-
-
Simon McVittie authored
If parsing fails, we'd like to know why. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
There is a difficult-to-reproduce failure mode in which g_ascii_string_to_unsigned() can fail to parse a valid integer, which was causing our tests to fail (but only on i386 and only in a specific non-interactive build environment). As far as I can make out, this is an error-handling issue in the way g_ascii_string_to_unsigned() calls g_ascii_strtoull(): if newlocale() clobbers errno (which it is within its rights to do, according to the usual errno conventions), then g_ascii_strtoull() would interpret that as a strtoull_l() failure. We can work around this by ensuring that our first call to g_ascii_strtoull() is one that doesn't matter, so that by the time we actually call g_ascii_string_to_unsigned(), the cached C locale object inside GLib has already been initialized. steamrt/tasks#481 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
steamrt/tasks#481 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Something similar to this could be used inside `steamwebhelper` and other Steam executables that are linked to GLib, if desired. Followup for steamrt/tasks#444. Typical output: ``` <3>priority-logwriter [main] internal error: this is a mockup of a critical warning <4>priority-logwriter [main] warning: this is a mockup of an ordinary warning <5>priority-logwriter [main] this is a mockup of a somewhat important message <5>priority-logwriter [main] this message <5>contains <5>multiple <5>lines <6>priority-logwriter [main] this is a mockup of an informational message <7>priority-logwriter [main] this is a mockup of a debug message <3>priority-logwriter [MyLib] (old log API) internal error: this is a mockup of a critical warning from a library <4>priority-logwriter [MyLib] (old log API) warning: this is a mockup of an ordinary warning from a library <5>priority-logwriter [MyLib] (old log API) this is a mockup of a somewhat important message from a library <5>priority-logwriter [MyLib] (old log API) this message <5>contains <5>multiple <5>lines <6>priority-logwriter [MyLib] (old log API) this is a mockup of an informational message from a library <7>priority-logwriter [MyLib] (old log API) this is a mockup of a debug message from a library <5>priority-logwriter [MyLib] Structured message: Invalid cross-device link [errno 18] ``` Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
If we're running under `srt-logger --parse-level-prefix`, it becomes useful for our tools to emit priority level markers on their diagnostic messages. In particular, we want pressure-vessel to tag its warning and error messages with one of these markers. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jul 24, 2024
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
logger: Add support for level prefixes See merge request !724
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jul 23, 2024
-
-
Simon McVittie authored
pv-runtime: Don't warn if library aliases are missing from secondary archs See merge request !728
-
- Jul 22, 2024
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jul 19, 2024
-
-
Ryan Gonzalez authored
This adds several tests to exercise the functionality, notably including tests for the buffering. steamrt/tasks#444 Signed-off-by:
Ryan Gonzalez <ryan.gonzalez@collabora.com>
-
Ryan Gonzalez authored
steamrt/tasks#444 Signed-off-by:
Ryan Gonzalez <ryan.gonzalez@collabora.com>
-
Ryan Gonzalez authored
The colors used follow systemd's journal log coloring. steamrt/tasks#444 Signed-off-by:
Ryan Gonzalez <ryan.gonzalez@collabora.com>
-
Ryan Gonzalez authored
This adds the ability to parse syslog prefixes from log lines by passing --parse-level-prefix to srt-logger. The corresponding lines will then be filtered based on the newly added --[journal/file/terminal]-level options. The presence of prefixes means that, when we start reading part of a line, it can no longer be sent out immediately, because it might be part of a level prefix that needs to be stripped off. To solve this, the parser code now does a *partial* buffering of all output: it will buffer log data until it is certain that it is *not* part of a level prefix, at which point all buffered data will be sent out to the otherwise unbuffered outputs (terminal/stderr), even if a newline hasn't been read yet. steamrt/tasks#444 Signed-off-by:
Ryan Gonzalez <ryan.gonzalez@collabora.com>
-
Simon McVittie authored
pv-runtime: Try to mount /usr/${LIB}/gconv into container See merge request !726
-
Simon McVittie authored
Previously we assumed that the hard-coded directory used to dlopen gconv modules matched the realpath() of the directory containing libc.so.6, disregarding any compatibility symlinks: for example, on Red Hat, 64-bit gconv modules are in /usr/lib64/gconv, and on Debian they're in /usr/lib/x86_64-linux-gnu/gconv. However, this turns out not to be true on Void Linux, where /usr/lib64 -> lib is a non-canonical path, but the hard-coded path that will be used to load iconv modules is /usr/lib64/gconv anyway. We cannot simply set GCONV_PATH, because apparently setting `GCONV_PATH=/usr/lib/gconv:/usr/lib32/gconv` will break 32-bit applications: unlike the equivalent with LD_LIBRARY_PATH, a 32-bit application would try and fail to load the 64-bit module from /usr/lib/gconv (it will fail to load because its word size does not match the word size of the process), and then will not fall back to /usr/lib32/gconv as one might expect. Luckily, on Void Linux, the libdl dynamic string token ${LIB} has been chosen such that the correct path for each architecture's gconv modules is /usr/${LIB}/gconv. We can use this as an additional guess at the necessary mount point for the gconv modules, mounting /usr/lib/gconv onto both /usr/lib/gconv and /usr/lib64/gconv - that way, it doesn't matter whether the path hard-coded in glibc matches our old heuristic or our new heuristic, because either one will work. steamrt/tasks#477, ValveSoftware/steam-runtime#680 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jul 18, 2024
-
-
Ryan Gonzalez authored
This doesn't make a large difference at the moment, but it's an important refactor for being able to easily partially buffer lines while parsing the level prefixes. steamrt/tasks#444 Signed-off-by:
Ryan Gonzalez <ryan.gonzalez@collabora.com>
-
Simon McVittie authored
Our older runtimes are symmetrical, so the vast majority of libraries (and in particular, the ones that need aliases for an alternate SONAME) are available for both x86_64 and i386. However, in some of our newer runtimes like medic, we've started dropping i386 libraries that don't strictly need to exist in order to save some space. This means we can't necessarily assume that libraries that need aliases will exist for every architecture, so we shouldn't emit warnings if they turn out not to exist. steamrt/tasks#367 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
On x86, the 0'th architecture is hard-coded to be x86_64. On other platforms, there is only one architecture, which is whatever we are compiling for. 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>
-
Ludovico de Nittis authored
pv-runtime: Don't try to mask /etc/vulkan/*.d See merge request !727
-
- Jul 17, 2024
-
-
Simon McVittie authored
Since updating our Flatpak-derived code, every time we start a container we log messages like: N: Not replacing "/etc/vulkan/implicit_layer.d" with tmpfs: Path "/etc" is reserved by the container framework We only import selected directories from /etc into the container's /etc, and none of the directories below /etc/vulkan are among them, so there is actually no need to mask these directories. Silence the warning by not attempting to mask them. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This was implemented in a way that assumed it would only be enabled on specially-flagged developer systems, making it acceptable for the implementation to be non-robust and make assumptions about the host systems on which it would be enabled; but current Steam betas enable it for the steamwebhelper unconditionally, which would cause serious regressions on non-Debian-derived, non-Arch-derived host OSs. Revert the addition of this feature to avoid regressions. Before reinstating it, we will either need to arrange for Steam to enable it conditionally as previously planned, or make the implementation fail gracefully and harmlessly on non-Debian-compatible host systems. This reverts commit d6a519f5. steamrt/tasks#416 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Jul 09, 2024
-
-
Simon McVittie authored
Now that steam-runtime-tools requires GLib 2.58, all backports older than that no longer conflict with s-r-t's backports (and they're skipped anyway as a result of the version checks). 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
pv-runtime: Add a mechanism to take custom CA certificates from the host See merge request !692
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
logger: Make it easier to attach a logger to a shell script See merge request !722
-
Simon McVittie authored
There are a few places where we want to log the output of a shell script without having to execute srt-logger wrapped around a second shell script as a subprocess. steam.sh and steamwebhelper.sh already use srt-logger, and bin_steam.sh might follow soon. To achieve this, we need to use either a bash coprocess or at least one fifo, because process substitution only creates a one-way pipe. Currently all the scripts where we want to use the logger are bash scripts (as opposed to pure POSIX sh) so we can still take advantage of other bashisms: process substitution and named redirections. Even when using those bash features, the synchronization required between the logger and its parent is non-trivial, so putting it in a shell library makes it easier to achieve. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-