1 |
commit: 48520c2867a182b1983a3e75b7024ab8c97b95e2 |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 23 13:52:23 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 23 13:52:39 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48520c28 |
7 |
|
8 |
net-analyzer/graphite-web: version bump |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
12 |
|
13 |
net-analyzer/graphite-web/Manifest | 1 + |
14 |
.../files/graphite-web-1.1.5-fhs-paths.patch | 63 +++++++++++++ |
15 |
.../graphite-web/graphite-web-1.1.5.ebuild | 100 +++++++++++++++++++++ |
16 |
3 files changed, 164 insertions(+) |
17 |
|
18 |
diff --git a/net-analyzer/graphite-web/Manifest b/net-analyzer/graphite-web/Manifest |
19 |
index 15fe0c57bdd..4f5f75d3c2b 100644 |
20 |
--- a/net-analyzer/graphite-web/Manifest |
21 |
+++ b/net-analyzer/graphite-web/Manifest |
22 |
@@ -1 +1,2 @@ |
23 |
DIST graphite-web-1.1.3.tar.gz 1171342 BLAKE2B f18c84d707f93d897553ec05d7b910a3dba97c6068498d1b216f178ea8a1f64baf59bb572b433a56f5e417a2873c018a38a19c3b8c765f667d7c3fbb38b9ed0a SHA512 3f9de216bd55e4e8de7391087e9b876a16e4f137fd60932a6d5855804c3d9868422645177776258e74486b97ec7a853b63a6d89b1de9b325bcb50ad694208436 |
24 |
+DIST graphite-web-1.1.5.tar.gz 1173809 BLAKE2B 94a1b4deab3159d3bde2d3c8b6f9664f39942cb1b815ce042b196be3c0e769ee1acac4b619135e9471360849308b90e02e1df4f7d6b7d0ef31e46d38ee2425e5 SHA512 b2097609ca77a40e6e7d83a3141335e2208d69e7f4edbac8ce3505ed9dd654589836a3b3498bfb7f7585332bceeb8e367f0c10f3cf6afdb5ad6b96377338a7bb |
25 |
|
26 |
diff --git a/net-analyzer/graphite-web/files/graphite-web-1.1.5-fhs-paths.patch b/net-analyzer/graphite-web/files/graphite-web-1.1.5-fhs-paths.patch |
27 |
new file mode 100644 |
28 |
index 00000000000..4cbbe7213b3 |
29 |
--- /dev/null |
30 |
+++ b/net-analyzer/graphite-web/files/graphite-web-1.1.5-fhs-paths.patch |
31 |
@@ -0,0 +1,63 @@ |
32 |
+Install FHS-style paths |
33 |
+ |
34 |
+--- a/conf/graphite.wsgi.example |
35 |
++++ b/conf/graphite.wsgi.example |
36 |
+@@ -1,4 +1,4 @@ |
37 |
+ import sys |
38 |
+-sys.path.append('/opt/graphite/webapp') |
39 |
++sys.path.append('@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web/webapp') |
40 |
+ |
41 |
+ from graphite.wsgi import application |
42 |
+--- a/setup.py |
43 |
++++ b/setup.py |
44 |
+@@ -107,8 +107,8 @@ |
45 |
+ ], |
46 |
+ package_data={'graphite' : |
47 |
+ ['templates/*', 'local_settings.py.example']}, |
48 |
+- scripts=glob('bin/*'), |
49 |
+- data_files=list(webapp_content.items()) + storage_dirs + conf_files + examples, |
50 |
++ scripts=['bin/graphite-web-build-index'], |
51 |
++ data_files=list(webapp_content.items()), |
52 |
+ install_requires=['Django>=1.8,<2.1', 'django-tagging==0.4.3', 'pytz', 'pyparsing', 'cairocffi', 'urllib3', 'scandir', 'six'], |
53 |
+ classifiers=[ |
54 |
+ 'Intended Audience :: Developers', |
55 |
+--- a/webapp/graphite/local_settings.py.example |
56 |
++++ b/webapp/graphite/local_settings.py.example |
57 |
+@@ -101,6 +101,7 @@ |
58 |
+ # Change only GRAPHITE_ROOT if your install is merely shifted from /opt/graphite |
59 |
+ # to somewhere else |
60 |
+ #GRAPHITE_ROOT = '/opt/graphite' |
61 |
++GRAPHITE_ROOT = '@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web' |
62 |
+ |
63 |
+ # Most installs done outside of a separate tree such as /opt/graphite will |
64 |
+ # need to change these settings. Note that the default settings for each |
65 |
+@@ -110,6 +111,11 @@ |
66 |
+ #STATIC_ROOT = '/opt/graphite/static' |
67 |
+ #LOG_DIR = '/opt/graphite/storage/log/webapp' |
68 |
+ #INDEX_FILE = '/opt/graphite/storage/index' # Search index file |
69 |
++CONF_DIR = '@GENTOO_PORTAGE_EPREFIX@/etc/graphite-web' |
70 |
++STORAGE_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon' |
71 |
++STATIC_ROOT = '@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web/webapp/content' |
72 |
++LOG_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/log/graphite-web' |
73 |
++INDEX_FILE = '@GENTOO_PORTAGE_EPREFIX@/var/lib/graphite-web/index' # Search index file |
74 |
+ |
75 |
+ # To further or fully customize the paths, modify the following. Note that the |
76 |
+ # default settings for each of these are relative to CONF_DIR and STORAGE_DIR |
77 |
+@@ -127,6 +133,8 @@ |
78 |
+ #CERES_DIR = '/opt/graphite/storage/ceres' |
79 |
+ #WHISPER_DIR = '/opt/graphite/storage/whisper' |
80 |
+ #RRD_DIR = '/opt/graphite/storage/rrd' |
81 |
++WHISPER_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon/whisper' |
82 |
++RRD_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon/rrd' |
83 |
+ # |
84 |
+ # Data directories using the "Standard" metrics finder (i.e. not Ceres) |
85 |
+ #STANDARD_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables |
86 |
+@@ -244,7 +244,7 @@ |
87 |
+ # |
88 |
+ #DATABASES = { |
89 |
+ # 'default': { |
90 |
+-# 'NAME': '/opt/graphite/storage/graphite.db', |
91 |
++# 'NAME': '@GENTOO_PORTAGE_EPREFIX@/var/lib/graphite-web/graphite.db', |
92 |
+ # 'ENGINE': 'django.db.backends.sqlite3', |
93 |
+ # 'USER': '', |
94 |
+ # 'PASSWORD': '', |
95 |
|
96 |
diff --git a/net-analyzer/graphite-web/graphite-web-1.1.5.ebuild b/net-analyzer/graphite-web/graphite-web-1.1.5.ebuild |
97 |
new file mode 100644 |
98 |
index 00000000000..b0cada7cd87 |
99 |
--- /dev/null |
100 |
+++ b/net-analyzer/graphite-web/graphite-web-1.1.5.ebuild |
101 |
@@ -0,0 +1,100 @@ |
102 |
+# Copyright 1999-2019 Gentoo Authors |
103 |
+# Distributed under the terms of the GNU General Public License v2 |
104 |
+ |
105 |
+EAPI=7 |
106 |
+PYTHON_COMPAT=( python{2_7,3_{4,5,6}} ) # 3.7 dropped due to dep-hell |
107 |
+ |
108 |
+inherit distutils-r1 python-utils-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? ( |
125 |
+ || ( |
126 |
+ dev-python/mysql-python[${PYTHON_USEDEP}] |
127 |
+ dev-python/mysqlclient[${PYTHON_USEDEP}] |
128 |
+ ) |
129 |
+ ) |
130 |
+ postgres? ( dev-python/psycopg:2[${PYTHON_USEDEP}] ) |
131 |
+ >=dev-python/django-1.8[sqlite?,${PYTHON_USEDEP}] |
132 |
+ <dev-python/django-2.1.99[sqlite?,${PYTHON_USEDEP}] |
133 |
+ >=dev-python/django-tagging-0.4.6[${PYTHON_USEDEP}] |
134 |
+ dev-python/cairocffi[${PYTHON_USEDEP}] |
135 |
+ dev-python/pyparsing[${PYTHON_USEDEP}] |
136 |
+ dev-python/pytz[${PYTHON_USEDEP}] |
137 |
+ dev-python/scandir[${PYTHON_USEDEP}] |
138 |
+ dev-python/six[${PYTHON_USEDEP}] |
139 |
+ dev-python/urllib3[${PYTHON_USEDEP}] |
140 |
+ media-libs/fontconfig |
141 |
+" |
142 |
+ |
143 |
+PATCHES=( |
144 |
+ # Do not install the configuration and data files. We install them |
145 |
+ # somewhere sensible by hand. |
146 |
+ "${FILESDIR}"/${PN}-1.1.5-fhs-paths.patch |
147 |
+) |
148 |
+ |
149 |
+python_prepare_all() { |
150 |
+ # Use a less common name |
151 |
+ mv bin/build-index bin/${PN}-build-index || die |
152 |
+ # use FHS-style paths |
153 |
+ export GRAPHITE_NO_PREFIX=yes |
154 |
+ distutils-r1_python_prepare_all |
155 |
+ eprefixify \ |
156 |
+ conf/graphite.wsgi.example \ |
157 |
+ webapp/graphite/local_settings.py.example |
158 |
+} |
159 |
+ |
160 |
+python_install_all() { |
161 |
+ distutils-r1_python_install_all |
162 |
+ keepdir /var/{lib,log}/${PN} |
163 |
+ docinto examples |
164 |
+ docompress -x "/usr/share/doc/${PF}/examples" |
165 |
+ dodoc \ |
166 |
+ examples/example-graphite-vhost.conf \ |
167 |
+ conf/dashboard.conf.example \ |
168 |
+ conf/graphite.wsgi.example |
169 |
+} |
170 |
+ |
171 |
+python_install() { |
172 |
+ distutils-r1_python_install \ |
173 |
+ --install-data="${EPREFIX}"/usr/share/${PN} |
174 |
+ |
175 |
+ insinto /etc/${PN} |
176 |
+ newins webapp/graphite/local_settings.py.example local_settings.py |
177 |
+ pushd "${D}/$(python_get_sitedir)"/graphite > /dev/null || die |
178 |
+ ln -s ../../../../../etc/${PN}/local_settings.py local_settings.py || die |
179 |
+ popd > /dev/null || die |
180 |
+} |
181 |
+ |
182 |
+pkg_config() { |
183 |
+ "${EROOT}"/usr/bin/django-admin.py migrate \ |
184 |
+ --settings=graphite.settings --run-syncdb |
185 |
+ "${EROOT}"/usr/bin/${PN}-build-index |
186 |
+} |
187 |
+ |
188 |
+pkg_postinst() { |
189 |
+ # Only display this for new installs |
190 |
+ if [[ -z ${REPLACING_VERSIONS} ]]; then |
191 |
+ elog "You need to configure ${PN} to run with a WSGI server of your choice." |
192 |
+ elog "For example using Apache, you can use www-apache/mod_wsgi," |
193 |
+ elog " using Nginx, you can use www-servers/uwsgi." |
194 |
+ elog "Don't forget to edit local_settings.py in ${EPREFIX}/etc/${PN}" |
195 |
+ elog "See https://graphite.readthedocs.org/en/latest/config-local-settings.html" |
196 |
+ elog "Run emerge --config =${PN}-${PVR} if this is a fresh install." |
197 |
+ elog "" |
198 |
+ elog "If you want to update the search index regularily, you should consider running" |
199 |
+ elog "the '${PN}-build-index' script in a crontab." |
200 |
+ fi |
201 |
+} |