[rsyslog/f15/master] - upgrade to new upstream version 5.7.9 - enable compilation of several new modules, create new su

Tomas Heinrich theinric at fedoraproject.org
Fri Mar 18 18:03:09 UTC 2011


commit df31784a31cd254b25d8674f3bdb6d5294d312ef
Author: Tomas Heinrich <theinric at redhat.com>
Date:   Fri Mar 18 18:59:37 2011 +0100

    - upgrade to new upstream version 5.7.9
    - enable compilation of several new modules,
      create new subpackages for some of them
    - integrate changes from Lennart Poettering
      to add support for systemd
      - add rsyslog-5.7.9-systemd.patch to tweak the upstream
        service file to honour configuration from /etc/sysconfig/rsyslog

 .gitignore                  |    1 +
 rsyslog-5.7.9-systemd.patch |   14 +++++++
 rsyslog.spec                |   90 ++++++++++++++++++++++++++++++++++++++-----
 sources                     |    2 +-
 4 files changed, 96 insertions(+), 11 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 72f53e1..0f0ef81 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 rsyslog-4.6.3.tar.gz
 /rsyslog-5.5.7.tar.gz
 /rsyslog-5.6.2.tar.gz
+/rsyslog-5.7.9.tar.gz
diff --git a/rsyslog-5.7.9-systemd.patch b/rsyslog-5.7.9-systemd.patch
new file mode 100644
index 0000000..1049c31
--- /dev/null
+++ b/rsyslog-5.7.9-systemd.patch
@@ -0,0 +1,14 @@
+diff -up rsyslog-5.7.9/rsyslog.service.in.orig rsyslog-5.7.9/rsyslog.service.in
+--- rsyslog-5.7.9/rsyslog.service.in.orig	2011-03-18 18:05:58.760693398 +0100
++++ rsyslog-5.7.9/rsyslog.service.in	2011-03-18 18:07:20.131691458 +0100
+@@ -2,8 +2,9 @@
+ Description=System Logging Service
+ 
+ [Service]
++EnvironmentFile=-/etc/sysconfig/rsyslog
+ ExecStartPre=/bin/systemctl stop systemd-kmsg-syslogd.service
+-ExecStart=@sbindir@/rsyslogd -n -c5
++ExecStart=@sbindir@/rsyslogd -n $SYSLOGD_OPTIONS
+ Sockets=syslog.socket
+ 
+ [Install]
diff --git a/rsyslog.spec b/rsyslog.spec
index a9a71ec..86642fb 100644
--- a/rsyslog.spec
+++ b/rsyslog.spec
@@ -5,8 +5,8 @@
 
 Summary: Enhanced system logging and kernel message trapping daemon
 Name: rsyslog
-Version: 5.6.2
-Release: 3%{?dist}
+Version: 5.7.9
+Release: 1%{?dist}
 License: GPLv3+
 Group: System Environment/Daemons
 URL: http://www.rsyslog.com/
@@ -15,17 +15,27 @@ Source1: rsyslog.init
 Source2: rsyslog.conf
 Source3: rsyslog.sysconfig
 Source4: rsyslog.log
+# tweak the upstream service file to honour configuration from /etc/sysconfig/rsyslog
+Patch0: rsyslog-5.7.9-systemd.patch
 
 BuildRequires: zlib-devel
 Requires: logrotate >= 3.5.2
 Requires: bash >= 2.0
 Requires(post): /sbin/chkconfig coreutils
+Requires(post): systemd-units >= 20
 Requires(preun): /sbin/chkconfig /sbin/service
+Requires(preun): systemd-units >= 20
 Requires(postun): /sbin/service
+Requires(postun): systemd-units >= 20
 Provides: syslog
 Conflicts: sysklogd < 1.4.1-43
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
+%package libdbi
+Summary: libdbi database support for rsyslog
+Group: System Environment/Daemons
+Requires: %name = %version-%release
+BuildRequires: libdbi-devel
 
 %package mysql
 Summary: MySQL support for rsyslog
@@ -63,6 +73,12 @@ Group: System Environment/Daemons
 Requires: %name = %version-%release
 BuildRequires: net-snmp-devel
 
+%package udpspoof
+Summary: Provides the omudpspoof module
+Group: System Environment/Daemons
+Requires: %name = %version-%release
+BuildRequires: libnet-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,
@@ -71,6 +87,11 @@ and can be used as a drop-in replacement. Rsyslog is simple to set up, with
 advanced features suitable for enterprise-class, encryption-protected syslog
 relay chains.
 
+%description libdbi
+This module supports a large number of database systems via
+libdbi. Libdbi abstracts the database layer and provides drivers for
+many systems. Drivers are available via the libdbi-drivers project.
+
 %description mysql
 The rsyslog-mysql package contains a dynamic shared object that will add
 MySQL database support to rsyslog.
@@ -98,8 +119,14 @@ IETF standard protocol.
 The rsyslog-snmp package contains the rsyslog plugin that provides the
 ability to send syslog messages as SNMPv1 and SNMPv2c traps.
 
