1 |
commit: 925140dd5dc54ce874ce6f3a40adb76a3e42d4d7 |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Sep 3 23:59:47 2021 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 8 01:01:44 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=925140dd |
7 |
|
8 |
app-admin/salt-3002.7: Version bump |
9 |
|
10 |
Package-Manager: Portage-3.0.22, Repoman-3.0.3 |
11 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
12 |
|
13 |
app-admin/salt/Manifest | 1 + |
14 |
app-admin/salt/files/salt-3002.7-tests.patch | 12 ++ |
15 |
app-admin/salt/salt-3002.7.ebuild | 196 +++++++++++++++++++++++++++ |
16 |
3 files changed, 209 insertions(+) |
17 |
|
18 |
diff --git a/app-admin/salt/Manifest b/app-admin/salt/Manifest |
19 |
index febd6188d34..eb1c69dcf27 100644 |
20 |
--- a/app-admin/salt/Manifest |
21 |
+++ b/app-admin/salt/Manifest |
22 |
@@ -4,5 +4,6 @@ DIST salt-3000.9.tar.gz 15250432 BLAKE2B b76c166363b0b0fd3e3aa4b5306ba8280a2c99f |
23 |
DIST salt-3001.6.tar.gz 15736056 BLAKE2B 00e7674452e9d61c3cd487d27a3a1f3435c6b12dcc89008aa63c96814957b6ce8654f4d4d51dbce7b14027f0cee66fd2ea9602f6be18bf2f4beac11ae164f89f SHA512 e45c9cfddb64ab1c9d66b6b6b3e5ff8d9010c01307161e5013140b4362ee630cf912ab153d1afa72f56d18fc5353293b2f4b449caf8ee384d1e93204d490bf4c |
24 |
DIST salt-3001.8.tar.gz 15740488 BLAKE2B 77875a670b81438280becd1f29b64fbc766379192a9ca041568cd9360a3c4213bb3018063e88a297e9d1f637fb7ca3ef049a73a258022ec07e42f01a40bdf09a SHA512 8e90b2a1f82f951ab40a53a8af2ab421758ed8244f1881cc7aa71a8d9c2e2e6d892166ec8f8f6182966e56eb28c9aee6a060ee54b559b1d073fba97ad0afb013 |
25 |
DIST salt-3002.5.tar.gz 15784880 BLAKE2B baa90bb0caea572dfbe12d92fb488ee0c4adef9a07221f394009cd43a62ffef18c57f2e7cdcfcd923807c7a3d02ce6833480f74d70250c29d311420f30514300 SHA512 dda2caa338f646ec51d2de6b0df10fbb27eceddbe8c797ae192b9ef1312d566ae71a243a3a95918fa375b125089aa29a73b1b908c5cc1b0451dccb582a4978a1 |
26 |
+DIST salt-3002.7.tar.gz 15792124 BLAKE2B b4cb4a6d73c45f3c2183a7adfe8196bbc5788dce1995bd5c640cd9957bdfdba2e96deebaba927d6103fc50f4eaab86d51f4dd4594d25b7357db79ed67b39258e SHA512 c1e7bbcd39b5c2bef351bd74026346bf729839c4161f6eff8162620e9cb08a63073abeeb8af6bab635070386a883df494ef08cc07a84efa9aa7f2160b357a938 |
27 |
DIST salt-3003.1.tar.gz 16010476 BLAKE2B 3cd141061d8fa6ad00fe60615e8d36fda9fb26264adb2722d34e0b93c626fe09d78c3b9280ad8fe98924469a1ede1ad93cc06bde24a121c3db8c957be0ab7d75 SHA512 bf5ec7f1d16c776be5c2e90bff30e11817f369c3b08c0fe8bd991e7be31179b10cbd244048fb08c05aff30d7b6037c0575c311da4a0f300ce02bcf677aa6616f |
28 |
DIST salt-3003.tar.gz 15830910 BLAKE2B ea4f02eece951c3fb4fcc480d00f7b531ac549b2e23ff9a210b73f749f9ba83e0402e02a59028f41f94958d17512e417b7c1b7015e8ee3aeac55be9b1374fe6f SHA512 7f631466372f303c03f2852a5cfba1ee5c6ba1636a6fe1e1622e90d0b1376ef9f670aa1b4754f3d9c8c7fe1b99fe1b4c49e140dc86d90d157a1ec1e73ba43c38 |
29 |
|
30 |
diff --git a/app-admin/salt/files/salt-3002.7-tests.patch b/app-admin/salt/files/salt-3002.7-tests.patch |
31 |
new file mode 100644 |
32 |
index 00000000000..828b7eee76e |
33 |
--- /dev/null |
34 |
+++ b/app-admin/salt/files/salt-3002.7-tests.patch |
35 |
@@ -0,0 +1,12 @@ |
36 |
+diff --git a/tests/unit/modules/test_boto_route53.py b/tests/unit/modules/test_boto_route53.py |
37 |
+index e745f8f8c6..a2bb2a7ef2 100644 |
38 |
+--- a/tests/unit/modules/test_boto_route53.py |
39 |
++++ b/tests/unit/modules/test_boto_route53.py |
40 |
+@@ -80,6 +80,7 @@ def _has_required_moto(): |
41 |
+ return True |
42 |
+ |
43 |
+ |
44 |
++@skipIf(True, "skipping broken test") |
45 |
+ @skipIf(HAS_MOTO is False, "The moto module must be installed.") |
46 |
+ @skipIf( |
47 |
+ _has_required_moto() is False, |
48 |
|
49 |
diff --git a/app-admin/salt/salt-3002.7.ebuild b/app-admin/salt/salt-3002.7.ebuild |
50 |
new file mode 100644 |
51 |
index 00000000000..d20e3e59a37 |
52 |
--- /dev/null |
53 |
+++ b/app-admin/salt/salt-3002.7.ebuild |
54 |
@@ -0,0 +1,196 @@ |
55 |
+# Copyright 1999-2021 Gentoo Authors |
56 |
+# Distributed under the terms of the GNU General Public License v2 |
57 |
+ |
58 |
+EAPI=7 |
59 |
+PYTHON_COMPAT=( python3_{7..9} ) |
60 |
+ |
61 |
+inherit systemd distutils-r1 |
62 |
+ |
63 |
+DESCRIPTION="Salt is a remote execution and configuration manager" |
64 |
+HOMEPAGE="https://www.saltstack.com/resources/community/ |
65 |
+ https://github.com/saltstack" |
66 |
+ |
67 |
+if [[ ${PV} == 9999* ]]; then |
68 |
+ inherit git-r3 |
69 |
+ EGIT_REPO_URI="git://github.com/${PN}stack/${PN}.git" |
70 |
+ EGIT_BRANCH="develop" |
71 |
+ SRC_URI="" |
72 |
+else |
73 |
+ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
74 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
75 |
+fi |
76 |
+ |
77 |
+LICENSE="Apache-2.0" |
78 |
+SLOT="0" |
79 |
+IUSE="cheetah cherrypy ldap libcloud libvirt genshi gnupg keyring mako |
80 |
+ mongodb neutron nova openssl portage profile redis selinux test raet |
81 |
+ +zeromq vim-syntax" |
82 |
+ |
83 |
+RDEPEND=" |
84 |
+ sys-apps/pciutils |
85 |
+ >=dev-python/distro-1.5[${PYTHON_USEDEP}] |
86 |
+ dev-python/jinja[${PYTHON_USEDEP}] |
87 |
+ dev-python/libnacl[${PYTHON_USEDEP}] |
88 |
+ >=dev-python/msgpack-1.0.0[${PYTHON_USEDEP}] |
89 |
+ >=dev-python/pycryptodome-3.9.8[${PYTHON_USEDEP}] |
90 |
+ dev-python/pyyaml[${PYTHON_USEDEP}] |
91 |
+ dev-python/markupsafe[${PYTHON_USEDEP}] |
92 |
+ >=dev-python/requests-1.0.0[${PYTHON_USEDEP}] |
93 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
94 |
+ dev-python/toml[${PYTHON_USEDEP}] |
95 |
+ dev-python/watchdog[${PYTHON_USEDEP}] |
96 |
+ libcloud? ( >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] ) |
97 |
+ mako? ( dev-python/mako[${PYTHON_USEDEP}] ) |
98 |
+ ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] ) |
99 |
+ libvirt? ( |
100 |
+ $(python_gen_cond_dep 'dev-python/libvirt-python[${PYTHON_USEDEP}]' python3_8) |
101 |
+ ) |
102 |
+ openssl? ( |
103 |
+ dev-libs/openssl:0=[-bindist(-)] |
104 |
+ dev-python/pyopenssl[${PYTHON_USEDEP}] |
105 |
+ ) |
106 |
+ raet? ( |
107 |
+ >=dev-python/libnacl-1.0.0[${PYTHON_USEDEP}] |
108 |
+ >=dev-python/ioflo-1.1.7[${PYTHON_USEDEP}] |
109 |
+ >=dev-python/raet-0.6.0[${PYTHON_USEDEP}] |
110 |
+ ) |
111 |
+ cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] ) |
112 |
+ cheetah? ( dev-python/cheetah3[${PYTHON_USEDEP}] ) |
113 |
+ genshi? ( dev-python/genshi[${PYTHON_USEDEP}] ) |
114 |
+ mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] ) |
115 |
+ portage? ( sys-apps/portage[${PYTHON_USEDEP}] ) |
116 |
+ keyring? ( dev-python/keyring[${PYTHON_USEDEP}] ) |
117 |
+ redis? ( dev-python/redis-py[${PYTHON_USEDEP}] ) |
118 |
+ selinux? ( sec-policy/selinux-salt ) |
119 |
+ nova? ( |
120 |
+ $(python_gen_cond_dep '>=dev-python/python-novaclient-2.17.0[${PYTHON_USEDEP}]' python3_8) |
121 |
+ ) |
122 |
+ neutron? ( |
123 |
+ $(python_gen_cond_dep '>=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}]' python3_8) |
124 |
+ ) |
125 |
+ gnupg? ( dev-python/python-gnupg[${PYTHON_USEDEP}] ) |
126 |
+ profile? ( dev-python/yappi[${PYTHON_USEDEP}] ) |
127 |
+ vim-syntax? ( app-vim/salt-vim ) |
128 |
+ zeromq? ( >=dev-python/pyzmq-2.2.0[${PYTHON_USEDEP}] ) |
129 |
+" |
130 |
+BDEPEND=" |
131 |
+ test? ( |
132 |
+ ${RDEPEND} |
133 |
+ >=dev-python/boto-2.32.1[${PYTHON_USEDEP}] |
134 |
+ >=dev-python/jsonschema-3.0[${PYTHON_USEDEP}] |
135 |
+ >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] |
136 |
+ dev-python/mako[${PYTHON_USEDEP}] |
137 |
+ >=dev-python/mock-2.0.0[${PYTHON_USEDEP}] |
138 |
+ >=dev-python/moto-0.3.6[${PYTHON_USEDEP}] |
139 |
+ dev-python/pip[${PYTHON_USEDEP}] |
140 |
+ dev-python/psutil[${PYTHON_USEDEP}] |
141 |
+ dev-python/pytest[${PYTHON_USEDEP}] |
142 |
+ dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}] |
143 |
+ >=dev-python/pytest-salt-factories-0.93.0[${PYTHON_USEDEP}] |
144 |
+ dev-python/pytest-tempdir[${PYTHON_USEDEP}] |
145 |
+ >=dev-python/virtualenv-20.0.20[${PYTHON_USEDEP}] |
146 |
+ net-dns/bind-tools |
147 |
+ !x86? ( >=dev-python/boto3-1.3.15[${PYTHON_USEDEP}] ) |
148 |
+ )" |
149 |
+ |
150 |
+DOCS=( README.rst AUTHORS ) |
151 |
+ |
152 |
+REQUIRED_USE=" |
153 |
+ || ( raet zeromq ) |
154 |
+ test? ( cheetah genshi ) |
155 |
+" |
156 |
+RESTRICT="!test? ( test ) x86? ( test )" |
157 |
+ |
158 |
+PATCHES=( |
159 |
+ "${FILESDIR}/salt-2019.2.0-skip-tests-that-oom-machine.patch" |
160 |
+ "${FILESDIR}/salt-3002-dont-realpath-on-tmpdir.patch" |
161 |
+ "${FILESDIR}/salt-3002-tests.patch" |
162 |
+ "${FILESDIR}/salt-3002.5-tests.patch" |
163 |
+ "${FILESDIR}/salt-3002.7-tests.patch" |
164 |
+) |
165 |
+ |
166 |
+python_prepare_all() { |
167 |
+ # remove tests with external dependencies that may not be available, and |
168 |
+ # tests that don't work in sandbox |
169 |
+ rm tests/unit/{test_{zypp_plugins,module_names},utils/test_{extend,cache}}.py || die |
170 |
+ rm tests/unit/modules/test_{file,boto_{vpc,secgroup,elb}}.py || die |
171 |
+ rm tests/unit/states/test_boto_vpc.py || die |
172 |
+ rm tests/support/gitfs.py tests/unit/runners/test_git_pillar.py || die |
173 |
+ |
174 |
+ # tests that require network access |
175 |
+ rm tests/unit/{states,modules}/test_zcbuildout.py || die |
176 |
+ |
177 |
+ sed -i 's:log.trace(:log.debug(:' \ |
178 |
+ salt/fileserver/roots.py salt/grains/core.py salt/states/saltmod.py || die |
179 |
+ |
180 |
+ # make sure pkg_resources doesn't bomb because pycrypto isn't installed |
181 |
+ # make sure pkg_resources doesn't bomb because pycrypto isn't installed |
182 |
+ find "${S}" -name '*.txt' -print0 | xargs -0 sed -e '/pycrypto>/ d ; /pycryptodomex/ d' -i || die |
183 |
+ # pycryptodome rather than pycryptodomex |
184 |
+ find "${S}" -name '*.py' -print0 | xargs -0 -- sed -i -e 's:Cryptodome:Crypto:g' -- || die |
185 |
+ |
186 |
+ distutils-r1_python_prepare_all |
187 |
+} |
188 |
+ |
189 |
+python_prepare() { |
190 |
+ einfo "Fixing collections.abc warnings for ${EPYTHON}" |
191 |
+ local abc |
192 |
+ abc="$("${EPYTHON}" -c 'import collections.abc; print("|".join((c for c in dir(collections.abc) if not c.startswith("_"))))')" || die |
193 |
+ find -name '*.py' -type f -print0 | xargs -0 sed -r -e "s:collections\\.(${abc}):collections.abc.\\1:g" -i || die |
194 |
+} |
195 |
+ |
196 |
+python_install_all() { |
197 |
+ local svc |
198 |
+ USE_SETUPTOOLS=1 distutils-r1_python_install_all |
199 |
+ |
200 |
+ for svc in minion master syndic api; do |
201 |
+ newinitd "${FILESDIR}"/${svc}-initd-5 salt-${svc} |
202 |
+ newconfd "${FILESDIR}"/${svc}-confd-1 salt-${svc} |
203 |
+ systemd_dounit "${FILESDIR}"/salt-${svc}.service |
204 |
+ done |
205 |
+ |
206 |
+ insinto /etc/${PN} |
207 |
+ doins -r conf/* |
208 |
+} |
209 |
+ |
210 |
+python_test() { |
211 |
+ local tempdir |
212 |
+ # testsuite likes lots of files |
213 |
+ ulimit -n 3072 || die |
214 |
+ |
215 |
+ # ${T} is too long a path for the tests to work |
216 |
+ tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)" |
217 |
+ mkdir "${T}/$(basename "${tempdir}")" |
218 |
+ |
219 |
+ ( |
220 |
+ cleanup() { rm -f "${tempdir}" || die; } |
221 |
+ |
222 |
+ trap cleanup EXIT |
223 |
+ |
224 |
+ addwrite "${tempdir}" |
225 |
+ ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}" || die |
226 |
+ |
227 |
+ USE_SETUPTOOLS=1 NO_INTERNET=1 SHELL="/bin/bash" \ |
228 |
+ TMPDIR="${tempdir}" \ |
229 |
+ ${EPYTHON} tests/runtests.py \ |
230 |
+ --unit-tests --no-report --verbose \ |
231 |
+ || die "testing failed with ${EPYTHON}" |
232 |
+ ) |
233 |
+} |
234 |
+ |
235 |
+pkg_postinst() { |
236 |
+ if use python_targets_python3_8; then |
237 |
+ if use nova; then |
238 |
+ ewarn "Salt's nova functionality will not work with python3.8 since" |
239 |
+ ewarn "dev-python/python-novaclient does not support it yet" |
240 |
+ fi |
241 |
+ if use neutron; then |
242 |
+ ewarn "Salt's neutron functionality will not work with python3.8 since" |
243 |
+ ewarn "dev-python/python-neutronclient does not support it yet" |
244 |
+ fi |
245 |
+ if use libvirt; then |
246 |
+ ewarn "Salt's libvirt functionality will not work with python3.8 since" |
247 |
+ ewarn "dev-python/libvirt-python does not support it yet" |
248 |
+ fi |
249 |
+ fi |
250 |
+} |