summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/rsyslog
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-11-21 17:20:45 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2017-01-10 13:14:01 +0100
commit37ff1e842b9e87787ff2eec10f8bdf7de445e4ad (patch)
tree98d52b72d86e9d21157d37fd88921f1b7c947f8a /meta-oe/recipes-extended/rsyslog
parent7ee1001491901857a39eebe29498c85f5a3c8e76 (diff)
downloadmeta-openembedded-37ff1e842b9e87787ff2eec10f8bdf7de445e4ad.tar.gz
rsyslog: 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-extended/rsyslog')
-rw-r--r--meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb34
1 files changed, 4 insertions, 30 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb
index 4e2c12279..c0e0a6d69 100644
--- a/meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog_8.22.0.bb
@@ -29,7 +29,7 @@ SRC_URI = "http://www.rsyslog.com/download/files/download/rsyslog/${BPN}-${PV}.t
29SRC_URI[md5sum] = "ad0f25f429aa2daa326732950a5eeb6c" 29SRC_URI[md5sum] = "ad0f25f429aa2daa326732950a5eeb6c"
30SRC_URI[sha256sum] = "06e2884181333dccecceaca82827ae24ca7a258b4fbf7b1e07a80d4caae640ca" 30SRC_URI[sha256sum] = "06e2884181333dccecceaca82827ae24ca7a258b4fbf7b1e07a80d4caae640ca"
31 31
32inherit autotools pkgconfig systemd update-rc.d update-alternatives ptest 32inherit autotools pkgconfig systemd update-rc.d ptest
33 33
34EXTRA_OECONF += "--disable-generate-man-pages" 34EXTRA_OECONF += "--disable-generate-man-pages"
35 35
@@ -114,7 +114,7 @@ do_install_ptest() {
114 114
115do_install_append() { 115do_install_append() {
116 install -d "${D}${sysconfdir}/init.d" 116 install -d "${D}${sysconfdir}/init.d"
117 install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog.${BPN} 117 install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog
118 install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf 118 install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
119 install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.rsyslog 119 install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.rsyslog
120} 120}
@@ -124,20 +124,10 @@ FILES_${PN} += "${bindir}"
124INITSCRIPT_NAME = "syslog" 124INITSCRIPT_NAME = "syslog"
125INITSCRIPT_PARAMS = "defaults" 125INITSCRIPT_PARAMS = "defaults"
126 126
127# higher than sysklogd's 100
128ALTERNATIVE_PRIORITY = "110"
129
130ALTERNATIVE_${PN} = "syslogd syslog-conf syslog-logrotate"
131
132ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
133ALTERNATIVE_TARGET[syslogd] = "${sbindir}/rsyslogd"
134ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
135ALTERNATIVE_TARGET[syslog-conf] = "${sysconfdir}/rsyslog.conf"
136ALTERNATIVE_LINK_NAME[syslog-logrotate] = "${sysconfdir}/logrotate.d/syslog"
137ALTERNATIVE_TARGET[syslog-logrotate] = "${sysconfdir}/logrotate.rsyslog"
138
139CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf" 127CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf"
140 128
129RCONFLICTS_${PN} = "busybox-syslog sysklogd syslog-ng"
130
141RPROVIDES_${PN} += "${PN}-systemd" 131RPROVIDES_${PN} += "${PN}-systemd"
142RREPLACES_${PN} += "${PN}-systemd" 132RREPLACES_${PN} += "${PN}-systemd"
143RCONFLICTS_${PN} += "${PN}-systemd" 133RCONFLICTS_${PN} += "${PN}-systemd"
@@ -154,19 +144,3 @@ VALGRIND_arm = ""
154VALGRIND_aarch64 = "" 144VALGRIND_aarch64 = ""
155RDEPENDS_${PN}-ptest += "make diffutils gzip bash gawk coreutils procps" 145RDEPENDS_${PN}-ptest += "make diffutils gzip bash gawk coreutils procps"
156RRECOMMENDS_${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" 146RRECOMMENDS_${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}"
157
158# no syslog-init for systemd
159python () {
160 if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
161 pn = d.getVar('PN')
162 sysconfdir = d.getVar('sysconfdir')
163 d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-init')
164 d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (sysconfdir))
165 d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/syslog.%s' % (d.getVar('sysconfdir'), d.getVar('BPN')))
166
167 if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
168 pn = d.getVar('PN')
169 d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-service')
170 d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-service', '%s/systemd/system/syslog.service' % (d.getVar('sysconfdir')))
171 d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-service', '%s/system/rsyslog.service' % (d.getVar('systemd_unitdir')))
172}