Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/oslo-middleware/, dev-python/oslo-middleware/files/
Date: Tue, 02 May 2017 09:48:13
Message-Id: 1493718469.17521c754424b67a0e703bdeeedbd9bb05e79a1a.mgorny@gentoo
1 commit: 17521c754424b67a0e703bdeeedbd9bb05e79a1a
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 2 08:59:08 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue May 2 09:47:49 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17521c75
7
8 dev-python/oslo-middleware: Clean old versions up
9
10 dev-python/oslo-middleware/Manifest | 3 -
11 .../files/cve-2017-2592-stable-mitaka.patch | 90 ----------------------
12 .../files/cve-2017-2592-stable-newton.patch | 90 ----------------------
13 .../oslo-middleware-3.19.0-r1.ebuild | 58 --------------
14 .../oslo-middleware/oslo-middleware-3.19.1.ebuild | 60 ---------------
15 .../oslo-middleware-3.8.0-r2.ebuild | 59 --------------
16 6 files changed, 360 deletions(-)
17
18 diff --git a/dev-python/oslo-middleware/Manifest b/dev-python/oslo-middleware/Manifest
19 index dbca57a39e1..d98b6be4a69 100644
20 --- a/dev-python/oslo-middleware/Manifest
21 +++ b/dev-python/oslo-middleware/Manifest
22 @@ -1,4 +1 @@
23 -DIST oslo.middleware-3.19.0.tar.gz 41711 SHA256 f36c37b9d8f4c6eccc494172569184c3f9a4028a6401e8cf75d7656fc7b1d292 SHA512 e347f9f683b8e925286390fc84eb5aebb76b6f490d564f9273b6d53762bbd9f09dab3dc5f740ab4eb0849de00381ad71264b0d8c048629b770b8740243300e50 WHIRLPOOL aa08f79b269cc1dc2c3c54f121e2de783a9f4b13c0fc1d9be492044cd4c34f59a4b2446efab2870d1cfdaa932f41cc5075ee4bd01876edb34d94b35c2d575211
24 -DIST oslo.middleware-3.19.1.tar.gz 43000 SHA256 a484a27276bb4fd96a21fdaa7d0da0495aa2a2887a88dcec271ffd8b8c239096 SHA512 7d387466cc1352651d81b6f874f18bfb892af8b4187c93131597cfb1e731394654cfd65a17729b22a36bd388b3eee8692936af28786812e50bb2549a76555c96 WHIRLPOOL 6942f7003d6242a12c7cb3ef27331f749244e1fe930e4817804db63c405f9a6c6da3bf07cff2a60b24d38c3aaebf8aac835168ba704c4f3a427590e0284c36fb
25 DIST oslo.middleware-3.23.1.tar.gz 52469 SHA256 fab9a0779ff196020875c7e47e6c36b9d6c9468063645b857e687114e70a8019 SHA512 155f88184216ef18a265b996973b616a3b7a9e52618d95235a396e099bcfb5f51a5dded8e1f039df4d648a0b779c8a6daab9d6b8ff091981c17524a8521ac72a WHIRLPOOL 683d78da63af0d68b6301aa718562cd29f8dc09511df53fb0394311bbda7727edadd975401f81e8ee5c6f35a4e9e8d636bd140b786fec4e7f9c3b0f0015f02e8
26 -DIST oslo.middleware-3.8.0.tar.gz 39756 SHA256 2d985b238182cf70c1adbe1a041eb96eacde3106751fe2c7f1cd81d57a4dbda2 SHA512 575708b9f19938787d4d42accfbafcd63a9cee0aeb871dc0b3dd504dc4d5f97db27abfcfd7ae56dfc7d68eb670c11f93c1f79d3fd02d30247497614b3f51d80a WHIRLPOOL 2498c2a67ca83214c8512a2a86d78155638a107971d7a98a3534c625138c89f56273ab6dda437399799a6960129f4c7dfa758d2af46ede15813d7614d5db3a6d
27
28 diff --git a/dev-python/oslo-middleware/files/cve-2017-2592-stable-mitaka.patch b/dev-python/oslo-middleware/files/cve-2017-2592-stable-mitaka.patch
29 deleted file mode 100644
30 index b38cd597c3d..00000000000
31 --- a/dev-python/oslo-middleware/files/cve-2017-2592-stable-mitaka.patch
32 +++ /dev/null
33 @@ -1,90 +0,0 @@
34 -From 095e90929d114e4b6cece67cb405741c14747356 Mon Sep 17 00:00:00 2001
35 -From: Jamie Lennox <jamielennox@×××××.com>
36 -Date: Wed, 28 Sep 2016 15:03:53 +1000
37 -Subject: [PATCH] Filter token data out of catch_errors middleware
38 -
39 -If an exception is caught by the catch_errors middleware the entire
40 -request is dumped into the log including sensitive information like
41 -tokens. Filter that information before outputting the failed request.
42 -
43 -Closes-Bug: #1628031
44 -Change-Id: I2563403993513c37751576223275350cac2e0937
45 ----
46 - oslo_middleware/catch_errors.py | 6 +++++-
47 - oslo_middleware/tests/test_catch_errors.py | 25 +++++++++++++++++++++++++
48 - 2 files changed, 30 insertions(+), 1 deletion(-)
49 -
50 -diff --git a/oslo_middleware/catch_errors.py b/oslo_middleware/catch_errors.py
51 -index 43d085f..0934fc5 100644
52 ---- a/oslo_middleware/catch_errors.py
53 -+++ b/oslo_middleware/catch_errors.py
54 -@@ -14,6 +14,7 @@
55 - # under the License.
56 -
57 - import logging
58 -+import re
59 -
60 - import webob.dec
61 - import webob.exc
62 -@@ -24,6 +25,8 @@ from oslo_middleware import base
63 -
64 - LOG = logging.getLogger(__name__)
65 -
66 -+_TOKEN_RE = re.compile('^(X-\w+-Token):.*$', flags=re.MULTILINE)
67 -+
68 -
69 - class CatchErrors(base.ConfigurableMiddleware):
70 - """Middleware that provides high-level error handling.
71 -@@ -37,7 +40,8 @@ class CatchErrors(base.ConfigurableMiddleware):
72 - try:
73 - response = req.get_response(self.application)
74 - except Exception:
75 -+ req_str = _TOKEN_RE.sub(r'\1: <removed>', req.as_text())
76 - LOG.exception(_LE('An error occurred during '
77 -- 'processing the request: %s'), req)
78 -+ 'processing the request: %s'), req_str)
79 - response = webob.exc.HTTPInternalServerError()
80 - return response
81 -diff --git a/oslo_middleware/tests/test_catch_errors.py b/oslo_middleware/tests/test_catch_errors.py
82 -index 920bbe2..0b675e2 100644
83 ---- a/oslo_middleware/tests/test_catch_errors.py
84 -+++ b/oslo_middleware/tests/test_catch_errors.py
85 -@@ -13,6 +13,7 @@
86 - # License for the specific language governing permissions and limitations
87 - # under the License.
88 -
89 -+import fixtures
90 - import mock
91 - from oslotest import base as test_base
92 - import webob.dec
93 -@@ -45,3 +46,27 @@ class CatchErrorsTest(test_base.BaseTestCase):
94 - self._test_has_request_id(application,
95 - webob.exc.HTTPInternalServerError.code)
96 - self.assertEqual(1, log_exc.call_count)
97 -+
98 -+ def test_filter_tokens_from_log(self):
99 -+ logger = self.useFixture(fixtures.FakeLogger(nuke_handlers=False))
100 -+
101 -+ @webob.dec.wsgify
102 -+ def application(req):
103 -+ raise Exception()
104 -+
105 -+ app = catch_errors.CatchErrors(application)
106 -+ req = webob.Request.blank('/test',
107 -+ text=u'test data',
108 -+ method='POST',
109 -+ headers={'X-Auth-Token': 'secret1',
110 -+ 'X-Service-Token': 'secret2',
111 -+ 'X-Other-Token': 'secret3'})
112 -+ res = req.get_response(app)
113 -+ self.assertEqual(500, res.status_int)
114 -+
115 -+ output = logger.output
116 -+
117 -+ self.assertIn('X-Auth-Token: <removed>', output)
118 -+ self.assertIn('X-Service-Token: <removed>', output)
119 -+ self.assertIn('X-Other-Token: <removed>', output)
120 -+ self.assertIn('test data', output)
121 ---
122 -2.7.4
123 -
124
125 diff --git a/dev-python/oslo-middleware/files/cve-2017-2592-stable-newton.patch b/dev-python/oslo-middleware/files/cve-2017-2592-stable-newton.patch
126 deleted file mode 100644
127 index b38cd597c3d..00000000000
128 --- a/dev-python/oslo-middleware/files/cve-2017-2592-stable-newton.patch
129 +++ /dev/null
130 @@ -1,90 +0,0 @@
131 -From 095e90929d114e4b6cece67cb405741c14747356 Mon Sep 17 00:00:00 2001
132 -From: Jamie Lennox <jamielennox@×××××.com>
133 -Date: Wed, 28 Sep 2016 15:03:53 +1000
134 -Subject: [PATCH] Filter token data out of catch_errors middleware
135 -
136 -If an exception is caught by the catch_errors middleware the entire
137 -request is dumped into the log including sensitive information like
138 -tokens. Filter that information before outputting the failed request.
139 -
140 -Closes-Bug: #1628031
141 -Change-Id: I2563403993513c37751576223275350cac2e0937
142 ----
143 - oslo_middleware/catch_errors.py | 6 +++++-
144 - oslo_middleware/tests/test_catch_errors.py | 25 +++++++++++++++++++++++++
145 - 2 files changed, 30 insertions(+), 1 deletion(-)
146 -
147 -diff --git a/oslo_middleware/catch_errors.py b/oslo_middleware/catch_errors.py
148 -index 43d085f..0934fc5 100644
149 ---- a/oslo_middleware/catch_errors.py
150 -+++ b/oslo_middleware/catch_errors.py
151 -@@ -14,6 +14,7 @@
152 - # under the License.
153 -
154 - import logging
155 -+import re
156 -
157 - import webob.dec
158 - import webob.exc
159 -@@ -24,6 +25,8 @@ from oslo_middleware import base
160 -
161 - LOG = logging.getLogger(__name__)
162 -
163 -+_TOKEN_RE = re.compile('^(X-\w+-Token):.*$', flags=re.MULTILINE)
164 -+
165 -
166 - class CatchErrors(base.ConfigurableMiddleware):
167 - """Middleware that provides high-level error handling.
168 -@@ -37,7 +40,8 @@ class CatchErrors(base.ConfigurableMiddleware):
169 - try:
170 - response = req.get_response(self.application)
171 - except Exception:
172 -+ req_str = _TOKEN_RE.sub(r'\1: <removed>', req.as_text())
173 - LOG.exception(_LE('An error occurred during '
174 -- 'processing the request: %s'), req)
175 -+ 'processing the request: %s'), req_str)
176 - response = webob.exc.HTTPInternalServerError()
177 - return response
178 -diff --git a/oslo_middleware/tests/test_catch_errors.py b/oslo_middleware/tests/test_catch_errors.py
179 -index 920bbe2..0b675e2 100644
180 ---- a/oslo_middleware/tests/test_catch_errors.py
181 -+++ b/oslo_middleware/tests/test_catch_errors.py
182 -@@ -13,6 +13,7 @@
183 - # License for the specific language governing permissions and limitations
184 - # under the License.
185 -
186 -+import fixtures
187 - import mock
188 - from oslotest import base as test_base
189 - import webob.dec
190 -@@ -45,3 +46,27 @@ class CatchErrorsTest(test_base.BaseTestCase):
191 - self._test_has_request_id(application,
192 - webob.exc.HTTPInternalServerError.code)
193 - self.assertEqual(1, log_exc.call_count)
194 -+
195 -+ def test_filter_tokens_from_log(self):
196 -+ logger = self.useFixture(fixtures.FakeLogger(nuke_handlers=False))
197 -+
198 -+ @webob.dec.wsgify
199 -+ def application(req):
200 -+ raise Exception()
201 -+
202 -+ app = catch_errors.CatchErrors(application)
203 -+ req = webob.Request.blank('/test',
204 -+ text=u'test data',
205 -+ method='POST',
206 -+ headers={'X-Auth-Token': 'secret1',
207 -+ 'X-Service-Token': 'secret2',
208 -+ 'X-Other-Token': 'secret3'})
209 -+ res = req.get_response(app)
210 -+ self.assertEqual(500, res.status_int)
211 -+
212 -+ output = logger.output
213 -+
214 -+ self.assertIn('X-Auth-Token: <removed>', output)
215 -+ self.assertIn('X-Service-Token: <removed>', output)
216 -+ self.assertIn('X-Other-Token: <removed>', output)
217 -+ self.assertIn('test data', output)
218 ---
219 -2.7.4
220 -
221
222 diff --git a/dev-python/oslo-middleware/oslo-middleware-3.19.0-r1.ebuild b/dev-python/oslo-middleware/oslo-middleware-3.19.0-r1.ebuild
223 deleted file mode 100644
224 index 6ae34cd3b49..00000000000
225 --- a/dev-python/oslo-middleware/oslo-middleware-3.19.0-r1.ebuild
226 +++ /dev/null
227 @@ -1,58 +0,0 @@
228 -# Copyright 1999-2017 Gentoo Foundation
229 -# Distributed under the terms of the GNU General Public License v2
230 -
231 -EAPI=6
232 -PYTHON_COMPAT=( python2_7 python3_4 python3_5 )
233 -
234 -inherit distutils-r1
235 -
236 -DESCRIPTION="Components injected into wsgi pipelines to intercept request/response flows."
237 -HOMEPAGE="https://pypi.python.org/pypi/oslo.middleware"
238 -SRC_URI="mirror://pypi/${PN:0:1}/oslo.middleware/oslo.middleware-${PV}.tar.gz"
239 -S="${WORKDIR}/oslo.middleware-${PV}"
240 -
241 -LICENSE="Apache-2.0"
242 -SLOT="0"
243 -KEYWORDS="amd64 ~arm64 x86"
244 -IUSE="test"
245 -
246 -PATCHES=( "${FILESDIR}/cve-2017-2592-stable-newton.patch" )
247 -
248 -CDEPEND="
249 - >=dev-python/pbr-1.6[${PYTHON_USEDEP}]
250 - <dev-python/pbr-2.0[${PYTHON_USEDEP}]"
251 -DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
252 - ${CDEPEND}
253 - test? (
254 - >=dev-python/fixtures-3.0.0[${PYTHON_USEDEP}]
255 - >=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
256 - >=dev-python/oslo-sphinx-2.5.0[${PYTHON_USEDEP}]
257 - !~dev-python/oslo-sphinx-3.4.0[${PYTHON_USEDEP}]
258 - >=dev-python/oslotest-1.10.0[${PYTHON_USEDEP}]
259 - >=dev-python/sphinx-1.1.2[${PYTHON_USEDEP}]
260 - !~dev-python/sphinx-1.2.0[${PYTHON_USEDEP}]
261 - <dev-python/sphinx-1.3.0[${PYTHON_USEDEP}]
262 - >=dev-python/testtools-1.4.0[${PYTHON_USEDEP}]
263 - >=dev-python/coverage-3.6[${PYTHON_USEDEP}]
264 - )"
265 -RDEPEND="
266 - ${CDEPEND}
267 - >=dev-python/jinja-2.8[${PYTHON_USEDEP}]
268 - >=dev-python/oslo-config-3.14.0[${PYTHON_USEDEP}]
269 - >=dev-python/oslo-context-2.9.0[${PYTHON_USEDEP}]
270 - >=dev-python/oslo-i18n-2.1.0[${PYTHON_USEDEP}]
271 - >=dev-python/oslo-utils-3.16.0[${PYTHON_USEDEP}]
272 - >=dev-python/six-1.9.0[${PYTHON_USEDEP}]
273 - >=dev-python/stevedore-1.16.0[${PYTHON_USEDEP}]
274 - >=dev-python/webob-1.2.3[${PYTHON_USEDEP}]
275 - >=dev-python/debtcollector-1.2.0[${PYTHON_USEDEP}]
276 -"
277 -
278 -python_prepare_all() {
279 - sed -i '/^hacking/d' test-requirements.txt || die
280 - distutils-r1_python_prepare_all
281 -}
282 -
283 -python_test() {
284 - nosetests tests/ || die "test failed under ${EPYTHON}"
285 -}
286
287 diff --git a/dev-python/oslo-middleware/oslo-middleware-3.19.1.ebuild b/dev-python/oslo-middleware/oslo-middleware-3.19.1.ebuild
288 deleted file mode 100644
289 index 65ebfa842e3..00000000000
290 --- a/dev-python/oslo-middleware/oslo-middleware-3.19.1.ebuild
291 +++ /dev/null
292 @@ -1,60 +0,0 @@
293 -# Copyright 1999-2017 Gentoo Foundation
294 -# Distributed under the terms of the GNU General Public License v2
295 -
296 -EAPI=6
297 -PYTHON_COMPAT=( python2_7 python3_4 python3_5 )
298 -
299 -inherit distutils-r1
300 -
301 -DESCRIPTION="Components injected into wsgi pipelines to intercept request/response flows."
302 -HOMEPAGE="https://pypi.python.org/pypi/oslo.middleware"
303 -SRC_URI="mirror://pypi/${PN:0:1}/oslo.middleware/oslo.middleware-${PV}.tar.gz"
304 -S="${WORKDIR}/oslo.middleware-${PV}"
305 -
306 -LICENSE="Apache-2.0"
307 -SLOT="0"
308 -KEYWORDS="~amd64 ~arm64 ~x86"
309 -IUSE="test"
310 -
311 -PATCHES=(
312 -
313 -)
314 -
315 -CDEPEND="
316 - >=dev-python/pbr-1.6[${PYTHON_USEDEP}]
317 - <dev-python/pbr-2.0[${PYTHON_USEDEP}]"
318 -DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
319 - ${CDEPEND}
320 - test? (
321 - >=dev-python/fixtures-3.0.0[${PYTHON_USEDEP}]
322 - >=dev-python/mock-2.0.0[${PYTHON_USEDEP}]
323 - >=dev-python/oslo-sphinx-2.5.0[${PYTHON_USEDEP}]
324 - !~dev-python/oslo-sphinx-3.4.0[${PYTHON_USEDEP}]
325 - >=dev-python/oslotest-1.10.0[${PYTHON_USEDEP}]
326 - >=dev-python/sphinx-1.1.2[${PYTHON_USEDEP}]
327 - !~dev-python/sphinx-1.2.0[${PYTHON_USEDEP}]
328 - <dev-python/sphinx-1.3.0[${PYTHON_USEDEP}]
329 - >=dev-python/testtools-1.4.0[${PYTHON_USEDEP}]
330 - >=dev-python/coverage-3.6[${PYTHON_USEDEP}]
331 - )"
332 -RDEPEND="
333 - ${CDEPEND}
334 - >=dev-python/jinja-2.8[${PYTHON_USEDEP}]
335 - >=dev-python/oslo-config-3.14.0[${PYTHON_USEDEP}]
336 - >=dev-python/oslo-context-2.9.0[${PYTHON_USEDEP}]
337 - >=dev-python/oslo-i18n-2.1.0[${PYTHON_USEDEP}]
338 - >=dev-python/oslo-utils-3.16.0[${PYTHON_USEDEP}]
339 - >=dev-python/six-1.9.0[${PYTHON_USEDEP}]
340 - >=dev-python/stevedore-1.16.0[${PYTHON_USEDEP}]
341 - >=dev-python/webob-1.2.3[${PYTHON_USEDEP}]
342 - >=dev-python/debtcollector-1.2.0[${PYTHON_USEDEP}]
343 -"
344 -
345 -python_prepare_all() {
346 - sed -i '/^hacking/d' test-requirements.txt || die
347 - distutils-r1_python_prepare_all
348 -}
349 -
350 -python_test() {
351 - nosetests tests/ || die "test failed under ${EPYTHON}"
352 -}
353
354 diff --git a/dev-python/oslo-middleware/oslo-middleware-3.8.0-r2.ebuild b/dev-python/oslo-middleware/oslo-middleware-3.8.0-r2.ebuild
355 deleted file mode 100644
356 index b005d0f5161..00000000000
357 --- a/dev-python/oslo-middleware/oslo-middleware-3.8.0-r2.ebuild
358 +++ /dev/null
359 @@ -1,59 +0,0 @@
360 -# Copyright 1999-2017 Gentoo Foundation
361 -# Distributed under the terms of the GNU General Public License v2
362 -
363 -EAPI=5
364 -PYTHON_COMPAT=( python2_7 python3_4 python3_5 )
365 -
366 -inherit distutils-r1
367 -
368 -DESCRIPTION="Components injected into wsgi pipelines to intercept request/response flows."
369 -HOMEPAGE="https://pypi.python.org/pypi/oslo.middleware"
370 -SRC_URI="mirror://pypi/${PN:0:1}/oslo.middleware/oslo.middleware-${PV}.tar.gz"
371 -S="${WORKDIR}/oslo.middleware-${PV}"
372 -
373 -LICENSE="Apache-2.0"
374 -SLOT="0"
375 -KEYWORDS="amd64 ~arm64 x86"
376 -IUSE="test"
377 -
378 -FILES=( "${FILESDIR}/cve-2017-2592-stable-mitaka.patch" )
379 -
380 -CDEPEND="
381 - >=dev-python/pbr-1.6[${PYTHON_USEDEP}]
382 - <dev-python/pbr-2.0[${PYTHON_USEDEP}]"
383 -DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]
384 - ${CDEPEND}
385 - test? (
386 - >=dev-python/fixtures-1.3.1[${PYTHON_USEDEP}]
387 - >=dev-python/mock-1.2[${PYTHON_USEDEP}]
388 - >=dev-python/oslo-sphinx-2.5.0[${PYTHON_USEDEP}]
389 - !~dev-python/oslo-sphinx-3.4.0[${PYTHON_USEDEP}]
390 - >=dev-python/oslotest-1.10.0[${PYTHON_USEDEP}]
391 - >=dev-python/sphinx-1.1.2[${PYTHON_USEDEP}]
392 - !~dev-python/sphinx-1.2.0[${PYTHON_USEDEP}]
393 - <dev-python/sphinx-1.3.0[${PYTHON_USEDEP}]
394 - >=dev-python/testtools-1.4.0[${PYTHON_USEDEP}]
395 - >=dev-python/coverage-3.6[${PYTHON_USEDEP}]
396 - )"
397 -RDEPEND="
398 - ${CDEPEND}
399 - >=dev-python/Babel-1.3[${PYTHON_USEDEP}]
400 - >=dev-python/jinja-2.8[${PYTHON_USEDEP}]
401 - >=dev-python/oslo-config-3.7.0[${PYTHON_USEDEP}]
402 - >=dev-python/oslo-context-0.2.0[${PYTHON_USEDEP}]
403 - >=dev-python/oslo-i18n-2.1.0[${PYTHON_USEDEP}]
404 - >=dev-python/oslo-utils-3.5.0[${PYTHON_USEDEP}]
405 - >=dev-python/six-1.9.0[${PYTHON_USEDEP}]
406 - >=dev-python/stevedore-1.5.0[${PYTHON_USEDEP}]
407 - >=dev-python/webob-1.2.3[${PYTHON_USEDEP}]
408 - >=dev-python/debtcollector-1.2.0[${PYTHON_USEDEP}]
409 -"
410 -
411 -python_prepare_all() {
412 - sed -i '/^hacking/d' test-requirements.txt || die
413 - distutils-r1_python_prepare_all
414 -}
415 -
416 -python_test() {
417 - nosetests tests/ || die "test failed under ${EPYTHON}"
418 -}