mirror of
https://git.yoctoproject.org/poky
synced 2026-05-01 15:32:12 +02:00
It was noticed that syslogd and klogd were no longer running on system startup, meaning no /var/log/messages etc.. It appears as though sysklogd has never been updated to follow the expected logging requirement for systemd as described here: https://www.freedesktop.org/wiki/Software/systemd/syslog/ As such no service was started and no logging present. Using the above guidelines we create two new service files syslogd.service and klogd.service. We make use of tmpfiles.d in order to ensure the xconsole device node exists and do other minor recipe cleanup to ensure peaceful coexistence with sysvinit and systemd implementations. The systemd documentation also asks that for a logger which is not rsyslog that we also enable 'ForwardToSyslog=' in journald.conf, but this is already the case so no action is required. With this change in place syslogd and klogd are started at system startup and the expected logs are available. Unfortunately I was not able to find any work done on this upstream or in other distros so this is my best effort at making this work. (From OE-Core rev: 914e08cf627e54e5019eda2154663c30b9a68ded) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
84 lines
3.0 KiB
PHP
84 lines
3.0 KiB
PHP
SUMMARY = "System Log Daemons"
|
|
DESCRIPTION = "The sysklogd package implements two system log daemons: syslogd, klogd"
|
|
HOMEPAGE = "http://www.infodrom.org/projects/sysklogd/"
|
|
SECTION = "base"
|
|
|
|
LICENSE = "GPLv2+ & BSD"
|
|
LICENSE_syslogd = "BSD"
|
|
LICENSE_klogd = "GPLv2+"
|
|
LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b \
|
|
file://syslogd.c;beginline=2;endline=15;md5=77ffb2fec48c46d7ca0abb2d5813e7fd \
|
|
file://klogd.c;beginline=2;endline=19;md5=7e87ed0ae6142de079bce738c10c899d \
|
|
"
|
|
|
|
inherit update-rc.d update-alternatives systemd
|
|
|
|
SRC_URI = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${PV}.tar.gz \
|
|
file://no-strip-install.patch \
|
|
file://0001-Fix-build-with-musl.patch \
|
|
file://sysklogd \
|
|
file://syslog.conf \
|
|
file://syslogd.service \
|
|
file://klogd.service \
|
|
file://tmpfiles.sysklogd.conf \
|
|
"
|
|
|
|
SRC_URI_append_e500v2 = " file://no-vectorization.patch"
|
|
|
|
SYSTEMD_PACKAGES = "${PN}"
|
|
SYSTEMD_SERVICE_${PN} = "syslogd.service klogd.service"
|
|
SYSTEMD_AUTO_ENABLE = "enable"
|
|
|
|
INITSCRIPT_NAME = "syslog"
|
|
CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}"
|
|
|
|
EXTRA_OEMAKE = "-e MAKEFLAGS="
|
|
|
|
CFLAGS_append = " -DSYSV"
|
|
|
|
do_install () {
|
|
install -d ${D}${mandir}/man8 \
|
|
${D}${mandir}/man5 \
|
|
${D}${base_sbindir}
|
|
oe_runmake 'BINDIR=${D}${base_sbindir}' \
|
|
'MANDIR=${D}${mandir}' install
|
|
install -d ${D}${sysconfdir}
|
|
install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
|
|
install -d ${D}${sysconfdir}/init.d
|
|
install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
|
|
install -d ${D}${systemd_unitdir}/system
|
|
install -m 644 ${WORKDIR}/syslogd.service ${D}${systemd_unitdir}/system
|
|
install -m 644 ${WORKDIR}/klogd.service ${D}${systemd_unitdir}/system
|
|
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true', 'false', d)}; then
|
|
install -d ${D}${exec_prefix}/lib/tmpfiles.d
|
|
install -m 644 ${WORKDIR}/tmpfiles.sysklogd.conf ${D}${exec_prefix}/lib/tmpfiles.d/sysklogd.conf
|
|
fi
|
|
}
|
|
|
|
FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}"
|
|
|
|
# sysklogd package has no internal systemd support, so we weigh busybox's
|
|
# sysklogd utility over it in case of systemd
|
|
ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd','10','100',d)}"
|
|
|
|
ALTERNATIVE_${PN} = "syslogd klogd syslog-conf \
|
|
${@bb.utils.contains('DISTRO_FEATURES','sysvinit','syslog-init','',d)}"
|
|
|
|
ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
|
|
ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd"
|
|
ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog"
|
|
ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
|
|
|
|
pkg_prerm_${PN} () {
|
|
if test "x$D" = "x"; then
|
|
if test "$1" = "upgrade" -o "$1" = "remove"; then
|
|
/etc/init.d/syslog stop || :
|
|
fi
|
|
fi
|
|
}
|
|
|
|
python () {
|
|
if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
|
|
d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
|
|
}
|