]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
mkosi: move setting for journald to mkosi.extra 35420/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 29 Nov 2024 19:31:45 +0000 (04:31 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 29 Nov 2024 19:31:45 +0000 (04:31 +0900)
mkosi.sanitizers/mkosi.extra/etc/systemd/system/systemd-journald.service.d/10-stdout-tty.conf [new file with mode: 0644]
mkosi.sanitizers/mkosi.postinst

diff --git a/mkosi.sanitizers/mkosi.extra/etc/systemd/system/systemd-journald.service.d/10-stdout-tty.conf b/mkosi.sanitizers/mkosi.extra/etc/systemd/system/systemd-journald.service.d/10-stdout-tty.conf
new file mode 100644 (file)
index 0000000..c6a2681
--- /dev/null
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Service]
+# Sanitizers log to stderr by default. However, journald's stderr is connected
+# to /dev/null, so we lose all the sanitizer logs. To rectify that, let's
+# connect journald's stdout to kmsg so that the sanitizer failures end up in the
+# journal.
+StandardOutput=kmsg
index a6b529a4d6cb0d9ff42696ac902e6f0a3766a4bf..e83d05c6bc92f92a72706b72e6b345460389cc7f 100755 (executable)
@@ -9,17 +9,6 @@ if [[ ! -f "$BUILDROOT/$LIBSYSTEMD" ]]; then
     exit 0
 fi
 
-# Sanitizers log to stderr by default. However, journald's stderr is connected to /dev/null, so we lose
-# all the sanitizer logs. To rectify that, let's connect journald's stdout to kmsg so that the sanitizer
-# failures end up in the journal.
-if [[ -f "$BUILDROOT"/usr/lib/systemd/system/systemd-journald.service ]]; then
-    mkdir -p "$BUILDROOT"/etc/systemd/system/systemd-journald.service.d
-    cat >"$BUILDROOT"/etc/systemd/system/systemd-journald.service.d/10-stdout-tty.conf <<EOF
-[Service]
-StandardOutput=kmsg
-EOF
-fi
-
 # ASAN and syscall filters aren't compatible with each other.
 find "$BUILDROOT"/usr "$BUILDROOT"/etc -name '*.service' -type f -exec sed -i 's/^\(MemoryDeny\|SystemCall\)/# \1/' {} +