Accepting request 142508 from Base:System
Update to 7.2.3 (v7-stable) a release providing important fixes Merged fixes for unreliable kernel timestamp (bnc#783967) Require syslog-service >= 2.0 on 12.3, otherwise < 2.0 (bnc#788330) imuxsock: do not log EAGAIN in nonblocking recvfrom (bnc#734672) OBS-URL: https://build.opensuse.org/request/show/142508 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rsyslog?expand=0&rev=60
This commit is contained in:
commit
b2283ff731
392
0001-imklog-kernel-timestamp-parsing.bnc783967.patch
Normal file
392
0001-imklog-kernel-timestamp-parsing.bnc783967.patch
Normal file
@ -0,0 +1,392 @@
|
|||||||
|
From 4983890fa26a6c6443a1fec591c47956be8a5567 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Rainer Gerhards <rgerhards@adiscon.com>
|
||||||
|
Date: Wed, 17 Oct 2012 17:17:43 +0200
|
||||||
|
Subject: [PATCH 1/5] imklog: add paramter "keepkerneltimestamp"
|
||||||
|
|
||||||
|
Thanks to Marius Tomaschweski for the suggestion and a patch (for v5)
|
||||||
|
that this commit bases on.
|
||||||
|
---
|
||||||
|
doc/imklog.html | 6 +++---
|
||||||
|
plugins/imklog/bsd.c | 25 ++++++++++++-------------
|
||||||
|
plugins/imklog/imklog.c | 5 +++++
|
||||||
|
plugins/imklog/imklog.h | 1 +
|
||||||
|
4 Dateien geändert, 21 Zeilen hinzugefügt(+), 16 Zeilen entfernt(-)
|
||||||
|
|
||||||
|
diff --git a/doc/imklog.html b/doc/imklog.html
|
||||||
|
index 2e3b3bc..6ccdb5b 100644
|
||||||
|
--- a/doc/imklog.html
|
||||||
|
+++ b/doc/imklog.html
|
||||||
|
@@ -1,8 +1,8 @@
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||||
|
<html><head>
|
||||||
|
-<meta http-equiv="Content-Language" content="en"><title>Kernel Log Input Module (imklog)</title>
|
||||||
|
-
|
||||||
|
+<title>Kernel Log Input Module (imklog)</title>
|
||||||
|
</head>
|
||||||
|
+
|
||||||
|
<body>
|
||||||
|
<a href="rsyslog_conf_modules.html">back</a>
|
||||||
|
|
||||||
|
@@ -85,7 +85,7 @@ is needed to start pulling kernel messages.<br>
|
||||||
|
<p><font size="2">This documentation is part of the
|
||||||
|
<a href="http://www.rsyslog.com/">rsyslog</a>
|
||||||
|
project.<br>
|
||||||
|
-Copyright © 2008-2009 by <a href="http://www.gerhards.net/rainer">Rainer
|
||||||
|
+Copyright © 2008-2012 by <a href="http://www.gerhards.net/rainer">Rainer
|
||||||
|
Gerhards</a> and
|
||||||
|
<a href="http://www.adiscon.com/">Adiscon</a>.
|
||||||
|
Released under the GNU GPL version 3 or higher.</font></p>
|
||||||
|
diff --git a/plugins/imklog/bsd.c b/plugins/imklog/bsd.c
|
||||||
|
index d4f9f77..ad194b5 100644
|
||||||
|
--- a/plugins/imklog/bsd.c
|
||||||
|
+++ b/plugins/imklog/bsd.c
|
||||||
|
@@ -58,9 +58,6 @@ static int fklog = -1; /* kernel log fd */
|
||||||
|
#ifdef OS_LINUX
|
||||||
|
/* submit a message to imklog Syslog() API. In this function, we check if
|
||||||
|
* a kernel timestamp is present and, if so, extract and strip it.
|
||||||
|
- * Note: this is an extra processing step. We should revisit the whole
|
||||||
|
- * idea in v6 and remove all that old stuff that we do not longer need
|
||||||
|
- * (like symbol resolution). <-- TODO
|
||||||
|
* Note that this is heavily Linux specific and thus is not compiled or
|
||||||
|
* used for BSD.
|
||||||
|
* Special thanks to Lennart Poettering for suggesting on how to convert
|
||||||
|
@@ -73,7 +70,7 @@ static int fklog = -1; /* kernel log fd */
|
||||||
|
* rgerhards, 2011-06-24
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
-submitSyslog(int pri, uchar *buf)
|
||||||
|
+submitSyslog(modConfData_t *pModConf, int pri, uchar *buf)
|
||||||
|
{
|
||||||
|
long secs;
|
||||||
|
long nsecs;
|
||||||
|
@@ -119,8 +116,10 @@ submitSyslog(int pri, uchar *buf)
|
||||||
|
|
||||||
|
/* we have a timestamp */
|
||||||
|
DBGPRINTF("kernel timestamp is %ld %ld\n", secs, nsecs);
|
||||||
|
- bufsize= strlen((char*)buf);
|
||||||
|
- memmove(buf+3, buf+i, bufsize - i + 1);
|
||||||
|
+ if(!pModConf->bKeepKernelStamp) {
|
||||||
|
+ bufsize= strlen((char*)buf);
|
||||||
|
+ memmove(buf+3, buf+i, bufsize - i + 1);
|
||||||
|
+ }
|
||||||
|
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &monotonic);
|
||||||
|
clock_gettime(CLOCK_REALTIME, &realtime);
|
||||||
|
@@ -146,7 +145,7 @@ done:
|
||||||
|
}
|
||||||
|
#else /* now comes the BSD "code" (just a shim) */
|
||||||
|
static void
|
||||||
|
-submitSyslog(int pri, uchar *buf)
|
||||||
|
+submitSyslog(modConfData_t *pModConf, int pri, uchar *buf)
|
||||||
|
{
|
||||||
|
Syslog(pri, buf, NULL);
|
||||||
|
}
|
||||||
|
@@ -196,7 +195,7 @@ finalize_it:
|
||||||
|
/* Read kernel log while data are available, split into lines.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
-readklog(void)
|
||||||
|
+readklog(modConfData_t *pModConf)
|
||||||
|
{
|
||||||
|
char *p, *q;
|
||||||
|
int len, i;
|
||||||
|
@@ -238,18 +237,18 @@ readklog(void)
|
||||||
|
|
||||||
|
for (p = (char*)pRcv; (q = strchr(p, '\n')) != NULL; p = q + 1) {
|
||||||
|
*q = '\0';
|
||||||
|
- submitSyslog(LOG_INFO, (uchar*) p);
|
||||||
|
+ submitSyslog(pModConf, LOG_INFO, (uchar*) p);
|
||||||
|
}
|
||||||
|
len = strlen(p);
|
||||||
|
if (len >= iMaxLine - 1) {
|
||||||
|
- submitSyslog(LOG_INFO, (uchar*)p);
|
||||||
|
+ submitSyslog(pModConf, LOG_INFO, (uchar*)p);
|
||||||
|
len = 0;
|
||||||
|
}
|
||||||
|
if(len > 0)
|
||||||
|
memmove(pRcv, p, len + 1);
|
||||||
|
}
|
||||||
|
if (len > 0)
|
||||||
|
- submitSyslog(LOG_INFO, pRcv);
|
||||||
|
+ submitSyslog(pModConf, LOG_INFO, pRcv);
|
||||||
|
|
||||||
|
if(pRcv != NULL && (size_t) iMaxLine >= sizeof(bufRcv) - 1)
|
||||||
|
free(pRcv);
|
||||||
|
@@ -278,10 +277,10 @@ rsRetVal klogAfterRun(modConfData_t *pModConf)
|
||||||
|
* "message pull" mechanism.
|
||||||
|
* rgerhards, 2008-04-09
|
||||||
|
*/
|
||||||
|
-rsRetVal klogLogKMsg(modConfData_t __attribute__((unused)) *pModConf)
|
||||||
|
+rsRetVal klogLogKMsg(modConfData_t *pModConf)
|
||||||
|
{
|
||||||
|
DEFiRet;
|
||||||
|
- readklog();
|
||||||
|
+ readklog(pModConf);
|
||||||
|
RETiRet;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c
|
||||||
|
index 9332370..2897d76 100644
|
||||||
|
--- a/plugins/imklog/imklog.c
|
||||||
|
+++ b/plugins/imklog/imklog.c
|
||||||
|
@@ -91,6 +91,7 @@ static int bLegacyCnfModGlobalsPermitted;/* are legacy module-global config para
|
||||||
|
static struct cnfparamdescr modpdescr[] = {
|
||||||
|
{ "logpath", eCmdHdlrGetWord, 0 },
|
||||||
|
{ "permitnonkernelfacility", eCmdHdlrBinary, 0 },
|
||||||
|
+ { "keepkerneltimestamp", eCmdHdlrBinary, 0 },
|
||||||
|
{ "consoleloglevel", eCmdHdlrInt, 0 },
|
||||||
|
{ "internalmsgfacility", eCmdHdlrFacility, 0 }
|
||||||
|
};
|
||||||
|
@@ -289,6 +290,7 @@ CODESTARTbeginCnfLoad
|
||||||
|
pModConf->pszPath = NULL;
|
||||||
|
pModConf->bPermitNonKernel = 0;
|
||||||
|
pModConf->console_log_level = -1;
|
||||||
|
+ pModConf->bKeepKernelStamp = 0;
|
||||||
|
pModConf->iFacilIntMsg = klogFacilIntMsg();
|
||||||
|
loadModConf->configSetViaV2Method = 0;
|
||||||
|
bLegacyCnfModGlobalsPermitted = 1;
|
||||||
|
@@ -322,6 +324,8 @@ CODESTARTsetModCnf
|
||||||
|
loadModConf->bPermitNonKernel = (int) pvals[i].val.d.n;
|
||||||
|
} else if(!strcmp(modpblk.descr[i].name, "consoleloglevel")) {
|
||||||
|
loadModConf->console_log_level= (int) pvals[i].val.d.n;
|
||||||
|
+ } else if(!strcmp(modpblk.descr[i].name, "keepkerneltimestamp")) {
|
||||||
|
+ loadModConf->bKeepKernelStamp = (int) pvals[i].val.d.n;
|
||||||
|
} else if(!strcmp(modpblk.descr[i].name, "internalmsgfacility")) {
|
||||||
|
loadModConf->iFacilIntMsg = (int) pvals[i].val.d.n;
|
||||||
|
} else {
|
||||||
|
@@ -347,6 +351,7 @@ CODESTARTendCnfLoad
|
||||||
|
loadModConf->bPermitNonKernel = cs.bPermitNonKernel;
|
||||||
|
loadModConf->iFacilIntMsg = cs.iFacilIntMsg;
|
||||||
|
loadModConf->console_log_level = cs.console_log_level;
|
||||||
|
+ loadModConf->bKeepKernelStamp = 0;
|
||||||
|
if((cs.pszPath == NULL) || (cs.pszPath[0] == '\0')) {
|
||||||
|
loadModConf->pszPath = NULL;
|
||||||
|
if(cs.pszPath != NULL)
|
||||||
|
diff --git a/plugins/imklog/imklog.h b/plugins/imklog/imklog.h
|
||||||
|
index acfb50a..6cd97c3 100644
|
||||||
|
--- a/plugins/imklog/imklog.h
|
||||||
|
+++ b/plugins/imklog/imklog.h
|
||||||
|
@@ -36,6 +36,7 @@ struct modConfData_s {
|
||||||
|
uchar *pszPath;
|
||||||
|
int console_log_level;
|
||||||
|
sbool bPermitNonKernel;
|
||||||
|
+ sbool bKeepKernelStamp; /* keep kernel timestamp instead of interpreting it */
|
||||||
|
sbool configSetViaV2Method;
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
||||||
|
|
||||||
|
From 24e74d95c03bdf44f40ad41a4f6d4fabef0bca2c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marius Tomaschewski <mt@suse.de>
|
||||||
|
Date: Wed, 21 Nov 2012 13:47:19 +0100
|
||||||
|
Subject: [PATCH 2/5] imklog: added paramter "parseKernelTimestamp"
|
||||||
|
|
||||||
|
When enabled, kernel message [timestamp] is converted for message time.
|
||||||
|
Default is to use receive time as in 5.8.x and before, because the clock
|
||||||
|
used to create the timestamp is not supposed to be as accurate as the
|
||||||
|
monotonic clock (depends on hardware and kernel) resulting in differences
|
||||||
|
between kernel and system messages which occurred at same time.
|
||||||
|
---
|
||||||
|
plugins/imklog/bsd.c | 3 +++
|
||||||
|
plugins/imklog/imklog.c | 5 +++++
|
||||||
|
plugins/imklog/imklog.h | 3 ++-
|
||||||
|
3 Dateien geändert, 10 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/imklog/bsd.c b/plugins/imklog/bsd.c
|
||||||
|
index ad194b5..0930d61 100644
|
||||||
|
--- a/plugins/imklog/bsd.c
|
||||||
|
+++ b/plugins/imklog/bsd.c
|
||||||
|
@@ -82,6 +82,9 @@ submitSyslog(modConfData_t *pModConf, int pri, uchar *buf)
|
||||||
|
struct timeval tv;
|
||||||
|
struct timeval *tp = NULL;
|
||||||
|
|
||||||
|
+ if(!pModConf->bParseKernelStamp)
|
||||||
|
+ goto done;
|
||||||
|
+
|
||||||
|
if(buf[3] != '[')
|
||||||
|
goto done;
|
||||||
|
DBGPRINTF("imklog: kernel timestamp detected, extracting it\n");
|
||||||
|
diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c
|
||||||
|
index 2897d76..8471daa 100644
|
||||||
|
--- a/plugins/imklog/imklog.c
|
||||||
|
+++ b/plugins/imklog/imklog.c
|
||||||
|
@@ -91,6 +91,7 @@ static int bLegacyCnfModGlobalsPermitted;/* are legacy module-global config para
|
||||||
|
static struct cnfparamdescr modpdescr[] = {
|
||||||
|
{ "logpath", eCmdHdlrGetWord, 0 },
|
||||||
|
{ "permitnonkernelfacility", eCmdHdlrBinary, 0 },
|
||||||
|
+ { "parsekerneltimestamp", eCmdHdlrBinary, 0 },
|
||||||
|
{ "keepkerneltimestamp", eCmdHdlrBinary, 0 },
|
||||||
|
{ "consoleloglevel", eCmdHdlrInt, 0 },
|
||||||
|
{ "internalmsgfacility", eCmdHdlrFacility, 0 }
|
||||||
|
@@ -290,6 +291,7 @@ CODESTARTbeginCnfLoad
|
||||||
|
pModConf->pszPath = NULL;
|
||||||
|
pModConf->bPermitNonKernel = 0;
|
||||||
|
pModConf->console_log_level = -1;
|
||||||
|
+ pModConf->bParseKernelStamp = 0;
|
||||||
|
pModConf->bKeepKernelStamp = 0;
|
||||||
|
pModConf->iFacilIntMsg = klogFacilIntMsg();
|
||||||
|
loadModConf->configSetViaV2Method = 0;
|
||||||
|
@@ -324,6 +326,8 @@ CODESTARTsetModCnf
|
||||||
|
loadModConf->bPermitNonKernel = (int) pvals[i].val.d.n;
|
||||||
|
} else if(!strcmp(modpblk.descr[i].name, "consoleloglevel")) {
|
||||||
|
loadModConf->console_log_level= (int) pvals[i].val.d.n;
|
||||||
|
+ } else if(!strcmp(modpblk.descr[i].name, "parsekerneltimestamp")) {
|
||||||
|
+ loadModConf->bParseKernelStamp = (int) pvals[i].val.d.n;
|
||||||
|
} else if(!strcmp(modpblk.descr[i].name, "keepkerneltimestamp")) {
|
||||||
|
loadModConf->bKeepKernelStamp = (int) pvals[i].val.d.n;
|
||||||
|
} else if(!strcmp(modpblk.descr[i].name, "internalmsgfacility")) {
|
||||||
|
@@ -351,6 +355,7 @@ CODESTARTendCnfLoad
|
||||||
|
loadModConf->bPermitNonKernel = cs.bPermitNonKernel;
|
||||||
|
loadModConf->iFacilIntMsg = cs.iFacilIntMsg;
|
||||||
|
loadModConf->console_log_level = cs.console_log_level;
|
||||||
|
+ loadModConf->bParseKernelStamp = 0;
|
||||||
|
loadModConf->bKeepKernelStamp = 0;
|
||||||
|
if((cs.pszPath == NULL) || (cs.pszPath[0] == '\0')) {
|
||||||
|
loadModConf->pszPath = NULL;
|
||||||
|
diff --git a/plugins/imklog/imklog.h b/plugins/imklog/imklog.h
|
||||||
|
index 6cd97c3..6022f5e 100644
|
||||||
|
--- a/plugins/imklog/imklog.h
|
||||||
|
+++ b/plugins/imklog/imklog.h
|
||||||
|
@@ -36,7 +36,8 @@ struct modConfData_s {
|
||||||
|
uchar *pszPath;
|
||||||
|
int console_log_level;
|
||||||
|
sbool bPermitNonKernel;
|
||||||
|
- sbool bKeepKernelStamp; /* keep kernel timestamp instead of interpreting it */
|
||||||
|
+ sbool bParseKernelStamp; /* if try to parse kernel timestamps for message time */
|
||||||
|
+ sbool bKeepKernelStamp; /* keep the kernel timestamp in the message */
|
||||||
|
sbool configSetViaV2Method;
|
||||||
|
};
|
||||||
|
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
||||||
|
|
||||||
|
From 64bab984a1f7deece7c7b32b056c68b56b71ee77 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marius Tomaschewski <mt@suse.de>
|
||||||
|
Date: Wed, 21 Nov 2012 15:41:12 +0100
|
||||||
|
Subject: [PATCH 3/5] imklog: allow $klogParse- and KeepKernelTimestamp
|
||||||
|
|
||||||
|
---
|
||||||
|
plugins/imklog/imklog.c | 14 ++++++++++++--
|
||||||
|
1 Datei geändert, 12 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-)
|
||||||
|
|
||||||
|
diff --git a/plugins/imklog/imklog.c b/plugins/imklog/imklog.c
|
||||||
|
index 8471daa..0aec108 100644
|
||||||
|
--- a/plugins/imklog/imklog.c
|
||||||
|
+++ b/plugins/imklog/imklog.c
|
||||||
|
@@ -80,6 +80,8 @@ typedef struct configSettings_s {
|
||||||
|
int iFacilIntMsg; /* the facility to use for internal messages (set by driver) */
|
||||||
|
uchar *pszPath;
|
||||||
|
int console_log_level; /* still used for BSD */
|
||||||
|
+ int bParseKernelStamp;
|
||||||
|
+ int bKeepKernelStamp;
|
||||||
|
} configSettings_t;
|
||||||
|
static configSettings_t cs;
|
||||||
|
|
||||||
|
@@ -112,6 +114,8 @@ static inline void
|
||||||
|
initConfigSettings(void)
|
||||||
|
{
|
||||||
|
cs.bPermitNonKernel = 0;
|
||||||
|
+ cs.bParseKernelStamp = 0;
|
||||||
|
+ cs.bKeepKernelStamp = 0;
|
||||||
|
cs.console_log_level = -1;
|
||||||
|
cs.pszPath = NULL;
|
||||||
|
cs.iFacilIntMsg = klogFacilIntMsg();
|
||||||
|
@@ -355,8 +359,8 @@ CODESTARTendCnfLoad
|
||||||
|
loadModConf->bPermitNonKernel = cs.bPermitNonKernel;
|
||||||
|
loadModConf->iFacilIntMsg = cs.iFacilIntMsg;
|
||||||
|
loadModConf->console_log_level = cs.console_log_level;
|
||||||
|
- loadModConf->bParseKernelStamp = 0;
|
||||||
|
- loadModConf->bKeepKernelStamp = 0;
|
||||||
|
+ loadModConf->bParseKernelStamp = cs.bParseKernelStamp;;
|
||||||
|
+ loadModConf->bKeepKernelStamp = cs.bKeepKernelStamp;
|
||||||
|
if((cs.pszPath == NULL) || (cs.pszPath[0] == '\0')) {
|
||||||
|
loadModConf->pszPath = NULL;
|
||||||
|
if(cs.pszPath != NULL)
|
||||||
|
@@ -431,6 +435,8 @@ ENDqueryEtryPt
|
||||||
|
static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unused)) *pVal)
|
||||||
|
{
|
||||||
|
cs.bPermitNonKernel = 0;
|
||||||
|
+ cs.bParseKernelStamp = 0;
|
||||||
|
+ cs.bKeepKernelStamp = 0;
|
||||||
|
if(cs.pszPath != NULL) {
|
||||||
|
free(cs.pszPath);
|
||||||
|
cs.pszPath = NULL;
|
||||||
|
@@ -468,6 +474,10 @@ CODEmodInit_QueryRegCFSLineHdlr
|
||||||
|
NULL, NULL, STD_LOADABLE_MODULE_ID));
|
||||||
|
CHKiRet(regCfSysLineHdlr2((uchar *)"klogpermitnonkernelfacility", 0, eCmdHdlrBinary,
|
||||||
|
NULL, &cs.bPermitNonKernel, STD_LOADABLE_MODULE_ID, &bLegacyCnfModGlobalsPermitted));
|
||||||
|
+ CHKiRet(regCfSysLineHdlr2((uchar *)"klogparsekerneltimestamp", 0, eCmdHdlrBinary,
|
||||||
|
+ NULL, &cs.bParseKernelStamp, STD_LOADABLE_MODULE_ID, &bLegacyCnfModGlobalsPermitted));
|
||||||
|
+ CHKiRet(regCfSysLineHdlr2((uchar *)"klogkeepkerneltimestamp", 0, eCmdHdlrBinary,
|
||||||
|
+ NULL, &cs.bKeepKernelStamp, STD_LOADABLE_MODULE_ID, &bLegacyCnfModGlobalsPermitted));
|
||||||
|
CHKiRet(regCfSysLineHdlr2((uchar *)"klogconsoleloglevel", 0, eCmdHdlrInt,
|
||||||
|
NULL, &cs.console_log_level, STD_LOADABLE_MODULE_ID, &bLegacyCnfModGlobalsPermitted));
|
||||||
|
CHKiRet(regCfSysLineHdlr2((uchar *)"kloginternalmsgfacility", 0, eCmdHdlrFacility,
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
||||||
|
|
||||||
|
From 3ce3f458f4ac088d3e650ad939500e72b35d1758 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marius Tomaschewski <mt@suse.de>
|
||||||
|
Date: Wed, 21 Nov 2012 13:47:44 +0100
|
||||||
|
Subject: [PATCH 4/5] imklog: convert to kmsg timestamp's us to ns first
|
||||||
|
|
||||||
|
---
|
||||||
|
plugins/imklog/bsd.c | 1 +
|
||||||
|
1 Datei geändert, 1 Zeile hinzugefügt(+)
|
||||||
|
|
||||||
|
diff --git a/plugins/imklog/bsd.c b/plugins/imklog/bsd.c
|
||||||
|
index 0930d61..2dc7527 100644
|
||||||
|
--- a/plugins/imklog/bsd.c
|
||||||
|
+++ b/plugins/imklog/bsd.c
|
||||||
|
@@ -111,6 +111,7 @@ submitSyslog(modConfData_t *pModConf, int pri, uchar *buf)
|
||||||
|
nsecs = nsecs * 10 + buf[i] - '0';
|
||||||
|
++i;
|
||||||
|
}
|
||||||
|
+ nsecs *= 1000; /* convert to ns first */
|
||||||
|
if(buf[i] != ']') {
|
||||||
|
DBGPRINTF("no trailing ']' --> no kernel timestamp\n");
|
||||||
|
goto done; /* no TS! */
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
||||||
|
|
||||||
|
From f8565e506fe01839035d40e12c2d13c1d15da45f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marius Tomaschewski <mt@suse.de>
|
||||||
|
Date: Thu, 22 Nov 2012 15:05:52 +0100
|
||||||
|
Subject: [PATCH 5/5] imklog: added $klogParse/KeepKernelTimestamp docs
|
||||||
|
|
||||||
|
---
|
||||||
|
doc/imklog.html | 13 +++++++++++++
|
||||||
|
1 Datei geändert, 13 Zeilen hinzugefügt(+)
|
||||||
|
|
||||||
|
diff --git a/doc/imklog.html b/doc/imklog.html
|
||||||
|
index 6ccdb5b..294e2b7 100644
|
||||||
|
--- a/doc/imklog.html
|
||||||
|
+++ b/doc/imklog.html
|
||||||
|
@@ -65,6 +65,19 @@ Linux only, ignored on other platforms (but may be specified)</li>
|
||||||
|
former klogd -2 option<br>
|
||||||
|
Linux only, ignored on other platforms (but may be specified)<br style="font-weight: bold;">
|
||||||
|
</li>
|
||||||
|
+<li><b>$klogParseKernelTimestamp</b> [on/<b>off</b>]<br>
|
||||||
|
+If enabled and the kernel creates a timestamp for its log messages, this timestamp will be
|
||||||
|
+parsed and converted into regular message time instead to use the receive time of the kernel
|
||||||
|
+message (as in 5.8.x and before). Default is to not parse the kernel timestamp, because the
|
||||||
|
+clock used by the kernel to create the timestamps is not supposed to be as accurate as the
|
||||||
|
+monotonic clock required to convert it. Depending on the hardware and kernel, it can result
|
||||||
|
+in message time differences between kernel and system messages which occurred at same time.
|
||||||
|
+</li>
|
||||||
|
+<li><b>$klogKeepKernelTimestamp</b> [on/<b>off</b>]<br>
|
||||||
|
+If enabled, this option causes to keep the [timestamp] provided by the kernel at the begin
|
||||||
|
+of in each message rather than to remove it, when it could be parsed and converted into
|
||||||
|
+local time for use as regular message time. Only used, when $klogParseKernelTimestamp is on.
|
||||||
|
+</li>
|
||||||
|
</ul>
|
||||||
|
<b>Caveats/Known Bugs:</b>
|
||||||
|
<p>This is obviously platform specific and requires platform
|
||||||
|
--
|
||||||
|
1.7.10.4
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:ba0aee5cd2c60192ca1f026817767aa66056c7f0fa78eb5b15b9394734e68e3f
|
|
||||||
size 2696341
|
|
3
rsyslog-7.2.3.tar.gz
Normal file
3
rsyslog-7.2.3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f9190acdf902a22338b4b0bc43e37cd863881068486f071cba907446c3e35b97
|
||||||
|
size 2701840
|
35
rsyslog-service-prepare.in
Normal file
35
rsyslog-service-prepare.in
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
test -s "/etc/sysconfig/syslog" && \
|
||||||
|
. "/etc/sysconfig/syslog"
|
||||||
|
|
||||||
|
run_dir="RUN_DIR"
|
||||||
|
cfg_file="ADDITIONAL_SOCKETS"
|
||||||
|
|
||||||
|
umask 0022
|
||||||
|
/bin/mkdir -p -m 0755 "${run_dir}"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Prepare include with sockets in chroot's
|
||||||
|
#
|
||||||
|
> "${cfg_file}"
|
||||||
|
for variable in ${!SYSLOGD_ADDITIONAL_SOCKET*}; do
|
||||||
|
eval value=\$$variable
|
||||||
|
test -z "$value" && continue
|
||||||
|
test -d "${value%/*}" || continue
|
||||||
|
echo "\$AddUnixListenSocket $value"
|
||||||
|
done >> "${cfg_file}"
|
||||||
|
|
||||||
|
#
|
||||||
|
# make sure xconsole exists and is a pipe
|
||||||
|
#
|
||||||
|
if test -e /dev/xconsole -a ! -p /dev/xconsole ; then
|
||||||
|
/bin/rm -f /dev/xconsole
|
||||||
|
fi
|
||||||
|
if test ! -e /dev/xconsole ; then
|
||||||
|
/bin/mknod -m 0600 /dev/xconsole p
|
||||||
|
/bin/chown root:tty /dev/xconsole
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
115
rsyslog.changes
115
rsyslog.changes
@ -1,3 +1,118 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Nov 22 14:12:36 UTC 2012 - mt@suse.com
|
||||||
|
|
||||||
|
- Update to 7.2.3 (v7-stable) a release providing following fixes:
|
||||||
|
- regression fix: rsyslogd terminated when wild-card $IncludeConfig did not
|
||||||
|
find actual include files. For example, if this directive is present:
|
||||||
|
$IncludeConfig /etc/rsyslog.d/*.conf
|
||||||
|
and there are no *.conf files in /etc/rsyslog.d (but rsyslog.d exists),
|
||||||
|
rsyslogd will emit an error message and terminate. Previous (and expected)
|
||||||
|
behaviour is that an empty file set is no problem. HOWEVER, if the
|
||||||
|
directory itself does not exist, this is flagged as an error and will
|
||||||
|
load to termination (no startup).
|
||||||
|
Unfortunately, this is often the case by default in many distros, so this
|
||||||
|
actually prevents rsyslog startup.
|
||||||
|
- doc improvements
|
||||||
|
- enabled to build without libuuid, at loss of uuid functionality
|
||||||
|
this enables smoother builds on older systems that do not support
|
||||||
|
libuuid. Loss of functionality should usually not matter too much as
|
||||||
|
uuid support has only recently been added and is very seldom used.
|
||||||
|
- bugfix: omfwd did not properly support "template" parameter
|
||||||
|
- bugfix: potential segfault when re_match() function was used
|
||||||
|
Thanks to oxpa for the patch.
|
||||||
|
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=371
|
||||||
|
- bugfix: potential abort of imtcp on rsyslogd shutdown
|
||||||
|
- bugfix: imzmq3 segfault with PULL subscription
|
||||||
|
Thanks to Martin Nilsson for the patch.
|
||||||
|
- bugfix: improper handling of backslash in string-type template()s
|
||||||
|
- bugfix: leading quote (") in string-type template() lead to thight loop
|
||||||
|
on startup
|
||||||
|
- bugfix: no error msg on invalid field option in legacy/string template
|
||||||
|
- bugfix: potential segfault due to invalid param handling in comparisons
|
||||||
|
This could happen in RainerScript comparisons (like contains); in some
|
||||||
|
cases an unitialized variable was accessed, which could lead to an
|
||||||
|
invalid free and in turn to a segfault.
|
||||||
|
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=372
|
||||||
|
Thanks to Georgi Georgiev for reporting this bug and his great help
|
||||||
|
in solving it.
|
||||||
|
- bugfix: no error msg on unreadable $IncludeConfig path
|
||||||
|
- bugfix: $IncludeConfig did not correctly process directories
|
||||||
|
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=376
|
||||||
|
The testbench was also enhanced to check for these cases.
|
||||||
|
Thanks to Georgi Georgiev for the bug report.
|
||||||
|
- bugfix: make rsyslog compile on kfreebsd again
|
||||||
|
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=380
|
||||||
|
Thanks to Guillem Jover for the patch.
|
||||||
|
- bugfix: garbled message if field name was used with jsonf property option
|
||||||
|
The length for the field name was invalidly computed, resulting in either
|
||||||
|
truncated field names or including extra random data. If the random data
|
||||||
|
contained NULs, the rest of the message became unreadable.
|
||||||
|
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=374
|
||||||
|
- bugfix: potential segfault at startup with property-based filter
|
||||||
|
If the property name was followed by a space before the comma, rsyslogd
|
||||||
|
aborted on startup. Note that no segfault could happen if the initial
|
||||||
|
startup went well (this was a problem with the config parser).
|
||||||
|
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=381
|
||||||
|
- bugfix: imfile discarded some file parts
|
||||||
|
File lines that were incomplete (LF missing) *at the time imfile polled
|
||||||
|
the file* were partially discarded. That part of the line that was read
|
||||||
|
without the LF was discarded, and the rest of the line was submitted in
|
||||||
|
the next polling cycle. This is now changed so that the partial content
|
||||||
|
is saved until the complete line is read. Note that the patch affects
|
||||||
|
only read mode 0.
|
||||||
|
Thanks to Milan Bartos for providing the base idea for the solution.
|
||||||
|
- Merged also fixes for unreliable kernel timestamp regression (bnc#783967),
|
||||||
|
which will be picked up in a later v7-stable release:
|
||||||
|
- imklog: added $klogParseKernelTimestamp option (default off),
|
||||||
|
wich reverts to the 5.8.x behavior to use receive time for the
|
||||||
|
kernel messages instead to try parse and convert the kernel
|
||||||
|
timestamp, what is not reliable on some hardware (intel i7/Xeon).
|
||||||
|
- imklog: added $klogKeepKernelTimestamp option (default off),
|
||||||
|
causing to not remove the kernel timestamp from the message
|
||||||
|
after a successful conversion.
|
||||||
|
- imklog: fixed a conversion bug causing a <1sec incorrectness
|
||||||
|
of the message time when the kernel timestamp is parsed.
|
||||||
|
- Removed {} arround RSYSLOG_PARAMS variable in service file. systemd
|
||||||
|
seems sometimes to not like it any more (bnc#788330).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 20 11:44:16 UTC 2012 - mt@suse.com
|
||||||
|
|
||||||
|
- Require syslog-service >= 2.0 on 12.3, otherwise < 2.0, which
|
||||||
|
contain the /etc/init.d/syslog init script.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 13 10:31:24 UTC 2012 - mt@suse.com
|
||||||
|
|
||||||
|
- imuxsock: do not log EAGAIN in nonblocking recvfrom (bnc#734672)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 12 17:21:43 UTC 2012 - mt@suse.com
|
||||||
|
|
||||||
|
- Removed handling of the -c <compat version> option which is
|
||||||
|
obsolete in rsyslog-7.x.
|
||||||
|
- Fixed build requires / deps to work on 12.x and SLE-11-SP2.
|
||||||
|
- Initialized RSYSLOG_PARAMS env variable in service file.
|
||||||
|
- Marked additional log socket config as ghost.
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Nov 9 13:38:35 UTC 2012 - mt@suse.com
|
||||||
|
|
||||||
|
- Readded things removed in previous change, that is compat version
|
||||||
|
and params variable use, generation of additional (chroot) log
|
||||||
|
sockets include file, xconsole handling in rsyslog.service.
|
||||||
|
- Fixed liblognorm conditional build flag dependencies, removed all
|
||||||
|
suse version dependencies.
|
||||||
|
- Changed to install in /usr/sbin, compatibility link in /sbin.
|
||||||
|
- Added klogd to build conflicts to resolve build service deps
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 6 12:36:54 UTC 2012 - tittiatcoke@gmail.com
|
||||||
|
|
||||||
|
- Enabled rsyslog own systemd service file. This to resolve the
|
||||||
|
current issue with a non starting system logger with systemd 185.
|
||||||
|
(see also bnc#788330)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Oct 29 15:39:26 UTC 2012 - mt@suse.com
|
Mon Oct 29 15:39:26 UTC 2012 - mt@suse.com
|
||||||
|
|
||||||
|
18
rsyslog.service.in.in
Normal file
18
rsyslog.service.in.in
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=System Logging Service
|
||||||
|
Requires=var-run.mount syslog.target
|
||||||
|
After=var-run.mount
|
||||||
|
Before=syslog.target
|
||||||
|
Conflicts=syslog-ng.service syslogd.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Environment=RSYSLOGD_PARAMS=
|
||||||
|
ExecStartPre=@sbindir@/rsyslog-service-prepare
|
||||||
|
EnvironmentFile=-/etc/sysconfig/syslog
|
||||||
|
ExecStart=@sbindir@/rsyslogd -n $RSYSLOGD_PARAMS
|
||||||
|
Sockets=syslog.socket
|
||||||
|
StandardOutput=null
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
Alias=syslog.service
|
339
rsyslog.spec
339
rsyslog.spec
@ -20,55 +20,53 @@ Name: rsyslog
|
|||||||
Summary: The enhanced syslogd for Linux and Unix
|
Summary: The enhanced syslogd for Linux and Unix
|
||||||
License: (GPL-3.0+ and Apache-2.0)
|
License: (GPL-3.0+ and Apache-2.0)
|
||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
Version: 7.2.1
|
Version: 7.2.3
|
||||||
Release: 0
|
Release: 0
|
||||||
# for setting those bcond_with* configs see
|
%if 0%{?suse_version} >= 1210
|
||||||
# http://lizards.opensuse.org/2008/09/12/conditional-features-aka-use-flags/
|
%bcond_without systemd
|
||||||
%if 0%{?suse_version} >= 1140
|
%bcond_without udpspoof
|
||||||
%bcond_without dbi
|
%bcond_without dbi
|
||||||
%else
|
%else
|
||||||
|
%bcond_with systemd
|
||||||
|
%bcond_with udpspoof
|
||||||
%bcond_with dbi
|
%bcond_with dbi
|
||||||
%endif
|
%endif
|
||||||
%if 0%{?suse_version} >= 1140
|
%if 0%{?suse_version} >= 1230
|
||||||
%bcond_without systemd
|
%bcond_with systemv
|
||||||
%else
|
%else
|
||||||
%bcond_with systemd
|
%bcond_without systemv
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} >= 1210
|
|
||||||
%bcond_without syslogservice
|
|
||||||
%else
|
|
||||||
%bcond_with syslogservice
|
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} >= 1130
|
|
||||||
%bcond_without relp
|
|
||||||
%else
|
|
||||||
%bcond_with relp
|
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} >= 1130
|
|
||||||
%bcond_without mmnormalize
|
|
||||||
%else
|
|
||||||
%bcond_with mmnormalize
|
|
||||||
%endif
|
%endif
|
||||||
%bcond_without gssapi
|
%bcond_without gssapi
|
||||||
%bcond_without gnutls
|
%bcond_without gnutls
|
||||||
%bcond_without mysql
|
%bcond_without mysql
|
||||||
%bcond_without pgsql
|
%bcond_without pgsql
|
||||||
|
%bcond_without relp
|
||||||
%bcond_without snmp
|
%bcond_without snmp
|
||||||
|
%bcond_without diagtools
|
||||||
|
%bcond_without mmnormalize
|
||||||
%define upstream_version %{version}
|
%define upstream_version %{version}
|
||||||
%define _sbindir /sbin
|
|
||||||
%define rsyslogdocdir %{_docdir}/%{name}
|
%define rsyslogdocdir %{_docdir}/%{name}
|
||||||
%define additional_sockets %{_localstatedir}/run/rsyslog/additional-log-sockets.conf
|
%define rsyslog_rundir %{_localstatedir}/run/rsyslog
|
||||||
%define _libdir /%_lib
|
%define rsyslog_sockets_cfg %{rsyslog_rundir}/additional-log-sockets.conf
|
||||||
%define rsyslog_module_dir_nodeps %{_libdir}/rsyslog/
|
%define rsyslog_module_dir_nodeps %{_libdir}/rsyslog/
|
||||||
%define rsyslog_module_dir_withdeps %{_prefix}/%{_lib}/rsyslog/
|
%define rsyslog_module_dir_withdeps %{_libdir}/rsyslog/
|
||||||
Url: http://www.rsyslog.com/
|
Url: http://www.rsyslog.com/
|
||||||
|
%if %{with systemd}
|
||||||
Provides: syslog
|
Provides: syslog
|
||||||
|
Provides: sysvinit(syslog)
|
||||||
Conflicts: otherproviders(syslog)
|
Conflicts: otherproviders(syslog)
|
||||||
%if %{with syslogservice}
|
Requires(pre): %fillup_prereq
|
||||||
Requires(pre): %insserv_prereq %fillup_prereq syslog-service /sbin/checkproc
|
%if %{with systemv}
|
||||||
BuildRequires: syslog-service
|
Requires(pre): %insserv_prereq
|
||||||
|
Requires(pre): syslog-service < 2.0
|
||||||
|
Requires(pre): /etc/init.d/syslog
|
||||||
%else
|
%else
|
||||||
Requires(pre): %insserv_prereq %fillup_prereq /sbin/klogd /etc/init.d/syslog /sbin/checkproc
|
Requires(pre): syslog-service >= 2.0
|
||||||
|
%endif
|
||||||
|
%{?systemd_requires}
|
||||||
|
BuildRequires: pkgconfig(systemd)
|
||||||
|
%else
|
||||||
|
Requires(pre): %insserv_prereq %fillup_prereq /etc/init.d/syslog
|
||||||
BuildRequires: klogd
|
BuildRequires: klogd
|
||||||
%endif
|
%endif
|
||||||
BuildRequires: dos2unix
|
BuildRequires: dos2unix
|
||||||
@ -76,10 +74,16 @@ BuildRequires: openssl-devel
|
|||||||
BuildRequires: pcre-devel
|
BuildRequires: pcre-devel
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
#
|
|
||||||
%if %{with gssapi}
|
%if %{with gssapi}
|
||||||
BuildRequires: krb5-devel
|
BuildRequires: krb5-devel
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with gnutls}
|
||||||
|
BuildRequires: libgcrypt-devel
|
||||||
|
BuildRequires: libgnutls-devel
|
||||||
|
%endif
|
||||||
|
%if %{with dbi}
|
||||||
|
BuildRequires: libdbi-devel
|
||||||
|
%endif
|
||||||
%if %{with mysql}
|
%if %{with mysql}
|
||||||
BuildRequires: mysql-devel
|
BuildRequires: mysql-devel
|
||||||
%endif
|
%endif
|
||||||
@ -89,46 +93,46 @@ BuildRequires: net-snmp-devel
|
|||||||
%if %{with pgsql}
|
%if %{with pgsql}
|
||||||
BuildRequires: postgresql-devel
|
BuildRequires: postgresql-devel
|
||||||
%endif
|
%endif
|
||||||
%if %{with gnutls}
|
|
||||||
BuildRequires: libgcrypt-devel
|
|
||||||
BuildRequires: libgnutls-devel
|
|
||||||
%endif
|
|
||||||
%if %{with dbi}
|
|
||||||
BuildRequires: libdbi-devel
|
|
||||||
%endif
|
|
||||||
%if %{with relp}
|
%if %{with relp}
|
||||||
# RELP support
|
# RELP support
|
||||||
BuildRequires: librelp-devel
|
BuildRequires: librelp-devel
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with udpspoof}
|
||||||
|
# UDP spoof support
|
||||||
|
BuildRequires: libnet-devel
|
||||||
|
%endif
|
||||||
%if %{with mmnormalize}
|
%if %{with mmnormalize}
|
||||||
# mmnormalize support
|
# mmnormalize support
|
||||||
BuildRequires: liblognorm-devel
|
BuildRequires: liblognorm-devel
|
||||||
%endif
|
%endif
|
||||||
# UDP spoof support
|
# mmjsonparse needs liblognorm,
|
||||||
%if 0%{?suse_version} >= 1140
|
# but json check is unconditional
|
||||||
BuildRequires: libnet-devel
|
%if 0%{?suse_version} >= 1210
|
||||||
%else
|
|
||||||
BuildRequires: libnet
|
|
||||||
%endif
|
|
||||||
%if %{with systemd}
|
|
||||||
# The systemd package provides
|
|
||||||
# /usr/share/doc/packages/systemd/sd-daemon.[ch]
|
|
||||||
# files instead of a lib ... See also bug 656259.
|
|
||||||
%if 0%{?suse_version} > 1140
|
|
||||||
BuildRequires: systemd-devel
|
|
||||||
%else
|
|
||||||
BuildRequires: systemd
|
|
||||||
%endif
|
|
||||||
%endif
|
|
||||||
BuildRequires: pkgconfig(json) >= 0.9
|
BuildRequires: pkgconfig(json) >= 0.9
|
||||||
BuildRequires: pkgconfig(libee) >= 0.4.0
|
BuildRequires: pkgconfig(libee) >= 0.4.0
|
||||||
BuildRequires: pkgconfig(libestr) >= 0.1.2
|
BuildRequires: pkgconfig(libestr) >= 0.1.2
|
||||||
|
%else
|
||||||
|
BuildRequires: libee-devel
|
||||||
|
BuildRequires: libestr-devel
|
||||||
|
BuildRequires: libjson-devel
|
||||||
|
%endif
|
||||||
|
%if 0%{?suse_version} >= 1220
|
||||||
BuildRequires: pkgconfig(uuid) >= 2.21.0
|
BuildRequires: pkgconfig(uuid) >= 2.21.0
|
||||||
|
%else
|
||||||
|
BuildRequires: libuuid-devel
|
||||||
|
%endif
|
||||||
|
%if %{with systemd}
|
||||||
|
%{?systemd_requires}
|
||||||
|
BuildRequires: pkgconfig(systemd)
|
||||||
|
%endif
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Source0: http://www.rsyslog.com/files/download/%{name}/%{name}-%{upstream_version}.tar.gz
|
Source0: http://www.rsyslog.com/files/download/%{name}/%{name}-%{upstream_version}.tar.gz
|
||||||
Source1: rsyslog.sysconfig
|
Source1: rsyslog.sysconfig
|
||||||
Source2: rsyslog.conf.in
|
Source2: rsyslog.conf.in
|
||||||
Source4: rsyslog.d.remote.conf.in
|
Source4: rsyslog.d.remote.conf.in
|
||||||
|
Source5: rsyslog-service-prepare.in
|
||||||
|
Source6: rsyslog.service.in.in
|
||||||
|
Patch1: 0001-imklog-kernel-timestamp-parsing.bnc783967.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Rsyslog is an enhanced multi-threaded syslogd supporting, among others,
|
Rsyslog is an enhanced multi-threaded syslogd supporting, among others,
|
||||||
@ -150,6 +154,8 @@ package.
|
|||||||
|
|
||||||
This package provides additional documentation for rsyslog.
|
This package provides additional documentation for rsyslog.
|
||||||
|
|
||||||
|
%if %{with diagtools}
|
||||||
|
|
||||||
%package diag-tools
|
%package diag-tools
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Summary: Diagnostic tools
|
Summary: Diagnostic tools
|
||||||
@ -162,6 +168,8 @@ package.
|
|||||||
This package provides additional diagnostic tools (small helpers,
|
This package provides additional diagnostic tools (small helpers,
|
||||||
usually not needed).
|
usually not needed).
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with gssapi}
|
%if %{with gssapi}
|
||||||
|
|
||||||
%package module-gssapi
|
%package module-gssapi
|
||||||
@ -175,6 +183,7 @@ package.
|
|||||||
|
|
||||||
This module provides the support to receive syslog messages from the
|
This module provides the support to receive syslog messages from the
|
||||||
network protected via Kerberos 5 encryption and authentication.
|
network protected via Kerberos 5 encryption and authentication.
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with mysql}
|
%if %{with mysql}
|
||||||
@ -190,6 +199,7 @@ package.
|
|||||||
|
|
||||||
This package provides a module with the support for logging into MySQL
|
This package provides a module with the support for logging into MySQL
|
||||||
databases.
|
databases.
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with pgsql}
|
%if %{with pgsql}
|
||||||
@ -204,6 +214,7 @@ Rsyslog is an enhanced multi-threaded syslog daemon. See rsyslog
|
|||||||
package.
|
package.
|
||||||
|
|
||||||
This module provides the support for logging into PostgreSQL databases.
|
This module provides the support for logging into PostgreSQL databases.
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with dbi}
|
%if %{with dbi}
|
||||||
@ -219,6 +230,7 @@ package.
|
|||||||
|
|
||||||
This package provides a module with the support for logging into DBI
|
This package provides a module with the support for logging into DBI
|
||||||
supported databases.
|
supported databases.
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with snmp}
|
%if %{with snmp}
|
||||||
@ -234,6 +246,7 @@ package.
|
|||||||
|
|
||||||
This module provides the ability to send syslog messages as an SNMPv1 &
|
This module provides the ability to send syslog messages as an SNMPv1 &
|
||||||
v2c traps.
|
v2c traps.
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with gnutls}
|
%if %{with gnutls}
|
||||||
@ -281,6 +294,8 @@ This module provides log normalizing support.
|
|||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with udpspoof}
|
||||||
|
|
||||||
%package module-udpspoof
|
%package module-udpspoof
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Summary: UDP spoof support module for syslog
|
Summary: UDP spoof support module for syslog
|
||||||
@ -292,23 +307,24 @@ package.
|
|||||||
|
|
||||||
This module provides a UDP forwarder that allows changing the sender address.
|
This module provides a UDP forwarder that allows changing the sender address.
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{upstream_version}
|
%setup -q -n %{name}-%{upstream_version}
|
||||||
|
%patch1 -p1
|
||||||
|
#
|
||||||
%if %{with systemd}
|
%if %{with systemd}
|
||||||
%if 0%{?suse_version} <= 1140
|
for file in rsyslog-service-prepare rsyslog.service.in ; do
|
||||||
# Bug: https://bugzilla.novell.com/show_bug.cgi?id=656259
|
sed \
|
||||||
# install the files systemd provides rather than what we provide.
|
-e 's;RUN_DIR;%{rsyslog_rundir};g' \
|
||||||
# On newer systems, systemd-devel provides them.
|
-e 's;ADDITIONAL_SOCKETS;%{rsyslog_sockets_cfg};g' \
|
||||||
cp -a /usr/share/doc/packages/systemd/sd-daemon.[ch] runtime/
|
"%{_sourcedir}/${file}.in" > "${file}"
|
||||||
%endif
|
done
|
||||||
%endif
|
%endif
|
||||||
dos2unix doc/*.html
|
dos2unix doc/*.html
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall -I../grammar -I../../grammar"
|
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall -I../grammar -I../../grammar"
|
||||||
%if 0%{?suse_version} > 1000 && 0%{?suse_version} < 1030
|
|
||||||
export CFLAGS="$CFLAGS -fstack-protector"
|
|
||||||
%endif
|
|
||||||
# needs liblogging
|
# needs liblogging
|
||||||
# --enable-rfc3195 \
|
# --enable-rfc3195 \
|
||||||
# needs java
|
# needs java
|
||||||
@ -323,30 +339,28 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall -I../grammar -I../..
|
|||||||
--enable-klog \
|
--enable-klog \
|
||||||
--enable-kmsg \
|
--enable-kmsg \
|
||||||
--enable-inet \
|
--enable-inet \
|
||||||
|
--enable-rsyslogd \
|
||||||
%if %{with gnutls}
|
%if %{with gnutls}
|
||||||
--enable-gnutls \
|
--enable-gnutls \
|
||||||
%endif
|
%endif
|
||||||
--enable-rsyslogd \
|
|
||||||
%if %{with gssapi}
|
%if %{with gssapi}
|
||||||
--enable-gssapi-krb5 \
|
--enable-gssapi-krb5 \
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with dbi}
|
||||||
|
--enable-libdbi \
|
||||||
|
%endif
|
||||||
%if %{with mysql}
|
%if %{with mysql}
|
||||||
--enable-mysql \
|
--enable-mysql \
|
||||||
%endif
|
%endif
|
||||||
%if %{with pgsql}
|
%if %{with pgsql}
|
||||||
--enable-pgsql \
|
--enable-pgsql \
|
||||||
%endif
|
%endif
|
||||||
%if %{with dbi}
|
|
||||||
--enable-libdbi \
|
|
||||||
%endif
|
|
||||||
%if %{with relp}
|
%if %{with relp}
|
||||||
--enable-relp \
|
--enable-relp \
|
||||||
%endif
|
%endif
|
||||||
%if %{with mmnormalize}
|
|
||||||
--enable-mmnormalize \
|
|
||||||
%endif
|
|
||||||
%if %{with snmp}
|
%if %{with snmp}
|
||||||
--enable-snmp \
|
--enable-snmp \
|
||||||
|
--enable-mmsnmptrapd \
|
||||||
%endif
|
%endif
|
||||||
--enable-mail \
|
--enable-mail \
|
||||||
--enable-imfile \
|
--enable-imfile \
|
||||||
@ -354,18 +368,24 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall -I../grammar -I../..
|
|||||||
--enable-impstats \
|
--enable-impstats \
|
||||||
--enable-omprog \
|
--enable-omprog \
|
||||||
--enable-omuxsock \
|
--enable-omuxsock \
|
||||||
|
%if %{with udpspoof}
|
||||||
--enable-omudpspoof \
|
--enable-omudpspoof \
|
||||||
|
%endif
|
||||||
--enable-omstdout \
|
--enable-omstdout \
|
||||||
--enable-pmlastmsg \
|
--enable-pmlastmsg \
|
||||||
--enable-diagtools \
|
|
||||||
--enable-pmcisconames \
|
--enable-pmcisconames \
|
||||||
--enable-pmaixforwardedfrom \
|
--enable-pmaixforwardedfrom \
|
||||||
--enable-pmsnare \
|
--enable-pmsnare \
|
||||||
--enable-pmrfc3164sd \
|
--enable-pmrfc3164sd \
|
||||||
--enable-omruleset \
|
--enable-omruleset \
|
||||||
--enable-mmsnmptrapd \
|
%if %{with mmnormalize}
|
||||||
|
--enable-mmnormalize \
|
||||||
--enable-mmjsonparse \
|
--enable-mmjsonparse \
|
||||||
--enable-mmaudit \
|
--enable-mmaudit \
|
||||||
|
%endif
|
||||||
|
%if %{with diagtools}
|
||||||
|
--enable-diagtools \
|
||||||
|
%endif
|
||||||
--disable-static
|
--disable-static
|
||||||
|
|
||||||
make %{?_smp_mflags:%{_smp_mflags}} V=1
|
make %{?_smp_mflags:%{_smp_mflags}} V=1
|
||||||
@ -378,35 +398,51 @@ rm -f %{buildroot}%{rsyslog_module_dir_nodeps}/*.la
|
|||||||
# move all modules linking libraries in /usr to /usr/lib[64]
|
# move all modules linking libraries in /usr to /usr/lib[64]
|
||||||
# the user has to specify them with full path then...
|
# the user has to specify them with full path then...
|
||||||
install -d -m0755 %{buildroot}%{rsyslog_module_dir_withdeps}
|
install -d -m0755 %{buildroot}%{rsyslog_module_dir_withdeps}
|
||||||
for mod in \
|
if test "%{rsyslog_module_dir_nodeps}" != "%{rsyslog_module_dir_withdeps}" ; then
|
||||||
|
for mod in \
|
||||||
|
%if %{with gnutls}
|
||||||
|
lmnsd_gtls.so \
|
||||||
|
%endif
|
||||||
%if %{with gssapi}
|
%if %{with gssapi}
|
||||||
omgssapi.so imgssapi.so lmgssutil.so \
|
omgssapi.so imgssapi.so lmgssutil.so \
|
||||||
%endif
|
|
||||||
%if %{with mysql}
|
|
||||||
ommysql.so \
|
|
||||||
%endif
|
|
||||||
%if %{with pgsql}
|
|
||||||
ompgsql.so \
|
|
||||||
%endif
|
|
||||||
%if %{with snmp}
|
|
||||||
omsnmp.so \
|
|
||||||
%endif
|
%endif
|
||||||
%if %{with dbi}
|
%if %{with dbi}
|
||||||
omlibdbi.so \
|
omlibdbi.so \
|
||||||
|
%endif
|
||||||
|
%if %{with mysql}
|
||||||
|
ommysql.so \
|
||||||
|
%endif
|
||||||
|
%if %{with pgsql}
|
||||||
|
ompgsql.so \
|
||||||
%endif
|
%endif
|
||||||
%if %{with relp}
|
%if %{with relp}
|
||||||
imrelp.so omrelp.so \
|
imrelp.so omrelp.so \
|
||||||
|
%endif
|
||||||
|
%if %{with snmp}
|
||||||
|
omsnmp.so \
|
||||||
%endif
|
%endif
|
||||||
%if %{with mmnormalize}
|
%if %{with mmnormalize}
|
||||||
mmnormalize.so \
|
mmnormalize.so \
|
||||||
|
mmjsonparse.so \
|
||||||
|
mmaudit.so \
|
||||||
%endif
|
%endif
|
||||||
%if %{with gnutls}
|
; do
|
||||||
lmnsd_gtls.so \
|
mv -f %{buildroot}%{rsyslog_module_dir_nodeps}/$mod \
|
||||||
|
%{buildroot}%{rsyslog_module_dir_withdeps}
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if test "%{_sbindir}" != "/sbin" ; then
|
||||||
|
install -d -m0755 %{buildroot}/sbin
|
||||||
|
ln -sf %{_sbindir}/rsyslogd $RPM_BUILD_ROOT/sbin/rsyslogd
|
||||||
|
fi
|
||||||
|
#
|
||||||
|
%if %{with systemd} && ! %{with systemv}
|
||||||
|
install -m755 rsyslog-service-prepare %{buildroot}%{_sbindir}/
|
||||||
|
%else
|
||||||
|
if test -e %{buildroot}%{_unitdir}/rsyslog.service ; then
|
||||||
|
rm -f %{buildroot}%{_unitdir}/rsyslog.service
|
||||||
|
fi
|
||||||
%endif
|
%endif
|
||||||
; do
|
|
||||||
mv -f %{buildroot}%{rsyslog_module_dir_nodeps}/$mod \
|
|
||||||
%{buildroot}%{rsyslog_module_dir_withdeps}
|
|
||||||
done
|
|
||||||
#
|
#
|
||||||
install -d -m0755 %{buildroot}%{_sysconfdir}/rsyslog.d
|
install -d -m0755 %{buildroot}%{_sysconfdir}/rsyslog.d
|
||||||
install -d -m0755 %{buildroot}%{_localstatedir}/run/rsyslog
|
install -d -m0755 %{buildroot}%{_localstatedir}/run/rsyslog
|
||||||
@ -416,7 +452,7 @@ for file in rsyslog.conf rsyslog.d.remote.conf ; do
|
|||||||
%ifarch s390 s390x
|
%ifarch s390 s390x
|
||||||
-e 's;tty10;console;g' \
|
-e 's;tty10;console;g' \
|
||||||
%endif
|
%endif
|
||||||
-e 's;ADDITIONAL_SOCKETS;%{additional_sockets};g' \
|
-e 's;ADDITIONAL_SOCKETS;%{rsyslog_sockets_cfg};g' \
|
||||||
-e 's;ETC_RSYSLOG_CONF;%{_sysconfdir}/rsyslog.conf;g' \
|
-e 's;ETC_RSYSLOG_CONF;%{_sysconfdir}/rsyslog.conf;g' \
|
||||||
-e 's;ETC_RSYSLOG_D_DIR;%{_sysconfdir}/rsyslog.d;g' \
|
-e 's;ETC_RSYSLOG_D_DIR;%{_sysconfdir}/rsyslog.d;g' \
|
||||||
-e 's;ETC_RSYSLOG_D_GLOB;%{_sysconfdir}/rsyslog.d/*.conf;g' \
|
-e 's;ETC_RSYSLOG_D_GLOB;%{_sysconfdir}/rsyslog.d/*.conf;g' \
|
||||||
@ -429,12 +465,7 @@ install -m0600 rsyslog.d.remote.conf.$$ \
|
|||||||
%{buildroot}%{_sysconfdir}/rsyslog.d/remote.conf
|
%{buildroot}%{_sysconfdir}/rsyslog.d/remote.conf
|
||||||
#
|
#
|
||||||
install -d -m0755 %{buildroot}/var/adm/fillup-templates
|
install -d -m0755 %{buildroot}/var/adm/fillup-templates
|
||||||
# native version for the '-c <compat version>' parameter
|
install -m0600 %{_sourcedir}/rsyslog.sysconfig \
|
||||||
rsyslogd_version=%{version}
|
|
||||||
rsyslogd_version=${rsyslogd_version//.*/}
|
|
||||||
sed -e "s/@RSYSLOGD_VERSION@/${rsyslogd_version}/g" \
|
|
||||||
< %{_sourcedir}/rsyslog.sysconfig > rsyslog.sysconfig
|
|
||||||
install -m0600 rsyslog.sysconfig \
|
|
||||||
%{buildroot}/var/adm/fillup-templates/sysconfig.syslog-rsyslog
|
%{buildroot}/var/adm/fillup-templates/sysconfig.syslog-rsyslog
|
||||||
#
|
#
|
||||||
rm -f doc/Makefile*
|
rm -f doc/Makefile*
|
||||||
@ -442,6 +473,7 @@ install -d -m0755 %{buildroot}%{rsyslogdocdir}/
|
|||||||
find ChangeLog README AUTHORS COPYING COPYING.LESSER rsyslog.conf doc \
|
find ChangeLog README AUTHORS COPYING COPYING.LESSER rsyslog.conf doc \
|
||||||
\( -type d -exec install -m755 -d %{buildroot}%{rsyslogdocdir}/\{\} \; \) \
|
\( -type d -exec install -m755 -d %{buildroot}%{rsyslogdocdir}/\{\} \; \) \
|
||||||
-o \( -type f -exec install -m644 \{\} %{buildroot}%{rsyslogdocdir}/\{\} \; \)
|
-o \( -type f -exec install -m644 \{\} %{buildroot}%{rsyslogdocdir}/\{\} \; \)
|
||||||
|
#
|
||||||
%if %{with mysql}
|
%if %{with mysql}
|
||||||
install -m644 plugins/ommysql/createDB.sql \
|
install -m644 plugins/ommysql/createDB.sql \
|
||||||
%{buildroot}%{rsyslogdocdir}/mysql-createDB.sql
|
%{buildroot}%{rsyslogdocdir}/mysql-createDB.sql
|
||||||
@ -450,52 +482,50 @@ install -m644 plugins/ommysql/createDB.sql \
|
|||||||
install -m644 plugins/ompgsql/createDB.sql \
|
install -m644 plugins/ompgsql/createDB.sql \
|
||||||
%{buildroot}%{rsyslogdocdir}/pgsql-createDB.sql
|
%{buildroot}%{rsyslogdocdir}/pgsql-createDB.sql
|
||||||
%endif
|
%endif
|
||||||
#
|
# create ghosts
|
||||||
# Note: On 11.4 we do not ship any systemd service file.
|
install -d -m0755 %{buildroot}%{rsyslog_rundir}
|
||||||
# On 12.x, the syslog.service file is provided by
|
touch %{buildroot}%{rsyslog_sockets_cfg}
|
||||||
# the syslog-service package.
|
chmod 644 %{buildroot}%{rsyslog_sockets_cfg}
|
||||||
#
|
|
||||||
%if %{with systemd}
|
|
||||||
if test -e %{buildroot}%{_unitdir}/rsyslog.service ; then
|
|
||||||
rm -f %{buildroot}%{_unitdir}/rsyslog.service
|
|
||||||
fi
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
if [ -n "%{buildroot}" ] && [ "%{buildroot}" != "/" ] ; then
|
if [ -n "%{buildroot}" ] && [ "%{buildroot}" != "/" ] ; then
|
||||||
rm -rf "%{buildroot}"
|
rm -rf "%{buildroot}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
%if %{with systemd} && ! %{with systemv}
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%{service_add_pre rsyslog.service}
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
#
|
#
|
||||||
# update linker caches
|
# update linker caches
|
||||||
#
|
#
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
#
|
#
|
||||||
# add syslog variables provided by klogd/syslog-service
|
# remove obsolete variables
|
||||||
#
|
#
|
||||||
%{remove_and_set -n syslog RSYSLOGD_NATIVE_VERSION}
|
%{remove_and_set -n syslog SYSLOG_DAEMON SYSLOG_REQUIRES_NETWORK}
|
||||||
|
%{remove_and_set -n syslog RSYSLOGD_COMPAT_VERSION RSYSLOGD_NATIVE_VERSION}
|
||||||
|
%if %{with systemv}
|
||||||
%{fillup_and_insserv -ny syslog syslog}
|
%{fillup_and_insserv -ny syslog syslog}
|
||||||
|
%endif
|
||||||
#
|
#
|
||||||
# add RSYSLOGD_* variables if needed
|
# add RSYSLOGD_* variables
|
||||||
#
|
#
|
||||||
%{fillup_only -ns syslog rsyslog}
|
%{fillup_only -ns syslog rsyslog}
|
||||||
|
%if %{with systemv}
|
||||||
#
|
#
|
||||||
# check if daemon configured in SYSLOG_DAEMON is installed
|
# switch SYSLOG_DAEMON to outself
|
||||||
# and switch to ourself if it's missed
|
|
||||||
#
|
#
|
||||||
source etc/sysconfig/syslog
|
if test -f etc/sysconfig/syslog ; then
|
||||||
replace_syslog=no
|
sed -i \
|
||||||
if test "$SYSLOG_DAEMON" != "rsyslogd" ; then
|
-e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON="rsyslogd"/g' \
|
||||||
if test -z "$SYSLOG_DAEMON" || \
|
etc/sysconfig/syslog
|
||||||
test ! -x sbin/${SYSLOG_DAEMON} ; then
|
|
||||||
replace_syslog=yes
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
if test "$replace_syslog" = "yes" ; then
|
|
||||||
sed -i -e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON="rsyslogd"/g' \
|
|
||||||
etc/sysconfig/syslog
|
|
||||||
fi
|
fi
|
||||||
|
%endif
|
||||||
#
|
#
|
||||||
# Do not use multiple facilities with the same priority pattern.
|
# Do not use multiple facilities with the same priority pattern.
|
||||||
# It causes start failure since rsyslog-6.4.x (bnc#780607).
|
# It causes start failure since rsyslog-6.4.x (bnc#780607).
|
||||||
@ -532,32 +562,45 @@ touch var/log/NetworkManager; chmod 640 var/log/NetworkManager
|
|||||||
#
|
#
|
||||||
# touch the additional log sockets config file
|
# touch the additional log sockets config file
|
||||||
#
|
#
|
||||||
additional_sockets="%{additional_sockets}"
|
mkdir -p -m750 ".%{rsyslog_rundir}"
|
||||||
mkdir -p -m750 ${additional_sockets%/*}
|
touch ".%{rsyslog_sockets_cfg}"
|
||||||
touch "${additional_sockets#/}"
|
chmod 640 ".%{rsyslog_sockets_cfg}"
|
||||||
chmod 640 "${additional_sockets#/}"
|
#
|
||||||
|
# Enable the rsyslogservice to be started by systemd
|
||||||
|
#
|
||||||
|
%if %{with systemd} && ! %{with systemv}
|
||||||
|
%{service_add_post rsyslog.service}
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
#
|
#
|
||||||
# stop the rsyslogd daemon when it is running
|
# stop the rsyslogd daemon when it is running
|
||||||
#
|
#
|
||||||
|
%if %{with systemd} && ! %{with systemv}
|
||||||
|
%{service_del_preun rsyslog.service}
|
||||||
|
%else
|
||||||
%{stop_on_removal syslog}
|
%{stop_on_removal syslog}
|
||||||
|
#
|
||||||
|
# reset SYSLOG_DAEMON variable on removal
|
||||||
|
#
|
||||||
|
if test "$1" = "0" -a -f etc/sysconfig/syslog ; then
|
||||||
|
sed -i \
|
||||||
|
-e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON=""/g' \
|
||||||
|
etc/sysconfig/syslog
|
||||||
|
fi
|
||||||
|
%endif
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
#
|
#
|
||||||
# update linker caches
|
# update linker caches
|
||||||
#
|
#
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
|
%if %{with systemd} && ! %{with systemv}
|
||||||
#
|
#
|
||||||
# reset SYSLOG_DAEMON variable
|
# cleanup init scripts
|
||||||
#
|
#
|
||||||
if test -f etc/sysconfig/syslog ; then
|
%{service_del_postun rsyslog.service}
|
||||||
source etc/sysconfig/syslog
|
%else
|
||||||
if test "$SYSLOG_DAEMON" == "rsyslogd" ; then
|
|
||||||
sed -i -e 's/^SYSLOG_DAEMON=.*/SYSLOG_DAEMON=""/g' \
|
|
||||||
etc/sysconfig/syslog
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
#
|
#
|
||||||
# stop the rsyslogd daemon when it is running
|
# stop the rsyslogd daemon when it is running
|
||||||
#
|
#
|
||||||
@ -566,6 +609,7 @@ fi
|
|||||||
# cleanup init scripts
|
# cleanup init scripts
|
||||||
#
|
#
|
||||||
%{insserv_cleanup}
|
%{insserv_cleanup}
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -573,6 +617,9 @@ fi
|
|||||||
%config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.conf
|
%config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.conf
|
||||||
%config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.d/remote.conf
|
%config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.d/remote.conf
|
||||||
%{_sbindir}/rsyslogd
|
%{_sbindir}/rsyslogd
|
||||||
|
%if "%{_sbindir}" != "/sbin"
|
||||||
|
/sbin/rsyslogd
|
||||||
|
%endif
|
||||||
%dir %{rsyslog_module_dir_nodeps}
|
%dir %{rsyslog_module_dir_nodeps}
|
||||||
%{rsyslog_module_dir_nodeps}/imfile.so
|
%{rsyslog_module_dir_nodeps}/imfile.so
|
||||||
%{rsyslog_module_dir_nodeps}/imklog.so
|
%{rsyslog_module_dir_nodeps}/imklog.so
|
||||||
@ -598,9 +645,6 @@ fi
|
|||||||
%{rsyslog_module_dir_nodeps}/omuxsock.so
|
%{rsyslog_module_dir_nodeps}/omuxsock.so
|
||||||
%{rsyslog_module_dir_nodeps}/pmlastmsg.so
|
%{rsyslog_module_dir_nodeps}/pmlastmsg.so
|
||||||
%{rsyslog_module_dir_nodeps}/impstats.so
|
%{rsyslog_module_dir_nodeps}/impstats.so
|
||||||
%{rsyslog_module_dir_nodeps}/mmaudit.so
|
|
||||||
%{rsyslog_module_dir_nodeps}/mmjsonparse.so
|
|
||||||
%{rsyslog_module_dir_nodeps}/mmsnmptrapd.so
|
|
||||||
%{rsyslog_module_dir_nodeps}/pmaixforwardedfrom.so
|
%{rsyslog_module_dir_nodeps}/pmaixforwardedfrom.so
|
||||||
%{rsyslog_module_dir_nodeps}/pmcisconames.so
|
%{rsyslog_module_dir_nodeps}/pmcisconames.so
|
||||||
%{rsyslog_module_dir_nodeps}/pmrfc3164sd.so
|
%{rsyslog_module_dir_nodeps}/pmrfc3164sd.so
|
||||||
@ -617,17 +661,26 @@ fi
|
|||||||
%doc %{rsyslogdocdir}/COPYING.LESSER
|
%doc %{rsyslogdocdir}/COPYING.LESSER
|
||||||
%dir %{_localstatedir}/spool/rsyslog
|
%dir %{_localstatedir}/spool/rsyslog
|
||||||
/var/adm/fillup-templates/sysconfig.syslog-rsyslog
|
/var/adm/fillup-templates/sysconfig.syslog-rsyslog
|
||||||
|
%attr(0755,root,root) %dir %ghost %{rsyslog_rundir}
|
||||||
|
%attr(0644,root,root) %ghost %{rsyslog_sockets_cfg}
|
||||||
|
%if %{with systemd} && ! %{with systemv}
|
||||||
|
%{_sbindir}/rsyslog-service-prepare
|
||||||
|
%{_unitdir}/rsyslog.service
|
||||||
|
%endif
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%dir %{rsyslogdocdir}
|
%dir %{rsyslogdocdir}
|
||||||
%doc %{rsyslogdocdir}/doc
|
%doc %{rsyslogdocdir}/doc
|
||||||
|
|
||||||
|
%if %{with diagtools}
|
||||||
|
|
||||||
%files diag-tools
|
%files diag-tools
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_sbindir}/msggen
|
%{_sbindir}/msggen
|
||||||
%{_sbindir}/rsyslog_diag_hostname
|
%{_sbindir}/rsyslog_diag_hostname
|
||||||
%{_sbindir}/zpipe
|
%{_sbindir}/zpipe
|
||||||
|
%endif
|
||||||
|
|
||||||
%if %{with gssapi}
|
%if %{with gssapi}
|
||||||
|
|
||||||
@ -666,6 +719,7 @@ fi
|
|||||||
%files module-snmp
|
%files module-snmp
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{rsyslog_module_dir_withdeps}/omsnmp.so
|
%{rsyslog_module_dir_withdeps}/omsnmp.so
|
||||||
|
%{rsyslog_module_dir_nodeps}/mmsnmptrapd.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with gnutls}
|
%if %{with gnutls}
|
||||||
@ -688,10 +742,15 @@ fi
|
|||||||
%files module-mmnormalize
|
%files module-mmnormalize
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{rsyslog_module_dir_withdeps}/mmnormalize.so
|
%{rsyslog_module_dir_withdeps}/mmnormalize.so
|
||||||
|
%{rsyslog_module_dir_withdeps}/mmjsonparse.so
|
||||||
|
%{rsyslog_module_dir_withdeps}/mmaudit.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with udpspoof}
|
||||||
|
|
||||||
%files module-udpspoof
|
%files module-udpspoof
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{rsyslog_module_dir_nodeps}/omudpspoof.so
|
%{rsyslog_module_dir_nodeps}/omudpspoof.so
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,35 +1,3 @@
|
|||||||
|
|
||||||
## Type: list(@RSYSLOGD_VERSION@)
|
|
||||||
## Default: "@RSYSLOGD_VERSION@"
|
|
||||||
## Config: ""
|
|
||||||
## ServiceRestart: syslog
|
|
||||||
#
|
|
||||||
# The native version compatibility level of the current rsyslogd.
|
|
||||||
#
|
|
||||||
# Note, that this variable is read-only -- please do not change it!
|
|
||||||
# Instead, please adopt the RSYSLOGD_COMPAT_VERSION variable.
|
|
||||||
#
|
|
||||||
# This variable will be updated while every installation/upgrade of
|
|
||||||
# the rsyslog daemon package.
|
|
||||||
#
|
|
||||||
RSYSLOGD_NATIVE_VERSION="@RSYSLOGD_VERSION@"
|
|
||||||
|
|
||||||
## Type: integer(0:@RSYSLOGD_VERSION@)
|
|
||||||
## Default: ""
|
|
||||||
## Config: ""
|
|
||||||
## ServiceRestart: syslog
|
|
||||||
#
|
|
||||||
# Version compatibility level to run rsyslogd with (-c parameter).
|
|
||||||
# Set to the desired version number rsyslogd shall be compatible with.
|
|
||||||
#
|
|
||||||
# Default is to run in native mode if the currently installed rsyslog
|
|
||||||
# daemon version.
|
|
||||||
#
|
|
||||||
# Note: Changes to this variable may need adoption of the config file
|
|
||||||
# or break features used in the /etc/init.d/syslog script by default.
|
|
||||||
#
|
|
||||||
RSYSLOGD_COMPAT_VERSION=""
|
|
||||||
|
|
||||||
## Type: string
|
## Type: string
|
||||||
## Default: ""
|
## Default: ""
|
||||||
## Config: ""
|
## Config: ""
|
||||||
|
Loading…
Reference in New Issue
Block a user