diff options
author | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2015-10-08 22:51:41 +0200 |
commit | 1219bf8a90a7bf8cd3a5363551ef635d51e8fc8e (patch) | |
tree | a21a5fc103bb3bd65ecd85ed22be5228fc54e447 /meta-oe/recipes-extended/rsyslog/rsyslog_7.4.4.bb | |
download | meta-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.bb | 169 |
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 @@ | |||
1 | SUMMARY = "Rsyslog is an enhanced multi-threaded syslogd" | ||
2 | DESCRIPTION = "\ | ||
3 | Rsyslog 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 | |||
12 | DEPENDS = "zlib libestr json-c bison-native flex-native" | ||
13 | HOMEPAGE = "http://www.rsyslog.com/" | ||
14 | LICENSE = "GPLv3 & LGPLv3 & Apache-2.0" | ||
15 | LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973 \ | ||
16 | file://COPYING.LESSER;md5=cb7903f1e5c39ae838209e130dca270a \ | ||
17 | file://COPYING.ASL20;md5=052f8a09206615ab07326ff8ce2d9d32\ | ||
18 | " | ||
19 | |||
20 | SRC_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 | |||
30 | SRC_URI[md5sum] = "ebcc010a6205c28eb505c0fe862f32c6" | ||
31 | SRC_URI[sha256sum] = "276d094d1e4c62c770ec8a72723667f119eee038912b79cf3337d439bc2f9087" | ||
32 | |||
33 | inherit autotools pkgconfig systemd update-rc.d update-alternatives ptest | ||
34 | |||
35 | EXTRA_OECONF += "--enable-cached-man-pages" | ||
36 | |||
37 | # first line is default yes in configure | ||
38 | PACKAGECONFIG ??= " \ | ||
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 | ||
47 | PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib," | ||
48 | PACKAGECONFIG[rsyslogd] = "--enable-rsyslogd,--disable-rsyslogd,," | ||
49 | PACKAGECONFIG[rsyslogrt] = "--enable-rsyslogrt,--disable-rsyslogrt,," | ||
50 | PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,," | ||
51 | PACKAGECONFIG[klog] = "--enable-klog,--disable-klog,," | ||
52 | PACKAGECONFIG[regexp] = "--enable-regexp,--disable-regexp,," | ||
53 | PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux," | ||
54 | PACKAGECONFIG[libgcrypt] = "--enable-libgcrypt,--disable-libgcrypt,libgcrypt," | ||
55 | PACKAGECONFIG[testbench] = "--enable-testbench,--disable-testbench,," | ||
56 | |||
57 | # default no in configure | ||
58 | PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," | ||
59 | PACKAGECONFIG[imdiag] = "--enable-imdiag,--disable-imdiag,," | ||
60 | PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp," | ||
61 | PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls," | ||
62 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd," | ||
63 | PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5," | ||
64 | PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql," | ||
65 | PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi," | ||
66 | PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,," | ||
67 | PACKAGECONFIG[gui] = "--enable-gui,--disable-gui,," | ||
68 | PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind," | ||
69 | |||
70 | TESTDIR = "tests" | ||
71 | do_compile_ptest() { | ||
72 | sed -i 's/\(^buildtest-TESTS: \)/\1 $(check_PROGRAMS) /' ${TESTDIR}/Makefile | ||
73 | oe_runmake -C ${TESTDIR} buildtest-TESTS | ||
74 | } | ||
75 | |||
76 | do_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 | |||
113 | do_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 | |||
120 | FILES_${PN} += "${bindir}" | ||
121 | |||
122 | INITSCRIPT_NAME = "syslog" | ||
123 | INITSCRIPT_PARAMS = "defaults" | ||
124 | |||
125 | # higher than sysklogd's 100 | ||
126 | ALTERNATIVE_PRIORITY = "110" | ||
127 | |||
128 | ALTERNATIVE_${PN} = "syslogd syslog-conf syslog-logrotate" | ||
129 | |||
130 | ALTERNATIVE_LINK_NAME[syslogd] = "${base_sbindir}/syslogd" | ||
131 | ALTERNATIVE_TARGET[syslogd] = "${sbindir}/rsyslogd" | ||
132 | ALTERNATIVE_LINK_NAME[syslog-conf] = "${sysconfdir}/syslog.conf" | ||
133 | ALTERNATIVE_TARGET[syslog-conf] = "${sysconfdir}/rsyslog.conf" | ||
134 | ALTERNATIVE_LINK_NAME[syslog-logrotate] = "${sysconfdir}/logrotate.d/syslog" | ||
135 | ALTERNATIVE_TARGET[syslog-logrotate] = "${sysconfdir}/logrotate.rsyslog" | ||
136 | |||
137 | CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf" | ||
138 | |||
139 | RPROVIDES_${PN} += "${PN}-systemd" | ||
140 | RREPLACES_${PN} += "${PN}-systemd" | ||
141 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
142 | SYSTEMD_SERVICE_${PN} = "${BPN}.service" | ||
143 | |||
144 | RDEPENDS_${PN} += "logrotate update-rc.d" | ||
145 | |||
146 | # for rsyslog-ptest | ||
147 | VALGRIND = "valgrind" | ||
148 | VALGRIND_mips = "" | ||
149 | VALGRIND_mips64 = "" | ||
150 | VALGRIND_arm = "" | ||
151 | VALGRIND_aarch64 = "" | ||
152 | RDEPENDS_${PN}-ptest += "make diffutils gzip" | ||
153 | RRECOMMENDS_${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" | ||
154 | |||
155 | # no syslog-init for systemd | ||
156 | python () { | ||
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 | } | ||