Accepting request 140363 from home:tittiatcoke:branches:Base:System

Updated spec-file based on comments on irc.

OBS-URL: https://build.opensuse.org/request/show/140363
OBS-URL: https://build.opensuse.org/package/show/Base:System/rsyslog?expand=0&rev=108
This commit is contained in:
Cristian Rodríguez
2012-11-06 18:32:45 +00:00
committed by Git OBS Bridge
parent 8bd1396907
commit 2a68653f12
3 changed files with 39 additions and 26 deletions

View File

@@ -0,0 +1,12 @@
--- rsyslog-7.2.1/rsyslog.service.in 2012-10-22 12:44:43.000000000 +0200
+++ new/rsyslog.service.in 2012-11-06 13:59:17.065706770 +0100
@@ -2,7 +2,8 @@
Description=System Logging Service
[Service]
-ExecStart=@sbindir@/rsyslogd -n
+EnvironmentFile=-/etc/sysconfig/rsyslog
+ExecStart=@sbindir@/rsyslogd -n $SYSLOGD_OPTIONS
Sockets=syslog.socket
StandardOutput=null

View File

@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Tue Nov 6 12:36:54 UTC 2012 - tittiatcoke@gmail.com
- Enabled rsyslog own systemd service file. This to resolve the
current issue with a non starting system logger with systemd 185.
(see also bnc#788330)
-------------------------------------------------------------------
Mon Oct 29 15:39:26 UTC 2012 - mt@suse.com

View File

@@ -64,13 +64,6 @@ Release: 0
Url: http://www.rsyslog.com/
Provides: syslog
Conflicts: otherproviders(syslog)
%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
@@ -129,6 +122,14 @@ Source0: http://www.rsyslog.com/files/download/%{name}/%{name}-%{upstream
Source1: rsyslog.sysconfig
Source2: rsyslog.conf.in
Source4: rsyslog.d.remote.conf.in
# FIX-OPENSUSE Adjust service file to work correctly. Based on a fedora patch - tittiatcoke@gmail.com
Patch1: rsyslog-5.8.11-systemd.patch
%if 0%{?suse_version} >= 1220
# This provide is purely to be used for the 12.3 Milestones.
Obsoletes: syslog-service
Provides: sysvinit(syslog)
%endif
%{?systemd_requires}
%description
Rsyslog is an enhanced multi-threaded syslogd supporting, among others,
@@ -294,6 +295,7 @@ This module provides a UDP forwarder that allows changing the sender address.
%prep
%setup -q -n %{name}-%{upstream_version}
%patch1 -p1
%if %{with systemd}
%if 0%{?suse_version} <= 1140
# Bug: https://bugzilla.novell.com/show_bug.cgi?id=656259
@@ -450,37 +452,24 @@ install -m644 plugins/ommysql/createDB.sql \
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 %{with systemd}
if test -e %{buildroot}%{_unitdir}/rsyslog.service ; then
rm -f %{buildroot}%{_unitdir}/rsyslog.service
fi
%endif
%clean
if [ -n "%{buildroot}" ] && [ "%{buildroot}" != "/" ] ; then
rm -rf "%{buildroot}"
fi
%pre
%service_add_pre rsyslog.service
%post
#
# update linker caches
#
/sbin/ldconfig
#
# add syslog variables provided by klogd/syslog-service
#
%{remove_and_set -n syslog RSYSLOGD_NATIVE_VERSION}
%{fillup_and_insserv -ny syslog syslog}
#
# add RSYSLOGD_* variables if needed
#
%{fillup_only -ns syslog rsyslog}
#
#
# check if daemon configured in SYSLOG_DAEMON is installed
# and switch to ourself if it's missed
#
@@ -536,12 +525,16 @@ additional_sockets="%{additional_sockets}"
mkdir -p -m750 ${additional_sockets%/*}
touch "${additional_sockets#/}"
chmod 640 "${additional_sockets#/}"
#
# Enable the rsyslogservice to be started by systemd
#
%service_add_post rsyslog.service
%preun
#
# stop the rsyslogd daemon when it is running
#
%{stop_on_removal syslog}
%service_del_preun rsyslog.service
%postun
#
@@ -565,7 +558,7 @@ fi
#
# cleanup init scripts
#
%{insserv_cleanup}
%service_del_postun rsyslog.service
%files
%defattr(-,root,root)
@@ -617,6 +610,7 @@ fi
%doc %{rsyslogdocdir}/COPYING.LESSER
%dir %{_localstatedir}/spool/rsyslog
/var/adm/fillup-templates/sysconfig.syslog-rsyslog
%{_unitdir}/rsyslog.service
%files doc
%defattr(-,root,root)