rsyslog upgrade
- upgrade to new upstream version 5.8.7 - change license from 'GPLv3+' to '(GPLv3+ and ASL 2.0)' http://blog.gerhards.net/2012/01/rsyslog-licensing-update.html - use a specific version for obsoleting sysklogd - add patches for better sysklogd compatibility (taken from upstream)
This commit is contained in:
parent
9728760a7f
commit
610cce4a79
1
.gitignore
vendored
1
.gitignore
vendored
@ -7,3 +7,4 @@ rsyslog-4.6.3.tar.gz
|
|||||||
/rsyslog-5.8.2.tar.gz
|
/rsyslog-5.8.2.tar.gz
|
||||||
/rsyslog-5.8.5.tar.gz
|
/rsyslog-5.8.5.tar.gz
|
||||||
/rsyslog-5.8.6.tar.gz
|
/rsyslog-5.8.6.tar.gz
|
||||||
|
/rsyslog-5.8.7.tar.gz
|
||||||
|
34
rsyslog-5.8.7-sysklogd-compat-1-template.patch
Normal file
34
rsyslog-5.8.7-sysklogd-compat-1-template.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
diff -up rsyslog-5.8.7/doc/rsyslog_conf_templates.html.orig rsyslog-5.8.7/doc/rsyslog_conf_templates.html
|
||||||
|
--- rsyslog-5.8.7/doc/rsyslog_conf_templates.html.orig 2012-01-20 14:04:54.976086070 +0100
|
||||||
|
+++ rsyslog-5.8.7/doc/rsyslog_conf_templates.html 2012-01-20 14:06:35.890817529 +0100
|
||||||
|
@@ -146,6 +146,10 @@ with high-precision timestamps and timez
|
||||||
|
useful if you send messages to other syslogd's or rsyslogd
|
||||||
|
below
|
||||||
|
version 3.12.5.</li>
|
||||||
|
+<li><span style="font-weight: bold;">RSYSLOG_SysklogdFileFormat</span>
|
||||||
|
+- sysklogd compatible log file format. If used with options: $SpaceLFOnReceive on;
|
||||||
|
+$EscapeControlCharactersOnReceive off; $DropTrailingLFOnReception off,
|
||||||
|
+the log format will conform to sysklogd log format.</li>
|
||||||
|
<li><span style="font-weight: bold;">RSYSLOG_ForwardFormat</span>
|
||||||
|
- a new high-precision forwarding format very similar to the
|
||||||
|
traditional one, but with high-precision timestamps and timezone
|
||||||
|
diff -up rsyslog-5.8.7/tools/syslogd.c.orig rsyslog-5.8.7/tools/syslogd.c
|
||||||
|
--- rsyslog-5.8.7/tools/syslogd.c.orig 2012-01-20 14:05:04.985960243 +0100
|
||||||
|
+++ rsyslog-5.8.7/tools/syslogd.c 2012-01-20 14:11:20.527239529 +0100
|
||||||
|
@@ -335,6 +335,7 @@ static uchar template_StdUsrMsgFmt[] = "
|
||||||
|
static uchar template_StdDBFmt[] = "\"insert into SystemEvents (Message, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values ('%msg%', %syslogfacility%, '%HOSTNAME%', %syslogpriority%, '%timereported:::date-mysql%', '%timegenerated:::date-mysql%', %iut%, '%syslogtag%')\",SQL";
|
||||||
|
static uchar template_StdPgSQLFmt[] = "\"insert into SystemEvents (Message, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values ('%msg%', %syslogfacility%, '%HOSTNAME%', %syslogpriority%, '%timereported:::date-pgsql%', '%timegenerated:::date-pgsql%', %iut%, '%syslogtag%')\",STDSQL";
|
||||||
|
static uchar template_spoofadr[] = "\"%fromhost-ip%\"";
|
||||||
|
+static uchar template_SysklogdFileFormat[] = "\"%TIMESTAMP% %HOSTNAME% %syslogtag%%msg:::sp-if-no-1st-sp%%msg%\n\"";
|
||||||
|
/* end templates */
|
||||||
|
|
||||||
|
|
||||||
|
@@ -2171,6 +2172,8 @@ static rsRetVal mainThread()
|
||||||
|
tplAddLine(" StdUsrMsgFmt", &pTmp);
|
||||||
|
pTmp = template_StdDBFmt;
|
||||||
|
tplAddLine(" StdDBFmt", &pTmp);
|
||||||
|
+ pTmp = template_SysklogdFileFormat;
|
||||||
|
+ tplAddLine("RSYSLOG_SysklogdFileFormat", &pTmp);
|
||||||
|
pTmp = template_StdPgSQLFmt;
|
||||||
|
tplAddLine(" StdPgSQLFmt", &pTmp);
|
||||||
|
pTmp = template_spoofadr;
|
53
rsyslog-5.8.7-sysklogd-compat-2-option.patch
Normal file
53
rsyslog-5.8.7-sysklogd-compat-2-option.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
diff -up rsyslog-5.8.7/doc/rsyslog_conf_global.html.orig rsyslog-5.8.7/doc/rsyslog_conf_global.html
|
||||||
|
--- rsyslog-5.8.7/doc/rsyslog_conf_global.html.orig 2012-01-20 14:17:43.565424577 +0100
|
||||||
|
+++ rsyslog-5.8.7/doc/rsyslog_conf_global.html 2012-01-20 14:36:41.208123930 +0100
|
||||||
|
@@ -143,6 +143,7 @@ our paper on <a href="multi_ruleset.html
|
||||||
|
<li><a href="rsconf1_escape8bitcharsonreceive.html">$Escape8BitCharactersOnReceive</a></li>
|
||||||
|
<li><a href="rsconf1_escapecontrolcharactersonreceive.html">$EscapeControlCharactersOnReceive</a></li>
|
||||||
|
<li><b>$EscapeControlCharactersOnReceive</b> [<b>on</b>|off] - escape USASCII HT character</li>
|
||||||
|
+<li>$SpaceLFOnReceive [on/<b>off</b>] - instructs rsyslogd to replace LF with spaces during message reception (sysklogd compatibility aid)</li>
|
||||||
|
<li>$ErrorMessagesToStderr [<b>on</b>|off] - direct rsyslogd error message to stderr (in addition to other targets)</li>
|
||||||
|
<li><a href="rsconf1_failonchownfailure.html">$FailOnChownFailure</a></li>
|
||||||
|
<li><a href="rsconf1_filecreatemode.html">$FileCreateMode</a></li>
|
||||||
|
diff -up rsyslog-5.8.7/runtime/parser.c.orig rsyslog-5.8.7/runtime/parser.c
|
||||||
|
--- rsyslog-5.8.7/runtime/parser.c.orig 2012-01-20 14:17:55.421275542 +0100
|
||||||
|
+++ rsyslog-5.8.7/runtime/parser.c 2012-01-20 15:04:00.664515268 +0100
|
||||||
|
@@ -60,6 +60,7 @@ DEFobjCurrIf(ruleset)
|
||||||
|
/* config data */
|
||||||
|
static uchar cCCEscapeChar = '#';/* character to be used to start an escape sequence for control chars */
|
||||||
|
static int bEscapeCCOnRcv = 1; /* escape control characters on reception: 0 - no, 1 - yes */
|
||||||
|
+static int bSpaceLFOnRcv = 0; /* replace newlines with spaces on reception: 0 - no, 1 - yes */
|
||||||
|
static int bEscape8BitChars = 0; /* escape characters > 127 on reception: 0 - no, 1 - yes */
|
||||||
|
static int bEscapeTab = 1; /* escape tab control character when doing CC escapes: 0 - no, 1 - yes */
|
||||||
|
static int bDropTrailingLF = 1; /* drop trailing LF's on reception? */
|
||||||
|
@@ -354,9 +355,13 @@ SanitizeMsg(msg_t *pMsg)
|
||||||
|
int bNeedSanitize = 0;
|
||||||
|
for(iSrc = 0 ; iSrc < lenMsg ; iSrc++) {
|
||||||
|
if(iscntrl(pszMsg[iSrc])) {
|
||||||
|
+ if(bSpaceLFOnRcv && pszMsg[iSrc] == '\n')
|
||||||
|
+ pszMsg[iSrc] = ' ';
|
||||||
|
+ else
|
||||||
|
if(pszMsg[iSrc] == '\0' || bEscapeCCOnRcv) {
|
||||||
|
bNeedSanitize = 1;
|
||||||
|
- break;
|
||||||
|
+ if (!bSpaceLFOnRcv)
|
||||||
|
+ break;
|
||||||
|
}
|
||||||
|
} else if(pszMsg[iSrc] > 127 && bEscape8BitChars) {
|
||||||
|
bNeedSanitize = 1;
|
||||||
|
@@ -645,6 +650,7 @@ resetConfigVariables(uchar __attribute__
|
||||||
|
{
|
||||||
|
cCCEscapeChar = '#';
|
||||||
|
bEscapeCCOnRcv = 1; /* default is to escape control characters */
|
||||||
|
+ bSpaceLFOnRcv = 0;
|
||||||
|
bEscape8BitChars = 0; /* default is to escape control characters */
|
||||||
|
bEscapeTab = 1; /* default is to escape control characters */
|
||||||
|
bDropTrailingLF = 1; /* default is to drop trailing LF's on reception */
|
||||||
|
@@ -698,6 +704,7 @@ BEGINObjClassInit(parser, 1, OBJ_IS_CORE
|
||||||
|
CHKiRet(regCfSysLineHdlr((uchar *)"controlcharacterescapeprefix", 0, eCmdHdlrGetChar, NULL, &cCCEscapeChar, NULL));
|
||||||
|
CHKiRet(regCfSysLineHdlr((uchar *)"droptrailinglfonreception", 0, eCmdHdlrBinary, NULL, &bDropTrailingLF, NULL));
|
||||||
|
CHKiRet(regCfSysLineHdlr((uchar *)"escapecontrolcharactersonreceive", 0, eCmdHdlrBinary, NULL, &bEscapeCCOnRcv, NULL));
|
||||||
|
+ CHKiRet(regCfSysLineHdlr((uchar *)"spacelfonreceive", 0, eCmdHdlrBinary, NULL, &bSpaceLFOnRcv, NULL));
|
||||||
|
CHKiRet(regCfSysLineHdlr((uchar *)"escape8bitcharactersonreceive", 0, eCmdHdlrBinary, NULL, &bEscape8BitChars, NULL));
|
||||||
|
CHKiRet(regCfSysLineHdlr((uchar *)"escapecontrolcharactertab", 0, eCmdHdlrBinary, NULL, &bEscapeTab, NULL));
|
||||||
|
CHKiRet(regCfSysLineHdlr((uchar *)"resetconfigvariables", 1, eCmdHdlrCustomHandler, resetConfigVariables, NULL, NULL));
|
19
rsyslog.spec
19
rsyslog.spec
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
Summary: Enhanced system logging and kernel message trapping daemon
|
Summary: Enhanced system logging and kernel message trapping daemon
|
||||||
Name: rsyslog
|
Name: rsyslog
|
||||||
Version: 5.8.6
|
Version: 5.8.7
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv3+
|
License: (GPLv3+ and ASL 2.0)
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: http://www.rsyslog.com/
|
URL: http://www.rsyslog.com/
|
||||||
Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz
|
Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz
|
||||||
@ -17,6 +17,8 @@ Source3: rsyslog.sysconfig
|
|||||||
Source4: rsyslog.log
|
Source4: rsyslog.log
|
||||||
# tweak the upstream service file to honour configuration from /etc/sysconfig/rsyslog
|
# tweak the upstream service file to honour configuration from /etc/sysconfig/rsyslog
|
||||||
Patch0: rsyslog-5.8.5-systemd.patch
|
Patch0: rsyslog-5.8.5-systemd.patch
|
||||||
|
Patch1: rsyslog-5.8.7-sysklogd-compat-1-template.patch
|
||||||
|
Patch2: rsyslog-5.8.7-sysklogd-compat-2-option.patch
|
||||||
|
|
||||||
BuildRequires: zlib-devel
|
BuildRequires: zlib-devel
|
||||||
BuildRequires: systemd-units >= 18
|
BuildRequires: systemd-units >= 18
|
||||||
@ -30,7 +32,7 @@ Requires(preun): systemd-units >= 20
|
|||||||
Requires(postun): /sbin/service
|
Requires(postun): /sbin/service
|
||||||
Requires(postun): systemd-units >= 20
|
Requires(postun): systemd-units >= 20
|
||||||
Provides: syslog
|
Provides: syslog
|
||||||
Obsoletes: sysklogd
|
Obsoletes: sysklogd < 1.5-11
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
%package sysvinit
|
%package sysvinit
|
||||||
@ -139,6 +141,8 @@ of source ports.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%ifarch sparc64
|
%ifarch sparc64
|
||||||
@ -312,6 +316,13 @@ mv /var/lock/subsys/rsyslogd /var/lock/subsys/rsyslog
|
|||||||
%{_libdir}/rsyslog/omudpspoof.so
|
%{_libdir}/rsyslog/omudpspoof.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jan 23 2012 Tomas Heinrich <theinric@redhat.com> 5.8.7-1
|
||||||
|
- upgrade to new upstream version 5.8.7
|
||||||
|
- change license from 'GPLv3+' to '(GPLv3+ and ASL 2.0)'
|
||||||
|
http://blog.gerhards.net/2012/01/rsyslog-licensing-update.html
|
||||||
|
- use a specific version for obsoleting sysklogd
|
||||||
|
- add patches for better sysklogd compatibility (taken from upstream)
|
||||||
|
|
||||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.8.6-2
|
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.8.6-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user