aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2017-09-05 17:55:26 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-25 14:14:02 +0100
commit597bbf99ee8e88294f2ed96c84a51f9ed83e8933 (patch)
tree4538c4cd4da47e26d1af1f2519f7ec4700dbe4c5 /meta/recipes-core
parent7e49c5879862253ae1b6a26535d07a2740a95798 (diff)
downloadopenembedded-core-contrib-597bbf99ee8e88294f2ed96c84a51f9ed83e8933.tar.gz
busybox: fix syslog related meta data
Set RCONFLICTS to disallow multiple syslog daemon providers to be installed on the target at the same time, and remove codes which dealt with such situation. Supporting multiple syslog daemons on the same image doesn't have much sense. rsyslog and syslog-ng in meta-oe have set RCONFLICTS to disallow this. And we do the same for busybox. Also, remove the line of creating a meaningless symlink of /lib/systemd/syslog.service to /dev/null. Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/busybox/busybox.inc27
1 files changed, 7 insertions, 20 deletions
diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index 735b1f6881..48910ca33a 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -41,7 +41,9 @@ INITSCRIPT_NAME_${PN}-udhcpd = "busybox-udhcpd"
SYSTEMD_PACKAGES = "${PN}-syslog"
SYSTEMD_SERVICE_${PN}-syslog = "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', 'busybox-syslog.service', '', d)}"
-CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}"
+CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf"
+RCONFLICTS_${PN}-syslog = "rsyslog sysklogd syslog-ng"
+
CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf"
RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc"
@@ -248,9 +250,9 @@ do_install () {
fi
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}
+ install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog
+ install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf
+ install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf
fi
if grep "CONFIG_CROND=y" ${B}/.config; then
install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/
@@ -311,7 +313,6 @@ do_install () {
install -d ${D}${sysconfdir}/default
install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog
fi
- ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service
fi
if grep -q "CONFIG_KLOGD=y" ${B}/.config; then
install -d ${D}${systemd_unitdir}/system
@@ -322,7 +323,7 @@ do_install () {
# Remove the sysvinit specific configuration file for systemd systems to avoid confusion
if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then
- rm -f ${D}${sysconfdir}/syslog-startup.conf.${BPN}
+ rm -f ${D}${sysconfdir}/syslog-startup.conf
fi
}
@@ -336,20 +337,6 @@ inherit update-alternatives
ALTERNATIVE_PRIORITY = "50"
-ALTERNATIVE_${PN}-syslog += "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', 'syslog-conf', '', d)}"
-ALTERNATIVE_LINK_NAME[syslog-conf] = "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', "${sysconfdir}/syslog.conf", '', d)}"
-
-python () {
- if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
- pn = d.getVar('PN')
- d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-init')
- d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (d.getVar('sysconfdir')))
- d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/syslog.%s' % (d.getVar('sysconfdir'), d.getVar('BPN')))
- d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-startup-conf')
- d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-startup-conf', '%s/syslog-startup.conf' % (d.getVar('sysconfdir')))
- d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-startup-conf', '%s/syslog-startup.conf.%s' % (d.getVar('sysconfdir'), d.getVar('BPN')))
-}
-
python do_package_prepend () {
# We need to load the full set of busybox provides from the /etc/busybox.links
# Use this to see the update-alternatives with the right information