diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2017-09-05 17:55:27 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-25 14:14:16 +0100 |
commit | 5912b2e5b529e9ce7b60a21e2c3f94295c20a17b (patch) | |
tree | 5018d9dba248be291458f17f5c2c22530f250bdd /meta | |
parent | cb92d86b4dcf99dc0eac1c1e6126a14aa14456e0 (diff) | |
download | poky-5912b2e5b529e9ce7b60a21e2c3f94295c20a17b.tar.gz |
sysklogd: conflict with other syslog daemons
Set RCONFLICTS to disallow multiple syslog daemon providers to be installed
on the target, and remove codes that deal with such situation.
Also, set ALTERNATIVE_PRIORITY back to 100. It was set to '10' in case of
systemd because sysklogd didn't have systemd support. For now, if we disallow
multiple syslog daemons to be installed, and it stays '10', then if sysklogd
is installed on target, the /sbin/syslogd would link to /bin/busybox.nosuid,
causing sysklogd service files using busybox's utility.
(From OE-Core rev: ecc116603079b45b1fa69c3d4537b19b28707859)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-extended/sysklogd/sysklogd.inc | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/meta/recipes-extended/sysklogd/sysklogd.inc b/meta/recipes-extended/sysklogd/sysklogd.inc index 644728ae67..e9a4a02192 100644 --- a/meta/recipes-extended/sysklogd/sysklogd.inc +++ b/meta/recipes-extended/sysklogd/sysklogd.inc | |||
@@ -32,7 +32,8 @@ SYSTEMD_SERVICE_${PN} = "syslogd.service klogd.service" | |||
32 | SYSTEMD_AUTO_ENABLE = "enable" | 32 | SYSTEMD_AUTO_ENABLE = "enable" |
33 | 33 | ||
34 | INITSCRIPT_NAME = "syslog" | 34 | INITSCRIPT_NAME = "syslog" |
35 | CONFFILES_${PN} = "${sysconfdir}/syslog.conf.${BPN}" | 35 | CONFFILES_${PN} = "${sysconfdir}/syslog.conf" |
36 | RCONFLICTS_${PN}-syslog = "rsyslog busybox-syslog syslog-ng" | ||
36 | 37 | ||
37 | CFLAGS += "-DSYSV -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" | 38 | CFLAGS += "-DSYSV -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" |
38 | 39 | ||
@@ -57,20 +58,15 @@ do_install () { | |||
57 | 58 | ||
58 | FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}" | 59 | FILES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES','systemd','${exec_prefix}/lib/tmpfiles.d/sysklogd.conf', '', d)}" |
59 | 60 | ||
60 | # sysklogd package has no internal systemd support, so we weigh busybox's | 61 | ALTERNATIVE_PRIORITY = "100" |
61 | # sysklogd utility over it in case of systemd | ||
62 | ALTERNATIVE_PRIORITY = "${@bb.utils.contains('DISTRO_FEATURES','systemd','10','100',d)}" | ||
63 | 62 | ||
64 | ALTERNATIVE_${PN} = "syslogd klogd syslog-conf \ | 63 | ALTERNATIVE_${PN} = "syslogd klogd" |
65 | ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','syslog-init','',d)}" | ||
66 | 64 | ||
67 | ALTERNATIVE_${PN}-doc = "syslogd.8" | 65 | ALTERNATIVE_${PN}-doc = "syslogd.8" |
68 | ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8" | 66 | ALTERNATIVE_LINK_NAME[syslogd.8] = "${mandir}/man8/syslogd.8" |
69 | 67 | ||
70 | ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd" | 68 | ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd" |
71 | ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd" | 69 | ALTERNATIVE_LINK_NAME[klogd] = "${base_sbindir}/klogd" |
72 | ALTERNATIVE_LINK_NAME[syslog-init] = "${sysconfdir}/init.d/syslog" | ||
73 | ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" | ||
74 | 70 | ||
75 | pkg_prerm_${PN} () { | 71 | pkg_prerm_${PN} () { |
76 | if test "x$D" = "x"; then | 72 | if test "x$D" = "x"; then |