Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-admin/salt/files/, app-admin/salt/
Date: Wed, 29 Apr 2020 20:36:43
Message-Id: 1588192585.e190974babbaea1d7adec18f556f5828896800c3.chutzpah@gentoo
1 commit: e190974babbaea1d7adec18f556f5828896800c3
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Wed Apr 29 20:36:25 2020 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 29 20:36:25 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e190974b
7
8 app-admin/salt-3000.2: Version bump
9
10 Copyright: Sony Interactive Entertainment Inc.
11 Package-Manager: Portage-2.3.99, Repoman-2.3.22
12 Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org>
13
14 app-admin/salt/Manifest | 1 +
15 app-admin/salt/files/salt-3000.1-tests.patch | 58 +++++++++
16 app-admin/salt/metadata.xml | 2 +
17 app-admin/salt/salt-3000.2.ebuild | 173 +++++++++++++++++++++++++++
18 4 files changed, 234 insertions(+)
19
20 diff --git a/app-admin/salt/Manifest b/app-admin/salt/Manifest
21 index f5cc57ada94..1e5653bb58c 100644
22 --- a/app-admin/salt/Manifest
23 +++ b/app-admin/salt/Manifest
24 @@ -1,2 +1,3 @@
25 DIST salt-2018.3.4.tar.gz 14404085 BLAKE2B 932b30b1ba60aefd3a6874a8ebe4cb6c469d82e31f6acdbe8a5641d09e3316796b5403ef803a355cec6255c1aede8bac3b66af179bd1bbaa5418c7076229cef9 SHA512 f17e06fdbf4741f231d9e769be57de4f6079e9283881b4bafa0d23928d7626a1f9c02b9f49c654b29c3e6ee8ed3d3ddf42c21baecef158ad63a97dc87895b21b
26 DIST salt-2019.2.4.tar.gz 14572556 BLAKE2B a1057baa5ab6c0a07f34ce658a1d5bc644f968600663d28d084eb712b55faaee93b8410d81c4b5324944e6e1f2067ffb102200088832e1b0076fed78c8542ae6 SHA512 9e621cbd78ead1060a2b0c07e7ef02e8c4590360a95c51ac29fa8c1add34f617e4407dd28b67cae3b0fd68b333782185edcf1159edd2db08e8b4e79b6b07a63f
27 +DIST salt-3000.2.tar.gz 15231513 BLAKE2B 2090d0f52f953a42f1685ad190750e9c76ad6e862a3272444fef063a7605f69a6c542f04165a41fb9cdaa126a878cc133d4857faa70edc5eac4bf49bdde937ab SHA512 88e8876ed8cd18e942c2194686cda68f40fa49e69e317ca488bf58e095bcf6cdf8771d93eba7960038941cc5863e13a4eea4dad5256c12da7cd8288a2c61f59d
28
29 diff --git a/app-admin/salt/files/salt-3000.1-tests.patch b/app-admin/salt/files/salt-3000.1-tests.patch
30 new file mode 100644
31 index 00000000000..12a2e7822b9
32 --- /dev/null
33 +++ b/app-admin/salt/files/salt-3000.1-tests.patch
34 @@ -0,0 +1,58 @@
35 +diff --git a/tests/unit/fileserver/test_roots.py b/tests/unit/fileserver/test_roots.py
36 +index e0d939a086..33a9b6dc35 100644
37 +--- a/tests/unit/fileserver/test_roots.py
38 ++++ b/tests/unit/fileserver/test_roots.py
39 +@@ -11,7 +11,7 @@ import tempfile
40 +
41 + # Import Salt Testing libs
42 + from tests.support.mixins import AdaptedConfigurationTestCaseMixin, LoaderModuleMockMixin
43 +-from tests.support.unit import TestCase
44 ++from tests.support.unit import TestCase, skipIf
45 + from tests.support.mock import patch
46 + from tests.support.runtests import RUNTIME_VARS
47 +
48 +@@ -165,6 +165,7 @@ class RootsTest(TestCase, AdaptedConfigurationTestCaseMixin, LoaderModuleMockMix
49 + self.assertIn('empty_dir', ret)
50 + self.assertIn(UNICODE_DIRNAME, ret)
51 +
52 ++ @skipIf(True, "doesn't like sandbox")
53 + def test_symlink_list(self):
54 + orig_file_roots = self.opts['file_roots']
55 + try:
56 +diff --git a/tests/unit/modules/test_dockermod.py b/tests/unit/modules/test_dockermod.py
57 +index 191bfc123f..1956127f0b 100644
58 +--- a/tests/unit/modules/test_dockermod.py
59 ++++ b/tests/unit/modules/test_dockermod.py
60 +@@ -793,6 +793,7 @@ class DockerTestCase(TestCase, LoaderModuleMockMixin):
61 + },
62 + ret)
63 +
64 ++ @skipIf(True, "Doesn't work with sandbox")
65 + def test_call_success(self):
66 + '''
67 + test module calling inside containers
68 +diff --git a/tests/unit/states/test_pip_state.py b/tests/unit/states/test_pip_state.py
69 +index 13c158b309..27e10e6161 100644
70 +--- a/tests/unit/states/test_pip_state.py
71 ++++ b/tests/unit/states/test_pip_state.py
72 +@@ -384,6 +384,7 @@ class PipStateUtilsTest(TestCase):
73 +
74 +
75 + @skipIf(salt.utils.path.which_bin(KNOWN_BINARY_NAMES) is None, 'virtualenv not installed')
76 ++@skipIf(True, "Needs network access")
77 + class PipStateInstallationErrorTest(TestCase):
78 +
79 + def test_importable_installation_error(self):
80 +diff --git a/tests/unit/utils/test_jinja.py b/tests/unit/utils/test_jinja.py
81 +index f48fa9d42c..bb57929cfa 100644
82 +--- a/tests/unit/utils/test_jinja.py
83 ++++ b/tests/unit/utils/test_jinja.py
84 +@@ -1268,7 +1268,7 @@ class TestCustomExtensions(TestCase):
85 + dict(opts=self.local_opts, saltenv='test', salt=self.local_salt))
86 + self.assertEqual(rendered, '16777216')
87 +
88 +- @flaky
89 ++ @skipIf("True", "Needs network access")
90 + def test_http_query(self):
91 + '''
92 + Test the `http_query` Jinja filter.
93
94 diff --git a/app-admin/salt/metadata.xml b/app-admin/salt/metadata.xml
95 index e27805465b7..91b46884899 100644
96 --- a/app-admin/salt/metadata.xml
97 +++ b/app-admin/salt/metadata.xml
98 @@ -21,9 +21,11 @@ Between the remote execution system, and state management Salt addresses the
99 backbone of cloud and data center management.
100 </longdescription>
101 <use>
102 + <flag name="cheetah">Enable support for <pkg>dev-python/cheetah3</pkg></flag>
103 <flag name="cherrypy">Enable support for using cherrypy.</flag>
104 <flag name="libcloud">Enable salt-cloud support via libcloud.</flag>
105 <flag name="libvirt">Support managing virtual machines with app-emulation/libvirt.</flag>
106 + <flag name="genshi">Enable support for <pkg>dev-python/genshi</pkg></flag>
107 <flag name="gnupg">Enable support for gnupg via python-gnupg.</flag>
108 <flag name="keyring">Enable support for keyrings via python-keyring.</flag>
109 <flag name="mako">Add support for using the mako template engine for parsing salt states.</flag>
110
111 diff --git a/app-admin/salt/salt-3000.2.ebuild b/app-admin/salt/salt-3000.2.ebuild
112 new file mode 100644
113 index 00000000000..376575e7ccf
114 --- /dev/null
115 +++ b/app-admin/salt/salt-3000.2.ebuild
116 @@ -0,0 +1,173 @@
117 +# Copyright 1999-2020 Gentoo Authors
118 +# Distributed under the terms of the GNU General Public License v2
119 +
120 +EAPI=7
121 +PYTHON_COMPAT=( python3_7 )
122 +DISTUTILS_USE_SETUPTOOLS=bdepend
123 +inherit systemd distutils-r1
124 +
125 +DESCRIPTION="Salt is a remote execution and configuration manager"
126 +HOMEPAGE="https://www.saltstack.com/resources/community/
127 + https://github.com/saltstack"
128 +
129 +if [[ ${PV} == 9999* ]]; then
130 + inherit git-r3
131 + EGIT_REPO_URI="git://github.com/${PN}stack/${PN}.git"
132 + EGIT_BRANCH="develop"
133 + SRC_URI=""
134 + KEYWORDS=""
135 +else
136 + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
137 + KEYWORDS="~amd64 ~x86"
138 +fi
139 +
140 +LICENSE="Apache-2.0"
141 +SLOT="0"
142 +IUSE="cheetah cherrypy ldap libcloud libvirt genshi gnupg keyring mako
143 + mongodb neutron nova openssl portage profile redis selinux test raet
144 + +zeromq vim-syntax"
145 +
146 +RDEPEND="
147 + sys-apps/pciutils
148 + dev-python/jinja[${PYTHON_USEDEP}]
149 + dev-python/libnacl[${PYTHON_USEDEP}]
150 + >=dev-python/msgpack-0.5[${PYTHON_USEDEP}]
151 + <dev-python/msgpack-1.0[${PYTHON_USEDEP}]
152 + dev-python/pycryptodome[${PYTHON_USEDEP}]
153 + dev-python/pyyaml[${PYTHON_USEDEP}]
154 + dev-python/markupsafe[${PYTHON_USEDEP}]
155 + >=dev-python/requests-1.0.0[${PYTHON_USEDEP}]
156 + dev-python/setuptools[${PYTHON_USEDEP}]
157 + libcloud? ( >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] )
158 + mako? ( dev-python/mako[${PYTHON_USEDEP}] )
159 + ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] )
160 + libvirt? (
161 + $(python_gen_cond_dep 'dev-python/libvirt-python[${PYTHON_USEDEP}]' python3_7)
162 + )
163 + openssl? (
164 + dev-libs/openssl:0=[-bindist]
165 + dev-python/pyopenssl[${PYTHON_USEDEP}]
166 + )
167 + raet? (
168 + >=dev-python/libnacl-1.0.0[${PYTHON_USEDEP}]
169 + >=dev-python/ioflo-1.1.7[${PYTHON_USEDEP}]
170 + >=dev-python/raet-0.6.0[${PYTHON_USEDEP}]
171 + )
172 + cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] )
173 + cheetah? ( dev-python/cheetah3[${PYTHON_USEDEP}] )
174 + mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] )
175 + portage? ( sys-apps/portage[${PYTHON_USEDEP}] )
176 + keyring? ( dev-python/keyring[${PYTHON_USEDEP}] )
177 + redis? ( dev-python/redis-py[${PYTHON_USEDEP}] )
178 + selinux? ( sec-policy/selinux-salt )
179 + nova? (
180 + $(python_gen_cond_dep '>=dev-python/python-novaclient-2.17.0[${PYTHON_USEDEP}]' python3_7)
181 + )
182 + neutron? (
183 + $(python_gen_cond_dep '>=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}]' python3_7)
184 + )
185 + gnupg? ( dev-python/python-gnupg[${PYTHON_USEDEP}] )
186 + profile? ( dev-python/yappi[${PYTHON_USEDEP}] )
187 + vim-syntax? ( app-vim/salt-vim )
188 + zeromq? ( >=dev-python/pyzmq-2.2.0[${PYTHON_USEDEP}] )
189 +"
190 +BDEPEND="
191 + test? (
192 + ${RDEPEND}
193 + >=dev-python/boto-2.32.1[${PYTHON_USEDEP}]
194 + >=dev-python/jsonschema-3.0[${PYTHON_USEDEP}]
195 + >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}]
196 + >=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
197 + >=dev-python/moto-0.3.6[${PYTHON_USEDEP}]
198 + dev-python/pip[${PYTHON_USEDEP}]
199 + dev-python/psutil[${PYTHON_USEDEP}]
200 + dev-python/pytest[${PYTHON_USEDEP}]
201 + dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}]
202 + dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}]
203 + >=dev-python/pytest-salt-2018.12.8[${PYTHON_USEDEP}]
204 + dev-python/pytest-tempdir[${PYTHON_USEDEP}]
205 + >=dev-python/SaltTesting-2016.5.11[${PYTHON_USEDEP}]
206 + dev-python/virtualenv[${PYTHON_USEDEP}]
207 + !x86? ( >=dev-python/boto3-1.2.1[${PYTHON_USEDEP}] )
208 + )"
209 +
210 +DOCS=( README.rst AUTHORS )
211 +
212 +REQUIRED_USE="|| ( raet zeromq )
213 + test? ( cheetah genshi )"
214 +RESTRICT="!test? ( test ) x86? ( test )"
215 +
216 +PATCHES=(
217 + "${FILESDIR}/salt-2017.7.0-dont-realpath-tmpdir.patch"
218 + "${FILESDIR}/salt-2019.2.0-skip-tests-that-oom-machine.patch"
219 + "${FILESDIR}/salt-3000.1-tests.patch"
220 +)
221 +
222 +python_prepare() {
223 + # remove tests with external dependencies that may not be available
224 + rm tests/unit/{test_zypp_plugins.py,utils/test_extend.py} || die
225 + rm tests/unit/modules/test_{file,boto_{vpc,secgroup,elb}}.py || die
226 + rm tests/unit/states/test_boto_vpc.py || die
227 +
228 + # tests that require network access
229 + rm tests/unit/{states,modules}/test_zcbuildout.py || die
230 +
231 + # allow the use of the renamed msgpack
232 + sed -i '/^msgpack/d' requirements/base.txt || die
233 +}
234 +
235 +python_install_all() {
236 + local svc
237 + USE_SETUPTOOLS=1 distutils-r1_python_install_all
238 +
239 + for svc in minion master syndic api; do
240 + newinitd "${FILESDIR}"/${svc}-initd-4 salt-${svc}
241 + newconfd "${FILESDIR}"/${svc}-confd-1 salt-${svc}
242 + systemd_dounit "${FILESDIR}"/salt-${svc}.service
243 + done
244 +
245 + insinto /etc/${PN}
246 + doins -r conf/*
247 +}
248 +
249 +python_test() {
250 + local tempdir
251 + # testsuite likes lots of files
252 + ulimit -n 3072 || die
253 +
254 + # ${T} is too long a path for the tests to work
255 + tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)"
256 + mkdir "${T}/$(basename "${tempdir}")"
257 +
258 + (
259 + cleanup() { rm -f "${tempdir}" || die; }
260 +
261 + trap cleanup EXIT
262 +
263 + addwrite "${tempdir}"
264 + ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}" || die
265 +
266 + USE_SETUPTOOLS=1 SHELL="/bin/bash" \
267 + TMPDIR="${tempdir}" \
268 + ${EPYTHON} tests/runtests.py \
269 + --unit-tests --no-report --verbose \
270 + || die "testing failed with ${EPYTHON}"
271 + )
272 +}
273 +
274 +pkg_postinst_disabled() {
275 + if use python_targets_python3_8; then
276 + if use nova; then
277 + ewarn "Salt's nova functionality will not work with python3.8 since"
278 + ewarn "dev-python/python-novaclient does not support it yet"
279 + fi
280 + if use neutron; then
281 + ewarn "Salt's neutron functionality will not work with python3.8 since"
282 + ewarn "dev-python/python-neutronclient does not support it yet"
283 + fi
284 + if use libvirt; then
285 + ewarn "Salt's libvirt functionality will not work with python3.8 since"
286 + ewarn "dev-python/libvirt-python does not support it yet"
287 + fi
288 + fi
289 +}