summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-oe/recipes-extended/rsyslog
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-oe/recipes-extended/rsyslog')
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-fix-jump-misses-init-error.patch71
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-increase-the-size-of-szHname.patch53
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.2.16.bb (renamed from meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.2.14.bb)7
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch15
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf5
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate4
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch2
-rw-r--r--meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.37.0.bb (renamed from meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.29.0.bb)22
8 files changed, 164 insertions, 15 deletions
diff --git a/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-fix-jump-misses-init-error.patch b/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-fix-jump-misses-init-error.patch
new file mode 100644
index 000000000..68b686346
--- /dev/null
+++ b/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/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-increase-the-size-of-szHname.patch b/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp/0001-src-tcp.c-increase-the-size-of-szHname.patch
new file mode 100644
index 000000000..5a62e1584
--- /dev/null
+++ b/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/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.2.14.bb b/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.2.16.bb
index 28047eb54..17478efe4 100644
--- a/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.2.14.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/rsyslog/librelp_1.2.16.bb
@@ -6,9 +6,12 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=1fb9c10ed9fd6826757615455ca893a9"
DEPENDS = "gmp nettle libidn zlib gnutls"
-SRC_URI = "git://github.com/rsyslog/librelp.git;protocol=https"
+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 = "fc512e337bfc7c92770246dbff5f482b879498b9"
+SRCREV = "5e849ff060be0c7dce972e194c54fdacfee0adc2"
S = "${WORKDIR}/git"
diff --git a/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch b/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch
index ca88dd3f7..6ce8b7a9c 100644
--- a/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch
+++ b/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/0001-Include-sys-time-h.patch
@@ -1,6 +1,6 @@
-From 9739095de6ae5f844354756ae968f5f8864eb3e3 Mon Sep 17 00:00:00 2001
+From 7baf35b88d742032a2dc456c396843e17e866f8e Mon Sep 17 00:00:00 2001
From: Ming Liu <peter.x.liu@external.atlascopco.com>
-Date: Sun, 26 Feb 2017 14:10:21 +0100
+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.
@@ -8,13 +8,13 @@ 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 26a8206..ca818be 100644
+index 98dbece..96f6950 100644
--- a/tests/msleep.c
+++ b/tests/msleep.c
@@ -26,11 +26,7 @@
@@ -26,6 +26,7 @@ index 26a8206..ca818be 100644
-#else
-#include <time.h>
-#endif
-
- int main(int argc, char *argv[])
- {
+ #if defined(HAVE_SYS_SELECT_H)
+ #include <sys/select.h>
+ #endif
+2.7.4
diff --git a/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf b/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf
index 324ae6d82..dbfefb759 100644
--- a/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf
+++ b/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.conf
@@ -84,3 +84,8 @@ $ActionQueueMaxDiskSpace 10m # 1gb space limit (use as much as possible)
# 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/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate b/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate
index 94ec517b2..5f8568fce 100644
--- a/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate
+++ b/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/rsyslog.logrotate
@@ -9,7 +9,7 @@
delaycompress
compress
postrotate
- /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
+ @BINDIR@/pkill -HUP rsyslogd 2> /dev/null || true
endscript
}
@@ -34,6 +34,6 @@
delaycompress
sharedscripts
postrotate
- /bin/kill -HUP `cat /var/run/rsyslogd.pid 2> /dev/null` 2> /dev/null || true
+ @BINDIR@/pkill -HUP rsyslogd 2> /dev/null || true
endscript
}
diff --git a/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch b/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch
index 162d239a1..035258726 100644
--- a/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch
+++ b/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog/use-pkgconfig-to-check-libgcrypt.patch
@@ -3,7 +3,7 @@ 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]
+Upstream-Status: Inappropriate [configuration]
libgcrypt does no longer provide libgcrypt-config, and provide
*.pc, so we should use pkgconfig to check
diff --git a/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.29.0.bb b/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.37.0.bb
index 476540d0a..1fb439015 100644
--- a/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.29.0.bb
+++ b/meta-openembedded/meta-oe/recipes-extended/rsyslog/rsyslog_8.37.0.bb
@@ -30,8 +30,11 @@ SRC_URI_append_libc-musl = " \
file://0001-Include-sys-time-h.patch \
"
-SRC_URI[md5sum] = "3805617f65a4b4bea34606487a5255a0"
-SRC_URI[sha256sum] = "220ba30b5afb0f3ddb328613fea7aa3966b01e4d0c52d6de9ab27b0858f19738"
+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
@@ -40,7 +43,7 @@ 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 \
+ fmhttp imdiag gnutls imfile \
${@bb.utils.filter('DISTRO_FEATURES', 'snmp systemd', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'testbench relp ${VALGRIND}', '', d)} \
"
@@ -49,6 +52,7 @@ PACKAGECONFIG ??= " \
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[regexp] = "--enable-regexp,--disable-regexp,,"
@@ -63,6 +67,7 @@ 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,"
@@ -82,10 +87,14 @@ do_install_ptest() {
# 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.
@@ -121,6 +130,12 @@ do_install_append() {
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}"
@@ -146,5 +161,6 @@ 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}"
OpenPOWER on IntegriCloud