Accepting request 514555 from systemsmanagement:saltstack:testing
- Update to 2017.7.0 See https://docs.saltstack.com/en/develop/topics/releases/2017.7.0.html for full changelog - fix ownership for whole master cache directory (bsc#1035914) - fix setting the language on SUSE systems (bsc#1038855) - wrong os_family grains on SUSE - fix unittests (bsc#1038855) - speed-up cherrypy by removing sleep call - Disable 3rd party runtime packages to be explicitly recommended. (bsc#1040886) - fix format error (bsc#1043111) - Add a salt-minion watchdog for RHEL6 and SLES11 systems (sysV) to restart salt-minion in case of crashes during upgrade. - Add procps as dependency. - Bugfix: jobs scheduled to run at a future time stay pending for Salt minions (bsc#1036125) - All current patches has been removed as they were added upstream: * add-a-salt-minion-service-control-file.patch * add-options-for-dockerng.patch * add-ssh-option-to-salt-ssh.patch * add-unit-test-for-skip-false-values-from-preferred_i.patch * add-yum-plugin.patch * add-zypp-notify-plugin.patch * adding-support-for-installing-patches-in-yum-dnf-exe.patch * avoid-failures-on-sles-12-sp2-because-of-new-systemd.patch * bugfix-unable-to-use-127-as-hostname.patch * change-travis-configuration-file-to-use-salt-toaster.patch * check-if-byte-strings-are-properly-encoded-in-utf-8.patch * clean-up-change-attribute-from-interface-dict.patch * do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch * fix-grain-for-os_family-on-suse-series.patch OBS-URL: https://build.opensuse.org/request/show/514555 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=90
This commit is contained in:
committed by
Git OBS Bridge
parent
ae1540a455
commit
850dee1a06
244
salt.spec
244
salt.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package salt
|
||||
#
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -16,7 +16,7 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} > 1210
|
||||
%if 0%{?suse_version} > 1210 || 0%{?rhel} >= 7 || 0%{?fedora}
|
||||
%bcond_without systemd
|
||||
%else
|
||||
%bcond_with systemd
|
||||
@@ -36,84 +36,19 @@
|
||||
%bcond_with builddocs
|
||||
|
||||
Name: salt
|
||||
Version: 2016.11.4
|
||||
Version: 2017.7.0
|
||||
Release: 0
|
||||
Summary: A parallel remote execution system
|
||||
License: Apache-2.0
|
||||
Group: System/Management
|
||||
Url: http://saltstack.org/
|
||||
# Git: https://github.com/openSUSE/salt.git
|
||||
Source0: https://pypi.io/packages/source/s/%{name}/%{name}-%{version}.tar.gz
|
||||
Source: https://github.com/saltstack/salt/archive/v2017.7.0.tar.gz
|
||||
Source1: README.SUSE
|
||||
Source2: salt-tmpfiles.d
|
||||
Source3: html.tar.bz2
|
||||
Source4: update-documentation.sh
|
||||
Source5: travis.yml
|
||||
|
||||
# We do not upstream this patch because this is something that we have to fix on our side
|
||||
# PATCH-FIX-OPENSUSE use-forking-daemon.patch tserong@suse.com -- We don't have python-systemd, so notify can't work
|
||||
Patch1: tserong-suse.com-we-don-t-have-python-systemd-so-not.patch
|
||||
# We do not upstream this patch because this is suse custom configuration
|
||||
# PATCH-FIX-OPENSUSE use-salt-user-for-master.patch -- Run salt master as dedicated salt user
|
||||
Patch2: run-salt-master-as-dedicated-salt-user.patch
|
||||
# We do not upstream this patch because it has been fixed upstream
|
||||
# (see: https://trello.com/c/wh96lCD4/1528-get-rid-of-0003-check-if-byte-strings-are-properly-encoded-in-utf-8-patch-in-the-salt-package)
|
||||
# PATCH-FIX-OPENSUSE https://github.com/saltstack/salt/pull/30424
|
||||
Patch3: check-if-byte-strings-are-properly-encoded-in-utf-8.patch
|
||||
# We do not upstream this patch because the issue is on our side
|
||||
# PATCH-FIX-OPENSUSE prevent rebuilds in OBS
|
||||
Patch4: do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch
|
||||
# We do not upstream this because this is for SUSE only (15.08.2016) if Zypper has been used outside the Salt infrastructure
|
||||
# PATCH-FIX-OPENSUSE Generate events from the Salt minion,
|
||||
Patch5: add-zypp-notify-plugin.patch
|
||||
# PATCH-FIX_OPENSUSE
|
||||
Patch6: run-salt-api-as-user-salt-bsc-990029.patch
|
||||
# PATCH-FIX_OPENSUSE
|
||||
Patch7: change-travis-configuration-file-to-use-salt-toaster.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/37856 (pending to include in 2016.11)
|
||||
Patch8: setting-up-os-grains-for-sles-expanded-support-suse-.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/34165
|
||||
Patch9: fix-salt-summary-to-count-not-responding-minions-cor.patch
|
||||
# PATCH-FIX_OPENSUSE
|
||||
Patch10: avoid-failures-on-sles-12-sp2-because-of-new-systemd.patch
|
||||
# PATCH-FIX_OPENSUSE
|
||||
Patch11: add-yum-plugin.patch
|
||||
# PATCH-FIX_OPENSUSE
|
||||
Patch12: add-ssh-option-to-salt-ssh.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/38806
|
||||
Patch13: add-a-salt-minion-service-control-file.patch
|
||||
# PATCH-FIX-OPENSUSE
|
||||
Patch14: add-options-for-dockerng.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/39762
|
||||
Patch15: fix-regression-in-file.get_managed-add-unit-tests.patch
|
||||
# PATCH-FIX_OPENSUSE
|
||||
Patch16: translate-variable-arguments-if-they-contain-hidden-.patch
|
||||
# PATCH-FIX_OPENSUSE
|
||||
Patch17: special-salt-minion.service-file-for-rhel7.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/40266
|
||||
Patch18: adding-support-for-installing-patches-in-yum-dnf-exe.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/40761
|
||||
Patch19: search-the-entire-cache_dir-because-storage-paths-ch.patch
|
||||
# PATCH-FIX_OPENSUSE
|
||||
Patch20: fixing-beacons.list-integration-test-failure.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/40817
|
||||
Patch21: add-unit-test-for-skip-false-values-from-preferred_i.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/40852
|
||||
Patch22: use-correct-grain-constants-for-timezone.patch
|
||||
# PATCH-FIX_OPENSUSE (upstream coming soon)
|
||||
Patch23: fix-grain-for-os_family-on-suse-series.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/41269
|
||||
Patch24: bugfix-unable-to-use-127-as-hostname.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/41336
|
||||
Patch25: fix-setting-language-on-suse-systems.patch
|
||||
Patch26: fix-os_family-case-in-unittest.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/41235
|
||||
Patch27: rest_cherrypy-remove-sleep-call.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/40905
|
||||
Patch28: fixed-issue-with-parsing-of-master-minion-returns-wh.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/41533
|
||||
Patch29: clean-up-change-attribute-from-interface-dict.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: logrotate
|
||||
BuildRequires: python
|
||||
@@ -124,18 +59,14 @@ BuildRequires: python-jinja2
|
||||
%else
|
||||
BuildRequires: python-Jinja2
|
||||
%endif
|
||||
BuildRequires: python-MarkupSafe
|
||||
BuildRequires: python-PyYAML
|
||||
BuildRequires: python-futures >= 2.0
|
||||
BuildRequires: python-markupsafe
|
||||
BuildRequires: python-msgpack-python > 0.3
|
||||
BuildRequires: python-psutil
|
||||
BuildRequires: python-requests >= 1.0.0
|
||||
BuildRequires: python-tornado >= 4.2.1
|
||||
# requirements/opt.txt (not all)
|
||||
# BuildRequires: python-MySQL-python
|
||||
# BuildRequires: python-timelib
|
||||
# BuildRequires: python-gnupg
|
||||
# BuildRequires: python-cherrypy >= 3.2.2
|
||||
BuildRequires: python-yaml
|
||||
|
||||
# requirements/zeromq.txt
|
||||
BuildRequires: python-pycrypto >= 2.6.1
|
||||
BuildRequires: python-pyzmq >= 2.2.0
|
||||
@@ -170,6 +101,7 @@ Requires(pre): dbus-1
|
||||
Requires(pre): dbus
|
||||
%endif
|
||||
|
||||
Requires: procps
|
||||
Requires: logrotate
|
||||
Requires: python
|
||||
#
|
||||
@@ -178,30 +110,30 @@ Requires: python-certifi
|
||||
%endif
|
||||
# requirements/base.txt
|
||||
%if 0%{?rhel}
|
||||
Requires: python-jinja2
|
||||
Requires: yum
|
||||
Requires: python-jinja2
|
||||
Requires: yum
|
||||
%if 0%{?rhel} == 6
|
||||
Requires: yum-plugin-security
|
||||
Requires: yum-plugin-security
|
||||
%endif
|
||||
%else
|
||||
Requires: python-Jinja2
|
||||
Requires: python-Jinja2
|
||||
%endif
|
||||
Requires: python-MarkupSafe
|
||||
Requires: python-PyYAML
|
||||
Requires: python-futures >= 2.0
|
||||
Requires: python-markupsafe
|
||||
Requires: python-msgpack-python > 0.3
|
||||
Requires: python-psutil
|
||||
Requires: python-requests >= 1.0.0
|
||||
Requires: python-tornado >= 4.2.1
|
||||
Requires: python-yaml
|
||||
%if 0%{?suse_version}
|
||||
# required for zypper.py
|
||||
Requires: rpm-python
|
||||
Requires(pre): libzypp(plugin:system) >= 0
|
||||
Requires: zypp-plugin-python
|
||||
# requirements/opt.txt (not all)
|
||||
Recommends: python-MySQL-python
|
||||
Recommends: python-timelib
|
||||
Recommends: python-gnupg
|
||||
# Suggests: python-MySQL-python ## Disabled for now, originally Recommended
|
||||
Suggests: python-timelib
|
||||
Suggests: python-gnupg
|
||||
# requirements/zeromq.txt
|
||||
%endif
|
||||
Requires: python-pycrypto >= 2.6.1
|
||||
@@ -210,7 +142,7 @@ Requires: python-pyzmq >= 2.2.0
|
||||
%if 0%{?suse_version}
|
||||
# python-xml is part of python-base in all rhel versions
|
||||
Requires: python-xml
|
||||
Recommends: python-Mako
|
||||
Suggests: python-Mako
|
||||
Recommends: python-netaddr
|
||||
%endif
|
||||
|
||||
@@ -455,40 +387,6 @@ Zsh command line completion support for %{name}.
|
||||
%setup -q -n salt-%{version}
|
||||
cp %{S:1} .
|
||||
cp %{S:5} ./.travis.yml
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
|
||||
# This is SUSE-only patch
|
||||
%if 0%{?suse_version}
|
||||
%patch5 -p1
|
||||
%endif
|
||||
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p1
|
||||
%patch14 -p1
|
||||
%patch15 -p1
|
||||
%patch16 -p1
|
||||
%patch17 -p1
|
||||
%patch18 -p1
|
||||
%patch19 -p1
|
||||
%patch20 -p1
|
||||
%patch21 -p1
|
||||
%patch22 -p1
|
||||
%patch23 -p1
|
||||
%patch24 -p1
|
||||
%patch25 -p1
|
||||
%patch26 -p1
|
||||
%patch27 -p1
|
||||
%patch28 -p1
|
||||
%patch29 -p1
|
||||
|
||||
%build
|
||||
%{__python} setup.py --salt-transport=both build
|
||||
@@ -550,23 +448,27 @@ install -Dd -m 0750 %{buildroot}%{_sysconfdir}/salt/pki/minion
|
||||
## Install Zypper plugins only on SUSE machines
|
||||
%if 0%{?suse_version}
|
||||
install -Dd -m 0750 %{buildroot}%{_prefix}/lib/zypp/plugins/commit
|
||||
%{__install} scripts/zypper/plugins/commit/zyppnotify %{buildroot}%{_prefix}/lib/zypp/plugins/commit/zyppnotify
|
||||
%{__install} scripts/suse/zypper/plugins/commit/zyppnotify %{buildroot}%{_prefix}/lib/zypp/plugins/commit/zyppnotify
|
||||
%endif
|
||||
|
||||
# Install Yum plugins only on RH machines
|
||||
%if 0%{?fedora} || 0%{?rhel}
|
||||
install -Dd %{buildroot}%{_prefix}/share/yum-plugins
|
||||
install -Dd %{buildroot}/etc/yum/pluginconf.d
|
||||
%{__install} scripts/yum/plugins/yumnotify.py %{buildroot}%{_prefix}/share/yum-plugins
|
||||
%{__install} scripts/yum/plugins/yumnotify.conf %{buildroot}/etc/yum/pluginconf.d
|
||||
%{__install} scripts/suse/yum/plugins/yumnotify.py %{buildroot}%{_prefix}/share/yum-plugins
|
||||
%{__install} scripts/suse/yum/plugins/yumnotify.conf %{buildroot}/etc/yum/pluginconf.d
|
||||
%endif
|
||||
|
||||
## install init and systemd scripts
|
||||
%if %{with systemd}
|
||||
install -Dpm 0644 pkg/salt-master.service %{buildroot}%{_unitdir}/salt-master.service
|
||||
%if 0%{?suse_version}
|
||||
install -Dpm 0644 pkg/suse/salt-minion.service %{buildroot}%{_unitdir}/salt-minion.service
|
||||
%else
|
||||
install -Dpm 0644 pkg/suse/salt-minion.service.rhel7 %{buildroot}%{_unitdir}/salt-minion.service
|
||||
%endif
|
||||
install -Dpm 0644 pkg/salt-syndic.service %{buildroot}%{_unitdir}/salt-syndic.service
|
||||
install -Dpm 0644 pkg/salt-api.service %{buildroot}%{_unitdir}/salt-api.service
|
||||
install -Dpm 0644 pkg/suse/salt-api.service %{buildroot}%{_unitdir}/salt-api.service
|
||||
install -Dpm 0644 pkg/salt-proxy@.service %{buildroot}%{_unitdir}/salt-proxy@.service
|
||||
ln -s service %{buildroot}%{_sbindir}/rcsalt-master
|
||||
ln -s service %{buildroot}%{_sbindir}/rcsalt-syndic
|
||||
@@ -586,6 +488,11 @@ ln -sf %{_initddir}/salt-minion %{buildroot}%{_sbindir}/rcsalt-minion
|
||||
ln -sf %{_initddir}/salt-api %{buildroot}%{_sbindir}/rcsalt-api
|
||||
%endif
|
||||
|
||||
## Install sysV salt-minion watchdog for SLES11 and RHEL6
|
||||
%if 0%{?rhel} == 6 || 0%{?suse_version} == 1110
|
||||
install -Dpm 0755 scripts/suse/watchdog/salt-daemon-watcher %{buildroot}%{_bindir}/salt-daemon-watcher
|
||||
%endif
|
||||
|
||||
#
|
||||
## install config files
|
||||
install -Dpm 0640 conf/minion %{buildroot}%{_sysconfdir}/salt/minion
|
||||
@@ -596,8 +503,12 @@ install -Dpm 0640 conf/cloud %{buildroot}%{_sysconfdir}/salt/cloud
|
||||
install -Dpm 0640 conf/cloud.profiles %{buildroot}%{_sysconfdir}/salt/cloud.profiles
|
||||
install -Dpm 0640 conf/cloud.providers %{buildroot}%{_sysconfdir}/salt/cloud.providers
|
||||
#
|
||||
## install logrotate file
|
||||
## install logrotate file (for RHEL6 we use without sudo)
|
||||
%if 0%{?rhel} > 6 || 0%{?suse_version}
|
||||
install -Dpm 0644 pkg/suse/salt-common.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/salt
|
||||
%else
|
||||
install -Dpm 0644 pkg/salt-common.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/salt
|
||||
%endif
|
||||
#
|
||||
## install SuSEfirewall2 rules
|
||||
install -Dpm 0644 pkg/suse/salt.SuSEfirewall2 %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/salt
|
||||
@@ -628,7 +539,7 @@ python setup.py test --runtests-opts=-u
|
||||
%pre
|
||||
S_HOME="/var/lib/salt"
|
||||
S_PHOME="/srv/salt"
|
||||
getent passwd salt | grep $S_PHOME >/dev/null && sed -i "s:$S_PHOME:$S_HOME:g" /etc/passwd
|
||||
getent passwd salt | grep $S_PHOME >/dev/null && usermod -d $S_HOME salt
|
||||
getent group salt >/dev/null || %{_sbindir}/groupadd -r salt
|
||||
getent passwd salt >/dev/null || %{_sbindir}/useradd -r -g salt -d $S_HOME -s /bin/false -c "salt-master daemon" salt
|
||||
if [[ -d "$S_PHOME/.ssh" ]]; then
|
||||
@@ -644,8 +555,12 @@ dbus-uuidgen --ensure
|
||||
|
||||
%preun proxy
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_preun salt-proxy@.service
|
||||
%else
|
||||
%systemd_preun salt-proxy@.service
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
%stop_on_removal salt-proxy
|
||||
%endif
|
||||
@@ -653,14 +568,20 @@ dbus-uuidgen --ensure
|
||||
|
||||
%pre proxy
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_pre salt-proxy@.service
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%post proxy
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_post salt-proxy@.service
|
||||
%fillup_only
|
||||
%else
|
||||
%systemd_post salt-proxy@.service
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
%fillup_and_insserv
|
||||
%endif
|
||||
@@ -668,8 +589,12 @@ dbus-uuidgen --ensure
|
||||
|
||||
%postun proxy
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_postun salt-proxy@.service
|
||||
%else
|
||||
%systemd_postun_with_restart salt-proxy@.service
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
%insserv_cleanup
|
||||
%restart_on_update salt-proxy
|
||||
@@ -678,8 +603,12 @@ dbus-uuidgen --ensure
|
||||
|
||||
%preun syndic
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_preun salt-syndic.service
|
||||
%else
|
||||
%systemd_preun salt-syndic.service
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
%stop_on_removal salt-syndic
|
||||
%else
|
||||
@@ -692,14 +621,20 @@ dbus-uuidgen --ensure
|
||||
|
||||
%pre syndic
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_pre salt-syndic.service
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%post syndic
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_post salt-syndic.service
|
||||
%fillup_only
|
||||
%else
|
||||
%systemd_post salt-syndic.service
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
%fillup_and_insserv
|
||||
%endif
|
||||
@@ -707,8 +642,12 @@ dbus-uuidgen --ensure
|
||||
|
||||
%postun syndic
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_postun salt-syndic.service
|
||||
%else
|
||||
%systemd_postun_with_restart salt-syndic.service
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
%insserv_cleanup
|
||||
%restart_on_update salt-syndic
|
||||
@@ -717,8 +656,12 @@ dbus-uuidgen --ensure
|
||||
|
||||
%preun master
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_preun salt-master.service
|
||||
%else
|
||||
%systemd_preun salt-master.service
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
%stop_on_removal salt-master
|
||||
%else
|
||||
@@ -731,8 +674,10 @@ dbus-uuidgen --ensure
|
||||
|
||||
%pre master
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_pre salt-master.service
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%post master
|
||||
if [ $1 -eq 2 ] ; then
|
||||
@@ -744,15 +689,19 @@ if [ $1 -eq 2 ] ; then
|
||||
for file in master.{pem,pub} ; do
|
||||
[ -f /etc/salt/pki/master/$file ] && chown salt /etc/salt/pki/master/$file
|
||||
done
|
||||
for dir in file_lists minions jobs ; do
|
||||
[ -d /var/cache/salt/master/$dir ] && chown -R salt:salt /var/cache/salt/master/$dir
|
||||
done
|
||||
MASTER_CACHE_DIR="/var/cache/salt/master"
|
||||
[ -d $MASTER_CACHE_DIR ] && chown -R salt:salt $MASTER_CACHE_DIR
|
||||
[ -f $MASTER_CACHE_DIR/.root_key ] && chown root:root $MASTER_CACHE_DIR/.root_key
|
||||
true
|
||||
fi
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_post salt-master.service
|
||||
%fillup_only
|
||||
%else
|
||||
%systemd_post salt-master.service
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
%fillup_and_insserv
|
||||
%else
|
||||
@@ -762,8 +711,12 @@ fi
|
||||
|
||||
%postun master
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_postun salt-master.service
|
||||
%else
|
||||
%systemd_postun_with_restart salt-master.service
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
%restart_on_update salt-master
|
||||
%insserv_cleanup
|
||||
@@ -776,8 +729,12 @@ fi
|
||||
|
||||
%preun minion
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_preun salt-minion.service
|
||||
%else
|
||||
%systemd_preun salt-minion.service
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
%stop_on_removal salt-minion
|
||||
%else
|
||||
@@ -790,14 +747,20 @@ fi
|
||||
|
||||
%pre minion
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_pre salt-minion.service
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%post minion
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_post salt-minion.service
|
||||
%fillup_only
|
||||
%else
|
||||
%systemd_post salt-minion.service
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
%fillup_and_insserv
|
||||
%else
|
||||
@@ -807,8 +770,12 @@ fi
|
||||
|
||||
%postun minion
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_postun salt-minion.service
|
||||
%else
|
||||
%systemd_postun_with_restart salt-minion.service
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
%insserv_cleanup
|
||||
%restart_on_update salt-minion
|
||||
@@ -821,20 +788,30 @@ fi
|
||||
|
||||
%preun api
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_preun salt-api.service
|
||||
%else
|
||||
%systemd_preun salt-api.service
|
||||
%endif
|
||||
%else
|
||||
%stop_on_removal
|
||||
%endif
|
||||
|
||||
%pre api
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_pre salt-api.service
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%post api
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_add_post salt-api.service
|
||||
%else
|
||||
%systemd_post salt-api.service
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
%fillup_and_insserv
|
||||
%endif
|
||||
@@ -842,8 +819,12 @@ fi
|
||||
|
||||
%postun api
|
||||
%if %{with systemd}
|
||||
%if 0%{?suse_version}
|
||||
%service_del_postun salt-api.service
|
||||
%else
|
||||
%systemd_postun_with_restart salt-api.service
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?suse_version}
|
||||
%insserv_cleanup
|
||||
%restart_on_update
|
||||
@@ -920,6 +901,11 @@ fi
|
||||
%config(noreplace) %{_initddir}/salt-minion
|
||||
%endif
|
||||
|
||||
## Install sysV salt-minion watchdog for SLES11 and RHEL6
|
||||
%if 0%{?rhel} == 6 || 0%{?suse_version} == 1110
|
||||
%{_bindir}/salt-daemon-watcher
|
||||
%endif
|
||||
|
||||
%files proxy
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/salt-proxy
|
||||
|
Reference in New Issue
Block a user