From efed946820dd68f2f28d5411cd43304c6677a4f803b323b7ac57582034013731 Mon Sep 17 00:00:00 2001 From: Marius Tomaschewski Date: Wed, 24 Aug 2011 11:21:41 +0000 Subject: [PATCH] - Adopted to require new syslog-service package on 12.x, that provides the /etc/init.d/syslog LSB init script and systemd syslog.service service file. Removed rsyslog.service file installation from spec file. (fate#311316). OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=69 --- rsyslog.changes | 8 ++++++++ rsyslog.spec | 24 +++++++++++++++++++----- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/rsyslog.changes b/rsyslog.changes index 03f0d3b..f180b5a 100644 --- a/rsyslog.changes +++ b/rsyslog.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Aug 24 11:05:18 UTC 2011 - mt@suse.de + +- Adopted to require new syslog-service package on 12.x, that + provides the /etc/init.d/syslog LSB init script and systemd + syslog.service service file. Removed rsyslog.service file + installation from spec file. (fate#311316). + ------------------------------------------------------------------- Fri Aug 19 13:04:45 UTC 2011 - mrueckert@suse.com diff --git a/rsyslog.spec b/rsyslog.spec index 956567b..9df4111 100644 --- a/rsyslog.spec +++ b/rsyslog.spec @@ -34,6 +34,11 @@ Release: 1 %else %bcond_with systemd %endif +%if 0%{?suse_version} >= 1210 +%bcond_without syslogservice +%else +%bcond_with syslogservice +%endif %if 0%{?suse_version} >= 1130 %bcond_without relp %else @@ -56,8 +61,13 @@ Group: System/Daemons Url: http://www.rsyslog.com/ AutoReqProv: on Provides: syslog -PreReq: %insserv_prereq %fillup_prereq /sbin/klogd /etc/init.d/syslog /sbin/checkproc +%if %{with syslogservice} +Requires(pre): %insserv_prereq %fillup_prereq syslog-service /sbin/checkproc +BuildRequires: syslog-service +%else +Requires(pre): %insserv_prereq %fillup_prereq /sbin/klogd /etc/init.d/syslog /sbin/checkproc BuildRequires: klogd +%endif BuildRequires: dos2unix BuildRequires: openssl-devel BuildRequires: pcre-devel @@ -416,6 +426,13 @@ install -m644 plugins/ompgsql/createDB.sql \ %{buildroot}%{rsyslogdocdir}/pgsql-createDB.sql %endif # +# Note: On 11.4 we do not ship any systemd service file. +# On 12.x, the syslog.service file is provided by +# the syslog-service package. +# +if test -e %{buildroot}/lib/systemd/system/rsyslog.service ; then + rm -f %{buildroot}/lib/systemd/system/rsyslog.service +fi %clean if [ -n "%{buildroot}" ] && [ "%{buildroot}" != "/" ] ; then @@ -428,7 +445,7 @@ fi # /sbin/ldconfig # -# add syslog variables provided by klogd if needed +# add syslog variables provided by klogd/syslog-service # %{remove_and_set -n syslog RSYSLOGD_NATIVE_VERSION} %{fillup_and_insserv -ny syslog syslog} @@ -522,9 +539,6 @@ fi %config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.early.conf %config(noreplace) %attr(600,root,root) %{_sysconfdir}/rsyslog.d/remote.conf %{_sbindir}/rsyslogd -%if %{with systemd} -/lib/systemd/system/rsyslog.service -%endif %dir %{rsyslog_module_dir_nodeps} %{rsyslog_module_dir_nodeps}/imfile.so %{rsyslog_module_dir_nodeps}/imklog.so