From: ecordonnier@snap.com
To: openembedded-core@lists.openembedded.org
Cc: Etienne Cordonnier <ecordonnier@snap.com>
Subject: [PATCH 1/2] sysklogd: enable journal forwarding to syslog.socket
Date: Mon, 16 Nov 2026 10:21:02 +0100 [thread overview]
Message-ID: <20261116092104.3160433-1-ecordonnier@snap.com> (raw)
From: Etienne Cordonnier <ecordonnier@snap.com>
With systemd, syslogd.service requires syslog.socket and reads the
messages that journald forwards to it, which only happens with
ForwardToSyslog=yes. Install a journald drop-in enabling it so the
daemon keeps working once systemd-conf stops enabling it for every
image.
Tested on qemux86-64 with systemd: "logger" messages reach
/var/log/messages with the drop-in and are not logged without it.
AI-Generated: Uses Claude Code (claude-sonnet-5-5)
Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
---
meta/recipes-extended/sysklogd/sysklogd/50-sysklogd.conf | 2 ++
meta/recipes-extended/sysklogd/sysklogd_2.8.0.bb | 9 ++++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-extended/sysklogd/sysklogd/50-sysklogd.conf
diff --git a/meta/recipes-extended/sysklogd/sysklogd/50-sysklogd.conf b/meta/recipes-extended/sysklogd/sysklogd/50-sysklogd.conf
new file mode 100644
index 0000000000..29a7331b3c
--- /dev/null
+++ b/meta/recipes-extended/sysklogd/sysklogd/50-sysklogd.conf
@@ -0,0 +1,2 @@
+[Journal]
+ForwardToSyslog=yes
diff --git a/meta/recipes-extended/sysklogd/sysklogd_2.8.0.bb b/meta/recipes-extended/sysklogd/sysklogd_2.8.0.bb
index 79e2612653..762bf33504 100644
--- a/meta/recipes-extended/sysklogd/sysklogd_2.8.0.bb
+++ b/meta/recipes-extended/sysklogd/sysklogd_2.8.0.bb
@@ -12,6 +12,7 @@ inherit update-rc.d update-alternatives systemd autotools
SRC_URI = "git://github.com/troglobit/sysklogd.git;branch=v2.x;protocol=https;tag=v${PV} \
file://sysklogd \
+ file://50-sysklogd.conf \
"
SRCREV = "e2c0c1d9585e88b1a85e3634c4dc230517f68f0e"
@@ -23,6 +24,12 @@ do_install:append () {
install -m 644 ${S}/syslog.conf ${D}${sysconfdir}/syslog.conf
install -d ${D}${sysconfdir}/init.d
install -m 755 ${UNPACKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
+
+ # syslogd.service reads syslog.socket, which journald only feeds
+ # when ForwardToSyslog is enabled.
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
+ install -D -m 644 ${UNPACKDIR}/50-sysklogd.conf ${D}${systemd_unitdir}/journald.conf.d/50-sysklogd.conf
+ fi
}
SYSTEMD_PACKAGES = "${PN}"
@@ -33,7 +40,7 @@ INITSCRIPT_NAME = "syslog"
CONFFILES:${PN} = "${sysconfdir}/syslog.conf"
RCONFLICTS:${PN} = "rsyslog busybox-syslog syslog-ng"
-FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}"
+FILES:${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf ${systemd_unitdir}/journald.conf.d/50-sysklogd.conf', '', d)}"
ALTERNATIVE_PRIORITY = "100"
--
2.43.0
next reply other threads:[~2026-11-16 9:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 9:21 ecordonnier [this message]
2026-11-16 9:21 ` [PATCH 2/2] systemd-conf: stop forwarding journal to syslog by default ecordonnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261116092104.3160433-1-ecordonnier@snap.com \
--to=ecordonnier@snap.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.