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