View | Details | Raw Unified | Return to bug 203131 | Differences between
and this patch

Collapse All | Expand All

(-)Makefile (-2 / +13 lines)
Lines 1-7 Link Here
1
# $FreeBSD$
1
# $FreeBSD$
2
2
3
PORTNAME=	rsyslog
3
PORTNAME=	rsyslog
4
PORTVERSION=	8.11.0
4
PORTVERSION=	8.12.0
5
CATEGORIES=	sysutils
5
CATEGORIES=	sysutils
6
MASTER_SITES=	http://www.rsyslog.com/files/download/rsyslog/
6
MASTER_SITES=	http://www.rsyslog.com/files/download/rsyslog/
7
7
Lines 22-29 Link Here
22
PORTSCOUT=	limit:^8\.
22
PORTSCOUT=	limit:^8\.
23
PKGNAMESUFFIX=	8
23
PKGNAMESUFFIX=	8
24
24
25
MAKE_JOBS_UNSAFE=	yes
26
25
OPTIONS_DEFINE=	DBI DOCS GNUTLS GSSAPI MYSQL PGSQL RELP SNMP \
27
OPTIONS_DEFINE=	DBI DOCS GNUTLS GSSAPI MYSQL PGSQL RELP SNMP \
26
		NORMALIZE
28
		NORMALIZE INOTIFY
27
29
28
DBI_DESC=	LibDBI output module for rsyslog
30
DBI_DESC=	LibDBI output module for rsyslog
29
GNUTLS_DESC=	GNUTLS module for rsyslog
31
GNUTLS_DESC=	GNUTLS module for rsyslog
Lines 33-38 Link Here
33
RELP_DESC=	RELP input/output module for rsyslog
35
RELP_DESC=	RELP input/output module for rsyslog
34
SNMP_DESC=	SNMP trap sender for rsyslog
36
SNMP_DESC=	SNMP trap sender for rsyslog
35
NORMALIZE_DESC=	Message normalization module for rsyslog
37
NORMALIZE_DESC=	Message normalization module for rsyslog
38
INOTIFY_DESC=	iNotify support in imfile module
36
39
37
USES=		libtool pkgconfig autoreconf
40
USES=		libtool pkgconfig autoreconf
38
41
Lines 71-76 Link Here
71
NORMALIZE_CONFIGURE_ENABLE=	mmnormalize
74
NORMALIZE_CONFIGURE_ENABLE=	mmnormalize
72
NORMALIZE_PLIST_FILES=	lib/rsyslog/mmnormalize.so
75
NORMALIZE_PLIST_FILES=	lib/rsyslog/mmnormalize.so
73
76
77
# iNotify support in the imfile module via devel/libinotify seems to
78
# work only with the '-n' "don't auto-background" flag to rsyslogd,
79
# which is not particularly useful.
80
INOTIFY_BROKEN=		Compiles and runs with libinotify but notify functionality fails to work 
81
INOTIFY_LIB_DEPENDS=	libinotify.so:${PORTSDIR}/devel/libinotify
82
INOTIFY_CONFIGURE_ENABLE=	inotify
83
INOTIFY_EXTRA_PATCHES=	${FILESDIR}/extra-patch-inotify	
84
74
.include <bsd.port.options.mk>
85
.include <bsd.port.options.mk>
75
86
76
.ifdef WITH_MYSQL_MICROSECONDS
87
.ifdef WITH_MYSQL_MICROSECONDS
(-)distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (rsyslog-8.11.0.tar.gz) = bc64d8ba1e3fb8cfe21eadd5fb0938381bb37ed72cef9d6f14d376d2bac9bf78
1
SHA256 (rsyslog-8.12.0.tar.gz) = 466bfeac8296e89de1eb9029880998ba7b5fc25694143197bb47167df6cb7e20
2
SIZE (rsyslog-8.11.0.tar.gz) = 2060890
2
SIZE (rsyslog-8.12.0.tar.gz) = 2091620
(-)files/extra-patch-inotify (+12 lines)
Line 0 Link Here
1
--- configure.ac.orig	2015-09-15 16:17:37.915948039 +0100
2
+++ configure.ac	2015-09-15 16:14:01.435963544 +0100
3
@@ -141,6 +141,9 @@ AC_FUNC_VPRINTF
4
 AC_CHECK_FUNCS([flock inotify_init recvmmsg basename alarm clock_gettime gethostbyname gethostname gettimeofday localtime_r memset mkdir regcomp select setsid socket strcasecmp strchr strdup strerror strndup strnlen strrchr strstr strtol strtoul uname ttyname_r getline malloc_trim prctl epoll_create epoll_create1 fdatasync syscall lseek64])
5
 AC_CHECK_TYPES([off64_t])
6
 
7
+# inotify_init is provided by libinotify rather than libc on *BSD
8
+AC_SEARCH_LIBS([inotify_init], [inotify], [AC_DEFINE(HAVE_INOTIFY_INIT, [1], [set define])])
9
+
10
 # getifaddrs is in libc (mostly) or in libsocket (eg Solaris 11) or not defined (eg Solaris 10)
11
 AC_SEARCH_LIBS([getifaddrs], [socket], [AC_DEFINE(HAVE_GETIFADDRS, [1], [set define])])
12
 
(-)files/patch-configure.ac (+17 lines)
Line 0 Link Here
1
--- configure.ac.orig	2015-08-10 10:25:41 UTC
2
+++ configure.ac
3
@@ -303,6 +303,14 @@ AC_CHECK_FUNCS(
4
       rsyslog_have_pthread_setschedparam=no
5
     ]
6
 )
