summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
committerTudor Florea <tudor.florea@enea.com>2015-10-08 22:51:41 +0200
commit1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch)
treea21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb
downloadmeta-openembedded-1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e.tar.gz
initial commit for Enea Linux 5.0 arm
Signed-off-by: Tudor Florea <tudor.florea@enea.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.bb169
1 files changed, 169 insertions, 0 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
new file mode 100644
index 000000000..db7900cf5
--- /dev/null
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb
@@ -0,0 +1,169 @@
1SUMMARY = "Rsyslog is an enhanced multi-threaded syslogd"
2DESCRIPTION = "\
3Rsyslog is an enhanced syslogd supporting, among others, MySQL,\
4 PostgreSQL, failover log destinations, syslog/tcp, fine grain\
5 output format control, high precision timestamps, queued operations\
6 and the ability to filter on any message part. It is quite\
7 compatible to stock sysklogd and can be used as a drop-in replacement.\
8 Its advanced features make it suitable for enterprise-class,\
9 encryption protected syslog relay chains while at the same time being\
10 very easy to setup for the novice user."
11
12DEPENDS = "zlib libestr json-c bison-native flex-native"
13HOMEPAGE = "http://www.rsyslog.com/"
14LICENSE = "GPLv3 & LGPLv3 & Apache-2.0"
15LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973 \
16 file://COPYING.LESSER;md5=cb7903f1e5c39ae838209e130dca270a \
17 file://COPYING.ASL20;md5=052f8a09206615ab07326ff8ce2d9d32\
18"
19
20SRC_URI = "http://www.rsyslog.com/files/download/rsyslog/${BPN}-${PV}.tar.gz \
21 file://initscript \
22 file://rsyslog.conf \
23 file://rsyslog.logrotate \
24 file://use-pkgconfig-to-check-libgcrypt.patch \
25 file://run-ptest \
26 file://rsyslog-fix-ptest-not-finish.patch \
27 file://rsyslog-use-serial-tests-config-needed-by-ptest.patch \
28"
29
30SRC_URI[md5sum] = "ebcc010a6205c28eb505c0fe862f32c6"
31SRC_URI[sha256sum] = "276d094d1e4c62c770ec8a72723667f119eee038912b79cf3337d439bc2f9087"
32
33inherit autotools pkgconfig systemd update-rc.d update-alternatives ptest
34
35EXTRA_OECONF += "--enable-cached-man-pages"
36
37# first line is default yes in configure
38PACKAGECONFIG ??= " \
39 zlib rsyslogd rsyslogrt klog inet regexp uuid libgcrypt \
40 imdiag gnutls \
41 ${@base_contains('DISTRO_FEATURES', 'snmp', 'snmp', '', d)} \
42 ${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
43 ${@base_contains('DISTRO_FEATURES', 'ptest', 'testbench ${VALGRIND}', '', d)} \
44"
45
46# default yes in configure
47PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib,"
48PACKAGECONFIG[rsyslogd] = "--enable-rsyslogd,--disable-rsyslogd,,"
49PACKAGECONFIG[rsyslogrt] = "--enable-rsyslogrt,--disable-rsyslogrt,,"
50PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,,"
51PACKAGECONFIG[klog] = "--enable-klog,--disable-klog,,"
52PACKAGECONFIG[regexp] = "--enable-regexp,--disable-regexp,,"
53PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux,"
54PACKAGECONFIG[libgcrypt] = "--enable-libgcrypt,--disable-libgcrypt,libgcrypt,"
55PACKAGECONFIG[testbench] = "--enable-testbench,--disable-testbench,,"
56
57# default no in configure
58PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,,"
59PACKAGECONFIG[imdiag] = "--enable-imdiag,--disable-imdiag,,"
60PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp,"
61PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls,"
62PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd,"
63PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,"
64PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql,"
65PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi,"
66PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,,"
67PACKAGECONFIG[gui] = "--enable-gui,--disable-gui,,"
68PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind,"
69
70TESTDIR = "tests"
71do_compile_ptest() {
72 sed -i 's/\(^buildtest-TESTS: \)/\1 $(check_PROGRAMS) /' ${TESTDIR}/Makefile
73 oe_runmake -C ${TESTDIR} buildtest-TESTS
74}
75
76do_install_ptest() {
77 # install the tests
78 cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH}
79 cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH}
80
81 # do NOT need to rebuild Makefile itself
82 sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
83
84 # fix the srcdir
85 sed -i 's,^\(srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
86
87 # valgrind is not compatible with arm and mips,
88 # so remove related test cases if there is no valgrind.
89 if [ x${VALGRIND} = x ]; then
90 sed -i '/udp-msgreduc-/d' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
91 fi
92
93 # install necessary links
94 install -d ${D}${PTEST_PATH}/tools
95 ln -sf ${sbindir}/rsyslogd ${D}${PTEST_PATH}/tools/rsyslogd
96
97 install -d ${D}${PTEST_PATH}/runtime
98 install -d ${D}${PTEST_PATH}/runtime/.libs
99 (
100 cd ${D}/${libdir}/rsyslog
101 allso="*.so"
102 for i in $allso; do
103 ln -sf ${libdir}/rsyslog/$i ${D}${PTEST_PATH}/runtime/.libs/$i
104 done
105 )
106
107 # fix the module load path with runtime/.libs
108 find ${D}${PTEST_PATH}/${TESTDIR} -name \*.conf -exec \
109 sed -i -e 's:../plugins/.*/.libs/:../runtime/.libs/:' \
110 '{}' \;
111}
112
113do_install_append() {
114 install -d "${D}${sysconfdir}/init.d"
115 install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog.${BPN}
116 install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
117 install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.rsyslog
118}
119
120FILES_${PN} += "${bindir}"
121
122INITSCRIPT_NAME = "syslog"
123INITSCRIPT_PARAMS = "defaults"
124
125# higher than sysklogd's 100
126ALTERNATIVE_PRIORITY = "110"
127
128ALTERNATIVE_${PN} = "syslogd syslog-conf syslog-logrotate"
129
130ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd"
131ALTERNATIVE_TARGET[syslogd] = "${sbindir}/rsyslogd"
132ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf"
133ALTERNATIVE_TARGET[syslog-conf] = "${sysconfdir}/rsyslog.conf"
134ALTERNATIVE_LINK_NAME[syslog-logrotate] = "${sysconfdir}/logrotate.d/syslog"
135ALTERNATIVE_TARGET[syslog-logrotate] = "${sysconfdir}/logrotate.rsyslog"
136
137CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf"
138
139RPROVIDES_${PN} += "${PN}-systemd"
140RREPLACES_${PN} += "${PN}-systemd"
141RCONFLICTS_${PN} += "${PN}-systemd"
142SYSTEMD_SERVICE_${PN} = "${BPN}.service"
143
144RDEPENDS_${PN} += "logrotate update-rc.d"
145
146# for rsyslog-ptest
147VALGRIND = "valgrind"
148VALGRIND_mips = ""
149VALGRIND_mips64 = ""
150VALGRIND_arm = ""
151VALGRIND_aarch64 = ""
152RDEPENDS_${PN}-ptest += "make diffutils gzip"
153RRECOMMENDS_${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}"
154
155# no syslog-init for systemd
156python () {
157 if bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
158 pn = d.getVar('PN', True)
159 sysconfdir = d.getVar('sysconfdir', True)
160 d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-init')
161 d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-init', '%s/init.d/syslog' % (sysconfdir))
162 d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-init', '%s/init.d/syslog.%s' % (d.getVar('sysconfdir', True), d.getVar('BPN', True)))
163
164 if bb.utils.contains('DISTRO_FEATURES', 'systemd', True, False, d):
165 pn = d.getVar('PN', True)
166 d.appendVar('ALTERNATIVE_%s' % (pn), ' syslog-service')
167 d.setVarFlag('ALTERNATIVE_LINK_NAME', 'syslog-service', '%s/systemd/system/syslog.service' % (d.getVar('sysconfdir', True)))
168 d.setVarFlag('ALTERNATIVE_TARGET', 'syslog-service', '%s/system/rsyslog.service' % (d.getVar('systemd_unitdir', True)))
169}