summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/rsyslog/rsyslog_8.1908.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/rsyslog/rsyslog_8.1908.0.bb')
-rw-r--r--meta-oe/recipes-extended/rsyslog/rsyslog_8.1908.0.bb174
1 files changed, 174 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_8.1908.0.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_8.1908.0.bb
new file mode 100644
index 000000000..bbb4b119a
--- /dev/null
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog_8.1908.0.bb
@@ -0,0 +1,174 @@
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 libfastjson bison-native flex-native liblogging"
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/download/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"
27
28SRC_URI_append_libc-musl = " \
29 file://0001-Include-sys-time-h.patch \
30"
31
32SRC_URI[md5sum] = "6e9aa4ef4cad8ae49affa0a786cc9e2f"
33SRC_URI[sha256sum] = "f8c8e53b651e03a011667c60bd2d4dba7a7cb6ec04b247c8ea8514115527863b"
34
35UPSTREAM_CHECK_URI = "https://github.com/rsyslog/rsyslog/releases"
36UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
37
38inherit autotools pkgconfig systemd update-rc.d ptest
39
40EXTRA_OECONF += "--disable-generate-man-pages ap_cv_atomic_builtins=yes"
41EXTRA_OECONF += "--enable-imfile-tests"
42
43# first line is default yes in configure
44PACKAGECONFIG ??= " \
45 rsyslogd rsyslogrt klog inet regexp uuid libgcrypt \
46 fmhttp imdiag gnutls imfile \
47 ${@bb.utils.filter('DISTRO_FEATURES', 'snmp systemd', d)} \
48 ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'testbench relp ${VALGRIND}', '', d)} \
49"
50
51# default yes in configure
52PACKAGECONFIG[relp] = "--enable-relp,--disable-relp,librelp,"
53PACKAGECONFIG[rsyslogd] = "--enable-rsyslogd,--disable-rsyslogd,,"
54PACKAGECONFIG[rsyslogrt] = "--enable-rsyslogrt,--disable-rsyslogrt,,"
55PACKAGECONFIG[fmhttp] = "--enable-fmhttp,--disable-fmhttp,curl,"
56PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,,"
57PACKAGECONFIG[klog] = "--enable-klog,--disable-klog,,"
58PACKAGECONFIG[regexp] = "--enable-regexp,--disable-regexp,,"
59PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux,"
60PACKAGECONFIG[libgcrypt] = "--enable-libgcrypt,--disable-libgcrypt,libgcrypt,"
61PACKAGECONFIG[testbench] = "--enable-testbench --enable-omstdout,--disable-testbench --disable-omstdout,,"
62
63# default no in configure
64PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,,"
65PACKAGECONFIG[imdiag] = "--enable-imdiag,--disable-imdiag,,"
66PACKAGECONFIG[imfile] = "--enable-imfile,--disable-imfile,,"
67PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp,"
68PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls,"
69PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd,"
70PACKAGECONFIG[imjournal] = "--enable-imjournal,--disable-imjournal,"
71PACKAGECONFIG[mmjsonparse] = "--enable-mmjsonparse,--disable-mmjsonparse,"
72PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,"
73PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql,"
74PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi,"
75PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,,"
76PACKAGECONFIG[valgrind] = "--enable-valgrind,--disable-valgrind,valgrind,"
77
78TESTDIR = "tests"
79do_compile_ptest() {
80 echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile
81 oe_runmake -C ${TESTDIR} buildtest-TESTS
82}
83
84do_install_ptest() {
85 # install the tests
86 cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH}
87 cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH}
88
89 # do NOT need to rebuild Makefile itself
90 sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
91 # do NOT need to rebuild $(check_PROGRAMS)
92 sed -i 's/^check-TESTS:.*$/check-TESTS:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
93
94 # fix the srcdir, top_srcdir
95 sed -i 's,^\(srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
96 sed -i 's,^\(top_srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
97 # fix the abs_top_builddir
98 sed -i 's,^\(abs_top_builddir = \).*,\1${PTEST_PATH}/,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
99
100 # valgrind is not compatible with arm and mips,
101 # so remove related test cases if there is no valgrind.
102 if [ x${VALGRIND} = x ]; then
103 sed -i '/udp-msgreduc-/d' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
104 fi
105
106 # install test-driver
107 install -m 644 ${S}/test-driver ${D}${PTEST_PATH}
108
109 # install necessary links
110 install -d ${D}${PTEST_PATH}/tools
111 ln -sf ${sbindir}/rsyslogd ${D}${PTEST_PATH}/tools/rsyslogd
112
113 install -d ${D}${PTEST_PATH}/runtime
114 install -d ${D}${PTEST_PATH}/runtime/.libs
115 (
116 cd ${D}/${libdir}/rsyslog
117 allso="*.so"
118 for i in $allso; do
119 ln -sf ${libdir}/rsyslog/$i ${D}${PTEST_PATH}/runtime/.libs/$i
120 done
121 )
122
123 # fix the module load path with runtime/.libs
124 find ${D}${PTEST_PATH}/${TESTDIR} -name "*.conf" -o -name "*.sh" -o -name "*.c" | xargs \
125 sed -i -e 's:../plugins/.*/.libs/:../runtime/.libs/:g'
126}
127
128do_install_append() {
129 install -d "${D}${sysconfdir}/init.d"
130 install -d "${D}${sysconfdir}/logrotate.d"
131 install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog
132 install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
133 install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog
134 sed -i -e "s#@BINDIR@#${bindir}#g" ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog
135
136 if ${@bb.utils.contains('PACKAGECONFIG', 'imjournal', 'true', 'false', d)}; then
137 install -d 0755 ${D}${sysconfdir}/rsyslog.d
138 echo '$ModLoad imjournal' >> ${D}${sysconfdir}/rsyslog.d/imjournal.conf
139 fi
140 if ${@bb.utils.contains('PACKAGECONFIG', 'mmjsonparse', 'true', 'false', d)}; then
141 install -d 0755 ${D}${sysconfdir}/rsyslog.d
142 echo '$ModLoad mmjsonparse' >> ${D}${sysconfdir}/rsyslog.d/mmjsonparse.conf
143 fi
144}
145
146FILES_${PN} += "${bindir}"
147
148INITSCRIPT_NAME = "syslog"
149INITSCRIPT_PARAMS = "defaults"
150
151CONFFILES_${PN} = "${sysconfdir}/rsyslog.conf"
152
153RCONFLICTS_${PN} = "busybox-syslog sysklogd syslog-ng"
154
155RPROVIDES_${PN} += "${PN}-systemd"
156RREPLACES_${PN} += "${PN}-systemd"
157RCONFLICTS_${PN} += "${PN}-systemd"
158SYSTEMD_SERVICE_${PN} = "${BPN}.service"
159
160RDEPENDS_${PN} += "logrotate"
161
162# for rsyslog-ptest
163VALGRIND = "valgrind"
164VALGRIND_mips = ""
165VALGRIND_mips64 = ""
166VALGRIND_mips64n32 = ""
167VALGRIND_arm = ""
168VALGRIND_aarch64 = ""
169VALGRIND_riscv64 = ""
170RDEPENDS_${PN}-ptest += "\
171 make diffutils gzip bash gawk coreutils procps \
172 libgcc python-core python-io \
173 "
174RRECOMMENDS_${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}"