1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-22 00:35:15 +00:00

- Add sysutils/rsyslog8-devel at version 8.1.3

Reviewed by:	swills@
This commit is contained in:
Brad Davis 2013-12-17 04:07:41 +00:00
parent 31eb857884
commit 9d46312ecb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=336693
13 changed files with 429 additions and 0 deletions

View File

@ -790,6 +790,7 @@
SUBDIR += rsyncrypto
SUBDIR += rsyslog7
SUBDIR += rsyslog7-devel
SUBDIR += rsyslog8-devel
SUBDIR += rtty
SUBDIR += ruby-quota
SUBDIR += rubygem-SyslogLogger

View File

@ -0,0 +1,165 @@
# $FreeBSD$
PORTNAME= rsyslog
PORTVERSION= 8.1.3
CATEGORIES= sysutils
MASTER_SITES= http://www.rsyslog.com/files/download/rsyslog/
MAINTAINER= brd@FreeBSD.org
COMMENT= Syslogd supporting SQL, TCP, and TLS
BUILD_DEPENDS= libgcrypt-config:${PORTSDIR}/security/libgcrypt
LIB_DEPENDS= libee.so:${PORTSDIR}/devel/libee \
libestr.so:${PORTSDIR}/devel/libestr \
libjson.so:${PORTSDIR}/devel/json-c \
libuuid.so:${PORTSDIR}/misc/e2fsprogs-libuuid
USE_LDCONFIG= yes
USE_AUTOTOOLS= autoconf
PORTSCOUT= limit:^8\.1
PORTDOCS= *
PORTEXAMPLES= *
PKGNAMESUFFIX= -devel
OPTIONS_DEFINE= DBI DOCS GNUTLS GSSAPI MYSQL PGSQL RELP RFC3195 SNMP
DBI_DESC= LibDBI output module for rsyslog
GNUTLS_DESC= GNUTLS module for rsyslog
GSSAPI_DESC= GSS API input/output module for rsyslog
MYSQL_DESC= MySQL output module for rsyslog
PGSQL_DESC= PostgreSQL output module for rsyslog
RELP_DESC= RELP input/output module for rsyslog
RFC3195_DESC= RFC3195 input support for rsyslog
SNMP_DESC= SNMP trap sender for rsyslog
USES= pkgconfig
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDBI}
LIB_DEPENDS+= libdbi.so:${PORTSDIR}/databases/libdbi
CONFIGURE_ARGS+=--enable-libdbi
PLIST_FILES+= lib/rsyslog/omlibdbi.la \
lib/rsyslog/omlibdbi.so
.else
CONFIGURE_ARGS+=--disable-libdbi
.endif
.if ${PORT_OPTIONS:MGNUTLS}
LIB_DEPENDS+= libgnutls.so:${PORTSDIR}/security/gnutls \
libgcrypt.so:${PORTSDIR}/security/libgcrypt
CONFIGURE_ARGS+=--enable-gnutls
PLIST_FILES+= lib/rsyslog/lmnsd_gtls.la \
lib/rsyslog/lmnsd_gtls.so
.else
CONFIGURE_ARGS+=--disable-gnutls
.endif
.if ${PORT_OPTIONS:MGSSAPI}
CONFIGURE_ARGS+=--enable-gssapi-krb5
PLIST_FILES+= lib/rsyslog/imgssapi.la \
lib/rsyslog/imgssapi.so \
lib/rsyslog/lmgssutil.la \
lib/rsyslog/lmgssutil.so \
lib/rsyslog/omgssapi.la \
lib/rsyslog/omgssapi.so
.else
CONFIGURE_ARGS+=--disable-gssapi-krb5
.endif
.if ${PORT_OPTIONS:MMYSQL}
USE_MYSQL= yes
CONFIGURE_ARGS+=--enable-mysql
PLIST_FILES+= lib/rsyslog/ommysql.so \
lib/rsyslog/ommysql.la
.else
CONFIGURE_ARGS+=--disable-mysql
.endif
.if ${PORT_OPTIONS:MPGSQL}
USE_PGSQL= yes
CONFIGURE_ARGS+=--enable-pgsql
PLIST_FILES+= lib/rsyslog/ompgsql.so \
lib/rsyslog/ompgsql.la
.else
CONFIGURE_ARGS+=--disable-pgsql
.endif
.if ${PORT_OPTIONS:MRELP}
LIB_DEPENDS+= librelp.so:${PORTSDIR}/devel/librelp
CONFIGURE_ARGS+=--enable-relp
PLIST_FILES+= lib/rsyslog/imrelp.la \
lib/rsyslog/imrelp.so \
lib/rsyslog/omrelp.la \
lib/rsyslog/omrelp.so
.else
CONFIGURE_ARGS+=--disable-relp
.endif
.if ${PORT_OPTIONS:MRFC3195}
LIB_DEPENDS+= liblogging.so:${PORTSDIR}/devel/liblogging
CONFIGURE_ARGS+=--enable-rfc3195
PLIST_FILES+= lib/rsyslog/im3195.la \
lib/rsyslog/im3195.so
.else
CONFIGURE_ARGS+=--disable-rfc3195
.endif
.if ${PORT_OPTIONS:MSNMP}
LIB_DEPENDS+= libnetsnmp.so:${PORTSDIR}/net-mgmt/net-snmp
CONFIGURE_ARGS+=--enable-snmp
PLIST_FILES+= lib/rsyslog/omsnmp.la \
lib/rsyslog/omsnmp.so
.else
CONFIGURE_ARGS+=--disable-snmp
.endif
.ifdef WITH_MYSQL_MICROSECONDS
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-mysql-microseconds
.endif
.ifdef WITH_SANE_HOSTNAME
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-sane-hostname
.endif
CONFLICTS= rsyslog6-* rsyslog-[0-9].*
CFLAGS+= -I${LOCALBASE}/include
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
GNU_CONFIGURE= yes
.ifdef WITH_DEBUG
CONFIGURE_ARGS+=--enable-rtinst --enable-debug
.endif
.include <bsd.port.pre.mk>
.if ${ARCH} == "i386"
CPPFLAGS+=-march=i686
.endif
CONFIGURE_ENV+= LIBESTR_CFLAGS="${CFLAGS}" LIBESTR_LIBS="${LDFLAGS} -lestr" LIBEE_CFLAGS="${CFLAGS}" LIBEE_LIBS="${LDFLAGS} -lee -lkvm"
CFLAGS+= ${CPPFLAGS}
USE_RC_SUBR= ${PORTNAME}d
SUB_FILES= pkg-message
CONFIGURE_ARGS+= --enable-imfile --enable-mail --enable-imdiag --enable-impstats --enable-omstdout --enable-cached-man-pages --disable-testbench
post-patch:
@${REINPLACE_CMD} -e 's|/lib/rsyslog/|${PREFIX}/lib/rsyslog/|'\
${WRKSRC}/tools/syslogd.c
@${GREP} -rl '/etc/rsyslog.conf' ${WRKSRC}|${XARGS} ${REINPLACE_CMD} -e\
's|/etc/rsyslog.conf|${PREFIX}/etc/rsyslog.conf|'
@${REINPLACE_CMD} -e 's,/lib/rsyslog,${PREFIX}/lib/rsyslog,' ${WRKSRC}/tools/syslogd.c
@${FIND} ${WRKSRC} -name '*.bak' -delete
post-install:
@${INSTALL} -d ${STAGEDIR}${DOCSDIR}/
@${INSTALL_DATA} ${WRKSRC}/doc/*html ${STAGEDIR}${DOCSDIR}/
@${INSTALL} -d ${STAGEDIR}${EXAMPLESDIR}
@${INSTALL_DATA} ${WRKSRC}/doc/rsyslog-example.conf ${STAGEDIR}${EXAMPLESDIR}
.include <bsd.port.post.mk>

View File

@ -0,0 +1,2 @@
SHA256 (rsyslog-8.1.3.tar.gz) = e2e5e12500b6d2a8be80558b2f71da6408a1fc9889eb22c74fba819aaf4bcd45
SIZE (rsyslog-8.1.3.tar.gz) = 2608152

View File

@ -0,0 +1,56 @@
--- ./runtime/datetime.c.orig 2010-05-04 18:57:25.588028725 -0400
+++ ./runtime/datetime.c 2010-05-04 18:59:12.390680038 -0400
@@ -644,18 +644,30 @@
pBuf[1] = (ts->year / 100) % 10 + '0';
pBuf[2] = (ts->year / 10) % 10 + '0';
pBuf[3] = ts->year % 10 + '0';
- pBuf[4] = (ts->month / 10) % 10 + '0';
- pBuf[5] = ts->month % 10 + '0';
- pBuf[6] = (ts->day / 10) % 10 + '0';
- pBuf[7] = ts->day % 10 + '0';
- pBuf[8] = (ts->hour / 10) % 10 + '0';
- pBuf[9] = ts->hour % 10 + '0';
- pBuf[10] = (ts->minute / 10) % 10 + '0';
- pBuf[11] = ts->minute % 10 + '0';
- pBuf[12] = (ts->second / 10) % 10 + '0';
- pBuf[13] = ts->second % 10 + '0';
- pBuf[14] = '\0';
- return 15;
+ pBuf[4] = '-';
+ pBuf[5] = (ts->month / 10) % 10 + '0';
+ pBuf[6] = ts->month % 10 + '0';
+ pBuf[7] = '-';
+ pBuf[8] = (ts->day / 10) % 10 + '0';
+ pBuf[9] = ts->day % 10 + '0';
+ pBuf[10] = ' ';
+ pBuf[11] = (ts->hour / 10) % 10 + '0';
+ pBuf[12] = ts->hour % 10 + '0';
+ pBuf[13] = ':';
+ pBuf[14] = (ts->minute / 10) % 10 + '0';
+ pBuf[15] = ts->minute % 10 + '0';
+ pBuf[16] = ':';
+ pBuf[17] = (ts->second / 10) % 10 + '0';
+ pBuf[18] = ts->second % 10 + '0';
+ pBuf[19] = '.';
+ pBuf[20] = (ts->secfrac / 100000) % 10 + '0';
+ pBuf[21] = (ts->secfrac / 10000) % 10 + '0';
+ pBuf[22] = (ts->secfrac / 1000) % 10 + '0';
+ pBuf[23] = (ts->secfrac / 100) % 10 + '0';
+ pBuf[24] = (ts->secfrac / 10) % 10 + '0';
+ pBuf[25] = ts->secfrac % 10 + '0';
+ pBuf[26] = '\0';
+ return 26;
}
--- ./runtime/msg.c.orig 2010-05-04 19:00:20.241528788 -0400
+++ ./runtime/msg.c 2010-05-04 19:00:06.136349680 -0400
@@ -1293,7 +1293,7 @@
case tplFmtMySQLDate:
MsgLock(pM);
if(pM->pszTIMESTAMP_MySQL == NULL) {
- if((pM->pszTIMESTAMP_MySQL = MALLOC(15)) == NULL) {
+ if((pM->pszTIMESTAMP_MySQL = MALLOC(26)) == NULL) {
MsgUnlock(pM);
return "";
}

View File

@ -0,0 +1,40 @@
--- ./tools/syslogd.c.orig 2010-05-04 19:02:05.548362478 -0400
+++ ./tools/syslogd.c 2010-05-04 19:02:27.452450741 -0400
@@ -2611,37 +2611,6 @@
net.getLocalHostname(&LocalFQDNName);
CHKmalloc(LocalHostName = (uchar*) strdup((char*)LocalFQDNName));
glbl.SetLocalFQDNName(LocalFQDNName); /* set the FQDN before we modify it */
- if((p = (uchar*)strchr((char*)LocalHostName, '.'))) {
- *p++ = '\0';
- LocalDomain = p;
- } else {
- LocalDomain = (uchar*)"";
-
- /* It's not clearly defined whether gethostname()
- * should return the simple hostname or the fqdn. A
- * good piece of software should be aware of both and
- * we want to distribute good software. Joey
- *
- * Good software also always checks its return values...
- * If syslogd starts up before DNS is up & /etc/hosts
- * doesn't have LocalHostName listed, gethostbyname will
- * return NULL.
- */
- /* TODO: gethostbyname() is not thread-safe, but replacing it is
- * not urgent as we do not run on multiple threads here. rgerhards, 2007-09-25
- */
- hent = gethostbyname((char*)LocalHostName);
- if(hent) {
- free(LocalHostName);
- CHKmalloc(LocalHostName = (uchar*)strdup(hent->h_name));
-
- if((p = (uchar*)strchr((char*)LocalHostName, '.')))
- {
- *p++ = '\0';
- LocalDomain = p;
- }
- }
- }
/* Convert to lower case to recognize the correct domain laterly */
for(p = LocalDomain ; *p ; p++)

