upgrade to new upstream version

This commit is contained in:
Tomas Heinrich 2009-04-13 15:21:15 +00:00
parent d33cb6e55e
commit 4ea1623e9d
5 changed files with 57 additions and 123 deletions

View File

@ -1 +1 @@
rsyslog-3.21.10.tar.gz
rsyslog-3.21.11.tar.gz

View File

@ -1,33 +0,0 @@
diff -up rsyslog-3.21.10/runtime/stringbuf.c.convVar rsyslog-3.21.10/runtime/stringbuf.c
--- rsyslog-3.21.10/runtime/stringbuf.c.convVar 2009-03-13 21:32:55.000000000 +0100
+++ rsyslog-3.21.10/runtime/stringbuf.c 2009-03-13 21:39:09.000000000 +0100
@@ -820,7 +820,7 @@ rsCStrConvertToNumber(cstr_t *pStr, numb
/* TODO: octal? hex? */
n = 0;
while(i < pStr->iStrLen && isdigit(pStr->pBuf[i])) {
- n = n * 10 + pStr->pBuf[i] * 10;
+ n = n * 10 + pStr->pBuf[i] - '0';
++i;
}
diff -up rsyslog-3.21.10/runtime/var.c.convVar rsyslog-3.21.10/runtime/var.c
--- rsyslog-3.21.10/runtime/var.c.convVar 2009-03-13 00:31:48.000000000 +0100
+++ rsyslog-3.21.10/runtime/var.c 2009-03-13 00:44:51.000000000 +0100
@@ -366,7 +366,7 @@ ConvForOperation(var_t *pThis, var_t *pO
case VARTYPE_NUMBER:
/* check if we can convert pThis to a number, if so use number format. */
iRet = ConvToNumber(pThis);
- if(iRet != RS_RET_NOT_A_NUMBER) {
+ if(iRet == RS_RET_NOT_A_NUMBER) {
CHKiRet(ConvToString(pOther));
} else {
FINALIZE; /* OK or error */
@@ -384,7 +384,7 @@ ConvForOperation(var_t *pThis, var_t *pO
break;
case VARTYPE_STR:
iRet = ConvToNumber(pOther);
- if(iRet != RS_RET_NOT_A_NUMBER) {
+ if(iRet == RS_RET_NOT_A_NUMBER) {
CHKiRet(ConvToString(pThis));
} else {
FINALIZE; /* OK or error */

View File

@ -1,39 +1,17 @@
From 5f83b6a346faca241b310c7d5be2b7eacc6239f9 Mon Sep 17 00:00:00 2001
From: Rainer Gerhards <rgerhards@adiscon.com>
Date: Thu, 23 Oct 2008 14:46:47 +0200
Subject: [PATCH] added configuration directive "HUPisRestart"
...which enables to configure HUP to be either a full restart
or "just" a leightweight way to close open files
---
ChangeLog | 3 ++
action.c | 33 ++++++++++++++++++++++
action.h | 1 +
doc/rsyslog_conf.html | 5 +++
runtime/glbl.c | 5 +++
runtime/glbl.h | 1 +
runtime/module-template.h | 31 +++++++++++++++++++-
runtime/modules.c | 5 +++
runtime/modules.h | 1 +
tools/omfile.c | 68 ++++++++++++++++++++++++++++++++------------
tools/syslogd.c | 57 ++++++++++++++++++++++++++++++++-----
11 files changed, 181 insertions(+), 29 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index db6abcf..d1bceeb 100644
--- a/ChangeLog
+++ b/ChangeLog
diff -u -p -r rsyslog-3.21.11.orig/ChangeLog rsyslog-3.21.11/ChangeLog
--- rsyslog-3.21.11.orig/ChangeLog 2009-04-13 11:50:41.000000000 +0200
+++ rsyslog-3.21.11/ChangeLog 2009-04-13 11:53:46.000000000 +0200
@@ -1,3 +1,6 @@
+- added configuration directive "HUPisRestart" which enables to configure
+ HUP to be either a full restart or "just" a leightweight way to
+ close open files.
---------------------------------------------------------------------------
Version 3.21.10 [BETA] (rgerhards), 2009-02-02
- bugfix: inconsistent use of mutex/atomic operations could cause segfault
diff --git a/action.c b/action.c
index 5c5bdbe..d257290 100644
--- a/action.c
+++ b/action.c
Version 3.21.11 [BETA] (rgerhards), 2009-04-03
- build system improvements contributed by Michael Biebl - thx!
Only in rsyslog-3.21.11: ChangeLog.orig
diff -u -p -r rsyslog-3.21.11.orig/action.c rsyslog-3.21.11/action.c
--- rsyslog-3.21.11.orig/action.c 2009-04-13 11:50:41.000000000 +0200
+++ rsyslog-3.21.11/action.c 2009-04-13 11:53:46.000000000 +0200
@@ -498,6 +498,39 @@ finalize_it:
}
#pragma GCC diagnostic warning "-Wempty-body"
@ -74,11 +52,10 @@ index 5c5bdbe..d257290 100644
/* set the action message queue mode
* TODO: probably move this into queue object, merge with MainMsgQueue!
* rgerhards, 2008-01-28
diff --git a/action.h b/action.h
index d26d15b..8d9d510 100644
--- a/action.h
+++ b/action.h
@@ -85,6 +85,7 @@ rsRetVal actionSetGlobalResumeInterval(int iNewVal);
diff -u -p -r rsyslog-3.21.11.orig/action.h rsyslog-3.21.11/action.h
--- rsyslog-3.21.11.orig/action.h 2009-04-13 11:50:41.000000000 +0200
+++ rsyslog-3.21.11/action.h 2009-04-13 11:53:46.000000000 +0200
@@ -85,6 +85,7 @@ rsRetVal actionSetGlobalResumeInterval(i
rsRetVal actionDoAction(action_t *pAction);
rsRetVal actionCallAction(action_t *pAction, msg_t *pMsg);
rsRetVal actionWriteToAction(action_t *pAction);
@ -86,10 +63,9 @@ index d26d15b..8d9d510 100644
rsRetVal actionClassInit(void);
rsRetVal addAction(action_t **ppAction, modInfo_t *pMod, void *pModData, omodStringRequest_t *pOMSR, int bSuspended);
diff --git a/doc/rsyslog_conf.html b/doc/rsyslog_conf.html
index 8947165..2698a71 100644
--- a/doc/rsyslog_conf.html
+++ b/doc/rsyslog_conf.html
diff -u -p -r rsyslog-3.21.11.orig/doc/rsyslog_conf.html rsyslog-3.21.11/doc/rsyslog_conf.html
--- rsyslog-3.21.11.orig/doc/rsyslog_conf.html 2009-04-13 11:50:41.000000000 +0200
+++ rsyslog-3.21.11/doc/rsyslog_conf.html 2009-04-13 11:53:46.000000000 +0200
@@ -175,6 +175,11 @@ default 60000 (1 minute)]</li>
<li><a href="rsconf1_gssforwardservicename.html">$GssForwardServiceName</a></li>
<li><a href="rsconf1_gsslistenservicename.html">$GssListenServiceName</a></li>
@ -102,10 +78,9 @@ index 8947165..2698a71 100644
<li><a href="rsconf1_includeconfig.html">$IncludeConfig</a></li><li>MainMsgQueueCheckpointInterval &lt;number&gt;</li>
<li>$MainMsgQueueDequeueSlowdown &lt;number&gt; [number
is timeout in <i> micro</i>seconds (1000000us is 1sec!),
diff --git a/runtime/glbl.c b/runtime/glbl.c
index 1114fcd..67509e9 100644
--- a/runtime/glbl.c
+++ b/runtime/glbl.c
diff -u -p -r rsyslog-3.21.11.orig/runtime/glbl.c rsyslog-3.21.11/runtime/glbl.c
--- rsyslog-3.21.11.orig/runtime/glbl.c 2009-04-13 11:50:41.000000000 +0200
+++ rsyslog-3.21.11/runtime/glbl.c 2009-04-13 11:53:46.000000000 +0200
@@ -52,6 +52,7 @@ DEFobjStaticHelpers
*/
static uchar *pszWorkDir = NULL;
@ -130,7 +105,7 @@ index 1114fcd..67509e9 100644
SIMP_PROP(DefPFFamily);
SIMP_PROP(DropMalPTRMsgs);
SIMP_PROP(Option_DisallowWarning);
@@ -216,6 +219,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
@@ -216,6 +219,7 @@ static rsRetVal resetConfigVariables(uch
pszWorkDir = NULL;
}
bDropMalPTRMsgs = 0;
@ -138,7 +113,7 @@ index 1114fcd..67509e9 100644
return RS_RET_OK;
}
@@ -235,6 +239,7 @@ BEGINAbstractObjClassInit(glbl, 1, OBJ_IS_CORE_MODULE) /* class, version */
@@ -235,6 +239,7 @@ BEGINAbstractObjClassInit(glbl, 1, OBJ_I
CHKiRet(regCfSysLineHdlr((uchar *)"defaultnetstreamdrivercafile", 0, eCmdHdlrGetWord, NULL, &pszDfltNetstrmDrvrCAF, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"defaultnetstreamdriverkeyfile", 0, eCmdHdlrGetWord, NULL, &pszDfltNetstrmDrvrKeyFile, NULL));
CHKiRet(regCfSysLineHdlr((uchar *)"defaultnetstreamdrivercertfile", 0, eCmdHdlrGetWord, NULL, &pszDfltNetstrmDrvrCertFile, NULL));
@ -146,11 +121,10 @@ index 1114fcd..67509e9 100644
CHKiRet(regCfSysLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, NULL));
ENDObjClassInit(glbl)
diff --git a/runtime/glbl.h b/runtime/glbl.h
index 0c83bdd..bcb9ad2 100644
--- a/runtime/glbl.h
+++ b/runtime/glbl.h
@@ -41,6 +41,7 @@ BEGINinterface(glbl) /* name must also be changed in ENDinterface macro! */
diff -u -p -r rsyslog-3.21.11.orig/runtime/glbl.h rsyslog-3.21.11/runtime/glbl.h
--- rsyslog-3.21.11.orig/runtime/glbl.h 2009-04-13 11:50:41.000000000 +0200
+++ rsyslog-3.21.11/runtime/glbl.h 2009-04-13 11:53:46.000000000 +0200
@@ -41,6 +41,7 @@ BEGINinterface(glbl) /* name must also b
dataType (*Get##name)(void); \
rsRetVal (*Set##name)(dataType);
SIMP_PROP(MaxLine, int)
@ -158,10 +132,9 @@ index 0c83bdd..bcb9ad2 100644
SIMP_PROP(DefPFFamily, int)
SIMP_PROP(DropMalPTRMsgs, int)
SIMP_PROP(Option_DisallowWarning, int)
diff --git a/runtime/module-template.h b/runtime/module-template.h
index eb39b58..6f7d877 100644
--- a/runtime/module-template.h
+++ b/runtime/module-template.h
diff -u -p -r rsyslog-3.21.11.orig/runtime/module-template.h rsyslog-3.21.11/runtime/module-template.h
--- rsyslog-3.21.11.orig/runtime/module-template.h 2009-04-13 11:50:41.000000000 +0200
+++ rsyslog-3.21.11/runtime/module-template.h 2009-04-13 11:53:46.000000000 +0200
@@ -481,6 +481,33 @@ static rsRetVal afterRun(void)\
}
@ -198,10 +171,9 @@ index eb39b58..6f7d877 100644
+
+/* vim:set ai:
*/
diff --git a/runtime/modules.c b/runtime/modules.c
index d5730ed..169d234 100644
--- a/runtime/modules.c
+++ b/runtime/modules.c
diff -u -p -r rsyslog-3.21.11.orig/runtime/modules.c rsyslog-3.21.11/runtime/modules.c
--- rsyslog-3.21.11.orig/runtime/modules.c 2009-04-13 11:50:41.000000000 +0200
+++ rsyslog-3.21.11/runtime/modules.c 2009-04-13 11:53:46.000000000 +0200
@@ -347,6 +347,7 @@ static rsRetVal
doModInit(rsRetVal (*modInit)(int, int*, rsRetVal(**)(), rsRetVal(*)(), modInfo_t*), uchar *name, void *pModHdlr)
{
@ -210,7 +182,7 @@ index d5730ed..169d234 100644
modInfo_t *pNew = NULL;
rsRetVal (*modGetType)(eModType_t *pType);
@@ -391,6 +392,10 @@ doModInit(rsRetVal (*modInit)(int, int*, rsRetVal(**)(), rsRetVal(*)(), modInfo_
@@ -391,6 +392,10 @@ doModInit(rsRetVal (*modInit)(int, int*,
CHKiRet((*pNew->modQueryEtryPt)((uchar*)"parseSelectorAct", &pNew->mod.om.parseSelectorAct));
CHKiRet((*pNew->modQueryEtryPt)((uchar*)"isCompatibleWithFeature", &pNew->isCompatibleWithFeature));
CHKiRet((*pNew->modQueryEtryPt)((uchar*)"tryResume", &pNew->tryResume));
@ -221,10 +193,9 @@ index d5730ed..169d234 100644
break;
case eMOD_LIB:
break;
diff --git a/runtime/modules.h b/runtime/modules.h
index 7d34bcf..77bc5d1 100644
--- a/runtime/modules.h
+++ b/runtime/modules.h
diff -u -p -r rsyslog-3.21.11.orig/runtime/modules.h rsyslog-3.21.11/runtime/modules.h
--- rsyslog-3.21.11.orig/runtime/modules.h 2009-04-13 11:50:41.000000000 +0200
+++ rsyslog-3.21.11/runtime/modules.h 2009-04-13 11:53:46.000000000 +0200
@@ -88,6 +88,7 @@ typedef struct modInfo_s {
rsRetVal (*tryResume)(void*);/* called to see if module actin can be resumed now */
rsRetVal (*modExit)(void); /* called before termination or module unload */
@ -233,11 +204,10 @@ index 7d34bcf..77bc5d1 100644
/* below: parse a configuration line - return if processed
* or not. If not, must be parsed to next module.
*/
diff --git a/tools/omfile.c b/tools/omfile.c
index d76e24a..5b661cb 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -244,7 +244,6 @@ static rsRetVal cflineParseOutchannel(instanceData *pData, uchar* p, omodStringR
diff -u -p -r rsyslog-3.21.11.orig/tools/omfile.c rsyslog-3.21.11/tools/omfile.c
--- rsyslog-3.21.11.orig/tools/omfile.c 2009-04-13 11:50:41.000000000 +0200
+++ rsyslog-3.21.11/tools/omfile.c 2009-04-13 11:53:46.000000000 +0200
@@ -244,7 +244,6 @@ static rsRetVal cflineParseOutchannel(in
*/
pData->f_sizeLimitCmd = (char*) pOch->cmdOnSizeLimit;
@ -259,7 +229,7 @@ index d76e24a..5b661cb 100644
{
register int i;
ASSERT(pData != NULL);
@@ -360,17 +361,36 @@ static void dynaFileFreeCache(instanceData *pData)
@@ -360,17 +361,36 @@ static void dynaFileFreeCache(instanceDa
for(i = 0 ; i < pData->iCurrCacheSize ; ++i) {
dynaFileDelCacheEntry(pData->dynCache, i, 1);
}
@ -297,7 +267,7 @@ index d76e24a..5b661cb 100644
if(access((char*)newFileName, F_OK) == 0) {
/* file already exists */
pData->fd = open((char*) newFileName, O_WRONLY|O_APPEND|O_CREAT|O_NOCTTY,
@@ -413,6 +433,12 @@ static void prepareFile(instanceData *pData, uchar *newFileName)
@@ -413,6 +433,12 @@ static void prepareFile(instanceData *pD
}
}
}
@ -310,7 +280,7 @@ index d76e24a..5b661cb 100644
}
@@ -537,6 +563,8 @@ static rsRetVal writeFile(uchar **ppString, unsigned iMsgOpts, instanceData *pDa
@@ -537,6 +563,8 @@ static rsRetVal writeFile(uchar **ppStri
if(pData->bDynamicName) {
if(prepareDynFile(pData, ppString[1], iMsgOpts) != 0)
ABORT_FINALIZE(RS_RET_ERR);
@ -357,7 +327,7 @@ index d76e24a..5b661cb 100644
if (strcmp((char*) p, _PATH_CONSOLE) == 0)
pData->fileType = eTypeCONSOLE;
break;
@@ -815,6 +830,20 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
@@ -815,6 +830,20 @@ static rsRetVal resetConfigVariables(uch
}
@ -386,11 +356,10 @@ index d76e24a..5b661cb 100644
ENDqueryEtryPt
diff --git a/tools/syslogd.c b/tools/syslogd.c
index b0d6fa2..98c7882 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -219,7 +219,7 @@ static char *PidFile = _PATH_LOGPID; /* read-only after startup */
diff -u -p -r rsyslog-3.21.11.orig/tools/syslogd.c rsyslog-3.21.11/tools/syslogd.c
--- rsyslog-3.21.11.orig/tools/syslogd.c 2009-04-13 11:50:41.000000000 +0200
+++ rsyslog-3.21.11/tools/syslogd.c 2009-04-13 11:53:46.000000000 +0200
@@ -219,7 +219,7 @@ static char *PidFile = _PATH_LOGPID; /*
static pid_t myPid; /* our pid for use in self-generated messages, e.g. on startup */
/* mypid is read-only after the initial fork() */
@ -399,7 +368,7 @@ index b0d6fa2..98c7882 100644
static int bParseHOSTNAMEandTAG = 1; /* global config var: should the hostname and tag be
* parsed inside message - rgerhards, 2006-03-13 */
@@ -2525,13 +2525,13 @@ static rsRetVal setMainMsgQueType(void __attribute__((unused)) *pVal, uchar *psz
@@ -2525,13 +2525,13 @@ static rsRetVal setMainMsgQueType(void _
* 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
* doing this during a signal handler. Instead this function simply sets
@ -480,6 +449,3 @@ index b0d6fa2..98c7882 100644
continue;
}
}
--
1.5.5.6

View File

@ -2,8 +2,8 @@
Summary: Enhanced system logging and kernel message trapping daemons
Name: rsyslog
Version: 3.21.10
Release: 4%{?dist}
Version: 3.21.11
Release: 1%{?dist}
License: GPLv3+
Group: System Environment/Daemons
URL: http://www.rsyslog.com/
@ -12,8 +12,7 @@ Source1: rsyslog.init
Source2: rsyslog.conf
Source3: rsyslog.sysconfig
Source4: rsyslog.log
Patch0: rsyslog-3.21.10-convVar.patch
Patch1: rsyslog-3.21.10-HUPisRestart.patch
Patch0: rsyslog-3.21.11-HUPisRestart.patch
BuildRequires: zlib-devel
BuildRequires: autoconf automake
Requires: logrotate >= 3.5.2
@ -89,8 +88,7 @@ IETF standard protocol.
%prep
%setup -q
%patch0 -p1 -b .convVar
%patch1 -p1 -b .HUPisRestart
%patch0 -p1 -b .HUPisRestart
%build
export CFLAGS="$RPM_OPT_FLAGS -DSYSLOGD_PIDNAME=\\\"syslogd.pid\\\""
@ -196,6 +194,9 @@ fi
%{_libdir}/rsyslog/lmnsd_gtls.so
%changelog
* Mon Apr 13 2009 Tomas Heinrich <theinric@redhat.com> 3.21.11-1
- upgrade
* Tue Mar 31 2009 Lubomir Rintel <lkundrak@v3.sk> 3.21.10-4
- Backport HUPisRestart option

View File

@ -1 +1 @@
c3354921ccb1d83d00199212d35e1d43 rsyslog-3.21.10.tar.gz
fd796e15e780c954d43adc9680378403 rsyslog-3.21.11.tar.gz