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: Tue, 05 Dec 2017 21:44:18
Message-Id: 1512510229.82ff86c108c463d7ed0afd8b9c4d4b103512df6a.chutzpah@gentoo
1 commit: 82ff86c108c463d7ed0afd8b9c4d4b103512df6a
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 5 21:43:49 2017 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 5 21:43:49 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82ff86c1
7
8 app-admin/salt: Revision bump to 2017.7.2-r1 to fix bug #634464
9
10 Closes: https://bugs.gentoo.org/634464
11 Package-Manager: Portage-2.3.16, Repoman-2.3.6
12
13 app-admin/salt/Manifest | 2 +-
14 .../salt/files/salt-2017.7.2-fix_disk_format.patch | 48 +++++++
15 app-admin/salt/salt-2017.7.2-r1.ebuild | 141 +++++++++++++++++++++
16 3 files changed, 190 insertions(+), 1 deletion(-)
17
18 diff --git a/app-admin/salt/Manifest b/app-admin/salt/Manifest
19 index dd97ba3c386..94ad6a20fd8 100644
20 --- a/app-admin/salt/Manifest
21 +++ b/app-admin/salt/Manifest
22 @@ -2,4 +2,4 @@ DIST salt-2015.5.10.tar.gz 5693422 SHA256 863a96e70f8521af35fe11b10d25b3205a0bfb
23 DIST salt-2015.8.13.tar.gz 7036243 SHA256 cca82c9a4f267692660b098c1f76e54ab6a24131391893719bde0eb3a1ed2959 SHA512 ec8626f7360542bfeea90fc3d6fd9d9d015da4c2a6adf9957c22501ed9531b0a44d2cbc4853c41856b4cd46c142d2441884ec99700f3c0a5310cc428f9f1ec2a WHIRLPOOL c21f3bdc5fd674ea664c7e8fd58ef6685328a6ee3679850f3e9a085b1e604e1224a3323b906b47075fb8dd39f373583fb549e7b0f3f725d44928bcf716955a10
24 DIST salt-2016.11.8.tar.gz 10142142 SHA256 e75f4178465d9198fcd5822643460c94d63de6221316367d5b85356ef8b1994a SHA512 0adc544ca460d13d2adb11b04575bd079a3dad1be3468bea7d32d0b74416b78546e4c86c75551bba09786be8e9810a6e30232414c4f5851cbc9a0fb4b894e0de WHIRLPOOL aa2ba8a4afbdd412e133364b4b034b7a34cb5af43fcbed929451624444440a07b143977ecf1db5cfcbbd53c98aedc15dae5ab8c246e48ab3b7c1053d30054b66
25 DIST salt-2016.3.8.tar.gz 8519835 SHA256 9558379a11882348c1299ca094b638feb6bdf8f0d443d2055a71d0c9a52427e3 SHA512 bba41d4c70e278aa7196d292fb27b926dce32f4cc67c5b23b6c219ad59178b1a8b26e8adeb3a7bd587c25cc1c8ff36a207ea2a2f68d13d64f37a34f96f35ecd1 WHIRLPOOL 14e18eabd1287f05b0387455890f31c030ce6c84c831a12d0c691f76a3181dba0d3c12a15935c0f786c02fe6887d17a0fad492356814166c23865e3f98831f44
26 -DIST salt-2017.7.2.tar.gz 11471191 SHA256 ff3bc7de5abf01b8acbd144db5811b00867179b2353f5c6f7f19241e2eff2840 SHA512 959cec404f0fa7c00f78427cba902b8b9c2c0d95016fc70925d8da6d0b97a0284fc034ac92a5c5c313763db4fdcbd1b0391318596b77fe8e0cd1c7e4b3fa928b WHIRLPOOL 85e6ae3ba1a5b7c1e3e8546daec6ceb4ec60fb915409dd8000298b394b933f24a4b1d5740ebe230930bf8de76e7934d1ae3c919a058fdf6bf60638c260e6a585
27 +DIST salt-2017.7.2.tar.gz 11471191 BLAKE2B 0b7184eb4dcb29f2a9603117d1c6fb9c729093c1ff11e18370929ec3fdbfe7bf8c0914f17260c3f613842c23359205a4a84d3e0bcd67476705e50f805bcd7b69 SHA512 959cec404f0fa7c00f78427cba902b8b9c2c0d95016fc70925d8da6d0b97a0284fc034ac92a5c5c313763db4fdcbd1b0391318596b77fe8e0cd1c7e4b3fa928b
28
29 diff --git a/app-admin/salt/files/salt-2017.7.2-fix_disk_format.patch b/app-admin/salt/files/salt-2017.7.2-fix_disk_format.patch
30 new file mode 100644
31 index 00000000000..9e58d93f7dd
32 --- /dev/null
33 +++ b/app-admin/salt/files/salt-2017.7.2-fix_disk_format.patch
34 @@ -0,0 +1,48 @@
35 +From 18fb0be96a146589ccbd642caa9244480c51140b Mon Sep 17 00:00:00 2001
36 +From: Matthew Summers <msummers42@×××××.com>
37 +Date: Mon, 9 Oct 2017 20:38:52 -0500
38 +Subject: [PATCH 1/2] addresses issue #43307, disk.format_ to disk.format
39 +
40 +This change fixes breakage. It appears the disk.format_ func is
41 +aliased to disk.format in modules/disk.py
42 +---
43 + salt/states/blockdev.py | 2 +-
44 + 1 file changed, 1 insertion(+), 1 deletion(-)
45 +
46 +diff --git a/salt/states/blockdev.py b/salt/states/blockdev.py
47 +index 4b0dc5ca81d..e6ecfeab3f1 100644
48 +--- a/salt/states/blockdev.py
49 ++++ b/salt/states/blockdev.py
50 +@@ -159,7 +159,7 @@ def formatted(name, fs_type='ext4', force=False, **kwargs):
51 + ret['result'] = None
52 + return ret
53 +
54 +- __salt__['disk.format_'](name, fs_type, force=force, **kwargs)
55 ++ __salt__['disk.format'](name, fs_type, force=force, **kwargs)
56 +
57 + # Repeat fstype check up to 10 times with 3s sleeping between each
58 + # to avoid detection failing although mkfs has succeeded
59 +
60 +From 16e1c1dfc86920b7a00dbf7c39b805c359e4d13b Mon Sep 17 00:00:00 2001
61 +From: Matthew Summers <matthew.summers@××××××.com>
62 +Date: Mon, 16 Oct 2017 09:47:40 -0500
63 +Subject: [PATCH 2/2] fixed test addressing issue #43307, disk.format_ to
64 + disk.format
65 +
66 +---
67 + tests/unit/states/test_blockdev.py | 2 +-
68 + 1 file changed, 1 insertion(+), 1 deletion(-)
69 +
70 +diff --git a/tests/unit/states/test_blockdev.py b/tests/unit/states/test_blockdev.py
71 +index e5899f1c70a..9b559dddfe5 100644
72 +--- a/tests/unit/states/test_blockdev.py
73 ++++ b/tests/unit/states/test_blockdev.py
74 +@@ -100,7 +100,7 @@ def test_formatted(self):
75 +
76 + # Test state return when block device format fails
77 + with patch.dict(blockdev.__salt__, {'cmd.run': MagicMock(return_value=mock_ext4),
78 +- 'disk.format_': MagicMock(return_value=True)}):
79 ++ 'disk.format': MagicMock(return_value=True)}):
80 + comt = ('Failed to format {0}'.format(name))
81 + ret.update({'comment': comt, 'result': False})
82 + with patch.object(salt.utils, 'which',
83
84 diff --git a/app-admin/salt/salt-2017.7.2-r1.ebuild b/app-admin/salt/salt-2017.7.2-r1.ebuild
85 new file mode 100644
86 index 00000000000..88f1dd3f811
87 --- /dev/null
88 +++ b/app-admin/salt/salt-2017.7.2-r1.ebuild
89 @@ -0,0 +1,141 @@
90 +# Copyright 1999-2017 Gentoo Foundation
91 +# Distributed under the terms of the GNU General Public License v2
92 +
93 +EAPI=6
94 +PYTHON_COMPAT=( python2_7 )
95 +
96 +inherit eutils systemd distutils-r1
97 +
98 +DESCRIPTION="Salt is a remote execution and configuration manager"
99 +HOMEPAGE="http://saltstack.org/"
100 +
101 +if [[ ${PV} == 9999* ]]; then
102 + inherit git-r3
103 + EGIT_REPO_URI="git://github.com/${PN}stack/${PN}.git"
104 + EGIT_BRANCH="develop"
105 + SRC_URI=""
106 + KEYWORDS=""
107 +else
108 + SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
109 + KEYWORDS="~x86 ~amd64"
110 +fi
111 +
112 +LICENSE="Apache-2.0"
113 +SLOT="0"
114 +IUSE="cherrypy ldap libcloud libvirt gnupg keyring mako mongodb mysql neutron nova"
115 +IUSE+=" openssl portage profile redis selinux test timelib raet +zeromq vim-syntax"
116 +
117 +RDEPEND="sys-apps/pciutils
118 + dev-python/jinja[${PYTHON_USEDEP}]
119 + >=dev-python/msgpack-0.3[${PYTHON_USEDEP}]
120 + dev-python/pyyaml[${PYTHON_USEDEP}]
121 + dev-python/markupsafe[${PYTHON_USEDEP}]
122 + >=dev-python/requests-1.0.0[${PYTHON_USEDEP}]
123 + dev-python/setuptools[${PYTHON_USEDEP}]
124 + >=www-servers/tornado-4.2.1[${PYTHON_USEDEP}]
125 + virtual/python-futures[${PYTHON_USEDEP}]
126 + libcloud? ( >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] )
127 + mako? ( dev-python/mako[${PYTHON_USEDEP}] )
128 + ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] )
129 + libvirt? ( dev-python/libvirt-python[${PYTHON_USEDEP}] )
130 + openssl? (
131 + dev-libs/openssl:*[-bindist]
132 + dev-python/pyopenssl[${PYTHON_USEDEP}]
133 + )
134 + raet? (
135 + >=dev-python/libnacl-1.0.0[${PYTHON_USEDEP}]
136 + >=dev-python/ioflo-1.1.7[${PYTHON_USEDEP}]
137 + >=dev-python/raet-0.6.0[${PYTHON_USEDEP}]
138 + )
139 + zeromq? (
140 + >=dev-python/pyzmq-2.2.0[${PYTHON_USEDEP}]
141 + >=dev-python/pycrypto-2.6.1[${PYTHON_USEDEP}]
142 + )
143 + cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] )
144 + mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] )
145 + portage? ( sys-apps/portage[${PYTHON_USEDEP}] )
146 + keyring? ( dev-python/keyring[${PYTHON_USEDEP}] )
147 + mysql? ( dev-python/mysql-python[${PYTHON_USEDEP}] )
148 + redis? ( dev-python/redis-py[${PYTHON_USEDEP}] )
149 + selinux? ( sec-policy/selinux-salt )
150 + timelib? ( dev-python/timelib[${PYTHON_USEDEP}] )
151 + nova? ( >=dev-python/python-novaclient-2.17.0[${PYTHON_USEDEP}] )
152 + neutron? ( >=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}] )
153 + gnupg? ( dev-python/python-gnupg[${PYTHON_USEDEP}] )
154 + profile? ( dev-python/yappi[${PYTHON_USEDEP}] )
155 + vim-syntax? ( app-vim/salt-vim )"
156 +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
157 + test? (
158 + dev-python/pytest-salt[${PYTHON_USEDEP}]
159 + dev-python/psutil[${PYTHON_USEDEP}]
160 + dev-python/pytest[${PYTHON_USEDEP}]
161 + dev-python/pip[${PYTHON_USEDEP}]
162 + dev-python/virtualenv[${PYTHON_USEDEP}]
163 + dev-python/mock[${PYTHON_USEDEP}]
164 + dev-python/timelib[${PYTHON_USEDEP}]
165 + >=dev-python/boto-2.32.1[${PYTHON_USEDEP}]
166 + !x86? ( >=dev-python/boto3-1.2.1[${PYTHON_USEDEP}] )
167 + >=dev-python/moto-0.3.6[${PYTHON_USEDEP}]
168 + >=dev-python/SaltTesting-2016.5.11[${PYTHON_USEDEP}]
169 + >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}]
170 + ${RDEPEND}
171 + )"
172 +
173 +DOCS=( README.rst AUTHORS )
174 +
175 +REQUIRED_USE="|| ( raet zeromq )"
176 +RESTRICT="x86? ( test )"
177 +
178 +PATCHES=(
179 + "${FILESDIR}/salt-2017.7.0-dont-realpath-tmpdir.patch"
180 + "${FILESDIR}/salt-2017.7.2-fix_disk_format.patch"
181 +)
182 +
183 +python_prepare() {
184 + rm tests/unit/{test_zypp_plugins.py,utils/test_extend.py} || die
185 + rm tests/unit/modules/test_boto_{vpc,secgroup,elb}.py || die
186 + rm tests/unit/states/test_boto_vpc.py || die
187 +}
188 +
189 +python_install_all() {
190 + local svc
191 + USE_SETUPTOOLS=1 distutils-r1_python_install_all
192 +
193 + for svc in minion master syndic api; do
194 + newinitd "${FILESDIR}"/${svc}-initd-4 salt-${svc}
195 + newconfd "${FILESDIR}"/${svc}-confd-1 salt-${svc}
196 + systemd_dounit "${FILESDIR}"/salt-${svc}.service
197 + done
198 +
199 + insinto /etc/${PN}
200 + doins -r conf/*
201 +}
202 +
203 +python_test() {
204 + local tempdir
205 + # testsuite likes lots of files
206 + ulimit -n 3072 || die
207 +
208 + # ${T} is too long a path for the tests to work
209 + tempdir="$(mktemp -du --tmpdir=/tmp salt-XXX)"
210 + mkdir "${T}/$(basename "${tempdir}")"
211 + mkdir "${BUILD_DIR}"/../{templates,conf/cloud.{providers,profiles,maps}.d} || die
212 +
213 + (
214 + cleanup() {
215 + rm -f "${tempdir}"
216 + rmdir "${BUILD_DIR}"/../{templates,conf/cloud.{providers,profiles,maps}.d} || die
217 + }
218 +
219 + trap cleanup EXIT
220 +
221 + addwrite "${tempdir}"
222 + ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}"
223 +
224 + USE_SETUPTOOLS=1 SHELL="/bin/bash" \
225 + TMPDIR="${tempdir}" \
226 + ${EPYTHON} tests/runtests.py \
227 + --unit-tests --no-report --verbose
228 +
229 + ) || die "testing failed"
230 +}