View File

@ -0,0 +1,20 @@
--- runtime/libgcry.c.ori 2013-05-24 20:24:27.000000000 -0600
+++ runtime/libgcry.c 2013-05-24 20:24:52.000000000 -0600
@@ -171,7 +171,7 @@
* no matter what happens.
*/
static void
-eiClose(gcryfile gf, off64_t offsLogfile)
+eiClose(gcryfile gf, off_t offsLogfile)
{
char offs[21];
size_t len;
@@ -213,7 +213,7 @@
}
int
-gcryfileDestruct(gcryfile gf, off64_t offsLogfile)
+gcryfileDestruct(gcryfile gf, off_t offsLogfile)
{
int r = 0;
if(gf == NULL)

View File

@ -0,0 +1,11 @@
--- runtime/lmcry_gcry.c.ori 2013-05-24 20:25:10.000000000 -0600
+++ runtime/lmcry_gcry.c 2013-05-24 20:25:25.000000000 -0600
@@ -216,7 +216,7 @@
}
static rsRetVal
-OnFileClose(void *pF, off64_t offsLogfile)
+OnFileClose(void *pF, off_t offsLogfile)
{
DEFiRet;
gcryfileDestruct(pF, offsLogfile);

View File

@ -0,0 +1,11 @@
--- runtime/queue.c.ori 2013-05-24 20:22:54.000000000 -0600
+++ runtime/queue.c 2013-05-24 20:23:07.000000000 -0600
@@ -1449,7 +1449,7 @@
DoDeleteBatchFromQStore(qqueue_t *pThis, int nElem)
{
int i;
- off64_t bytesDel;
+ off_t bytesDel;
DEFiRet;
ISOBJ_TYPE_assert(pThis, qqueue);

View File

@ -0,0 +1,10 @@
--- runtime/stream.h.ori 2013-05-24 20:21:51.000000000 -0600
+++ runtime/stream.h 2013-05-24 20:21:11.000000000 -0600
@@ -207,6 +207,6 @@
/* prototypes */
PROTOTYPEObjClassInit(strm);
-rsRetVal strmMultiFileSeek(strm_t *pThis, int fileNum, off64_t offs, off64_t *bytesDel);
+rsRetVal strmMultiFileSeek(strm_t *pThis, int fileNum, off_t offs, off_t *bytesDel);
#endif /* #ifndef STREAM_H_INCLUDED */

View File

@ -0,0 +1,25 @@
===================================================================
To start using rsyslogd(8), stop syslogd(8) if it's running and
add the following lines to rc.conf(5):
syslogd_enable="NO"
rsyslogd_enable="YES"
It's recommended to copy syslog.conf(5) to
%%PREFIX%%/etc/rsyslog.conf and edit it there. Otherwise add
this:
rsyslogd_config="/etc/syslog.conf"
Add the following (3) lines to the beginning of the config file, for
basic functionality:
$ModLoad immark.so # provides --MARK-- message capability
$ModLoad imuxsock.so # provides support for local system logging
$ModLoad imklog.so # kernel logging
newsyslog(8) has the path of syslogd's pid file hardcoded. To
make it work seamlessly with rsyslog, add this:
rsyslogd_pidfile="/var/run/syslog.pid"
===================================================================

View File

@ -0,0 +1,25 @@
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: rsyslogd
# REQUIRE: mountcritremote cleanvar newsyslog ldconfig
# BEFORE: SERVERS
. /etc/rc.subr
name=rsyslogd
rcvar=rsyslogd_enable
command="%%PREFIX%%/sbin/${name}"
load_rc_config $name
: ${rsyslogd_enable:="NO"}
: ${rsyslogd_pidfile:="/var/run/rsyslogd.pid"}
: ${rsyslogd_config:="%%PREFIX%%/etc/rsyslog.conf"}
pidfile="${rsyslogd_pidfile}"
command_args="-i ${pidfile} -f ${rsyslogd_config}"
required_files="${rsyslogd_config}"
extra_commands="reload"
run_rc_command "$1"

View File

@ -0,0 +1,19 @@
Rsyslog is an enhanced multi-threaded syslogd with a focus on
security and reliability.
Among others, it offers support for on-demand disk buffering,
reliable syslog over TCP, SSL, TLS and RELP, writing to databases
(MySQL, PostgreSQL, Oracle, and many more), email alerting, fully
configurable output formats (including high-precision timestamps),
the ability to filter on any part of the syslog message, on-the-wire
message compression, and the ability to convert text files to syslog.
It is a drop-in replacement for stock syslogd and able to work with
the same configuration file syntax. 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.
Tracking v7-devel
WWW: http://www.rsyslog.com/

View File

@ -0,0 +1,44 @@
lib/rsyslog/imdiag.la
lib/rsyslog/imdiag.so
lib/rsyslog/imfile.la
lib/rsyslog/imfile.so
lib/rsyslog/imklog.la
lib/rsyslog/imklog.so
lib/rsyslog/immark.la
lib/rsyslog/immark.so
lib/rsyslog/impstats.la
lib/rsyslog/impstats.so
lib/rsyslog/imtcp.la
lib/rsyslog/imtcp.so
lib/rsyslog/imudp.la
lib/rsyslog/imudp.so
lib/rsyslog/imuxsock.la
lib/rsyslog/imuxsock.so
lib/rsyslog/lmcry_gcry.la
lib/rsyslog/lmcry_gcry.so
lib/rsyslog/lmnet.la
lib/rsyslog/lmnet.so
lib/rsyslog/lmnetstrms.la
lib/rsyslog/lmnetstrms.so
lib/rsyslog/lmnsd_ptcp.la
lib/rsyslog/lmnsd_ptcp.so
lib/rsyslog/lmregexp.la
lib/rsyslog/lmregexp.so
lib/rsyslog/lmstrmsrv.la
lib/rsyslog/lmstrmsrv.so
lib/rsyslog/lmtcpclt.la
lib/rsyslog/lmtcpclt.so
lib/rsyslog/lmtcpsrv.la
lib/rsyslog/lmtcpsrv.so
lib/rsyslog/lmzlibw.la
lib/rsyslog/lmzlibw.so
lib/rsyslog/ommail.la
lib/rsyslog/ommail.so
lib/rsyslog/omruleset.la
lib/rsyslog/omruleset.so
lib/rsyslog/omstdout.la
lib/rsyslog/omstdout.so
lib/rsyslog/omtesting.la
lib/rsyslog/omtesting.so
sbin/rsyslogd
@dirrmtry lib/rsyslog