add pre/post for proxy
fix fdupes call something's fishy with /var/run OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=73
This commit is contained in:
parent
48e356b046
commit
37a347b515
48
salt.spec
48
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
|
echo "transport: raet" > %{buildroot}%{_sysconfdir}/salt/minion.d/transport-raet.conf
|
||||||
|
|
||||||
%if 0%{?suse_version} > 1020
|
%if 0%{?suse_version} > 1020
|
||||||
%fdupes %{buildroot}%{_docdir}/salt
|
%fdupes %{buildroot}%{_docdir}
|
||||||
%fdupes %{buildroot}%{_sysconfdir}
|
|
||||||
%fdupes %{buildroot}%{python_sitelib}
|
%fdupes %{buildroot}%{python_sitelib}
|
||||||
%endif
|
%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
|
systemd-tmpfiles --create /usr/lib/tmpfiles.d/salt.conf || true
|
||||||
%endif
|
%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
|
%preun syndic
|
||||||
%if %{with systemd}
|
%if %{with systemd}
|
||||||
%service_del_preun salt-syndic.service
|
%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/minion.d/
|
||||||
%dir %attr(0750, root, root) %{_sysconfdir}/salt/pki/minion/
|
%dir %attr(0750, root, root) %{_sysconfdir}/salt/pki/minion/
|
||||||
%dir %attr(0750, root, root) %{_localstatedir}/cache/salt/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
|
%{_sbindir}/rcsalt-minion
|
||||||
|
|
||||||
# Install plugin only on SUSE machines
|
# 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/roots/
|
||||||
%dir %attr(0750, salt, salt) %{_localstatedir}/cache/salt/master/syndics/
|
%dir %attr(0750, salt, salt) %{_localstatedir}/cache/salt/master/syndics/
|
||||||
%dir %attr(0750, salt, salt) %{_localstatedir}/cache/salt/master/tokens/
|
%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
|
%files raet
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
@ -881,7 +919,7 @@ fi
|
|||||||
%dir %attr(0750, root, salt) %{_sysconfdir}/salt/pki
|
%dir %attr(0750, root, salt) %{_sysconfdir}/salt/pki
|
||||||
%dir %attr(0750, salt, salt) %{_localstatedir}/log/salt
|
%dir %attr(0750, salt, salt) %{_localstatedir}/log/salt
|
||||||
%dir %attr(0750, root, salt) %{_localstatedir}/cache/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
|
%dir %attr(0750, root, salt) /srv/spm
|
||||||
%if %{with systemd}
|
%if %{with systemd}
|
||||||
/usr/lib/tmpfiles.d/salt.conf
|
/usr/lib/tmpfiles.d/salt.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user