1 |
commit: a71dd49cbd39fe665d469ff392d31816436610a1 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 6 08:07:42 2022 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 6 08:07:42 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a71dd49c |
7 |
|
8 |
net-analyzer/graphite-web-1.1.8: version bump, fix pyparsing interaction |
9 |
|
10 |
Closes: https://bugs.gentoo.org/829727 |
11 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
12 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
13 |
|
14 |
net-analyzer/graphite-web/Manifest | 3 +- |
15 |
.../files/graphite-web-1.1.8-pyparsing3.patch | 60 ++++++++++++++ |
16 |
.../graphite-web/graphite-web-1.1.5-r1.ebuild | 93 ---------------------- |
17 |
...-web-1.1.7.ebuild => graphite-web-1.1.8.ebuild} | 6 +- |
18 |
4 files changed, 65 insertions(+), 97 deletions(-) |
19 |
|
20 |
diff --git a/net-analyzer/graphite-web/Manifest b/net-analyzer/graphite-web/Manifest |
21 |
index 7a5d3aca5d0a..d34c717db751 100644 |
22 |
--- a/net-analyzer/graphite-web/Manifest |
23 |
+++ b/net-analyzer/graphite-web/Manifest |
24 |
@@ -1,2 +1 @@ |
25 |
-DIST graphite-web-1.1.5.tar.gz 1173809 BLAKE2B 94a1b4deab3159d3bde2d3c8b6f9664f39942cb1b815ce042b196be3c0e769ee1acac4b619135e9471360849308b90e02e1df4f7d6b7d0ef31e46d38ee2425e5 SHA512 b2097609ca77a40e6e7d83a3141335e2208d69e7f4edbac8ce3505ed9dd654589836a3b3498bfb7f7585332bceeb8e367f0c10f3cf6afdb5ad6b96377338a7bb |
26 |
-DIST graphite-web-1.1.7.tar.gz 1173818 BLAKE2B e2373360897c1447d60cbf84e5d0dd280130730f617ba12cf0195ed2539f55bcfe8a1cb3b6b9e4f9540a6f08ecb7870072aa61447012baa5553878ebf417937f SHA512 eb0a1de35d3535bd1fdc4e6edc6fe50fd6c8789fef4807eb4cd30d6b20e91e09d21daedb80f55339a8c05325db8fe1038e7a461bf155e41555dee60160d5b241 |
27 |
+DIST graphite-web-1.1.8.tar.gz 1177214 BLAKE2B 20e058feff0fa7f12393cfd41acca7cf05ff6a3995aa5f6547764fae3b8824e8b424efb8d5d47227eb2b5591ae6b45ab960da30f810acb4f1fbd0b9ae78ec47b SHA512 4637a541e61f56c1ac69bf18e7eab88ecf93f59099dc3e8022d8bf8fb1b204672bc0a1b5302e5031701714db17aabb316ba40f4cfabb2bf4fb0dedb8f412e4a9 |
28 |
|
29 |
diff --git a/net-analyzer/graphite-web/files/graphite-web-1.1.8-pyparsing3.patch b/net-analyzer/graphite-web/files/graphite-web-1.1.8-pyparsing3.patch |
30 |
new file mode 100644 |
31 |
index 000000000000..6a1c44ff0109 |
32 |
--- /dev/null |
33 |
+++ b/net-analyzer/graphite-web/files/graphite-web-1.1.8-pyparsing3.patch |
34 |
@@ -0,0 +1,60 @@ |
35 |
+Modified to apply on 1.1.8 release |
36 |
+ |
37 |
+From 5de8405307ded14930b3381380e9f91e583172a9 Mon Sep 17 00:00:00 2001 |
38 |
+From: parrotpock <51694161+parrotpock@××××××××××××××××××××.com> |
39 |
+Date: Mon, 15 Nov 2021 17:39:23 +0100 |
40 |
+Subject: [PATCH] Fix pyparsing > 3.0 compatibility issue. (#2727) |
41 |
+ |
42 |
+* Fix bool() issue in recursion termination check. |
43 |
+ |
44 |
+The behaviour of ParsedResults seems to have changed in the way that |
45 |
+the usage of pop() along with the bool() check on the object interact |
46 |
+wrt checking if there are further elements in the parsed structure to |
47 |
+consume. In version > 3.0 bool() checks whether either the internal |
48 |
+_toklist or _tokdict members contain items left to consume and returns |
49 |
+True if either do, whereas pop with no arguments will only consume from |
50 |
+the underlying list. That means that we would get a True in the if |
51 |
+condition in this code, whereas a subsequent call to pop() would throw |
52 |
+an exception. Calling asList() forces the use of the list representation |
53 |
+in the bool check here and so fixes this issue. |
54 |
+ |
55 |
+* Fix pyparsing backwards compatibility issue. |
56 |
+ |
57 |
+* Remove upper-bound on pin. |
58 |
+ |
59 |
+* Add pyparsing3 test target for versions >= 3.0.6 |
60 |
+ |
61 |
+* Remove try/except, use dictionary key index syntax |
62 |
+ |
63 |
+Co-authored-by: Ubuntu <ubuntu@××××××××××××××××××××××××××××××××.internal> |
64 |
+--- |
65 |
+ webapp/graphite/render/evaluator.py | 2 +- |
66 |
+ webapp/graphite/render/grammar_unsafe.py | 2 +- |
67 |
+ 4 files changed, 6 insertions(+), 5 deletions(-) |
68 |
+ |
69 |
+diff --git a/webapp/graphite/render/evaluator.py b/webapp/graphite/render/evaluator.py |
70 |
+index 748626ed0c..12179dcc44 100644 |
71 |
+--- a/webapp/graphite/render/evaluator.py |
72 |
++++ b/webapp/graphite/render/evaluator.py |
73 |
+@@ -58,7 +58,7 @@ def evaluateTokens(requestContext, tokens, replacements=None, pipedArg=None): |
74 |
+ return evaluateTokens(requestContext, tokens.template, arglist) |
75 |
+ |
76 |
+ if tokens.expression: |
77 |
+- if tokens.expression.pipedCalls: |
78 |
++ if tokens.expression.pipedCalls.asList(): |
79 |
+ # when the expression has piped calls, we pop the right-most call and pass the remaining |
80 |
+ # expression into it via pipedArg, to get the same result as a nested call |
81 |
+ rightMost = tokens.expression.pipedCalls.pop() |
82 |
+diff --git a/webapp/graphite/render/grammar_unsafe.py b/webapp/graphite/render/grammar_unsafe.py |
83 |
+index f25b5eff8f..2481176b53 100644 |
84 |
+--- a/webapp/graphite/render/grammar_unsafe.py |
85 |
++++ b/webapp/graphite/render/grammar_unsafe.py |
86 |
+@@ -80,7 +80,7 @@ |
87 |
+ |
88 |
+ |
89 |
+ def setRaw(s, loc, toks): |
90 |
+- toks[0].raw = s[toks[0].start:toks[0].end] |
91 |
++ toks[0]['raw'] = s[toks[0].start:toks[0].end] |
92 |
+ |
93 |
+ |
94 |
+ call = Group( |
95 |
|
96 |
diff --git a/net-analyzer/graphite-web/graphite-web-1.1.5-r1.ebuild b/net-analyzer/graphite-web/graphite-web-1.1.5-r1.ebuild |
97 |
deleted file mode 100644 |
98 |
index dfdaeff5c5b3..000000000000 |
99 |
--- a/net-analyzer/graphite-web/graphite-web-1.1.5-r1.ebuild |
100 |
+++ /dev/null |
101 |
@@ -1,93 +0,0 @@ |
102 |
-# Copyright 1999-2020 Gentoo Authors |
103 |
-# Distributed under the terms of the GNU General Public License v2 |
104 |
- |
105 |
-EAPI=7 |
106 |
-PYTHON_COMPAT=( python3_{7,8} ) |
107 |
- |
108 |
-inherit distutils-r1 prefix |
109 |
- |
110 |
-DESCRIPTION="Enterprise scalable realtime graphing" |
111 |
-HOMEPAGE="https://graphiteapp.org/" |
112 |
-SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" |
113 |
- |
114 |
-LICENSE="Apache-2.0" |
115 |
-SLOT="0" |
116 |
-KEYWORDS="~amd64 ~x86" |
117 |
-IUSE="+carbon ldap mysql memcached postgres +sqlite" |
118 |
- |
119 |
-DEPEND="" |
120 |
-RDEPEND=" |
121 |
- carbon? ( dev-python/carbon[${PYTHON_USEDEP}] ) |
122 |
- ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] ) |
123 |
- memcached? ( dev-python/python-memcached[${PYTHON_USEDEP}] ) |
124 |
- mysql? ( dev-python/mysqlclient[${PYTHON_USEDEP}] ) |
125 |
- postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] ) |
126 |
- >=dev-python/django-1.11.19[sqlite?,${PYTHON_USEDEP}] |
127 |
- >=dev-python/django-tagging-0.4.6[${PYTHON_USEDEP}] |
128 |
- dev-python/cairocffi[${PYTHON_USEDEP}] |
129 |
- dev-python/pyparsing[${PYTHON_USEDEP}] |
130 |
- dev-python/pytz[${PYTHON_USEDEP}] |
131 |
- dev-python/six[${PYTHON_USEDEP}] |
132 |
- dev-python/urllib3[${PYTHON_USEDEP}] |
133 |
- media-libs/fontconfig |
134 |
-" |
135 |
- |
136 |
-PATCHES=( |
137 |
- # Do not install the configuration and data files. We install them |
138 |
- # somewhere sensible by hand. |
139 |
- "${FILESDIR}"/${PN}-1.1.5-fhs-paths.patch |
140 |
-) |
141 |
- |
142 |
-python_prepare_all() { |
143 |
- # Use a less common name |
144 |
- mv bin/build-index bin/${PN}-build-index || die |
145 |
- # use FHS-style paths |
146 |
- export GRAPHITE_NO_PREFIX=yes |
147 |
- distutils-r1_python_prepare_all |
148 |
- eprefixify \ |
149 |
- conf/graphite.wsgi.example \ |
150 |
- webapp/graphite/local_settings.py.example |
151 |
-} |
152 |
- |
153 |
-python_install_all() { |
154 |
- distutils-r1_python_install_all |
155 |
- keepdir /var/{lib,log}/${PN} |
156 |
- docinto examples |
157 |
- docompress -x "/usr/share/doc/${PF}/examples" |
158 |
- dodoc \ |
159 |
- examples/example-graphite-vhost.conf \ |
160 |
- conf/dashboard.conf.example \ |
161 |
- conf/graphite.wsgi.example |
162 |
-} |
163 |
- |
164 |
-python_install() { |
165 |
- distutils-r1_python_install \ |
166 |
- --install-data="${EPREFIX}"/usr/share/${PN} |
167 |
- |
168 |
- insinto /etc/${PN} |
169 |
- newins webapp/graphite/local_settings.py.example local_settings.py |
170 |
- pushd "${D}/$(python_get_sitedir)"/graphite > /dev/null || die |
171 |
- ln -s ../../../../../etc/${PN}/local_settings.py local_settings.py || die |
172 |
- popd > /dev/null || die |
173 |
-} |
174 |
- |
175 |
-pkg_config() { |
176 |
- "${EROOT}"/usr/bin/django-admin.py migrate \ |
177 |
- --settings=graphite.settings --run-syncdb |
178 |
- "${EROOT}"/usr/bin/${PN}-build-index |
179 |
-} |
180 |
- |
181 |
-pkg_postinst() { |
182 |
- # Only display this for new installs |
183 |
- if [[ -z ${REPLACING_VERSIONS} ]]; then |
184 |
- elog "You need to configure ${PN} to run with a WSGI server of your choice." |
185 |
- elog "For example using Apache, you can use www-apache/mod_wsgi," |
186 |
- elog " using Nginx, you can use www-servers/uwsgi." |
187 |
- elog "Don't forget to edit local_settings.py in ${EPREFIX}/etc/${PN}" |
188 |
- elog "See https://graphite.readthedocs.org/en/latest/config-local-settings.html" |
189 |
- elog "Run emerge --config =${PN}-${PVR} if this is a fresh install." |
190 |
- elog "" |
191 |
- elog "If you want to update the search index regularily, you should consider running" |
192 |
- elog "the '${PN}-build-index' script in a crontab." |
193 |
- fi |
194 |
-} |
195 |
|
196 |
diff --git a/net-analyzer/graphite-web/graphite-web-1.1.7.ebuild b/net-analyzer/graphite-web/graphite-web-1.1.8.ebuild |
197 |
similarity index 94% |
198 |
rename from net-analyzer/graphite-web/graphite-web-1.1.7.ebuild |
199 |
rename to net-analyzer/graphite-web/graphite-web-1.1.8.ebuild |
200 |
index 53bd930f12a7..d3392bd0c712 100644 |
201 |
--- a/net-analyzer/graphite-web/graphite-web-1.1.7.ebuild |
202 |
+++ b/net-analyzer/graphite-web/graphite-web-1.1.8.ebuild |
203 |
@@ -1,4 +1,4 @@ |
204 |
-# Copyright 1999-2021 Gentoo Authors |
205 |
+# Copyright 1999-2022 Gentoo Authors |
206 |
# Distributed under the terms of the GNU General Public License v2 |
207 |
|
208 |
EAPI=7 |
209 |
@@ -26,7 +26,7 @@ RDEPEND=" |
210 |
>=dev-python/django-1.11.19[sqlite?,${PYTHON_USEDEP}] |
211 |
>=dev-python/django-tagging-0.4.6[${PYTHON_USEDEP}] |
212 |
dev-python/cairocffi[${PYTHON_USEDEP}] |
213 |
- dev-python/pyparsing[${PYTHON_USEDEP}] |
214 |
+ <dev-python/pyparsing-3[${PYTHON_USEDEP}] |
215 |
dev-python/pytz[${PYTHON_USEDEP}] |
216 |
dev-python/six[${PYTHON_USEDEP}] |
217 |
dev-python/urllib3[${PYTHON_USEDEP}] |
218 |
@@ -37,6 +37,8 @@ PATCHES=( |
219 |
# Do not install the configuration and data files. We install them |
220 |
# somewhere sensible by hand. |
221 |
"${FILESDIR}"/${PN}-1.1.7-fhs-paths.patch |
222 |
+ # pyparsing fix, can be dropped from 1.1.9 onwards |
223 |
+ "${FILESDIR}"/${PN}-1.1.8-pyparsing3.patch |
224 |
) |
225 |
|
226 |
python_prepare_all() { |