[syslog-ng] more spec clean up, fixed systemd command parameter

Matthias Runge mrunge at fedoraproject.org
Sat Apr 23 13:12:10 UTC 2011


commit 829a48247360ce63332a2d178f8c15634fc1e892
Author: Matthias Runge <matthias.rugne at uni-oldenburg.de>
Date:   Sat Apr 23 15:11:13 2011 +0200

    more spec clean up, fixed systemd command parameter

 rsyslog-syslog-ng-fc10.sysconfig |    2 +-
 syslog-ng.spec                   |   31 ++++++++++++++++++++++---------
 2 files changed, 23 insertions(+), 10 deletions(-)
---
diff --git a/rsyslog-syslog-ng-fc10.sysconfig b/rsyslog-syslog-ng-fc10.sysconfig
index f0c36b0..97b9469 100644
--- a/rsyslog-syslog-ng-fc10.sysconfig
+++ b/rsyslog-syslog-ng-fc10.sysconfig
@@ -1,3 +1,3 @@
 SYSLOGNG_PID="/var/run/syslog-ng.pid"
-SYSLOGNG_OPTIONS="-p $SYSLOGNG_PID"
+SYSLOGNG_OPTIONS="-F"
 SYSLOGNG_COMPAT_PID="/var/run/syslogd.pid"
diff --git a/syslog-ng.spec b/syslog-ng.spec
index bb05d89..c1713e2 100644
--- a/syslog-ng.spec
+++ b/syslog-ng.spec
@@ -1,13 +1,14 @@
 %{?_with_spoofsource:%define spoofsource 1}
-%define evtlog_ver 0.2.12-1
+%define evtlog_ver 0.2.12
 
 %define _sbindir /sbin
 %define _localstatedir /var/lib/syslog-ng
 %define _libdir /%{_lib}
+%define system_service /lib/systemd/system
 
 Name: syslog-ng
 Version: 3.2.2
-Release: 2%{?dist}
+Release: 3%{?dist}
 Summary: Next-generation syslog server
 
 Group: System Environment/Daemons
@@ -92,7 +93,11 @@ developing applications that use %{name}.
 	%endif
 %endif
 %if 0%{?fedora}
-	%define sysconfig_src %{SOURCE30}
+	%if 0%{?fedora} < 15
+		%define sysconfig_src %{SOURCE10}
+	%else
+		%define sysconfig_src %{SOURCE30}
+	%endif
 	%define logrotated_src %{SOURCE31}
 %endif
 
@@ -135,7 +140,7 @@ make DESTDIR=%{buildroot} install
 %else
 # install systemd native file
 
-%{__install} -p -D -m 755 %{SOURCE3} %{buildroot}/%{_lib}/systemd/system/%{name}.service
+%{__install} -p -D -m 644 %{SOURCE3} %{buildroot}/%{system_service}/%{name}.service
 %endif
 %{__install} -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig
 %{__install} -p -m 644 %{sysconfig_src} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
@@ -155,13 +160,11 @@ make DESTDIR=%{buildroot} install
 %{__chmod} -x contrib/relogger.pl
 %{__chmod} -x contrib/syslog2ng
 
-# fix script interpreter
-sed -i 's/\/usr\/local\/bin\/perl/\/usr\/bin\/perl/' contrib/relogger.pl
 
 # install vim files
 %{__install} -d -m 755 %{buildroot}%{_datadir}/%{name}
 %{__install} -p -m 644 contrib/syslog-ng.vim %{buildroot}%{_datadir}/%{name}
-for vimver in 63 64 70 71 ; do
+for vimver in 70 71 72 73 ; do
 	%{__install} -d -m 755 %{buildroot}%{_datadir}/vim/vim$vimver/syntax
 	cd %{buildroot}%{_datadir}/vim/vim$vimver/syntax
 	ln -s ../../../%{name}/syslog-ng.vim .
@@ -199,7 +202,12 @@ fi
 %postun
 /sbin/ldconfig
 if [ "$1" -ge 1 ]; then
-	/sbin/service %{name} condrestart >/dev/null 2>&1
+	%if 0%{?fedora} < 15
+                /sbin/service %{name} condrestart >/dev/null 2>&1
+        %else
+                /bin/systemctl condrestart %{name}.service
+        %endif
+
 fi
 
 
@@ -239,7 +247,7 @@ fi
 %if 0%{?fedora} < 15
 %{_sysconfdir}/init.d/%{name}
 %else
-%{_libdir}/systemd/system/%{name}.service
+%{system_service}/%{name}.service
 %endif
 
 %dir %{_localstatedir}
@@ -267,6 +275,11 @@ fi
 
 
 %changelog
+* Thu Apr 21 2011 Matthias Runge <mrunge at matthias-runge.de> - 3.2.2-3
+- systemd fixup
+- more spec file cleanup,
+- incorporate fixes from Jose Pedro Oliveira
+
 * Wed Apr 20 2011 Matthias Runge <mrunge at matthias-runge.de> - 3.2.2-2
 - spec cleanup
 


More information about the scm-commits mailing list