diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-11-21 17:20:45 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2017-01-10 13:14:01 +0100 |
commit | 37ff1e842b9e87787ff2eec10f8bdf7de445e4ad (patch) | |
tree | 98d52b72d86e9d21157d37fd88921f1b7c947f8a /meta-oe/recipes-extended/rsyslog | |
parent | 7ee1001491901857a39eebe29498c85f5a3c8e76 (diff) | |
download | meta-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.bb | 34 |
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 | |||
29 | SRC_URI[md5sum] = "ad0f25f429aa2daa326732950a5eeb6c" | 29 | SRC_URI[md5sum] = "ad0f25f429aa2daa326732950a5eeb6c" |
30 | SRC_URI[sha256sum] = "06e2884181333dccecceaca82827ae24ca7a258b4fbf7b1e07a80d4caae640ca" | 30 | SRC_URI[sha256sum] = "06e2884181333dccecceaca82827ae24ca7a258b4fbf7b1e07a80d4caae640ca" |
31 | 31 | ||
32 | inherit autotools pkgconfig systemd update-rc.d update-alternatives ptest | 32 | inherit autotools pkgconfig systemd update-rc.d ptest |
33 | 33 | ||
34 | EXTRA_OECONF += "--disable-generate-man-pages" | 34 | EXTRA_OECONF += "--disable-generate-man-pages" |
35 | 35 | ||
@@ -114,7 +114,7 @@ do_install_ptest() { | |||
114 | 114 | ||
115 | do_install_append() { | 115 | do_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}" | |||
124 | INITSCRIPT_NAME = "syslog" | 124 | INITSCRIPT_NAME = "syslog" |
125 | INITSCRIPT_PARAMS = "defaults" | 125 | INITSCRIPT_PARAMS = "defaults" |
126 | 126 | ||
127 | # higher than sysklogd's 100 | ||
128 | ALTERNATIVE_PRIORITY = "110" | ||
129 | |||
130 | ALTERNATIVE_${PN} = "syslogd syslog-conf syslog-logrotate" | ||
131 | |||
132 | ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd" | ||
133 | ALTERNATIVE_TARGET[syslogd] = "${sbindir}/rsyslogd" | ||
134 | ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" | ||
135 | ALTERNATIVE_TARGET[syslog-conf] = "${sysconfdir}/rsyslog.conf" | ||
136 | ALTERNATIVE_LINK_NAME[syslog-logrotate] = "${sysconfdir}/logrotate.d/syslog" | ||
137 | ALTERNATIVE_TARGET[syslog-logrotate] = "${sysconfdir}/logrotate.rsyslog" | ||
138 | |||
139 | CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf" | 127 | CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf" |
140 | 128 | ||
129 | RCONFLICTS_${PN} = "busybox-syslog sysklogd syslog-ng" | ||
130 | |||
141 | RPROVIDES_${PN} += "${PN}-systemd" | 131 | RPROVIDES_${PN} += "${PN}-systemd" |
142 | RREPLACES_${PN} += "${PN}-systemd" | 132 | RREPLACES_${PN} += "${PN}-systemd" |
143 | RCONFLICTS_${PN} += "${PN}-systemd" | 133 | RCONFLICTS_${PN} += "${PN}-systemd" |
@@ -154,19 +144,3 @@ VALGRIND_arm = "" | |||
154 | VALGRIND_aarch64 = "" | 144 | VALGRIND_aarch64 = "" |
155 | RDEPENDS_${PN}-ptest += "make diffutils gzip bash gawk coreutils procps" | 145 | RDEPENDS_${PN}-ptest += "make diffutils gzip bash gawk coreutils procps" |
156 | RRECOMMENDS_${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" | 146 | RRECOMMENDS_${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" |
157 | |||
158 | # no syslog-init for systemd | ||
159 | python () { | ||
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 | } | ||