diff options
| author | Khem Raj <raj.khem@gmail.com> | 2024-05-11 23:36:03 -0700 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2024-05-12 21:51:32 -0700 |
| commit | 61d407ad599c8057d8ca4020b87bb7a63d3c4494 (patch) | |
| tree | 078a2a898ae3da260b6d10fb1ba81699c40162c1 /meta-oe/recipes-extended/rsyslog/rsyslog_8.2404.0.bb | |
| parent | 9e916094440d2530afc04da5455bec74563399d8 (diff) | |
| download | meta-openembedded-61d407ad599c8057d8ca4020b87bb7a63d3c4494.tar.gz | |
rsyslog: Upgrade to 8.2404.0
Add a patch to fix build with gcc14+musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/rsyslog/rsyslog_8.2404.0.bb')
| -rw-r--r-- | meta-oe/recipes-extended/rsyslog/rsyslog_8.2404.0.bb | 207 |
1 files changed, 207 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_8.2404.0.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_8.2404.0.bb new file mode 100644 index 0000000000..5152984249 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog_8.2404.0.bb | |||
| @@ -0,0 +1,207 @@ | |||
| 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 | file://0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch \ | ||
| 29 | " | ||
| 30 | |||
| 31 | SRC_URI:append:libc-musl = " \ | ||
| 32 | file://0001-Include-sys-time-h.patch \ | ||
| 33 | file://disable-omfile-outchannel.patch \ | ||
| 34 | " | ||
| 35 | SRC_URI[sha256sum] = "30528d140ec1b1f079224081fa37df6e06587ff42b02e3e61f2daa0526c54d33" | ||
| 36 | |||
| 37 | UPSTREAM_CHECK_URI = "https://github.com/rsyslog/rsyslog/releases" | ||
| 38 | UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" | ||
| 39 | |||
| 40 | inherit autotools pkgconfig systemd update-rc.d ptest | ||
| 41 | |||
| 42 | EXTRA_OECONF += "--disable-generate-man-pages ap_cv_atomic_builtins=yes" | ||
| 43 | EXTRA_OECONF += "--enable-imfile-tests" | ||
| 44 | EXTRA_OECONF:remove:mipsarch = "ap_cv_atomic_builtins=yes" | ||
| 45 | EXTRA_OECONF:remove:powerpc = "ap_cv_atomic_builtins=yes" | ||
| 46 | EXTRA_OECONF:remove:riscv32 = "ap_cv_atomic_builtins=yes" | ||
| 47 | |||
| 48 | # first line is default yes in configure | ||
| 49 | PACKAGECONFIG ??= " \ | ||
| 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 | ||
| 57 | PACKAGECONFIG[relp] = "--enable-relp,--disable-relp,librelp," | ||
| 58 | PACKAGECONFIG[rsyslogd] = "--enable-rsyslogd,--disable-rsyslogd,," | ||
| 59 | PACKAGECONFIG[rsyslogrt] = "--enable-rsyslogrt,--disable-rsyslogrt,," | ||
| 60 | PACKAGECONFIG[fmhttp] = "--enable-fmhttp,--disable-fmhttp,curl," | ||
| 61 | PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,," | ||
| 62 | PACKAGECONFIG[klog] = "--enable-klog,--disable-klog,," | ||
| 63 | PACKAGECONFIG[libcap-ng] = "--enable-libcap-ng,--disable-libcap-ng,libcap-ng," | ||
| 64 | PACKAGECONFIG[regexp] = "--enable-regexp,--disable-regexp,," | ||
| 65 | PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux," | ||
| 66 | PACKAGECONFIG[libgcrypt] = "--enable-libgcrypt,--disable-libgcrypt,libgcrypt," | ||
| 67 | PACKAGECONFIG[testbench] = "--enable-testbench --enable-omstdout,--disable-testbench --disable-omstdout,," | ||
| 68 | |||
| 69 | # default no in configure | ||
| 70 | PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," | ||
| 71 | PACKAGECONFIG[imdiag] = "--enable-imdiag,--disable-imdiag,," | ||
| 72 | PACKAGECONFIG[imfile] = "--enable-imfile,--disable-imfile,," | ||
| 73 | PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp," | ||
| 74 | PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls," | ||
| 75 | PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl," | ||
| 76 | PACKAGECONFIG[systemd] = "--enable-libsystemd,--disable-libsystemd,systemd," | ||
| 77 | PACKAGECONFIG[imjournal] = "--enable-imjournal,--disable-imjournal," | ||
| 78 | PACKAGECONFIG[mmjsonparse] = "--enable-mmjsonparse,--disable-mmjsonparse," | ||
| 79 | PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5," | ||
| 80 | PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql," | ||
| 81 | PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi," | ||
| 82 | PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,," | ||
| 83 | PACKAGECONFIG[valgrind] = ",--without-valgrind-testbench,valgrind," | ||
| 84 | PACKAGECONFIG[imhttp] = "--enable-imhttp,--disable-imhttp,civetweb," | ||
| 85 | |||
| 86 | |||
| 87 | TESTDIR = "tests" | ||
| 88 | do_compile_ptest() { | ||
| 89 | echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile | ||
| 90 | oe_runmake -C ${TESTDIR} buildtest-TESTS | ||
| 91 | } | ||
| 92 | |||
| 93 | do_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 | |||
| 137 | do_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 | |||
| 160 | FILES:${PN} += "${bindir}" | ||
| 161 | |||
| 162 | INITSCRIPT_NAME = "syslog" | ||
| 163 | INITSCRIPT_PARAMS = "defaults" | ||
| 164 | |||
| 165 | CONFFILES:${PN} = "${sysconfdir}/rsyslog.conf" | ||
| 166 | |||
| 167 | RCONFLICTS:${PN} = "busybox-syslog sysklogd syslog-ng" | ||
| 168 | |||
| 169 | RPROVIDES:${PN} += "${PN}-systemd" | ||
| 170 | RREPLACES:${PN} += "${PN}-systemd" | ||
| 171 | RCONFLICTS:${PN} += "${PN}-systemd" | ||
| 172 | SYSTEMD_SERVICE:${PN} = "${BPN}.service" | ||
| 173 | |||
| 174 | RDEPENDS:${PN} += "logrotate" | ||
| 175 | |||
| 176 | # for rsyslog-ptest | ||
| 177 | VALGRIND = "valgrind" | ||
| 178 | |||
| 179 | # valgrind supports armv7 and above | ||
| 180 | VALGRIND:armv4 = '' | ||
| 181 | VALGRIND:armv5 = '' | ||
| 182 | VALGRIND:armv6 = '' | ||
| 183 | |||
| 184 | # X32 isn't supported by valgrind at this time | ||
| 185 | VALGRIND:linux-gnux32 = '' | ||
| 186 | VALGRIND:linux-muslx32 = '' | ||
| 187 | |||
| 188 | # Disable for some MIPS variants | ||
| 189 | VALGRIND:mipsarchr6 = '' | ||
| 190 | VALGRIND:linux-gnun32 = '' | ||
| 191 | |||
| 192 | # Disable for powerpc64 with musl | ||
| 193 | VALGRIND:libc-musl:powerpc64 = '' | ||
| 194 | VALGRIND:libc-musl:powerpc64le = '' | ||
| 195 | |||
| 196 | # RISC-V support for valgrind is not there yet | ||
| 197 | VALGRIND:riscv64 = "" | ||
| 198 | VALGRIND:riscv32 = "" | ||
| 199 | |||
| 200 | # util-linux: logger needs the -d option | ||
| 201 | RDEPENDS:${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 | |||
| 207 | RRECOMMENDS:${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" | ||
