Accepting request 430691 from systemsmanagement:saltstack:testing
- splitting out the susemanager integration plugins into their own subpackages. ATM this only contains the zypp plugin to tell susemanager about manually installed packages. - Unit and integration tests fixes for 2016.3.2 Add: * 0018-Unit-tests-fixes-for-2016.3.2.patch * 0019-Fix-snapper_test-for-python26.patch * 0020-Integration-tests-fixes-for-2016.3.2.patch - Prevent pkg.install failure for expired keys (bsc#996455) Add: * 0017-Check-for-single-quote-before-splitting-on-single-qu.patch - Required D-Bus and generating machine ID where it is missing - Fix sphinx crashes when documentation is being generated Add script for documentation update. Add: * 0016-Improve-Mock-to-be-flexible-and-able-to-mock-methods.patch * update-documentation.sh - Fix pkg.installed refresh repo failure (bsc#993549) Fix salt.states.pkgrepo.management no change failure (bsc#990440) Add: * 0014-Add-ignore_repo_failure-option-to-suppress-zypper-s-.patch * 0015-Remove-zypper-s-raise-exception-if-mod_repo-has-no-a.patch - Deprecate status.uptime one version later Add: OBS-URL: https://build.opensuse.org/request/show/430691 OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=77
This commit is contained in:
committed by
Git OBS Bridge
parent
519e8f9688
commit
14ef6d2b51
180
salt.spec
180
salt.spec
@@ -34,45 +34,80 @@
|
||||
%bcond_with test
|
||||
%bcond_with raet
|
||||
%bcond_without docs
|
||||
%bcond_with builddocs
|
||||
|
||||
Name: salt
|
||||
Version: 2015.8.10
|
||||
Version: 2016.3.2
|
||||
Release: 0
|
||||
Summary: A parallel remote execution system
|
||||
License: Apache-2.0
|
||||
Group: System/Monitoring
|
||||
Url: http://saltstack.org/
|
||||
# Git: https://github.com/openSUSE/salt.git
|
||||
Source0: https://pypi.io/packages/source/s/%{name}/%{name}-%{version}.tar.gz
|
||||
Source0: https://github.com/saltstack/salt/releases/download/v%{version}/%{name}-%{version}.tar.gz
|
||||
Source1: README.SUSE
|
||||
Source2: salt-tmpfiles.d
|
||||
Source3: html.tar.bz2
|
||||
|
||||
# PATCH-FIX-OPENSUSE use-forking-daemon.patch tserong@suse.com -- We don't have python-systemd, so notify can't work
|
||||
# We do not upstream this patch because this is something that we have to fix on our side
|
||||
Patch1: 0001-tserong-suse.com-We-don-t-have-python-systemd-so-not.patch
|
||||
# PATCH-FIX-OPENSUSE use-salt-user-for-master.patch -- Run salt master as dedicated salt user
|
||||
# We do not upstream this patch because this is suse custom configuration
|
||||
Patch2: 0002-Run-salt-master-as-dedicated-salt-user.patch
|
||||
# PATCH-FIX-OPENSUSE https://github.com/saltstack/salt/pull/30424
|
||||
# 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)
|
||||
Patch3: 0003-Check-if-byte-strings-are-properly-encoded-in-UTF-8.patch
|
||||
# PATCH-FIX-OPENSUSE prevent rebuilds in OBS
|
||||
# We do not upstream this patch because the issue is on our side
|
||||
Patch4: 0004-do-not-generate-a-date-in-a-comment-to-prevent-rebui.patch
|
||||
# PATCH-FIX-OPENSUSE - Upstream default hash type is set to MD5, while we require SHA256 (bsc#955373)
|
||||
# PR https://github.com/saltstack/salt/pull/35341 (15.08.2016 - not merged yet)
|
||||
Patch5: 0005-Use-SHA256-hash-type-by-default.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/31798
|
||||
# PR already merged. This will be gone in the next version
|
||||
Patch6: 0006-Create-salt-proxy-instantiated-service-file.patch
|
||||
# PATCH-FIX-OPENSUSE Generate events from the Salt minion,
|
||||
# if Zypper has been used outside the Salt infrastructure
|
||||
# We do not upstream this because this is for SUSE only (15.08.2016)
|
||||
Patch7: 0007-Add-SUSE-Manager-plugin.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/33464
|
||||
Patch8: 0008-Prevent-several-minion-processes-on-the-same-machine.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/33469
|
||||
Patch9: 0009-checksum-validation-when-zypper-pkg.download.patch
|
||||
# PR already merged. This will be gone in the next version
|
||||
Patch8: 0008-checksum-validation-when-zypper-pkg.download.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/33501
|
||||
Patch10: 0010-unit-tests-for-rpm.checksum-and-zypper.download.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/33465
|
||||
Patch11: 0011-jobs.exit_success-allow-to-check-if-a-job-has-execut.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/33432
|
||||
# https://github.com/saltstack/salt/pull/33581
|
||||
Patch12: 0012-Fix-pkgrepo.managed-gpgkey-argument-bsc-979448.patch
|
||||
# PR already merged. This will be gone in the next version
|
||||
Patch9: 0009-unit-tests-for-rpm.checksum-and-zypper.download.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/34599 (backport from dev)
|
||||
# PR already merged. This will be gone in the next version
|
||||
Patch10: 0010-snapper-execution-module.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/34165
|
||||
Patch11: 0011-fix-salt-summary-to-count-not-responding-minions-cor.patch
|
||||
# PATCH-FIX-OPENSUSE
|
||||
# We do not upstream this patch because this is suse custom configuration
|
||||
Patch12: 0012-Run-salt-api-as-user-salt-bsc-990029.patch
|
||||
# PATCH-FIX_UPSTREAM https://github.com/saltstack/salt/pull/35196
|
||||
# PR already merged. This will be gone in the next version
|
||||
Patch13: 0013-Deprecate-status.uptime-one-version-later.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/35448
|
||||
Patch14: 0014-Add-ignore_repo_failure-option-to-suppress-zypper-s-.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/35451
|
||||
Patch15: 0015-Remove-zypper-s-raise-exception-if-mod_repo-has-no-a.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/35763
|
||||
Patch16: 0016-Improve-Mock-to-be-flexible-and-able-to-mock-methods.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/36000
|
||||
Patch17: 0017-Check-for-single-quote-before-splitting-on-single-qu.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/36139
|
||||
# https://github.com/saltstack/salt/pull/36158
|
||||
# https://github.com/saltstack/salt/pull/36227
|
||||
Patch18: 0018-Unit-tests-fixes-for-2016.3.2.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/35715
|
||||
# https://github.com/saltstack/salt/pull/35983
|
||||
# https://github.com/saltstack/salt/pull/34826
|
||||
Patch19: 0019-Fix-snapper_test-for-python26.patch
|
||||
# PATCH-FIX-UPSTREAM https://github.com/saltstack/salt/pull/36263
|
||||
Patch20: 0020-Integration-tests-fixes-for-2016.3.2.patch
|
||||
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: logrotate
|
||||
@@ -111,17 +146,27 @@ BuildRequires: python-salt-testing >= 2015.2.16
|
||||
BuildRequires: python-unittest2
|
||||
BuildRequires: python-xml
|
||||
%endif
|
||||
%if %{with docs}
|
||||
#for docs
|
||||
%if %{with builddocs}
|
||||
BuildRequires: python-sphinx
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1010
|
||||
BuildRequires: fdupes
|
||||
%endif
|
||||
|
||||
Requires(pre): %{_sbindir}/groupadd
|
||||
Requires(pre): %{_sbindir}/useradd
|
||||
|
||||
%if 0%{?suse_version}
|
||||
Requires(pre): %fillup_prereq
|
||||
Requires(pre): pwdutils
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version}
|
||||
Requires(pre): dbus-1
|
||||
%else
|
||||
Requires(pre): dbus
|
||||
%endif
|
||||
|
||||
Requires: logrotate
|
||||
Requires: python
|
||||
#
|
||||
@@ -414,6 +459,20 @@ Zsh command line completion support for %{name}.
|
||||
|
||||
%endif
|
||||
|
||||
%if 0%{?suse_version}
|
||||
%package susemanager
|
||||
Summary: SUSE Manager Integration
|
||||
Group: System/Management
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
%if 0%{?suse_version} > 1110
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description susemanager
|
||||
SUSE Manager Integration for various tools on the system.
|
||||
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q -n salt-%{version}
|
||||
cp %{S:1} .
|
||||
@@ -427,18 +486,33 @@ cp %{S:1} .
|
||||
# This is SUSE-only patch
|
||||
%if 0%{?suse_version}
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%endif
|
||||
|
||||
%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
|
||||
|
||||
%build
|
||||
python setup.py --salt-transport=both build
|
||||
|
||||
%if %{with docs}
|
||||
%if %{with docs} && %{without builddocs}
|
||||
# extract docs from the tarball
|
||||
mkdir -p doc/_build
|
||||
pushd doc/_build/
|
||||
tar xfv %{S:3}
|
||||
popd
|
||||
%endif
|
||||
|
||||
%if %{with docs} && %{with builddocs}
|
||||
## documentation
|
||||
cd doc && make html && rm _build/html/.buildinfo && rm _build/html/_images/proxy_minions.png && cd _build/html && chmod -R -x+X *
|
||||
%endif
|
||||
@@ -546,6 +620,11 @@ install -Dpm 0644 pkg/fish-completions/* %{buildroot}%{fish_completions_dir}
|
||||
echo "transport: raet" > %{buildroot}%{_sysconfdir}/salt/master.d/transport-raet.conf
|
||||
echo "transport: raet" > %{buildroot}%{_sysconfdir}/salt/minion.d/transport-raet.conf
|
||||
|
||||
%if 0%{?suse_version} > 1020
|
||||
%fdupes %{buildroot}%{_docdir}
|
||||
%fdupes %{buildroot}%{python_sitelib}
|
||||
%endif
|
||||
|
||||
%check
|
||||
%if %{with test}
|
||||
python setup.py test --runtests-opts=-u
|
||||
@@ -555,9 +634,50 @@ python setup.py test --runtests-opts=-u
|
||||
getent group salt >/dev/null || %{_sbindir}/groupadd -r salt
|
||||
getent passwd salt >/dev/null || %{_sbindir}/useradd -r -g salt -d /srv/salt -s /bin/false -c "salt-master daemon" salt
|
||||
|
||||
%if %{with systemd}
|
||||
%post
|
||||
%if %{with systemd}
|
||||
systemd-tmpfiles --create /usr/lib/tmpfiles.d/salt.conf || true
|
||||
%else
|
||||
dbus-uuidgen --ensure
|
||||
%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
|
||||
@@ -781,13 +901,9 @@ 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
|
||||
%{_sbindir}/rcsalt-minion
|
||||
|
||||
# Install plugin only on SUSE machines
|
||||
%if 0%{?suse_version}
|
||||
%{_prefix}/lib/zypp/plugins/commit/susemanager
|
||||
%endif
|
||||
|
||||
%if %{with systemd}
|
||||
%{_unitdir}/salt-minion.service
|
||||
%else
|
||||
@@ -840,6 +956,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/
|
||||
|
||||
%files raet
|
||||
%defattr(-,root,root,-)
|
||||
@@ -853,17 +970,19 @@ fi
|
||||
%{_bindir}/salt-unity
|
||||
%{_mandir}/man1/salt-unity.1.gz
|
||||
%{_mandir}/man1/salt-call.1.gz
|
||||
%{_mandir}/man1/spm.1.gz
|
||||
%config(noreplace) %{_sysconfdir}/logrotate.d/salt
|
||||
%{python_sitelib}/*
|
||||
%exclude %{python_sitelib}/salt/cloud/deploy/*.sh
|
||||
%attr(755,root,root)%{python_sitelib}/salt/cloud/deploy/*.sh
|
||||
%doc LICENSE AUTHORS README.rst HACKING.rst README.SUSE
|
||||
#
|
||||
%dir %attr(0750, root, salt) %{_sysconfdir}/salt
|
||||
%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 %attr(0750, root, salt) /srv/spm
|
||||
%dir %attr(0750, root, salt) %{_sysconfdir}/salt
|
||||
%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 %attr(0750, root, salt) /srv/spm
|
||||
%if %{with systemd}
|
||||
/usr/lib/tmpfiles.d/salt.conf
|
||||
%endif
|
||||
@@ -896,4 +1015,11 @@ fi
|
||||
%dir %{fish_dir}
|
||||
%endif
|
||||
|
||||
# Install plugin only on SUSE machines
|
||||
%if 0%{?suse_version}
|
||||
%files susemanager
|
||||
%defattr(-,root,root)
|
||||
%{_prefix}/lib/zypp/plugins/commit/susemanager
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user