diff options
author | sat <sat@FreeBSD.org> | 2007-07-10 15:28:52 +0800 |
---|---|---|
committer | sat <sat@FreeBSD.org> | 2007-07-10 15:28:52 +0800 |
commit | 4fdcdbe25aedeca4ba0bc7912ef4413120a830c9 (patch) | |
tree | c03f56df1ad4c3a42749344305d6519b13b3d115 | |
parent | a152b747f4241142186d817b586e538bde494e85 (diff) | |
download | freebsd-ports-gnome-4fdcdbe25aedeca4ba0bc7912ef4413120a830c9.tar.gz freebsd-ports-gnome-4fdcdbe25aedeca4ba0bc7912ef4413120a830c9.tar.zst freebsd-ports-gnome-4fdcdbe25aedeca4ba0bc7912ef4413120a830c9.zip |
Add port sysutils/rsyslog:
Rsyslog is an enhanced multi-threaded syslogd supporting, among others,
MySQL, syslog/tcp, RFC 3195, permitted sender lists, filtering on any
message part, and fine grain output format control. 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.
WWW: http://www.rsyslog.com/
-rw-r--r-- | sysutils/Makefile | 1 | ||||
-rw-r--r-- | sysutils/rsyslog/Makefile | 41 | ||||
-rw-r--r-- | sysutils/rsyslog/distinfo | 3 | ||||
-rw-r--r-- | sysutils/rsyslog/files/rsyslogd.in | 72 | ||||
-rw-r--r-- | sysutils/rsyslog/pkg-descr | 9 | ||||
-rw-r--r-- | sysutils/rsyslog3/Makefile | 41 | ||||
-rw-r--r-- | sysutils/rsyslog3/distinfo | 3 | ||||
-rw-r--r-- | sysutils/rsyslog3/files/rsyslogd.in | 72 | ||||
-rw-r--r-- | sysutils/rsyslog3/pkg-descr | 9 |
9 files changed, 251 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile index 90d2318f1ddc..b0ae2df6b2d6 100644 --- a/sysutils/Makefile +++ b/sysutils/Makefile @@ -549,6 +549,7 @@ SUBDIR += rotate SUBDIR += rsnapshot SUBDIR += rsyncmanager + SUBDIR += rsyslog SUBDIR += rtty SUBDIR += ruby-log4r SUBDIR += ruby-quota diff --git a/sysutils/rsyslog/Makefile b/sysutils/rsyslog/Makefile new file mode 100644 index 000000000000..f465cf1545cb --- /dev/null +++ b/sysutils/rsyslog/Makefile @@ -0,0 +1,41 @@ +# New ports collection makefile for: rsyslog +# Date created: 9 July 2007 +# Whom: Andrew Pantyukhin <infofarmer@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= rsyslog +PORTVERSION= 1.15.0 +CATEGORIES= sysutils +MASTER_SITES= SF http://download.rsyslog.com/rsyslog/ + +MAINTAINER= infofarmer@FreeBSD.org +COMMENT= Enhanced syslog daemon + +LIB_DEPENDS= logging.0:${PORTSDIR}/devel/liblogging + +USE_MYSQL= yes +USE_RC_SUBR= ${PORTNAME}d +MAKE_ARGS= LIBLOGGING_INC=-I${LOCALBASE}/include \ + LIBLOGGING_BIN=-llogging \ + FEATURE_RFC3195=1 BINDIR=${PREFIX}/sbin MANDIR=${MANPREFIX}/man \ + LPTHREAD=${PTHREAD_LIBS} CC=${CC} +MAKE_ENV= LDFLAGS="${LDFLAGS}" +LDFLAGS+= -L${LOCALBASE}/lib +BUILD_WRKSRC= ${WRKSRC}/freebsd +INSTALL_WRKSRC= ${WRKSRC}/freebsd + +MAN8= rfc3195d.8 rklogd.8 rsyslogd.8 +MAN5= rsyslog.conf.5 +PLIST_FILES= sbin/rfc3195d sbin/rklogd sbin/rsyslogd etc/${PORTNAME}.conf.sample + +post-patch: + @${REINPLACE_CMD} -e 's|/etc/rsyslog.conf|${PREFIX}/etc/rsyslog.conf|' ${WRKSRC}/syslogd.c + @${REINPLACE_CMD} -e '/^CFLAGS=/s|=|+=|;s|-O3||;s|-fomit-frame-pointer||;/INSTALL/s|-b |-s |' \ + ${WRKSRC}/master.make + +post-install: + @${INSTALL_DATA} ${WRKSRC}/sample.conf ${PREFIX}/etc/${PORTNAME}.conf.sample + +.include <bsd.port.mk> diff --git a/sysutils/rsyslog/distinfo b/sysutils/rsyslog/distinfo new file mode 100644 index 000000000000..aae204a8bc71 --- /dev/null +++ b/sysutils/rsyslog/distinfo @@ -0,0 +1,3 @@ +MD5 (rsyslog-1.15.0.tar.gz) = fc680b85e380d7d2b2e8bb06f7de4b27 +SHA256 (rsyslog-1.15.0.tar.gz) = 4e31fdf36156cfb0fd815c944af431890e8f4313716dfa6da2b33d04a23ecbbd +SIZE (rsyslog-1.15.0.tar.gz) = 298999 diff --git a/sysutils/rsyslog/files/rsyslogd.in b/sysutils/rsyslog/files/rsyslogd.in new file mode 100644 index 000000000000..13272c0acbe7 --- /dev/null +++ b/sysutils/rsyslog/files/rsyslogd.in @@ -0,0 +1,72 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: rsyslogd +# REQUIRE: mountcritremote cleanvar newsyslog ldconfig +# BEFORE: SERVERS + +. %%RC_SUBR%% + +name=rsyslogd +rcvar=`set_rcvar` +pidfile="/var/run/rsyslogd.pid" +command="%%PREFIX%%/sbin/${name}" +required_files="%%PREFIX%%/etc/rsyslog.conf" +start_precmd="rsyslogd_precmd" +extra_commands="reload" + +sockfile="/var/run/rsyslogd.sockets" +evalargs="rc_flags=\"\`set_socketlist\` \$rc_flags\"" +altlog_proglist="named" + +rsyslogd_precmd() +{ + local _l _ldir + + # Transitional symlink for old binaries + # + if [ ! -L /dev/log ]; then + ln -sf /var/run/log /dev/log + fi + rm -f /var/run/log + + # Create default list of syslog sockets to watch + # + ( umask 022 ; > $sockfile ) + + # If running named(8) or ntpd(8) chrooted, added appropriate + # syslog socket to list of sockets to watch. + # + for _l in $altlog_proglist; do + eval _ldir=\$${_l}_chrootdir + if checkyesno `set_rcvar $_l` && [ -n "$_ldir" ]; then + echo "${_ldir}/var/run/log" >> $sockfile + fi + done + + # If other sockets have been provided, change run_rc_command()'s + # internal copy of $rsyslogd_flags to force use of specific + # rsyslogd sockets. + # + if [ -s $sockfile ]; then + echo "/var/run/log" >> $sockfile + eval $evalargs + fi + + return 0 +} + +set_socketlist() +{ + local _s _socketargs + + _socketargs= + for _s in `cat $sockfile | tr '\n' ' '` ; do + _socketargs="-a $_s $_socketargs" + done + echo $_socketargs +} +load_rc_config $name +run_rc_command "$1" diff --git a/sysutils/rsyslog/pkg-descr b/sysutils/rsyslog/pkg-descr new file mode 100644 index 000000000000..f62509fcdabf --- /dev/null +++ b/sysutils/rsyslog/pkg-descr @@ -0,0 +1,9 @@ +Rsyslog is an enhanced multi-threaded syslogd supporting, among others, +MySQL, syslog/tcp, RFC 3195, permitted sender lists, filtering on any +message part, and fine grain output format control. 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. + +WWW: http://www.rsyslog.com/ diff --git a/sysutils/rsyslog3/Makefile b/sysutils/rsyslog3/Makefile new file mode 100644 index 000000000000..f465cf1545cb --- /dev/null +++ b/sysutils/rsyslog3/Makefile @@ -0,0 +1,41 @@ +# New ports collection makefile for: rsyslog +# Date created: 9 July 2007 +# Whom: Andrew Pantyukhin <infofarmer@FreeBSD.org> +# +# $FreeBSD$ +# + +PORTNAME= rsyslog +PORTVERSION= 1.15.0 +CATEGORIES= sysutils +MASTER_SITES= SF http://download.rsyslog.com/rsyslog/ + +MAINTAINER= infofarmer@FreeBSD.org +COMMENT= Enhanced syslog daemon + +LIB_DEPENDS= logging.0:${PORTSDIR}/devel/liblogging + +USE_MYSQL= yes +USE_RC_SUBR= ${PORTNAME}d +MAKE_ARGS= LIBLOGGING_INC=-I${LOCALBASE}/include \ + LIBLOGGING_BIN=-llogging \ + FEATURE_RFC3195=1 BINDIR=${PREFIX}/sbin MANDIR=${MANPREFIX}/man \ + LPTHREAD=${PTHREAD_LIBS} CC=${CC} +MAKE_ENV= LDFLAGS="${LDFLAGS}" +LDFLAGS+= -L${LOCALBASE}/lib +BUILD_WRKSRC= ${WRKSRC}/freebsd +INSTALL_WRKSRC= ${WRKSRC}/freebsd + +MAN8= rfc3195d.8 rklogd.8 rsyslogd.8 +MAN5= rsyslog.conf.5 +PLIST_FILES= sbin/rfc3195d sbin/rklogd sbin/rsyslogd etc/${PORTNAME}.conf.sample + +post-patch: + @${REINPLACE_CMD} -e 's|/etc/rsyslog.conf|${PREFIX}/etc/rsyslog.conf|' ${WRKSRC}/syslogd.c + @${REINPLACE_CMD} -e '/^CFLAGS=/s|=|+=|;s|-O3||;s|-fomit-frame-pointer||;/INSTALL/s|-b |-s |' \ + ${WRKSRC}/master.make + +post-install: + @${INSTALL_DATA} ${WRKSRC}/sample.conf ${PREFIX}/etc/${PORTNAME}.conf.sample + +.include <bsd.port.mk> diff --git a/sysutils/rsyslog3/distinfo b/sysutils/rsyslog3/distinfo new file mode 100644 index 000000000000..aae204a8bc71 --- /dev/null +++ b/sysutils/rsyslog3/distinfo @@ -0,0 +1,3 @@ +MD5 (rsyslog-1.15.0.tar.gz) = fc680b85e380d7d2b2e8bb06f7de4b27 +SHA256 (rsyslog-1.15.0.tar.gz) = 4e31fdf36156cfb0fd815c944af431890e8f4313716dfa6da2b33d04a23ecbbd +SIZE (rsyslog-1.15.0.tar.gz) = 298999 diff --git a/sysutils/rsyslog3/files/rsyslogd.in b/sysutils/rsyslog3/files/rsyslogd.in new file mode 100644 index 000000000000..13272c0acbe7 --- /dev/null +++ b/sysutils/rsyslog3/files/rsyslogd.in @@ -0,0 +1,72 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: rsyslogd +# REQUIRE: mountcritremote cleanvar newsyslog ldconfig +# BEFORE: SERVERS + +. %%RC_SUBR%% + +name=rsyslogd +rcvar=`set_rcvar` +pidfile="/var/run/rsyslogd.pid" +command="%%PREFIX%%/sbin/${name}" +required_files="%%PREFIX%%/etc/rsyslog.conf" +start_precmd="rsyslogd_precmd" +extra_commands="reload" + +sockfile="/var/run/rsyslogd.sockets" +evalargs="rc_flags=\"\`set_socketlist\` \$rc_flags\"" +altlog_proglist="named" + +rsyslogd_precmd() +{ + local _l _ldir + + # Transitional symlink for old binaries + # + if [ ! -L /dev/log ]; then + ln -sf /var/run/log /dev/log + fi + rm -f /var/run/log + + # Create default list of syslog sockets to watch + # + ( umask 022 ; > $sockfile ) + + # If running named(8) or ntpd(8) chrooted, added appropriate + # syslog socket to list of sockets to watch. + # + for _l in $altlog_proglist; do + eval _ldir=\$${_l}_chrootdir + if checkyesno `set_rcvar $_l` && [ -n "$_ldir" ]; then + echo "${_ldir}/var/run/log" >> $sockfile + fi + done + + # If other sockets have been provided, change run_rc_command()'s + # internal copy of $rsyslogd_flags to force use of specific + # rsyslogd sockets. + # + if [ -s $sockfile ]; then + echo "/var/run/log" >> $sockfile + eval $evalargs + fi + + return 0 +} + +set_socketlist() +{ + local _s _socketargs + + _socketargs= + for _s in `cat $sockfile | tr '\n' ' '` ; do + _socketargs="-a $_s $_socketargs" + done + echo $_socketargs +} +load_rc_config $name +run_rc_command "$1" diff --git a/sysutils/rsyslog3/pkg-descr b/sysutils/rsyslog3/pkg-descr new file mode 100644 index 000000000000..f62509fcdabf --- /dev/null +++ b/sysutils/rsyslog3/pkg-descr @@ -0,0 +1,9 @@ +Rsyslog is an enhanced multi-threaded syslogd supporting, among others, +MySQL, syslog/tcp, RFC 3195, permitted sender lists, filtering on any +message part, and fine grain output format control. 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. + +WWW: http://www.rsyslog.com/ |