summaryrefslogtreecommitdiffstats
path: root/sysutils/msyslog
diff options
context:
space:
mode:
authorwill <will@FreeBSD.org>2001-05-20 02:54:49 +0000
committerwill <will@FreeBSD.org>2001-05-20 02:54:49 +0000
commitd2cec657c0b7d0c228d768c3992210a1550619f2 (patch)
tree2a64e1e378f7cc8ab0824abc1bede43380d29e40 /sysutils/msyslog
parent3d392959e58214cf840dc0426eadd426973a86bc (diff)
downloadFreeBSD-ports-d2cec657c0b7d0c228d768c3992210a1550619f2.zip
FreeBSD-ports-d2cec657c0b7d0c228d768c3992210a1550619f2.tar.gz
Add msyslog 1.04b, a flexible and easy to integrate syslog daemon.
PR: 27308 Submitted by: Anders Nordby <anders@fix.no>
Diffstat (limited to 'sysutils/msyslog')
-rw-r--r--sysutils/msyslog/Makefile89
-rw-r--r--sysutils/msyslog/distinfo1
-rw-r--r--sysutils/msyslog/files/msyslog.sh.sample20
-rw-r--r--sysutils/msyslog/files/patch-configure.in38
-rw-r--r--sysutils/msyslog/files/patch-im_tcp.c14
-rw-r--r--sysutils/msyslog/files/patch-im_udp.c15
-rw-r--r--sysutils/msyslog/files/patch-im_unix.c14
-rw-r--r--sysutils/msyslog/files/patch-ip_misc.c15
-rw-r--r--sysutils/msyslog/files/patch-md5.h11
-rw-r--r--sysutils/msyslog/files/patch-modules-Makefile.in11
-rw-r--r--sysutils/msyslog/files/patch-rmd160.h11
-rw-r--r--sysutils/msyslog/files/patch-sha1.h11
-rw-r--r--sysutils/msyslog/pkg-comment1
-rw-r--r--sysutils/msyslog/pkg-descr11
-rw-r--r--sysutils/msyslog/pkg-plist18
15 files changed, 280 insertions, 0 deletions
diff --git a/sysutils/msyslog/Makefile b/sysutils/msyslog/Makefile
new file mode 100644
index 0000000..11941c9
--- /dev/null
+++ b/sysutils/msyslog/Makefile
@@ -0,0 +1,89 @@
+# New ports collection makefile for: msyslog
+# Date created: 14 May 2001
+# Whom: Anders Nordby <anders@fix.no>
+#
+# $FreeBSD$
+#
+
+PORTNAME= msyslog
+PORTVERSION= 1.04b
+CATEGORIES= sysutils
+MASTER_SITES= http://www.core-sdi.com/soft/
+DISTNAME= ${PORTNAME}-v${PORTVERSION:S/b//}
+EXTRACT_SUFX= .tgz
+
+MAINTAINER= anders@fix.no
+
+.if defined(WITH_MYSQL)
+LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
+.endif
+.if defined(WITH_PGSQL)
+LIB_DEPENDS+= pq.2:${PORTSDIR}/databases/postgresql7
+.endif
+
+USE_AUTOCONF= yes
+GNU_CONFIGURE= yes
+USE_GMAKE= yes
+.if !defined(WITH_MYSQL)
+CONFIGURE_ARGS+= --without-mysql
+.endif
+.if !defined(WITH_PGSQL)
+CONFIGURE_ARGS+= --without-pgsql
+.endif
+
+MAN5= syslog.conf.5
+MAN8= syslogd.8 im_bsd.8 im_unix.8 om_classic.8 om_tcp.8 im_tcp.8 om_peo.8 \
+ peochk.8
+.if defined(WITH_MYSQL)
+MAN8+= om_mysql.8
+.endif
+.if defined(WITH_PGSQL)
+MAN8+= om_pgsql.8
+.endif
+MANCOMPRESSED= yes
+INSTALLS_SHLIB= yes
+
+DOCDIR= ${PREFIX}/share/doc/${PORTNAME}
+FIXPREFIX= README src/man/om_peo.8 src/man/syslog.conf.5 \
+ src/man/syslogd.8 src/TODO src/syslogd.h
+
+pre-patch:
+.for f in ${FIXPREFIX}
+ ${PERL} -pi -e "s|/etc/syslog.conf|${PREFIX}/etc/syslog.conf|g" \
+ ${WRKSRC}/${f}
+.endfor
+
+post-install:
+.if !defined(NOPORTDOCS)
+ ${INSTALL} -d -o root -g wheel -m 0775 ${DOCDIR}/examples
+ ${INSTALL_DATA} ${WRKSRC}/src/examples/* ${DOCDIR}/examples/
+ ${INSTALL_DATA} ${WRKSRC}/AUTHORS ${DOCDIR}/
+ ${INSTALL_DATA} ${WRKSRC}/src/TODO ${DOCDIR}/
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR}/
+ ${INSTALL_DATA} ${WRKSRC}/NEWS ${DOCDIR}/
+ ${INSTALL_DATA} ${WRKSRC}/doc/HOW_TO_WRITE_A_MODULE ${DOCDIR}/
+.endif
+ @if [ ! -f ${PREFIX}/etc/rc.d/msyslog.sh.sample ]; then \
+ ${ECHO} "Installing ${PREFIX}/etc/rc.d/msyslog.sh.sample startup file."; \
+ ${INSTALL_SCRIPT} ${FILESDIR}/msyslog.sh.sample ${PREFIX}/etc/rc.d/msyslog.sh.sample; \
+ fi
+ @${ECHO} "================================================================================"
+ @${ECHO}
+ @${ECHO} "To replace FreeBSD's standard syslogd, do this:"
+ @${ECHO}
+ @${ECHO} "a) create a configuration in ${PREFIX}/etc/syslog.conf."
+.if !defined(NOPORTDOCS)
+ @${ECHO} " See ${DOCDIR}/examples for examples."
+.endif
+ @${ECHO}
+ @${ECHO} "b) Set up a startup script in ${PREFIX}/etc/rc.d. For your convinience, a"
+ @${ECHO} " msyslog.sh.sample has been provided."
+ @${ECHO}
+ @${ECHO} "c) Stop the standard FreeBSD syslogd from starting automatically by putting this"
+ @${ECHO} " in the end of /etc/rc.conf:"
+ @${ECHO}
+ @${ECHO} "syslogd_enable=\"NO\""
+ @${ECHO}
+ @${ECHO} "================================================================================"
+
+.include <bsd.port.mk>
diff --git a/sysutils/msyslog/distinfo b/sysutils/msyslog/distinfo
new file mode 100644
index 0000000..c139cd2
--- /dev/null
+++ b/sysutils/msyslog/distinfo
@@ -0,0 +1 @@
+MD5 (msyslog-v1.04.tgz) = 441387853471fd418fd1ad3e03a084ec
diff --git a/sysutils/msyslog/files/msyslog.sh.sample b/sysutils/msyslog/files/msyslog.sh.sample
new file mode 100644
index 0000000..3edb0ae
--- /dev/null
+++ b/sysutils/msyslog/files/msyslog.sh.sample
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 1
+fi
+
+case "$1" in
+start)
+ [ -x ${PREFIX}/sbin/syslogd ] && ${PREFIX}/sbin/syslogd && echo -n ' msyslog'
+ ;;
+stop)
+ killall syslogd && echo -n ' msyslog'
+ ;;
+*)
+ echo "Usage: `basename $0` {start|stop}" >&2
+ ;;
+esac
+
+exit 0
diff --git a/sysutils/msyslog/files/patch-configure.in b/sysutils/msyslog/files/patch-configure.in
new file mode 100644
index 0000000..ed23a19
--- /dev/null
+++ b/sysutils/msyslog/files/patch-configure.in
@@ -0,0 +1,38 @@
+--- configure.in.orig Tue May 1 04:25:49 2001
++++ configure.in Mon May 14 00:23:17 2001
+@@ -57,7 +57,7 @@
+ AC_DEFINE_UNQUOTED(MSYSLOG_VERSION_STR, "$MSYSLOG_VERSION")dnl
+ echo msyslog version... $MSYSLOG_VERSION
+
+-MLIBNAME="libmsyslog.so.$MSYSLOG_VERSION" ;
++MLIBNAME="libmsyslog.so.4" ;
+ AC_DEFINE_UNQUOTED(MLIBNAME_STR, "$MLIBNAME")dnl
+
+ MANPAGES="syslog.conf.5 syslogd.8"
+@@ -66,12 +66,12 @@
+ then
+ prefix=$ac_default_prefix
+ fi
+-AC_DEFINE_UNQUOTED(INSTALL_LIBDIR, "$prefix/lib/alat")
++AC_DEFINE_UNQUOTED(INSTALL_LIBDIR, "$prefix/lib")
+
+ dnl
+ dnl Check needed libs for daemon
+ dnl
+-AC_CHECK_LIB(dl, dlopen, SYSLOGD_LIBS="$SYSLOGD_LIBS -ldl")dnl
++AC_CHECK_LIB(c, dlopen)dnl
+ AC_CHECK_LIB(socket, connect, SYSLOGD_LIBS="$SYSLOGD_LIBS -lsocket")dnl
+ AC_CHECK_LIB(nsl, gethostbyname, SYSLOGD_LIBS="$SYSLOGD_LIBS -lnsl")dnl
+ AC_DEFINE(SYSLOGD_LIBS, $SYSLOGD_LIBS)dnl
+@@ -155,6 +155,11 @@
+ AC_DEFINE_UNQUOTED(SYMBOL_PREFIX, "_")dnl
+ SHARED_PARAMS="-Bshareable"
+ DCCFLAGS="-fPIC"
++elif test "$UNAME" = "FreeBSD" ; then
++ AC_DEFINE(DLOPEN_FLAGS, RTLD_LAZY)dnl
++ SHARED_PARAMS="-Bshareable"
++ DCCFLAGS="-fPIC"
++ SYSLOGD_LIBS="$SYSLOGD_LIBS -Wl,-E"
+ elif test "$UNAME" = "Linux" ; then
+ AC_DEFINE(DLOPEN_FLAGS, RTLD_LAZY | RTLD_GLOBAL)dnl
+ MAIN_CPPFLAGS="-Xlinker -E";
diff --git a/sysutils/msyslog/files/patch-im_tcp.c b/sysutils/msyslog/files/patch-im_tcp.c
new file mode 100644
index 0000000..68c5fb0
--- /dev/null
+++ b/sysutils/msyslog/files/patch-im_tcp.c
@@ -0,0 +1,14 @@
+--- src/modules/im_tcp.c.orig Thu Apr 26 00:43:50 2001
++++ src/modules/im_tcp.c Sun May 13 00:49:45 2001
+@@ -72,11 +72,6 @@
+ #include "../modules.h"
+ #include "../syslogd.h"
+
+-/* recvfrom() and others like socklen_t, Irix doesn't provide it */
+-#ifndef HAVE_SOCKLEN_T
+- typedef int socklen_t;
+-#endif
+-
+ struct tcp_conn {
+ struct tcp_conn *next;
+ int fd;
diff --git a/sysutils/msyslog/files/patch-im_udp.c b/sysutils/msyslog/files/patch-im_udp.c
new file mode 100644
index 0000000..b15b6b4
--- /dev/null
+++ b/sysutils/msyslog/files/patch-im_udp.c
@@ -0,0 +1,15 @@
+--- src/modules/im_udp.c.orig Thu Apr 26 00:43:50 2001
++++ src/modules/im_udp.c Sun May 13 23:44:03 2001
+@@ -58,12 +58,6 @@
+ #include "../modules.h"
+ #include "../syslogd.h"
+
+-/* recvfrom() and others like socklen_t, Irix doesn't provide it */
+-#ifndef HAVE_SOCKLEN_T
+- typedef int socklen_t;
+-#endif
+-
+-
+ /*
+ * get messge
+ *
diff --git a/sysutils/msyslog/files/patch-im_unix.c b/sysutils/msyslog/files/patch-im_unix.c
new file mode 100644
index 0000000..829ebdd
--- /dev/null
+++ b/sysutils/msyslog/files/patch-im_unix.c
@@ -0,0 +1,14 @@
+--- src/modules/im_unix.c.orig Thu Apr 26 00:43:50 2001
++++ src/modules/im_unix.c Sun May 13 23:44:55 2001
+@@ -58,11 +58,6 @@
+ #include "../modules.h"
+ #include "../syslogd.h"
+
+-/* recvfrom() and others like socklen_t, Irix doesn't provide it */
+-#ifndef HAVE_SOCKLEN_T
+- typedef int socklen_t;
+-#endif
+-
+ #define DEFAULT_LOGGER "/dev/log"
+
+ /*
diff --git a/sysutils/msyslog/files/patch-ip_misc.c b/sysutils/msyslog/files/patch-ip_misc.c
new file mode 100644
index 0000000..827a6ed
--- /dev/null
+++ b/sysutils/msyslog/files/patch-ip_misc.c
@@ -0,0 +1,15 @@
+--- src/modules/ip_misc.c.orig Thu Apr 26 19:09:26 2001
++++ src/modules/ip_misc.c Sun May 13 16:30:57 2001
+@@ -62,12 +62,6 @@
+ #include "../modules.h"
+ #include "../syslogd.h"
+
+-/* recvfrom() and others like socklen_t, Irix doesn't provide it */
+-#ifndef HAVE_SOCKLEN_T
+- typedef int socklen_t;
+-#endif
+-
+-
+ #define TCP_KEEPALIVE 30 /* seconds to probe TCP connection */
+ #define MSYSLOG_MAX_TCP_CLIENTS 100
+ #define LISTENQ 35
diff --git a/sysutils/msyslog/files/patch-md5.h b/sysutils/msyslog/files/patch-md5.h
new file mode 100644
index 0000000..c87de3f
--- /dev/null
+++ b/sysutils/msyslog/files/patch-md5.h
@@ -0,0 +1,11 @@
+--- src/peo/md5.h.orig Tue Dec 5 00:17:51 2000
++++ src/peo/md5.h Sun May 13 00:38:59 2001
+@@ -27,7 +27,7 @@
+ #ifndef _MD5_H_
+ #define _MD5_H_
+
+-#include "typedefs.h"
++#include <sys/types.h>
+
+ /* MD5 context. */
+ typedef struct MD5Context {
diff --git a/sysutils/msyslog/files/patch-modules-Makefile.in b/sysutils/msyslog/files/patch-modules-Makefile.in
new file mode 100644
index 0000000..54a14cc
--- /dev/null
+++ b/sysutils/msyslog/files/patch-modules-Makefile.in
@@ -0,0 +1,11 @@
+--- src/modules/Makefile.in.orig Mon May 14 00:23:33 2001
++++ src/modules/Makefile.in Mon May 14 00:23:40 2001
+@@ -35,7 +35,7 @@
+ CPPFLAGS= -I.. @CPPFLAGS@
+
+ INSTALL= @INSTALL@
+-INSTALL_LIBDIR= @prefix@/lib/alat
++INSTALL_LIBDIR= @prefix@/lib
+
+ MLIBNAME= @MLIBNAME@
+ MSRCS= @MSRCS@
diff --git a/sysutils/msyslog/files/patch-rmd160.h b/sysutils/msyslog/files/patch-rmd160.h
new file mode 100644
index 0000000..3e4e464
--- /dev/null
+++ b/sysutils/msyslog/files/patch-rmd160.h
@@ -0,0 +1,11 @@
+--- src/peo/rmd160.h.orig Sun May 13 00:40:04 2001
++++ src/peo/rmd160.h Sun May 13 00:40:23 2001
+@@ -20,7 +20,7 @@
+ #ifndef _RMD160_H /* make sure this file is read only once */
+ #define _RMD160_H
+
+-#include "typedefs.h"
++#include <sys/types.h>
+
+ /********************************************************************/
+
diff --git a/sysutils/msyslog/files/patch-sha1.h b/sysutils/msyslog/files/patch-sha1.h
new file mode 100644
index 0000000..664e98d
--- /dev/null
+++ b/sysutils/msyslog/files/patch-sha1.h
@@ -0,0 +1,11 @@
+--- src/peo/sha1.h.orig Sun May 13 00:40:12 2001
++++ src/peo/sha1.h Sun May 13 00:40:37 2001
+@@ -9,7 +9,7 @@
+ #ifndef _SHA1_H
+ #define _SHA1_H
+
+-#include "typedefs.h"
++#include <sys/types.h>
+
+ typedef struct {
+ u_int32_t state[5];
diff --git a/sysutils/msyslog/pkg-comment b/sysutils/msyslog/pkg-comment
new file mode 100644
index 0000000..5bd0f8d
--- /dev/null
+++ b/sysutils/msyslog/pkg-comment
@@ -0,0 +1 @@
+Flexible and easy to integrate syslog daemon
diff --git a/sysutils/msyslog/pkg-descr b/sysutils/msyslog/pkg-descr
new file mode 100644
index 0000000..57df639
--- /dev/null
+++ b/sysutils/msyslog/pkg-descr
@@ -0,0 +1,11 @@
+This new design of syslog allows for an easy implementation of input and output
+modules. The modules that mantain compatibility with its precursor (Secure
+Syslog) are included in the standard distribution along with four modules:
+om_peo (an implementation of PEO-1 and L-PEO, two algorithmic protocols for
+integrity checking), om_mysql and om_pgsql (modules that sends output to a
+MySQL and PostgreSQL database, respectively) and om_regex (a module that allows
+output redirection using regular expressions).
+
+WWW: http://www.core-sdi.com/english/freesoft.html
+
+- Anders Nordby <anders@fix.no>
diff --git a/sysutils/msyslog/pkg-plist b/sysutils/msyslog/pkg-plist
new file mode 100644
index 0000000..554bff5
--- /dev/null
+++ b/sysutils/msyslog/pkg-plist
@@ -0,0 +1,18 @@
+lib/libmsyslog.so.4
+sbin/syslogd
+sbin/peochk
+etc/rc.d/msyslog.sh.sample
+%%PORTDOCS%%share/doc/msyslog/examples/im_mymodule.c
+%%PORTDOCS%%share/doc/msyslog/examples/om_mymodule.c
+%%PORTDOCS%%share/doc/msyslog/examples/syslog.conf.classic
+%%PORTDOCS%%share/doc/msyslog/examples/syslog.conf.mysql
+%%PORTDOCS%%share/doc/msyslog/examples/syslog.conf.peo
+%%PORTDOCS%%share/doc/msyslog/examples/syslog.conf.pgsql
+%%PORTDOCS%%share/doc/msyslog/examples/syslog.conf.regex
+%%PORTDOCS%%share/doc/msyslog/AUTHORS
+%%PORTDOCS%%share/doc/msyslog/TODO
+%%PORTDOCS%%share/doc/msyslog/README
+%%PORTDOCS%%share/doc/msyslog/NEWS
+%%PORTDOCS%%share/doc/msyslog/HOW_TO_WRITE_A_MODULE
+%%PORTDOCS%%@dirrm share/doc/msyslog/examples
+%%PORTDOCS%%@dirrm share/doc/msyslog
OpenPOWER on IntegriCloud