diff options
| author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-11-21 17:20:44 +0200 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-01-10 13:14:00 +0100 |
| commit | 7ee1001491901857a39eebe29498c85f5a3c8e76 (patch) | |
| tree | ffdd7e9a99f2deb4e281bca272d9514874b57274 | |
| parent | 93f7a39fa4231c103c2cdcbc3671c18c850fd392 (diff) | |
| download | meta-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>
| -rw-r--r-- | meta-oe/recipes-support/syslog-ng/syslog-ng.inc | 22 |
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 7b56dd4c1b..0acdd733c2 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 | ||
| 25 | inherit autotools systemd pkgconfig update-alternatives update-rc.d | 25 | inherit autotools systemd pkgconfig update-rc.d |
| 26 | 26 | ||
| 27 | EXTRA_OECONF = " \ | 27 | EXTRA_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 |
| 97 | RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}" | 97 | RDEPENDS_${PN} += " ${@base_conditional("ONLINE_PACKAGE_MANAGEMENT", "none", "", "update-rc.d", d)}" |
| 98 | 98 | ||
| 99 | RCONFLICTS_${PN} = "busybox-syslog sysklogd rsyslog" | ||
| 100 | |||
| 99 | RPROVIDES_${PN} += "${PN}-systemd" | 101 | RPROVIDES_${PN} += "${PN}-systemd" |
| 100 | RREPLACES_${PN} += "${PN}-systemd" | 102 | RREPLACES_${PN} += "${PN}-systemd" |
| 101 | RCONFLICTS_${PN} += "${PN}-systemd" | 103 | RCONFLICTS_${PN} += "${PN}-systemd" |
| 102 | SYSTEMD_SERVICE_${PN} = "${BPN}.service" | 104 | SYSTEMD_SERVICE_${PN} = "${BPN}.service" |
| 103 | 105 | ||
| 104 | # no syslog-init for systemd | ||
| 105 | python () { | ||
| 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 | |||
| 120 | INITSCRIPT_NAME = "syslog" | 106 | INITSCRIPT_NAME = "syslog" |
| 121 | INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ." | 107 | INITSCRIPT_PARAMS = "start 20 2 3 4 5 . stop 90 0 1 6 ." |
