report: move facts generator out of PID1 into a separate varlink service

The collection of facts is entirely unprivileged and has very little to
do with PID1. PID1 is privileged and single-threaded and a point of
contention, so we shouldn't put things in PID1 that don't need to be
there. A separate service can be enabled/disabled/started/stopped at
will, is easy to sandbox, etc. If it turns out to be necessary to
collect some facts through PID1 in the future, we can always add a
smaller facts endpoint to PID1 again.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-04-01 16:38:11 +02:00
parent c26f432729
commit b47139e489
13 changed files with 165 additions and 32 deletions
+22
View File
@@ -0,0 +1,22 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
#
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
[Unit]
Description=Report System Basic Facts Socket
DefaultDependencies=no
Before=sockets.target
[Socket]
ListenStream=/run/systemd/report/io.systemd.Basic
FileDescriptorName=varlink
SocketMode=0666
Accept=yes
RemoveOnStop=yes
[Install]
WantedBy=sockets.target