From 4df2694c0b138d32ee68c751842efaba469d60449cb38151fd1fe06e0236acbf Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Tue, 27 Apr 2010 12:17:16 +0000 Subject: [PATCH] - 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)