diff options
3 files changed, 60 insertions, 7 deletions
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-disable-the-check-for-inotify.patch b/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-disable-the-check-for-inotify.patch new file mode 100644 index 0000000000..552172d397 --- /dev/null +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-disable-the-check-for-inotify.patch | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | From 194e199ce08acc2192f6a63420ff24d9064666e5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Yi Fan Yu <yifan.yu@windriver.com> | ||
| 3 | Date: Sat, 27 Mar 2021 19:18:25 -0400 | ||
| 4 | Subject: [PATCH] tests: disable the check for inotify | ||
| 5 | |||
| 6 | We don't need to check inotify.h. | ||
| 7 | Assume it is present since it is part of the linux kernel | ||
| 8 | since 2.6.13 [1]. | ||
| 9 | |||
| 10 | [1](https://kernelnewbies.org/Linux_2_6_13) | ||
| 11 | |||
| 12 | (it would require installing the libc headers otherwise, | ||
| 13 | for the test to detect /usr/include/sys/inotify.h.) | ||
| 14 | |||
| 15 | Upstream-Status: Inappropriate[OE-specific] | ||
| 16 | |||
| 17 | Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> | ||
| 18 | --- | ||
| 19 | tests/diag.sh | 4 ++-- | ||
| 20 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/tests/diag.sh b/tests/diag.sh | ||
| 23 | index 6cd60ea88..7424f48c5 100755 | ||
| 24 | --- a/tests/diag.sh | ||
| 25 | +++ b/tests/diag.sh | ||
| 26 | @@ -2672,7 +2672,7 @@ case $1 in | ||
| 27 | fi | ||
| 28 | ;; | ||
| 29 | 'check-inotify') # Check for inotify/fen support | ||
| 30 | - if [ -n "$(find /usr/include -name 'inotify.h' -print -quit)" ]; then | ||
| 31 | + if true; then | ||
| 32 | echo [inotify mode] | ||
| 33 | elif [ -n "$(find /usr/include/sys/ -name 'port.h' -print -quit)" ]; then | ||
| 34 | grep -qF "PORT_SOURCE_FILE" < /usr/include/sys/port.h | ||
| 35 | @@ -2687,7 +2687,7 @@ case $1 in | ||
| 36 | fi | ||
| 37 | ;; | ||
| 38 | 'check-inotify-only') # Check for ONLY inotify support | ||
| 39 | - if [ -n "$(find /usr/include -name 'inotify.h' -print -quit)" ]; then | ||
| 40 | + if true; then | ||
| 41 | echo [inotify mode] | ||
| 42 | else | ||
| 43 | echo [inotify not supported, skipping...] | ||
| 44 | -- | ||
| 45 | 2.29.2 | ||
| 46 | |||
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest b/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest index aa698d85ce..efa9ba3ed0 100644 --- a/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest +++ b/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest | |||
| @@ -5,4 +5,8 @@ set -o pipefail | |||
| 5 | 5 | ||
| 6 | SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" | 6 | SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )" |
| 7 | cd ${SCRIPTPATH} | 7 | cd ${SCRIPTPATH} |
| 8 | make -C tests -k check-TESTS | 8 | useradd tester || echo "user already exists" |
| 9 | ln -sf /usr/sbin/logrotate /usr/bin/logrotate | ||
| 10 | su tester -c "make -C tests -k check-TESTS" | ||
| 11 | userdel tester | ||
| 12 | rm -f /usr/bin/logrotate | ||
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_8.2102.0.bb b/meta-oe/recipes-extended/rsyslog/rsyslog_8.2102.0.bb index 22059d1407..921124024c 100644 --- a/meta-oe/recipes-extended/rsyslog/rsyslog_8.2102.0.bb +++ b/meta-oe/recipes-extended/rsyslog/rsyslog_8.2102.0.bb | |||
| @@ -24,6 +24,7 @@ SRC_URI = "http://www.rsyslog.com/download/files/download/rsyslog/${BPN}-${PV}.t | |||
| 24 | file://rsyslog.service \ | 24 | file://rsyslog.service \ |
| 25 | file://use-pkgconfig-to-check-libgcrypt.patch \ | 25 | file://use-pkgconfig-to-check-libgcrypt.patch \ |
| 26 | file://run-ptest \ | 26 | file://run-ptest \ |
| 27 | file://0001-tests-disable-the-check-for-inotify.patch \ | ||
| 27 | " | 28 | " |
| 28 | 29 | ||
| 29 | SRC_URI_append_libc-musl = " \ | 30 | SRC_URI_append_libc-musl = " \ |
| @@ -80,11 +81,6 @@ PACKAGECONFIG[mail] = "--enable-mail,--disable-mail,," | |||
| 80 | PACKAGECONFIG[valgrind] = ",--without-valgrind-testbench,valgrind," | 81 | PACKAGECONFIG[valgrind] = ",--without-valgrind-testbench,valgrind," |
| 81 | PACKAGECONFIG[imhttp] = "--enable-imhttp,--disable-imhttp,civetweb," | 82 | PACKAGECONFIG[imhttp] = "--enable-imhttp,--disable-imhttp,civetweb," |
| 82 | 83 | ||
| 83 | do_configure_prepend() { | ||
| 84 | sed -i -e 's|python |python3 |g' ${S}/tests/*.sh | ||
| 85 | sed -i -e 's|/usr/bin/env python|/usr/bin/env python3|g' ${S}/tests/*.py | ||
| 86 | sed -i -e 's|/usr/bin/env python|/usr/bin/env python3|g' ${S}/tests/testsuites/*.py | ||
| 87 | } | ||
| 88 | 84 | ||
| 89 | TESTDIR = "tests" | 85 | TESTDIR = "tests" |
| 90 | do_compile_ptest() { | 86 | do_compile_ptest() { |
| @@ -97,6 +93,10 @@ do_install_ptest() { | |||
| 97 | cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} | 93 | cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH} |
| 98 | cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} | 94 | cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH} |
| 99 | 95 | ||
| 96 | # give permissions to all users | ||
| 97 | # some tests need to write to this directory as user 'daemon' | ||
| 98 | chmod 777 -R ${D}${PTEST_PATH}/tests | ||
| 99 | |||
| 100 | # do NOT need to rebuild Makefile itself | 100 | # do NOT need to rebuild Makefile itself |
| 101 | sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile | 101 | sed -i 's/^Makefile:.*$/Makefile:/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile |
| 102 | # do NOT need to rebuild $(check_PROGRAMS) | 102 | # do NOT need to rebuild $(check_PROGRAMS) |
| @@ -195,8 +195,11 @@ VALGRIND_libc-musl_powerpc64le = '' | |||
| 195 | VALGRIND_riscv64 = "" | 195 | VALGRIND_riscv64 = "" |
| 196 | VALGRIND_riscv32 = "" | 196 | VALGRIND_riscv32 = "" |
| 197 | 197 | ||
| 198 | # util-linux: logger needs the -d option | ||
| 198 | RDEPENDS_${PN}-ptest += "\ | 199 | RDEPENDS_${PN}-ptest += "\ |
| 199 | make diffutils gzip bash gawk coreutils procps \ | 200 | make diffutils gzip bash gawk coreutils procps \ |
| 200 | libgcc python3-core python3-io \ | 201 | libgcc python3-core python3-io python3-json \ |
| 202 | curl util-linux shadow \ | ||
| 201 | " | 203 | " |
| 204 | |||
| 202 | RRECOMMENDS_${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" | 205 | RRECOMMENDS_${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" |
