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