From 1337b9e20df2abcc6fc0f29bcb7ba95477762e17 Mon Sep 17 00:00:00 2001 From: Tomas Heinrich Date: Mon, 20 Dec 2010 13:47:56 +0100 Subject: [PATCH] - upgrade to new upstream stable version 5.6.2 - drop rsyslog-5.5.7-remove_include.patch; applied upstream - provide omsnmp module - use correct name for the lock file (#659398) - enable specification of the pid file (#579411) - init script adjustments --- .gitignore | 1 + rsyslog-5.5.7-remove_include.patch | 24 -------------------- rsyslog.init | 20 ++++++++--------- rsyslog.spec | 36 +++++++++++++++++++++++++----- sources | 2 +- 5 files changed, 42 insertions(+), 41 deletions(-) delete mode 100644 rsyslog-5.5.7-remove_include.patch diff --git a/.gitignore b/.gitignore index 4f1c1c8..72f53e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ rsyslog-4.6.3.tar.gz /rsyslog-5.5.7.tar.gz +/rsyslog-5.6.2.tar.gz diff --git a/rsyslog-5.5.7-remove_include.patch b/rsyslog-5.5.7-remove_include.patch deleted file mode 100644 index a921517..0000000 --- a/rsyslog-5.5.7-remove_include.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff --git a/runtime/nsdpoll_ptcp.c b/runtime/nsdpoll_ptcp.c -index 5100670..bc374c6 100644 ---- a/runtime/nsdpoll_ptcp.c -+++ b/runtime/nsdpoll_ptcp.c -@@ -42,7 +42,6 @@ - #include "nspoll.h" - #include "nsd_ptcp.h" - #include "nsdpoll_ptcp.h" --#include "unlimited_select.h" - - /* static data */ - DEFobjStaticHelpers -diff --git a/runtime/unlimited_select.h b/runtime/unlimited_select.h -index 32dadc0..3fa7eb0 100644 ---- a/runtime/unlimited_select.h -+++ b/runtime/unlimited_select.h -@@ -23,6 +23,7 @@ - */ - - #ifndef UNLIMITED_SELECT_H_INCLUDED -+#define UNLIMITED_SELECT_H_INCLUDED - - #include - #include diff --git a/rsyslog.init b/rsyslog.init index dc2920d..81fbceb 100644 --- a/rsyslog.init +++ b/rsyslog.init @@ -1,7 +1,6 @@ #!/bin/bash # -# rsyslog Starts rsyslogd/rklogd. -# +# rsyslog Startup script for rsyslog. # # chkconfig: 2345 12 88 # description: Syslog is the facility by which many daemons use to log \ @@ -26,21 +25,22 @@ RETVAL=0 PIDFILE=/var/run/syslogd.pid -prog=rsyslogd +prog=rsyslog exec=/sbin/rsyslogd lockfile=/var/lock/subsys/$prog +# Source config +if [ -f /etc/sysconfig/$prog ] ; then + . /etc/sysconfig/$prog +fi + start() { [ -x $exec ] || exit 5 - # Source config - if [ -f /etc/sysconfig/rsyslog ] ; then - . /etc/sysconfig/rsyslog - fi umask 077 echo -n $"Starting system logger: " - daemon --pidfile="${PIDFILE}" $exec $SYSLOGD_OPTIONS + daemon --pidfile="${PIDFILE}" $exec -i "${PIDFILE}" $SYSLOGD_OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile @@ -48,14 +48,14 @@ start() { } stop() { echo -n $"Shutting down system logger: " - killproc $prog + killproc -p "${PIDFILE}" $exec RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f $lockfile return $RETVAL } rhstatus() { - status -p "${PIDFILE}" $prog + status -p "${PIDFILE}" $exec } restart() { stop diff --git a/rsyslog.spec b/rsyslog.spec index 96d2929..d96cd7f 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -5,7 +5,7 @@ Summary: Enhanced system logging and kernel message trapping daemon Name: rsyslog -Version: 5.5.7 +Version: 5.6.2 Release: 1%{?dist} License: GPLv3+ Group: System Environment/Daemons @@ -15,9 +15,6 @@ Source1: rsyslog.init Source2: rsyslog.conf Source3: rsyslog.sysconfig Source4: rsyslog.log -# remove redundant '#include' that breaks compilation -# sent upstream -Patch0: rsyslog-5.5.7-remove_include.patch BuildRequires: zlib-devel Requires: logrotate >= 3.5.2 @@ -60,6 +57,12 @@ Group: System Environment/Daemons Requires: %name = %version-%release BuildRequires: gnutls-devel +%package snmp +Summary: SNMP protocol support for rsyslog +Group: System Environment/Daemons +Requires: %name = %version-%release +BuildRequires: net-snmp-devel + %description Rsyslog is an enhanced, multi-threaded syslog daemon. It supports MySQL, syslog/TCP, RFC 3195, permitted sender lists, filtering on any message part, @@ -91,9 +94,12 @@ The rsyslog-gnutls package contains the rsyslog plugins that provide the ability to receive syslog messages via upcoming syslog-transport-tls IETF standard protocol. +%description snmp +The rsyslog-snmp package contains the rsyslog plugin that provides the +ability to send syslog messages as SNMPv1 and SNMPv2c traps. + %prep %setup -q -%patch0 -p1 -b .removeinclude %build export CFLAGS="$RPM_OPT_FLAGS -fpie -DSYSLOGD_PIDNAME=\\\"syslogd.pid\\\"" @@ -107,6 +113,7 @@ export LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now" --enable-relp \ --enable-gnutls \ --enable-mail \ + --enable-snmp \ --enable-unlimited-select make @@ -150,11 +157,16 @@ fi %postun if [ "$1" -ge "1" ]; then service rsyslog condrestart > /dev/null 2>&1 ||: -fi +fi %triggerun -- rsyslog < 3.0.0 /bin/kill `cat /var/run/rklogd.pid 2> /dev/null` > /dev/null 2>&1 ||: +%triggerun -- rsyslog < 5.6.2 +# previous versions used a different lock file, which would break condrestart +[ -f /var/lock/subsys/rsyslogd ] || exit 0 +mv /var/lock/subsys/rsyslogd /var/lock/subsys/rsyslog + %files %defattr(-,root,root,-) %doc AUTHORS COPYING NEWS README ChangeLog doc/*html @@ -211,7 +223,19 @@ fi %defattr(-,root,root) %{_libdir}/rsyslog/lmnsd_gtls.so +%files snmp +%defattr(-,root,root) +%{_libdir}/rsyslog/omsnmp.so + %changelog +* Mon Dec 20 2010 Tomas Heinrich 5.6.2-1 +- upgrade to new upstream stable version 5.6.2 +- drop rsyslog-5.5.7-remove_include.patch; applied upstream +- provide omsnmp module +- use correct name for lock file (#659398) +- enable specification of the pid file (#579411) +- init script adjustments + * Wed Oct 06 2010 Tomas Heinrich 5.5.7-1 - upgrade to upstream version 5.5.7 - update configuration and init files for the new major version diff --git a/sources b/sources index 0f997ca..479eb77 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -bd38106a467f26ea1b73d62b05ea2c0c rsyslog-5.5.7.tar.gz +6fc0bdf1b2de7f6466b4510194008e3c rsyslog-5.6.2.tar.gz