Accepting request 39733 from Base:System
Copy from Base:System/rsyslog based on submit request 39733 from user mtomaschewski OBS-URL: https://build.opensuse.org/request/show/39733 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rsyslog?expand=0&rev=11
This commit is contained in:
parent
28a32503cd
commit
8737c542a0
@ -1,3 +1,32 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 28 17:21:03 UTC 2010 - mt@suse.de
|
||||||
|
|
||||||
|
- Added $klogConsoleLogLevel 1 to the config, to use same default
|
||||||
|
[KERNEL_LOGLEVEL in /etc/sysconfig/syslog] as klogd (bnc#593699).
|
||||||
|
- Improved filter to discard iptables msgs higher err on console,
|
||||||
|
changed to set default file template instead per file, removed
|
||||||
|
duplicate filters (bnc#593699).
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 27 12:01:44 UTC 2010 - mt@suse.de
|
||||||
|
|
||||||
|
- Applied fix to avoid a tight send-retry loop in case there is
|
||||||
|
nobody receiving the messages sent to the xconsole pipe
|
||||||
|
(bnc#597293, http://bugzilla.adiscon.com/show_bug.cgi?id=186).
|
||||||
|
- Disabled relp support for < 11.3 (librelp is new)
|
||||||
|
- Fixed to create /var/run/rsyslog in post-install (rpmlint)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Apr 14 12:16:29 UTC 2010 - mrueckert@suse.de
|
||||||
|
|
||||||
|
- dropped install_all_modules_in_lib conditional and all related
|
||||||
|
code
|
||||||
|
- new subpackages
|
||||||
|
- enable RELP support. new depdendency librelp
|
||||||
|
- enable diagnotic tools.
|
||||||
|
- enable UDP spoof support. new dependency libnet
|
||||||
|
- moved module paths to 2 variables defined on top of the spec
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Apr 13 08:56:15 UTC 2010 - mt@suse.de
|
Tue Apr 13 08:56:15 UTC 2010 - mt@suse.de
|
||||||
|
|
||||||
|
104
rsyslog.conf.in
104
rsyslog.conf.in
@ -21,106 +21,134 @@
|
|||||||
|
|
||||||
$ModLoad immark.so # provides --MARK-- message capability
|
$ModLoad immark.so # provides --MARK-- message capability
|
||||||
$ModLoad imuxsock.so # provides support for local system logging (e.g. via logger command)
|
$ModLoad imuxsock.so # provides support for local system logging (e.g. via logger command)
|
||||||
$ModLoad imklog.so # kernel logging (may be also provided by /sbin/klogd)
|
|
||||||
|
$ModLoad imklog.so # kernel logging (may be also provided by /sbin/klogd),
|
||||||
|
# see also http://www.rsyslog.com/doc-imklog.html.
|
||||||
|
$klogConsoleLogLevel 1 # set log level 1 (same as in /etc/sysconfig/syslog).
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
# Use traditional log format by default. To change it for a single
|
||||||
|
# file, append ";RSYSLOG_TraditionalFileFormat" to the filename.
|
||||||
|
#
|
||||||
|
$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Include config generated by /etc/init.d/syslog script
|
# Include config generated by /etc/init.d/syslog script
|
||||||
# using the SYSLOGD_ADDITIONAL_SOCKET* variables in the
|
# using the SYSLOGD_ADDITIONAL_SOCKET* variables in the
|
||||||
# /etc/sysconfig/syslog file.
|
# /etc/sysconfig/syslog file.
|
||||||
#
|
#
|
||||||
$IncludeConfig ADDITIONAL_SOCKETS
|
$IncludeConfig /var/run/rsyslog/additional-log-sockets.conf
|
||||||
|
|
||||||
#
|
#
|
||||||
# Include config files, that the admin provided? :
|
# Include config files, that the admin provided? :
|
||||||
#
|
#
|
||||||
$IncludeConfig ETC_RSYSLOG_D_GLOB
|
$IncludeConfig /etc/rsyslog.d/*.conf
|
||||||
|
|
||||||
|
|
||||||
###
|
###
|
||||||
|
# print most important on tty10 and on the xconsole pipe
|
||||||
#
|
#
|
||||||
# print most on tty10 and on the xconsole pipe
|
if ( \
|
||||||
#
|
/* kernel up to warning except of firewall */ \
|
||||||
kern.warning;*.err;authpriv.none /dev/tty10;RSYSLOG_TraditionalFileFormat
|
($syslogfacility-text == 'kern') and \
|
||||||
kern.warning;*.err;authpriv.none |/dev/xconsole;RSYSLOG_TraditionalFileFormat
|
($syslogseverity <= 4 /* warning */ ) and not \
|
||||||
|
($msg contains 'IN=' and $msg contains 'OUT=') \
|
||||||
|
) or ( \
|
||||||
|
/* up to errors except of facility authpriv */ \
|
||||||
|
($syslogseverity <= 3 /* errors */ ) and not \
|
||||||
|
($syslogfacility-text == 'authpriv') \
|
||||||
|
) \
|
||||||
|
then /dev/tty10
|
||||||
|
& |/dev/xconsole
|
||||||
|
|
||||||
|
|
||||||
|
# Emergency messages to everyone logged on (wall)
|
||||||
*.emerg *
|
*.emerg *
|
||||||
|
|
||||||
# enable this, if you want that root is informed
|
# enable this, if you want that root is informed
|
||||||
# immediately, e.g. of logins
|
# immediately, e.g. of logins
|
||||||
#*.alert root
|
#*.alert root
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# firewall messages into separate file and stop their further processing
|
# firewall messages into separate file and stop their further processing
|
||||||
#
|
#
|
||||||
if ($syslogfacility-text == 'kern') and \
|
if ($syslogfacility-text == 'kern') and \
|
||||||
($msg contains 'IN=' and $msg contains 'OUT=') then \
|
($msg contains 'IN=' and $msg contains 'OUT=') \
|
||||||
-/var/log/firewall;RSYSLOG_TraditionalFileFormat
|
then -/var/log/firewall
|
||||||
if ($syslogfacility-text == 'kern') and \
|
& ~
|
||||||
($msg contains 'IN=' and $msg contains 'OUT=') then \
|
|
||||||
~
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# acpid messages into separate file and stop their further processing
|
# acpid messages into separate file and stop their further processing
|
||||||
#
|
#
|
||||||
# => all acpid messages for debuging (uncomment if needed):
|
# => all acpid messages for debuging (uncomment if needed):
|
||||||
#if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \
|
#if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \
|
||||||
# -/var/log/acpid;RSYSLOG_TraditionalFileFormat
|
# -/var/log/acpid
|
||||||
#
|
#
|
||||||
# => up to notice (skip info and debug)
|
# => up to notice (skip info and debug)
|
||||||
if ($programname == 'acpid' or $syslogtag == '[acpid]:') and \
|
if ($programname == 'acpid' or $syslogtag == '[acpid]:') and \
|
||||||
($syslogseverity <= 5) then \
|
($syslogseverity <= 5 /* notice */) \
|
||||||
-/var/log/acpid;RSYSLOG_TraditionalFileFormat
|
then -/var/log/acpid
|
||||||
if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \
|
& ~
|
||||||
~
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# NetworkManager into separate file and stop their further processing
|
# NetworkManager into separate file and stop their further processing
|
||||||
#
|
#
|
||||||
if ($programname == 'NetworkManager') or \
|
if ($programname == 'NetworkManager') or \
|
||||||
($programname startswith 'nm-') then \
|
($programname startswith 'nm-') \
|
||||||
-/var/log/NetworkManager;RSYSLOG_TraditionalFileFormat
|
then -/var/log/NetworkManager
|
||||||
if ($programname == 'NetworkManager') or \
|
& ~
|
||||||
($programname startswith 'nm-') then \
|
|
||||||
~
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# email-messages
|
# email-messages
|
||||||
#
|
#
|
||||||
mail.* -/var/log/mail;RSYSLOG_TraditionalFileFormat
|
mail.* -/var/log/mail
|
||||||
mail.info -/var/log/mail.info;RSYSLOG_TraditionalFileFormat
|
mail.info -/var/log/mail.info
|
||||||
mail.warning -/var/log/mail.warn;RSYSLOG_TraditionalFileFormat
|
mail.warning -/var/log/mail.warn
|
||||||
mail.err /var/log/mail.err;RSYSLOG_TraditionalFileFormat
|
mail.err /var/log/mail.err
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# news-messages
|
# news-messages
|
||||||
#
|
#
|
||||||
news.crit -/var/log/news/news.crit;RSYSLOG_TraditionalFileFormat
|
news.crit -/var/log/news/news.crit
|
||||||
news.err -/var/log/news/news.err;RSYSLOG_TraditionalFileFormat
|
news.err -/var/log/news/news.err
|
||||||
news.notice -/var/log/news/news.notice;RSYSLOG_TraditionalFileFormat
|
news.notice -/var/log/news/news.notice
|
||||||
# enable this, if you want to keep all news messages
|
# enable this, if you want to keep all news messages
|
||||||
# in one file
|
# in one file
|
||||||
#news.* -/var/log/news.all;RSYSLOG_TraditionalFileFormat
|
#news.* -/var/log/news.all
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Warnings in one file
|
# Warnings in one file
|
||||||
#
|
#
|
||||||
*.=warning;*.=err -/var/log/warn;RSYSLOG_TraditionalFileFormat
|
*.=warning;*.=err -/var/log/warn
|
||||||
*.crit /var/log/warn;RSYSLOG_TraditionalFileFormat
|
*.crit /var/log/warn
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# the rest in one file
|
# the rest in one file
|
||||||
#
|
#
|
||||||
*.*;mail.none;news.none -/var/log/messages;RSYSLOG_TraditionalFileFormat
|
*.*;mail.none;news.none -/var/log/messages
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# enable this, if you want to keep all messages
|
# enable this, if you want to keep all messages
|
||||||
# in one file
|
# in one file
|
||||||
#*.* -/var/log/allmessages;RSYSLOG_TraditionalFileFormat
|
#*.* -/var/log/allmessages
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Some foreign boot scripts require local7
|
# Some foreign boot scripts require local7
|
||||||
#
|
#
|
||||||
local0,local1.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat
|
local0,local1.* -/var/log/localmessages
|
||||||
local2,local3.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat
|
local2,local3.* -/var/log/localmessages
|
||||||
local4,local5.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat
|
local4,local5.* -/var/log/localmessages
|
||||||
local6,local7.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat
|
local6,local7.* -/var/log/localmessages
|
||||||
|
|
||||||
###
|
###
|
||||||
|
247
rsyslog.spec
247
rsyslog.spec
@ -20,10 +20,17 @@
|
|||||||
|
|
||||||
Name: rsyslog
|
Name: rsyslog
|
||||||
%define upstream_version 5.4.0
|
%define upstream_version 5.4.0
|
||||||
%define rsyslog_docdir %{_docdir}/%{name}
|
# add %define build_with_relp 1 to enable relp on < 11.3, e.g.
|
||||||
%define install_all_modules_in_lib 0
|
# via <topadd>%define build_with_relp 1</topadd> in _link file.
|
||||||
|
%define with_relp 0%{?suse_version} >= 1130 || 0%{?build_with_relp:1}
|
||||||
|
%define _sbindir /sbin
|
||||||
|
%define rsyslogdocdir %{_docdir}/%{name}
|
||||||
|
%define additional_sockets %{_localstatedir}/run/rsyslog/additional-log-sockets.conf
|
||||||
|
%define _libdir /%_lib
|
||||||
|
%define rsyslog_module_dir_nodeps %{_libdir}/rsyslog/
|
||||||
|
%define rsyslog_module_dir_withdeps %{_prefix}/%{_lib}/rsyslog/
|
||||||
Version: 5.4.0
|
Version: 5.4.0
|
||||||
Release: 1
|
Release: 2
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
Summary: Rsyslog, the enhanced syslogd for Linux and Unix
|
Summary: Rsyslog, the enhanced syslogd for Linux and Unix
|
||||||
@ -35,6 +42,12 @@ BuildRequires: klogd
|
|||||||
BuildRequires: dos2unix openssl-devel pcre-devel pkgconfig zlib-devel
|
BuildRequires: dos2unix openssl-devel pcre-devel pkgconfig zlib-devel
|
||||||
BuildRequires: krb5-devel mysql-devel net-snmp-devel postgresql-devel
|
BuildRequires: krb5-devel mysql-devel net-snmp-devel postgresql-devel
|
||||||
BuildRequires: libgnutls-devel
|
BuildRequires: libgnutls-devel
|
||||||
|
%if %{?with_relp}
|
||||||
|
# RELP support
|
||||||
|
BuildRequires: librelp-devel
|
||||||
|
%endif
|
||||||
|
# UDP spoof support
|
||||||
|
BuildRequires: libnet
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
#Source0: http://download.rsyslog.com/rsyslog/%{name}-%{upstream_version}.tar.gz
|
#Source0: http://download.rsyslog.com/rsyslog/%{name}-%{upstream_version}.tar.gz
|
||||||
Source0: %{name}-%{upstream_version}.tar.bz2
|
Source0: %{name}-%{upstream_version}.tar.bz2
|
||||||
@ -42,10 +55,7 @@ Source1: rsyslog.sysconfig
|
|||||||
Source2: rsyslog.conf.in
|
Source2: rsyslog.conf.in
|
||||||
Source3: rsyslog.early.conf.in
|
Source3: rsyslog.early.conf.in
|
||||||
Source4: rsyslog.d.remote.conf.in
|
Source4: rsyslog.d.remote.conf.in
|
||||||
%define _sbindir /sbin
|
Patch1: rsyslog.xconsole-pipe-loop.patch
|
||||||
%define _libdir /%_lib
|
|
||||||
%define rsyslogdocdir %{_docdir}/%{name}
|
|
||||||
%define additional_sockets %{_localstatedir}/run/rsyslog/additional-log-sockets.conf
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Rsyslog is an enhanced multi-threaded syslogd supporting, among others,
|
Rsyslog is an enhanced multi-threaded syslogd supporting, among others,
|
||||||
@ -56,13 +66,12 @@ Its advanced features make it suitable for enterprise-class, encryption
|
|||||||
protected syslog relay chains while at the same time being very easy to
|
protected syslog relay chains while at the same time being very easy to
|
||||||
setup for the novice user.
|
setup for the novice user.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
--------
|
--------
|
||||||
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
||||||
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
||||||
|
|
||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
@ -75,13 +84,31 @@ package.
|
|||||||
|
|
||||||
This package provides additional documentation for rsyslog.
|
This package provides additional documentation for rsyslog.
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
||||||
|
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
||||||
|
|
||||||
|
|
||||||
|
%package diag-tools
|
||||||
|
License: GPLv3+
|
||||||
|
Group: System/Daemons
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
Summary: Diagnostic tools
|
||||||
|
|
||||||
|
%description diag-tools
|
||||||
|
Rsyslog is an enhanced multi-threaded syslog daemon. See rsyslog
|
||||||
|
package.
|
||||||
|
|
||||||
|
This package provides additional diagnostic tools (small helpers,
|
||||||
|
usually not needed).
|
||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
--------
|
--------
|
||||||
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
||||||
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
||||||
|
|
||||||
|
|
||||||
%package module-gssapi
|
%package module-gssapi
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
@ -95,13 +122,12 @@ 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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
--------
|
--------
|
||||||
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
||||||
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
||||||
|
|
||||||
|
|
||||||
%package module-mysql
|
%package module-mysql
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
@ -115,13 +141,12 @@ 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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
--------
|
--------
|
||||||
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
||||||
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
||||||
|
|
||||||
|
|
||||||
%package module-pgsql
|
%package module-pgsql
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
@ -134,13 +159,12 @@ package.
|
|||||||
|
|
||||||
This module provides the support for logging into PostgreSQL databases.
|
This module provides the support for logging into PostgreSQL databases.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
--------
|
--------
|
||||||
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
||||||
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
||||||
|
|
||||||
|
|
||||||
%package module-snmp
|
%package module-snmp
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
@ -154,13 +178,12 @@ 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.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
--------
|
--------
|
||||||
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
||||||
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
||||||
|
|
||||||
|
|
||||||
%package module-gtls
|
%package module-gtls
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
Group: System/Daemons
|
Group: System/Daemons
|
||||||
@ -174,27 +197,67 @@ package.
|
|||||||
This module provides the ability for TLS encrypted TCP logging (based
|
This module provides the ability for TLS encrypted TCP logging (based
|
||||||
on current syslog-transport-tls internet drafts).
|
on current syslog-transport-tls internet drafts).
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
||||||
|
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
||||||
|
|
||||||
|
|
||||||
|
%if %{?with_relp}
|
||||||
|
|
||||||
|
%package module-relp
|
||||||
|
License: GPLv3+
|
||||||
|
Group: System/Daemons
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
Summary: RELP protocol support module for syslog
|
||||||
|
|
||||||
|
%description module-relp
|
||||||
|
Rsyslog is an enhanced multi-threaded syslog daemon. See rsyslog
|
||||||
|
package.
|
||||||
|
|
||||||
|
This module provides Reliable Event Logging Protocol support.
|
||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
--------
|
--------
|
||||||
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
||||||
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%package module-udpspoof
|
||||||
|
License: GPLv3+
|
||||||
|
Group: System/Daemons
|
||||||
|
Requires: %{name} = %{version}
|
||||||
|
Summary: UDP spoof support module for syslog
|
||||||
|
|
||||||
|
%description module-udpspoof
|
||||||
|
Rsyslog is an enhanced multi-threaded syslog daemon. See rsyslog
|
||||||
|
package.
|
||||||
|
|
||||||
|
This module provides a UDP forwarder that allows changing the sender address.
|
||||||
|
|
||||||
|
Authors:
|
||||||
|
--------
|
||||||
|
Rainer Gerhards <rgerhards@adiscon.com>, Adiscon GmbH
|
||||||
|
Michael Meckelein <mmeckelein@hq.adiscon.com>, Adiscon GmbH
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{name}-%{upstream_version}
|
%setup -q -n %{name}-%{upstream_version}
|
||||||
dos2unix doc/*.html
|
dos2unix doc/*.html
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall"
|
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall"
|
||||||
%if 0%{?suse_version} > 1000 && 0%{?suse_version} < 1030
|
%if 0%{?suse_version} > 1000 && 0%{?suse_version} < 1030
|
||||||
export CFLAGS="$CFLAGS -fstack-protector"
|
export CFLAGS="$CFLAGS -fstack-protector"
|
||||||
%endif
|
%endif
|
||||||
autoreconf -fi
|
# needs liblogging
|
||||||
|
# --enable-rfc3195 \
|
||||||
|
# needs java
|
||||||
|
# --enable-gui \
|
||||||
%configure \
|
%configure \
|
||||||
%if ! 0%{install_all_modules_in_lib}
|
--with-moddirs=%{rsyslog_module_dir_withdeps} \
|
||||||
--with-moddirs=%{_prefix}%{_libdir}/rsyslog/ \
|
|
||||||
%endif
|
|
||||||
--enable-option-checking \
|
--enable-option-checking \
|
||||||
--enable-largefile \
|
--enable-largefile \
|
||||||
--enable-pthreads \
|
--enable-pthreads \
|
||||||
@ -213,25 +276,33 @@ autoreconf -fi
|
|||||||
--enable-imtemplate \
|
--enable-imtemplate \
|
||||||
--enable-omprog \
|
--enable-omprog \
|
||||||
--enable-omtemplate \
|
--enable-omtemplate \
|
||||||
|
--enable-diagtools \
|
||||||
|
%if %{?with_relp}
|
||||||
|
--enable-relp \
|
||||||
|
%endif
|
||||||
|
--enable-omudpspoof \
|
||||||
|
--enable-omstdout \
|
||||||
--disable-static
|
--disable-static
|
||||||
make %{?_smp_mflags:%{_smp_mflags}}
|
|
||||||
|
make %{?_smp_mflags:%{_smp_mflags}} V=1
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR="%{buildroot}"
|
make install DESTDIR="%{buildroot}" V=1
|
||||||
#
|
#
|
||||||
rm -f %{buildroot}%{_libdir}/rsyslog/*.la
|
rm -f %{buildroot}%{rsyslog_module_dir_nodeps}/*.la
|
||||||
#
|
#
|
||||||
%if ! 0%{install_all_modules_in_lib}
|
|
||||||
# move all modules linking libraries in /usr to /usr/%_lib
|
# move all modules linking libraries in /usr to /usr/%_lib
|
||||||
# the user has to specify them with full path then...
|
# the user has to specify them with full path then...
|
||||||
install -d -m0755 %{buildroot}%{_prefix}%{_libdir}/rsyslog
|
install -d -m0755 %{buildroot}%{rsyslog_module_dir_withdeps}
|
||||||
for mod in omgssapi.so imgssapi.so lmgssutil.so ommysql.so \
|
for mod in omgssapi.so imgssapi.so lmgssutil.so ommysql.so \
|
||||||
ompgsql.so omsnmp.so lmnsd_gtls.so ;
|
ompgsql.so omsnmp.so lmnsd_gtls.so \
|
||||||
do
|
%if %{?with_relp}
|
||||||
mv -f %{buildroot}%{_libdir}/rsyslog/$mod \
|
imrelp.so omrelp.so \
|
||||||
%{buildroot}%{_prefix}%{_libdir}/rsyslog/
|
|
||||||
done
|
|
||||||
%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
|
||||||
@ -339,7 +410,9 @@ 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}"
|
additional_sockets="%{additional_sockets}"
|
||||||
touch "${additional_sockets#/}"; chmod 640 "${additional_sockets#/}"
|
mkdir -p -m750 ${additional_sockets%/*}
|
||||||
|
touch "${additional_sockets#/}"
|
||||||
|
chmod 640 "${additional_sockets#/}"
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
#
|
#
|
||||||
@ -378,30 +451,29 @@ fi
|
|||||||
%config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.early.conf
|
%config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.early.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
|
||||||
%dir %{_libdir}/rsyslog
|
%dir %{rsyslog_module_dir_nodeps}
|
||||||
%{_libdir}/rsyslog/imfile.so
|
%{rsyslog_module_dir_nodeps}/imfile.so
|
||||||
%{_libdir}/rsyslog/imklog.so
|
%{rsyslog_module_dir_nodeps}/imklog.so
|
||||||
%{_libdir}/rsyslog/immark.so
|
%{rsyslog_module_dir_nodeps}/immark.so
|
||||||
%{_libdir}/rsyslog/imtcp.so
|
%{rsyslog_module_dir_nodeps}/imtcp.so
|
||||||
%{_libdir}/rsyslog/imtemplate.so
|
%{rsyslog_module_dir_nodeps}/imtemplate.so
|
||||||
%{_libdir}/rsyslog/imudp.so
|
%{rsyslog_module_dir_nodeps}/imudp.so
|
||||||
%{_libdir}/rsyslog/imuxsock.so
|
%{rsyslog_module_dir_nodeps}/imuxsock.so
|
||||||
%{_libdir}/rsyslog/lmnet.so
|
%{rsyslog_module_dir_nodeps}/lmnet.so
|
||||||
%{_libdir}/rsyslog/lmnetstrms.so
|
%{rsyslog_module_dir_nodeps}/lmnetstrms.so
|
||||||
%{_libdir}/rsyslog/lmnsd_ptcp.so
|
%{rsyslog_module_dir_nodeps}/lmnsd_ptcp.so
|
||||||
%{_libdir}/rsyslog/lmregexp.so
|
%{rsyslog_module_dir_nodeps}/lmregexp.so
|
||||||
%{_libdir}/rsyslog/lmstrmsrv.so
|
%{rsyslog_module_dir_nodeps}/lmstrmsrv.so
|
||||||
%{_libdir}/rsyslog/lmtcpclt.so
|
%{rsyslog_module_dir_nodeps}/lmtcpclt.so
|
||||||
%{_libdir}/rsyslog/lmtcpsrv.so
|
%{rsyslog_module_dir_nodeps}/lmtcpsrv.so
|
||||||
%{_libdir}/rsyslog/lmzlibw.so
|
%{rsyslog_module_dir_nodeps}/lmzlibw.so
|
||||||
%{_libdir}/rsyslog/ommail.so
|
%{rsyslog_module_dir_nodeps}/ommail.so
|
||||||
%{_libdir}/rsyslog/omprog.so
|
%{rsyslog_module_dir_nodeps}/omprog.so
|
||||||
%{_libdir}/rsyslog/omruleset.so
|
%{rsyslog_module_dir_nodeps}/omruleset.so
|
||||||
%{_libdir}/rsyslog/omtemplate.so
|
%{rsyslog_module_dir_nodeps}/omtemplate.so
|
||||||
%{_libdir}/rsyslog/omtesting.so
|
%{rsyslog_module_dir_nodeps}/omtesting.so
|
||||||
%if ! 0%{install_all_modules_in_lib}
|
%{rsyslog_module_dir_nodeps}/omstdout.so
|
||||||
%dir %{_prefix}%{_libdir}/rsyslog
|
%dir %{rsyslog_module_dir_withdeps}
|
||||||
%endif
|
|
||||||
%{_mandir}/man5/rsyslog.conf.5*
|
%{_mandir}/man5/rsyslog.conf.5*
|
||||||
%{_mandir}/man8/rsyslogd.8*
|
%{_mandir}/man8/rsyslogd.8*
|
||||||
%dir %{rsyslogdocdir}
|
%dir %{rsyslogdocdir}
|
||||||
@ -411,7 +483,6 @@ fi
|
|||||||
%doc %{rsyslogdocdir}/AUTHORS
|
%doc %{rsyslogdocdir}/AUTHORS
|
||||||
%doc %{rsyslogdocdir}/COPYING
|
%doc %{rsyslogdocdir}/COPYING
|
||||||
%doc %{rsyslogdocdir}/COPYING.LESSER
|
%doc %{rsyslogdocdir}/COPYING.LESSER
|
||||||
%dir %{_localstatedir}/run/rsyslog
|
|
||||||
%dir %{_localstatedir}/spool/rsyslog
|
%dir %{_localstatedir}/spool/rsyslog
|
||||||
/var/adm/fillup-templates/sysconfig.syslog-rsyslog
|
/var/adm/fillup-templates/sysconfig.syslog-rsyslog
|
||||||
|
|
||||||
@ -420,60 +491,46 @@ fi
|
|||||||
%dir %{rsyslogdocdir}
|
%dir %{rsyslogdocdir}
|
||||||
%doc %{rsyslogdocdir}/doc
|
%doc %{rsyslogdocdir}/doc
|
||||||
|
|
||||||
|
%files diag-tools
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_sbindir}/msggen
|
||||||
|
%{_sbindir}/rsyslog_diag_hostname
|
||||||
|
%{_sbindir}/zpipe
|
||||||
|
|
||||||
%files module-gssapi
|
%files module-gssapi
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%if 0%{install_all_modules_in_lib}
|
%{rsyslog_module_dir_withdeps}/omgssapi.so
|
||||||
%dir %{_libdir}/rsyslog
|
%{rsyslog_module_dir_withdeps}/imgssapi.so
|
||||||
%{_libdir}/rsyslog/omgssapi.so
|
%{rsyslog_module_dir_withdeps}/lmgssutil.so
|
||||||
%{_libdir}/rsyslog/imgssapi.so
|
|
||||||
%{_libdir}/rsyslog/lmgssutil.so
|
|
||||||
%else
|
|
||||||
%dir %{_prefix}%{_libdir}/rsyslog
|
|
||||||
%{_prefix}%{_libdir}/rsyslog/omgssapi.so
|
|
||||||
%{_prefix}%{_libdir}/rsyslog/imgssapi.so
|
|
||||||
%{_prefix}%{_libdir}/rsyslog/lmgssutil.so
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files module-mysql
|
%files module-mysql
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc %{rsyslogdocdir}/mysql-createDB.sql
|
%doc %{rsyslogdocdir}/mysql-createDB.sql
|
||||||
%if 0%{install_all_modules_in_lib}
|
%{rsyslog_module_dir_withdeps}/ommysql.so
|
||||||
%dir %{_libdir}/rsyslog
|
|
||||||
%{_libdir}/rsyslog/ommysql.so
|
|
||||||
%else
|
|
||||||
%dir %{_prefix}%{_libdir}/rsyslog
|
|
||||||
%{_prefix}%{_libdir}/rsyslog/ommysql.so
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files module-pgsql
|
%files module-pgsql
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc %{rsyslogdocdir}/pgsql-createDB.sql
|
%doc %{rsyslogdocdir}/pgsql-createDB.sql
|
||||||
%if 0%{install_all_modules_in_lib}
|
%{rsyslog_module_dir_withdeps}/ompgsql.so
|
||||||
%dir %{_libdir}/rsyslog
|
|
||||||
%{_libdir}/rsyslog/ompgsql.so
|
|
||||||
%else
|
|
||||||
%dir %{_prefix}%{_libdir}/rsyslog
|
|
||||||
%{_prefix}%{_libdir}/rsyslog/ompgsql.so
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files module-snmp
|
%files module-snmp
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%if 0%{install_all_modules_in_lib}
|
%{rsyslog_module_dir_withdeps}/omsnmp.so
|
||||||
%dir %{_libdir}/rsyslog
|
|
||||||
%{_libdir}/rsyslog/omsnmp.so
|
|
||||||
%else
|
|
||||||
%dir %{_prefix}%{_libdir}/rsyslog
|
|
||||||
%{_prefix}%{_libdir}/rsyslog/omsnmp.so
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files module-gtls
|
%files module-gtls
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%if 0%{install_all_modules_in_lib}
|
%{rsyslog_module_dir_withdeps}/lmnsd_gtls.so
|
||||||
%dir %{_libdir}/rsyslog
|
|
||||||
%{_libdir}/rsyslog/lmnsd_gtls.so
|
%if %{?with_relp}
|
||||||
%else
|
|
||||||
%dir %{_prefix}%{_libdir}/rsyslog
|
%files module-relp
|
||||||
%{_prefix}%{_libdir}/rsyslog/lmnsd_gtls.so
|
%defattr(-,root,root)
|
||||||
|
%{rsyslog_module_dir_withdeps}/imrelp.so
|
||||||
|
%{rsyslog_module_dir_withdeps}/omrelp.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%files module-udpspoof
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{rsyslog_module_dir_nodeps}/omudpspoof.so
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
109
rsyslog.xconsole-pipe-loop.patch
Normal file
109
rsyslog.xconsole-pipe-loop.patch
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
|
||||||
|
Fix for:
|
||||||
|
https://bugzilla.novell.com/show_bug.cgi?id=597293
|
||||||
|
|
||||||
|
Extracted the bare fix (without ChangeLog and testcase) to test if it
|
||||||
|
solves the problem from:
|
||||||
|
|
||||||
|
http://bugzilla.adiscon.com/show_bug.cgi?id=186
|
||||||
|
http://git.adiscon.com/?p=rsyslog.git;a=commitdiff;h=eec894fbc5eb263e6def1f2e35f9882967c95a88
|
||||||
|
|
||||||
|
Rainer Gerhards [Mon, 26 Apr 2010 13:19:13 +0000 (15:19 +0200)]
|
||||||
|
|
||||||
|
The rsyslog engine did not guard itself against output modules that do
|
||||||
|
not properly convey back the tryResume() behaviour. This then leads to
|
||||||
|
what looks like an endless loop. I consider this to be a bug of the
|
||||||
|
engine not only because it should be hardened against plugin misbehaviour,
|
||||||
|
but also because plugins may not be totally able to avoid this situation
|
||||||
|
(depending on the type of and processing done by the plugin).
|
||||||
|
|
||||||
|
|
||||||
|
* Unmerged path ChangeLog
|
||||||
|
diff --git a/action.c b/action.c
|
||||||
|
index aaf4559..256ca09 100644
|
||||||
|
--- a/action.c
|
||||||
|
+++ b/action.c
|
||||||
|
@@ -445,6 +445,7 @@ static void actionCommitted(action_t *pThis)
|
||||||
|
static void actionRetry(action_t *pThis)
|
||||||
|
{
|
||||||
|
actionSetState(pThis, ACT_STATE_RTRY);
|
||||||
|
+ pThis->iResumeOKinRow++;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -480,23 +481,39 @@ static inline void actionSuspend(action_t *pThis, time_t ttNow)
|
||||||
|
/* actually do retry processing. Note that the function receives a timestamp so
|
||||||
|
* that we do not need to call the (expensive) time() API.
|
||||||
|
* Note that we do the full retry processing here, doing the configured number of
|
||||||
|
- * iterations.
|
||||||
|
- * rgerhards, 2009-05-07
|
||||||
|
+ * iterations. -- rgerhards, 2009-05-07
|
||||||
|
+ * We need to guard against module which always return RS_RET_OK from their tryResume()
|
||||||
|
+ * entry point. This is invalid, but has harsh consequences: it will cause the rsyslog
|
||||||
|
+ * engine to go into a tight loop. That obviously is not acceptable. As such, we track the
|
||||||
|
+ * count of iterations that a tryResume returning RS_RET_OK is immediately followed by
|
||||||
|
+ * an unsuccessful call to doAction(). If that happens more than 1,000 times, we assume
|
||||||
|
+ * the return acutally is a RS_RET_SUSPENDED. In order to go through the various
|
||||||
|
+ * resumption stages, we do this for every 1000 requests. This magic number 1000 may
|
||||||
|
+ * not be the most appropriate, but it should be thought of a "if nothing else helps"
|
||||||
|
+ * kind of facility: in the first place, the module should return a proper indication
|
||||||
|
+ * of its inability to recover. -- rgerhards, 2010-04-26.
|
||||||
|
*/
|
||||||
|
static rsRetVal actionDoRetry(action_t *pThis, time_t ttNow)
|
||||||
|
{
|
||||||
|
int iRetries;
|
||||||
|
int iSleepPeriod;
|
||||||
|
+ int bTreatOKasSusp;
|
||||||
|
DEFiRet;
|
||||||
|
|
||||||
|
ASSERT(pThis != NULL);
|
||||||
|
|
||||||
|
iRetries = 0;
|
||||||
|
while(pThis->eState == ACT_STATE_RTRY) {
|
||||||
|
+dbgprintf("YYY: resume in row %d\n", pThis->iResumeOKinRow);
|
||||||
|
iRet = pThis->pMod->tryResume(pThis->pModData);
|
||||||
|
- if(iRet == RS_RET_OK) {
|
||||||
|
+ if((pThis->iResumeOKinRow > 999) && (pThis->iResumeOKinRow % 1000 == 0)) {
|
||||||
|
+ bTreatOKasSusp = 1;
|
||||||
|
+ } else {
|
||||||
|
+ bTreatOKasSusp = 0;
|
||||||
|
+ }
|
||||||
|
+ if((iRet == RS_RET_OK) && (!bTreatOKasSusp)) {
|
||||||
|
actionSetState(pThis, ACT_STATE_RDY);
|
||||||
|
- } else if(iRet == RS_RET_SUSPENDED) {
|
||||||
|
+ } else if(iRet == RS_RET_SUSPENDED || bTreatOKasSusp) {
|
||||||
|
/* max retries reached? */
|
||||||
|
if((pThis->iResumeRetryCount != -1 && iRetries >= pThis->iResumeRetryCount)) {
|
||||||
|
actionSuspend(pThis, ttNow);
|
||||||
|
@@ -715,13 +732,16 @@ actionCallDoAction(action_t *pThis, msg_t *pMsg)
|
||||||
|
switch(iRet) {
|
||||||
|
case RS_RET_OK:
|
||||||
|
actionCommitted(pThis);
|
||||||
|
+ pThis->iResumeOKinRow = 0; /* we had a successful call! */
|
||||||
|
break;
|
||||||
|
case RS_RET_DEFER_COMMIT:
|
||||||
|
+ pThis->iResumeOKinRow = 0; /* we had a successful call! */
|
||||||
|
/* we are done, action state remains the same */
|
||||||
|
break;
|
||||||
|
case RS_RET_PREVIOUS_COMMITTED:
|
||||||
|
/* action state remains the same, but we had a commit. */
|
||||||
|
pThis->bHadAutoCommit = 1;
|
||||||
|
+ pThis->iResumeOKinRow = 0; /* we had a successful call! */
|
||||||
|
break;
|
||||||
|
case RS_RET_SUSPENDED:
|
||||||
|
actionRetry(pThis);
|
||||||
|
diff --git a/action.h b/action.h
|
||||||
|
index 6cc4df5..4a6c3c8 100644
|
||||||
|
--- a/action.h
|
||||||
|
+++ b/action.h
|
||||||
|
@@ -56,8 +56,9 @@ struct action_s {
|
||||||
|
bool bWriteAllMarkMsgs;/* should all mark msgs be written (not matter how recent the action was executed)? */
|
||||||
|
int iSecsExecOnceInterval; /* if non-zero, minimum seconds to wait until action is executed again */
|
||||||
|
action_state_t eState; /* current state of action */
|
||||||
|
- int bHadAutoCommit; /* did an auto-commit happen during doAction()? */
|
||||||
|
+ bool bHadAutoCommit; /* did an auto-commit happen during doAction()? */
|
||||||
|
time_t ttResumeRtry; /* when is it time to retry the resume? */
|
||||||
|
+ int iResumeOKinRow; /* number of times in a row that resume said OK with an immediate failure following */
|
||||||
|
int iResumeInterval;/* resume interval for this action */
|
||||||
|
int iResumeRetryCount;/* how often shall we retry a suspended action? (-1 --> eternal) */
|
||||||
|
int iNbrResRtry; /* number of retries since last suspend */
|
Loading…
Reference in New Issue
Block a user