From e3551fc2c39a0748db292226fd4e86f483638f27a72abc749db498dbd8e70ea7 Mon Sep 17 00:00:00 2001 From: Peter Varkoly Date: Tue, 1 Apr 2014 10:33:20 +0000 Subject: [PATCH] - bnc#871183 - cyrus-sasl-saslauthd service file is missing parameter 'Restart=always' OBS-URL: https://build.opensuse.org/package/show/network/cyrus-sasl?expand=0&rev=47 --- cyrus-sasl-saslauthd.changes | 5 +++++ cyrus-sasl-saslauthd.spec | 23 ++++++++++++++--------- cyrus-sasl.spec | 2 +- saslauthd.service | 15 +++++++++++++++ 4 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 saslauthd.service diff --git a/cyrus-sasl-saslauthd.changes b/cyrus-sasl-saslauthd.changes index d86f449..005beac 100644 --- a/cyrus-sasl-saslauthd.changes +++ b/cyrus-sasl-saslauthd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 1 10:32:37 UTC 2014 - varkoly@suse.com + +- bnc#871183 - cyrus-sasl-saslauthd service file is missing parameter 'Restart=always' + ------------------------------------------------------------------- Sat Nov 2 20:47:58 UTC 2013 - jengelh@inai.de diff --git a/cyrus-sasl-saslauthd.spec b/cyrus-sasl-saslauthd.spec index 3624539..d0855a1 100644 --- a/cyrus-sasl-saslauthd.spec +++ b/cyrus-sasl-saslauthd.spec @@ -1,7 +1,7 @@ # # spec file for package cyrus-sasl-saslauthd # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,6 +28,7 @@ Source: ftp://ftp.cyrusimap.org/cyrus-sasl/cyrus-sasl-%{version}.tar.gz Source1: cyrus-sasl-rc.tar.bz2 Source2: README.Source Source3: baselibs.conf +Source4: saslauthd.service Patch: cyrus-sasl.dif Patch1: shared_link_on_ppc.patch Patch5: cyrus-sasl-no_rpath.patch @@ -43,6 +44,8 @@ BuildRequires: openldap2-devel BuildRequires: opie BuildRequires: pam-devel BuildRequires: postgresql-devel +BuildRequires: pkgconfig(systemd) +%{?systemd_requires} %description This daemon is required when using cyrus-sasl in server software that @@ -115,31 +118,33 @@ install -m 644 saslauthd.mdoc $RPM_BUILD_ROOT/%{_mandir}/man8/saslauthd.8 mkdir -p $RPM_BUILD_ROOT/usr/bin install -m 755 testsaslauthd $RPM_BUILD_ROOT/usr/bin/testsaslauthd cd - -install -D -m 755 SuSE/rc.saslauthd $RPM_BUILD_ROOT/etc/init.d/saslauthd mkdir -p $RPM_BUILD_ROOT/sbin -ln -sf ../etc/init.d/saslauthd $RPM_BUILD_ROOT/sbin/rcsaslauthd install -D -m 644 SuSE/sysconfig.saslauthd $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.saslauthd rm -f $RPM_BUILD_ROOT/%{_mandir}/cat?/* rm -f $RPM_BUILD_ROOT/%{_libdir}/sasl2/libsasldb* rm -f $RPM_BUILD_ROOT/%{_libdir}/sasl2/libldapdb.la rm -f $RPM_BUILD_ROOT/%{_libdir}/sasl2/libsql.la +mkdir -p $RPM_BUILD_ROOT/%{_unitdir} +install -m 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_unitdir} + +%pre +%service_add_pre saslauthd.service %preun -%stop_on_removal saslauthd +%service_del_preun saslauthd.service %postun -%restart_on_update saslauthd -%insserv_cleanup +%service_del_postun saslauthd.service %post -%{fillup_and_insserv -n saslauthd} +%{fillup_only -n saslauthd} +%service_add_post saslauthd.service %files %defattr(-,root,root) /var/adm/fillup-templates/sysconfig.saslauthd +%{_unitdir}/saslauthd.service %dir %attr(0755, root, root) %ghost /var/run/sasl2 -%config /etc/init.d/saslauthd -/sbin/rcsaslauthd /usr/sbin/* /usr/bin/* %doc %{_mandir}/man8/*.gz diff --git a/cyrus-sasl.spec b/cyrus-sasl.spec index 723a476..ddf1ed7 100644 --- a/cyrus-sasl.spec +++ b/cyrus-sasl.spec @@ -1,7 +1,7 @@ # # spec file for package cyrus-sasl # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed diff --git a/saslauthd.service b/saslauthd.service new file mode 100644 index 0000000..bdef6c5 --- /dev/null +++ b/saslauthd.service @@ -0,0 +1,15 @@ +[Unit] +Description=saslauthd Server Daemon +After=syslog.target network.target + +[Service] +Type=forking +EnvironmentFile=/etc/sysconfig/saslauthd +ExecStart=/usr/sbin/saslauthd +ExecReload=/bin/kill -HUP $MAINPID +ExecStop=/bin/kill -TERM $MAINPID +Restart=always + +[Install] +WantedBy=multi-user.target +