* [PATCH 0/2] busybox & sysklogd: weigh busybox's syslogd/klogd utilities over those from sysklogd in case of systemd
@ 2013-09-02 11:40 Qi.Chen
2013-09-02 11:40 ` [PATCH 1/2] busybox-syslog: add configuration file /etc/syslog.conf Qi.Chen
2013-09-02 11:40 ` [PATCH 2/2] sysklogd: lower the ALTERNATIVE_PRIORITY in case of systemd Qi.Chen
0 siblings, 2 replies; 6+ messages in thread
From: Qi.Chen @ 2013-09-02 11:40 UTC (permalink / raw)
To: openembedded-core
From: Chen Qi <Qi.Chen@windriver.com>
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 | 9 ++++++++-
4 files changed, 15 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-core/busybox/files/syslog.conf
--
1.7.9.5
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/2] busybox-syslog: add configuration file /etc/syslog.conf
2013-09-02 11:40 [PATCH 0/2] busybox & sysklogd: weigh busybox's syslogd/klogd utilities over those from sysklogd in case of systemd Qi.Chen
@ 2013-09-02 11:40 ` Qi.Chen
2013-09-02 11:40 ` [PATCH 2/2] sysklogd: lower the ALTERNATIVE_PRIORITY in case of systemd Qi.Chen
1 sibling, 0 replies; 6+ messages in thread
From: Qi.Chen @ 2013-09-02 11:40 UTC (permalink / raw)
To: openembedded-core
From: Chen Qi <Qi.Chen@windriver.com>
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]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
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
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index b4cf20a..b3d0cd2 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -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)
diff --git a/meta/recipes-core/busybox/busybox_1.21.1.bb b/meta/recipes-core/busybox/busybox_1.21.1.bb
index 784c924..f766bee 100644
--- a/meta/recipes-core/busybox/busybox_1.21.1.bb
+++ b/meta/recipes-core/busybox/busybox_1.21.1.bb
@@ -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 \
diff --git a/meta/recipes-core/busybox/files/syslog.conf b/meta/recipes-core/busybox/files/syslog.conf
new file mode 100644
index 0000000..75bb630
--- /dev/null
+++ b/meta/recipes-core/busybox/files/syslog.conf
@@ -0,0 +1 @@
+# /etc/syslog.conf Configuration file for busybox's syslogd utility
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] sysklogd: lower the ALTERNATIVE_PRIORITY in case of systemd
2013-09-02 11:40 [PATCH 0/2] busybox & sysklogd: weigh busybox's syslogd/klogd utilities over those from sysklogd in case of systemd Qi.Chen
2013-09-02 11:40 ` [PATCH 1/2] busybox-syslog: add configuration file /etc/syslog.conf Qi.Chen
@ 2013-09-02 11:40 ` Qi.Chen
2013-09-02 11:58 ` Peter A. Bigot
1 sibling, 1 reply; 6+ messages in thread
From: Qi.Chen @ 2013-09-02 11:40 UTC (permalink / raw)
To: openembedded-core
From: Chen Qi <Qi.Chen@windriver.com>
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]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-extended/sysklogd/sysklogd.inc | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
index 1167328..30dac2d 100644
--- a/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -38,7 +38,14 @@ do_install () {
install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
}
-ALTERNATIVE_PRIORITY = "100"
+python () {
+ # sysklogd package has no internal systemd support, so we weigh busybox's
+ # sysklogd utility over it in case of systemd
+ if 'systemd' in d.getVar("DISTRO_FEATURES", True).split():
+ d.setVar("ALTERNATIVE_PRIORITY", "10")
+ else:
+ d.setVar("ALTERNATIVE_PRIORITY", "100")
+}
ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] sysklogd: lower the ALTERNATIVE_PRIORITY in case of systemd
2013-09-02 11:40 ` [PATCH 2/2] sysklogd: lower the ALTERNATIVE_PRIORITY in case of systemd Qi.Chen
@ 2013-09-02 11:58 ` Peter A. Bigot
2013-09-03 2:06 ` ChenQi
0 siblings, 1 reply; 6+ messages in thread
From: Peter A. Bigot @ 2013-09-02 11:58 UTC (permalink / raw)
To: openembedded-core
On 09/02/2013 06:40 AM, Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
>
> 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]
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
> meta/recipes-extended/sysklogd/sysklogd.inc | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
> index 1167328..30dac2d 100644
> --- a/meta/recipes-extended/sysklogd/sysklogd.inc
> +++ b/meta/recipes-extended/sysklogd/sysklogd.inc
> @@ -38,7 +38,14 @@ do_install () {
> install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
> }
>
> -ALTERNATIVE_PRIORITY = "100"
> +python () {
> + # sysklogd package has no internal systemd support, so we weigh busybox's
> + # sysklogd utility over it in case of systemd
> + if 'systemd' in d.getVar("DISTRO_FEATURES", True).split():
> + d.setVar("ALTERNATIVE_PRIORITY", "10")
> + else:
> + d.setVar("ALTERNATIVE_PRIORITY", "100")
> +}
Is there a reason an anonymous python block is better for this purpose than:
ALTERNATIVE_PRIORITY = "${@base_contains('DISTRO_FEATURES','systemd','10','100',d)}"
?
> ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf"
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] sysklogd: lower the ALTERNATIVE_PRIORITY in case of systemd
2013-09-02 11:58 ` Peter A. Bigot
@ 2013-09-03 2:06 ` ChenQi
0 siblings, 0 replies; 6+ messages in thread
From: ChenQi @ 2013-09-03 2:06 UTC (permalink / raw)
To: openembedded-core
On 09/02/2013 07:58 PM, Peter A. Bigot wrote:
> On 09/02/2013 06:40 AM, Qi.Chen@windriver.com wrote:
>> From: Chen Qi <Qi.Chen@windriver.com>
>>
>> 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]
>>
>> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> ---
>> meta/recipes-extended/sysklogd/sysklogd.inc | 9 ++++++++-
>> 1 file changed, 8 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc
>> b/meta/recipes-extended/sysklogd/sysklogd.inc
>> index 1167328..30dac2d 100644
>> --- a/meta/recipes-extended/sysklogd/sysklogd.inc
>> +++ b/meta/recipes-extended/sysklogd/sysklogd.inc
>> @@ -38,7 +38,14 @@ do_install () {
>> install -m 755 ${WORKDIR}/sysklogd ${D}${sysconfdir}/init.d/syslog
>> }
>> -ALTERNATIVE_PRIORITY = "100"
>> +python () {
>> + # sysklogd package has no internal systemd support, so we weigh
>> busybox's
>> + # sysklogd utility over it in case of systemd
>> + if 'systemd' in d.getVar("DISTRO_FEATURES", True).split():
>> + d.setVar("ALTERNATIVE_PRIORITY", "10")
>> + else:
>> + d.setVar("ALTERNATIVE_PRIORITY", "100")
>> +}
>
> Is there a reason an anonymous python block is better for this purpose
> than:
>
> ALTERNATIVE_PRIORITY =
> "${@base_contains('DISTRO_FEATURES','systemd','10','100',d)}"
>
> ?
>
Thanks. I'll send out a V2.
Best Regards,
Chen Qi
>> ALTERNATIVE_${PN} = "syslogd klogd syslog-init syslog-conf"
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] sysklogd: lower the ALTERNATIVE_PRIORITY in case of systemd
2013-09-03 2:12 [PATCH 0/2] busybox & sysklogd: weigh busybox's syslogd/klogd utilities over those from sysklogd " Qi.Chen
@ 2013-09-03 2:12 ` Qi.Chen
0 siblings, 0 replies; 6+ messages in thread
From: Qi.Chen @ 2013-09-03 2:12 UTC (permalink / raw)
To: openembedded-core
From: Chen Qi <Qi.Chen@windriver.com>
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]
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
meta/recipes-extended/sysklogd/sysklogd.inc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc
index 1167328..3a51810 100644
--- a/meta/recipes-extended/sysklogd/sysklogd.inc
+++ b/meta/recipes-extended/sysklogd/sysklogd.inc
@@ -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"
--
1.7.9.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-09-03 2:12 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-02 11:40 [PATCH 0/2] busybox & sysklogd: weigh busybox's syslogd/klogd utilities over those from sysklogd in case of systemd Qi.Chen
2013-09-02 11:40 ` [PATCH 1/2] busybox-syslog: add configuration file /etc/syslog.conf Qi.Chen
2013-09-02 11:40 ` [PATCH 2/2] sysklogd: lower the ALTERNATIVE_PRIORITY in case of systemd Qi.Chen
2013-09-02 11:58 ` Peter A. Bigot
2013-09-03 2:06 ` ChenQi
-- strict thread matches above, loose matches on Subject: below --
2013-09-03 2:12 [PATCH 0/2] busybox & sysklogd: weigh busybox's syslogd/klogd utilities over those from sysklogd " Qi.Chen
2013-09-03 2:12 ` [PATCH 2/2] sysklogd: lower the ALTERNATIVE_PRIORITY " Qi.Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox