- Aug 06, 2024
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This would have made it considerably easier to spot that commit 8f65507d "logger: Recreate output log files if they get deleted" was reopening the log file more often than it should have been. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Otherwise, after reopening a deleted or replaced file, we would reopen it once per line, because its inode number constantly differs from the original inode number. After commit 1f502cb4 "logger: Fix always re-opening files when --log-fd is used", this was the only remaining place where we assign to self->file_fd without also assigning to self->file_stat. Fixes: 8f65507d "logger: Recreate output log files if they get deleted" Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Aug 05, 2024
-
-
Ryan Gonzalez authored
I wasn't aware that simple assignment worked here. steamrt/tasks#487 Signed-off-by:
Ryan Gonzalez <ryan.gonzalez@collabora.com>
-
Ryan Gonzalez authored
`self->file_stat` was only initialized if an fd was *not* given, which would lead it to always re-create the log file once. steamrt/tasks#487 Signed-off-by:
Ryan Gonzalez <ryan.gonzalez@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
logger: Recreate output log files if they get deleted See merge request !740
-
Simon McVittie authored
pv-runtime: Don't import host CA certificates when running under Snap See merge request !741
-
- Aug 02, 2024
-
-
Ryan Gonzalez authored
Before writing a log line to the file, first check to make sure that it's still around. If not, then just re-create it, so that clearing the current logs out doesn't actually stop future logs from appearing. This takes advantage of the existing fstat() setup that checks the file size and swaps it out with stat() to be able to pick up on the file going missing. (That change shouldn't introduce any notable race conditions on the directory side, because srt-logger has already chdir'd into the log file directly, and self->filename isn't a full path in the first place.) steamrt/tasks#487 Signed-off-by:
Ryan Gonzalez <ryan.gonzalez@collabora.com>
-
Ryan Gonzalez authored
This is useful for the next commit that will need to do this locking elsewhere. steamrt/tasks/#487 Signed-off-by:
Ryan Gonzalez <ryan.gonzalez@collabora.com>
-
Simon McVittie authored
steamrt/tasks#416 Mitigates: https://github.com/canonical/steam-snap/issues/397 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
- Aug 01, 2024
-
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
pv-runtime: Add more robust mechanism to take CA certificates from the host See merge request !737
-
Simon McVittie authored
Update Flatpak-derived files from 1.15.9 See merge request !736
-
Simon McVittie authored
glib-backports: Avoid g_log_writer_is_journald() on GLib 2.58.x See merge request !738
-
- Jul 31, 2024
-
-
Simon McVittie authored
This function is present in GLib 2.58.x, but had a bug: it cached its result, even if called on different file descriptors. Normally this doesn't matter, because normally this function is only called on either stdout or stderr anyway, and if one of them is the Journal, usually the other one is too. Unfortunately, log.c calls `g_log_writer_is_journald (STDOUT_FILENO)` before `g_log_writer_is_journald (STDERR_FILENO)`; and on Steam Deck, when using `logger-0.bash`, srt-logger gets invoked with stdout pointing to a pipe and stderr to the Journal. So we would cache the result "not the Journal" from stdout, and then use it for stderr. Use a backport of the fixed version (or, in fact, the internal function that it calls) instead of the GLib 2.58 version. steamrt/tasks#461 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This is a redo of commit d6a519f5 "pv-runtime: Add a mechanism to take custom CA certificates from the host" which aims to be more robust against host operating systems that might not have the Debian-compatible layout that we expect. This reverts commit 9e3d9c85. steamrt/tasks#416 Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
Move g_ascii_strtoull() workaround to a global constructor See merge request !735
-
- Jul 26, 2024
-
-
Simon McVittie authored
This removes most of the `#if 0` from `flatpak-utils.c`: everything with non-trivial dependencies was moved to other translation units upstream. Signed-off-by:
Simon McVittie <smcv@collabora.com>
-
Simon McVittie authored
This means we can rely on the workaround being effective for anything that is dynamically linked to libsteam-runtime-tools, or statically linked to steam-runtime-tools/utils.c (in practice this means all of our non-trivial programs). Followup from steamrt/tasks#481 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
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>
-