From 6ca828ee622711a2f220bef4e1a96a733e581d41dbe8bee8c951b6f28d93b8de Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Wed, 14 Apr 2010 12:22:09 +0000 Subject: [PATCH 01/11] Accepting request 37923 from home:darix:rsyslog Copy from home:darix:rsyslog/rsyslog via accept of submit request 37923 revision 7. Request was accepted with message: thanks! OBS-URL: https://build.opensuse.org/request/show/37923 OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=15 --- rsyslog.changes | 11 +++ rsyslog.spec | 198 ++++++++++++++++++++++++++---------------------- 2 files changed, 118 insertions(+), 91 deletions(-) diff --git a/rsyslog.changes b/rsyslog.changes index f677278..666443d 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +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 UDP spoof support. new dependency libnet + - enable diagnotic tools. +- moved module paths to 2 variables defined on top of the spec + ------------------------------------------------------------------- Tue Apr 13 08:56:15 UTC 2010 - mt@suse.de diff --git a/rsyslog.spec b/rsyslog.spec index f837af5..1438d07 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -20,8 +20,6 @@ Name: rsyslog %define upstream_version 5.4.0 -%define rsyslog_docdir %{_docdir}/%{name} -%define install_all_modules_in_lib 0 Version: 5.4.0 Release: 1 License: GPLv3+ @@ -35,6 +33,10 @@ BuildRequires: klogd BuildRequires: dos2unix openssl-devel pcre-devel pkgconfig zlib-devel BuildRequires: krb5-devel mysql-devel net-snmp-devel postgresql-devel BuildRequires: libgnutls-devel +# RELP support +BuildRequires: librelp-devel +# UDP spoof support +BuildRequires: libnet BuildRoot: %{_tmppath}/%{name}-%{version}-build #Source0: http://download.rsyslog.com/rsyslog/%{name}-%{upstream_version}.tar.gz Source0: %{name}-%{upstream_version}.tar.bz2 @@ -43,10 +45,11 @@ Source2: rsyslog.conf.in Source3: rsyslog.early.conf.in Source4: rsyslog.d.remote.conf.in %define _sbindir /sbin -%define _libdir /%_lib %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/ %description Rsyslog is an enhanced multi-threaded syslogd supporting, among others, MySQL, syslog/tcp, RFC 3195, permitted sender lists, filtering on any @@ -56,13 +59,12 @@ Its advanced features make it suitable for enterprise-class, encryption protected syslog relay chains while at the same time being very easy to setup for the novice user. - - Authors: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH + %package doc License: GPLv3+ Group: System/Daemons @@ -75,13 +77,31 @@ package. This package provides additional documentation for rsyslog. +Authors: +-------- + Rainer Gerhards , Adiscon GmbH + Michael Meckelein , 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: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH + %package module-gssapi License: GPLv3+ Group: System/Daemons @@ -95,13 +115,12 @@ package. This module provides the support to receive syslog messages from the network protected via Kerberos 5 encryption and authentication. - - Authors: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH + %package module-mysql License: GPLv3+ Group: System/Daemons @@ -115,13 +134,12 @@ package. This package provides a module with the support for logging into MySQL databases. - - Authors: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH + %package module-pgsql License: GPLv3+ Group: System/Daemons @@ -134,13 +152,12 @@ package. This module provides the support for logging into PostgreSQL databases. - - Authors: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH + %package module-snmp License: GPLv3+ Group: System/Daemons @@ -154,13 +171,12 @@ package. This module provides the ability to send syslog messages as an SNMPv1 & v2c traps. - - Authors: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH + %package module-gtls License: GPLv3+ Group: System/Daemons @@ -174,27 +190,45 @@ package. This module provides the ability for TLS encrypted TCP logging (based on current syslog-transport-tls internet drafts). +Authors: +-------- + Rainer Gerhards , Adiscon GmbH + Michael Meckelein , Adiscon GmbH +%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: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH + %prep %setup -q -n %{name}-%{upstream_version} -dos2unix doc/*.html +#dos2unix doc/*.html %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall" %if 0%{?suse_version} > 1000 && 0%{?suse_version} < 1030 export CFLAGS="$CFLAGS -fstack-protector" %endif -autoreconf -fi +# needs liblogging +# --enable-rfc3195 \ +# needs java +# --enable-gui \ %configure \ -%if ! 0%{install_all_modules_in_lib} - --with-moddirs=%{_prefix}%{_libdir}/rsyslog/ \ -%endif + --with-moddirs=%{rsyslog_module_dir_withdeps} \ --enable-option-checking \ --enable-largefile \ --enable-pthreads \ @@ -213,25 +247,28 @@ autoreconf -fi --enable-imtemplate \ --enable-omprog \ --enable-omtemplate \ + --enable-diagtools \ + --enable-relp \ + --enable-omudpspoof \ + --enable-omstdout \ --disable-static -make %{?_smp_mflags:%{_smp_mflags}} + +make %{?_smp_mflags:%{_smp_mflags}} V=1 %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 # 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 \ - ompgsql.so omsnmp.so lmnsd_gtls.so ; + ompgsql.so omsnmp.so lmnsd_gtls.so imrelp.so omrelp.so ; do - mv -f %{buildroot}%{_libdir}/rsyslog/$mod \ - %{buildroot}%{_prefix}%{_libdir}/rsyslog/ + mv -f %{buildroot}%{rsyslog_module_dir_nodeps}/$mod \ + %{buildroot}%{rsyslog_module_dir_withdeps} done -%endif # install -d -m0755 %{buildroot}%{_sysconfdir}/rsyslog.d install -d -m0755 %{buildroot}%{_localstatedir}/run/rsyslog @@ -378,30 +415,30 @@ fi %config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.early.conf %config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.d/remote.conf %{_sbindir}/rsyslogd -%dir %{_libdir}/rsyslog -%{_libdir}/rsyslog/imfile.so -%{_libdir}/rsyslog/imklog.so -%{_libdir}/rsyslog/immark.so -%{_libdir}/rsyslog/imtcp.so -%{_libdir}/rsyslog/imtemplate.so -%{_libdir}/rsyslog/imudp.so -%{_libdir}/rsyslog/imuxsock.so -%{_libdir}/rsyslog/lmnet.so -%{_libdir}/rsyslog/lmnetstrms.so -%{_libdir}/rsyslog/lmnsd_ptcp.so -%{_libdir}/rsyslog/lmregexp.so -%{_libdir}/rsyslog/lmstrmsrv.so -%{_libdir}/rsyslog/lmtcpclt.so -%{_libdir}/rsyslog/lmtcpsrv.so -%{_libdir}/rsyslog/lmzlibw.so -%{_libdir}/rsyslog/ommail.so -%{_libdir}/rsyslog/omprog.so -%{_libdir}/rsyslog/omruleset.so -%{_libdir}/rsyslog/omtemplate.so -%{_libdir}/rsyslog/omtesting.so -%if ! 0%{install_all_modules_in_lib} -%dir %{_prefix}%{_libdir}/rsyslog -%endif +%dir %{rsyslog_module_dir_nodeps} +%{rsyslog_module_dir_nodeps}/imfile.so +%{rsyslog_module_dir_nodeps}/imklog.so +%{rsyslog_module_dir_nodeps}/immark.so +%{rsyslog_module_dir_nodeps}/imtcp.so +%{rsyslog_module_dir_nodeps}/imtemplate.so +%{rsyslog_module_dir_nodeps}/imudp.so +%{rsyslog_module_dir_nodeps}/imuxsock.so +%{rsyslog_module_dir_nodeps}/lmnet.so +%{rsyslog_module_dir_nodeps}/lmnetstrms.so +%{rsyslog_module_dir_nodeps}/lmnsd_ptcp.so +%{rsyslog_module_dir_nodeps}/lmregexp.so +%{rsyslog_module_dir_nodeps}/lmstrmsrv.so +%{rsyslog_module_dir_nodeps}/lmtcpclt.so +%{rsyslog_module_dir_nodeps}/lmtcpsrv.so +%{rsyslog_module_dir_nodeps}/lmzlibw.so +%{rsyslog_module_dir_nodeps}/ommail.so +%{rsyslog_module_dir_nodeps}/omprog.so +%{rsyslog_module_dir_nodeps}/omruleset.so +%{rsyslog_module_dir_nodeps}/omtemplate.so +%{rsyslog_module_dir_nodeps}/omtesting.so +%{rsyslog_module_dir_nodeps}/omstdout.so +%{rsyslog_module_dir_nodeps}/omudpspoof.so +%dir %{rsyslog_module_dir_withdeps} %{_mandir}/man5/rsyslog.conf.5* %{_mandir}/man8/rsyslogd.8* %dir %{rsyslogdocdir} @@ -420,60 +457,39 @@ fi %dir %{rsyslogdocdir} %doc %{rsyslogdocdir}/doc +%files diag-tools +%defattr(-,root,root) +%{_sbindir}/msggen +%{_sbindir}/rsyslog_diag_hostname +%{_sbindir}/zpipe + %files module-gssapi %defattr(-,root,root) -%if 0%{install_all_modules_in_lib} -%dir %{_libdir}/rsyslog -%{_libdir}/rsyslog/omgssapi.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 +%{rsyslog_module_dir_withdeps}/omgssapi.so +%{rsyslog_module_dir_withdeps}/imgssapi.so +%{rsyslog_module_dir_withdeps}/lmgssutil.so %files module-mysql %defattr(-,root,root) %doc %{rsyslogdocdir}/mysql-createDB.sql -%if 0%{install_all_modules_in_lib} -%dir %{_libdir}/rsyslog -%{_libdir}/rsyslog/ommysql.so -%else -%dir %{_prefix}%{_libdir}/rsyslog -%{_prefix}%{_libdir}/rsyslog/ommysql.so -%endif +%{rsyslog_module_dir_withdeps}/ommysql.so %files module-pgsql %defattr(-,root,root) %doc %{rsyslogdocdir}/pgsql-createDB.sql -%if 0%{install_all_modules_in_lib} -%dir %{_libdir}/rsyslog -%{_libdir}/rsyslog/ompgsql.so -%else -%dir %{_prefix}%{_libdir}/rsyslog -%{_prefix}%{_libdir}/rsyslog/ompgsql.so -%endif +%{rsyslog_module_dir_withdeps}/ompgsql.so %files module-snmp %defattr(-,root,root) -%if 0%{install_all_modules_in_lib} -%dir %{_libdir}/rsyslog -%{_libdir}/rsyslog/omsnmp.so -%else -%dir %{_prefix}%{_libdir}/rsyslog -%{_prefix}%{_libdir}/rsyslog/omsnmp.so -%endif +%{rsyslog_module_dir_withdeps}/omsnmp.so %files module-gtls %defattr(-,root,root) -%if 0%{install_all_modules_in_lib} -%dir %{_libdir}/rsyslog -%{_libdir}/rsyslog/lmnsd_gtls.so -%else -%dir %{_prefix}%{_libdir}/rsyslog -%{_prefix}%{_libdir}/rsyslog/lmnsd_gtls.so -%endif +%{rsyslog_module_dir_withdeps}/lmnsd_gtls.so + +%files module-relp +%defattr(-,root,root) +%{rsyslog_module_dir_withdeps}/imrelp.so +%{rsyslog_module_dir_withdeps}/omrelp.so %changelog From 03cc73caac0ff8848ada74a37a29ab414846b472a28be7cfb2223ee1c11efa5a Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Wed, 14 Apr 2010 12:24:13 +0000 Subject: [PATCH 02/11] Accepting request 37924 from home:darix:rsyslog Copy from home:darix:rsyslog/rsyslog via accept of submit request 37924 revision 8. Request was accepted with message: thanks! OBS-URL: https://build.opensuse.org/request/show/37924 OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=16 --- rsyslog.changes | 2 +- rsyslog.spec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rsyslog.changes b/rsyslog.changes index 666443d..2a0aa02 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -5,8 +5,8 @@ Wed Apr 14 12:16:29 UTC 2010 - mrueckert@suse.de code - new subpackages - enable RELP support. new depdendency librelp - - enable UDP spoof support. new dependency libnet - enable diagnotic tools. +- enable UDP spoof support. new dependency libnet - moved module paths to 2 variables defined on top of the spec ------------------------------------------------------------------- diff --git a/rsyslog.spec b/rsyslog.spec index 1438d07..fbcc46b 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -216,7 +216,7 @@ Authors: %prep %setup -q -n %{name}-%{upstream_version} -#dos2unix doc/*.html +dos2unix doc/*.html %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall" From ed21191631d0f84e180af1c3837af17aab92c5239333fb3f7b9dfff2cb9202be Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Wed, 14 Apr 2010 12:48:52 +0000 Subject: [PATCH 03/11] Accepting request 37927 from home:darix:rsyslog Copy from home:darix:rsyslog/rsyslog via accept of submit request 37927 revision 9. Request was accepted with message: thanks! OBS-URL: https://build.opensuse.org/request/show/37927 OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=17 --- rsyslog.changes | 2 +- rsyslog.spec | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/rsyslog.changes b/rsyslog.changes index 2a0aa02..4977b86 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -6,7 +6,7 @@ Wed Apr 14 12:16:29 UTC 2010 - mrueckert@suse.de - new subpackages - enable RELP support. new depdendency librelp - enable diagnotic tools. -- enable UDP spoof support. new dependency libnet + - enable UDP spoof support. new dependency libnet - moved module paths to 2 variables defined on top of the spec ------------------------------------------------------------------- diff --git a/rsyslog.spec b/rsyslog.spec index fbcc46b..473d82d 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -208,6 +208,23 @@ package. This module provides Reliable Event Logging Protocol support. +Authors: +-------- + Rainer Gerhards , Adiscon GmbH + Michael Meckelein , Adiscon GmbH + +%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 , Adiscon GmbH @@ -437,7 +454,6 @@ fi %{rsyslog_module_dir_nodeps}/omtemplate.so %{rsyslog_module_dir_nodeps}/omtesting.so %{rsyslog_module_dir_nodeps}/omstdout.so -%{rsyslog_module_dir_nodeps}/omudpspoof.so %dir %{rsyslog_module_dir_withdeps} %{_mandir}/man5/rsyslog.conf.5* %{_mandir}/man8/rsyslogd.8* @@ -492,4 +508,8 @@ fi %{rsyslog_module_dir_withdeps}/imrelp.so %{rsyslog_module_dir_withdeps}/omrelp.so +%files module-udpspoof +%defattr(-,root,root) +%{rsyslog_module_dir_nodeps}/omudpspoof.so + %changelog From e8f078b1637ef93a9e0ffbd737616c563b904657b4f34661e9f11868b99653b9 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Tue, 27 Apr 2010 11:33:53 +0000 Subject: [PATCH 04/11] - 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). OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=18 --- rsyslog.changes | 7 ++ rsyslog.spec | 2 + rsyslog.xconsole-pipe-loop.patch | 109 +++++++++++++++++++++++++++++++ 3 files changed, 118 insertions(+) create mode 100644 rsyslog.xconsole-pipe-loop.patch diff --git a/rsyslog.changes b/rsyslog.changes index 4977b86..90fe536 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Apr 27 11:20:04 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). + ------------------------------------------------------------------- Wed Apr 14 12:16:29 UTC 2010 - mrueckert@suse.de diff --git a/rsyslog.spec b/rsyslog.spec index 473d82d..4b35d9e 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -44,6 +44,7 @@ Source1: rsyslog.sysconfig Source2: rsyslog.conf.in Source3: rsyslog.early.conf.in Source4: rsyslog.d.remote.conf.in +Patch1: rsyslog.xconsole-pipe-loop.patch %define _sbindir /sbin %define rsyslogdocdir %{_docdir}/%{name} %define additional_sockets %{_localstatedir}/run/rsyslog/additional-log-sockets.conf @@ -234,6 +235,7 @@ Authors: %prep %setup -q -n %{name}-%{upstream_version} dos2unix doc/*.html +%patch1 -p1 %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall" diff --git a/rsyslog.xconsole-pipe-loop.patch b/rsyslog.xconsole-pipe-loop.patch new file mode 100644 index 0000000..2949342 --- /dev/null +++ b/rsyslog.xconsole-pipe-loop.patch @@ -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 */ From 4df2694c0b138d32ee68c751842efaba469d60449cb38151fd1fe06e0236acbf Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Tue, 27 Apr 2010 12:17:16 +0000 Subject: [PATCH 05/11] - Disabled relp support for < 11.3 (librelp is new) - Fixed to create /var/run/rsyslog in post-install (rpmlint) OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=19 --- rsyslog.changes | 4 +++- rsyslog.spec | 37 ++++++++++++++++++++++++++----------- 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/rsyslog.changes b/rsyslog.changes index 90fe536..7c254d2 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -1,9 +1,11 @@ ------------------------------------------------------------------- -Tue Apr 27 11:20:04 UTC 2010 - mt@suse.de +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 diff --git a/rsyslog.spec b/rsyslog.spec index 4b35d9e..09f75d4 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -19,7 +19,14 @@ Name: rsyslog -%define upstream_version 5.4.0 +%define upstream_version 5.4.0 +%define with_relp 0%{?suse_version} >= 1130 +%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 Release: 1 License: GPLv3+ @@ -33,8 +40,10 @@ BuildRequires: klogd BuildRequires: dos2unix openssl-devel pcre-devel pkgconfig zlib-devel BuildRequires: krb5-devel mysql-devel net-snmp-devel postgresql-devel BuildRequires: libgnutls-devel +%if %{?with_relp} # RELP support BuildRequires: librelp-devel +%endif # UDP spoof support BuildRequires: libnet BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -45,12 +54,7 @@ Source2: rsyslog.conf.in Source3: rsyslog.early.conf.in Source4: rsyslog.d.remote.conf.in Patch1: rsyslog.xconsole-pipe-loop.patch -%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/ + %description Rsyslog is an enhanced multi-threaded syslogd supporting, among others, MySQL, syslog/tcp, RFC 3195, permitted sender lists, filtering on any @@ -197,6 +201,7 @@ Authors: Michael Meckelein , Adiscon GmbH +%if %{?with_relp} %package module-relp License: GPLv3+ Group: System/Daemons @@ -214,6 +219,8 @@ Authors: Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH +%endif + %package module-udpspoof License: GPLv3+ Group: System/Daemons @@ -267,7 +274,9 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall" --enable-omprog \ --enable-omtemplate \ --enable-diagtools \ +%if %{?with_relp} --enable-relp \ +%endif --enable-omudpspoof \ --enable-omstdout \ --disable-static @@ -283,8 +292,11 @@ rm -f %{buildroot}%{rsyslog_module_dir_nodeps}/*.la # the user has to specify them with full path then... install -d -m0755 %{buildroot}%{rsyslog_module_dir_withdeps} for mod in omgssapi.so imgssapi.so lmgssutil.so ommysql.so \ - ompgsql.so omsnmp.so lmnsd_gtls.so imrelp.so omrelp.so ; -do + ompgsql.so omsnmp.so lmnsd_gtls.so \ +%if %{?with_relp} + imrelp.so omrelp.so \ +%endif +; do mv -f %{buildroot}%{rsyslog_module_dir_nodeps}/$mod \ %{buildroot}%{rsyslog_module_dir_withdeps} done @@ -395,7 +407,9 @@ touch var/log/NetworkManager; chmod 640 var/log/NetworkManager # touch the additional log sockets config file # additional_sockets="%{additional_sockets}" -touch "${additional_sockets#/}"; chmod 640 "${additional_sockets#/}" +mkdir -p -m750 ${additional_sockets%/*} +touch "${additional_sockets#/}" +chmod 640 "${additional_sockets#/}" %preun # @@ -466,7 +480,6 @@ fi %doc %{rsyslogdocdir}/AUTHORS %doc %{rsyslogdocdir}/COPYING %doc %{rsyslogdocdir}/COPYING.LESSER -%dir %{_localstatedir}/run/rsyslog %dir %{_localstatedir}/spool/rsyslog /var/adm/fillup-templates/sysconfig.syslog-rsyslog @@ -505,10 +518,12 @@ fi %defattr(-,root,root) %{rsyslog_module_dir_withdeps}/lmnsd_gtls.so +%if %{?with_relp} %files module-relp %defattr(-,root,root) %{rsyslog_module_dir_withdeps}/imrelp.so %{rsyslog_module_dir_withdeps}/omrelp.so +%endif %files module-udpspoof %defattr(-,root,root) From 4ec018862e1e1fb7160dabb5b2ad421de934eed0c8d3bf0229ddf265f4ab601f Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Tue, 27 Apr 2010 13:39:15 +0000 Subject: [PATCH 06/11] - Added possibility to force relp build on 11.2, e.g. by %define build_with_relp 1 in _link file. OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=20 --- rsyslog.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rsyslog.spec b/rsyslog.spec index 09f75d4..3af1555 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -20,7 +20,9 @@ Name: rsyslog %define upstream_version 5.4.0 -%define with_relp 0%{?suse_version} >= 1130 +# add %define build_with_relp 1 to enable relp on < 11.3, e.g. +# via %define build_with_relp 1 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 From 20c6efeb30da84d4a706491c64d1cd127737b12f8bfa0149237a6e59fab095ca Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Wed, 28 Apr 2010 17:27:01 +0000 Subject: [PATCH 07/11] - 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). OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=21 --- rsyslog.changes | 9 ++++ rsyslog.conf.in | 108 ++++++++++++++++++++++++++++++------------------ 2 files changed, 77 insertions(+), 40 deletions(-) diff --git a/rsyslog.changes b/rsyslog.changes index 7c254d2..08cb7fc 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +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 diff --git a/rsyslog.conf.in b/rsyslog.conf.in index 4465a28..a7db511 100644 --- a/rsyslog.conf.in +++ b/rsyslog.conf.in @@ -19,108 +19,136 @@ # rsyslog v3: load input modules # If you do not load inputs, nothing happens! -$ModLoad immark.so # provides --MARK-- message capability -$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 immark.so # provides --MARK-- message capability +$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), + # 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 # using the SYSLOGD_ADDITIONAL_SOCKET* variables in the # /etc/sysconfig/syslog file. # -$IncludeConfig ADDITIONAL_SOCKETS +$IncludeConfig /var/run/rsyslog/additional-log-sockets.conf # # 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 -# -kern.warning;*.err;authpriv.none /dev/tty10;RSYSLOG_TraditionalFileFormat -kern.warning;*.err;authpriv.none |/dev/xconsole;RSYSLOG_TraditionalFileFormat +if ( \ + /* kernel up to warning except of firewall */ \ + ($syslogfacility-text == 'kern') and \ + ($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 * # enable this, if you want that root is informed # immediately, e.g. of logins #*.alert root + # # firewall messages into separate file and stop their further processing # if ($syslogfacility-text == 'kern') and \ - ($msg contains 'IN=' and $msg contains 'OUT=') then \ - -/var/log/firewall;RSYSLOG_TraditionalFileFormat -if ($syslogfacility-text == 'kern') and \ - ($msg contains 'IN=' and $msg contains 'OUT=') then \ - ~ + ($msg contains 'IN=' and $msg contains 'OUT=') \ +then -/var/log/firewall +& ~ + # # acpid messages into separate file and stop their further processing # # => all acpid messages for debuging (uncomment if needed): #if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \ -# -/var/log/acpid;RSYSLOG_TraditionalFileFormat +# -/var/log/acpid # # => up to notice (skip info and debug) if ($programname == 'acpid' or $syslogtag == '[acpid]:') and \ - ($syslogseverity <= 5) then \ - -/var/log/acpid;RSYSLOG_TraditionalFileFormat -if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \ - ~ + ($syslogseverity <= 5 /* notice */) \ +then -/var/log/acpid +& ~ + # # NetworkManager into separate file and stop their further processing # if ($programname == 'NetworkManager') or \ - ($programname startswith 'nm-') then \ - -/var/log/NetworkManager;RSYSLOG_TraditionalFileFormat -if ($programname == 'NetworkManager') or \ - ($programname startswith 'nm-') then \ - ~ + ($programname startswith 'nm-') \ +then -/var/log/NetworkManager +& ~ + # # email-messages # -mail.* -/var/log/mail;RSYSLOG_TraditionalFileFormat -mail.info -/var/log/mail.info;RSYSLOG_TraditionalFileFormat -mail.warning -/var/log/mail.warn;RSYSLOG_TraditionalFileFormat -mail.err /var/log/mail.err;RSYSLOG_TraditionalFileFormat +mail.* -/var/log/mail +mail.info -/var/log/mail.info +mail.warning -/var/log/mail.warn +mail.err /var/log/mail.err + # # news-messages # -news.crit -/var/log/news/news.crit;RSYSLOG_TraditionalFileFormat -news.err -/var/log/news/news.err;RSYSLOG_TraditionalFileFormat -news.notice -/var/log/news/news.notice;RSYSLOG_TraditionalFileFormat +news.crit -/var/log/news/news.crit +news.err -/var/log/news/news.err +news.notice -/var/log/news/news.notice # enable this, if you want to keep all news messages # in one file -#news.* -/var/log/news.all;RSYSLOG_TraditionalFileFormat +#news.* -/var/log/news.all + # # Warnings in one file # -*.=warning;*.=err -/var/log/warn;RSYSLOG_TraditionalFileFormat -*.crit /var/log/warn;RSYSLOG_TraditionalFileFormat +*.=warning;*.=err -/var/log/warn +*.crit /var/log/warn + # # 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 # in one file -#*.* -/var/log/allmessages;RSYSLOG_TraditionalFileFormat +#*.* -/var/log/allmessages + # # Some foreign boot scripts require local7 # -local0,local1.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat -local2,local3.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat -local4,local5.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat -local6,local7.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat +local0,local1.* -/var/log/localmessages +local2,local3.* -/var/log/localmessages +local4,local5.* -/var/log/localmessages +local6,local7.* -/var/log/localmessages ### From bf2d9ac4d3448d16664f1803599e7430a71240b5e3eadf93c9093015e57a9877 Mon Sep 17 00:00:00 2001 From: OBS User autobuild Date: Thu, 13 May 2010 23:04:21 +0000 Subject: [PATCH 08/11] Accepting request 39733 from Base:System checked in (request 39733) OBS-URL: https://build.opensuse.org/request/show/39733 OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=22 --- rsyslog.changes | 29 ---- rsyslog.conf.in | 108 +++++--------- rsyslog.spec | 245 ++++++++++++------------------- rsyslog.xconsole-pipe-loop.patch | 109 -------------- 4 files changed, 135 insertions(+), 356 deletions(-) delete mode 100644 rsyslog.xconsole-pipe-loop.patch diff --git a/rsyslog.changes b/rsyslog.changes index 08cb7fc..f677278 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -1,32 +1,3 @@ -------------------------------------------------------------------- -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 diff --git a/rsyslog.conf.in b/rsyslog.conf.in index a7db511..4465a28 100644 --- a/rsyslog.conf.in +++ b/rsyslog.conf.in @@ -19,136 +19,108 @@ # rsyslog v3: load input modules # If you do not load inputs, nothing happens! -$ModLoad immark.so # provides --MARK-- message capability -$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), - # 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 - +$ModLoad immark.so # provides --MARK-- message capability +$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) # # Include config generated by /etc/init.d/syslog script # using the SYSLOGD_ADDITIONAL_SOCKET* variables in the # /etc/sysconfig/syslog file. # -$IncludeConfig /var/run/rsyslog/additional-log-sockets.conf +$IncludeConfig ADDITIONAL_SOCKETS # # Include config files, that the admin provided? : # -$IncludeConfig /etc/rsyslog.d/*.conf - +$IncludeConfig ETC_RSYSLOG_D_GLOB ### -# print most important on tty10 and on the xconsole pipe # -if ( \ - /* kernel up to warning except of firewall */ \ - ($syslogfacility-text == 'kern') and \ - ($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) +# print most on tty10 and on the xconsole pipe +# +kern.warning;*.err;authpriv.none /dev/tty10;RSYSLOG_TraditionalFileFormat +kern.warning;*.err;authpriv.none |/dev/xconsole;RSYSLOG_TraditionalFileFormat *.emerg * # enable this, if you want that root is informed # immediately, e.g. of logins #*.alert root - # # firewall messages into separate file and stop their further processing # if ($syslogfacility-text == 'kern') and \ - ($msg contains 'IN=' and $msg contains 'OUT=') \ -then -/var/log/firewall -& ~ - + ($msg contains 'IN=' and $msg contains 'OUT=') then \ + -/var/log/firewall;RSYSLOG_TraditionalFileFormat +if ($syslogfacility-text == 'kern') and \ + ($msg contains 'IN=' and $msg contains 'OUT=') then \ + ~ # # acpid messages into separate file and stop their further processing # # => all acpid messages for debuging (uncomment if needed): #if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \ -# -/var/log/acpid +# -/var/log/acpid;RSYSLOG_TraditionalFileFormat # # => up to notice (skip info and debug) if ($programname == 'acpid' or $syslogtag == '[acpid]:') and \ - ($syslogseverity <= 5 /* notice */) \ -then -/var/log/acpid -& ~ - + ($syslogseverity <= 5) then \ + -/var/log/acpid;RSYSLOG_TraditionalFileFormat +if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \ + ~ # # NetworkManager into separate file and stop their further processing # if ($programname == 'NetworkManager') or \ - ($programname startswith 'nm-') \ -then -/var/log/NetworkManager -& ~ - + ($programname startswith 'nm-') then \ + -/var/log/NetworkManager;RSYSLOG_TraditionalFileFormat +if ($programname == 'NetworkManager') or \ + ($programname startswith 'nm-') then \ + ~ # # email-messages # -mail.* -/var/log/mail -mail.info -/var/log/mail.info -mail.warning -/var/log/mail.warn -mail.err /var/log/mail.err - +mail.* -/var/log/mail;RSYSLOG_TraditionalFileFormat +mail.info -/var/log/mail.info;RSYSLOG_TraditionalFileFormat +mail.warning -/var/log/mail.warn;RSYSLOG_TraditionalFileFormat +mail.err /var/log/mail.err;RSYSLOG_TraditionalFileFormat # # news-messages # -news.crit -/var/log/news/news.crit -news.err -/var/log/news/news.err -news.notice -/var/log/news/news.notice +news.crit -/var/log/news/news.crit;RSYSLOG_TraditionalFileFormat +news.err -/var/log/news/news.err;RSYSLOG_TraditionalFileFormat +news.notice -/var/log/news/news.notice;RSYSLOG_TraditionalFileFormat # enable this, if you want to keep all news messages # in one file -#news.* -/var/log/news.all - +#news.* -/var/log/news.all;RSYSLOG_TraditionalFileFormat # # Warnings in one file # -*.=warning;*.=err -/var/log/warn -*.crit /var/log/warn - +*.=warning;*.=err -/var/log/warn;RSYSLOG_TraditionalFileFormat +*.crit /var/log/warn;RSYSLOG_TraditionalFileFormat # # the rest in one file # -*.*;mail.none;news.none -/var/log/messages - +*.*;mail.none;news.none -/var/log/messages;RSYSLOG_TraditionalFileFormat # # enable this, if you want to keep all messages # in one file -#*.* -/var/log/allmessages - +#*.* -/var/log/allmessages;RSYSLOG_TraditionalFileFormat # # Some foreign boot scripts require local7 # -local0,local1.* -/var/log/localmessages -local2,local3.* -/var/log/localmessages -local4,local5.* -/var/log/localmessages -local6,local7.* -/var/log/localmessages +local0,local1.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat +local2,local3.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat +local4,local5.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat +local6,local7.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat ### diff --git a/rsyslog.spec b/rsyslog.spec index 3af1555..f837af5 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -19,16 +19,9 @@ Name: rsyslog -%define upstream_version 5.4.0 -# add %define build_with_relp 1 to enable relp on < 11.3, e.g. -# via %define build_with_relp 1 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/ +%define upstream_version 5.4.0 +%define rsyslog_docdir %{_docdir}/%{name} +%define install_all_modules_in_lib 0 Version: 5.4.0 Release: 1 License: GPLv3+ @@ -42,12 +35,6 @@ BuildRequires: klogd BuildRequires: dos2unix openssl-devel pcre-devel pkgconfig zlib-devel BuildRequires: krb5-devel mysql-devel net-snmp-devel postgresql-devel BuildRequires: libgnutls-devel -%if %{?with_relp} -# RELP support -BuildRequires: librelp-devel -%endif -# UDP spoof support -BuildRequires: libnet BuildRoot: %{_tmppath}/%{name}-%{version}-build #Source0: http://download.rsyslog.com/rsyslog/%{name}-%{upstream_version}.tar.gz Source0: %{name}-%{upstream_version}.tar.bz2 @@ -55,7 +42,10 @@ Source1: rsyslog.sysconfig Source2: rsyslog.conf.in Source3: rsyslog.early.conf.in Source4: rsyslog.d.remote.conf.in -Patch1: rsyslog.xconsole-pipe-loop.patch +%define _sbindir /sbin +%define _libdir /%_lib +%define rsyslogdocdir %{_docdir}/%{name} +%define additional_sockets %{_localstatedir}/run/rsyslog/additional-log-sockets.conf %description Rsyslog is an enhanced multi-threaded syslogd supporting, among others, @@ -66,12 +56,13 @@ Its advanced features make it suitable for enterprise-class, encryption protected syslog relay chains while at the same time being very easy to setup for the novice user. + + Authors: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH - %package doc License: GPLv3+ Group: System/Daemons @@ -84,31 +75,13 @@ package. This package provides additional documentation for rsyslog. -Authors: --------- - Rainer Gerhards , Adiscon GmbH - Michael Meckelein , 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: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH - %package module-gssapi License: GPLv3+ Group: System/Daemons @@ -122,12 +95,13 @@ package. This module provides the support to receive syslog messages from the network protected via Kerberos 5 encryption and authentication. + + Authors: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH - %package module-mysql License: GPLv3+ Group: System/Daemons @@ -141,12 +115,13 @@ package. This package provides a module with the support for logging into MySQL databases. + + Authors: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH - %package module-pgsql License: GPLv3+ Group: System/Daemons @@ -159,12 +134,13 @@ package. This module provides the support for logging into PostgreSQL databases. + + Authors: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH - %package module-snmp License: GPLv3+ Group: System/Daemons @@ -178,12 +154,13 @@ package. This module provides the ability to send syslog messages as an SNMPv1 & v2c traps. + + Authors: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH - %package module-gtls License: GPLv3+ Group: System/Daemons @@ -197,66 +174,27 @@ package. This module provides the ability for TLS encrypted TCP logging (based on current syslog-transport-tls internet drafts). -Authors: --------- - Rainer Gerhards , Adiscon GmbH - Michael Meckelein , 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: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , 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 , Adiscon GmbH - Michael Meckelein , Adiscon GmbH - - %prep %setup -q -n %{name}-%{upstream_version} dos2unix doc/*.html -%patch1 -p1 %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall" %if 0%{?suse_version} > 1000 && 0%{?suse_version} < 1030 export CFLAGS="$CFLAGS -fstack-protector" %endif -# needs liblogging -# --enable-rfc3195 \ -# needs java -# --enable-gui \ +autoreconf -fi %configure \ - --with-moddirs=%{rsyslog_module_dir_withdeps} \ +%if ! 0%{install_all_modules_in_lib} + --with-moddirs=%{_prefix}%{_libdir}/rsyslog/ \ +%endif --enable-option-checking \ --enable-largefile \ --enable-pthreads \ @@ -275,33 +213,25 @@ export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall" --enable-imtemplate \ --enable-omprog \ --enable-omtemplate \ - --enable-diagtools \ -%if %{?with_relp} - --enable-relp \ -%endif - --enable-omudpspoof \ - --enable-omstdout \ --disable-static - -make %{?_smp_mflags:%{_smp_mflags}} V=1 +make %{?_smp_mflags:%{_smp_mflags}} %install -make install DESTDIR="%{buildroot}" V=1 +make install DESTDIR="%{buildroot}" # -rm -f %{buildroot}%{rsyslog_module_dir_nodeps}/*.la +rm -f %{buildroot}%{_libdir}/rsyslog/*.la # +%if ! 0%{install_all_modules_in_lib} # move all modules linking libraries in /usr to /usr/%_lib # the user has to specify them with full path then... -install -d -m0755 %{buildroot}%{rsyslog_module_dir_withdeps} +install -d -m0755 %{buildroot}%{_prefix}%{_libdir}/rsyslog for mod in omgssapi.so imgssapi.so lmgssutil.so ommysql.so \ - ompgsql.so omsnmp.so lmnsd_gtls.so \ -%if %{?with_relp} - imrelp.so omrelp.so \ -%endif -; do - mv -f %{buildroot}%{rsyslog_module_dir_nodeps}/$mod \ - %{buildroot}%{rsyslog_module_dir_withdeps} + ompgsql.so omsnmp.so lmnsd_gtls.so ; +do + mv -f %{buildroot}%{_libdir}/rsyslog/$mod \ + %{buildroot}%{_prefix}%{_libdir}/rsyslog/ done +%endif # install -d -m0755 %{buildroot}%{_sysconfdir}/rsyslog.d install -d -m0755 %{buildroot}%{_localstatedir}/run/rsyslog @@ -409,9 +339,7 @@ touch var/log/NetworkManager; chmod 640 var/log/NetworkManager # touch the additional log sockets config file # additional_sockets="%{additional_sockets}" -mkdir -p -m750 ${additional_sockets%/*} -touch "${additional_sockets#/}" -chmod 640 "${additional_sockets#/}" +touch "${additional_sockets#/}"; chmod 640 "${additional_sockets#/}" %preun # @@ -450,29 +378,30 @@ fi %config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.early.conf %config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.d/remote.conf %{_sbindir}/rsyslogd -%dir %{rsyslog_module_dir_nodeps} -%{rsyslog_module_dir_nodeps}/imfile.so -%{rsyslog_module_dir_nodeps}/imklog.so -%{rsyslog_module_dir_nodeps}/immark.so -%{rsyslog_module_dir_nodeps}/imtcp.so -%{rsyslog_module_dir_nodeps}/imtemplate.so -%{rsyslog_module_dir_nodeps}/imudp.so -%{rsyslog_module_dir_nodeps}/imuxsock.so -%{rsyslog_module_dir_nodeps}/lmnet.so -%{rsyslog_module_dir_nodeps}/lmnetstrms.so -%{rsyslog_module_dir_nodeps}/lmnsd_ptcp.so -%{rsyslog_module_dir_nodeps}/lmregexp.so -%{rsyslog_module_dir_nodeps}/lmstrmsrv.so -%{rsyslog_module_dir_nodeps}/lmtcpclt.so -%{rsyslog_module_dir_nodeps}/lmtcpsrv.so -%{rsyslog_module_dir_nodeps}/lmzlibw.so -%{rsyslog_module_dir_nodeps}/ommail.so -%{rsyslog_module_dir_nodeps}/omprog.so -%{rsyslog_module_dir_nodeps}/omruleset.so -%{rsyslog_module_dir_nodeps}/omtemplate.so -%{rsyslog_module_dir_nodeps}/omtesting.so -%{rsyslog_module_dir_nodeps}/omstdout.so -%dir %{rsyslog_module_dir_withdeps} +%dir %{_libdir}/rsyslog +%{_libdir}/rsyslog/imfile.so +%{_libdir}/rsyslog/imklog.so +%{_libdir}/rsyslog/immark.so +%{_libdir}/rsyslog/imtcp.so +%{_libdir}/rsyslog/imtemplate.so +%{_libdir}/rsyslog/imudp.so +%{_libdir}/rsyslog/imuxsock.so +%{_libdir}/rsyslog/lmnet.so +%{_libdir}/rsyslog/lmnetstrms.so +%{_libdir}/rsyslog/lmnsd_ptcp.so +%{_libdir}/rsyslog/lmregexp.so +%{_libdir}/rsyslog/lmstrmsrv.so +%{_libdir}/rsyslog/lmtcpclt.so +%{_libdir}/rsyslog/lmtcpsrv.so +%{_libdir}/rsyslog/lmzlibw.so +%{_libdir}/rsyslog/ommail.so +%{_libdir}/rsyslog/omprog.so +%{_libdir}/rsyslog/omruleset.so +%{_libdir}/rsyslog/omtemplate.so +%{_libdir}/rsyslog/omtesting.so +%if ! 0%{install_all_modules_in_lib} +%dir %{_prefix}%{_libdir}/rsyslog +%endif %{_mandir}/man5/rsyslog.conf.5* %{_mandir}/man8/rsyslogd.8* %dir %{rsyslogdocdir} @@ -482,6 +411,7 @@ fi %doc %{rsyslogdocdir}/AUTHORS %doc %{rsyslogdocdir}/COPYING %doc %{rsyslogdocdir}/COPYING.LESSER +%dir %{_localstatedir}/run/rsyslog %dir %{_localstatedir}/spool/rsyslog /var/adm/fillup-templates/sysconfig.syslog-rsyslog @@ -490,45 +420,60 @@ fi %dir %{rsyslogdocdir} %doc %{rsyslogdocdir}/doc -%files diag-tools -%defattr(-,root,root) -%{_sbindir}/msggen -%{_sbindir}/rsyslog_diag_hostname -%{_sbindir}/zpipe - %files module-gssapi %defattr(-,root,root) -%{rsyslog_module_dir_withdeps}/omgssapi.so -%{rsyslog_module_dir_withdeps}/imgssapi.so -%{rsyslog_module_dir_withdeps}/lmgssutil.so +%if 0%{install_all_modules_in_lib} +%dir %{_libdir}/rsyslog +%{_libdir}/rsyslog/omgssapi.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 %defattr(-,root,root) %doc %{rsyslogdocdir}/mysql-createDB.sql -%{rsyslog_module_dir_withdeps}/ommysql.so +%if 0%{install_all_modules_in_lib} +%dir %{_libdir}/rsyslog +%{_libdir}/rsyslog/ommysql.so +%else +%dir %{_prefix}%{_libdir}/rsyslog +%{_prefix}%{_libdir}/rsyslog/ommysql.so +%endif %files module-pgsql %defattr(-,root,root) %doc %{rsyslogdocdir}/pgsql-createDB.sql -%{rsyslog_module_dir_withdeps}/ompgsql.so +%if 0%{install_all_modules_in_lib} +%dir %{_libdir}/rsyslog +%{_libdir}/rsyslog/ompgsql.so +%else +%dir %{_prefix}%{_libdir}/rsyslog +%{_prefix}%{_libdir}/rsyslog/ompgsql.so +%endif %files module-snmp %defattr(-,root,root) -%{rsyslog_module_dir_withdeps}/omsnmp.so +%if 0%{install_all_modules_in_lib} +%dir %{_libdir}/rsyslog +%{_libdir}/rsyslog/omsnmp.so +%else +%dir %{_prefix}%{_libdir}/rsyslog +%{_prefix}%{_libdir}/rsyslog/omsnmp.so +%endif %files module-gtls %defattr(-,root,root) -%{rsyslog_module_dir_withdeps}/lmnsd_gtls.so - -%if %{?with_relp} -%files module-relp -%defattr(-,root,root) -%{rsyslog_module_dir_withdeps}/imrelp.so -%{rsyslog_module_dir_withdeps}/omrelp.so +%if 0%{install_all_modules_in_lib} +%dir %{_libdir}/rsyslog +%{_libdir}/rsyslog/lmnsd_gtls.so +%else +%dir %{_prefix}%{_libdir}/rsyslog +%{_prefix}%{_libdir}/rsyslog/lmnsd_gtls.so %endif -%files module-udpspoof -%defattr(-,root,root) -%{rsyslog_module_dir_nodeps}/omudpspoof.so - %changelog diff --git a/rsyslog.xconsole-pipe-loop.patch b/rsyslog.xconsole-pipe-loop.patch deleted file mode 100644 index 2949342..0000000 --- a/rsyslog.xconsole-pipe-loop.patch +++ /dev/null @@ -1,109 +0,0 @@ - -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 */ From c783bec822650ab4b7d42b2be120e090bdfa1d3d98eb7192dd0b3316a6866cf3 Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 16 Sep 2010 10:27:13 +0000 Subject: [PATCH 09/11] OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=23 --- rsyslog.changes | 29 ++++ rsyslog.conf.in | 108 +++++++++----- rsyslog.spec | 249 +++++++++++++++++++------------ rsyslog.xconsole-pipe-loop.patch | 109 ++++++++++++++ 4 files changed, 359 insertions(+), 136 deletions(-) create mode 100644 rsyslog.xconsole-pipe-loop.patch diff --git a/rsyslog.changes b/rsyslog.changes index f677278..08cb7fc 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -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 diff --git a/rsyslog.conf.in b/rsyslog.conf.in index 4465a28..a7db511 100644 --- a/rsyslog.conf.in +++ b/rsyslog.conf.in @@ -19,108 +19,136 @@ # rsyslog v3: load input modules # If you do not load inputs, nothing happens! -$ModLoad immark.so # provides --MARK-- message capability -$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 immark.so # provides --MARK-- message capability +$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), + # 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 # using the SYSLOGD_ADDITIONAL_SOCKET* variables in the # /etc/sysconfig/syslog file. # -$IncludeConfig ADDITIONAL_SOCKETS +$IncludeConfig /var/run/rsyslog/additional-log-sockets.conf # # 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 -# -kern.warning;*.err;authpriv.none /dev/tty10;RSYSLOG_TraditionalFileFormat -kern.warning;*.err;authpriv.none |/dev/xconsole;RSYSLOG_TraditionalFileFormat +if ( \ + /* kernel up to warning except of firewall */ \ + ($syslogfacility-text == 'kern') and \ + ($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 * # enable this, if you want that root is informed # immediately, e.g. of logins #*.alert root + # # firewall messages into separate file and stop their further processing # if ($syslogfacility-text == 'kern') and \ - ($msg contains 'IN=' and $msg contains 'OUT=') then \ - -/var/log/firewall;RSYSLOG_TraditionalFileFormat -if ($syslogfacility-text == 'kern') and \ - ($msg contains 'IN=' and $msg contains 'OUT=') then \ - ~ + ($msg contains 'IN=' and $msg contains 'OUT=') \ +then -/var/log/firewall +& ~ + # # acpid messages into separate file and stop their further processing # # => all acpid messages for debuging (uncomment if needed): #if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \ -# -/var/log/acpid;RSYSLOG_TraditionalFileFormat +# -/var/log/acpid # # => up to notice (skip info and debug) if ($programname == 'acpid' or $syslogtag == '[acpid]:') and \ - ($syslogseverity <= 5) then \ - -/var/log/acpid;RSYSLOG_TraditionalFileFormat -if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \ - ~ + ($syslogseverity <= 5 /* notice */) \ +then -/var/log/acpid +& ~ + # # NetworkManager into separate file and stop their further processing # if ($programname == 'NetworkManager') or \ - ($programname startswith 'nm-') then \ - -/var/log/NetworkManager;RSYSLOG_TraditionalFileFormat -if ($programname == 'NetworkManager') or \ - ($programname startswith 'nm-') then \ - ~ + ($programname startswith 'nm-') \ +then -/var/log/NetworkManager +& ~ + # # email-messages # -mail.* -/var/log/mail;RSYSLOG_TraditionalFileFormat -mail.info -/var/log/mail.info;RSYSLOG_TraditionalFileFormat -mail.warning -/var/log/mail.warn;RSYSLOG_TraditionalFileFormat -mail.err /var/log/mail.err;RSYSLOG_TraditionalFileFormat +mail.* -/var/log/mail +mail.info -/var/log/mail.info +mail.warning -/var/log/mail.warn +mail.err /var/log/mail.err + # # news-messages # -news.crit -/var/log/news/news.crit;RSYSLOG_TraditionalFileFormat -news.err -/var/log/news/news.err;RSYSLOG_TraditionalFileFormat -news.notice -/var/log/news/news.notice;RSYSLOG_TraditionalFileFormat +news.crit -/var/log/news/news.crit +news.err -/var/log/news/news.err +news.notice -/var/log/news/news.notice # enable this, if you want to keep all news messages # in one file -#news.* -/var/log/news.all;RSYSLOG_TraditionalFileFormat +#news.* -/var/log/news.all + # # Warnings in one file # -*.=warning;*.=err -/var/log/warn;RSYSLOG_TraditionalFileFormat -*.crit /var/log/warn;RSYSLOG_TraditionalFileFormat +*.=warning;*.=err -/var/log/warn +*.crit /var/log/warn + # # 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 # in one file -#*.* -/var/log/allmessages;RSYSLOG_TraditionalFileFormat +#*.* -/var/log/allmessages + # # Some foreign boot scripts require local7 # -local0,local1.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat -local2,local3.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat -local4,local5.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat -local6,local7.* -/var/log/localmessages;RSYSLOG_TraditionalFileFormat +local0,local1.* -/var/log/localmessages +local2,local3.* -/var/log/localmessages +local4,local5.* -/var/log/localmessages +local6,local7.* -/var/log/localmessages ### diff --git a/rsyslog.spec b/rsyslog.spec index f837af5..cf14da0 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -19,11 +19,18 @@ Name: rsyslog -%define upstream_version 5.4.0 -%define rsyslog_docdir %{_docdir}/%{name} -%define install_all_modules_in_lib 0 +%define upstream_version 5.4.0 +# add %define build_with_relp 1 to enable relp on < 11.3, e.g. +# via %define build_with_relp 1 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 -Release: 1 +Release: 2 License: GPLv3+ Group: System/Daemons 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: krb5-devel mysql-devel net-snmp-devel postgresql-devel BuildRequires: libgnutls-devel +%if %{?with_relp} +# RELP support +BuildRequires: librelp-devel +%endif +# UDP spoof support +BuildRequires: libnet BuildRoot: %{_tmppath}/%{name}-%{version}-build #Source0: http://download.rsyslog.com/rsyslog/%{name}-%{upstream_version}.tar.gz Source0: %{name}-%{upstream_version}.tar.bz2 @@ -42,10 +55,7 @@ Source1: rsyslog.sysconfig Source2: rsyslog.conf.in Source3: rsyslog.early.conf.in Source4: rsyslog.d.remote.conf.in -%define _sbindir /sbin -%define _libdir /%_lib -%define rsyslogdocdir %{_docdir}/%{name} -%define additional_sockets %{_localstatedir}/run/rsyslog/additional-log-sockets.conf +Patch1: rsyslog.xconsole-pipe-loop.patch %description 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 setup for the novice user. - - Authors: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH + %package doc License: GPLv3+ Group: System/Daemons @@ -75,13 +84,31 @@ package. This package provides additional documentation for rsyslog. +Authors: +-------- + Rainer Gerhards , Adiscon GmbH + Michael Meckelein , 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: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH + %package module-gssapi License: GPLv3+ Group: System/Daemons @@ -95,13 +122,12 @@ package. This module provides the support to receive syslog messages from the network protected via Kerberos 5 encryption and authentication. - - Authors: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH + %package module-mysql License: GPLv3+ Group: System/Daemons @@ -115,13 +141,12 @@ package. This package provides a module with the support for logging into MySQL databases. - - Authors: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH + %package module-pgsql License: GPLv3+ Group: System/Daemons @@ -134,13 +159,12 @@ package. This module provides the support for logging into PostgreSQL databases. - - Authors: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH + %package module-snmp License: GPLv3+ Group: System/Daemons @@ -154,13 +178,12 @@ package. This module provides the ability to send syslog messages as an SNMPv1 & v2c traps. - - Authors: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , Adiscon GmbH + %package module-gtls License: GPLv3+ Group: System/Daemons @@ -174,27 +197,67 @@ package. This module provides the ability for TLS encrypted TCP logging (based on current syslog-transport-tls internet drafts). +Authors: +-------- + Rainer Gerhards , Adiscon GmbH + Michael Meckelein , 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: -------- Rainer Gerhards , Adiscon GmbH Michael Meckelein , 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 , Adiscon GmbH + Michael Meckelein , Adiscon GmbH + + %prep %setup -q -n %{name}-%{upstream_version} dos2unix doc/*.html +%patch1 -p1 %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall" %if 0%{?suse_version} > 1000 && 0%{?suse_version} < 1030 export CFLAGS="$CFLAGS -fstack-protector" %endif -autoreconf -fi +# needs liblogging +# --enable-rfc3195 \ +# needs java +# --enable-gui \ %configure \ -%if ! 0%{install_all_modules_in_lib} - --with-moddirs=%{_prefix}%{_libdir}/rsyslog/ \ -%endif + --with-moddirs=%{rsyslog_module_dir_withdeps} \ --enable-option-checking \ --enable-largefile \ --enable-pthreads \ @@ -213,25 +276,33 @@ autoreconf -fi --enable-imtemplate \ --enable-omprog \ --enable-omtemplate \ + --enable-diagtools \ +%if %{?with_relp} + --enable-relp \ +%endif + --enable-omudpspoof \ + --enable-omstdout \ --disable-static -make %{?_smp_mflags:%{_smp_mflags}} + +make %{?_smp_mflags:%{_smp_mflags}} V=1 %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 # 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 \ - ompgsql.so omsnmp.so lmnsd_gtls.so ; -do - mv -f %{buildroot}%{_libdir}/rsyslog/$mod \ - %{buildroot}%{_prefix}%{_libdir}/rsyslog/ -done + ompgsql.so omsnmp.so lmnsd_gtls.so \ +%if %{?with_relp} + imrelp.so omrelp.so \ %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}%{_localstatedir}/run/rsyslog @@ -339,7 +410,9 @@ touch var/log/NetworkManager; chmod 640 var/log/NetworkManager # touch the additional log sockets config file # additional_sockets="%{additional_sockets}" -touch "${additional_sockets#/}"; chmod 640 "${additional_sockets#/}" +mkdir -p -m750 ${additional_sockets%/*} +touch "${additional_sockets#/}" +chmod 640 "${additional_sockets#/}" %preun # @@ -378,30 +451,29 @@ fi %config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.early.conf %config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.d/remote.conf %{_sbindir}/rsyslogd -%dir %{_libdir}/rsyslog -%{_libdir}/rsyslog/imfile.so -%{_libdir}/rsyslog/imklog.so -%{_libdir}/rsyslog/immark.so -%{_libdir}/rsyslog/imtcp.so -%{_libdir}/rsyslog/imtemplate.so -%{_libdir}/rsyslog/imudp.so -%{_libdir}/rsyslog/imuxsock.so -%{_libdir}/rsyslog/lmnet.so -%{_libdir}/rsyslog/lmnetstrms.so -%{_libdir}/rsyslog/lmnsd_ptcp.so -%{_libdir}/rsyslog/lmregexp.so -%{_libdir}/rsyslog/lmstrmsrv.so -%{_libdir}/rsyslog/lmtcpclt.so -%{_libdir}/rsyslog/lmtcpsrv.so -%{_libdir}/rsyslog/lmzlibw.so -%{_libdir}/rsyslog/ommail.so -%{_libdir}/rsyslog/omprog.so -%{_libdir}/rsyslog/omruleset.so -%{_libdir}/rsyslog/omtemplate.so -%{_libdir}/rsyslog/omtesting.so -%if ! 0%{install_all_modules_in_lib} -%dir %{_prefix}%{_libdir}/rsyslog -%endif +%dir %{rsyslog_module_dir_nodeps} +%{rsyslog_module_dir_nodeps}/imfile.so +%{rsyslog_module_dir_nodeps}/imklog.so +%{rsyslog_module_dir_nodeps}/immark.so +%{rsyslog_module_dir_nodeps}/imtcp.so +%{rsyslog_module_dir_nodeps}/imtemplate.so +%{rsyslog_module_dir_nodeps}/imudp.so +%{rsyslog_module_dir_nodeps}/imuxsock.so +%{rsyslog_module_dir_nodeps}/lmnet.so +%{rsyslog_module_dir_nodeps}/lmnetstrms.so +%{rsyslog_module_dir_nodeps}/lmnsd_ptcp.so +%{rsyslog_module_dir_nodeps}/lmregexp.so +%{rsyslog_module_dir_nodeps}/lmstrmsrv.so +%{rsyslog_module_dir_nodeps}/lmtcpclt.so +%{rsyslog_module_dir_nodeps}/lmtcpsrv.so +%{rsyslog_module_dir_nodeps}/lmzlibw.so +%{rsyslog_module_dir_nodeps}/ommail.so +%{rsyslog_module_dir_nodeps}/omprog.so +%{rsyslog_module_dir_nodeps}/omruleset.so +%{rsyslog_module_dir_nodeps}/omtemplate.so +%{rsyslog_module_dir_nodeps}/omtesting.so +%{rsyslog_module_dir_nodeps}/omstdout.so +%dir %{rsyslog_module_dir_withdeps} %{_mandir}/man5/rsyslog.conf.5* %{_mandir}/man8/rsyslogd.8* %dir %{rsyslogdocdir} @@ -411,7 +483,6 @@ fi %doc %{rsyslogdocdir}/AUTHORS %doc %{rsyslogdocdir}/COPYING %doc %{rsyslogdocdir}/COPYING.LESSER -%dir %{_localstatedir}/run/rsyslog %dir %{_localstatedir}/spool/rsyslog /var/adm/fillup-templates/sysconfig.syslog-rsyslog @@ -420,60 +491,46 @@ fi %dir %{rsyslogdocdir} %doc %{rsyslogdocdir}/doc +%files diag-tools +%defattr(-,root,root) +%{_sbindir}/msggen +%{_sbindir}/rsyslog_diag_hostname +%{_sbindir}/zpipe + %files module-gssapi %defattr(-,root,root) -%if 0%{install_all_modules_in_lib} -%dir %{_libdir}/rsyslog -%{_libdir}/rsyslog/omgssapi.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 +%{rsyslog_module_dir_withdeps}/omgssapi.so +%{rsyslog_module_dir_withdeps}/imgssapi.so +%{rsyslog_module_dir_withdeps}/lmgssutil.so %files module-mysql %defattr(-,root,root) %doc %{rsyslogdocdir}/mysql-createDB.sql -%if 0%{install_all_modules_in_lib} -%dir %{_libdir}/rsyslog -%{_libdir}/rsyslog/ommysql.so -%else -%dir %{_prefix}%{_libdir}/rsyslog -%{_prefix}%{_libdir}/rsyslog/ommysql.so -%endif +%{rsyslog_module_dir_withdeps}/ommysql.so %files module-pgsql %defattr(-,root,root) %doc %{rsyslogdocdir}/pgsql-createDB.sql -%if 0%{install_all_modules_in_lib} -%dir %{_libdir}/rsyslog -%{_libdir}/rsyslog/ompgsql.so -%else -%dir %{_prefix}%{_libdir}/rsyslog -%{_prefix}%{_libdir}/rsyslog/ompgsql.so -%endif +%{rsyslog_module_dir_withdeps}/ompgsql.so %files module-snmp %defattr(-,root,root) -%if 0%{install_all_modules_in_lib} -%dir %{_libdir}/rsyslog -%{_libdir}/rsyslog/omsnmp.so -%else -%dir %{_prefix}%{_libdir}/rsyslog -%{_prefix}%{_libdir}/rsyslog/omsnmp.so -%endif +%{rsyslog_module_dir_withdeps}/omsnmp.so %files module-gtls %defattr(-,root,root) -%if 0%{install_all_modules_in_lib} -%dir %{_libdir}/rsyslog -%{_libdir}/rsyslog/lmnsd_gtls.so -%else -%dir %{_prefix}%{_libdir}/rsyslog -%{_prefix}%{_libdir}/rsyslog/lmnsd_gtls.so +%{rsyslog_module_dir_withdeps}/lmnsd_gtls.so + +%if %{?with_relp} + +%files module-relp +%defattr(-,root,root) +%{rsyslog_module_dir_withdeps}/imrelp.so +%{rsyslog_module_dir_withdeps}/omrelp.so %endif +%files module-udpspoof +%defattr(-,root,root) +%{rsyslog_module_dir_nodeps}/omudpspoof.so + %changelog diff --git a/rsyslog.xconsole-pipe-loop.patch b/rsyslog.xconsole-pipe-loop.patch new file mode 100644 index 0000000..2949342 --- /dev/null +++ b/rsyslog.xconsole-pipe-loop.patch @@ -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 */ From 0fec087606c7a3b857825b7934a69cc7c1ce8af3e63eae0025ed4fbf540fd7d2 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Tue, 16 Nov 2010 08:28:42 +0000 Subject: [PATCH 10/11] Accepting request 53050 from home:computersalat:devel:Base thanks! OBS-URL: https://build.opensuse.org/request/show/53050 OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=24 --- rsyslog-5.4.0.tar.bz2 | 3 - rsyslog-5.6.0.tar.bz2 | 3 + rsyslog.changes | 16 +++++ rsyslog.spec | 12 ++-- rsyslog.xconsole-pipe-loop.patch | 109 ------------------------------- 5 files changed, 24 insertions(+), 119 deletions(-) delete mode 100644 rsyslog-5.4.0.tar.bz2 create mode 100644 rsyslog-5.6.0.tar.bz2 delete mode 100644 rsyslog.xconsole-pipe-loop.patch diff --git a/rsyslog-5.4.0.tar.bz2 b/rsyslog-5.4.0.tar.bz2 deleted file mode 100644 index 7475a93..0000000 --- a/rsyslog-5.4.0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5dff740a69789435579382b3a16e2b101d4c6a326a2f8e86b35f54fd877baf95 -size 1772569 diff --git a/rsyslog-5.6.0.tar.bz2 b/rsyslog-5.6.0.tar.bz2 new file mode 100644 index 0000000..3c022dc --- /dev/null +++ b/rsyslog-5.6.0.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8621e10f2f5db116519005a4ca09d83e491d4da4b5a37a0f40e09a5c16c140f5 +size 1844979 diff --git a/rsyslog.changes b/rsyslog.changes index 08cb7fc..285ccce 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Mon Nov 15 14:59:21 UTC 2010 - chris@computersalat.de + +- update to 5.6.0 + This release brings all changes and enhancements of the 5.5.x series + to the v5-stable branch. + - bugfix: a couple of problems that imfile had on some platforms, namely + Ubuntu (not their fault, but occured there) + - bugfix: imfile utilizes 32 bit to track offset. Most importantly, + this problem can not experienced on Fedora 64 bit OS (which has + 64 bit long's!) +- disable obsolete patch + - xconsole-pipe-loop +- rpmlint + - name-repeated-in-summary C Rsyslog + ------------------------------------------------------------------- Wed Apr 28 17:21:03 UTC 2010 - mt@suse.de diff --git a/rsyslog.spec b/rsyslog.spec index cf14da0..5c5da63 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -1,5 +1,5 @@ # -# spec file for package rsyslog (Version 5.4.0) +# spec file for package rsyslog (Version 5.6.0) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -19,7 +19,10 @@ Name: rsyslog -%define upstream_version 5.4.0 +Summary: The enhanced syslogd for Linux and Unix +Version: 5.6.0 +%define upstream_version 5.6.0 +Release: 1 # add %define build_with_relp 1 to enable relp on < 11.3, e.g. # via %define build_with_relp 1 in _link file. %define with_relp 0%{?suse_version} >= 1130 || 0%{?build_with_relp:1} @@ -29,11 +32,8 @@ Name: rsyslog %define _libdir /%_lib %define rsyslog_module_dir_nodeps %{_libdir}/rsyslog/ %define rsyslog_module_dir_withdeps %{_prefix}/%{_lib}/rsyslog/ -Version: 5.4.0 -Release: 2 License: GPLv3+ Group: System/Daemons -Summary: Rsyslog, the enhanced syslogd for Linux and Unix Url: http://www.rsyslog.com/ AutoReqProv: on Provides: syslog @@ -55,7 +55,6 @@ Source1: rsyslog.sysconfig Source2: rsyslog.conf.in Source3: rsyslog.early.conf.in Source4: rsyslog.d.remote.conf.in -Patch1: rsyslog.xconsole-pipe-loop.patch %description Rsyslog is an enhanced multi-threaded syslogd supporting, among others, @@ -245,7 +244,6 @@ Authors: %prep %setup -q -n %{name}-%{upstream_version} dos2unix doc/*.html -%patch1 -p1 %build export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -W -Wall" diff --git a/rsyslog.xconsole-pipe-loop.patch b/rsyslog.xconsole-pipe-loop.patch deleted file mode 100644 index 2949342..0000000 --- a/rsyslog.xconsole-pipe-loop.patch +++ /dev/null @@ -1,109 +0,0 @@ - -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 */ From 99d7c9a670f22580895deb3034d55f60933db8623ddf2f1ead1246d477b3f559 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Tue, 16 Nov 2010 08:31:03 +0000 Subject: [PATCH 11/11] changed to use shorter changelog lines in the changelog OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=25 --- rsyslog.changes | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rsyslog.changes b/rsyslog.changes index 285ccce..6c5fa78 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -2,14 +2,14 @@ Mon Nov 15 14:59:21 UTC 2010 - chris@computersalat.de - update to 5.6.0 - This release brings all changes and enhancements of the 5.5.x series - to the v5-stable branch. - - bugfix: a couple of problems that imfile had on some platforms, namely - Ubuntu (not their fault, but occured there) + This release brings all changes and enhancements of the 5.5.x + series to the v5-stable branch. + - bugfix: a couple of problems that imfile had on some platforms, + namely Ubuntu (not their fault, but occured there) - bugfix: imfile utilizes 32 bit to track offset. Most importantly, this problem can not experienced on Fedora 64 bit OS (which has 64 bit long's!) -- disable obsolete patch +- removed obsolete patch - xconsole-pipe-loop - rpmlint - name-repeated-in-summary C Rsyslog