Upgrade to upstream version 7.2.2

This commit is contained in:
Tomas Heinrich 2012-11-20 13:49:28 +01:00
parent 572e84a95b
commit 0a2cde62b8
11 changed files with 284 additions and 364 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ rsyslog-4.6.3.tar.gz
/rsyslog-5.8.6.tar.gz /rsyslog-5.8.6.tar.gz
/rsyslog-5.8.7.tar.gz /rsyslog-5.8.7.tar.gz
/rsyslog-5.8.11.tar.gz /rsyslog-5.8.11.tar.gz
/rsyslog-7.2.2.tar.gz

View File

@ -1,45 +0,0 @@
diff -up rsyslog-5.8.11/runtime/debug.c.orig rsyslog-5.8.11/runtime/debug.c
--- rsyslog-5.8.11/runtime/debug.c.orig 2012-05-23 17:41:49.442845286 +0200
+++ rsyslog-5.8.11/runtime/debug.c 2012-05-23 17:42:34.202282641 +0200
@@ -68,7 +68,7 @@ static int bPrintAllDebugOnExit = 0;
static int bAbortTrace = 1; /* print a trace after SIGABRT or SIGSEGV */
static char *pszAltDbgFileName = NULL; /* if set, debug output is *also* sent to here */
static int altdbg = -1; /* and the handle for alternate debug output */
-static int stddbg;
+int stddbg = 1; /* the handle for regular debug output, set to stdout if not forking, -1 otherwise */
/* list of files/objects that should be printed */
typedef struct dbgPrintName_s {
@@ -1297,8 +1297,6 @@ dbgGetRuntimeOptions(void)
uchar *optname;
/* set some defaults */
- stddbg = 1;
-
if((pszOpts = (uchar*) getenv("RSYSLOG_DEBUG")) != NULL) {
/* we have options set, so let's process them */
while(dbgGetRTOptNamVal(&pszOpts, &optname, &optval)) {
diff -up rsyslog-5.8.11/runtime/debug.h.orig rsyslog-5.8.11/runtime/debug.h
--- rsyslog-5.8.11/runtime/debug.h.orig 2012-05-23 17:41:53.392795633 +0200
+++ rsyslog-5.8.11/runtime/debug.h 2012-05-23 17:42:34.203282628 +0200
@@ -35,6 +35,7 @@
/* external static data elements (some time to be replaced) */
extern int Debug; /* debug flag - read-only after startup */
extern int debugging_on; /* read-only, except on sig USR1 */
+extern int stddbg; /* the handle for regular debug output, set to stdout if not forking, -1 otherwise */
/* data types */
diff -up rsyslog-5.8.11/tools/syslogd.c.orig rsyslog-5.8.11/tools/syslogd.c
--- rsyslog-5.8.11/tools/syslogd.c.orig 2012-05-03 13:52:27.000000000 +0200
+++ rsyslog-5.8.11/tools/syslogd.c 2012-05-23 17:42:34.210282540 +0200
@@ -2514,6 +2514,9 @@ doGlblProcessInit(void)
sigAct.sa_handler = doexit;
sigaction(SIGTERM, &sigAct, NULL);
+ /* stop writing debug messages to stdout (if debugging is on) */
+ stddbg = -1;
+
if (fork()) {
/* Parent process
*/

View File

@ -1,14 +0,0 @@
diff -up rsyslog-5.8.11/rsyslog.service.in.orig rsyslog-5.8.11/rsyslog.service.in
--- rsyslog-5.8.11/rsyslog.service.in.orig 2012-06-20 18:28:14.561697697 +0200
+++ rsyslog-5.8.11/rsyslog.service.in 2012-06-20 18:28:45.554308105 +0200
@@ -2,8 +2,8 @@
Description=System Logging Service
[Service]
-ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service
-ExecStart=@sbindir@/rsyslogd -n -c5
+EnvironmentFile=-/etc/sysconfig/rsyslog
+ExecStart=@sbindir@/rsyslogd -n $SYSLOGD_OPTIONS
Sockets=syslog.socket
StandardOutput=null

View File

@ -1,34 +0,0 @@
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;

View File

@ -1,53 +0,0 @@
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));

View File

@ -0,0 +1,44 @@
diff -up rsyslog-7.2.1/runtime/msg.c.orig rsyslog-7.2.1/runtime/msg.c
--- rsyslog-7.2.1/runtime/msg.c.orig 2012-10-29 11:33:30.000000000 +0100
+++ rsyslog-7.2.1/runtime/msg.c 2012-11-14 08:58:20.235584832 +0100
@@ -3752,6 +3752,22 @@
RETiRet;
}
+static rsRetVal
+jsonMergeNonOverwrite(struct json_object *existing, struct json_object *json)
+{
+ DEFiRet;
+ struct json_object_iter it;
+
+ json_object_object_foreachC(existing, it) {
+ json_object_object_add(json, it.key, json_object_get(it.val));
+ }
+
+ CHKiRet(jsonMerge(existing, json));
+
+finalize_it:
+ RETiRet;
+}
+
/* find a JSON structure element (field or container doesn't matter). */
rsRetVal
jsonFind(msg_t *pM, es_str_t *propName, struct json_object **jsonres)
@@ -3795,7 +3811,7 @@
if(pM->json == NULL)
pM->json = json;
else
- CHKiRet(jsonMerge(pM->json, json));
+ CHKiRet(jsonMergeNonOverwrite(pM->json, json));
} else {
if(pM->json == NULL) {
/* now we need a root obj */
@@ -3808,7 +3824,7 @@
json_object_object_add(parent, (char*)leaf, json);
} else {
if(json_object_get_type(json) == json_type_object) {
- CHKiRet(jsonMerge(pM->json, json));
+ CHKiRet(jsonMergeNonOverwrite(pM->json, json));
} else {
//dbgprintf("AAAA: leafnode already exists, type is %d, update with %d\n", (int)json_object_get_type(leafnode), (int)json_object_get_type(json));
/* TODO: improve the code below, however, the current

View File

@ -1,8 +1,8 @@
diff -up rsyslog-5.8.11/tools/rsyslogd.8.orig rsyslog-5.8.11/tools/rsyslogd.8 diff -up rsyslog-7.2.2/tools/rsyslogd.8.orig rsyslog-7.2.2/tools/rsyslogd.8
--- rsyslog-5.8.11/tools/rsyslogd.8.orig 2012-05-23 17:40:17.370002681 +0200 --- rsyslog-7.2.2/tools/rsyslogd.8.orig 2012-11-20 16:31:26.530284950 +0100
+++ rsyslog-5.8.11/tools/rsyslogd.8 2012-05-23 17:40:28.875858047 +0200 +++ rsyslog-7.2.2/tools/rsyslogd.8 2012-11-20 16:31:34.172188889 +0100
@@ -145,11 +145,7 @@ compatibility-mode config file directive @@ -131,11 +131,7 @@ syntax errors are reported. Please note
simply copy them from your logfile and paste them to the config. technical and orignally targeted towards developers.
.TP .TP
.B "\-d" .B "\-d"
-Turns on debug mode. Using this the daemon will not proceed a -Turns on debug mode. Using this the daemon will not proceed a
@ -14,7 +14,7 @@ diff -up rsyslog-5.8.11/tools/rsyslogd.8.orig rsyslog-5.8.11/tools/rsyslogd.8
.TP .TP
.BI "\-f " "config file" .BI "\-f " "config file"
Specify an alternative configuration file instead of Specify an alternative configuration file instead of
@@ -308,11 +304,17 @@ be prevented by using GSS-API authentica @@ -294,11 +290,17 @@ be prevented by using GSS-API authentica
to think about syslog network security before enabling it. to think about syslog network security before enabling it.
.LP .LP
.SH DEBUGGING .SH DEBUGGING
@ -35,7 +35,7 @@ diff -up rsyslog-5.8.11/tools/rsyslogd.8.orig rsyslog-5.8.11/tools/rsyslogd.8
.SH FILES .SH FILES
.PD 0 .PD 0
.TP .TP
@@ -339,10 +341,17 @@ is specified during compilation (e.g. /u @@ -325,10 +327,17 @@ is specified during compilation (e.g. /u
.SH ENVIRONMENT .SH ENVIRONMENT
.TP .TP
.B RSYSLOG_DEBUG .B RSYSLOG_DEBUG

View File

@ -0,0 +1,13 @@
diff -up rsyslog-7.2.2/rsyslog.service.in.orig rsyslog-7.2.2/rsyslog.service.in
--- rsyslog-7.2.2/rsyslog.service.in.orig 2012-11-20 13:43:49.532705656 +0100
+++ rsyslog-7.2.2/rsyslog.service.in 2012-11-20 13:44:21.158308110 +0100
@@ -2,7 +2,8 @@
Description=System Logging Service
[Service]
-ExecStart=@sbindir@/rsyslogd -n
+EnvironmentFile=-/etc/sysconfig/rsyslog
+ExecStart=@sbindir@/rsyslogd -n $SYSLOGD_OPTIONS
Sockets=syslog.socket
StandardOutput=null

View File

@ -1,93 +0,0 @@
#!/bin/bash
#
# rsyslog Startup script for rsyslog.
#
# chkconfig: 2345 12 88
# description: Syslog is the facility by which many daemons use to log \
# messages to various system log files. It is a good idea to always \
# run rsyslog.
### BEGIN INIT INFO
# Provides: $syslog
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Enhanced system logging and kernel message trapping daemons
# Description: Rsyslog is an enhanced multi-threaded syslogd supporting,
# among others, MySQL, syslog/tcp, RFC 3195, permitted
# sender lists, filtering on any message part, and fine
# grain output format control.
### END INIT INFO
# Source function library.
. /etc/init.d/functions
RETVAL=0
PIDFILE=/var/run/syslogd.pid
prog=rsyslog
exec=/sbin/rsyslogd
lockfile=/var/lock/subsys/$prog
# Source config
if [ -f /etc/sysconfig/$prog ] ; then
. /etc/sysconfig/$prog
fi
start() {
[ -x $exec ] || exit 5
umask 077
echo -n $"Starting system logger: "
daemon --pidfile="${PIDFILE}" $exec -i "${PIDFILE}" $SYSLOGD_OPTIONS
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch $lockfile
return $RETVAL
}
stop() {
echo -n $"Shutting down system logger: "
killproc -p "${PIDFILE}" $exec
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $lockfile
return $RETVAL
}
rhstatus() {
status -p "${PIDFILE}" -l $prog $exec
}
restart() {
stop
start
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
exit 3
;;
force-reload)
restart
;;
status)
rhstatus
;;
condrestart|try-restart)
rhstatus >/dev/null 2>&1 || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}"
exit 3
esac
exit $?

View File

@ -5,47 +5,77 @@
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.11 Version: 7.2.2
Release: 3%{?dist} Release: 1%{?dist}
License: (GPLv3+ and ASL 2.0) 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
Source1: rsyslog.init
Source2: rsyslog.conf Source2: rsyslog.conf
Source3: rsyslog.sysconfig 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.11-systemd.patch Patch0: rsyslog-7.2.2-systemd.patch
Patch1: rsyslog-5.8.7-sysklogd-compat-1-template.patch Patch1: rsyslog-7.2.2-manpage-dbg-mode.patch
Patch2: rsyslog-5.8.7-sysklogd-compat-2-option.patch # prevent modification of trusted properties (proposed upstream)
Patch3: rsyslog-5.8.11-manpage-dbg-mode.patch Patch2: rsyslog-7.2.1-msg_c_nonoverwrite_merge.patch
Patch4: rsyslog-5.8.11-close-fd1-when-forking.patch
Patch5: rsyslog-5.8.11-enlarge-cert-info-bufs.patch Patch5: rsyslog-5.8.11-enlarge-cert-info-bufs.patch
BuildRequires: bison
BuildRequires: flex
BuildRequires: json-c-devel
BuildRequires: libuuid-devel
BuildRequires: pkgconfig
BuildRequires: zlib-devel BuildRequires: zlib-devel
BuildRequires: systemd-units >= 18
Requires: logrotate >= 3.5.2 Requires: logrotate >= 3.5.2
Requires: bash >= 2.0 Requires: bash >= 2.0
Requires(post): /sbin/chkconfig coreutils Requires(post): systemd
Requires(post): systemd-units >= 20 Requires(preun): systemd
Requires(post): systemd-sysv Requires(postun): systemd
Requires(preun): /sbin/service
Requires(preun): systemd-units >= 20
Requires(postun): /sbin/service
Requires(postun): systemd-units >= 20
Provides: syslog Provides: syslog
Obsoletes: sysklogd < 1.5-11 Obsoletes: sysklogd < 1.5-11
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%package sysvinit %package doc
Summary: SysV init script for rsyslog Summary: Documentation for rsyslog
Group: Documentation
%package elasticsearch
Summary: ElasticSearch output module for rsyslog
Group: System Environment/Daemons
Requires: %name = %version-%release
BuildRequires: libcurl-devel
%package hiredis
Summary: Redis support for rsyslog
Group: System Environment/Daemons
Requires: %name = %version-%release
BuildRequires: hiredis-devel
%package mmjsonparse
Summary: JSON enhanced logging support
Group: System Environment/Daemons
Requires: %name = %version-%release
%package mmnormalize
Summary: Log normalization support for rsyslog
Group: System Environment/Daemons
Requires: %name = %version-%release
BuildRequires: libestr-devel libee-devel liblognorm-devel
%package mmaudit
Summary: Message modification module supporting Linux audit format
Group: System Environment/Daemons
Requires: %name = %version-%release
%package mmsnmptrapd
Summary: Message modification module for snmptrapd generated messages
Group: System Environment/Daemons Group: System Environment/Daemons
Requires: %name = %version-%release Requires: %name = %version-%release
Requires(post): /sbin/chkconfig
%package libdbi %package libdbi
Summary: libdbi database support for rsyslog Summary: Libdbi database support for rsyslog
Group: System Environment/Daemons Group: System Environment/Daemons
Requires: %name = %version-%release Requires: %name = %version-%release
BuildRequires: libdbi-devel BuildRequires: libdbi-devel
@ -56,6 +86,12 @@ Group: System Environment/Daemons
Requires: %name = %version-%release Requires: %name = %version-%release
BuildRequires: mysql-devel >= 4.0 BuildRequires: mysql-devel >= 4.0
%package mongodb
Summary: MongoDB support for rsyslog
Group: System Environment/Daemons
Requires: %name = %version-%release
BuildRequires: libmongo-client-devel
%package pgsql %package pgsql
Summary: PostgresSQL support for rsyslog Summary: PostgresSQL support for rsyslog
Group: System Environment/Daemons Group: System Environment/Daemons
@ -66,13 +102,13 @@ BuildRequires: postgresql-devel
Summary: GSSAPI authentication and encryption support for rsyslog Summary: GSSAPI authentication and encryption support for rsyslog
Group: System Environment/Daemons Group: System Environment/Daemons
Requires: %name = %version-%release Requires: %name = %version-%release
BuildRequires: krb5-devel BuildRequires: krb5-devel
%package relp %package relp
Summary: RELP protocol support for rsyslog Summary: RELP protocol support for rsyslog
Group: System Environment/Daemons Group: System Environment/Daemons
Requires: %name = %version-%release Requires: %name = %version-%release
BuildRequires: librelp-devel BuildRequires: librelp-devel >= 1.0.1
%package gnutls %package gnutls
Summary: TLS protocol support for rsyslog Summary: TLS protocol support for rsyslog
@ -100,9 +136,30 @@ and can be used as a drop-in replacement. Rsyslog is simple to set up, with
advanced features suitable for enterprise-class, encryption-protected syslog advanced features suitable for enterprise-class, encryption-protected syslog
relay chains. relay chains.
%description sysvinit %description doc
SysV style init script for rsyslog. It needs to be installed only if systemd This subpackage contains documentation for rsyslog.
is not used as the system init process.
%description elasticsearch
This module provides the capability for rsyslog to feed logs directly into
Elasticsearch.
%description hiredis
This module provides output to Redis.
%description mmjsonparse
This module provides the capability to recognize and parse JSON enhanced
syslog messages.
%description mmnormalize
This module provides the capability to normalize log messages via liblognorm.
%description mmaudit
This module provides message modification supporting Linux audit format
in various settings.
%description mmsnmptrapd
This message modification module takes messages generated from snmptrapd and
modifies them so that they look like they originated from the read originator.
%description libdbi %description libdbi
This module supports a large number of database systems via This module supports a large number of database systems via
@ -113,19 +170,23 @@ many systems. Drivers are available via the libdbi-drivers project.
The rsyslog-mysql package contains a dynamic shared object that will add The rsyslog-mysql package contains a dynamic shared object that will add
MySQL database support to rsyslog. MySQL database support to rsyslog.
%description mongodb
The rsyslog-mongodb package contains a dynamic shared object that will add
MongoDB database support to rsyslog.
%description pgsql %description pgsql
The rsyslog-pgsql package contains a dynamic shared object that will add The rsyslog-pgsql package contains a dynamic shared object that will add
PostgreSQL database support to rsyslog. PostgreSQL database support to rsyslog.
%description gssapi %description gssapi
The rsyslog-gssapi package contains the rsyslog plugins which support GSSAPI The rsyslog-gssapi package contains the rsyslog plugins which support GSSAPI
authentication and secure connections. GSSAPI is commonly used for Kerberos authentication and secure connections. GSSAPI is commonly used for Kerberos
authentication. authentication.
%description relp %description relp
The rsyslog-relp package contains the rsyslog plugins that provide The rsyslog-relp package contains the rsyslog plugins that provide
the ability to receive syslog messages via the reliable RELP the ability to receive syslog messages via the reliable RELP
protocol. protocol.
%description gnutls %description gnutls
The rsyslog-gnutls package contains the rsyslog plugins that provide the The rsyslog-gnutls package contains the rsyslog plugins that provide the
@ -146,8 +207,6 @@ of source ports.
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1 %patch5 -p1
%build %build
@ -159,48 +218,60 @@ export LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now"
export CFLAGS="$RPM_OPT_FLAGS -fpie -DSYSLOGD_PIDNAME=\\\"syslogd.pid\\\"" export CFLAGS="$RPM_OPT_FLAGS -fpie -DSYSLOGD_PIDNAME=\\\"syslogd.pid\\\""
export LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" export LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now"
%endif %endif
%configure --disable-static \ # the hiredis-devel package doesn't provide a pkg-config file
--disable-testbench \ export HIREDIS_CFLAGS=-I/usr/include/hiredis
--enable-gnutls \ export HIREDIS_LIBS=-L%{_libdir}
--enable-gssapi-krb5 \ %configure \
--enable-imfile \ --prefix=/usr \
--enable-impstats \ --disable-static \
--enable-imptcp \ --disable-testbench \
--enable-libdbi \ --enable-elasticsearch \
--enable-mail \ --enable-gnutls \
--enable-mysql \ --enable-gssapi-krb5 \
--enable-omprog \ --enable-imdiag \
--enable-omudpspoof \ --enable-imfile \
--enable-omuxsock \ --enable-impstats \
--enable-pgsql \ --enable-imptcp \
--enable-pmlastmsg \ --enable-kmsg \
--enable-relp \ --enable-libdbi \
--enable-snmp \ --enable-mail \
--enable-unlimited-select --enable-mmaudit \
--enable-mmjsonparse \
--enable-mmnormalize \
--enable-mmsnmptrapd \
--enable-mysql \
--enable-omhiredis \
--enable-ommongodb \
--enable-omprog \
--enable-omstdout \
--enable-omudpspoof \
--enable-omuxsock \
--enable-pgsql \
--enable-pmaixforwardedfrom \
--enable-pmcisconames \
--enable-pmlastmsg \
--enable-pmrfc3164sd \
--enable-pmsnare \
--enable-relp \
--enable-snmp \
--enable-unlimited-select
make make
%install %install
rm -rf $RPM_BUILD_ROOT make DESTDIR=%{buildroot} install
make install DESTDIR=$RPM_BUILD_ROOT install -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig
install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d
install -d -m 755 %{buildroot}%{_sysconfdir}/rsyslog.d
install -d -m 700 %{buildroot}%{rsyslog_statedir}
install -d -m 700 %{buildroot}%{rsyslog_pkidir}
install -d -m 755 $RPM_BUILD_ROOT%{_initrddir} install -p -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/rsyslog.conf
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig install -p -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/sysconfig/rsyslog
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d install -p -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/logrotate.d/syslog
install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/rsyslog.d
install -d -m 700 $RPM_BUILD_ROOT%{rsyslog_statedir}
install -d -m 700 $RPM_BUILD_ROOT%{rsyslog_pkidir}
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/rsyslog
install -p -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rsyslog.conf
install -p -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/rsyslog
install -p -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/syslog
#get rid of *.la #get rid of *.la
rm $RPM_BUILD_ROOT/%{_libdir}/rsyslog/*.la rm %{buildroot}%{_libdir}/rsyslog/*.la
%clean
rm -rf $RPM_BUILD_ROOT
%post %post
for n in /var/log/{messages,secure,maillog,spooler} for n in /var/log/{messages,secure,maillog,spooler}
@ -208,52 +279,32 @@ do
[ -f $n ] && continue [ -f $n ] && continue
umask 066 && touch $n umask 066 && touch $n
done done
if [ $1 -eq 1 ]; then %systemd_post rsyslog.service
# On install (not upgrade), enable (but don't start) the
# units by default
/bin/systemctl enable rsyslog.service >/dev/null 2>&1 || :
fi
%preun %preun
if [ $1 = 0 ]; then %systemd_preun rsyslog.service
# On uninstall (not upgrade), disable and stop the units
/bin/systemctl --no-reload disable rsyslog.service >/dev/null 2>&1 || :
/bin/systemctl stop rsyslog.service >/dev/null 2>&1 || :
fi
%postun %postun
# Reload init system configuration, to make systemd honour changed %systemd_postun_with_restart rsyslog.service
# or deleted unit files
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# On upgrade (not uninstall), optionally, restart the daemon
/bin/systemctl try-restart rsyslog.service >/dev/null 2>&1 || :
fi
%triggerun -- rsyslog < 5.7.8-1
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply rsyslog
# to migrate them to systemd targets
%{_bindir}/systemd-sysv-convert --save rsyslog >/dev/null 2>&1 || :
/bin/systemctl enable rsyslog.service >/dev/null 2>&1 || :
/sbin/chkconfig --del rsyslog >/dev/null 2>&1 || :
/bin/systemctl try-restart rsyslog.service >/dev/null 2>&1 || :
# previous versions used a different lock file, which would break condrestart
[ -f /var/lock/subsys/rsyslogd ] || exit 0
mv /var/lock/subsys/rsyslogd /var/lock/subsys/rsyslog
[ -f /var/run/rklogd.pid ] || exit 0
/bin/kill `cat /var/run/rklogd.pid 2> /dev/null` > /dev/null 2>&1 ||:
%triggerpostun -n rsyslog-sysvinit -- rsyslog < 5.8.2-3
/sbin/chkconfig --add rsyslog >/dev/null 2>&1 || :
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%doc AUTHORS COPYING* NEWS README ChangeLog doc/*html %doc AUTHORS COPYING* NEWS README ChangeLog
%dir %{_libdir}/rsyslog %dir %{_libdir}/rsyslog
%dir %{_sysconfdir}/rsyslog.d
%dir %{rsyslog_statedir}
%dir %{rsyslog_pkidir}
%{_sbindir}/rsyslogd
%{_mandir}/*/*
%{_unitdir}/rsyslog.service
%config(noreplace) %{_sysconfdir}/rsyslog.conf
%config(noreplace) %{_sysconfdir}/sysconfig/rsyslog
%config(noreplace) %{_sysconfdir}/logrotate.d/syslog
# plugins
%{_libdir}/rsyslog/imdiag.so
%{_libdir}/rsyslog/imfile.so %{_libdir}/rsyslog/imfile.so
%{_libdir}/rsyslog/imklog.so %{_libdir}/rsyslog/imklog.so
%{_libdir}/rsyslog/imkmsg.so
%{_libdir}/rsyslog/immark.so %{_libdir}/rsyslog/immark.so
%{_libdir}/rsyslog/impstats.so %{_libdir}/rsyslog/impstats.so
%{_libdir}/rsyslog/imptcp.so %{_libdir}/rsyslog/imptcp.so
@ -272,31 +323,54 @@ mv /var/lock/subsys/rsyslogd /var/lock/subsys/rsyslog
%{_libdir}/rsyslog/ommail.so %{_libdir}/rsyslog/ommail.so
%{_libdir}/rsyslog/omprog.so %{_libdir}/rsyslog/omprog.so
%{_libdir}/rsyslog/omruleset.so %{_libdir}/rsyslog/omruleset.so
%{_libdir}/rsyslog/omstdout.so
%{_libdir}/rsyslog/omuxsock.so %{_libdir}/rsyslog/omuxsock.so
%{_libdir}/rsyslog/pmaixforwardedfrom.so
%{_libdir}/rsyslog/pmcisconames.so
%{_libdir}/rsyslog/pmlastmsg.so %{_libdir}/rsyslog/pmlastmsg.so
%{_unitdir}/rsyslog.service %{_libdir}/rsyslog/pmrfc3164sd.so
%{_libdir}/rsyslog/pmsnare.so
%config(noreplace) %{_sysconfdir}/rsyslog.conf %files doc
%config(noreplace) %{_sysconfdir}/sysconfig/rsyslog %doc doc/*html
%config(noreplace) %{_sysconfdir}/logrotate.d/syslog
%dir %{_sysconfdir}/rsyslog.d
%dir %{rsyslog_statedir}
%dir %{rsyslog_pkidir}
%{_sbindir}/rsyslogd
%{_mandir}/*/*
%files sysvinit %files elasticsearch
%attr(0755,root,root) %{_initrddir}/rsyslog %defattr(-,root,root)
%{_libdir}/rsyslog/omelasticsearch.so
%files hiredis
%defattr(-,root,root)
%{_libdir}/rsyslog/omhiredis.so
%files libdbi %files libdbi
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/rsyslog/omlibdbi.so %{_libdir}/rsyslog/omlibdbi.so
%files mmaudit
%defattr(-,root,root)
%{_libdir}/rsyslog/mmaudit.so
%files mmjsonparse
%defattr(-,root,root)
%{_libdir}/rsyslog/mmjsonparse.so
%files mmnormalize
%defattr(-,root,root)
%{_libdir}/rsyslog/mmnormalize.so
%files mmsnmptrapd
%defattr(-,root,root)
%{_libdir}/rsyslog/mmsnmptrapd.so
%files mysql %files mysql
%defattr(-,root,root) %defattr(-,root,root)
%doc plugins/ommysql/createDB.sql %doc plugins/ommysql/createDB.sql
%{_libdir}/rsyslog/ommysql.so %{_libdir}/rsyslog/ommysql.so
%files mongodb
%defattr(-,root,root)
%{_libdir}/rsyslog/ommongodb.so
%files pgsql %files pgsql
%defattr(-,root,root) %defattr(-,root,root)
%doc plugins/ompgsql/createDB.sql %doc plugins/ompgsql/createDB.sql
@ -326,6 +400,33 @@ mv /var/lock/subsys/rsyslogd /var/lock/subsys/rsyslog
%{_libdir}/rsyslog/omudpspoof.so %{_libdir}/rsyslog/omudpspoof.so
%changelog %changelog
* Tue Nov 20 2012 Tomas Heinrich <theinric@redhat.com> 7.2.2-1
- upgrade to upstream version 7.2.2
update BuildRequires
- remove patches merged upstream
rsyslog-5.8.7-sysklogd-compat-1-template.patch
rsyslog-5.8.7-sysklogd-compat-2-option.patch
rsyslog-5.8.11-close-fd1-when-forking.patch
- add patch from Milan Bartos <mbartos@redhat.com>
rsyslog-7.2.1-msg_c_nonoverwrite_merge.patch
- remove the rsyslog-sysvinit package
- clean up BuildRequires, Requires
- remove the 'BuildRoot' tag
- split off a doc package
- compile additional modules (some of them in separate packages):
elasticsearch
hiredis
mmjsonparse
mmnormalize
mmaudit
mmsnmptrapd
mongodb
- correct impossible timestamps in older changelog entries
- correct typos, trailing spaces, etc
- s/RPM_BUILD_ROOT/{buildroot}/
- remove the 'clean' section
- replace post* scriptlets with systemd macros
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.8.11-3 * Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.8.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
@ -363,7 +464,7 @@ mv /var/lock/subsys/rsyslogd /var/lock/subsys/rsyslog
- modify logrotate configuration to omit boot.log - modify logrotate configuration to omit boot.log
Resolves: #745093 Resolves: #745093
* Mon Sep 06 2011 Tomas Heinrich <theinric@redhat.com> 5.8.5-2 * Tue Sep 06 2011 Tomas Heinrich <theinric@redhat.com> 5.8.5-2
- add systemd-units to BuildRequires for the _unitdir macro definition - add systemd-units to BuildRequires for the _unitdir macro definition
* Mon Sep 05 2011 Tomas Heinrich <theinric@redhat.com> 5.8.5-1 * Mon Sep 05 2011 Tomas Heinrich <theinric@redhat.com> 5.8.5-1
@ -493,7 +594,7 @@ mv /var/lock/subsys/rsyslogd /var/lock/subsys/rsyslog
* Sat Jan 24 2009 Caolán McNamara <caolanm@redhat.com> 3.21.9-3 * Sat Jan 24 2009 Caolán McNamara <caolanm@redhat.com> 3.21.9-3
- rebuild for dependencies - rebuild for dependencies
* Tue Jan 07 2009 Tomas Heinrich <theinric@redhat.com> 3.21.9-2 * Wed Jan 07 2009 Tomas Heinrich <theinric@redhat.com> 3.21.9-2
- fix several legacy options handling - fix several legacy options handling
- fix internal message output (#478612) - fix internal message output (#478612)
@ -558,7 +659,7 @@ mv /var/lock/subsys/rsyslogd /var/lock/subsys/rsyslog
* Fri Apr 04 2008 Peter Vrabec <pvrabec@redhat.com> 3.14.1-1 * Fri Apr 04 2008 Peter Vrabec <pvrabec@redhat.com> 3.14.1-1
- upgrade - upgrade
* Mon Mar 25 2008 Peter Vrabec <pvrabec@redhat.com> 3.12.4-1 * Tue Mar 25 2008 Peter Vrabec <pvrabec@redhat.com> 3.12.4-1
- upgrade - upgrade
* Wed Mar 19 2008 Peter Vrabec <pvrabec@redhat.com> 3.12.3-1 * Wed Mar 19 2008 Peter Vrabec <pvrabec@redhat.com> 3.12.3-1
@ -686,7 +787,7 @@ mv /var/lock/subsys/rsyslogd /var/lock/subsys/rsyslog
- new upstream release with IPv6 support - new upstream release with IPv6 support
* Tue Jun 26 2007 Peter Vrabec <pvrabec@redhat.com> 1.13.5-3 * Tue Jun 26 2007 Peter Vrabec <pvrabec@redhat.com> 1.13.5-3
- add BuildRequires for zlib compression feature - add BuildRequires for zlib compression feature
* Mon Jun 25 2007 Peter Vrabec <pvrabec@redhat.com> 1.13.5-2 * Mon Jun 25 2007 Peter Vrabec <pvrabec@redhat.com> 1.13.5-2
- some spec file adjustments. - some spec file adjustments.

View File

@ -1 +1 @@
0e5ea5228310bebc0f9f6ddf0c3f5a84 rsyslog-5.8.11.tar.gz 31f6e9d48a7cf89537bd4e18d962b4d0 rsyslog-7.2.2.tar.gz