diff --git a/.cvsignore b/.cvsignore
index 7c56ef5..21587f5 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1,3 +1,3 @@
-rsyslog-2.0.0.tar.gz
+rsyslog-2.0.2.tar.gz
rsyslog.init
rsyslog.sysconfig
diff --git a/rsyslog-2.0.0-manPage.patch b/rsyslog-2.0.0-manPage.patch
deleted file mode 100644
index 1e27c8c..0000000
--- a/rsyslog-2.0.0-manPage.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-diff -upb rsyslog-2.0.0/doc/rsconf1_actionexeconlywhenpreviousissuspended.html.manPage rsyslog-2.0.0/doc/rsconf1_actionexeconlywhenpreviousissuspended.html
---- rsyslog-2.0.0/doc/rsconf1_actionexeconlywhenpreviousissuspended.html.manPage 2008-02-07 11:50:17.000000000 +0100
-+++ rsyslog-2.0.0/doc/rsconf1_actionexeconlywhenpreviousissuspended.html 2008-02-07 11:52:13.000000000 +0100
-@@ -0,0 +1,29 @@
-+
-+
-+rsyslog.conf file
-+
-+
-+$ActionExecOnlyWhenPreviousIsSuspended
-+Type: global configuration directive
-+Default: off
-+Description:
-+This directive allows to specify if actions should always be executed ("off," the default) or only if the previous action is suspended ("on"). This directive works hand-in-hand with the multiple actions per selector feature. It can be used, for example, to create rules that automatically switch destination servers or databases to a (set of) backup(s), if the primary server fails. Note that this feature depends on proper implementation of the suspend feature in the output module. All built-in output modules properly support it (most importantly the database write and the syslog message forwarder).
-+This selector processes all messages it receives (*.*). It tries to forward every message to primary-syslog.example.com (via tcp). If it can not reach that server, it tries secondary-1-syslog.example.com, if that fails too, it tries secondary-2-syslog.example.com. If neither of these servers can be connected, the data is stored in /var/log/localbuffer. Please note that the secondaries and the local log buffer are only used if the one before them does not work. So ideally, /var/log/localbuffer will never receive a message. If one of the servers resumes operation, it automatically takes over processing again.
-+We strongly advise not to use repeated line reduction together with ActionExecOnlyWhenPreviousIsSuspended. It may lead to "interesting" and undesired results (but you can try it if you like).
-+Sample:
-+*.* @@primary-syslog.example.com
-+
$ActionExecOnlyWhenPreviousIsSuspended on
-+
& @@secondary-1-syslog.example.com # & is used to have more than one action for
-+
& @@secondary-2-syslog.example.com # the same selector - the mult-action feature
-+
& /var/log/localbuffer
-+
$ActionExecOnlyWhenPreviousIsSuspended off # to re-set it for the next selector
-+
-+[rsyslog.conf overview] [manual
-+index] [rsyslog site]
-+This documentation is part of the
-+rsyslog project.
-+Copyright © 2007 by Rainer Gerhards and
-+Adiscon. Released under the GNU GPL
-+version 2 or higher.
-+
-+
-diff -upb rsyslog-2.0.0/doc/rsyslog_conf.html.manPage rsyslog-2.0.0/doc/rsyslog_conf.html
---- rsyslog-2.0.0/doc/rsyslog_conf.html.manPage 2008-02-07 11:45:32.000000000 +0100
-+++ rsyslog-2.0.0/doc/rsyslog_conf.html 2008-02-07 13:38:22.000000000 +0100
-@@ -25,7 +25,7 @@ to rsyslogd.
- start with a dollar-sign. Here is a list in alphabetical order. Follow links for
- a description.
-
-- - $ActionExecOnlyIfPreviousIsSuspended
-+ - $ActionExecOnlyWhenPreviousIsSuspended
- - $ActionResumeInterval
- - $AllowedSender
- - $ControlCharacterEscapePrefix
-@@ -43,9 +43,6 @@ a description.
- - $FileCreateMode
- - $FileGroup
- - $FileOwner
-- - $GssForwardServiceName
-- - $GssListenServiceName
-- - $GssMode
- - $IncludeConfig
- - $MainMsgQueueSize
- - $ModDir
-diff -upb rsyslog-2.0.0/rsyslogd.8.manPage rsyslog-2.0.0/rsyslogd.8
---- rsyslog-2.0.0/rsyslogd.8.manPage 2008-02-07 11:35:22.000000000 +0100
-+++ rsyslog-2.0.0/rsyslogd.8 2008-02-07 13:38:00.000000000 +0100
-@@ -18,9 +18,6 @@ rsyslogd \- reliable and extended syslog
- .RB [ " \-f "
- .I config file
- ]
--.RB [ " \-g "
--.I port,max-nbr-of-sessions
--]
- .RB [ " \-h " ]
- .br
- .RB [ " \-i "
-@@ -158,12 +155,6 @@ Specify an alternative configuration fil
- .IR /etc/rsyslog.conf ","
- which is the default.
- .TP
--.BI "\-g "
--Identical to -t except that every tcp connection is authenticated
--using gss-api (kerberos 5). Service name may be set using
--$GssListenServiceName or the default "host" will be used. Encryption
--can be used if specified by the client and supported by both sides.
--.TP
- .BI "\-h "
- By default rsyslogd will not forward messages it receives from remote hosts.
- Specifying this switch on the command line will cause the log daemon to
-@@ -276,15 +267,10 @@ will be reread and the
- .BR rsyslog (3)
- facility is started again.
- .TP
--.B SIGTERM
-+.B SIGTERM "," SIGINT "," SIGQUIT
- .B Rsyslogd
- will die.
- .TP
--.BR SIGINT ", " SIGQUIT
--If debugging is enabled these are ignored, otherwise
--.B rsyslogd
--will die.
--.TP
- .B SIGUSR1
- Switch debugging on/off. This option can only be used if
- .B rsyslogd
-@@ -501,8 +487,7 @@ If remote logging is enabled, messages c
- As the messages are transmitted in clear-text, an attacker might use
- the information obtained from the packets for malicious things. Also, an
- attacker might reply recorded messages or spoof a sender's IP address,
--which could lead to a wrong perception of system activity. These can
--be prevented by using GSS-API authentication and encryption. Be sure
-+which could lead to a wrong perception of system activity. Be sure
- to think about syslog network security before enabling it.
- .LP
- .SH DEBUGGING
diff --git a/rsyslog-2.0.0-sockhang.patch b/rsyslog-2.0.0-sockhang.patch
deleted file mode 100644
index b396dd5..0000000
--- a/rsyslog-2.0.0-sockhang.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-diff -up rsyslog-2.0.0/omfwd.c.hang rsyslog-2.0.0/omfwd.c
---- rsyslog-2.0.0/omfwd.c.hang 2008-01-17 12:24:03.000000000 +0100
-+++ rsyslog-2.0.0/omfwd.c 2008-01-17 13:34:37.000000000 +0100
-@@ -116,6 +116,7 @@ typedef struct _instanceData {
-
- BEGINcreateInstance
- CODESTARTcreateInstance
-+ pData->sock = -1;
- ENDcreateInstance
-
-
-@@ -278,8 +279,8 @@ static rsRetVal TCPSendInit(void *pvData
- instanceData *pData = (instanceData *) pvData;
-
- assert(pData != NULL);
-- if(pData->sock <= 0) {
-- if((pData->sock = TCPSendCreateSocket(pData->f_addr)) <= 0)
-+ if(pData->sock < 0) {
-+ if((pData->sock = TCPSendCreateSocket(pData->f_addr)) < 0)
- iRet = RS_RET_TCP_SOCKCREATE_ERR;
- }
-
-diff -up rsyslog-2.0.0/omfile.c.hang rsyslog-2.0.0/omfile.c
---- rsyslog-2.0.0/omfile.c.hang 2008-01-17 12:24:11.000000000 +0100
-+++ rsyslog-2.0.0/omfile.c 2008-01-17 13:16:57.000000000 +0100
-@@ -357,6 +357,7 @@ static void prepareFile(instanceData *pD
- pData->fd = open((char*) newFileName, O_WRONLY|O_APPEND|O_CREAT|O_NOCTTY,
- pData->fCreateMode);
- } else {
-+ pData->fd = -1;
- /* file does not exist, create it (and eventually parent directories */
- if(pData->bCreateDirs) {
- /* we fist need to create parent dirs if they are missing
-@@ -596,6 +597,7 @@ again:
-
- BEGINcreateInstance
- CODESTARTcreateInstance
-+ pData->fd = -1;
- ENDcreateInstance
-
-
-diff -up rsyslog-2.0.0/tcpsyslog.c.hang rsyslog-2.0.0/tcpsyslog.c
diff --git a/rsyslog-2.0.0-strerror.patch b/rsyslog-2.0.0-strerror.patch
deleted file mode 100644
index 28ec6d2..0000000
--- a/rsyslog-2.0.0-strerror.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-diff -up rsyslog-2.0.0/syslogd.c.strerror rsyslog-2.0.0/syslogd.c
---- rsyslog-2.0.0/syslogd.c.strerror 2008-01-22 11:59:58.000000000 +0100
-+++ rsyslog-2.0.0/syslogd.c 2008-01-22 12:13:35.000000000 +0100
-@@ -3563,7 +3563,7 @@ void logerror(char *type)
- if (errno == 0)
- snprintf(buf, sizeof(buf), "%s", type);
- else {
-- strerror_r(errno, errStr, sizeof(errStr));
-+ rs_strerror_r(errno, errStr, sizeof(errStr));
- snprintf(buf, sizeof(buf), "%s: %s", type, errStr);
- }
- buf[sizeof(buf)/sizeof(char) - 1] = '\0'; /* just to be on the safe side... */
-@@ -4349,7 +4349,7 @@ finalize_it:
- if(fCurr != NULL)
- selectorDestruct(fCurr);
-
-- strerror_r(errno, errStr, sizeof(errStr));
-+ rs_strerror_r(errno, errStr, sizeof(errStr));
- dbgprintf("error %d processing config file '%s'; os error (if any): %s\n",
- iRet, pConfFile, errStr);
- }
-@@ -5466,6 +5466,20 @@ void dbgprintf(char *fmt, ...)
- }
-
-
-+char *rs_strerror_r(int errnum, char *buf, size_t buflen) {
-+#ifdef STRERROR_R_CHAR_P
-+ char *p = strerror_r(errnum, buf, buflen);
-+ if (p != buf) {
-+ strncpy(buf, p, buflen);
-+ buf[buflen - 1] = '\0';
-+ }
-+#else
-+ strerror_r(errnum, buf, buflen);
-+#endif
-+ return buf;
-+}
-+
-+
- /*
- * The following function is resposible for handling a SIGHUP signal. Since
- * we are now doing mallocs/free as part of init we had better not being
-@@ -5727,7 +5741,7 @@ static rsRetVal processSelectAfter(int m
- printchopped(LocalHostName, line, iRcvd, fd, funixParseHost[i]);
- } else if (iRcvd < 0 && errno != EINTR) {
- char errStr[1024];
-- strerror_r(errno, errStr, sizeof(errStr));
-+ rs_strerror_r(errno, errStr, sizeof(errStr));
- dbgprintf("UNIX socket error: %d = %s.\n", \
- errno, errStr);
- logerror("recvfrom UNIX");
-@@ -5768,7 +5782,7 @@ static rsRetVal processSelectAfter(int m
- }
- } else if (l < 0 && errno != EINTR && errno != EAGAIN) {
- char errStr[1024];
-- strerror_r(errno, errStr, sizeof(errStr));
-+ rs_strerror_r(errno, errStr, sizeof(errStr));
- dbgprintf("INET socket error: %d = %s.\n", errno, errStr);
- logerror("recvfrom inet");
- /* should be harmless */
-diff -up rsyslog-2.0.0/configure.ac.strerror rsyslog-2.0.0/configure.ac
---- rsyslog-2.0.0/configure.ac.strerror 2008-01-22 12:01:24.000000000 +0100
-+++ rsyslog-2.0.0/configure.ac 2008-01-22 12:02:01.000000000 +0100
-@@ -81,9 +81,10 @@ AC_FUNC_REALLOC
- AC_FUNC_SELECT_ARGTYPES
- AC_TYPE_SIGNAL
- AC_FUNC_STAT
-+AC_FUNC_STRERROR_R
- AC_FUNC_VPRINTF
- AC_FUNC_WAIT3
--AC_CHECK_FUNCS([alarm clock_gettime gethostbyname gethostname gettimeofday localtime_r memset mkdir regcomp select setid socket strcasecmp strchr strdup strerror strerror_r strndup strnlen strrchr strstr strtol strtoul uname ttyname_r])
-+AC_CHECK_FUNCS([alarm clock_gettime gethostbyname gethostname gettimeofday localtime_r memset mkdir regcomp select setid socket strcasecmp strchr strdup strerror strndup strnlen strrchr strstr strtol strtoul uname ttyname_r])
-
-
- # Large file support
-diff -up rsyslog-2.0.0/omfwd.c.strerror rsyslog-2.0.0/omfwd.c
---- rsyslog-2.0.0/omfwd.c.strerror 2008-01-22 11:58:38.000000000 +0100
-+++ rsyslog-2.0.0/omfwd.c 2008-01-22 12:14:51.000000000 +0100
-@@ -441,7 +441,7 @@ CODESTARTdoAction
- int eno = errno;
- char errStr[1024];
- dbgprintf("sendto() error: %d = %s.\n",
-- eno, strerror_r(eno, errStr, sizeof(errStr)));
-+ eno, rs_strerror_r(eno, errStr, sizeof(errStr)));
- }
- }
- if (lsent == l && !send_to_all)
-diff -up rsyslog-2.0.0/rfc3195d.c.strerror rsyslog-2.0.0/rfc3195d.c
---- rsyslog-2.0.0/rfc3195d.c.strerror 2008-01-22 11:59:01.000000000 +0100
-+++ rsyslog-2.0.0/rfc3195d.c 2008-01-22 12:15:14.000000000 +0100
-@@ -96,7 +96,7 @@ static void openlog()
- if(LogFile < 0) {
- char errStr[1024];
- printf("error opening '%s': %s\n",
-- pPathLogname, strerror_r(errno, errStr, sizeof(errStr)));
-+ pPathLogname, rs_strerror_r(errno, errStr, sizeof(errStr)));
- }
- }
- if (LogFile != -1 && !connected &&
-@@ -106,7 +106,7 @@ static void openlog()
- else {
- char errStr[1024];
- printf("error connecting '%s': %s\n",
-- pPathLogname, strerror_r(errno, errStr, sizeof(errStr)));
-+ pPathLogname, rs_strerror_r(errno, errStr, sizeof(errStr)));
- }
- }
-
-@@ -162,7 +162,7 @@ void OnReceive(srAPIObj* pAPI, srSLMGObj
- if(nWritten < 0) {
- /* error, recover! */
- char errStr[1024];
-- printf("error writing to domain socket: %s\r\n", strerror_r(errno, errStr, sizeof(errStr)));
-+ printf("error writing to domain socket: %s\r\n", rs_strerror_r(errno, errStr, sizeof(errStr)));
- closelog();
- } else {
- /* prepare for (potential) next write */
-diff -up rsyslog-2.0.0/net.c.strerror rsyslog-2.0.0/net.c
---- rsyslog-2.0.0/net.c.strerror 2008-01-22 11:58:11.000000000 +0100
-+++ rsyslog-2.0.0/net.c 2008-01-22 12:14:37.000000000 +0100
-@@ -66,7 +66,7 @@ int should_use_so_bsdcompat(void)
- init_done = 1;
- if (uname(&utsname) < 0) {
- char errStr[1024];
-- dbgprintf("uname: %s\r\n", strerror_r(errno, errStr, sizeof(errStr)));
-+ dbgprintf("uname: %s\r\n", rs_strerror_r(errno, errStr, sizeof(errStr)));
- return 1;
- }
- /* Format is ..
-diff -up rsyslog-2.0.0/pidfile.c.strerror rsyslog-2.0.0/pidfile.c
-diff -up rsyslog-2.0.0/tcpsyslog.c.strerror rsyslog-2.0.0/tcpsyslog.c
---- rsyslog-2.0.0/tcpsyslog.c.strerror 2008-01-22 12:00:05.000000000 +0100
-+++ rsyslog-2.0.0/tcpsyslog.c 2008-01-22 12:15:29.000000000 +0100
-@@ -1021,7 +1021,7 @@ int TCPSendCreateSocket(struct addrinfo
- } else {
- char errStr[1024];
- dbgprintf("create tcp connection failed, reason %s",
-- strerror_r(errno, errStr, sizeof(errStr)));
-+ rs_strerror_r(errno, errStr, sizeof(errStr)));
- }
-
- }
-@@ -1032,7 +1032,7 @@ int TCPSendCreateSocket(struct addrinfo
- }
- else {
- char errStr[1024];
-- dbgprintf("couldn't create send socket, reason %s", strerror_r(errno, errStr, sizeof(errStr)));
-+ dbgprintf("couldn't create send socket, reason %s", rs_strerror_r(errno, errStr, sizeof(errStr)));
- }
- r = r->ai_next;
- }
-diff -up rsyslog-2.0.0/syslogd.h.strerror rsyslog-2.0.0/syslogd.h
---- rsyslog-2.0.0/syslogd.h.strerror 2008-01-22 12:00:12.000000000 +0100
-+++ rsyslog-2.0.0/syslogd.h 2008-01-22 12:01:04.000000000 +0100
-@@ -48,6 +48,7 @@
- #define MARK 0x008 /* this message is a mark */
-
- void dbgprintf(char *, ...);
-+char *rs_strerror_r(int errnum, char *buf, size_t buflen);
- void logerror(char *type);
- void logerrorSz(char *type, char *errMsg);
- void logerrorInt(char *type, int iErr);
diff --git a/rsyslog.spec b/rsyslog.spec
index 18ea035..45dd4d2 100644
--- a/rsyslog.spec
+++ b/rsyslog.spec
@@ -2,17 +2,14 @@
Summary: Enhanced system logging and kernel message trapping daemons
Name: rsyslog
-Version: 2.0.0
-Release: 3%{?dist}
+Version: 2.0.2
+Release: 1%{?dist}
License: GPLv2+
Group: System Environment/Daemons
URL: http://www.rsyslog.com/
Source0: http://download.rsyslog.com/rsyslog/%{name}-%{version}.tar.gz
Source1: rsyslog.init
Source2: rsyslog.sysconfig
-Patch1: rsyslog-2.0.0-sockhang.patch
-Patch2: rsyslog-2.0.0-strerror.patch
-Patch3: rsyslog-2.0.0-manPage.patch
BuildRequires: zlib-devel
BuildRequires: autoconf automake libtool
Requires: logrotate >= 3.5.2
@@ -32,6 +29,12 @@ Group: System Environment/Daemons
Requires: %name = %version-%release
BuildRequires: mysql-devel >= 4.0
+%package pgsql
+Summary: PostgresSQL support for rsyslog
+Group: System Environment/Daemons
+Requires: %name = %version-%release
+BuildRequires: postgresql-devel
+
%description
Rsyslog is an enhanced multi-threaded syslogd supporting, among others, MySQL,
syslog/tcp, RFC 3195, permitted sender lists, filtering on any message part,
@@ -45,15 +48,15 @@ at the same time being very easy to setup for the novice user.
The rsyslog-mysql package contains a dynamic shared object that will add
MySQL database support to rsyslog.
+%description pgsql
+The rsyslog-pgsql package contains a dynamic shared object that will add
+PostgreSQL database support to rsyslog.
+
%prep
%setup -q
-%patch1 -p1 -b .sockHang
-%patch2 -p1 -b .strerror
-%patch3 -p1 -b .manPage
-autoreconf
%build
-%configure --sbindir=%{sbindir} --disable-static --enable-mysql
+%configure --sbindir=%{sbindir} --disable-static --enable-mysql --enable-pgsql
make %{?_smp_mflags}
%install
@@ -122,7 +125,15 @@ fi
%doc plugins/ommysql/createDB.sql
%{_libdir}/rsyslog/ommysql.so
+%files pgsql
+%defattr(-,root,root)
+%{_libdir}/rsyslog/ompgsql.so
+
%changelog
+* Wed Feb 13 2008 Peter Vrabec 2.0.2-1
+- new upstream release
+- provide PostgresSQL support
+
* Mon Feb 11 2008 Peter Vrabec 2.0.0-3
- fix documentation problems
diff --git a/sources b/sources
index c619c24..3cbd8d3 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
-de42d8e7a6dc03e38e807662f2bfb240 rsyslog-2.0.0.tar.gz
+7e214ddb80544e99dac643f1d93c81fb rsyslog-2.0.2.tar.gz
fe8fcd90c672701fa198dd1206df64ae rsyslog.init
e10d2dc3238c2cf2a54933f10b19b9bf rsyslog.sysconfig