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/, app-admin/salt/files/
Date: Sat, 27 Feb 2021 02:32:45
Message-Id: 1614393152.d56cf5f52d56b74774c234512f9be1610cd2c11f.chutzpah@gentoo
1 commit: d56cf5f52d56b74774c234512f9be1610cd2c11f
2 Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com>
3 AuthorDate: Sat Feb 27 02:31:38 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=d56cf5f5
7
8 app-admin/salt-3000.8: Version bump for 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-3000.8-tests.patch | 0
17 app-admin/salt/salt-3000.8.ebuild | 203 +++++++++++++++++++++++++++
18 3 files changed, 204 insertions(+)
19
20 diff --git a/app-admin/salt/Manifest b/app-admin/salt/Manifest
21 index a08943d31b6..5b54dc5c1c5 100644
22 --- a/app-admin/salt/Manifest
23 +++ b/app-admin/salt/Manifest
24 @@ -1,6 +1,7 @@
25 DIST salt-3000.2-py38-misc.patch.gz 6250 BLAKE2B 68fff80a042e6bf208ea2d9692da7a7b1e29572f1ec3c850c14743bbf2821d231f933ec4e6d6eaad12acee0b7666888a37a72872b2b082c92d8db9de988fbbec SHA512 6d4a66323a423e630f7cc73b566ed96c452c8fc3d72c25a2dd86033c4774c1c8e8b8701e1d4ee92994d4148c398d704f419023e26d8b40c8fdd63f9d79d9d52f
26 DIST salt-3000.5.tar.gz 15229450 BLAKE2B 135e9b9dcc461ac898231ce46e6a1359e6d60a43822320950bc0b83057f768dadf55320dd73df72d5bc917f324eef4661e6f75d8eb8e84aef958bd2df8924cfc SHA512 2579f65c24d22d77132057bd8cf37040d7d149624745dd68b4c44318be786580dcc34bf563f90d7de9ef5b726b2453bef4d8639bc8fbd9c5e691500520335317
27 DIST salt-3000.6.tar.gz 15236781 BLAKE2B 5a532a6915b331fb532dc6e1651cf8fca3e1a5e9f29f6d75260fdb1162dbfeec755c65f7c6fc28b1cc7dc3ace978547830af31aafc1eee8419bbc7e695725787 SHA512 739e3671766c45a0ef1eb45933c7f00f14586e91f4c4a79cbed913a48961a48baee853206ba569491756e8a872d22f3635eb6bc1a366020e551c567b2334c508
28 +DIST salt-3000.8.tar.gz 15249139 BLAKE2B df306669ba11dd650621222ff9c69f5a6e16b6f431e9d93e6712ee95da43091bfe28416fe0d71988ed9ee70cb347755b779a356c50fa59c63c67a874ed1906f4 SHA512 a18d5bea3b3835f83d5b1e5315990d83f6c58c36df5589d5de0f8cc3a46db4c960b58032e29d56841a160b9b170cdbb81bca38dbbd72ccb5866ccc8a7da6e800
29 DIST salt-3001.4.tar.gz 15716372 BLAKE2B cc33b29b0da9cfaae22726b2b471245880aafa106187b531872a9ae5ee773a94e0d550a68b11b74826bc0b35197a311f690535f2280931ccb5050275ad967c2d SHA512 b7f343c65917280a96d8a3eaa6b508121b11b9f9b0bfffa5b4c79af0023bdecf4581f76014847d97f48d9677edb6f632adec3850153c3048c3114128a250b84b
30 DIST salt-3001.6.tar.gz 15736056 BLAKE2B 00e7674452e9d61c3cd487d27a3a1f3435c6b12dcc89008aa63c96814957b6ce8654f4d4d51dbce7b14027f0cee66fd2ea9602f6be18bf2f4beac11ae164f89f SHA512 e45c9cfddb64ab1c9d66b6b6b3e5ff8d9010c01307161e5013140b4362ee630cf912ab153d1afa72f56d18fc5353293b2f4b449caf8ee384d1e93204d490bf4c
31 DIST salt-3002.2.tar.gz 15765855 BLAKE2B b26895ababc8551e01baa806c5a0e41dab9a379e47d2289b5c3c529ef762c69631d7ed8b32339ec66c3929c5883782131eb56d1bfbcc743829c4f0199a900ca1 SHA512 0f617a07475347b1bb0d1c6059de541e102103182820dfd6f64f4c281d660e68358eb1ab7171a637e16cef9fea2517c8356df9c449f9bbc92538aa86c316f652
32
33 diff --git a/app-admin/salt/files/salt-3000.8-tests.patch b/app-admin/salt/files/salt-3000.8-tests.patch
34 new file mode 100644
35 index 00000000000..e69de29bb2d
36
37 diff --git a/app-admin/salt/salt-3000.8.ebuild b/app-admin/salt/salt-3000.8.ebuild
38 new file mode 100644
39 index 00000000000..e8589011e66
40 --- /dev/null
41 +++ b/app-admin/salt/salt-3000.8.ebuild
42 @@ -0,0 +1,203 @@
43 +# Copyright 1999-2021 Gentoo Authors
44 +# Distributed under the terms of the GNU General Public License v2
45 +
46 +EAPI=7
47 +PYTHON_COMPAT=( python3_{7..8} )
48 +DISTUTILS_USE_SETUPTOOLS=rdepend
49 +inherit systemd distutils-r1
50 +
51 +DESCRIPTION="Salt is a remote execution and configuration manager"
52 +HOMEPAGE="https://www.saltstack.com/resources/community/
53 + https://github.com/saltstack"
54 +
55 +if [[ ${PV} == 9999* ]]; then
56 + inherit git-r3
57 + EGIT_REPO_URI="git://github.com/${PN}stack/${PN}.git"
58 + EGIT_BRANCH="develop"
59 + SRC_URI=""
60 +else
61 + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz
62 + https://dev.gentoo.org/~chutzpah/dist/salt/salt-3000.2-py38-misc.patch.gz"
63 + KEYWORDS="~amd64 ~x86"
64 +fi
65 +
66 +LICENSE="Apache-2.0"
67 +SLOT="0"
68 +IUSE="cheetah cherrypy ldap libcloud libvirt genshi gnupg keyring mako
69 + mongodb neutron nova openssl portage profile redis selinux test raet
70 + +zeromq vim-syntax"
71 +
72 +RDEPEND="
73 + sys-apps/pciutils
74 + dev-python/distro[${PYTHON_USEDEP}]
75 + dev-python/jinja[${PYTHON_USEDEP}]
76 + dev-python/libnacl[${PYTHON_USEDEP}]
77 + >=dev-python/msgpack-0.5[${PYTHON_USEDEP}]
78 + <dev-python/msgpack-1.0[${PYTHON_USEDEP}]
79 + dev-python/pycryptodome[${PYTHON_USEDEP}]
80 + dev-python/pyyaml[${PYTHON_USEDEP}]
81 + dev-python/markupsafe[${PYTHON_USEDEP}]
82 + >=dev-python/requests-1.0.0[${PYTHON_USEDEP}]
83 + dev-python/setuptools[${PYTHON_USEDEP}]
84 + libcloud? ( >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] )
85 + mako? ( dev-python/mako[${PYTHON_USEDEP}] )
86 + ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] )
87 + libvirt? (
88 + $(python_gen_cond_dep 'dev-python/libvirt-python[${PYTHON_USEDEP}]' python3_7)
89 + )
90 + openssl? (
91 + dev-libs/openssl:0=[-bindist]
92 + dev-python/pyopenssl[${PYTHON_USEDEP}]
93 + )
94 + raet? (
95 + >=dev-python/libnacl-1.0.0[${PYTHON_USEDEP}]
96 + >=dev-python/ioflo-1.1.7[${PYTHON_USEDEP}]
97 + >=dev-python/raet-0.6.0[${PYTHON_USEDEP}]
98 + )
99 + cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] )
100 + cheetah? ( dev-python/cheetah3[${PYTHON_USEDEP}] )
101 + mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] )
102 + portage? ( sys-apps/portage[${PYTHON_USEDEP}] )
103 + keyring? ( dev-python/keyring[${PYTHON_USEDEP}] )
104 + redis? ( dev-python/redis-py[${PYTHON_USEDEP}] )
105 + selinux? ( sec-policy/selinux-salt )
106 + nova? (
107 + $(python_gen_cond_dep '>=dev-python/python-novaclient-2.17.0[${PYTHON_USEDEP}]' python3_7)
108 + )
109 + neutron? (
110 + $(python_gen_cond_dep '>=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}]' python3_7)
111 + )
112 + gnupg? ( dev-python/python-gnupg[${PYTHON_USEDEP}] )
113 + profile? ( dev-python/yappi[${PYTHON_USEDEP}] )
114 + vim-syntax? ( app-vim/salt-vim )
115 + zeromq? ( >=dev-python/pyzmq-2.2.0[${PYTHON_USEDEP}] )
116 +"
117 +BDEPEND="
118 + test? (
119 + ${RDEPEND}
120 + >=dev-python/boto-2.32.1[${PYTHON_USEDEP}]
121 + >=dev-python/jsonschema-3.0[${PYTHON_USEDEP}]
122 + >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}]
123 + >=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
124 + >=dev-python/moto-0.3.6[${PYTHON_USEDEP}]
125 + dev-python/pip[${PYTHON_USEDEP}]
126 + dev-python/psutil[${PYTHON_USEDEP}]
127 + dev-python/pytest[${PYTHON_USEDEP}]
128 + dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}]
129 + dev-python/pytest-helpers-namespace[${PYTHON_USEDEP}]
130 + >=dev-python/pytest-salt-2018.12.8[${PYTHON_USEDEP}]
131 + dev-python/pytest-tempdir[${PYTHON_USEDEP}]
132 + >=dev-python/SaltTesting-2016.5.11[${PYTHON_USEDEP}]
133 + dev-python/virtualenv[${PYTHON_USEDEP}]
134 + !x86? ( >=dev-python/boto3-1.2.1[${PYTHON_USEDEP}] )
135 + )"
136 +
137 +DOCS=( README.rst AUTHORS )
138 +
139 +REQUIRED_USE="|| ( raet zeromq )
140 + test? ( cheetah genshi )"
141 +RESTRICT="!test? ( test ) x86? ( test )"
142 +
143 +# tests failing with newer versions of deps
144 +RESTRICT+=" test"
145 +
146 +PATCHES=(
147 + "${FILESDIR}/salt-2017.7.0-dont-realpath-tmpdir.patch"
148 + "${FILESDIR}/salt-2019.2.0-skip-tests-that-oom-machine.patch"
149 + "${FILESDIR}/salt-3000.1-tests.patch"
150 + "${FILESDIR}/salt-3000.2-tests.patch"
151 +
152 + # https://github.com/saltstack/salt/pull/55410
153 + "${FILESDIR}/salt-3000.2-py38.patch"
154 +
155 + # https://github.com/saltstack/salt/pull/55900
156 + "${FILESDIR}/salt-3000.2-py38-abc.patch"
157 +
158 + # misc py38 fixups
159 + "${WORKDIR}/salt-3000.2-py38-misc.patch"
160 + "${FILESDIR}/salt-3000.2-py38-logwarn.patch"
161 + "${FILESDIR}/salt-2019.2.8-ansible-roster-fix.patch"
162 + "${FILESDIR}/salt-3000.8-tests.patch"
163 +)
164 +
165 +python_prepare_all() {
166 + # remove tests with external dependencies that may not be available, and
167 + # tests that don't work in sandbox
168 + rm tests/unit/{test_zypp_plugins,utils/test_{extend,cache}}.py || die
169 + rm tests/unit/modules/test_{file,boto_{vpc,secgroup,elb}}.py || die
170 + rm tests/unit/states/test_boto_vpc.py || die
171 +
172 + # tests that require network access
173 + rm tests/unit/{states,modules}/test_zcbuildout.py || die
174 + rm tests/unit/transport/test_zeromq.py || die
175 +
176 + # make sure pkg_resources doesn't bomb because pycrypto isn't installed
177 + find . -name '*.txt' -print0 | xargs -0 sed -e '/pycrypto>/ d' -i || die
178 + distutils-r1_python_prepare_all
179 +}
180 +
181 +python_prepare() {
182 + einfo "Fixing collections.abc warnings for ${EPYTHON}"
183 + local abc
184 + abc="$("${EPYTHON}" -c 'import collections.abc; print("|".join((c for c in dir(collections.abc) if not c.startswith("_"))))')" || die
185 + find -name '*.py' -type f -print0 | xargs -0 sed -r -e "s:collections\\.(${abc}):collections.abc.\\1:g" -i || die
186 +
187 + # allow the use of the renamed msgpack
188 + sed -i '/^msgpack/d' requirements/base.txt || die
189 +}
190 +
191 +python_install_all() {
192 + local svc
193 + USE_SETUPTOOLS=1 distutils-r1_python_install_all
194 +
195 + for svc in minion master syndic api; do
196 + newinitd "${FILESDIR}"/${svc}-initd-5 salt-${svc}
197 + newconfd "${FILESDIR}"/${svc}-confd-1 salt-${svc}
198 + systemd_dounit "${FILESDIR}"/salt-${svc}.service
199 + done
200 +
201 + insinto /etc/${PN}
202 + doins -r conf/*
203 +}
204 +
205 +python_test() {
206 + local tempdir
207 + # testsuite likes lots of files
208 + ulimit -n 3072 || die
209 +
210 + # ${T} is too long a path for the tests to work
211 + tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)"
212 + mkdir "${T}/$(basename "${tempdir}")"
213 +
214 + (
215 + cleanup() { rm -f "${tempdir}" || die; }
216 +
217 + trap cleanup EXIT
218 +
219 + addwrite "${tempdir}"
220 + ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}" || die
221 +
222 + USE_SETUPTOOLS=1 NO_INTERNET=1 SHELL="/bin/bash" \
223 + TMPDIR="${tempdir}" \
224 + ${EPYTHON} tests/runtests.py \
225 + --unit-tests --no-report --verbose \
226 + || die "testing failed with ${EPYTHON}"
227 + )
228 +}
229 +
230 +pkg_postinst() {
231 + if use python_targets_python3_8; then
232 + if use nova; then
233 + ewarn "Salt's nova functionality will not work with python3.8 since"
234 + ewarn "dev-python/python-novaclient does not support it yet"
235 + fi
236 + if use neutron; then
237 + ewarn "Salt's neutron functionality will not work with python3.8 since"
238 + ewarn "dev-python/python-neutronclient does not support it yet"
239 + fi
240 + if use libvirt; then
241 + ewarn "Salt's libvirt functionality will not work with python3.8 since"
242 + ewarn "dev-python/libvirt-python does not support it yet"
243 + fi
244 + fi
245 +}