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: Tue, 03 Jul 2018 21:18:47
Message-Id: 1530652693.166dbbbb08846bbbb3156c120c070a1ba1daa318.chutzpah@gentoo
1 commit: 166dbbbb08846bbbb3156c120c070a1ba1daa318
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 3 20:25:57 2018 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 3 21:18:13 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=166dbbbb
7
8 app-admin/salt: Version bump to 2018.3.2, add python3.6
9
10 Move to dev-python/pycryptodome
11
12 Closes: https://bugs.gentoo.org/659026
13 Closes: https://bugs.gentoo.org/640252
14 Closes: https://bugs.gentoo.org/652844
15 Bug: https://bugs.gentoo.org/611576
16 Package-Manager: Portage-2.3.41, Repoman-2.3.9
17
18 app-admin/salt/Manifest | 1 +
19 ...salt-2018.3.2-skip-zeromq-test-that-hangs.patch | 79 +++++++++++
20 app-admin/salt/salt-2018.3.2.ebuild | 155 +++++++++++++++++++++
21 3 files changed, 235 insertions(+)
22
23 diff --git a/app-admin/salt/Manifest b/app-admin/salt/Manifest
24 index 56db125c7c7..643d0900419 100644
25 --- a/app-admin/salt/Manifest
26 +++ b/app-admin/salt/Manifest
27 @@ -1,3 +1,4 @@
28 DIST salt-2016.11.9.tar.gz 10062996 BLAKE2B 5176d04d07a69de21c9c136c201d334614c5675fd78e306a0160fae829b633441cd859f4ba1a0822dfbb9ae716475c53f6eb058187d4acc8a5770dd4ceace577 SHA512 896fd27c111e926e246b51d00b69d41c8f4d25ec0c034c9ff3dc5414f5e93592fd637cdeaecf02b3b98a4e5a7ce478bfda86b15497961078374608d76516593d
29 DIST salt-2017.7.5.tar.gz 11043026 BLAKE2B 9cae4e6ca3b0bac0dc0b9b9a5ae01e0bfb8e8b899aa029b324ac10c8c84024bbc419ace068cd0d2bff84ec6ddf1d13faf68ce34c68c19892c700c38e81da8c7c SHA512 684ffde7d98c73349b386c94de3d9fc09631a78c5d74e37e6dfd90fbb0c94decc529f56b1eba1559ce9932b16083f88e6495ff6cdf071b32a23028e9db47cc3d
30 DIST salt-2018.3.0.tar.gz 13448567 BLAKE2B 9048f9e507ded238bfd54d0aabfefb56522b20ba2479c3bf5aefc47fff0b6ce516709ad6e9109441941a60596d4f06a43c1448a149225f3f87715327a190d313 SHA512 3d64a4d12d4ff7effe644b682b138d8f49fd00523e9cfe3e80bebff9c944a089fb41cbac92e63139633425f49c1eebeb99145290a0bdd1b4f306da86abe9b2e5
31 +DIST salt-2018.3.2.tar.gz 12996445 BLAKE2B 8411fb0891e23ce8e35157662a0a45c0c5b13b62f3fd21cc4bbe5152f923a98b27cb5bee4fb8cb3e6ec5c9daed1afa27baf4b570b94f9f40eddc0891f72829e9 SHA512 142ebe13638d7e6dd0aecc9f0325002d30e115fe8688f5f74cbeb7ff21020327d65ded0dcd845e55362b97568b696887fa22243d66d5eadef65f97152d4775d3
32
33 diff --git a/app-admin/salt/files/salt-2018.3.2-skip-zeromq-test-that-hangs.patch b/app-admin/salt/files/salt-2018.3.2-skip-zeromq-test-that-hangs.patch
34 new file mode 100644
35 index 00000000000..7b94fafd447
36 --- /dev/null
37 +++ b/app-admin/salt/files/salt-2018.3.2-skip-zeromq-test-that-hangs.patch
38 @@ -0,0 +1,79 @@
39 +diff --git a/tests/unit/transport/test_zeromq.py b/tests/unit/transport/test_zeromq.py
40 +index ccb337462e..97d2962e5e 100644
41 +--- a/tests/unit/transport/test_zeromq.py
42 ++++ b/tests/unit/transport/test_zeromq.py
43 +@@ -45,6 +45,10 @@ ON_SUSE = False
44 + if 'SuSE' in linux_distribution(full_distribution_name=False):
45 + ON_SUSE = True
46 +
47 ++ON_GENTOO = False
48 ++if 'Gentoo' in linux_distribution(full_distribution_name=False):
49 ++ ON_GENTOO = True
50 ++
51 +
52 + class BaseZMQReqCase(TestCase, AdaptedConfigurationTestCaseMixin):
53 + '''
54 +@@ -122,63 +126,6 @@ class BaseZMQReqCase(TestCase, AdaptedConfigurationTestCaseMixin):
55 + return payload, {'fun': 'send_clear'}
56 +
57 +
58 +-class ClearReqTestCases(BaseZMQReqCase, ReqChannelMixin):
59 +- '''
60 +- Test all of the clear msg stuff
61 +- '''
62 +- def setUp(self):
63 +- self.channel = salt.transport.client.ReqChannel.factory(self.minion_config, crypt='clear')
64 +-
65 +- def tearDown(self):
66 +- del self.channel
67 +-
68 +- @classmethod
69 +- @tornado.gen.coroutine
70 +- def _handle_payload(cls, payload):
71 +- '''
72 +- TODO: something besides echo
73 +- '''
74 +- raise tornado.gen.Return((payload, {'fun': 'send_clear'}))
75 +-
76 +-
77 +-@flaky
78 +-@skipIf(ON_SUSE, 'Skipping until https://github.com/saltstack/salt/issues/32902 gets fixed')
79 +-class AESReqTestCases(BaseZMQReqCase, ReqChannelMixin):
80 +- def setUp(self):
81 +- self.channel = salt.transport.client.ReqChannel.factory(self.minion_config)
82 +-
83 +- def tearDown(self):
84 +- del self.channel
85 +-
86 +- @classmethod
87 +- @tornado.gen.coroutine
88 +- def _handle_payload(cls, payload):
89 +- '''
90 +- TODO: something besides echo
91 +- '''
92 +- raise tornado.gen.Return((payload, {'fun': 'send'}))
93 +-
94 +- # TODO: make failed returns have a specific framing so we can raise the same exception
95 +- # on encrypted channels
96 +- #
97 +- #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
98 +- #
99 +- # WARNING: This test will fail randomly on any system with > 1 CPU core!!!
100 +- #
101 +- #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
102 +- def test_badload(self):
103 +- '''
104 +- Test a variety of bad requests, make sure that we get some sort of error
105 +- '''
106 +- # TODO: This test should be re-enabled when Jenkins moves to C7.
107 +- # Once the version of salt-testing is increased to something newer than the September
108 +- # release of salt-testing, the @flaky decorator should be applied to this test.
109 +- msgs = ['', [], tuple()]
110 +- for msg in msgs:
111 +- with self.assertRaises(salt.exceptions.AuthenticationError):
112 +- ret = self.channel.send(msg, timeout=5)
113 +-
114 +-
115 + class BaseZMQPubCase(AsyncTestCase, AdaptedConfigurationTestCaseMixin):
116 + '''
117 + Test the req server/client pair
118
119 diff --git a/app-admin/salt/salt-2018.3.2.ebuild b/app-admin/salt/salt-2018.3.2.ebuild
120 new file mode 100644
121 index 00000000000..fff0c84f2ac
122 --- /dev/null
123 +++ b/app-admin/salt/salt-2018.3.2.ebuild
124 @@ -0,0 +1,155 @@
125 +# Copyright 1999-2018 Gentoo Foundation
126 +# Distributed under the terms of the GNU General Public License v2
127 +
128 +EAPI=6
129 +PYTHON_COMPAT=( python2_7 python3_6 )
130 +
131 +inherit eutils systemd distutils-r1
132 +
133 +DESCRIPTION="Salt is a remote execution and configuration manager"
134 +HOMEPAGE="http://saltstack.org/"
135 +
136 +if [[ ${PV} == 9999* ]]; then
137 + inherit git-r3
138 + EGIT_REPO_URI="git://github.com/${PN}stack/${PN}.git"
139 + EGIT_BRANCH="develop"
140 + SRC_URI=""
141 + KEYWORDS=""
142 +else
143 + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
144 + KEYWORDS="~x86 ~amd64"
145 +fi
146 +
147 +LICENSE="Apache-2.0"
148 +SLOT="0"
149 +IUSE="cherrypy ldap libcloud libvirt gnupg keyring mako mongodb mysql neutron nova"
150 +IUSE+=" openssl portage profile redis selinux test timelib raet +zeromq vim-syntax"
151 +
152 +RDEPEND="sys-apps/pciutils
153 + dev-python/jinja[${PYTHON_USEDEP}]
154 + dev-python/libnacl[${PYTHON_USEDEP}]
155 + >=dev-python/msgpack-0.3[${PYTHON_USEDEP}]
156 + dev-python/pyyaml[${PYTHON_USEDEP}]
157 + dev-python/markupsafe[${PYTHON_USEDEP}]
158 + >=dev-python/requests-1.0.0[${PYTHON_USEDEP}]
159 + dev-python/setuptools[${PYTHON_USEDEP}]
160 + >=www-servers/tornado-4.2.1[${PYTHON_USEDEP}]
161 + <www-servers/tornado-5.0[${PYTHON_USEDEP}]
162 + virtual/python-futures[${PYTHON_USEDEP}]
163 + libcloud? ( >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] )
164 + mako? ( dev-python/mako[${PYTHON_USEDEP}] )
165 + ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] )
166 + libvirt? ( dev-python/libvirt-python[${PYTHON_USEDEP}] )
167 + openssl? (
168 + dev-libs/openssl:*[-bindist]
169 + dev-python/pyopenssl[${PYTHON_USEDEP}]
170 + )
171 + raet? (
172 + >=dev-python/libnacl-1.0.0[${PYTHON_USEDEP}]
173 + >=dev-python/ioflo-1.1.7[${PYTHON_USEDEP}]
174 + >=dev-python/raet-0.6.0[${PYTHON_USEDEP}]
175 + )
176 + zeromq? (
177 + >=dev-python/pyzmq-2.2.0[${PYTHON_USEDEP}]
178 + dev-python/pycryptodome[${PYTHON_USEDEP}]
179 + )
180 + cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] )
181 + mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] )
182 + portage? (
183 + || (
184 + sys-apps/portage[${PYTHON_USEDEP}]
185 + sys-apps/portage-mgorny[${PYTHON_USEDEP}]
186 + )
187 + )
188 + keyring? ( dev-python/keyring[${PYTHON_USEDEP}] )
189 + mysql? ( dev-python/mysql-python[$(python_gen_usedep 'python2*')] )
190 + redis? ( dev-python/redis-py[${PYTHON_USEDEP}] )
191 + selinux? ( sec-policy/selinux-salt )
192 + timelib? ( dev-python/timelib[$(python_gen_usedep 'python2*')] )
193 + nova? ( >=dev-python/python-novaclient-2.17.0[${PYTHON_USEDEP}] )
194 + neutron? ( >=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}] )
195 + gnupg? ( dev-python/python-gnupg[${PYTHON_USEDEP}] )
196 + profile? ( dev-python/yappi[${PYTHON_USEDEP}] )
197 + vim-syntax? ( app-vim/salt-vim )"
198 +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
199 + test? (
200 + dev-python/pytest-salt[${PYTHON_USEDEP}]
201 + dev-python/psutil[${PYTHON_USEDEP}]
202 + dev-python/pytest[${PYTHON_USEDEP}]
203 + dev-python/pytest-catchlog[${PYTHON_USEDEP}]
204 + dev-python/pip[${PYTHON_USEDEP}]
205 + dev-python/virtualenv[${PYTHON_USEDEP}]
206 + >=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
207 + dev-python/timelib[$(python_gen_usedep 'python2*')]
208 + >=dev-python/boto-2.32.1[${PYTHON_USEDEP}]
209 + !x86? ( >=dev-python/boto3-1.2.1[${PYTHON_USEDEP}] )
210 + >=dev-python/moto-0.3.6[${PYTHON_USEDEP}]
211 + >=dev-python/SaltTesting-2016.5.11[${PYTHON_USEDEP}]
212 + >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}]
213 + ${RDEPEND}
214 + )"
215 +
216 +DOCS=( README.rst AUTHORS )
217 +
218 +REQUIRED_USE="|| ( raet zeromq )"
219 +RESTRICT="x86? ( test )"
220 +
221 +PATCHES=(
222 + "${FILESDIR}/${PN}-2017.7.0-dont-realpath-tmpdir.patch"
223 + "${FILESDIR}/${PN}-2017.7.3-tests.patch"
224 + "${FILESDIR}/${PN}-2018.3.2-skip-zeromq-test-that-hangs.patch"
225 +)
226 +
227 +python_prepare() {
228 + # remove tests with external dependencies that may not be available
229 + rm tests/unit/{test_zypp_plugins.py,utils/test_extend.py} || die
230 + rm tests/unit/modules/test_boto_{vpc,secgroup,elb}.py || die
231 + rm tests/unit/states/test_boto_vpc.py || die
232 + rm tests/unit/modules/test_{kubernetes,vsphere}.py || die
233 +
234 + # allow the use of the renamed msgpack
235 + sed -i '/^msgpack/d' requirements/base.txt || die
236 +}
237 +
238 +python_install_all() {
239 + local svc
240 + USE_SETUPTOOLS=1 distutils-r1_python_install_all
241 +
242 + for svc in minion master syndic api; do
243 + newinitd "${FILESDIR}"/${svc}-initd-4 salt-${svc}
244 + newconfd "${FILESDIR}"/${svc}-confd-1 salt-${svc}
245 + systemd_dounit "${FILESDIR}"/salt-${svc}.service
246 + done
247 +
248 + insinto /etc/${PN}
249 + doins -r conf/*
250 +}
251 +
252 +python_test() {
253 + local tempdir
254 + # testsuite likes lots of files
255 + ulimit -n 3072 || die
256 +
257 + # ${T} is too long a path for the tests to work
258 + tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)"
259 + mkdir "${T}/$(basename "${tempdir}")"
260 + mkdir "${BUILD_DIR}"/../{templates,conf/cloud.{providers,profiles,maps}.d} || die
261 +
262 + (
263 + cleanup() {
264 + rm -f "${tempdir}"
265 + rmdir "${BUILD_DIR}"/../{templates,conf/cloud.{providers,profiles,maps}.d} || die
266 + }
267 +
268 + trap cleanup EXIT
269 +
270 + addwrite "${tempdir}"
271 + ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}"
272 +
273 + USE_SETUPTOOLS=1 SHELL="/bin/bash" \
274 + TMPDIR="${tempdir}" \
275 + ${EPYTHON} tests/runtests.py \
276 + --unit-tests --no-report --verbose
277 +
278 + ) || die "testing failed"
279 +}