summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb
diff options
context:
space:
mode:
authorJackie Huang <jackie.huang@windriver.com>2014-04-21 02:21:06 -0400
committerMartin Jansa <Martin.Jansa@gmail.com>2014-05-03 20:45:01 +0200
commite23158541c5dc49f4f75f7e7812fe65c8c512908 (patch)
treeb3ff20a69d502dab7cdcb2d240d6b7cf878402c1 /meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb
parent9ef1b542367416e2f2e418f33871f773d63a7bda (diff)
downloadmeta-openembedded-e23158541c5dc49f4f75f7e7812fe65c8c512908.tar.gz
rsyslog: Add config files and use update-alternatives for rsyslog
- Add a logrotate config file for rsyslog. - Change rsyslog.conf to be compatible with sysklogd.conf. - Use update-alternatives since we have other syslog systems: sysklogd, busybox-syslog, etc. Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Diffstat (limited to 'meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb')
-rw-r--r--meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb31
1 files changed, 29 insertions, 2 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb
index 3801933b5..31d2935a1 100644
--- a/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb
@@ -19,12 +19,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973 \
19 19
20SRC_URI = "http://www.rsyslog.com/files/download/rsyslog/${BPN}-${PV}.tar.gz \ 20SRC_URI = "http://www.rsyslog.com/files/download/rsyslog/${BPN}-${PV}.tar.gz \
21 file://initscript \ 21 file://initscript \
22 file://rsyslog.conf \
23 file://rsyslog.logrotate \
22" 24"
23 25
24SRC_URI[md5sum] = "ebcc010a6205c28eb505c0fe862f32c6" 26SRC_URI[md5sum] = "ebcc010a6205c28eb505c0fe862f32c6"
25SRC_URI[sha256sum] = "276d094d1e4c62c770ec8a72723667f119eee038912b79cf3337d439bc2f9087" 27SRC_URI[sha256sum] = "276d094d1e4c62c770ec8a72723667f119eee038912b79cf3337d439bc2f9087"
26 28
27inherit autotools pkgconfig systemd update-rc.d 29inherit autotools pkgconfig systemd update-rc.d update-alternatives
28 30
29EXTRA_OECONF += "--enable-cached-man-pages" 31EXTRA_OECONF += "--enable-cached-man-pages"
30 32
@@ -62,7 +64,8 @@ PACKAGECONFIG[gui] = "--enable-gui,--disable-gui,,"
62do_install_append() { 64do_install_append() {
63 install -d "${D}${sysconfdir}/init.d" 65 install -d "${D}${sysconfdir}/init.d"
64 install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/rsyslogd 66 install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/rsyslogd
65 install -m 755 ${S}/platform/redhat/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf 67 install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
68 install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.rsyslog
66} 69}
67 70
68FILES_${PN} += "${bindir}" 71FILES_${PN} += "${bindir}"
@@ -70,9 +73,33 @@ FILES_${PN} += "${bindir}"
70INITSCRIPT_NAME = "rsyslogd" 73INITSCRIPT_NAME = "rsyslogd"
71INITSCRIPT_PARAMS = "defaults" 74INITSCRIPT_PARAMS = "defaults"
72 75
76# higher than sysklogd's 100
77ALTERNATIVE_PRIORITY = "110"
78
79ALTERNATIVE_${PN} = "rsyslogd syslog-conf syslog-logrotate"
80
81ALTERNATIVE_LINK_NAME[rsyslogd] = "${base_sbindir}/syslogd"
82ALTERNATIVE_TARGET[rsyslogd] = "${sbindir}/rsyslogd"
83ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
84ALTERNATIVE_TARGET[syslog-conf] = "${sysconfdir}/rsyslog.conf"
85ALTERNATIVE_LINK_NAME[syslog-logrotate] = "${sysconfdir}/logrotate.d/syslog"
86ALTERNATIVE_TARGET[syslog-logrotate] = "${sysconfdir}/logrotate.rsyslog"
87
73CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf" 88CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf"
74 89
75RPROVIDES_${PN} += "${PN}-systemd" 90RPROVIDES_${PN} += "${PN}-systemd"
76RREPLACES_${PN} += "${PN}-systemd" 91RREPLACES_${PN} += "${PN}-systemd"
77RCONFLICTS_${PN} += "${PN}-systemd" 92RCONFLICTS_${PN} += "${PN}-systemd"
78SYSTEMD_SERVICE_${PN} = "${BPN}.service" 93SYSTEMD_SERVICE_${PN} = "${BPN}.service"
94
95RDEPENDS_${PN} += "logrotate"
96
97# no syslog-init for systemd
98python () {
99 if 'sysvinit' in d.getVar("DISTRO_FEATURES", True).split():
100 pn = d.getVar('PN', True)
101 sysconfdir = d.getVar('sysconfdir', True)
102 d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-init')
103 d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslogd' % (sysconfdir))
104 d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/rsyslogd' % (sysconfdir))
105}