diff --git a/salt.spec b/salt.spec index 706e2fa..a188fd4 100644 --- a/salt.spec +++ b/salt.spec @@ -556,8 +556,7 @@ echo "transport: raet" > %{buildroot}%{_sysconfdir}/salt/master.d/transport-raet echo "transport: raet" > %{buildroot}%{_sysconfdir}/salt/minion.d/transport-raet.conf %if 0%{?suse_version} > 1020 -%fdupes %{buildroot}%{_docdir}/salt -%fdupes %{buildroot}%{_sysconfdir} +%fdupes %{buildroot}%{_docdir} %fdupes %{buildroot}%{python_sitelib} %endif @@ -575,6 +574,45 @@ getent passwd salt >/dev/null || %{_sbindir}/useradd -r -g salt -d /srv/salt -s systemd-tmpfiles --create /usr/lib/tmpfiles.d/salt.conf || true %endif +%preun proxy +%if %{with systemd} +%service_del_preun salt-proxy.service +%else +%if 0%{?suse_version} +%stop_on_removal salt-proxy +%else + if [ $1 -eq 0 ] ; then + /sbin/service salt-proxy stop >/dev/null 2>&1 + /sbin/chkconfig --del salt-proxy + fi +%endif +%endif + +%pre proxy +%if %{with systemd} +%service_add_pre salt-proxy.service +%endif + +%post proxy +%if %{with systemd} +%service_add_post salt-proxy.service +%fillup_only +%else +%if 0%{?suse_version} +%fillup_and_insserv +%endif +%endif + +%postun proxy +%if %{with systemd} +%service_del_postun salt-proxy.service +%else +%if 0%{?suse_version} +%insserv_cleanup +%restart_on_update salt-proxy +%endif +%endif + %preun syndic %if %{with systemd} %service_del_preun salt-syndic.service @@ -796,7 +834,7 @@ fi %dir %attr(0750, root, root) %{_sysconfdir}/salt/minion.d/ %dir %attr(0750, root, root) %{_sysconfdir}/salt/pki/minion/ %dir %attr(0750, root, root) %{_localstatedir}/cache/salt/minion/ -%dir %ghost %attr(0750, root, salt) %{_localstatedir}/run/salt/minion +#%dir %ghost %attr(0750, root, salt) %{_localstatedir}/run/salt/minion %{_sbindir}/rcsalt-minion # Install plugin only on SUSE machines @@ -856,7 +894,7 @@ fi %dir %attr(0750, salt, salt) %{_localstatedir}/cache/salt/master/roots/ %dir %attr(0750, salt, salt) %{_localstatedir}/cache/salt/master/syndics/ %dir %attr(0750, salt, salt) %{_localstatedir}/cache/salt/master/tokens/ -%dir %ghost %attr(0750, salt, salt) %{_localstatedir}/run/salt/master/ +#%dir %ghost %attr(0750, salt, salt) %{_localstatedir}/run/salt/master/ %files raet %defattr(-,root,root,-) @@ -881,7 +919,7 @@ fi %dir %attr(0750, root, salt) %{_sysconfdir}/salt/pki %dir %attr(0750, salt, salt) %{_localstatedir}/log/salt %dir %attr(0750, root, salt) %{_localstatedir}/cache/salt -%dir %ghost %attr(0750, root, salt) %{_localstatedir}/run/salt +#%dir %ghost %attr(0750, root, salt) %{_localstatedir}/run/salt %dir %attr(0750, root, salt) /srv/spm %if %{with systemd} /usr/lib/tmpfiles.d/salt.conf