+%description udpspoof
+This module is similar to the regular UDP forwarder, but permits to
+spoof the sender address. Also, it enables to circle through a number
+of source ports.
+
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %ifarch sparc64
@@ -112,13 +139,18 @@ export LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now"
 %endif
 %configure	--disable-static \
 		--disable-testbench \
-		--enable-mysql \
-		--enable-pgsql \
+		--enable-gnutls \
 		--enable-gssapi-krb5 \
 		--enable-imfile \
-		--enable-relp \
-		--enable-gnutls \
+		--enable-libdbi \
 		--enable-mail \
+		--enable-mysql \
+		--enable-omprog \
+		--enable-omudpspoof \
+		--enable-omuxsock \
+		--enable-pgsql \
+		--enable-pmlastmsg \
+		--enable-relp \
 		--enable-snmp \
 		--enable-unlimited-select
 make
@@ -153,16 +185,27 @@ do
 	[ -f $n ] && continue
 	umask 066 && touch $n
 done
+if [ $1 -eq 1 ]; then
+        # On install (not upgrade), enable (but don't start) the
+        # units by default
+        /bin/systemctl enable rsyslog.service >/dev/null 2>&1 || :
+fi
 
 %preun
 if [ $1 = 0 ]; then
-	service rsyslog stop >/dev/null 2>&1 ||:
-	/sbin/chkconfig --del rsyslog
+        /sbin/chkconfig --del rsyslog
+        # On uninstall (not upgrade), disable and stop the units
+        /bin/systemctl --no-reload disable rsyslog.service >/dev/null 2>&1 || :
+        /bin/systemctl stop rsyslog.service >/dev/null 2>&1 || :
 fi
 
 %postun
-if [ "$1" -ge "1" ]; then
-	service rsyslog condrestart > /dev/null 2>&1 ||:
+# Reload init system configuration, to make systemd honour changed
+# or deleted unit files
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+if [ $1 -ge 1 ] ; then
+        # On upgrade (not uninstall), optionally, restart the daemon
+        /bin/systemctl try-restart rsyslog.service >/dev/null 2>&1 || :
 fi
 
 %triggerun -- rsyslog < 3.0.0
@@ -173,6 +216,11 @@ fi
 [ -f /var/lock/subsys/rsyslogd ] || exit 0
 mv /var/lock/subsys/rsyslogd /var/lock/subsys/rsyslog
 
+%triggerun -- rsyslog < 5.7.8-1
+if /sbin/chkconfig --level 3 rsyslog ; then
+        /bin/systemctl --no-reload enable rsyslog.service >/dev/null 2>&1 || :
+fi
+
 %files
 %defattr(-,root,root,-)
 %doc AUTHORS COPYING NEWS README ChangeLog doc/*html
@@ -193,7 +241,12 @@ mv /var/lock/subsys/rsyslogd /var/lock/subsys/rsyslog
 %{_libdir}/rsyslog/lmzlibw.so
 %{_libdir}/rsyslog/omtesting.so
 %{_libdir}/rsyslog/ommail.so
+%{_libdir}/rsyslog/omprog.so
 %{_libdir}/rsyslog/omruleset.so
+%{_libdir}/rsyslog/omuxsock.so
+%{_libdir}/rsyslog/pmlastmsg.so
+/lib/systemd/system/rsyslog.service
+
 %config(noreplace) %{_sysconfdir}/rsyslog.conf
 %config(noreplace) %{_sysconfdir}/sysconfig/rsyslog
 %config(noreplace) %{_sysconfdir}/logrotate.d/syslog
@@ -204,6 +257,10 @@ mv /var/lock/subsys/rsyslogd /var/lock/subsys/rsyslog
 %{_sbindir}/rsyslogd
 %{_mandir}/*/*
 
+%files libdbi
+%defattr(-,root,root)
+%{_libdir}/rsyslog/omlibdbi.so
+
 %files mysql
 %defattr(-,root,root)
 %doc plugins/ommysql/createDB.sql
@@ -233,7 +290,20 @@ mv /var/lock/subsys/rsyslogd /var/lock/subsys/rsyslog
 %defattr(-,root,root)
 %{_libdir}/rsyslog/omsnmp.so
 
+%files udpspoof
+%defattr(-,root,root)
+%{_libdir}/rsyslog/omudpspoof.so
+
 %changelog
+* Fri Mar 18 2011 Tomas Heinrich <theinric at redhat.com> 5.7.9-1
+- upgrade to new upstream version 5.7.9
+- enable compilation of several new modules,
+  create new subpackages for some of them
+- integrate changes from Lennart Poettering
+  to add support for systemd
+  - add rsyslog-5.7.9-systemd.patch to tweak the upstream
+    service file to honour configuration from /etc/sysconfig/rsyslog
+
 * Fri Mar 18 2011 Dennis Gilmore <dennis at ausil.us> - 5.6.2-3
 - sparc64 needs big PIE
 
diff --git a/sources b/sources
index 479eb77..d45d8d0 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-6fc0bdf1b2de7f6466b4510194008e3c  rsyslog-5.6.2.tar.gz
+4f0916da37e23cba1265e3b72f114657  rsyslog-5.7.9.tar.gz


More information about the scm-commits mailing list