7
+AC_SEARCH_LIBS([pthread_setschedparam],
8
+	[pthread],
9
+	[
10
+		rsyslog_have_pthread_setschedparam=yes
11
+		AC_DEFINE(HAVE_PTHREAD_SETSCHEDPARAM, [1], [set define])
12
+	]
13
+	)
14
+
15
 AC_CHECK_HEADERS(
16
     [sched.h],
17
     [
(-)files/patch-grammar_rainerscript.c (-10 lines)
Lines 1-10 Link Here
1
--- grammar/rainerscript.c.orig	2015-06-30 12:26:24 UTC
2
+++ grammar/rainerscript.c
3
@@ -35,6 +35,7 @@
4
 #include <sys/stat.h>
5
 #include <sys/types.h>
6
 #include <libestr.h>
7
+#include <unistd.h>
8
 #include "rsyslog.h"
9
 #include "rainerscript.h"
10
 #include "conf.h"
(-)files/patch-plugins__mmexternal__mmexternal.c (-11 lines)
Lines 1-11 Link Here
1
--- plugins/mmexternal/mmexternal.c.orig	2015-04-30 08:50:16 UTC
2
+++ plugins/mmexternal/mmexternal.c
3
@@ -31,7 +31,7 @@
4
 #include <errno.h>
5
 #include <unistd.h>
6
 #include <fcntl.h>
7
-#include <wait.h>
8
+#include <sys/wait.h>
9
 #include <sys/uio.h>
10
 #include "conf.h"
11
 #include "syslogd-types.h"
(-)files/patch-plugins__omprog__omprog.c (-11 lines)
Lines 1-11 Link Here
1
--- plugins/omprog/omprog.c.orig	2015-04-30 08:50:16 UTC
2
+++ plugins/omprog/omprog.c
3
@@ -36,7 +36,7 @@
4
 #include <errno.h>
5
 #include <unistd.h>
6
 #include <fcntl.h>
7
-#include <wait.h>
8
+#include <sys/wait.h>
9
 #include <pthread.h>
10
 #include "conf.h"
11
 #include "syslogd-types.h"
(-)files/patch-plugins_imfile_imfile.c (-17 lines)
Lines 1-17 Link Here
1
--- plugins/imfile/imfile.c.orig	2015-06-30 12:26:24 UTC
2
+++ plugins/imfile/imfile.c
3
@@ -1869,12 +1869,14 @@ CODESTARTmodExit
4
 	objRelease(errmsg, CORE_COMPONENT);
5
 	objRelease(prop, CORE_COMPONENT);
6
 	objRelease(ruleset, CORE_COMPONENT);
7
+#ifdef HAVE_SYS_INOTIFY_H
8
 	if(dirs != NULL) {
9
 		free(dirs->active.listeners);
10
 		free(dirs->configured.listeners);
11
 		free(dirs);
12
 	}
13
 	free(wdmap);
14
+#endif
15
 ENDmodExit
16
 
17
 
(-)files/patch-plugins_impstats_impstats.c (-10 lines)
Lines 1-10 Link Here
1
--- plugins/impstats/impstats.c.orig	2015-04-30 08:50:15 UTC
2
+++ plugins/impstats/impstats.c
3
@@ -36,6 +36,7 @@
4
 #include <errno.h>
5
 #include <sys/time.h>
6
 #include <sys/resource.h>
7
+#include <unistd.h>
8
 
9
 #include "dirty.h"
10
 #include "cfsysline.h"
(-)files/patch-runtime_nsd__ptcp.c (-1 / +1 lines)
Lines 1-4 Link Here
1
--- runtime/nsd_ptcp.c.orig	2015-04-30 08:50:16 UTC
1
--- runtime/nsd_ptcp.c.orig	2015-07-08 14:31:07 UTC
2
+++ runtime/nsd_ptcp.c
2
+++ runtime/nsd_ptcp.c
3
@@ -656,7 +656,11 @@ EnableKeepAlive(nsd_t *pNsd)
3
@@ -656,7 +656,11 @@ EnableKeepAlive(nsd_t *pNsd)
4
 	if(pThis->iKeepAliveProbes > 0) {
4
 	if(pThis->iKeepAliveProbes > 0) {
(-)files/patch-runtime_stream.c (-33 lines)
Lines 1-33 Link Here
1
--- runtime/stream.c.orig	2015-06-30 12:26:24 UTC
2
+++ runtime/stream.c
3
@@ -1097,12 +1097,30 @@ doWriteCall(strm_t *pThis, uchar *pBuf, 
4
 	char *pWriteBuf;
5
 	DEFiRet;
6
 	ISOBJ_TYPE_assert(pThis, strm);
7
+#ifdef __FreeBSD__
8
+	sbool crnlNow = 0;
9
+#endif /* __FreeBSD__ */
10
 
11
 	lenBuf = *pLenBuf;
12
 	pWriteBuf = (char*) pBuf;
13
 	iTotalWritten = 0;
14
 	do {
15
+#ifdef __FreeBSD__
16
+		if (pThis->bIsTTY && !pThis->iZipLevel && !pThis->cryprov) {
17
+			char *pNl = NULL;
18
+			if (crnlNow == 0) pNl = strchr(pWriteBuf, '\n');
19
+			else crnlNow = 0;
20
+			if (pNl == pWriteBuf) {
21
+		  		iWritten = write(pThis->fd, "\r", 1);
22
+		  		if (iWritten > 0) {
23
+		      			crnlNow = 1;
24
+		      			iWritten = 0;
25
+		    		}
26
+		  	} else iWritten = write(pThis->fd, pWriteBuf, pNl ? pNl - pWriteBuf : lenBuf);
27
+		} else
28
+#endif /* __FreeBSD__ */
29
 		iWritten = write(pThis->fd, pWriteBuf, lenBuf);
30
+	
31
 		if(iWritten < 0) {
32
 			char errStr[1024];
33
 			int err = errno;

Return to bug 203131