From 61d407ad599c8057d8ca4020b87bb7a63d3c4494 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 11 May 2024 23:36:03 -0700 Subject: rsyslog: Upgrade to 8.2404.0 Add a patch to fix build with gcc14+musl Signed-off-by: Khem Raj --- ...ood.c-Pass-correct-parameter-type-to-send.patch | 35 ++++ .../recipes-extended/rsyslog/rsyslog_8.2402.0.bb | 207 --------------------- .../recipes-extended/rsyslog/rsyslog_8.2404.0.bb | 207 +++++++++++++++++++++ 3 files changed, 242 insertions(+), 207 deletions(-) create mode 100644 meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch delete mode 100644 meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb create mode 100644 meta-oe/recipes-extended/rsyslog/rsyslog_8.2404.0.bb (limited to 'meta-oe') diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch b/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch new file mode 100644 index 0000000000..5df29e7d90 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch @@ -0,0 +1,35 @@ +From 1e0a77d8a5ae7cd0223afadf46cdbb540119774d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 11 May 2024 23:31:46 -0700 +Subject: [PATCH] tests/tcpflood.c: Pass correct parameter type to sendto() + +Fixes build with GCC-14 and musl + +../../rsyslog-8.2404.0/tests/tcpflood.c:811:70: error: passing argument 5 of 'sendto' from incompatible pointer type [-Wincompatible-pointer-types] + 811 | lenSend = sendto(udpsockout, buf, lenBuf, 0, &udpRcvr, sizeof(udpRcvr)); + | ^~~~~~~~ + | | + | struct sockaddr_in * + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + tests/tcpflood.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/tcpflood.c b/tests/tcpflood.c +index bd8edaf..0feda23 100644 +--- a/tests/tcpflood.c ++++ b/tests/tcpflood.c +@@ -808,7 +808,7 @@ int sendMessages(struct instdata *inst) + } + lenSend = sendPlainTCP(socknum, buf, lenBuf, &error_number); + } else if(transport == TP_UDP) { +- lenSend = sendto(udpsockout, buf, lenBuf, 0, &udpRcvr, sizeof(udpRcvr)); ++ lenSend = sendto(udpsockout, buf, lenBuf, 0, (const struct sockaddr *)&udpRcvr, sizeof(udpRcvr)); + error_number = errno; + } else if(transport == TP_TLS) { + if(sockArray[socknum] == -1) { +-- +2.45.0 + diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb deleted file mode 100644 index af46cc14d7..0000000000 --- a/meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb +++ /dev/null @@ -1,207 +0,0 @@ -SUMMARY = "Rsyslog is an enhanced multi-threaded syslogd" -DESCRIPTION = "\ -Rsyslog is an enhanced syslogd supporting, among others, MySQL,\ - PostgreSQL, failover log destinations, syslog/tcp, fine grain\ - output format control, high precision timestamps, queued operations\ - and the ability to filter on any message part. It is quite\ - compatible to stock sysklogd and can be used as a drop-in replacement.\ - Its advanced features make it suitable for enterprise-class,\ - encryption protected syslog relay chains while at the same time being\ - very easy to setup for the novice user." - -DEPENDS = "zlib libestr libfastjson bison-native flex-native liblogging" -HOMEPAGE = "http://www.rsyslog.com/" -LICENSE = "GPL-3.0-only & LGPL-3.0-only & Apache-2.0" -LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973 \ - file://COPYING.LESSER;md5=cb7903f1e5c39ae838209e130dca270a \ - file://COPYING.ASL20;md5=052f8a09206615ab07326ff8ce2d9d32\ -" - -SRC_URI = "https://www.rsyslog.com/files/download/rsyslog/${BPN}-${PV}.tar.gz \ - file://initscript \ - file://rsyslog.conf \ - file://rsyslog.logrotate \ - file://rsyslog.service \ - file://use-pkgconfig-to-check-libgcrypt.patch \ - file://run-ptest \ - file://0001-tests-disable-the-check-for-inotify.patch \ -" - -SRC_URI:append:libc-musl = " \ - file://0001-Include-sys-time-h.patch \ - file://disable-omfile-outchannel.patch \ -" - -SRC_URI[sha256sum] = "acbdd8579489df36b4a383dc6909a61b7623807f0aff54c062115f2de7ea85ba" - -UPSTREAM_CHECK_URI = "https://github.com/rsyslog/rsyslog/releases" -UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" - -inherit autotools pkgconfig systemd update-rc.d ptest - -EXTRA_OECONF += "--disable-generate-man-pages ap_cv_atomic_builtins=yes" -EXTRA_OECONF += "--enable-imfile-tests" -EXTRA_OECONF:remove:mipsarch = "ap_cv_atomic_builtins=yes" -EXTRA_OECONF:remove:powerpc = "ap_cv_atomic_builtins=yes" -EXTRA_OECONF:remove:riscv32 = "ap_cv_atomic_builtins=yes" - -# first line is default yes in configure -PACKAGECONFIG ??= " \ - rsyslogd rsyslogrt klog inet regexp uuid libcap-ng libgcrypt \ - fmhttp imdiag openssl imfile \ - ${@bb.utils.filter('DISTRO_FEATURES', 'snmp systemd', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'testbench relp ${VALGRIND}', '', d)} \ -" - -# default yes in configure -PACKAGECONFIG[relp] = "--enable-relp,--disable-relp,librelp," -PACKAGECONFIG[rsyslogd] = "--enable-rsyslogd,--disable-rsyslogd,," -PACKAGECONFIG[rsyslogrt] = "--enable-rsyslogrt,--disable-rsyslogrt,," -PACKAGECONFIG[fmhttp] = "--enable-fmhttp,--disable-fmhttp,curl," -PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,," -PACKAGECONFIG[klog] = "--enable-klog,--disable-klog,," -PACKAGECONFIG[libcap-ng] = "--enable-libcap-ng,--disable-libcap-ng,libcap-ng," -PACKAGECONFIG[regexp] = "--enable-regexp,--disable-regexp,," -PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux," -PACKAGECONFIG[libgcrypt] = "--enable-libgcrypt,--disable-libgcrypt,libgcrypt," -PACKAGECONFIG[testbench] = "--enable-testbench --enable-omstdout,--disable-testbench --disable-omstdout,," - -# default no in configure -PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," -PACKAGECONFIG[imdiag] = "--enable-imdiag,--disable-imdiag,," -PACKAGECONFIG[imfile] = "--enable-imfile,--disable-imfile,," -PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp," -PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls," -PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl," -PACKAGECONFIG[systemd] = "--enable-libsystemd,--disable-libsystemd,systemd," -PACKAGECONFIG[imjournal] = "--enable-imjournal,--disable-imjournal," -PACKAGECONFIG[mmjsonparse] = "--enable-mmjsonparse,--disable-mmjsonparse," -PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5," -PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql," -PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi," -PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,," -PACKAGECONFIG[valgrind] = ",--without-valgrind-testbench,valgrind," -PACKAGECONFIG[imhttp] = "--enable-imhttp,--disable-imhttp,civetweb," - - -TESTDIR = "tests" -do_compile_ptest() { - echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile - oe_runmake -C ${TESTDIR} buildtest-TESTS -} - -do_install_ptest() { - # install the tests - cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} - cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} - - # give permissions to all users - # some tests need to write to this directory as user 'daemon' - chmod 777 -R ${D}${PTEST_PATH}/tests - - # do NOT need to rebuild Makefile itself - sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - # do NOT need to rebuild $(check_PROGRAMS) - sed -i 's/^check-TESTS:.*$/check-TESTS:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - - # fix the srcdir, top_srcdir - sed -i 's,^\(srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - sed -i 's,^\(top_srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - # fix the abs_top_builddir - sed -i 's,^\(abs_top_builddir = \).*,\1${PTEST_PATH}/,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile - - # install test-driver - install -m 644 ${S}/test-driver ${D}${PTEST_PATH} - - # install necessary links - install -d ${D}${PTEST_PATH}/tools - ln -sf ${sbindir}/rsyslogd ${D}${PTEST_PATH}/tools/rsyslogd - - install -d ${D}${PTEST_PATH}/runtime - install -d ${D}${PTEST_PATH}/runtime/.libs - ( - cd ${D}/${libdir}/rsyslog - allso="*.so" - for i in $allso; do - ln -sf ${libdir}/rsyslog/$i ${D}${PTEST_PATH}/runtime/.libs/$i - done - ) - - # fix the module load path with runtime/.libs - find ${D}${PTEST_PATH}/${TESTDIR} -name "*.conf" -o -name "*.sh" -o -name "*.c" | xargs \ - sed -i -e 's:../plugins/.*/.libs/:../runtime/.libs/:g' - # fix the python3 path for tests/set-envar - sed -i -e s:${HOSTTOOLS_DIR}:${bindir}:g ${D}${PTEST_PATH}/tests/set-envvars -} - -do_install:append() { - install -d "${D}${sysconfdir}/init.d" - install -d "${D}${sysconfdir}/logrotate.d" - install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog - install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf - install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog - sed -i -e "s#@BINDIR@#${bindir}#g" ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog - - if ${@bb.utils.contains('PACKAGECONFIG', 'imjournal', 'true', 'false', d)}; then - install -d 0755 ${D}${sysconfdir}/rsyslog.d - echo '$ModLoad imjournal' >> ${D}${sysconfdir}/rsyslog.d/imjournal.conf - fi - if ${@bb.utils.contains('PACKAGECONFIG', 'mmjsonparse', 'true', 'false', d)}; then - install -d 0755 ${D}${sysconfdir}/rsyslog.d - echo '$ModLoad mmjsonparse' >> ${D}${sysconfdir}/rsyslog.d/mmjsonparse.conf - fi - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - install -d ${D}${systemd_system_unitdir} - install -m 644 ${WORKDIR}/rsyslog.service ${D}${systemd_system_unitdir} - sed -i -e "s,@sbindir@,${sbindir},g" ${D}${systemd_system_unitdir}/rsyslog.service - fi -} - -FILES:${PN} += "${bindir}" - -INITSCRIPT_NAME = "syslog" -INITSCRIPT_PARAMS = "defaults" - -CONFFILES:${PN} = "${sysconfdir}/rsyslog.conf" - -RCONFLICTS:${PN} = "busybox-syslog sysklogd syslog-ng" - -RPROVIDES:${PN} += "${PN}-systemd" -RREPLACES:${PN} += "${PN}-systemd" -RCONFLICTS:${PN} += "${PN}-systemd" -SYSTEMD_SERVICE:${PN} = "${BPN}.service" - -RDEPENDS:${PN} += "logrotate" - -# for rsyslog-ptest -VALGRIND = "valgrind" - -# valgrind supports armv7 and above -VALGRIND:armv4 = '' -VALGRIND:armv5 = '' -VALGRIND:armv6 = '' - -# X32 isn't supported by valgrind at this time -VALGRIND:linux-gnux32 = '' -VALGRIND:linux-muslx32 = '' - -# Disable for some MIPS variants -VALGRIND:mipsarchr6 = '' -VALGRIND:linux-gnun32 = '' - -# Disable for powerpc64 with musl -VALGRIND:libc-musl:powerpc64 = '' -VALGRIND:libc-musl:powerpc64le = '' - -# RISC-V support for valgrind is not there yet -VALGRIND:riscv64 = "" -VALGRIND:riscv32 = "" - -# util-linux: logger needs the -d option -RDEPENDS:${PN}-ptest += "\ - make diffutils gzip bash gawk coreutils procps \ - libgcc python3-core python3-io python3-json \ - curl util-linux shadow \ - " - -RRECOMMENDS:${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" 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 @@ +SUMMARY = "Rsyslog is an enhanced multi-threaded syslogd" +DESCRIPTION = "\ +Rsyslog is an enhanced syslogd supporting, among others, MySQL,\ + PostgreSQL, failover log destinations, syslog/tcp, fine grain\ + output format control, high precision timestamps, queued operations\ + and the ability to filter on any message part. It is quite\ + compatible to stock sysklogd and can be used as a drop-in replacement.\ + Its advanced features make it suitable for enterprise-class,\ + encryption protected syslog relay chains while at the same time being\ + very easy to setup for the novice user." + +DEPENDS = "zlib libestr libfastjson bison-native flex-native liblogging" +HOMEPAGE = "http://www.rsyslog.com/" +LICENSE = "GPL-3.0-only & LGPL-3.0-only & Apache-2.0" +LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973 \ + file://COPYING.LESSER;md5=cb7903f1e5c39ae838209e130dca270a \ + file://COPYING.ASL20;md5=052f8a09206615ab07326ff8ce2d9d32\ +" + +SRC_URI = "https://www.rsyslog.com/files/download/rsyslog/${BPN}-${PV}.tar.gz \ + file://initscript \ + file://rsyslog.conf \ + file://rsyslog.logrotate \ + file://rsyslog.service \ + file://use-pkgconfig-to-check-libgcrypt.patch \ + file://run-ptest \ + file://0001-tests-disable-the-check-for-inotify.patch \ + file://0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch \ +" + +SRC_URI:append:libc-musl = " \ + file://0001-Include-sys-time-h.patch \ + file://disable-omfile-outchannel.patch \ +" +SRC_URI[sha256sum] = "30528d140ec1b1f079224081fa37df6e06587ff42b02e3e61f2daa0526c54d33" + +UPSTREAM_CHECK_URI = "https://github.com/rsyslog/rsyslog/releases" +UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)" + +inherit autotools pkgconfig systemd update-rc.d ptest + +EXTRA_OECONF += "--disable-generate-man-pages ap_cv_atomic_builtins=yes" +EXTRA_OECONF += "--enable-imfile-tests" +EXTRA_OECONF:remove:mipsarch = "ap_cv_atomic_builtins=yes" +EXTRA_OECONF:remove:powerpc = "ap_cv_atomic_builtins=yes" +EXTRA_OECONF:remove:riscv32 = "ap_cv_atomic_builtins=yes" + +# first line is default yes in configure +PACKAGECONFIG ??= " \ + rsyslogd rsyslogrt klog inet regexp uuid libcap-ng libgcrypt \ + fmhttp imdiag openssl imfile \ + ${@bb.utils.filter('DISTRO_FEATURES', 'snmp systemd', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'testbench relp ${VALGRIND}', '', d)} \ +" + +# default yes in configure +PACKAGECONFIG[relp] = "--enable-relp,--disable-relp,librelp," +PACKAGECONFIG[rsyslogd] = "--enable-rsyslogd,--disable-rsyslogd,," +PACKAGECONFIG[rsyslogrt] = "--enable-rsyslogrt,--disable-rsyslogrt,," +PACKAGECONFIG[fmhttp] = "--enable-fmhttp,--disable-fmhttp,curl," +PACKAGECONFIG[inet] = "--enable-inet,--disable-inet,," +PACKAGECONFIG[klog] = "--enable-klog,--disable-klog,," +PACKAGECONFIG[libcap-ng] = "--enable-libcap-ng,--disable-libcap-ng,libcap-ng," +PACKAGECONFIG[regexp] = "--enable-regexp,--disable-regexp,," +PACKAGECONFIG[uuid] = "--enable-uuid,--disable-uuid,util-linux," +PACKAGECONFIG[libgcrypt] = "--enable-libgcrypt,--disable-libgcrypt,libgcrypt," +PACKAGECONFIG[testbench] = "--enable-testbench --enable-omstdout,--disable-testbench --disable-omstdout,," + +# default no in configure +PACKAGECONFIG[debug] = "--enable-debug,--disable-debug,," +PACKAGECONFIG[imdiag] = "--enable-imdiag,--disable-imdiag,," +PACKAGECONFIG[imfile] = "--enable-imfile,--disable-imfile,," +PACKAGECONFIG[snmp] = "--enable-snmp,--disable-snmp,net-snmp," +PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls," +PACKAGECONFIG[openssl] = "--enable-openssl,--disable-openssl,openssl," +PACKAGECONFIG[systemd] = "--enable-libsystemd,--disable-libsystemd,systemd," +PACKAGECONFIG[imjournal] = "--enable-imjournal,--disable-imjournal," +PACKAGECONFIG[mmjsonparse] = "--enable-mmjsonparse,--disable-mmjsonparse," +PACKAGECONFIG[mysql] = "--enable-mysql,--disable-mysql,mysql5," +PACKAGECONFIG[postgresql] = "--enable-pgsql,--disable-pgsql,postgresql," +PACKAGECONFIG[libdbi] = "--enable-libdbi,--disable-libdbi,libdbi," +PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,," +PACKAGECONFIG[valgrind] = ",--without-valgrind-testbench,valgrind," +PACKAGECONFIG[imhttp] = "--enable-imhttp,--disable-imhttp,civetweb," + + +TESTDIR = "tests" +do_compile_ptest() { + echo 'buildtest-TESTS: $(check_PROGRAMS)' >> ${TESTDIR}/Makefile + oe_runmake -C ${TESTDIR} buildtest-TESTS +} + +do_install_ptest() { + # install the tests + cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} + cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} + + # give permissions to all users + # some tests need to write to this directory as user 'daemon' + chmod 777 -R ${D}${PTEST_PATH}/tests + + # do NOT need to rebuild Makefile itself + sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + # do NOT need to rebuild $(check_PROGRAMS) + sed -i 's/^check-TESTS:.*$/check-TESTS:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + + # fix the srcdir, top_srcdir + sed -i 's,^\(srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + sed -i 's,^\(top_srcdir = \).*,\1${PTEST_PATH}/tests,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + # fix the abs_top_builddir + sed -i 's,^\(abs_top_builddir = \).*,\1${PTEST_PATH}/,' ${D}${PTEST_PATH}/${TESTDIR}/Makefile + + # install test-driver + install -m 644 ${S}/test-driver ${D}${PTEST_PATH} + + # install necessary links + install -d ${D}${PTEST_PATH}/tools + ln -sf ${sbindir}/rsyslogd ${D}${PTEST_PATH}/tools/rsyslogd + + install -d ${D}${PTEST_PATH}/runtime + install -d ${D}${PTEST_PATH}/runtime/.libs + ( + cd ${D}/${libdir}/rsyslog + allso="*.so" + for i in $allso; do + ln -sf ${libdir}/rsyslog/$i ${D}${PTEST_PATH}/runtime/.libs/$i + done + ) + + # fix the module load path with runtime/.libs + find ${D}${PTEST_PATH}/${TESTDIR} -name "*.conf" -o -name "*.sh" -o -name "*.c" | xargs \ + sed -i -e 's:../plugins/.*/.libs/:../runtime/.libs/:g' + # fix the python3 path for tests/set-envar + sed -i -e s:${HOSTTOOLS_DIR}:${bindir}:g ${D}${PTEST_PATH}/tests/set-envvars +} + +do_install:append() { + install -d "${D}${sysconfdir}/init.d" + install -d "${D}${sysconfdir}/logrotate.d" + install -m 755 ${WORKDIR}/initscript ${D}${sysconfdir}/init.d/syslog + install -m 644 ${WORKDIR}/rsyslog.conf ${D}${sysconfdir}/rsyslog.conf + install -m 644 ${WORKDIR}/rsyslog.logrotate ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog + sed -i -e "s#@BINDIR@#${bindir}#g" ${D}${sysconfdir}/logrotate.d/logrotate.rsyslog + + if ${@bb.utils.contains('PACKAGECONFIG', 'imjournal', 'true', 'false', d)}; then + install -d 0755 ${D}${sysconfdir}/rsyslog.d + echo '$ModLoad imjournal' >> ${D}${sysconfdir}/rsyslog.d/imjournal.conf + fi + if ${@bb.utils.contains('PACKAGECONFIG', 'mmjsonparse', 'true', 'false', d)}; then + install -d 0755 ${D}${sysconfdir}/rsyslog.d + echo '$ModLoad mmjsonparse' >> ${D}${sysconfdir}/rsyslog.d/mmjsonparse.conf + fi + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -d ${D}${systemd_system_unitdir} + install -m 644 ${WORKDIR}/rsyslog.service ${D}${systemd_system_unitdir} + sed -i -e "s,@sbindir@,${sbindir},g" ${D}${systemd_system_unitdir}/rsyslog.service + fi +} + +FILES:${PN} += "${bindir}" + +INITSCRIPT_NAME = "syslog" +INITSCRIPT_PARAMS = "defaults" + +CONFFILES:${PN} = "${sysconfdir}/rsyslog.conf" + +RCONFLICTS:${PN} = "busybox-syslog sysklogd syslog-ng" + +RPROVIDES:${PN} += "${PN}-systemd" +RREPLACES:${PN} += "${PN}-systemd" +RCONFLICTS:${PN} += "${PN}-systemd" +SYSTEMD_SERVICE:${PN} = "${BPN}.service" + +RDEPENDS:${PN} += "logrotate" + +# for rsyslog-ptest +VALGRIND = "valgrind" + +# valgrind supports armv7 and above +VALGRIND:armv4 = '' +VALGRIND:armv5 = '' +VALGRIND:armv6 = '' + +# X32 isn't supported by valgrind at this time +VALGRIND:linux-gnux32 = '' +VALGRIND:linux-muslx32 = '' + +# Disable for some MIPS variants +VALGRIND:mipsarchr6 = '' +VALGRIND:linux-gnun32 = '' + +# Disable for powerpc64 with musl +VALGRIND:libc-musl:powerpc64 = '' +VALGRIND:libc-musl:powerpc64le = '' + +# RISC-V support for valgrind is not there yet +VALGRIND:riscv64 = "" +VALGRIND:riscv32 = "" + +# util-linux: logger needs the -d option +RDEPENDS:${PN}-ptest += "\ + make diffutils gzip bash gawk coreutils procps \ + libgcc python3-core python3-io python3-json \ + curl util-linux shadow \ + " + +RRECOMMENDS:${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" -- cgit v1.2.3-54-g00ecf