summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/syslog-ng
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-11-21 17:20:44 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2017-01-10 13:14:00 +0100
commit7ee1001491901857a39eebe29498c85f5a3c8e76 (patch)
treeffdd7e9a99f2deb4e281bca272d9514874b57274 /meta-oe/recipes-support/syslog-ng
parent93f7a39fa4231c103c2cdcbc3671c18c850fd392 (diff)
downloadmeta-openembedded-7ee1001491901857a39eebe29498c85f5a3c8e76.tar.gz
syslog-ng: don't use update-alternatives to manage init script
Also, explicitly conflict with other syslog providers. [YOCTO #10433] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/syslog-ng')
-rw-r--r--meta-oe/recipes-support/syslog-ng/syslog-ng.inc22
1 files changed, 4 insertions, 18 deletions
diff --git a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
index 7b56dd4c1..0acdd733c 100644
--- a/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
+++ b/meta-oe/recipes-support/syslog-ng/syslog-ng.inc
@@ -22,7 +22,7 @@ SRC_URI = "http://www.balabit.com/downloads/files/syslog-ng/sources/${PV}/source
22 file://configure.ac-add-option-enable-thread-tls-to-manage-.patch \ 22 file://configure.ac-add-option-enable-thread-tls-to-manage-.patch \
23" 23"
24 24
25inherit autotools systemd pkgconfig update-alternatives update-rc.d 25inherit autotools systemd pkgconfig update-rc.d
26 26
27EXTRA_OECONF = " \ 27EXTRA_OECONF = " \
28 --enable-dynamic-linking \ 28 --enable-dynamic-linking \
@@ -70,7 +70,7 @@ do_install_append() {
70 install -d ${D}/${sysconfdir}/${BPN} 70 install -d ${D}/${sysconfdir}/${BPN}
71 install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf 71 install ${WORKDIR}/syslog-ng.conf ${D}${sysconfdir}/${BPN}/${BPN}.conf
72 install -d ${D}/${sysconfdir}/init.d 72 install -d ${D}/${sysconfdir}/init.d
73 install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog.${BPN} 73 install -m 755 ${WORKDIR}/initscript ${D}/${sysconfdir}/init.d/syslog
74 install -d ${D}/${sysconfdir}/default/volatiles/ 74 install -d ${D}/${sysconfdir}/default/volatiles/
75 install -m 755 ${WORKDIR}/volatiles.03_syslog-ng ${D}/${sysconfdir}/default/volatiles/03_syslog-ng 75 install -m 755 ${WORKDIR}/volatiles.03_syslog-ng ${D}/${sysconfdir}/default/volatiles/03_syslog-ng
76 install -d ${D}/${localstatedir}/lib/${BPN} 76 install -d ${D}/${localstatedir}/lib/${BPN}
@@ -96,26 +96,12 @@ CONFFILES_${PN} = "${sysconfdir}/${BPN}.conf ${sysconfdir}/scl.conf"
96# update-rc.d and update-alternatives is important 96# update-rc.d and update-alternatives is important
97RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}" 97RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}"
98 98
99RCONFLICTS_${PN} = "busybox-syslog sysklogd rsyslog"
100
99RPROVIDES_${PN} += "${PN}-systemd" 101RPROVIDES_${PN} += "${PN}-systemd"
100RREPLACES_${PN} += "${PN}-systemd" 102RREPLACES_${PN} += "${PN}-systemd"
101RCONFLICTS_${PN} += "${PN}-systemd" 103RCONFLICTS_${PN} += "${PN}-systemd"
102SYSTEMD_SERVICE_${PN} = "${BPN}.service" 104SYSTEMD_SERVICE_${PN} = "${BPN}.service"
103 105
104# no syslog-init for systemd
105python () {
106 if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
107 pn = d.getVar('PN')
108 sysconfdir = d.getVar('sysconfdir')
109 d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-init')
110 d.setVarFlag('ALTERNATIVE_PRIORITY', 'syslog-init', '200')
111 d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (sysconfdir))
112
113 if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
114 pn = d.getVar('PN')
115 d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-service')
116 d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-service', '%s/systemd/system/syslog.service' % (d.getVar('sysconfdir')))
117 d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-service', '%s/system/${BPN}.service' % (d.getVar('systemd_unitdir')))
118}
119
120INITSCRIPT_NAME = "syslog" 106INITSCRIPT_NAME = "syslog"
121INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ." 107INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ."