busybox & sysklogd: weigh busybox's syslogd/klogd utilities over those from sysklogd in case of systemd
cover busybox & sysklogd: weigh busybox's syslogd/klogd utilities over those from sysklogd in case of systemd
From: Chen Qi <[email protected]>
The following changes since commit c7994f83baa678a4670472e1f037bfc16cb1e3be:
bitbake: runqueue: Fix scenequeue to pass file descriptors, not a float (2013-09-02 09:16:24 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib ChenQi/systemd-syslog
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/systemd-syslog
Chen Qi (2):
busybox-syslog: add configuration file /etc/syslog.conf
sysklogd: lower the ALTERNATIVE_PRIORITY in case of systemd
meta/recipes-core/busybox/busybox.inc | 6 +++++- meta/recipes-core/busybox/busybox_1.21.1.bb | 1 + meta/recipes-core/busybox/files/syslog.conf | 1 + meta/recipes-extended/sysklogd/sysklogd.inc | 4 +++- 4 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-core/busybox/files/syslog.conf
Signature · 1 line
1.7.9.5
PATCH 1/2 busybox-syslog: add configuration file /etc/syslog.conf
From: Chen Qi <[email protected]>
By default, busybox has CONFIG_FEATURE_SYSLOGD_CFG enabled, but it doesn't ship a configuration file.
This patch adds a configuration file (/etc/syslog.conf) to the busybox-syslog package. This configuration file mainly serves as a placeholder now.
The advantages of this change are:
1. Make the users aware of the fact that the /etc/syslog.conf file will actually be parsed by busybox's syslogd utility. And configuring that file will change the logging behaviour.
2. In a systemd based system, this file will prevent the same configuration file provided by the sysklogd package from messing things up.
[YOCTO #5066]
--- meta/recipes-core/busybox/busybox.inc | 6 +++++- meta/recipes-core/busybox/busybox_1.21.1.bb | 1 + meta/recipes-core/busybox/files/syslog.conf | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-core/busybox/files/syslog.conf
meta/recipes-core/busybox/busybox.inc +5 -1
@@ -21,7 +21,7 @@ export EXTRA_LDFLAGS = "${LDFLAGS}" PACKAGES =+ "${PN}-httpd ${PN}-udhcpd ${PN}-udhcpc ${PN}-syslog ${PN}-mdev ${PN}-hwclock" FILES_${PN}-httpd = "${sysconfdir}/init.d/busybox-httpd /srv/www" -FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog" +FILES_${PN}-syslog = "${sysconfdir}/init.d/syslog* ${sysconfdir}/syslog-startup.conf* ${sysconfdir}/syslog.conf* ${systemd_unitdir}/system/syslog.service ${sysconfdir}/default/busybox-syslog" FILES_${PN}-mdev = "${sysconfdir}/init.d/mdev ${sysconfdir}/mdev.conf" FILES_${PN}-udhcpd = "${sysconfdir}/init.d/busybox-udhcpd" FILES_${PN}-udhcpc = "${sysconfdir}/udhcpc.d ${datadir}/udhcpc"
@@ -233,6 +233,7 @@ do_install () { if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${BPN} install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf.${BPN} + install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf.${BPN} fi if grep "CONFIG_CROND=y" ${B}/.config; then install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
@@ -290,6 +291,9 @@ inherit update-alternatives ALTERNATIVE_PRIORITY = "50" +ALTERNATIVE_${PN}-syslog += "syslog-conf" +ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" + python () { if 'sysvinit' in d.getVar("DISTRO_FEATURES", True).split(): pn = d.getVar('PN', True)
meta/recipes-core/busybox/busybox_1.21.1.bb +1 -0
@@ -17,6 +17,7 @@ SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \ file://mount.busybox \ file://syslog \ file://syslog-startup.conf \ + file://syslog.conf \ file://busybox-syslog.default \ file://mdev \ file://mdev.conf \
meta/recipes-core/busybox/files/syslog.conf new file +1 -0
@@ -0,0 +1 @@ +# /etc/syslog.conf Configuration file for busybox's syslogd utility
Signature · 1 line
1.7.9.5
PATCH 2/2 sysklogd: lower the ALTERNATIVE_PRIORITY in case of systemd
In reply to [email protected]From: Chen Qi <[email protected]>
The sysklogd package hasn't got systemd support yet. So in case of a systemd based system, the commands and corresponding configuration files should have a lower priority than that of the busybox's syslogd and klogd utilities. These two utilities from busybox have internal systemd support if CONFIG_FEATURE_SYSTEMD is enabled. And that config item is enabled by default.
[YOCTO #5066]
--- meta/recipes-extended/sysklogd/sysklogd.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-extended/sysklogd/sysklogd.inc +3 -1
@@ -38,7 +38,9 @@ do_install () { install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog } -ALTERNATIVE_PRIORITY = "100" +# sysklogd package has no internal systemd support, so we weigh busybox's +# sysklogd utility over it in case of systemd +ALTERNATIVE_PRIORITY = "${@base_contains('DISTRO_FEATURES','systemd','10','100',d)}" ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf"
Signature · 1 line
1.7.9.5
Sorry. I forgot to put 'V2' here.
Another patchset has been sent out.
//Chen Qi
Quoted 22 lines · On 09/03/2013 10:12 AM, [email protected] wrote:
From: Chen Qi <[email protected]>
The following changes since commit
c7994f83baa678a4670472e1f037bfc16cb1e3be:bitbake: runqueue: Fix scenequeue to pass file descriptors, not a float (2013-09-02 09:16:24 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contribChenQi/systemd-syslog
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/systemd-syslogChen Qi (2):
busybox-syslog: add configuration file/etc/syslog.conf
sysklogd: lower theALTERNATIVE_PRIORITYin case of systemdmeta/recipes-core/busybox/busybox.inc | 6 +++++- meta/recipes-core/busybox/busybox_1.21.1.bb | 1 + meta/recipes-core/busybox/files/syslog.conf | 1 + meta/recipes-extended/sysklogd/sysklogd.inc | 4 +++- 4 files changed, 10 insertions(+), 2 deletions(-)create mode 100644
meta/recipes-core/busybox/files/syslog.conf