diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2017-09-05 17:55:26 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-09-25 14:14:16 +0100 |
commit | cb92d86b4dcf99dc0eac1c1e6126a14aa14456e0 (patch) | |
tree | 550c3b6d91cfcf17ef96b0f488ec34f959afe181 /meta | |
parent | ae32558a19ae3b3f175365dc0e10fa74a91e28ce (diff) | |
download | poky-cb92d86b4dcf99dc0eac1c1e6126a14aa14456e0.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.
(From OE-Core rev: 597bbf99ee8e88294f2ed96c84a51f9ed83e8933)
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-core/busybox/busybox.inc | 27 |
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" | |||
41 | SYSTEMD_PACKAGES = "${PN}-syslog" | 41 | SYSTEMD_PACKAGES = "${PN}-syslog" |
42 | SYSTEMD_SERVICE_${PN}-syslog = "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', 'busybox-syslog.service', '', d)}" | 42 | SYSTEMD_SERVICE_${PN}-syslog = "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', 'busybox-syslog.service', '', d)}" |
43 | 43 | ||
44 | CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf.${BPN}" | 44 | CONFFILES_${PN}-syslog = "${sysconfdir}/syslog-startup.conf" |
45 | RCONFLICTS_${PN}-syslog = "rsyslog sysklogd syslog-ng" | ||
46 | |||
45 | CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf" | 47 | CONFFILES_${PN}-mdev = "${sysconfdir}/mdev.conf" |
46 | 48 | ||
47 | RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc" | 49 | RRECOMMENDS_${PN} = "${PN}-syslog ${PN}-udhcpc" |
@@ -248,9 +250,9 @@ do_install () { | |||
248 | fi | 250 | fi |
249 | 251 | ||
250 | if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then | 252 | if grep -q "CONFIG_SYSLOGD=y" ${B}/.config; then |
251 | install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog.${BPN} | 253 | install -m 0755 ${WORKDIR}/syslog ${D}${sysconfdir}/init.d/syslog |
252 | install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf.${BPN} | 254 | install -m 644 ${WORKDIR}/syslog-startup.conf ${D}${sysconfdir}/syslog-startup.conf |
253 | install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf.${BPN} | 255 | install -m 644 ${WORKDIR}/syslog.conf ${D}${sysconfdir}/syslog.conf |
254 | fi | 256 | fi |
255 | if grep "CONFIG_CROND=y" ${B}/.config; then | 257 | if grep "CONFIG_CROND=y" ${B}/.config; then |
256 | install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/ | 258 | install -m 0755 ${WORKDIR}/busybox-cron ${D}${sysconfdir}/init.d/ |
@@ -311,7 +313,6 @@ do_install () { | |||
311 | install -d ${D}${sysconfdir}/default | 313 | install -d ${D}${sysconfdir}/default |
312 | install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog | 314 | install -m 0644 ${WORKDIR}/busybox-syslog.default ${D}${sysconfdir}/default/busybox-syslog |
313 | fi | 315 | fi |
314 | ln -sf /dev/null ${D}${systemd_unitdir}/system/syslog.service | ||
315 | fi | 316 | fi |
316 | if grep -q "CONFIG_KLOGD=y" ${B}/.config; then | 317 | if grep -q "CONFIG_KLOGD=y" ${B}/.config; then |
317 | install -d ${D}${systemd_unitdir}/system | 318 | install -d ${D}${systemd_unitdir}/system |
@@ -322,7 +323,7 @@ do_install () { | |||
322 | 323 | ||
323 | # Remove the sysvinit specific configuration file for systemd systems to avoid confusion | 324 | # Remove the sysvinit specific configuration file for systemd systems to avoid confusion |
324 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then | 325 | if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'false', 'true', d)}; then |
325 | rm -f ${D}${sysconfdir}/syslog-startup.conf.${BPN} | 326 | rm -f ${D}${sysconfdir}/syslog-startup.conf |
326 | fi | 327 | fi |
327 | } | 328 | } |
328 | 329 | ||
@@ -336,20 +337,6 @@ inherit update-alternatives | |||
336 | 337 | ||
337 | ALTERNATIVE_PRIORITY = "50" | 338 | ALTERNATIVE_PRIORITY = "50" |
338 | 339 | ||
339 | ALTERNATIVE_${PN}-syslog += "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', 'syslog-conf', '', d)}" | ||
340 | ALTERNATIVE_LINK_NAME[syslog-conf] = "${@bb.utils.contains('SRC_URI', 'file://syslog.cfg', "${sysconfdir}/syslog.conf", '', d)}" | ||
341 | |||
342 | python () { | ||
343 | if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): | ||
344 | pn = d.getVar('PN') | ||
345 | d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-init') | ||
346 | d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (d.getVar('sysconfdir'))) | ||
347 | d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/syslog.%s' % (d.getVar('sysconfdir'), d.getVar('BPN'))) | ||
348 | d.appendVar('ALTERNATIVE_%s-syslog' % (pn), ' syslog-startup-conf') | ||
349 | d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-startup-conf', '%s/syslog-startup.conf' % (d.getVar('sysconfdir'))) | ||
350 | d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-startup-conf', '%s/syslog-startup.conf.%s' % (d.getVar('sysconfdir'), d.getVar('BPN'))) | ||
351 | } | ||
352 | |||
353 | python do_package_prepend () { | 340 | python do_package_prepend () { |
354 | # We need to load the full set of busybox provides from the /etc/busybox.links | 341 | # We need to load the full set of busybox provides from the /etc/busybox.links |
355 | # Use this to see the update-alternatives with the right information | 342 | # Use this to see the update-alternatives with the right information |