Accepting request 602574 from home:elvigia:branches:network

- Only Require insserv on distributions without systemd.
- Fix systemd related requires/buildRequires
- Do not run scriptlets that use insserv when using systemd

OBS-URL: https://build.opensuse.org/request/show/602574
OBS-URL: https://build.opensuse.org/package/show/network/keepalived?expand=0&rev=45
This commit is contained in:
Olaf Hering 2018-05-01 08:53:34 +00:00 committed by Git OBS Bridge
parent 2627baaa6d
commit dd6b0b7e43
2 changed files with 17 additions and 7 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Apr 30 14:41:46 UTC 2018 - crrodriguez@opensuse.org
- Only Require insserv on distributions without systemd.
- Fix systemd related requires/buildRequires
- Do not run scriptlets that use insserv when using systemd
-------------------------------------------------------------------
Thu Feb 22 10:07:17 UTC 2018 - dmueller@suse.com

View File

@ -33,7 +33,7 @@ Name: keepalived
Version: 1.4.1
Release: 0
Summary: A keepalive facility for Linux
License: GPL-2.0+
License: GPL-2.0-or-later
Group: Productivity/Networking/Routing
Url: http://www.keepalived.org/
Source: http://www.keepalived.org/software/%{name}-%{version}.tar.gz
@ -72,11 +72,12 @@ BuildRequires: popt-devel
BuildRequires: cyrus-sasl-devel
%endif
Requires(pre): pwdutils
Requires(pre): %insserv_prereq
Requires(pre): %fillup_prereq
%if %{with systemd}
BuildRequires: systemd
Requires: systemd
BuildRequires: systemd-rpm-macros
%{?systemd_requires}
%else
Requires(pre): %insserv_prereq
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@ -168,9 +169,10 @@ getent passwd %{name} >/dev/null || \
%endif
%preun
%stop_on_removal %{name}
%if %{with systemd}
%service_del_preun %{name}.service
%else
%stop_on_removal %{name}
%endif
%post
@ -180,10 +182,11 @@ getent passwd %{name} >/dev/null || \
%endif
%postun
%insserv_cleanup
%restart_on_update %{name}
%if %{with systemd}
%service_del_postun %{name}.service
%else
%insserv_cleanup
%restart_on_update %{name}
%endif
%files