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