From d715f02da0591ae88d889dc2be31a5cebfb44e17 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Sat, 27 Sep 2025 10:12:57 +0200 Subject: [PATCH] board: enable rauc upgrade history and event logging (json) The rauc event logger is a separate glib logger that by default logs to the system console, with annoying ANSI escape sequences. This commit drops the default stdout/stderr redirect of these log messages and adds a more exhaustive bundle install and event log, in json format, instead. For more information about event logging, see the rauc documentation: https://rauc.readthedocs.io/en/latest/advanced.html Signed-off-by: Joachim Wiberg --- board/aarch64/rootfs/etc/rauc/system.conf | 6 ++++++ board/common/rootfs/etc/finit.d/available/rauc.conf | 2 +- board/riscv64/rootfs/etc/rauc/system.conf | 6 ++++++ board/x86_64/rootfs/etc/rauc/system.conf | 6 ++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/board/aarch64/rootfs/etc/rauc/system.conf b/board/aarch64/rootfs/etc/rauc/system.conf index fddcd199..75fb8fad 100644 --- a/board/aarch64/rootfs/etc/rauc/system.conf +++ b/board/aarch64/rootfs/etc/rauc/system.conf @@ -6,6 +6,12 @@ mountprefix=/var/lib/rauc/mnt bundle-formats=-plain max-bundle-download-size=1073741824 +[log.event-log] +filename=/var/log/upgrade-json.log +format=json-pretty +max-size=1M +max-files=5 + [keyring] directory=/etc/rauc/keys diff --git a/board/common/rootfs/etc/finit.d/available/rauc.conf b/board/common/rootfs/etc/finit.d/available/rauc.conf index 9a87c408..f6489063 100644 --- a/board/common/rootfs/etc/finit.d/available/rauc.conf +++ b/board/common/rootfs/etc/finit.d/available/rauc.conf @@ -1,5 +1,5 @@ set G_MESSAGES_DEBUG=nocolor service [2345] \ - env:-/etc/default/rauc log:prio:user.notice \ + env:-/etc/default/rauc \ rauc service $RAUC_ARGS -- Software update service diff --git a/board/riscv64/rootfs/etc/rauc/system.conf b/board/riscv64/rootfs/etc/rauc/system.conf index 681d96c4..85387aa7 100644 --- a/board/riscv64/rootfs/etc/rauc/system.conf +++ b/board/riscv64/rootfs/etc/rauc/system.conf @@ -6,6 +6,12 @@ mountprefix=/var/lib/rauc/mnt bundle-formats=-plain max-bundle-download-size=1073741824 +[log.event-log] +filename=/var/log/upgrade-json.log +format=json-pretty +max-size=1M +max-files=5 + [keyring] directory=/etc/rauc/keys diff --git a/board/x86_64/rootfs/etc/rauc/system.conf b/board/x86_64/rootfs/etc/rauc/system.conf index e47a49a5..eff130b8 100644 --- a/board/x86_64/rootfs/etc/rauc/system.conf +++ b/board/x86_64/rootfs/etc/rauc/system.conf @@ -7,6 +7,12 @@ mountprefix=/var/lib/rauc/mnt bundle-formats=-plain max-bundle-download-size=1073741824 +[log.event-log] +filename=/var/log/upgrade-json.log +format=json-pretty +max-size=1M +max-files=5 + [keyring] directory=/etc/rauc/keys