summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-oe/recipes-extended/rsyslog
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-openembedded/meta-oe/recipes-extended/rsyslog')
-rw-r--r--external/meta-openembedded/meta-oe/recipes-extended/rsyslog/libfastjson/0001-fix-jump-misses-init-gcc-8-warning.patch46
-rw-r--r--external/meta-openembedded/meta-oe/recipes-extended/rsyslog/libfastjson_0.99.8.bb16
-rw-r--r--external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-fix-jump-misses-init-error.patch71
-rw-r--r--external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-increase-the-size-of-szHname.patch53
-rw-r--r--external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.2.16.bb18
-rw-r--r--external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch32
-rw-r--r--external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/initscript118
-rw-r--r--external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-fix-ptest-not-finish.patch118
-rw-r--r--external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf91
-rw-r--r--external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate39
-rw-r--r--external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest3
-rw-r--r--external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch43
-rw-r--r--external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.37.0.bb165
13 files changed, 813 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/libfastjson/0001-fix-jump-misses-init-gcc-8-warning.patch b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/libfastjson/0001-fix-jump-misses-init-gcc-8-warning.patch
new file mode 100644
index 00000000..25e5efa4
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/libfastjson/0001-fix-jump-misses-init-gcc-8-warning.patch
@@ -0,0 +1,46 @@
+From d697182f18a421b7f80ea9de4914251b55d82532 Mon Sep 17 00:00:00 2001
+From: Rainer Gerhards <rgerhards@adiscon.com>
+Date: Sun, 15 Jul 2018 17:24:59 +0200
+Subject: [PATCH] "fix" "jump-misses-init" gcc-8 warning
+
+Actually, that warning is overly conservative, and so we
+have changed the code in a somewhat suboptimal way to "fix"
+it. In this spots, it's not that bad and we wanted to avoid
+totally disabling this warning.
+
+If it were more costly in terms of cleanness, we would probaly
+have done that. Just mention it to tell anyone else the
+cure is not really a good one, just selected due to the
+circumstances in this special case.
+
+Upstream-Status: Backport
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ json_object.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/json_object.c b/json_object.c
+index 35338e1..6e67891 100644
+--- a/json_object.c
++++ b/json_object.c
+@@ -396,6 +396,7 @@ fjson_child_get_empty_etry(struct fjson_object *const __restrict__ jso)
+ {
+ struct _fjson_child *chld = NULL;
+ struct _fjson_child_pg *pg;
++ int pg_idx;
+
+ if (jso->o.c_obj.ndeleted > 0) {
+ /* we first fill deleted spots */
+@@ -415,7 +416,7 @@ fjson_child_get_empty_etry(struct fjson_object *const __restrict__ jso)
+ goto done;
+ }
+
+- const int pg_idx = jso->o.c_obj.nelem % FJSON_OBJECT_CHLD_PG_SIZE;
++ pg_idx = jso->o.c_obj.nelem % FJSON_OBJECT_CHLD_PG_SIZE;
+ if (jso->o.c_obj.nelem > 0 && pg_idx == 0) {
+ if((pg = calloc(1, sizeof(struct _fjson_child_pg))) == NULL) {
+ errno = ENOMEM;
+--
+2.11.0
+
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/libfastjson_0.99.8.bb b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/libfastjson_0.99.8.bb
new file mode 100644
index 00000000..b84dde3d
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/libfastjson_0.99.8.bb
@@ -0,0 +1,16 @@
+SUMMARY = "A fork of json-c library"
+HOMEPAGE = "https://github.com/rsyslog/libfastjson"
+
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=a958bb07122368f3e1d9b2efe07d231f"
+
+DEPENDS = ""
+
+SRC_URI = "git://github.com/rsyslog/libfastjson.git;protocol=https \
+ file://0001-fix-jump-misses-init-gcc-8-warning.patch"
+
+SRCREV = "4758b1caf69ada911ef79e1d80793fe489b98dff"
+
+S = "${WORKDIR}/git"
+
+inherit autotools
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-fix-jump-misses-init-error.patch b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-fix-jump-misses-init-error.patch
new file mode 100644
index 00000000..68b68634
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-fix-jump-misses-init-error.patch
@@ -0,0 +1,71 @@
+From 3e5a0cb440c788e2383e40ab23ac1cf01d96961b Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Tue, 24 Jul 2018 01:30:25 -0700
+Subject: [PATCH] src/tcp.c: fix jump-misses-init error
+
+Fix below jump-misses-init error
+
+| In file included from ../../git/src/tcp.c:51:
+| ../../git/src/tcp.c: In function 'relpTcpConnect':
+| ../../git/src/relp.h:220:3: error: jump skips variable initialization [-Werror=jump-misses-init]
+| goto finalize_it; \
+| ^~~~
+| ../../git/src/tcp.c:1951:3: note: in expansion of macro 'ABORT_FINALIZE'
+| ABORT_FINALIZE(RELP_RET_IO_ERR);
+| ^~~~~~~~~~~~~~
+| ../../git/src/tcp.c:2005:1: note: label 'finalize_it' defined here
+| finalize_it:
+| ^~~~~~~~~~~
+| ../../git/src/tcp.c:1991:6: note: 'r' declared here
+| int r = getsockopt(pThis->sock, SOL_SOCKET, SO_ERROR, &so_error, &len);
+| ^
+| In file included from ../../git/src/tcp.c:51:
+| ../../git/src/relp.h:220:3: error: jump skips variable initialization [-Werror=jump-misses-init]
+| goto finalize_it; \
+| ^~~~
+| ../../git/src/tcp.c:1951:3: note: in expansion of macro 'ABORT_FINALIZE'
+| ABORT_FINALIZE(RELP_RET_IO_ERR);
+| ^~~~~~~~~~~~~~
+| ../../git/src/tcp.c:2005:1: note: label 'finalize_it' defined here
+| finalize_it:
+| ^~~~~~~~~~~
+| ../../git/src/tcp.c:1989:12: note: 'len' declared here
+| socklen_t len = sizeof so_error;
+| ^~~
+
+Upstream-Status: Submitted[https://github.com/rsyslog/librelp/pull/117]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ src/tcp.c | 7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/src/tcp.c b/src/tcp.c
+index f35eb84..fb34dc7 100644
+--- a/src/tcp.c
++++ b/src/tcp.c
+@@ -1936,6 +1936,9 @@ relpTcpConnect(relpTcp_t *const pThis,
+ struct addrinfo hints;
+ struct addrinfo *reslocal = NULL;
+ struct pollfd pfd;
++ int so_error;
++ socklen_t len = sizeof so_error;
++ int r;
+
+ ENTER_RELPFUNC;
+ RELPOBJ_assert(pThis, Tcp);
+@@ -1985,10 +1988,8 @@ relpTcpConnect(relpTcp_t *const pThis,
+ ABORT_FINALIZE(RELP_RET_TIMED_OUT);
+ }
+
+- int so_error;
+- socklen_t len = sizeof so_error;
+
+- int r = getsockopt(pThis->sock, SOL_SOCKET, SO_ERROR, &so_error, &len);
++ r = getsockopt(pThis->sock, SOL_SOCKET, SO_ERROR, &so_error, &len);
+ if (r == -1 || so_error != 0) {
+ pThis->pEngine->dbgprint("socket has an error %d\n", so_error);
+ ABORT_FINALIZE(RELP_RET_IO_ERR);
+--
+2.17.1
+
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-increase-the-size-of-szHname.patch b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-increase-the-size-of-szHname.patch
new file mode 100644
index 00000000..5a62e158
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-increase-the-size-of-szHname.patch
@@ -0,0 +1,53 @@
+From d8950ad273d79ec516468289adbd427e681dbc66 Mon Sep 17 00:00:00 2001
+From: Mingli Yu <mingli.yu@windriver.com>
+Date: Mon, 30 Jul 2018 01:22:56 -0700
+Subject: [PATCH] src/tcp.c: increase the size of szHname
+
+Increase the size of szHname to fix below
+error:
+| ../../git/src/tcp.c: In function 'relpTcpSetRemHost':
+| ../../git/src/tcp.c:352:57: error: '%s' directive output may be truncated writing up to 1024 bytes into a region of size 1011 [-Werror=format-truncation=]
+| snprintf((char*)szHname, NI_MAXHOST, "[MALICIOUS:IP=%s]", szIP);
+| ^~ ~~~~
+| In file included from /poky-build/tmp/work/i586-poky-linux/librelp/1.2.16-r0/recipe-sysroot/usr/include/stdio.h:862,
+| from ../../git/src/tcp.c:38:
+| /poky-build/tmp/work/i586-poky-linux/librelp/1.2.16-r0/recipe-sysroot/usr/include/bits/stdio2.h:64:10: note: '__builtin___snprintf_chk' output between 16 and 1040 bytes into a destination of size 1025
+| return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
+| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+| __bos (__s), __fmt, __va_arg_pack ());
+| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+| cc1: all warnings being treated as errors
+| Makefile:536: recipe for target 'librelp_la-tcp.lo' failed
+
+Upstream-Status: Submitted[https://github.com/rsyslog/librelp/pull/118]
+
+Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
+---
+ src/tcp.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/tcp.c b/src/tcp.c
+index fb34dc7..2c38b0b 100644
+--- a/src/tcp.c
++++ b/src/tcp.c
+@@ -319,7 +319,7 @@ relpTcpSetRemHost(relpTcp_t *const pThis, struct sockaddr *pAddr)
+ relpEngine_t *pEngine;
+ int error;
+ unsigned char szIP[NI_MAXHOST] = "";
+- unsigned char szHname[NI_MAXHOST] = "";
++ unsigned char szHname[1045] = "";
+ struct addrinfo hints, *res;
+ size_t len;
+
+@@ -349,7 +349,7 @@ relpTcpSetRemHost(relpTcp_t *const pThis, struct sockaddr *pAddr)
+ if(getaddrinfo((char*)szHname, NULL, &hints, &res) == 0) {
+ freeaddrinfo (res);
+ /* OK, we know we have evil, so let's indicate this to our caller */
+- snprintf((char*)szHname, NI_MAXHOST, "[MALICIOUS:IP=%s]", szIP);
++ snprintf((char*)szHname, sizeof(szHname), "[MALICIOUS:IP=%s]", szIP);
+ pEngine->dbgprint("Malicious PTR record, IP = \"%s\" HOST = \"%s\"", szIP, szHname);
+ iRet = RELP_RET_MALICIOUS_HNAME;
+ }
+--
+2.17.1
+
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.2.16.bb b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.2.16.bb
new file mode 100644
index 00000000..17478efe
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.2.16.bb
@@ -0,0 +1,18 @@
+SUMMARY = "A reliable logging library"
+HOMEPAGE = "https://github.com/rsyslog/libfastjson"
+
+LICENSE = "GPLv3"
+LIC_FILES_CHKSUM = "file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9"
+
+DEPENDS = "gmp nettle libidn zlib gnutls"
+
+SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https \
+ file://0001-src-tcp.c-fix-jump-misses-init-error.patch \
+ file://0001-src-tcp.c-increase-the-size-of-szHname.patch \
+"
+
+SRCREV = "5e849ff060be0c7dce972e194c54fdacfee0adc2"
+
+S = "${WORKDIR}/git"
+
+inherit autotools pkgconfig
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch
new file mode 100644
index 00000000..6ce8b7a9
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch
@@ -0,0 +1,32 @@
+From 7baf35b88d742032a2dc456c396843e17e866f8e Mon Sep 17 00:00:00 2001
+From: Ming Liu <peter.x.liu@external.atlascopco.com>
+Date: Wed, 27 Jun 2018 14:04:57 +0800
+Subject: [PATCH] Include sys/time.h
+
+struct timeval is defined in sys/time.h with a musl libc.
+
+Upstream-Status: Inappropriate [musl libc specific]
+
+Signed-off-by: Ming Liu <peter.x.liu@external.atlascopco.com>
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ tests/msleep.c | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/tests/msleep.c b/tests/msleep.c
+index 98dbece..96f6950 100644
+--- a/tests/msleep.c
++++ b/tests/msleep.c
+@@ -26,11 +26,7 @@
+ #include "config.h"
+ #include <stdio.h>
+ #include <stdlib.h>
+-#if defined(__FreeBSD__)
+ #include <sys/time.h>
+-#else
+-#include <time.h>
+-#endif
+ #if defined(HAVE_SYS_SELECT_H)
+ #include <sys/select.h>
+ #endif
+2.7.4
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/initscript b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/initscript
new file mode 100644
index 00000000..7a8f8f99
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/initscript
@@ -0,0 +1,118 @@
+#! /bin/sh
+#
+# This is an init script for openembedded
+# Copy it to /etc/init.d/rsyslog and type
+# > update-rc.d rsyslog defaults 5
+#
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+NAME=rsyslog
+RSYSLOGD=rsyslogd
+RSYSLOGD_BIN=/usr/sbin/rsyslogd
+RSYSLOGD_OPTIONS=""
+RSYSLOGD_PIDFILE=/var/run/rsyslogd.pid
+SCRIPTNAME=/etc/init.d/$NAME
+# Exit if the package is not installed
+[ -x "$RSYSLOGD_BIN" ] || exit 0
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ DAEMON=$1
+ DAEMON_ARGS=$2
+ PIDFILE=$3
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon could not be started
+ # if daemon had already been started, start-stop-daemon will return 1
+ # so add -o/--oknodo(if nothing is done, exit 0)
+ start-stop-daemon -S --quiet --pidfile $PIDFILE --exec $DAEMON \
+ --oknodo -- $DAEMON_ARGS || return 1
+}
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ NAME=$1
+ PIDFILE=$2
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+ # QUIT/TERM/INT should work here, but they don't ?????
+ start-stop-daemon -K --quiet --signal KILL --pidfile $PIDFILE --name $NAME
+ RETVAL="$?"
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+ NAME=$1
+ PIDFILE=$2
+ start-stop-daemon -K --signal HUP --quiet --pidfile $PIDFILE --name $NAME
+ return 0
+}
+
+do_status() {
+ NAME=$1
+ PIDFILE=$2
+ # -t: test only but not stop
+ start-stop-daemon -K -t --quiet --pidfile $PIDFILE --name $NAME
+ # exit with status 0 if process is found
+ if [ "$?" = "0" ]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+case "$1" in
+ start)
+ echo -n "starting $RSYSLOGD ... "
+ do_start "$RSYSLOGD_BIN" "$RSYSLOGD_OPTIONS" "$RSYSLOGD_PIDFILE"
+ case "$?" in
+ 0) echo "done" ;;
+ 1) echo "failed" ;;
+ esac
+ ;;
+ stop)
+ echo -n "stopping $RSYSLOGD ... "
+ do_stop "$RSYSLOGD" "$RSYSLOGD_PIDFILE"
+ case "$?" in
+ 0|1) echo "done" ;;
+ 2) echo "failed" ;;
+ esac
+ ;;
+ reload|force-reload)
+ echo -n "reloading $RSYSLOGD ... "
+ do_reload "$RSYSLOGD" "$RSYSLOGD_PIDFILE"
+ echo "done"
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ status)
+ echo -n "status $RSYSLOGD ... "
+ do_status "$RSYSLOGD" "$RSYSLOGD_PIDFILE"
+ if [ "$?" = "0" ]; then
+ echo "running"
+ exit 0
+ else
+ echo "stopped"
+ exit 1
+ fi
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|reload|force-reload}" >&2
+ exit 3
+ ;;
+esac
+exit 0
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-fix-ptest-not-finish.patch b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-fix-ptest-not-finish.patch
new file mode 100644
index 00000000..a248f75e
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog-fix-ptest-not-finish.patch
@@ -0,0 +1,118 @@
+From 07ad2a1905089b9124623324a9969e4522317110 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Fri, 12 Sep 2014 03:41:11 -0400
+Subject: [PATCH] rsyslog: update configure to fix ptest
+
+$MaxMessageSize doesn't work if before $IncludeConfig diag-common.conf, then
+test cases fall into infinite loop with error message:
+
+8062.511110729:4902c480: error: message received is larger than max msg size, we split it
+8062.511152265:4902c480: discarding zero-sized message
+
+Update configure to fix it.
+
+Upstream-Status: Pending
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+---
+ tests/testsuites/complex1.conf | 2 +-
+ tests/testsuites/gzipwr_large.conf | 2 +-
+ tests/testsuites/gzipwr_large_dynfile.conf | 2 +-
+ tests/testsuites/imptcp_conndrop.conf | 2 +-
+ tests/testsuites/imptcp_large.conf | 2 +-
+ tests/testsuites/imtcp_conndrop.conf | 2 +-
+ tests/testsuites/wr_large.conf | 2 +-
+ 7 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/tests/testsuites/complex1.conf b/tests/testsuites/complex1.conf
+index 9b6a9f3..e00caa4 100644
+--- a/tests/testsuites/complex1.conf
++++ b/tests/testsuites/complex1.conf
+@@ -1,7 +1,7 @@
+ # complex test case with multiple actions in gzip mode
+ # rgerhards, 2009-05-22
+-$MaxMessageSize 10k
+ $IncludeConfig diag-common.conf
++$MaxMessageSize 10k
+
+ $MainMsgQueueTimeoutEnqueue 5000
+
+diff --git a/tests/testsuites/gzipwr_large.conf b/tests/testsuites/gzipwr_large.conf
+index 54ad3bb..e8247a9 100644
+--- a/tests/testsuites/gzipwr_large.conf
++++ b/tests/testsuites/gzipwr_large.conf
+@@ -1,7 +1,7 @@
+ # simple async writing test
+ # rgerhards, 2010-03-09
+-$MaxMessageSize 10k
+ $IncludeConfig diag-common.conf
++$MaxMessageSize 10k
+
+ $ModLoad ../plugins/imtcp/.libs/imtcp
+ $MainMsgQueueTimeoutShutdown 10000
+diff --git a/tests/testsuites/gzipwr_large_dynfile.conf b/tests/testsuites/gzipwr_large_dynfile.conf
+index 3a1b255..297cb70 100644
+--- a/tests/testsuites/gzipwr_large_dynfile.conf
++++ b/tests/testsuites/gzipwr_large_dynfile.conf
+@@ -1,7 +1,7 @@
+ # simple async writing test
+ # rgerhards, 2010-03-09
+-$MaxMessageSize 10k
+ $IncludeConfig diag-common.conf
++$MaxMessageSize 10k
+
+ $ModLoad ../plugins/imtcp/.libs/imtcp
+ $MainMsgQueueTimeoutShutdown 10000
+diff --git a/tests/testsuites/imptcp_conndrop.conf b/tests/testsuites/imptcp_conndrop.conf
+index 77a5d79..d9a14a8 100644
+--- a/tests/testsuites/imptcp_conndrop.conf
++++ b/tests/testsuites/imptcp_conndrop.conf
+@@ -1,7 +1,7 @@
+ # simple async writing test
+ # rgerhards, 2010-03-09
+-$MaxMessageSize 10k
+ $IncludeConfig diag-common.conf
++$MaxMessageSize 10k
+
+ $ModLoad ../plugins/imptcp/.libs/imptcp
+ $MainMsgQueueTimeoutShutdown 10000
+diff --git a/tests/testsuites/imptcp_large.conf b/tests/testsuites/imptcp_large.conf
+index 77a5d79..d9a14a8 100644
+--- a/tests/testsuites/imptcp_large.conf
++++ b/tests/testsuites/imptcp_large.conf
+@@ -1,7 +1,7 @@
+ # simple async writing test
+ # rgerhards, 2010-03-09
+-$MaxMessageSize 10k
+ $IncludeConfig diag-common.conf
++$MaxMessageSize 10k
+
+ $ModLoad ../plugins/imptcp/.libs/imptcp
+ $MainMsgQueueTimeoutShutdown 10000
+diff --git a/tests/testsuites/imtcp_conndrop.conf b/tests/testsuites/imtcp_conndrop.conf
+index de41bc4..7844dc7 100644
+--- a/tests/testsuites/imtcp_conndrop.conf
++++ b/tests/testsuites/imtcp_conndrop.conf
+@@ -1,7 +1,7 @@
+ # simple async writing test
+ # rgerhards, 2010-03-09
+-$MaxMessageSize 10k
+ $IncludeConfig diag-common.conf
++$MaxMessageSize 10k
+
+ $ModLoad ../plugins/imtcp/.libs/imtcp
+ $MainMsgQueueTimeoutShutdown 10000
+diff --git a/tests/testsuites/wr_large.conf b/tests/testsuites/wr_large.conf
+index b64f132..b0ae264 100644
+--- a/tests/testsuites/wr_large.conf
++++ b/tests/testsuites/wr_large.conf
+@@ -1,7 +1,7 @@
+ # simple async writing test
+ # rgerhards, 2010-03-09
+-$MaxMessageSize 10k
+ $IncludeConfig diag-common.conf
++$MaxMessageSize 10k
+
+ $ModLoad ../plugins/imtcp/.libs/imtcp
+ $MainMsgQueueTimeoutShutdown 10000
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf
new file mode 100644
index 00000000..dbfefb75
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf
@@ -0,0 +1,91 @@
+# if you experience problems, check
+# http://www.rsyslog.com/troubleshoot for assistance
+
+# rsyslog v3: load input modules
+# If you do not load inputs, nothing happens!
+# You may need to set the module load path if modules are not found.
+#
+# Ported from debian's sysklogd.conf
+
+$ModLoad immark # provides --MARK-- message capability
+$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)
+$ModLoad imklog # kernel logging (formerly provided by rklogd)
+
+#
+# Set the default permissions
+#
+$FileOwner root
+$FileGroup adm
+$FileCreateMode 0640
+$DirCreateMode 0755
+$Umask 0022
+
+auth,authpriv.* /var/log/auth.log
+*.*;auth,authpriv.none -/var/log/syslog
+cron.* /var/log/cron.log
+daemon.* -/var/log/daemon.log
+kern.* -/var/log/kern.log
+lpr.* -/var/log/lpr.log
+mail.* -/var/log/mail.log
+user.* -/var/log/user.log
+
+#
+# Logging for the mail system. Split it up so that
+# it is easy to write scripts to parse these files.
+#
+mail.info -/var/log/mail.info
+mail.warn -/var/log/mail.warn
+mail.err /var/log/mail.err
+
+# Logging for INN news system
+#
+news.crit /var/log/news.crit
+news.err /var/log/news.err
+news.notice -/var/log/news.notice
+
+#
+# Some `catch-all' logfiles.
+#
+*.=debug;\
+ auth,authpriv.none;\
+ news.none;mail.none -/var/log/debug
+*.=info;*.=notice;*.=warn;\
+ auth,authpriv.none;\
+ cron,daemon.none;\
+ mail,news.none -/var/log/messages
+
+#
+# Emergencies are sent to everybody logged in.
+#
+*.emerg :omusrmsg:*
+
+# Save boot messages also to boot.log
+local7.* /var/log/boot.log
+
+# Remote Logging (we use TCP for reliable delivery)
+# An on-disk queue is created for this action. If the remote host is
+# down, messages are spooled to disk and sent when it is up again.
+#$WorkDirectory /var/spool/rsyslog # where to place spool files
+#$ActionQueueFileName uniqName # unique name prefix for spool files
+$ActionQueueMaxDiskSpace 10m # 1gb space limit (use as much as possible)
+#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown
+#$ActionQueueType LinkedList # run asynchronously
+#$ActionResumeRetryCount -1 # infinite retries if host is down
+# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional
+#*.* @@remote-host:514
+
+
+# ######### Receiving Messages from Remote Hosts ##########
+# TCP Syslog Server:
+# provides TCP syslog reception and GSS-API (if compiled to support it)
+#$ModLoad imtcp.so # load module
+#$InputTCPServerRun 514 # start up TCP listener at port 514
+
+# UDP Syslog Server:
+#$ModLoad imudp.so # provides UDP syslog reception
+#$UDPServerRun 514 # start a UDP syslog server at standard port 514
+
+#
+# Include all config files in /etc/rsyslog.d/
+#
+$IncludeConfig /etc/rsyslog.d/*.conf
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate
new file mode 100644
index 00000000..5f8568fc
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate
@@ -0,0 +1,39 @@
+# /etc/logrotate.d/rsyslog - Ported from Debian
+
+/var/log/syslog
+{
+ rotate 7
+ daily
+ missingok
+ notifempty
+ delaycompress
+ compress
+ postrotate
+ @BINDIR@/pkill -HUP rsyslogd 2> /dev/null || true
+ endscript
+}
+
+/var/log/mail.info
+/var/log/mail.warn
+/var/log/mail.err
+/var/log/mail.log
+/var/log/daemon.log
+/var/log/kern.log
+/var/log/auth.log
+/var/log/user.log
+/var/log/lpr.log
+/var/log/cron.log
+/var/log/debug
+/var/log/messages
+{
+ rotate 4
+ weekly
+ missingok
+ notifempty
+ compress
+ delaycompress
+ sharedscripts
+ postrotate
+ @BINDIR@/pkill -HUP rsyslogd 2> /dev/null || true
+ endscript
+}
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest
new file mode 100644
index 00000000..3770a750
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/run-ptest
@@ -0,0 +1,3 @@
+#!/bin/sh
+#
+make -C tests -k check-TESTS
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch
new file mode 100644
index 00000000..03525872
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch
@@ -0,0 +1,43 @@
+From d0852006bf3d305e8984b85b41997d43d4476937 Mon Sep 17 00:00:00 2001
+From: Roy Li <rongqing.li@windriver.com>
+Date: Wed, 18 Jun 2014 13:46:52 +0800
+Subject: [PATCH] use pkgconfig to check libgcrypt
+
+Upstream-Status: Inappropriate [configuration]
+
+libgcrypt does no longer provide libgcrypt-config, and provide
+*.pc, so we should use pkgconfig to check
+
+Signed-off-by: Roy Li <rongqing.li@windriver.com>
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+
+---
+ configure.ac | 15 +--------------
+ 1 file changed, 1 insertion(+), 14 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 62178c3..b56c9c7 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -889,20 +889,7 @@ AC_ARG_ENABLE(libgcrypt,
+ [enable_libgcrypt=yes]
+ )
+ if test "x$enable_libgcrypt" = "xyes"; then
+- AC_PATH_PROG([LIBGCRYPT_CONFIG],[libgcrypt-config],[no])
+- if test "x${LIBGCRYPT_CONFIG}" = "xno"; then
+- AC_MSG_FAILURE([libgcrypt-config not found in PATH])
+- fi
+- AC_CHECK_LIB(
+- [gcrypt],
+- [gcry_cipher_open],
+- [LIBGCRYPT_CFLAGS="`${LIBGCRYPT_CONFIG} --cflags`"
+- LIBGCRYPT_LIBS="`${LIBGCRYPT_CONFIG} --libs`"
+- ],
+- [AC_MSG_FAILURE([libgcrypt is missing])],
+- [`${LIBGCRYPT_CONFIG} --libs --cflags`]
+- )
+- AC_DEFINE([ENABLE_LIBGCRYPT], [1], [Indicator that LIBGCRYPT is present])
++ PKG_CHECK_MODULES(LIBGCRYPT, libgcrypt)
+ fi
+ AM_CONDITIONAL(ENABLE_LIBGCRYPT, test x$enable_libgcrypt = xyes)
+ AC_SUBST(LIBGCRYPT_CFLAGS)
diff --git a/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.37.0.bb b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.37.0.bb
new file mode 100644
index 00000000..fbdf2818
--- /dev/null
+++ b/external/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.37.0.bb
@@ -0,0 +1,165 @@
+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 curl"
+HOMEPAGE = "http://www.rsyslog.com/"
+LICENSE = "GPLv3 & LGPLv3 & Apache-2.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=51d9635e646fb75e1b74c074f788e973 \
+ file://COPYING.LESSER;md5=cb7903f1e5c39ae838209e130dca270a \
+ file://COPYING.ASL20;md5=052f8a09206615ab07326ff8ce2d9d32\
+"
+
+SRC_URI = "http://www.rsyslog.com/download/files/download/rsyslog/${BPN}-${PV}.tar.gz \
+ file://initscript \
+ file://rsyslog.conf \
+ file://rsyslog.logrotate \
+ file://use-pkgconfig-to-check-libgcrypt.patch \
+ file://run-ptest \
+ file://rsyslog-fix-ptest-not-finish.patch \
+"
+
+SRC_URI_append_libc-musl = " \
+ file://0001-Include-sys-time-h.patch \
+"
+
+SRC_URI[md5sum] = "e0942b4b88a13602a6b6352bf9f05091"
+SRC_URI[sha256sum] = "295c289b4c8abd8f8f3fe35a83249b739cedabe82721702b910255f9faf147e7"
+
+UPSTREAM_CHECK_URI = "https://github.com/rsyslog/rsyslog/releases"
+UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
+
+inherit autotools pkgconfig systemd update-rc.d ptest
+
+EXTRA_OECONF += "--disable-generate-man-pages ap_cv_atomic_builtins=yes"
+
+# first line is default yes in configure
+PACKAGECONFIG ??= " \
+ rsyslogd rsyslogrt klog inet regexp uuid libgcrypt \
+ imdiag gnutls 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[inet] = "--enable-inet,--disable-inet,,"
+PACKAGECONFIG[klog] = "--enable-klog,--disable-klog,,"
+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[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,--without-systemdsystemunitdir,systemd,"
+PACKAGECONFIG[imjournal] = "--enable-imjournal,--disable-imjournal,"
+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] = "--enable-valgrind,--disable-valgrind,valgrind,"
+
+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}
+
+ # 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
+
+ # valgrind is not compatible with arm and mips,
+ # so remove related test cases if there is no valgrind.
+ if [ x${VALGRIND} = x ]; then
+ sed -i '/udp-msgreduc-/d' ${D}${PTEST_PATH}/${TESTDIR}/Makefile
+ fi
+
+ # 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'
+}
+
+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
+}
+
+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_mips = ""
+VALGRIND_mips64 = ""
+VALGRIND_mips64n32 = ""
+VALGRIND_arm = ""
+VALGRIND_aarch64 = ""
+VALGRIND_riscv64 = ""
+RDEPENDS_${PN}-ptest += "make diffutils gzip bash gawk coreutils procps"
+RRECOMMENDS_${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}"