Accepting request 203728 from devel:languages:python
Support systemd or sysvinit; not both (forwarded request 203725 from posophe) OBS-URL: https://build.opensuse.org/request/show/203728 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/salt?expand=0&rev=17
This commit is contained in:
parent
51a039df19
commit
2524901378
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 18 11:24:28 UTC 2013 - p.drouand@gmail.com
|
||||||
|
|
||||||
|
- Don't support sysvinit and systemd for the same system; add conditionnal
|
||||||
|
macros to use systemd only on systems which support it and sysvinit
|
||||||
|
on other systems
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Oct 17 18:27:23 UTC 2013 - aboe76@gmail.com
|
Thu Oct 17 18:27:23 UTC 2013 - aboe76@gmail.com
|
||||||
|
|
||||||
|
83
salt.spec
83
salt.spec
@ -62,7 +62,9 @@ Requires: python-Jinja2
|
|||||||
Requires: python-PyYAML
|
Requires: python-PyYAML
|
||||||
Requires: python-xml
|
Requires: python-xml
|
||||||
Requires(pre): %fillup_prereq
|
Requires(pre): %fillup_prereq
|
||||||
|
%if 0%{?suse_version} < 1210
|
||||||
Requires(pre): %insserv_prereq
|
Requires(pre): %insserv_prereq
|
||||||
|
%endif
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
||||||
@ -95,8 +97,11 @@ Requires: dmidecode
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
Recommends: python-halite
|
Recommends: python-halite
|
||||||
Requires(pre): %fillup_prereq
|
%if 0%{?suse_version} < 1210
|
||||||
Requires(pre): %insserv_prereq
|
Requires(pre): %insserv_prereq
|
||||||
|
%endif
|
||||||
|
Requires(pre): %fillup_prereq
|
||||||
|
|
||||||
|
|
||||||
%description master
|
%description master
|
||||||
The Salt master is the central server to which all minions connect.
|
The Salt master is the central server to which all minions connect.
|
||||||
@ -111,8 +116,10 @@ Requires: python-pyzmq
|
|||||||
Requires: python-M2Crypto
|
Requires: python-M2Crypto
|
||||||
Requires: python-msgpack-python
|
Requires: python-msgpack-python
|
||||||
Requires: python-pycrypto
|
Requires: python-pycrypto
|
||||||
Requires(pre): %fillup_prereq
|
%if 0%{?suse_version} < 1210
|
||||||
Requires(pre): %insserv_prereq
|
Requires(pre): %insserv_prereq
|
||||||
|
%endif
|
||||||
|
Requires(pre): %fillup_prereq
|
||||||
|
|
||||||
%description minion
|
%description minion
|
||||||
Salt minion is queried and controlled from the master.
|
Salt minion is queried and controlled from the master.
|
||||||
@ -123,8 +130,10 @@ Summary: Syndic component for salt, a parallel remote execution system
|
|||||||
Group: System/Monitoring
|
Group: System/Monitoring
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Requires: %{name}-master = %{version}
|
Requires: %{name}-master = %{version}
|
||||||
Requires(pre): %fillup_prereq
|
%if 0%{?suse_version} < 1210
|
||||||
Requires(pre): %insserv_prereq
|
Requires(pre): %insserv_prereq
|
||||||
|
%endif
|
||||||
|
Requires(pre): %fillup_prereq
|
||||||
|
|
||||||
%description syndic
|
%description syndic
|
||||||
Salt syndic is the master-of-masters for salt
|
Salt syndic is the master-of-masters for salt
|
||||||
@ -136,8 +145,10 @@ Summary: Ssh component for salt, a parallel remote execution system
|
|||||||
Group: System/Monitoring
|
Group: System/Monitoring
|
||||||
Requires: %{name} = %{version}
|
Requires: %{name} = %{version}
|
||||||
Recommends: sshpass
|
Recommends: sshpass
|
||||||
Requires(pre): %fillup_prereq
|
%if 0%{?suse_version} < 1210
|
||||||
Requires(pre): %insserv_prereq
|
Requires(pre): %insserv_prereq
|
||||||
|
%endif
|
||||||
|
Requires(pre): %fillup_prereq
|
||||||
|
|
||||||
%description ssh
|
%description ssh
|
||||||
Salt ssh is a master running without zmq.
|
Salt ssh is a master running without zmq.
|
||||||
@ -155,7 +166,9 @@ python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|||||||
## create missing directories
|
## create missing directories
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/salt/master.d
|
mkdir -p %{buildroot}%{_sysconfdir}/salt/master.d
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/salt/minion.d
|
mkdir -p %{buildroot}%{_sysconfdir}/salt/minion.d
|
||||||
|
%if 0%{?suse_version} < 1210
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
||||||
|
%endif
|
||||||
mkdir -p %{buildroot}%{_localstatedir}/log/salt
|
mkdir -p %{buildroot}%{_localstatedir}/log/salt
|
||||||
mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d/
|
mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d/
|
||||||
mkdir -p %{buildroot}/%{_sbindir}
|
mkdir -p %{buildroot}/%{_sbindir}
|
||||||
@ -164,18 +177,19 @@ mkdir -p %{buildroot}/srv/salt
|
|||||||
mkdir -p %{buildroot}/srv/pillar
|
mkdir -p %{buildroot}/srv/pillar
|
||||||
#
|
#
|
||||||
## install init scripts
|
## install init scripts
|
||||||
|
%if 0%{?_unitdir:1}
|
||||||
|
install -Dpm 0644 %{SOURCE4} %{buildroot}%_unitdir/salt-master.service
|
||||||
|
install -Dpm 0644 %{SOURCE5} %{buildroot}%_unitdir/salt-syndic.service
|
||||||
|
install -Dpm 0644 %{SOURCE6} %{buildroot}%_unitdir/salt-minion.service
|
||||||
|
%else
|
||||||
install -Dpm 0755 %{SOURCE1} %{buildroot}%{_initddir}/salt-master
|
install -Dpm 0755 %{SOURCE1} %{buildroot}%{_initddir}/salt-master
|
||||||
install -Dpm 0755 %{SOURCE2} %{buildroot}%{_initddir}/salt-syndic
|
install -Dpm 0755 %{SOURCE2} %{buildroot}%{_initddir}/salt-syndic
|
||||||
install -Dpm 0755 %{SOURCE3} %{buildroot}%{_initddir}/salt-minion
|
install -Dpm 0755 %{SOURCE3} %{buildroot}%{_initddir}/salt-minion
|
||||||
ln -sf %{_initddir}/salt-master %{buildroot}%{_sbindir}/rcsalt-master
|
ln -sf %{_initddir}/salt-master %{buildroot}%{_sbindir}/rcsalt-master
|
||||||
ln -sf %{_initddir}/salt-syndic %{buildroot}%{_sbindir}/rcsalt-syndic
|
ln -sf %{_initddir}/salt-syndic %{buildroot}%{_sbindir}/rcsalt-syndic
|
||||||
ln -sf %{_initddir}/salt-minion %{buildroot}%{_sbindir}/rcsalt-minion
|
ln -sf %{_initddir}/salt-minion %{buildroot}%{_sbindir}/rcsalt-minion
|
||||||
|
|
||||||
%if 0%{?_unitdir:1}
|
|
||||||
install -Dpm 0644 %{SOURCE4} %{buildroot}%_unitdir/salt-master.service
|
|
||||||
install -Dpm 0644 %{SOURCE5} %{buildroot}%_unitdir/salt-syndic.service
|
|
||||||
install -Dpm 0644 %{SOURCE6} %{buildroot}%_unitdir/salt-minion.service
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
#
|
#
|
||||||
## install config files
|
## install config files
|
||||||
install -Dpm 0644 conf/minion %{buildroot}%{_sysconfdir}/salt/minion
|
install -Dpm 0644 conf/minion %{buildroot}%{_sysconfdir}/salt/minion
|
||||||
@ -191,61 +205,73 @@ install -Dpm 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2
|
|||||||
%{__python} setup.py test --runtests-opts=-u
|
%{__python} setup.py test --runtests-opts=-u
|
||||||
|
|
||||||
%preun -n salt-syndic
|
%preun -n salt-syndic
|
||||||
%stop_on_removal salt-syndic
|
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_del_preun salt-syndic.service
|
%service_del_preun salt-syndic.service
|
||||||
|
%else
|
||||||
|
%stop_on_removal salt-syndic
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post -n salt-syndic
|
%post -n salt-syndic
|
||||||
%fillup_and_insserv
|
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_add_post salt-syndic.service
|
%service_add_post salt-syndic.service
|
||||||
|
%fillup_only
|
||||||
|
%else
|
||||||
|
%fillup_and_insserv
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%postun -n salt-syndic
|
%postun -n salt-syndic
|
||||||
%restart_on_update salt-syndic
|
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_del_postun salt-syndic.service
|
%service_del_postun salt-syndic.service
|
||||||
%endif
|
%else
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
|
%restart_on_update salt-syndic
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun -n salt-master
|
%preun -n salt-master
|
||||||
%stop_on_removal salt-master
|
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_del_preun salt-master.service
|
%service_del_preun salt-master.service
|
||||||
|
%else
|
||||||
|
%stop_on_removal salt-master
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post -n salt-master
|
%post -n salt-master
|
||||||
%fillup_and_insserv
|
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_add_post salt-master.service
|
%service_add_post salt-master.service
|
||||||
|
%fillup_only
|
||||||
|
%else
|
||||||
|
%fillup_and_insserv
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%postun -n salt-master
|
%postun -n salt-master
|
||||||
%restart_on_update salt-master
|
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_del_postun salt-master.service
|
%service_del_postun salt-master.service
|
||||||
%endif
|
%else
|
||||||
|
%restart_on_update salt-master
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
|
%endif
|
||||||
|
|
||||||
%preun -n salt-minion
|
%preun -n salt-minion
|
||||||
%stop_on_removal salt-minion
|
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_del_preun salt-minion.service
|
%service_del_preun salt-minion.service
|
||||||
|
%else
|
||||||
|
%stop_on_removal salt-minion
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post -n salt-minion
|
%post -n salt-minion
|
||||||
%fillup_and_insserv
|
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_add_post salt-minion.service
|
%service_add_post salt-minion.service
|
||||||
|
%fillup_only
|
||||||
|
%else
|
||||||
|
%fillup_and_insserv
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%postun -n salt-minion
|
%postun -n salt-minion
|
||||||
%restart_on_update salt-minion
|
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
%service_del_postun salt-minion.service
|
%service_del_postun salt-minion.service
|
||||||
%endif
|
%else
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
|
%restart_on_update salt-minion
|
||||||
|
%endif
|
||||||
|
|
||||||
%files -n salt-ssh
|
%files -n salt-ssh
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -256,22 +282,24 @@ install -Dpm 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_bindir}/salt-syndic
|
%{_bindir}/salt-syndic
|
||||||
%{_mandir}/man1/salt-syndic.1.gz
|
%{_mandir}/man1/salt-syndic.1.gz
|
||||||
%{_sbindir}/rcsalt-syndic
|
|
||||||
%{_sysconfdir}/init.d/salt-syndic
|
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
%_unitdir/salt-syndic.service
|
%_unitdir/salt-syndic.service
|
||||||
|
%else
|
||||||
|
%{_sbindir}/rcsalt-syndic
|
||||||
|
%{_sysconfdir}/init.d/salt-syndic
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n salt-minion
|
%files -n salt-minion
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_bindir}/salt-minion
|
%{_bindir}/salt-minion
|
||||||
%{_mandir}/man1/salt-minion.1.gz
|
%{_mandir}/man1/salt-minion.1.gz
|
||||||
%{_sbindir}/rcsalt-minion
|
|
||||||
%config(noreplace) %{_sysconfdir}/init.d/salt-minion
|
|
||||||
%attr(0644, root, root) %config(noreplace) %{_sysconfdir}/salt/minion
|
%attr(0644, root, root) %config(noreplace) %{_sysconfdir}/salt/minion
|
||||||
%{_sysconfdir}/salt/minion.d
|
%{_sysconfdir}/salt/minion.d
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
%_unitdir/salt-minion.service
|
%_unitdir/salt-minion.service
|
||||||
|
%else
|
||||||
|
%{_sbindir}/rcsalt-minion
|
||||||
|
%config(noreplace) %{_sysconfdir}/init.d/salt-minion
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files -n salt-master
|
%files -n salt-master
|
||||||
@ -286,8 +314,6 @@ install -Dpm 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2
|
|||||||
%{_mandir}/man1/salt-cp.1.gz
|
%{_mandir}/man1/salt-cp.1.gz
|
||||||
%{_mandir}/man1/salt-key.1.gz
|
%{_mandir}/man1/salt-key.1.gz
|
||||||
%{_mandir}/man1/salt-run.1.gz
|
%{_mandir}/man1/salt-run.1.gz
|
||||||
%{_sbindir}/rcsalt-master
|
|
||||||
%config(noreplace) %{_sysconfdir}/init.d/salt-master
|
|
||||||
%config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/salt
|
%config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/salt
|
||||||
%attr(0644, root, root) %config(noreplace) %{_sysconfdir}/salt/master
|
%attr(0644, root, root) %config(noreplace) %{_sysconfdir}/salt/master
|
||||||
%{_sysconfdir}/salt/master.d
|
%{_sysconfdir}/salt/master.d
|
||||||
@ -295,6 +321,9 @@ install -Dpm 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2
|
|||||||
%dir /srv/pillar
|
%dir /srv/pillar
|
||||||
%if 0%{?_unitdir:1}
|
%if 0%{?_unitdir:1}
|
||||||
%_unitdir/salt-master.service
|
%_unitdir/salt-master.service
|
||||||
|
%else
|
||||||
|
%{_sbindir}/rcsalt-master
|
||||||
|
%config(noreplace) %{_sysconfdir}/init.d/salt-master
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
Loading…
Reference in New Issue
Block a user