1 |
commit: 03f1f332d971ab14ecc8f80ed7faf1c2f79b5581 |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jul 29 19:11:34 2016 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 29 19:11:58 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03f1f332 |
7 |
|
8 |
app-admin/salt: Version bump to 2016.3.2 |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
|
12 |
app-admin/salt/Manifest | 1 + |
13 |
.../salt/files/salt-2016.3.2-broken-tests.patch | 109 ++++++++++++++++ |
14 |
app-admin/salt/salt-2016.3.2.ebuild | 142 +++++++++++++++++++++ |
15 |
3 files changed, 252 insertions(+) |
16 |
|
17 |
diff --git a/app-admin/salt/Manifest b/app-admin/salt/Manifest |
18 |
index 1d0a0a5..ac7250a 100644 |
19 |
--- a/app-admin/salt/Manifest |
20 |
+++ b/app-admin/salt/Manifest |
21 |
@@ -3,3 +3,4 @@ DIST salt-2015.8.10.tar.gz 6972776 SHA256 4a81273ab4b01e0f1d29b28ab99a16eb94e5c4 |
22 |
DIST salt-2015.8.11.tar.gz 7083841 SHA256 7b38ab7433e67785ff231cfd604bc36652f4088f8b93e64d627e74242f4099d7 SHA512 0af029b30525a5be4ffa64ea33b4368b59a9ad64fe4f6cba3af1cf03b53e1c1e0e0fe50371c7e4762a0c3bcbefa7855b6f0b79702f3b146001a2b5484f1731f9 WHIRLPOOL 23af490fa47b84843cb36367aa76698f989e767c044477d0cfad22222f24a9b11c76de0617f4c4859b41094e2bedc4f6b2be331055c95bcd8327ca36e9878d6c |
23 |
DIST salt-2015.8.8.tar.gz 6982904 SHA256 b2ecce7bf562cfcd6586d66ade278f268bb89023f0fa0accaa55f90b8a668ef5 SHA512 add65951694bc9e3aaa6db69bf9ac7ed32a5c42822ae34281ca3ea1e7f393235cd6baa1905362d177c62505a514e1c4599751e1a8a913cc334f9ebe1d4ab7ed3 WHIRLPOOL 9d81b6153019ff0862c6ee0e3fa949810e8066798aabcc94f2b87893f51906e0e19e37aa26023ea578eb10ebb9816d30d12104fdc5018c7ce91790bd617b2bba |
24 |
DIST salt-2016.3.1.tar.gz 7932479 SHA256 e6bdba4693116430c2af57497eb63399e3a139ac0a7016fa0870b49fbe987f75 SHA512 74122020a83df79171b9aa3bc311d1b16930140ec6b063c888d41e10fb8e696f69188b62cf925045b40d8b8fe713759de08978b08bc3b8e1f12722de3a8ddb7b WHIRLPOOL f76afb4d9c6678edf48b608f6dbd27201656fd371b0df78a8a8db306a2cbf5b08fa2fd916e9fb5409b67cd05ab007a3684d91c1e0158416b12f014001de1506a |
25 |
+DIST salt-2016.3.2.tar.gz 8014793 SHA256 6a84b724d02b0dba438dea57650724064675d82620e66749bd2fe8f21da71be0 SHA512 608e2a43bc8c55eeb8c9e0f9207306e591151940ad1ffb869ada12963c0790f37653936e539c0b70439c13180909de2c763db6c30e7f9e2087068985d1b3ff91 WHIRLPOOL 5e6f6dc9980ab6cd6e8c897d140241ce9e6dec8afd08274749a20260c6b871d6e52cd674ed8e838a4aa285bf45c49586d77bc2156f94ee26f4f776d9025040eb |
26 |
|
27 |
diff --git a/app-admin/salt/files/salt-2016.3.2-broken-tests.patch b/app-admin/salt/files/salt-2016.3.2-broken-tests.patch |
28 |
new file mode 100644 |
29 |
index 0000000..3f10611 |
30 |
--- /dev/null |
31 |
+++ b/app-admin/salt/files/salt-2016.3.2-broken-tests.patch |
32 |
@@ -0,0 +1,109 @@ |
33 |
+diff --git a/tests/unit/modules/linux_sysctl_test.py b/tests/unit/modules/linux_sysctl_test.py |
34 |
+index 89bea83..49851cb 100644 |
35 |
+--- a/tests/unit/modules/linux_sysctl_test.py |
36 |
++++ b/tests/unit/modules/linux_sysctl_test.py |
37 |
+@@ -85,18 +85,6 @@ class LinuxSysctlTestCase(TestCase): |
38 |
+ 'net.ipv4.ip_forward', 1), ret) |
39 |
+ |
40 |
+ @patch('os.path.isfile', MagicMock(return_value=False)) |
41 |
+- def test_persist_no_conf_failure(self): |
42 |
+- ''' |
43 |
+- Tests adding of config file failure |
44 |
+- ''' |
45 |
+- with patch('salt.utils.fopen', mock_open()) as m_open: |
46 |
+- helper_open = m_open() |
47 |
+- helper_open.write.assertRaises(CommandExecutionError, |
48 |
+- linux_sysctl.persist, |
49 |
+- 'net.ipv4.ip_forward', |
50 |
+- 1, config=None) |
51 |
+- |
52 |
+- @patch('os.path.isfile', MagicMock(return_value=False)) |
53 |
+ @patch('os.path.exists', MagicMock(return_value=True)) |
54 |
+ def test_persist_no_conf_success(self): |
55 |
+ ''' |
56 |
+diff --git a/tests/unit/modules/mac_sysctl_test.py b/tests/unit/modules/mac_sysctl_test.py |
57 |
+index e90ec64..b2ea691 100644 |
58 |
+--- a/tests/unit/modules/mac_sysctl_test.py |
59 |
++++ b/tests/unit/modules/mac_sysctl_test.py |
60 |
+@@ -67,18 +67,6 @@ class DarwinSysctlTestCase(TestCase): |
61 |
+ 'net.inet.icmp.icmplim', 50), ret) |
62 |
+ |
63 |
+ @patch('os.path.isfile', MagicMock(return_value=False)) |
64 |
+- def test_persist_no_conf_failure(self): |
65 |
+- ''' |
66 |
+- Tests adding of config file failure |
67 |
+- ''' |
68 |
+- with patch('salt.utils.fopen', mock_open()) as m_open: |
69 |
+- helper_open = m_open() |
70 |
+- helper_open.write.assertRaises(CommandExecutionError, |
71 |
+- mac_sysctl.persist, |
72 |
+- 'net.inet.icmp.icmplim', |
73 |
+- 50, config=None) |
74 |
+- |
75 |
+- @patch('os.path.isfile', MagicMock(return_value=False)) |
76 |
+ def test_persist_no_conf_success(self): |
77 |
+ ''' |
78 |
+ Tests successful add of config file when previously not one |
79 |
+diff --git a/tests/unit/modules/mount_test.py b/tests/unit/modules/mount_test.py |
80 |
+index 290c368..16918d8 100644 |
81 |
+--- a/tests/unit/modules/mount_test.py |
82 |
++++ b/tests/unit/modules/mount_test.py |
83 |
+@@ -137,15 +137,6 @@ class MountTestCase(TestCase): |
84 |
+ with patch('salt.utils.fopen', mock_open()): |
85 |
+ self.assertTrue(mount.rm_fstab('name', 'device')) |
86 |
+ |
87 |
+- mock_fstab = MagicMock(return_value={'name': 'name'}) |
88 |
+- with patch.dict(mount.__grains__, {'kernel': ''}): |
89 |
+- with patch.object(mount, 'fstab', mock_fstab): |
90 |
+- with patch('salt.utils.fopen', mock_open()) as m_open: |
91 |
+- helper_open = m_open() |
92 |
+- helper_open.write.assertRaises(CommandExecutionError, |
93 |
+- mount.rm_fstab, |
94 |
+- config=None) |
95 |
+- |
96 |
+ def test_set_fstab(self): |
97 |
+ ''' |
98 |
+ Tests to verify that this mount is represented in the fstab, |
99 |
+@@ -178,14 +169,6 @@ class MountTestCase(TestCase): |
100 |
+ with patch.object(mount, 'automaster', mock): |
101 |
+ self.assertTrue(mount.rm_automaster('name', 'device')) |
102 |
+ |
103 |
+- mock = MagicMock(return_value={'name': 'name'}) |
104 |
+- with patch.object(mount, 'fstab', mock): |
105 |
+- with patch('salt.utils.fopen', mock_open()) as m_open: |
106 |
+- helper_open = m_open() |
107 |
+- helper_open.write.assertRaises(CommandExecutionError, |
108 |
+- mount.rm_automaster, |
109 |
+- 'name', 'device') |
110 |
+- |
111 |
+ def test_set_automaster(self): |
112 |
+ ''' |
113 |
+ Verify that this mount is represented in the auto_salt, change the mount |
114 |
+diff --git a/tests/unit/modules/puppet_test.py b/tests/unit/modules/puppet_test.py |
115 |
+index 02bc2e1..1fd915b 100644 |
116 |
+--- a/tests/unit/modules/puppet_test.py |
117 |
++++ b/tests/unit/modules/puppet_test.py |
118 |
+@@ -85,11 +85,6 @@ class PuppetTestCase(TestCase): |
119 |
+ with patch('salt.utils.fopen', mock_open()): |
120 |
+ self.assertTrue(puppet.disable()) |
121 |
+ |
122 |
+- with patch('salt.utils.fopen', mock_open()) as m_open: |
123 |
+- helper_open = m_open() |
124 |
+- helper_open.write.assertRaises(CommandExecutionError, |
125 |
+- puppet.disable) |
126 |
+- |
127 |
+ def test_status(self): |
128 |
+ ''' |
129 |
+ Test to display puppet agent status |
130 |
+@@ -144,11 +139,6 @@ class PuppetTestCase(TestCase): |
131 |
+ mock_open(read_data="resources: 1")): |
132 |
+ self.assertDictEqual(puppet.summary(), {'resources': 1}) |
133 |
+ |
134 |
+- with patch('salt.utils.fopen', mock_open()) as m_open: |
135 |
+- helper_open = m_open() |
136 |
+- helper_open.write.assertRaises(CommandExecutionError, |
137 |
+- puppet.summary) |
138 |
+- |
139 |
+ def test_plugin_sync(self): |
140 |
+ ''' |
141 |
+ Test to runs a plugin synch between the puppet master and agent |
142 |
|
143 |
diff --git a/app-admin/salt/salt-2016.3.2.ebuild b/app-admin/salt/salt-2016.3.2.ebuild |
144 |
new file mode 100644 |
145 |
index 0000000..3528998 |
146 |
--- /dev/null |
147 |
+++ b/app-admin/salt/salt-2016.3.2.ebuild |
148 |
@@ -0,0 +1,142 @@ |
149 |
+# Copyright 1999-2016 Gentoo Foundation |
150 |
+# Distributed under the terms of the GNU General Public License v2 |
151 |
+# $Id$ |
152 |
+ |
153 |
+EAPI=6 |
154 |
+PYTHON_COMPAT=(python2_7) |
155 |
+ |
156 |
+inherit eutils systemd distutils-r1 |
157 |
+ |
158 |
+DESCRIPTION="Salt is a remote execution and configuration manager" |
159 |
+HOMEPAGE="http://saltstack.org/" |
160 |
+ |
161 |
+if [[ ${PV} == 9999* ]]; then |
162 |
+ inherit git-r3 |
163 |
+ EGIT_REPO_URI="git://github.com/${PN}stack/${PN}.git" |
164 |
+ EGIT_BRANCH="develop" |
165 |
+ SRC_URI="" |
166 |
+ KEYWORDS="" |
167 |
+else |
168 |
+ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
169 |
+ KEYWORDS="~x86 ~amd64" |
170 |
+fi |
171 |
+ |
172 |
+LICENSE="Apache-2.0" |
173 |
+SLOT="0" |
174 |
+IUSE="cherrypy ldap libcloud libvirt gnupg keyring mako mongodb mysql neutron nova" |
175 |
+IUSE+=" openssl portage profile redis selinux test timelib raet +zeromq vim-syntax" |
176 |
+ |
177 |
+RDEPEND="sys-apps/pciutils |
178 |
+ dev-python/jinja[${PYTHON_USEDEP}] |
179 |
+ >=dev-python/msgpack-0.3[${PYTHON_USEDEP}] |
180 |
+ dev-python/pyyaml[${PYTHON_USEDEP}] |
181 |
+ dev-python/markupsafe[${PYTHON_USEDEP}] |
182 |
+ >=dev-python/requests-1.0.0[${PYTHON_USEDEP}] |
183 |
+ dev-python/setuptools[${PYTHON_USEDEP}] |
184 |
+ >=www-servers/tornado-4.2.1[${PYTHON_USEDEP}] |
185 |
+ virtual/python-futures[${PYTHON_USEDEP}] |
186 |
+ libcloud? ( >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] ) |
187 |
+ mako? ( dev-python/mako[${PYTHON_USEDEP}] ) |
188 |
+ ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] ) |
189 |
+ libvirt? ( dev-python/libvirt-python[${PYTHON_USEDEP}] ) |
190 |
+ openssl? ( |
191 |
+ dev-libs/openssl:*[-bindist] |
192 |
+ dev-python/pyopenssl[${PYTHON_USEDEP}] |
193 |
+ ) |
194 |
+ raet? ( |
195 |
+ >=dev-python/libnacl-1.0.0[${PYTHON_USEDEP}] |
196 |
+ >=dev-python/ioflo-1.1.7[${PYTHON_USEDEP}] |
197 |
+ >=dev-python/raet-0.6.0[${PYTHON_USEDEP}] |
198 |
+ ) |
199 |
+ zeromq? ( |
200 |
+ >=dev-python/pyzmq-2.2.0[${PYTHON_USEDEP}] |
201 |
+ >=dev-python/pycrypto-2.6.1[${PYTHON_USEDEP}] |
202 |
+ ) |
203 |
+ cherrypy? ( >=dev-python/cherrypy-3.2.2[${PYTHON_USEDEP}] ) |
204 |
+ mongodb? ( dev-python/pymongo[${PYTHON_USEDEP}] ) |
205 |
+ portage? ( sys-apps/portage[${PYTHON_USEDEP}] ) |
206 |
+ keyring? ( dev-python/keyring[${PYTHON_USEDEP}] ) |
207 |
+ mysql? ( dev-python/mysql-python[${PYTHON_USEDEP}] ) |
208 |
+ redis? ( dev-python/redis-py[${PYTHON_USEDEP}] ) |
209 |
+ selinux? ( sec-policy/selinux-salt ) |
210 |
+ timelib? ( dev-python/timelib[${PYTHON_USEDEP}] ) |
211 |
+ nova? ( >=dev-python/python-novaclient-2.17.0[${PYTHON_USEDEP}] ) |
212 |
+ neutron? ( >=dev-python/python-neutronclient-2.3.6[${PYTHON_USEDEP}] ) |
213 |
+ gnupg? ( dev-python/python-gnupg[${PYTHON_USEDEP}] ) |
214 |
+ profile? ( dev-python/yappi[${PYTHON_USEDEP}] ) |
215 |
+ vim-syntax? ( app-vim/salt-vim )" |
216 |
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}] |
217 |
+ test? ( |
218 |
+ dev-python/psutil[${PYTHON_USEDEP}] |
219 |
+ dev-python/pip[${PYTHON_USEDEP}] |
220 |
+ dev-python/virtualenv[${PYTHON_USEDEP}] |
221 |
+ dev-python/mock[${PYTHON_USEDEP}] |
222 |
+ dev-python/timelib[${PYTHON_USEDEP}] |
223 |
+ >=dev-python/boto-2.32.1[${PYTHON_USEDEP}] |
224 |
+ !x86? ( dev-python/boto3[${PYTHON_USEDEP}] ) |
225 |
+ >=dev-python/moto-0.3.6[${PYTHON_USEDEP}] |
226 |
+ >=dev-python/SaltTesting-2016.5.11[${PYTHON_USEDEP}] |
227 |
+ >=dev-python/libcloud-0.14.0[${PYTHON_USEDEP}] |
228 |
+ ${RDEPEND} |
229 |
+ )" |
230 |
+ |
231 |
+DOCS=(README.rst AUTHORS) |
232 |
+ |
233 |
+REQUIRED_USE="|| ( raet zeromq )" |
234 |
+RESTRICT="x86? ( test )" |
235 |
+ |
236 |
+PATCHES=( |
237 |
+ "${FILESDIR}/${PN}-2015.8.2-tmpdir.patch" |
238 |
+ "${FILESDIR}/${PN}-2016.3.1-dont-realpath-tmpdir.patch" |
239 |
+ "${FILESDIR}/${PN}-2016.3.2-broken-tests.patch" |
240 |
+) |
241 |
+ |
242 |
+python_prepare() { |
243 |
+ # this test fails because it trys to "pip install distribute" |
244 |
+ rm tests/unit/{modules,states}/zcbuildout_test.py \ |
245 |
+ tests/unit/modules/{rh_ip,win_network,random_org}_test.py |
246 |
+ |
247 |
+ # apparently libcloud does not know about this? |
248 |
+ rm tests/unit/cloud/clouds/dimensiondata_test.py |
249 |
+ |
250 |
+ # seriously? "ValueError: Missing (or not readable) key file: '/home/dany/PRIVKEY.pem'" |
251 |
+ rm tests/unit/cloud/clouds/gce_test.py |
252 |
+} |
253 |
+ |
254 |
+python_install_all() { |
255 |
+ local svc |
256 |
+ USE_SETUPTOOLS=1 distutils-r1_python_install_all |
257 |
+ |
258 |
+ for svc in minion master syndic api; do |
259 |
+ newinitd "${FILESDIR}"/${svc}-initd-4 salt-${svc} |
260 |
+ newconfd "${FILESDIR}"/${svc}-confd-1 salt-${svc} |
261 |
+ systemd_dounit "${FILESDIR}"/salt-${svc}.service |
262 |
+ done |
263 |
+ |
264 |
+ insinto /etc/${PN} |
265 |
+ doins -r conf/* |
266 |
+} |
267 |
+ |
268 |
+python_test() { |
269 |
+ local tempdir |
270 |
+ # testsuite likes lots of files |
271 |
+ ulimit -n 3072 |
272 |
+ |
273 |
+ # ${T} is too long a path for the tests to work |
274 |
+ tempdir="$(mktemp -dup /tmp salt-XXX)" |
275 |
+ mkdir "${T}/$(basename "${tempdir}")" |
276 |
+ |
277 |
+ ( |
278 |
+ cleanup() { rm -f "${tempdir}"; } |
279 |
+ trap cleanup EXIT |
280 |
+ |
281 |
+ addwrite "${tempdir}" |
282 |
+ ln -s "$(realpath --relative-to=/tmp "${T}/$(basename "${tempdir}")")" "${tempdir}" |
283 |
+ |
284 |
+ USE_SETUPTOOLS=1 SHELL="/bin/bash" \ |
285 |
+ TMPDIR="${tempdir}" \ |
286 |
+ ${EPYTHON} tests/runtests.py \ |
287 |
+ --unit-tests --no-report --verbose |
288 |
+ |
289 |
+ ) || die "testing failed" |
290 |
+} |