RC0 for point release Salt 2019.2.1 with Tornado 5.x support

e9
David Murphy 5 years ago
parent c258953dcb
commit c73f00aee8

1
.gitignore vendored

@ -82,3 +82,4 @@
/salt-2018.3.2.tar.gz /salt-2018.3.2.tar.gz
/salt-2018.3.3.tar.gz /salt-2018.3.3.tar.gz
/salt-2019.2.0.tar.gz /salt-2019.2.0.tar.gz
/salt-2019.2.1rc0.tar.gz

@ -13,17 +13,17 @@
_salt_get_grains(){ _salt_get_grains(){
if [ "$1" = 'local' ] ; then if [ "$1" = 'local' ] ; then
salt-call --out=txt -- grains.ls | sed 's/^.*\[//' | tr -d ",']" |sed 's:\([a-z0-9]\) :\1\: :g' salt-call --log-level=error --out=txt -- grains.ls | sed 's/^.*\[//' | tr -d ",']" |sed 's:\([a-z0-9]\) :\1\: :g'
else else
salt '*' --timeout 2 --hide-timeout --out=txt -- grains.ls | sed 's/^.*\[//' | tr -d ",']" |sed 's:\([a-z0-9]\) :\1\: :g' salt '*' --timeout 2 --hide-timeout --log-level=error --out=txt -- grains.ls | sed 's/^.*\[//' | tr -d ",']" |sed 's:\([a-z0-9]\) :\1\: :g'
fi fi
} }
_salt_get_grain_values(){ _salt_get_grain_values(){
if [ "$1" = 'local' ] ; then if [ "$1" = 'local' ] ; then
salt-call --out=txt -- grains.item $1 |sed 's/^\S*:\s//' |grep -v '^\s*$' salt-call --log-level=error --out=txt -- grains.item $1 |sed 's/^\S*:\s//' |grep -v '^\s*$'
else else
salt '*' --timeout 2 --hide-timeout --out=txt -- grains.item $1 |sed 's/^\S*:\s//' |grep -v '^\s*$' salt '*' --timeout 2 --hide-timeout --log-level=error --out=txt -- grains.item $1 |sed 's/^\S*:\s//' |grep -v '^\s*$'
fi fi
} }
@ -34,8 +34,24 @@ _salt_get_keys(){
done done
} }
_salt(){ _salt_list_functions(){
CACHE_DIR="$HOME/.cache/salt-comp-cache_functions" # salt-call: get all functions on this minion
# salt: get all functions on all minions
# sed: remove all array overhead and convert to newline separated list
# sort: chop out doubled entries, so overhead is minimal later during actual completion
if [ "$1" = 'local' ] ; then
salt-call --log-level=quiet --out=txt -- sys.list_functions \
| sed "s/^.*\[//;s/[],']//g;s/ /\n/g" \
| sort -u
else
salt '*' --timeout 2 --hide-timeout --log-level=quiet --out=txt -- sys.list_functions \
| sed "s/^.*\[//;s/[],']//g;s/ /\n/g" \
| sort -u
fi
}
_salt_get_coms() {
CACHE_DIR="$HOME/.cache/salt-${1}-comp-cache_functions"
local _salt_cache_functions=${SALT_COMP_CACHE_FUNCTIONS:=$CACHE_DIR} local _salt_cache_functions=${SALT_COMP_CACHE_FUNCTIONS:=$CACHE_DIR}
local _salt_cache_timeout=${SALT_COMP_CACHE_TIMEOUT:='last hour'} local _salt_cache_timeout=${SALT_COMP_CACHE_TIMEOUT:='last hour'}
@ -43,6 +59,17 @@ _salt(){
mkdir -p "$(dirname ${_salt_cache_functions})" mkdir -p "$(dirname ${_salt_cache_functions})"
fi fi
# Regenerate cache if timed out
if [[ "$(stat --format=%Z ${_salt_cache_functions} 2>/dev/null)" -lt "$(date --date="${_salt_cache_timeout}" +%s)" ]]; then
_salt_list_functions $1 > "${_salt_cache_functions}"
fi
# filter results, to only print the part to next dot (or end of function)
sed 's/^\('${cur}'\(\.\|[^.]*\)\)\?.*/\1/' "${_salt_cache_functions}" | sort -u
}
_salt(){
local cur prev opts _salt_grains _salt_coms pprev ppprev local cur prev opts _salt_grains _salt_coms pprev ppprev
COMPREPLY=() COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}" cur="${COMP_WORDS[COMP_CWORD]}"
@ -129,22 +156,10 @@ _salt(){
;; ;;
esac esac
# Regenerate cache if timed out _salt_coms=$(_salt_get_coms remote)
if [[ "$(stat --format=%Z ${_salt_cache_functions} 2>/dev/null)" -lt "$(date --date="${_salt_cache_timeout}" +%s)" ]]; then
# salt: get all functions on all minions
# sed: remove all array overhead and convert to newline separated list
# sort: chop out doubled entries, so overhead is minimal later during actual completion
salt '*' --timeout 2 --hide-timeout --out=txt -- sys.list_functions \
| sed "s/^.*\[//;s/[],']//g;s/ /\n/g" \
| sort -u \
> "${_salt_cache_functions}"
fi
# filter results, to only print the part to next dot (or end of function)
_salt_coms="$(sed 's/^\('${cur}'\(\.\|[^.]*\)\)\?.*/\1/' "${_salt_cache_functions}" | sort -u)"
# If there are still dots in the suggestion, do not append space # If there are still dots in the suggestion, do not append space
grep "^${cur}.*\." "${_salt_cache_functions}" &>/dev/null && compopt -o nospace grep "^${cur}.*\." "${_salt_coms}" &>/dev/null && compopt -o nospace
all="${opts} ${_salt_coms}" all="${opts} ${_salt_coms}"
COMPREPLY=( $(compgen -W "${all}" -- ${cur}) ) COMPREPLY=( $(compgen -W "${all}" -- ${cur}) )
@ -276,7 +291,11 @@ _saltcall(){
;; ;;
esac esac
_salt_coms="$(salt-call --out=txt -- sys.list_functions|sed 's/^.*\[//' | tr -d ",']" )" _salt_coms=$(_salt_get_coms local)
# If there are still dots in the suggestion, do not append space
grep "^${cur}.*\." "${_salt_coms}" &>/dev/null && compopt -o nospace
COMPREPLY=( $(compgen -W "${opts} ${_salt_coms}" -- ${cur} )) COMPREPLY=( $(compgen -W "${opts} ${_salt_coms}" -- ${cur} ))
return 0 return 0
} }

@ -1,18 +1,19 @@
%global pybasever 2.7
%global __python2 %{_bindir}/python%{?pybasever}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")} %bcond_with tests
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %bcond_with docs
%{!?pythonpath: %global pythonpath %(%{__python2} -c "import os, sys; print(os.pathsep.join(x for x in sys.path if x))")}
%{!?python3_pkgversion:%global python3_pkgversion 3}
%global include_tests 0 %global include_tests 0
# Release Candidate
%define __rc_ver rc0
%define fish_dir %{_datadir}/fish/vendor_functions.d %define fish_dir %{_datadir}/fish/vendor_functions.d
Name: salt Name: salt
Version: 2019.2.0 Version: 2019.2.1%{?__rc_ver}
Release: 2%{?dist} Release: 1%{?dist}
Summary: A parallel remote execution system Summary: A parallel remote execution system
License: ASL 2.0 License: ASL 2.0
@ -54,55 +55,37 @@ Requires: which
Requires: dnf-utils Requires: dnf-utils
%if ((0%{?fedora} >= 28) && 0%{?include_tests})
BuildRequires: python2-tornado >= 4.2.1
BuildRequires: python2-futures >= 2.0
BuildRequires: python2-crypto >= 2.6.1
BuildRequires: python2-jinja2
BuildRequires: python2-msgpack >= 0.4
BuildRequires: python2-pip
BuildRequires: python2-zmq >= 14.5
BuildRequires: python2-pyyaml
BuildRequires: python2-requests
## BuildRequires: python2-unittest2
# this BR causes windows tests to happen
# clearly, that's not desired
# https://github.com/saltstack/salt/issues/3749
BuildRequires: python2-mock
BuildRequires: git
BuildRequires: python2-libcloud
BuildRequires: python2-six
%endif ## (0%%{?fedora} >= 28) && 0%%{?include_tests})
BuildRequires: python2-devel
Requires: python2-jinja2
Requires: python2-msgpack >= 0.4
Requires: python2-crypto >= 2.6.1
Requires: python2-pyyaml
Requires: python2-requests >= 1.0.0
Requires: python2-zmq
Requires: python2-markupsafe
Requires: python2-tornado >= 4.2.1, python2-tornado < 6.0
Requires: python2-futures >= 2.0
Requires: python2-six
Requires: python2-psutil
%if 0%{?systemd_preun:1} %if 0%{?systemd_preun:1}
Requires(post): systemd-units Requires(post): systemd-units
Requires(preun): systemd-units Requires(preun): systemd-units
Requires(postun): systemd-units Requires(postun): systemd-units
%endif %endif
BuildRequires: systemd-units BuildRequires: systemd-units
Requires: systemd-python Requires: python%{python3_pkgversion}-systemd
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-requests
BuildRequires: python%{python3_pkgversion}-mock
BuildRequires: python%{python3_pkgversion}-libcloud
BuildRequires: python%{python3_pkgversion}-six
BuildRequires: python%{python3_pkgversion}-pyyaml
BuildRequires: git
Requires: python%{python3_pkgversion}-jinja2
Requires: python%{python3_pkgversion}-msgpack >= 0.4
## Requires: python%%{python3_pkgversion}-crypto >= 2.6.1
Requires: python%{python3_pkgversion}-m2crypto >= 0.31.0
Requires: python%{python3_pkgversion}-requests
Requires: python%{python3_pkgversion}-zmq
Requires: python%{python3_pkgversion}-markupsafe
Requires: python%{python3_pkgversion}-tornado4 >= 4.2.1
Requires: python%{python3_pkgversion}-six
Requires: python%{python3_pkgversion}-psutil
Requires: python%{python3_pkgversion}-pyyaml
%description %description
@ -115,53 +98,71 @@ servers, handle them quickly and through a simple and manageable interface.
%package master %package master
Summary: Management component for salt, a parallel remote execution system Summary: Management component for salt, a parallel remote execution system
Group: System Environment/Daemons
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
Requires: systemd-python Requires: python%{python3_pkgversion}-systemd
%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.
Supports Python 3.
%package minion %package minion
Summary: Client component for Salt, a parallel remote execution system Summary: Client component for Salt, a parallel remote execution system
Group: System Environment/Daemons
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description minion %description minion
The Salt minion is the agent component of Salt. It listens for instructions The Salt minion is the agent component of Salt. It listens for instructions
from the master, runs jobs, and returns results back to the master. from the master, runs jobs, and returns results back to the master.
Supports Python 3.
%package syndic %package syndic
Summary: Master-of-master component for Salt, a parallel remote execution system Summary: Master-of-master component for Salt, a parallel remote execution system
Group: System Environment/Daemons
Requires: %{name}-master = %{version}-%{release} Requires: %{name}-master = %{version}-%{release}
%description syndic %description syndic
The Salt syndic is a master daemon which can receive instruction from a The Salt syndic is a master daemon which can receive instruction from a
higher-level master, allowing for tiered organization of your Salt higher-level master, allowing for tiered organization of your Salt
infrastructure. infrastructure.
Supports Python 3.
%package api %package api
Summary: REST API for Salt, a parallel remote execution system Summary: REST API for Salt, a parallel remote execution system
Group: Applications/System
Requires: %{name}-master = %{version}-%{release} Requires: %{name}-master = %{version}-%{release}
Requires: python2-cherrypy >= 3.2.2, python2-cherrypy < 18.0.0 Requires: python%{python3_pkgversion}-cherrypy >= 3.2.2
%description api %description api
salt-api provides a REST interface to the Salt master. salt-api provides a REST interface to the Salt master.
Supports Python 3.
%package cloud %package cloud
Summary: Cloud provisioner for Salt, a parallel remote execution system Summary: Cloud provisioner for Salt, a parallel remote execution system
Group: Applications/System
Requires: %{name}-master = %{version}-%{release} Requires: %{name}-master = %{version}-%{release}
Requires: python2-libcloud Requires: python%{python3_pkgversion}-libcloud
%description cloud %description cloud
The salt-cloud tool provisions new cloud VMs, installs salt-minion on them, and The salt-cloud tool provisions new cloud VMs, installs salt-minion on them, and
adds them to the master's collection of controllable minions. adds them to the master's collection of controllable minions.
Supports Python 3.
%package ssh %package ssh
Summary: Agentless SSH-based version of Salt, a parallel remote execution system Summary: Agentless SSH-based version of Salt, a parallel remote execution system
Group: Applications/System
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}-%{release}
%description ssh %description ssh
The salt-ssh tool can run remote execution functions and states without the use The salt-ssh tool can run remote execution functions and states without the use
of an agent (salt-minion) service. of an agent (salt-minion) service.
Supports Python 3.
%prep %prep
%setup -q -c %setup -q -c
@ -170,13 +171,24 @@ of an agent (salt-minion) service.
cd %{name}-%{version} cd %{name}-%{version}
## %%patch0 -p1 ## %%patch0 -p1
rm -rf %{py3dir}
cp -a . %{py3dir}
%build %build
pushd %{py3dir}
%py3_build
popd
%install %install
rm -rf %{buildroot} rm -rf %{buildroot}
cd $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version} cd $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}
%{__python2} setup.py install -O1 %{?__inst_layout } --root %{buildroot}
## rm -rf %%{buildroot}
pushd %{py3dir}
%py3_install
# Add some directories # Add some directories
install -d -m 0755 %{buildroot}%{_var}/log/salt install -d -m 0755 %{buildroot}%{_var}/log/salt
@ -189,17 +201,17 @@ install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/minion.d
install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/pki install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/pki
install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/pki/master install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/pki/master
install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/pki/minion install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/pki/minion
install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/cloud.conf.d install -d -m 0700 %{buildroot}%{_sysconfdir}/salt/cloud.conf.d
install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/cloud.deploy.d install -d -m 0700 %{buildroot}%{_sysconfdir}/salt/cloud.deploy.d
install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/cloud.maps.d install -d -m 0700 %{buildroot}%{_sysconfdir}/salt/cloud.maps.d
install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/cloud.profiles.d install -d -m 0700 %{buildroot}%{_sysconfdir}/salt/cloud.profiles.d
install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/cloud.providers.d install -d -m 0700 %{buildroot}%{_sysconfdir}/salt/cloud.providers.d
install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/proxy.d install -d -m 0755 %{buildroot}%{_sysconfdir}/salt/proxy.d
# Add the config files # Add the config files
install -p -m 0640 conf/minion %{buildroot}%{_sysconfdir}/salt/minion install -p -m 0640 conf/minion %{buildroot}%{_sysconfdir}/salt/minion
install -p -m 0640 conf/master %{buildroot}%{_sysconfdir}/salt/master install -p -m 0640 conf/master %{buildroot}%{_sysconfdir}/salt/master
install -p -m 0640 conf/cloud %{buildroot}%{_sysconfdir}/salt/cloud install -p -m 0600 conf/cloud %{buildroot}%{_sysconfdir}/salt/cloud
install -p -m 0640 conf/roster %{buildroot}%{_sysconfdir}/salt/roster install -p -m 0640 conf/roster %{buildroot}%{_sysconfdir}/salt/roster
install -p -m 0640 conf/proxy %{buildroot}%{_sysconfdir}/salt/proxy install -p -m 0640 conf/proxy %{buildroot}%{_sysconfdir}/salt/proxy
@ -232,32 +244,35 @@ install -p -m 0644 %{SOURCE19} %{buildroot}%{fish_dir}/salt-minion.fish
install -p -m 0644 %{SOURCE20} %{buildroot}%{fish_dir}/salt-run.fish install -p -m 0644 %{SOURCE20} %{buildroot}%{fish_dir}/salt-run.fish
install -p -m 0644 %{SOURCE21} %{buildroot}%{fish_dir}/salt-syndic.fish install -p -m 0644 %{SOURCE21} %{buildroot}%{fish_dir}/salt-syndic.fish
%if ((0%{?fedora} >= 28) && 0%{?include_tests}) popd
%check
cd $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}
mkdir %{_tmppath}/salt-test-cache
PYTHONPATH=%{pythonpath} %{__python2} setup.py test --runtests-opts=-u
%endif
%files
%doc $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/LICENSE
%{python2_sitelib}/%{name}/*
#%%{python2_sitelib}/%%{name}-%%{version}-py?.?.egg-info
%{python2_sitelib}/%{name}-*-py?.?.egg-info %clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%{python3_sitelib}/%{name}/*
%{python3_sitelib}/%{name}-*-py?.?.egg-info
%{_sysconfdir}/logrotate.d/salt %{_sysconfdir}/logrotate.d/salt
%{_sysconfdir}/bash_completion.d/salt.bash %{_sysconfdir}/bash_completion.d/salt.bash
%{_var}/cache/salt %{_var}/cache/salt
%{_var}/log/salt %{_var}/log/salt
%doc $RPM_BUILD_DIR/%{name}-%{version}/%{name}-%{version}/README.fedora
%{_bindir}/spm ## %%doc $RPM_BUILD_DIR/%%{name}-%%{version}/%%{name}-%%{version}/LICENSE
## %%doc $RPM_BUILD_DIR/%%{name}-%%{version}/%%{name}-%%{version}/README.fedora
%doc $RPM_BUILD_DIR/python3-%{name}-%{version}-%{release}/LICENSE
%doc $RPM_BUILD_DIR/python3-%{name}-%{version}-%{release}/README.fedora
/%{_bindir}/spm
%doc %{_mandir}/man1/spm.1* %doc %{_mandir}/man1/spm.1*
%config(noreplace) %{_sysconfdir}/salt/ %config(noreplace) %{_sysconfdir}/salt/
%config(noreplace) %{_sysconfdir}/salt/pki %config(noreplace) %{_sysconfdir}/salt/pki
%config(noreplace) %{fish_dir}/salt*.fish %config(noreplace) %{fish_dir}/salt*.fish
%files master %files master
%defattr(-,root,root)
%doc %{_mandir}/man7/salt.7* %doc %{_mandir}/man7/salt.7*
%doc %{_mandir}/man1/salt.1* %doc %{_mandir}/man1/salt.1*
%doc %{_mandir}/man1/salt-cp.1* %doc %{_mandir}/man1/salt-cp.1*
@ -277,6 +292,7 @@ PYTHONPATH=%{pythonpath} %{__python2} setup.py test --runtests-opts=-u
%config(noreplace) %{_sysconfdir}/salt/pki/master %config(noreplace) %{_sysconfdir}/salt/pki/master
%files minion %files minion
%defattr(-,root,root)
%doc %{_mandir}/man1/salt-call.1* %doc %{_mandir}/man1/salt-call.1*
%doc %{_mandir}/man1/salt-minion.1* %doc %{_mandir}/man1/salt-minion.1*
%doc %{_mandir}/man1/salt-proxy.1* %doc %{_mandir}/man1/salt-proxy.1*
@ -296,6 +312,7 @@ PYTHONPATH=%{pythonpath} %{__python2} setup.py test --runtests-opts=-u
%{_unitdir}/salt-syndic.service %{_unitdir}/salt-syndic.service
%files api %files api
%defattr(-,root,root)
%doc %{_mandir}/man1/salt-api.1* %doc %{_mandir}/man1/salt-api.1*
%{_bindir}/salt-api %{_bindir}/salt-api
%{_unitdir}/salt-api.service %{_unitdir}/salt-api.service
@ -438,6 +455,9 @@ PYTHONPATH=%{pythonpath} %{__python2} setup.py test --runtests-opts=-u
%changelog %changelog
* Thu Aug 29 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2019.2.1rc0-1
- Release Candidate 0 for feature release 2019.2.1 for Python 3 with Tornado v5.x support
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2019.2.0-2 * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2019.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

@ -75,7 +75,7 @@ set -l salt_programs_select salt salt-cp
for program in $salt_programs_select for program in $salt_programs_select
complete -c $program -f -s G -l grain -d "Instead of using shell globs to evaluate the target use a grain value to identify targets, the syntax for the target is the grain key followed by a globexpression: \"os:Arch*\"" complete -c $program -f -s G -l grain -d "Instead of using shell globs to evaluate the target use a grain value to identify targets, the syntax for the target is the grain key followed by a globexpression: \"os:Arch*\""
complete -c $program -f -l grain-pcre -d "Instead of using shell globs to evaluate the target use a grain value to identify targets, the syntax for the target is the grain key followed by a pcre regular expression: \"os:Arch.*\"" complete -c $program -f -l grain-pcre -d "Instead of using shell globs to evaluate the target use a grain value to identify targets, the syntax for the target is the grain key followed by a pcre regular expression: \"os:Arch.*\""
complete -c $program -f -s L -l list -d "Instead of using shell globs to evaluate the target servers, take a comma or space delimited list of servers." complete -c $program -f -s L -l list -d "Instead of using shell globs to evaluate the target servers, take a comma or whitespace delimited list of servers."
complete -c $program -f -s N -l nodegroup -d "Instead of using shell globs to evaluate the target use one of the predefined nodegroups to identify a list of targets." complete -c $program -f -s N -l nodegroup -d "Instead of using shell globs to evaluate the target use one of the predefined nodegroups to identify a list of targets."
complete -c $program -f -s E -l pcre -d "Instead of using shell globs to evaluate the target servers, use pcre regular expressions" complete -c $program -f -s E -l pcre -d "Instead of using shell globs to evaluate the target servers, use pcre regular expressions"
complete -c $program -f -s R -l range -d "Instead of using shell globs to evaluate the target use a range expression to identify targets. Range expressions look like %cluster" complete -c $program -f -s R -l range -d "Instead of using shell globs to evaluate the target use a range expression to identify targets. Range expressions look like %cluster"

@ -1 +1 @@
SHA512 (salt-2019.2.0.tar.gz) = de5a976213d011c230e423a172952effddb87168367958b8657eaaaf8fd2a8bec8471f547b6ff9e896a17064a13d387dbc12e12c605c8a241062e3238bd19eca SHA512 (salt-2019.2.1rc0.tar.gz) = 541071683d4878b86ac61a912396732cb24d8886e98e66c980e4a06af4262df68a5822f6f6a766e309bd43de6e824a2952a57198cf97a9c9818b08fca97a6072

Loading…
Cancel
Save