diff options
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.bb | 206 |
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 @@ | |||
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 libfastjson bison-native flex-native liblogging" | ||
13 | HOMEPAGE = "http://www.rsyslog.com/" | ||
14 | LICENSE = "GPL-3.0-only & LGPL-3.0-only & 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 = "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 | |||
30 | SRC_URI:append:libc-musl = " \ | ||
31 | file://0001-Include-sys-time-h.patch \ | ||
32 | " | ||
33 | |||
34 | SRC_URI[sha256sum] = "f6283efaadc609540a56e6bec88a362c966e77f29fe48e6b734bd6c1123e0be5" | ||
35 | |||
36 | UPSTREAM_CHECK_URI = "https://github.com/rsyslog/rsyslog/releases" | ||
37 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" | ||
38 | |||
39 | inherit autotools pkgconfig systemd update-rc.d ptest | ||
40 | |||
41 | EXTRA_OECONF += "--disable-generate-man-pages ap_cv_atomic_builtins=yes" | ||
42 | EXTRA_OECONF += "--enable-imfile-tests" | ||
43 | EXTRA_OECONF:remove:mipsarch = "ap_cv_atomic_builtins=yes" | ||
44 | EXTRA_OECONF:remove:powerpc = "ap_cv_atomic_builtins=yes" | ||
45 | EXTRA_OECONF:remove:riscv32 = "ap_cv_atomic_builtins=yes" | ||
46 | |||
47 | # first line is default yes in configure | ||
48 | PACKAGECONFIG ??= " \ | ||
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 | ||
56 | PACKAGECONFIG[relp] = "--enable-relp,--disable-relp,librelp," | ||
57 | PACKAGECONFIG[rsyslogd] = "--enable-rsyslogd,--disable-rsyslogd,," | ||
58 | PACKAGECONFIG[rsyslogrt] = "--enable-rsyslogrt,--disable-rsyslogrt,," | ||
59 | PACKAGECONFIG[fmhttp] = "--enable-fmhttp,--disable-fmhttp,curl," | ||
60 | PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,," | ||
61 | PACKAGECONFIG[klog] = "--enable-klog,--disable-klog,," | ||
62 | PACKAGECONFIG[regexp] = "--enable-regexp,--disable-regexp,," | ||
63 | PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux," | ||
64 | PACKAGECONFIG[libgcrypt] = "--enable-libgcrypt,--disable-libgcrypt,libgcrypt," | ||
65 | PACKAGECONFIG[testbench] = "--enable-testbench --enable-omstdout,--disable-testbench --disable-omstdout,," | ||
66 | |||
67 | # default no in configure | ||
68 | PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," | ||
69 | PACKAGECONFIG[imdiag] = "--enable-imdiag,--disable-imdiag,," | ||
70 | PACKAGECONFIG[imfile] = "--enable-imfile,--disable-imfile,," | ||
71 | PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp," | ||
72 | PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls," | ||
73 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd," | ||
74 | PACKAGECONFIG[imjournal] = "--enable-imjournal,--disable-imjournal," | ||
75 | PACKAGECONFIG[mmjsonparse] = "--enable-mmjsonparse,--disable-mmjsonparse," | ||
76 | PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5," | ||
77 | PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql," | ||
78 | PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi," | ||
79 | # For libcap-ng, see commit log and https://github.com/rsyslog/rsyslog/issues/5091 | ||
80 | PACKAGECONFIG[libcap-ng] = "--enable-libcap-ng,--disable-libcap-ng,libcap-ng," | ||
81 | PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,," | ||
82 | PACKAGECONFIG[valgrind] = ",--without-valgrind-testbench,valgrind," | ||
83 | PACKAGECONFIG[imhttp] = "--enable-imhttp,--disable-imhttp,civetweb," | ||
84 | |||
85 | |||
86 | TESTDIR = "tests" | ||
87 | do_compile_ptest() { | ||
88 | echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile | ||
89 | oe_runmake -C ${TESTDIR} buildtest-TESTS | ||
90 | } | ||
91 | |||
92 | do_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 | |||
136 | do_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 | |||
159 | FILES:${PN} += "${bindir}" | ||
160 | |||
161 | INITSCRIPT_NAME = "syslog" | ||
162 | INITSCRIPT_PARAMS = "defaults" | ||
163 | |||
164 | CONFFILES:${PN} = "${sysconfdir}/rsyslog.conf" | ||
165 | |||
166 | RCONFLICTS:${PN} = "busybox-syslog sysklogd syslog-ng" | ||
167 | |||
168 | RPROVIDES:${PN} += "${PN}-systemd" | ||
169 | RREPLACES:${PN} += "${PN}-systemd" | ||
170 | RCONFLICTS:${PN} += "${PN}-systemd" | ||
171 | SYSTEMD_SERVICE:${PN} = "${BPN}.service" | ||
172 | |||
173 | RDEPENDS:${PN} += "logrotate" | ||
174 | |||
175 | # for rsyslog-ptest | ||
176 | VALGRIND = "valgrind" | ||
177 | |||
178 | # valgrind supports armv7 and above | ||
179 | VALGRIND:armv4 = '' | ||
180 | VALGRIND:armv5 = '' | ||
181 | VALGRIND:armv6 = '' | ||
182 | |||
183 | # X32 isn't supported by valgrind at this time | ||
184 | VALGRIND:linux-gnux32 = '' | ||
185 | VALGRIND:linux-muslx32 = '' | ||
186 | |||
187 | # Disable for some MIPS variants | ||
188 | VALGRIND:mipsarchr6 = '' | ||
189 | VALGRIND:linux-gnun32 = '' | ||
190 | |||
191 | # Disable for powerpc64 with musl | ||
192 | VALGRIND:libc-musl:powerpc64 = '' | ||
193 | VALGRIND:libc-musl:powerpc64le = '' | ||
194 | |||
195 | # RISC-V support for valgrind is not there yet | ||
196 | VALGRIND:riscv64 = "" | ||
197 | VALGRIND:riscv32 = "" | ||
198 | |||
199 | # util-linux: logger needs the -d option | ||
200 | RDEPENDS:${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 | |||
206 | RRECOMMENDS:${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" | ||