summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb')
-rw-r--r--meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb207
1 files changed, 207 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb
new file mode 100644
index 000000000..af46cc14d
--- /dev/null
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb
@@ -0,0 +1,207 @@
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 = "GPL-3.0-only & LGPL-3.0-only & 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 = "https://www.rsyslog.com/files/download/rsyslog/${BPN}-${PV}.tar.gz \
21 file://initscript \
22 file://rsyslog.conf \
23 file://rsyslog.logrotate \
24 file://rsyslog.service \
25 file://use-pkgconfig-to-check-libgcrypt.patch \
26 file://run-ptest \
27 file://0001-tests-disable-the-check-for-inotify.patch \
28"
29
30SRC_URI:append:libc-musl = " \
31 file://0001-Include-sys-time-h.patch \
32 file://disable-omfile-outchannel.patch \
33"
34
35SRC_URI[sha256sum] = "acbdd8579489df36b4a383dc6909a61b7623807f0aff54c062115f2de7ea85ba"
36
37UPSTREAM_CHECK_URI = "https://github.com/rsyslog/rsyslog/releases"
38UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
39
40inherit autotools pkgconfig systemd update-rc.d ptest
41
42EXTRA_OECONF += "--disable-generate-man-pages ap_cv_atomic_builtins=yes"
43EXTRA_OECONF += "--enable-imfile-tests"
44EXTRA_OECONF:remove:mipsarch = "ap_cv_atomic_builtins=yes"
45EXTRA_OECONF:remove:powerpc = "ap_cv_atomic_builtins=yes"
46EXTRA_OECONF:remove:riscv32 = "ap_cv_atomic_builtins=yes"
47
48# first line is default yes in configure
49PACKAGECONFIG ??= " \
50 rsyslogd rsyslogrt klog inet regexp uuid libcap-ng libgcrypt \
51 fmhttp imdiag openssl imfile \
52 ${@bb.utils.filter('DISTRO_FEATURES', 'snmp systemd', d)} \
53 ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'testbench relp ${VALGRIND}', '', d)} \
54"
55
56# default yes in configure
57PACKAGECONFIG[relp] = "--enable-relp,--disable-relp,librelp,"
58PACKAGECONFIG[rsyslogd] = "--enable-rsyslogd,--disable-rsyslogd,,"
59PACKAGECONFIG[rsyslogrt] = "--enable-rsyslogrt,--disable-rsyslogrt,,"
60PACKAGECONFIG[fmhttp] = "--enable-fmhttp,--disable-fmhttp,curl,"
61PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,,"
62PACKAGECONFIG[klog] = "--enable-klog,--disable-klog,,"
63PACKAGECONFIG[libcap-ng] = "--enable-libcap-ng,--disable-libcap-ng,libcap-ng,"
64PACKAGECONFIG[regexp] = "--enable-regexp,--disable-regexp,,"
65PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux,"
66PACKAGECONFIG[libgcrypt] = "--enable-libgcrypt,--disable-libgcrypt,libgcrypt,"
67PACKAGECONFIG[testbench] = "--enable-testbench --enable-omstdout,--disable-testbench --disable-omstdout,,"
68
69# default no in configure
70PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,,"
71PACKAGECONFIG[imdiag] = "--enable-imdiag,--disable-imdiag,,"
72PACKAGECONFIG[imfile] = "--enable-imfile,--disable-imfile,,"
73PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp,"
74PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls,"
75PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl,"
76PACKAGECONFIG[systemd] = "--enable-libsystemd,--disable-libsystemd,systemd,"
77PACKAGECONFIG[imjournal] = "--enable-imjournal,--disable-imjournal,"
78PACKAGECONFIG[mmjsonparse] = "--enable-mmjsonparse,--disable-mmjsonparse,"
79PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5,"
80PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql,"
81PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi,"
82PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,,"
83PACKAGECONFIG[valgrind] = ",--without-valgrind-testbench,valgrind,"
84PACKAGECONFIG[imhttp] = "--enable-imhttp,--disable-imhttp,civetweb,"
85
86
87TESTDIR = "tests"
88do_compile_ptest() {
89 echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile
90 oe_runmake -C ${TESTDIR} buildtest-TESTS
91}
92
93do_install_ptest() {
94 # install the tests
95 cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH}
96 cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH}
97
98 # give permissions to all users
99 # some tests need to write to this directory as user 'daemon'
100 chmod 777 -R ${D}${PTEST_PATH}/tests
101
102 # do NOT need to rebuild Makefile itself
103 sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
104 # do NOT need to rebuild $(check_PROGRAMS)
105 sed -i 's/^check-TESTS:.*$/check-TESTS:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
106
107 # fix the srcdir, top_srcdir
108 sed -i 's,^\(srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
109 sed -i 's,^\(top_srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
110 # fix the abs_top_builddir
111 sed -i 's,^\(abs_top_builddir = \).*,\1${PTEST_PATH}/,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
112
113 # install test-driver
114 install -m 644 ${S}/test-driver ${D}${PTEST_PATH}
115
116 # install necessary links
117 install -d ${D}${PTEST_PATH}/tools
118 ln -sf ${sbindir}/rsyslogd ${D}${PTEST_PATH}/tools/rsyslogd
119
120 install -d ${D}${PTEST_PATH}/runtime
121 install -d ${D}${PTEST_PATH}/runtime/.libs
122 (
123 cd ${D}/${libdir}/rsyslog
124 allso="*.so"
125 for i in $allso; do
126 ln -sf ${libdir}/rsyslog/$i ${D}${PTEST_PATH}/runtime/.libs/$i
127 done
128 )
129
130 # fix the module load path with runtime/.libs
131 find ${D}${PTEST_PATH}/${TESTDIR} -name "*.conf" -o -name "*.sh" -o -name "*.c" | xargs \
132 sed -i -e 's:../plugins/.*/.libs/:../runtime/.libs/:g'
133 # fix the python3 path for tests/set-envar
134 sed -i -e s:${HOSTTOOLS_DIR}:${bindir}:g ${D}${PTEST_PATH}/tests/set-envvars
135}
136
137do_install:append() {
138 install -d "${D}${sysconfdir}/init.d"
139 install -d "${D}${sysconfdir}/logrotate.d"
140 install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog
141 install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf
142 install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog
143 sed -i -e "s#@BINDIR@#${bindir}#g" ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog
144
145 if ${@bb.utils.contains('PACKAGECONFIG', 'imjournal', 'true', 'false', d)}; then
146 install -d 0755 ${D}${sysconfdir}/rsyslog.d
147 echo '$ModLoad imjournal' >> ${D}${sysconfdir}/rsyslog.d/imjournal.conf
148 fi
149 if ${@bb.utils.contains('PACKAGECONFIG', 'mmjsonparse', 'true', 'false', d)}; then
150 install -d 0755 ${D}${sysconfdir}/rsyslog.d
151 echo '$ModLoad mmjsonparse' >> ${D}${sysconfdir}/rsyslog.d/mmjsonparse.conf
152 fi
153 if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
154 install -d ${D}${systemd_system_unitdir}
155 install -m 644 ${WORKDIR}/rsyslog.service ${D}${systemd_system_unitdir}
156 sed -i -e "s,@sbindir@,${sbindir},g" ${D}${systemd_system_unitdir}/rsyslog.service
157 fi
158}
159
160FILES:${PN} += "${bindir}"
161
162INITSCRIPT_NAME = "syslog"
163INITSCRIPT_PARAMS = "defaults"
164
165CONFFILES:${PN} = "${sysconfdir}/rsyslog.conf"
166
167RCONFLICTS:${PN} = "busybox-syslog sysklogd syslog-ng"
168
169RPROVIDES:${PN} += "${PN}-systemd"
170RREPLACES:${PN} += "${PN}-systemd"
171RCONFLICTS:${PN} += "${PN}-systemd"
172SYSTEMD_SERVICE:${PN} = "${BPN}.service"
173
174RDEPENDS:${PN} += "logrotate"
175
176# for rsyslog-ptest
177VALGRIND = "valgrind"
178
179# valgrind supports armv7 and above
180VALGRIND:armv4 = ''
181VALGRIND:armv5 = ''
182VALGRIND:armv6 = ''
183
184# X32 isn't supported by valgrind at this time
185VALGRIND:linux-gnux32 = ''
186VALGRIND:linux-muslx32 = ''
187
188# Disable for some MIPS variants
189VALGRIND:mipsarchr6 = ''
190VALGRIND:linux-gnun32 = ''
191
192# Disable for powerpc64 with musl
193VALGRIND:libc-musl:powerpc64 = ''
194VALGRIND:libc-musl:powerpc64le = ''
195
196# RISC-V support for valgrind is not there yet
197VALGRIND:riscv64 = ""
198VALGRIND:riscv32 = ""
199
200# util-linux: logger needs the -d option
201RDEPENDS:${PN}-ptest += "\
202 make diffutils gzip bash gawk coreutils procps \
203 libgcc python3-core python3-io python3-json \
204 curl util-linux shadow \
205 "
206
207RRECOMMENDS:${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}"