2013-04-30 15:15:28 +00:00
|
|
|
#
|
|
|
|
# spec file for package salt
|
|
|
|
#
|
2013-05-29 16:25:22 +00:00
|
|
|
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2013-04-30 15:15:28 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
Name: salt
|
2013-09-27 19:58:18 +00:00
|
|
|
Version: 0.17.0
|
2013-05-29 16:25:22 +00:00
|
|
|
Release: 0
|
2013-04-30 15:15:28 +00:00
|
|
|
Summary: A parallel remote execution system
|
2013-05-29 16:25:22 +00:00
|
|
|
License: Apache-2.0
|
2013-04-30 15:15:28 +00:00
|
|
|
Group: System/Monitoring
|
2013-05-29 16:25:22 +00:00
|
|
|
Url: http://saltstack.org/
|
2013-04-30 15:15:28 +00:00
|
|
|
Source0: http://pypi.python.org/packages/source/s/%{name}/%{name}-%{version}.tar.gz
|
|
|
|
Source1: %{name}-master
|
|
|
|
Source2: %{name}-syndic
|
|
|
|
Source3: %{name}-minion
|
|
|
|
Source4: %{name}-master.service
|
|
|
|
Source5: %{name}-syndic.service
|
|
|
|
Source6: %{name}-minion.service
|
2013-05-29 16:25:22 +00:00
|
|
|
Source7: %{name}.logrotate
|
2013-09-04 12:34:48 +00:00
|
|
|
Source8: %{name}.SuSEfirewall2
|
2013-06-22 06:03:28 +00:00
|
|
|
%if 0%{?sles_version}
|
|
|
|
BuildRequires: python
|
|
|
|
Requires: python
|
|
|
|
%endif
|
|
|
|
BuildRequires: python-devel
|
2013-05-29 16:25:22 +00:00
|
|
|
BuildRequires: logrotate
|
2013-04-30 15:15:28 +00:00
|
|
|
BuildRequires: python-Jinja2
|
|
|
|
BuildRequires: python-M2Crypto
|
|
|
|
BuildRequires: python-PyYAML
|
|
|
|
BuildRequires: python-msgpack-python
|
|
|
|
BuildRequires: python-pycrypto
|
|
|
|
BuildRequires: python-pyzmq >= 2.1.9
|
2013-09-07 22:59:34 +00:00
|
|
|
BuildRequires: unzip
|
2013-05-29 16:25:22 +00:00
|
|
|
Requires: logrotate
|
2013-04-30 15:15:28 +00:00
|
|
|
Requires: python-Jinja2
|
|
|
|
Requires: python-PyYAML
|
2013-09-28 21:16:06 +00:00
|
|
|
Requires: python-Sphinx
|
2013-04-30 15:15:28 +00:00
|
|
|
Requires(pre): %fillup_prereq
|
|
|
|
Requires(pre): %insserv_prereq
|
|
|
|
%if 0%{?suse_version} >= 1210
|
2013-05-29 16:25:22 +00:00
|
|
|
BuildRequires: systemd
|
2013-05-12 21:52:56 +00:00
|
|
|
%{?systemd_requires}
|
2013-04-30 15:15:28 +00:00
|
|
|
%endif
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2013-06-22 06:03:28 +00:00
|
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
%else
|
2013-04-30 15:15:28 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
%endif
|
|
|
|
|
2013-09-27 19:58:18 +00:00
|
|
|
## Disabled for now python-mock issues
|
2013-09-28 21:16:06 +00:00
|
|
|
%if 0%{?suse_version} != 1220 && 0%{?suse_version} != 1230
|
|
|
|
BuildRequires: python-unittest2
|
|
|
|
BuildRequires: python-salt-testing
|
|
|
|
BuildRequires: python-xml
|
|
|
|
BuildRequires: python-mock
|
|
|
|
BuildRequires: python-pip
|
|
|
|
BuildRequires: git
|
|
|
|
%endif
|
2013-09-07 22:59:34 +00:00
|
|
|
|
2013-04-30 15:15:28 +00:00
|
|
|
%description
|
|
|
|
Salt is a distributed remote execution system used to execute commands and
|
|
|
|
query data. It was developed in order to bring the best solutions found in
|
|
|
|
the world of remote execution together and make them better, faster and more
|
|
|
|
malleable. Salt accomplishes this via its ability to handle larger loads of
|
|
|
|
information, and not just dozens, but hundreds or even thousands of individual
|
|
|
|
servers, handle them quickly and through a simple and manageable interface.
|
|
|
|
|
|
|
|
%package master
|
|
|
|
Summary: Management component for salt, a parallel remote execution system
|
|
|
|
Group: System/Monitoring
|
|
|
|
Requires: %{name} = %{version}
|
2013-09-28 21:16:06 +00:00
|
|
|
Requires: zeromq >= 3.2
|
|
|
|
Requires: python-pyzmq >= 2.10
|
|
|
|
Requires: python-M2Crypto
|
|
|
|
Requires: python-msgpack-python
|
|
|
|
Requires: python-pycrypto
|
|
|
|
Requires: python-GitPython
|
|
|
|
Requires: git
|
|
|
|
%ifarch %{ix86} x86_64
|
|
|
|
%if 0%{?suse_version} && 0%{?sles_version} == 0
|
|
|
|
Requires: dmidecode
|
|
|
|
%endif
|
|
|
|
%endif
|
2013-09-27 19:58:18 +00:00
|
|
|
Recommends: python-halite
|
2013-04-30 15:15:28 +00:00
|
|
|
Requires(pre): %fillup_prereq
|
|
|
|
Requires(pre): %insserv_prereq
|
|
|
|
|
|
|
|
%description master
|
|
|
|
The Salt master is the central server to which all minions connect.
|
|
|
|
Enabled commands to remote systems to be called in parallel rather
|
|
|
|
than serially.
|
|
|
|
|
|
|
|
%package minion
|
|
|
|
Summary: Client component for salt, a parallel remote execution system
|
|
|
|
Group: System/Monitoring
|
|
|
|
Requires: %{name} = %{version}
|
2013-09-28 21:16:06 +00:00
|
|
|
Requires: zeromq >= 3.2
|
|
|
|
Requires: python-pyzmq >= 2.10
|
|
|
|
Requires: python-M2Crypto
|
|
|
|
Requires: python-msgpack-python
|
|
|
|
Requires: python-pycrypto
|
2013-04-30 15:15:28 +00:00
|
|
|
Requires(pre): %fillup_prereq
|
|
|
|
Requires(pre): %insserv_prereq
|
|
|
|
|
|
|
|
%description minion
|
|
|
|
Salt minion is queried and controlled from the master.
|
|
|
|
Listens to the salt master and execute the commands.
|
|
|
|
|
|
|
|
%package syndic
|
|
|
|
Summary: Syndic component for salt, a parallel remote execution system
|
|
|
|
Group: System/Monitoring
|
|
|
|
Requires: %{name} = %{version}
|
2013-09-27 19:58:18 +00:00
|
|
|
Requires: %{name}-master = %{version}
|
2013-04-30 15:15:28 +00:00
|
|
|
Requires(pre): %fillup_prereq
|
|
|
|
Requires(pre): %insserv_prereq
|
|
|
|
|
|
|
|
%description syndic
|
|
|
|
Salt syndic is the master-of-masters for salt
|
|
|
|
The master of masters for salt-- it enables
|
|
|
|
the management of multiple masters at a time..
|
|
|
|
|
2013-09-27 19:58:18 +00:00
|
|
|
%package ssh
|
|
|
|
Summary: Ssh component for salt, a parallel remote execution system
|
|
|
|
Group: System/Monitoring
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
Requires: sshpass
|
|
|
|
Requires(pre): %fillup_prereq
|
|
|
|
Requires(pre): %insserv_prereq
|
|
|
|
|
|
|
|
%description ssh
|
|
|
|
Salt ssh is a master running without zmq.
|
|
|
|
it enables the management of minions over a ssh connection.
|
|
|
|
|
2013-04-30 15:15:28 +00:00
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
python setup.py build
|
|
|
|
|
|
|
|
%install
|
|
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
|
2013-05-12 21:52:56 +00:00
|
|
|
##missing directories
|
2013-05-29 16:25:22 +00:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/salt/master.d
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/salt/minion.d
|
2013-04-30 15:15:28 +00:00
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
|
|
|
mkdir -p %{buildroot}%{_localstatedir}/log/salt
|
2013-05-12 21:52:56 +00:00
|
|
|
mkdir -p %{buildroot}/%{_sysconfdir}/logrotate.d/
|
2013-04-30 15:15:28 +00:00
|
|
|
mkdir -p %{buildroot}/%{_sbindir}
|
2013-06-22 06:03:28 +00:00
|
|
|
mkdir -p %{buildroot}/var/log/salt
|
|
|
|
mkdir -p %{buildroot}/srv/salt
|
2013-09-28 21:16:06 +00:00
|
|
|
mkdir -p %{buildroot}/srv/pillar
|
2013-05-12 21:52:56 +00:00
|
|
|
#
|
|
|
|
##init scripts
|
|
|
|
install -Dpm 0755 %{SOURCE1} %{buildroot}%{_initddir}/salt-master
|
|
|
|
install -Dpm 0755 %{SOURCE2} %{buildroot}%{_initddir}/salt-syndic
|
|
|
|
install -Dpm 0755 %{SOURCE3} %{buildroot}%{_initddir}/salt-minion
|
|
|
|
ln -sf %{_initddir}/salt-master %{buildroot}%{_sbindir}/rcsalt-master
|
|
|
|
ln -sf %{_initddir}/salt-syndic %{buildroot}%{_sbindir}/rcsalt-syndic
|
|
|
|
ln -sf %{_initddir}/salt-minion %{buildroot}%{_sbindir}/rcsalt-minion
|
|
|
|
|
|
|
|
%if 0%{?_unitdir:1}
|
2013-06-22 06:03:28 +00:00
|
|
|
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
|
2013-04-30 15:15:28 +00:00
|
|
|
%endif
|
2013-05-12 21:52:56 +00:00
|
|
|
#
|
|
|
|
##config files
|
2013-06-22 06:03:28 +00:00
|
|
|
install -Dpm 0644 conf/minion %{buildroot}%{_sysconfdir}/salt/minion
|
|
|
|
install -Dpm 0644 conf/master %{buildroot}%{_sysconfdir}/salt/master
|
2013-05-12 21:52:56 +00:00
|
|
|
#
|
|
|
|
##logrotate file
|
2013-06-22 06:03:28 +00:00
|
|
|
install -Dpm 0644 %{SOURCE7} %{buildroot}%{_sysconfdir}/logrotate.d/salt
|
2013-09-04 12:34:48 +00:00
|
|
|
#
|
|
|
|
##SuSEfirewall2 file
|
|
|
|
install -Dpm 0644 %{SOURCE8} %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/salt
|
2013-04-30 15:15:28 +00:00
|
|
|
|
2013-09-28 21:16:06 +00:00
|
|
|
%if 0%{?suse_version} != 1220 && 0%{?suse_version} != 1230
|
|
|
|
%check
|
|
|
|
#export only_local_network=False
|
|
|
|
%{__python} setup.py test --runtests-opts=-u
|
|
|
|
%endif
|
2013-09-07 22:59:34 +00:00
|
|
|
|
2013-04-30 15:15:28 +00:00
|
|
|
%preun -n salt-syndic
|
|
|
|
%stop_on_removal salt-syndic
|
2013-05-12 21:52:56 +00:00
|
|
|
%if 0%{?_unitdir:1}
|
|
|
|
%service_del_preun salt-syndic.service
|
|
|
|
%endif
|
2013-04-30 15:15:28 +00:00
|
|
|
|
|
|
|
%post -n salt-syndic
|
|
|
|
%fillup_and_insserv
|
2013-05-12 21:52:56 +00:00
|
|
|
%if 0%{?_unitdir:1}
|
|
|
|
%service_add_post salt-syndic.service
|
|
|
|
%endif
|
2013-04-30 15:15:28 +00:00
|
|
|
|
|
|
|
%postun -n salt-syndic
|
|
|
|
%restart_on_update salt-syndic
|
2013-05-12 21:52:56 +00:00
|
|
|
%if 0%{?_unitdir:1}
|
|
|
|
%service_del_postun salt-syndic.service
|
|
|
|
%endif
|
2013-04-30 15:15:28 +00:00
|
|
|
%insserv_cleanup
|
|
|
|
|
|
|
|
%preun -n salt-master
|
|
|
|
%stop_on_removal salt-master
|
2013-05-12 21:52:56 +00:00
|
|
|
%if 0%{?_unitdir:1}
|
|
|
|
%service_del_preun salt-master.service
|
|
|
|
%endif
|
2013-04-30 15:15:28 +00:00
|
|
|
|
|
|
|
%post -n salt-master
|
|
|
|
%fillup_and_insserv
|
2013-05-12 21:52:56 +00:00
|
|
|
%if 0%{?_unitdir:1}
|
|
|
|
%service_add_post salt-master.service
|
|
|
|
%endif
|
2013-04-30 15:15:28 +00:00
|
|
|
|
|
|
|
%postun -n salt-master
|
|
|
|
%restart_on_update salt-master
|
2013-05-12 21:52:56 +00:00
|
|
|
%if 0%{?_unitdir:1}
|
|
|
|
%service_del_postun salt-master.service
|
|
|
|
%endif
|
2013-04-30 15:15:28 +00:00
|
|
|
%insserv_cleanup
|
|
|
|
|
|
|
|
%preun -n salt-minion
|
|
|
|
%stop_on_removal salt-minion
|
2013-05-12 21:52:56 +00:00
|
|
|
%if 0%{?_unitdir:1}
|
|
|
|
%service_del_preun salt-minion.service
|
|
|
|
%endif
|
2013-04-30 15:15:28 +00:00
|
|
|
|
|
|
|
%post -n salt-minion
|
|
|
|
%fillup_and_insserv
|
2013-05-12 21:52:56 +00:00
|
|
|
%if 0%{?_unitdir:1}
|
|
|
|
%service_add_post salt-minion.service
|
|
|
|
%endif
|
2013-04-30 15:15:28 +00:00
|
|
|
|
|
|
|
%postun -n salt-minion
|
|
|
|
%restart_on_update salt-minion
|
2013-05-12 21:52:56 +00:00
|
|
|
%if 0%{?_unitdir:1}
|
|
|
|
%service_del_postun salt-minion.service
|
|
|
|
%endif
|
2013-04-30 15:15:28 +00:00
|
|
|
%insserv_cleanup
|
|
|
|
|
2013-09-27 19:58:18 +00:00
|
|
|
%files -n salt-ssh
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/salt-ssh
|
2013-09-28 21:16:06 +00:00
|
|
|
%{_mandir}/man1/salt-ssh.1.gz
|
2013-09-27 19:58:18 +00:00
|
|
|
|
2013-04-30 15:15:28 +00:00
|
|
|
%files -n salt-syndic
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/salt-syndic
|
2013-09-28 21:16:06 +00:00
|
|
|
%{_mandir}/man1/salt-syndic.1.gz
|
2013-04-30 15:15:28 +00:00
|
|
|
%{_sbindir}/rcsalt-syndic
|
|
|
|
%{_sysconfdir}/init.d/salt-syndic
|
2013-05-12 21:52:56 +00:00
|
|
|
%if 0%{?_unitdir:1}
|
|
|
|
%_unitdir/salt-syndic.service
|
2013-04-30 15:15:28 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%files -n salt-minion
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/salt-minion
|
2013-09-28 21:16:06 +00:00
|
|
|
%{_mandir}/man1/salt-minion.1.gz
|
2013-04-30 15:15:28 +00:00
|
|
|
%{_sbindir}/rcsalt-minion
|
|
|
|
%config(noreplace) %{_sysconfdir}/init.d/salt-minion
|
2013-06-22 06:03:28 +00:00
|
|
|
%attr(0644, root, root) %config(noreplace) %{_sysconfdir}/salt/minion
|
2013-05-29 16:25:22 +00:00
|
|
|
%{_sysconfdir}/salt/minion.d
|
2013-05-12 21:52:56 +00:00
|
|
|
%if 0%{?_unitdir:1}
|
|
|
|
%_unitdir/salt-minion.service
|
2013-04-30 15:15:28 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%files -n salt-master
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/salt
|
|
|
|
%{_bindir}/salt-master
|
|
|
|
%{_bindir}/salt-cp
|
|
|
|
%{_bindir}/salt-key
|
|
|
|
%{_bindir}/salt-run
|
2013-09-28 21:16:06 +00:00
|
|
|
%{_mandir}/man1/salt-master.1.gz
|
|
|
|
%{_mandir}/man1/salt.1.gz
|
|
|
|
%{_mandir}/man1/salt-cp.1.gz
|
|
|
|
%{_mandir}/man1/salt-key.1.gz
|
|
|
|
%{_mandir}/man1/salt-run.1.gz
|
2013-04-30 15:15:28 +00:00
|
|
|
%{_sbindir}/rcsalt-master
|
|
|
|
%config(noreplace) %{_sysconfdir}/init.d/salt-master
|
2013-09-04 18:07:33 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/salt
|
2013-06-22 06:03:28 +00:00
|
|
|
%attr(0644, root, root) %config(noreplace) %{_sysconfdir}/salt/master
|
2013-05-29 16:25:22 +00:00
|
|
|
%{_sysconfdir}/salt/master.d
|
2013-06-22 06:03:28 +00:00
|
|
|
%dir /srv/salt
|
2013-09-28 21:16:06 +00:00
|
|
|
%dir /srv/pillar
|
2013-05-12 21:52:56 +00:00
|
|
|
%if 0%{?_unitdir:1}
|
|
|
|
%_unitdir/salt-master.service
|
2013-04-30 15:15:28 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
2013-09-28 21:16:06 +00:00
|
|
|
%doc LICENSE AUTHORS README.rst HACKING.rst
|
2013-04-30 15:15:28 +00:00
|
|
|
%dir %{_sysconfdir}/salt
|
2013-06-22 06:03:28 +00:00
|
|
|
%dir /var/log/salt
|
2013-09-28 21:16:06 +00:00
|
|
|
%{_bindir}/salt-call
|
|
|
|
%{_mandir}/man1/salt-call.1.gz
|
|
|
|
%{_mandir}/man7/salt.7.gz
|
2013-05-12 21:52:56 +00:00
|
|
|
%config(noreplace) %{_sysconfdir}/logrotate.d/salt
|
2013-04-30 15:15:28 +00:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
2013-09-07 22:59:34 +00:00
|
|
|
%changelog
|