From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- net-analyzer/graphite-web/Manifest | 8 ++ .../files/graphite-web-0.9.13-fhs-paths.patch | 76 +++++++++++++++ .../files/graphite-web-0.9.13-system-libs.patch | 100 +++++++++++++++++++ .../graphite-web/graphite-web-0.9.13-r3.ebuild | 108 +++++++++++++++++++++ net-analyzer/graphite-web/metadata.xml | 15 +++ 5 files changed, 307 insertions(+) create mode 100644 net-analyzer/graphite-web/Manifest create mode 100644 net-analyzer/graphite-web/files/graphite-web-0.9.13-fhs-paths.patch create mode 100644 net-analyzer/graphite-web/files/graphite-web-0.9.13-system-libs.patch create mode 100644 net-analyzer/graphite-web/graphite-web-0.9.13-r3.ebuild create mode 100644 net-analyzer/graphite-web/metadata.xml (limited to 'net-analyzer/graphite-web') diff --git a/net-analyzer/graphite-web/Manifest b/net-analyzer/graphite-web/Manifest new file mode 100644 index 000000000000..6da972c3c175 --- /dev/null +++ b/net-analyzer/graphite-web/Manifest @@ -0,0 +1,8 @@ +AUX graphite-web-0.9.13-fhs-paths.patch 3183 SHA256 f9b04ed5630db24aae233efdee72d373428b2827f27e2a912c98c4c2ce15ed3f SHA512 18ec1ef401c2e3d1209ed3a2a796dfc94088ea7324ae28c3afddd8c857a83ff00afcb5ef0673b838eedae433893b12b57283c9d4a0e53f90b5063ae4f36abcf2 WHIRLPOOL fd2da4ae377f69b20fc7dccfdf64d39cf856656591d6c5947eb9843456ccff290c8e3c0018218b607f8709632e1f90ccf7a62b9b1517953277e9ff3e7cb28af9 +AUX graphite-web-0.9.13-system-libs.patch 3379 SHA256 e9b68c6b5ae8d83927bdda78d3c1bf1ccae54177661156ce75e936eab6bf3972 SHA512 df4b95dfa6f6a58ba2e8aeb7b3d3e26e5d122718b88e2ec747676fcbb0539190ebc9e7938b3d34a73f0018e121ce297faa50af839f138ce5b21116777fcb7748 WHIRLPOOL 04d62f94dc5164ec3799e3ab5807a4c0e03a123899e764ce4ba8aebae4f52f878a757e68c8ec46f05bb8dd42b2ac68912abd546039497efb5c6ce580415964d1 +DIST graphite-web-0.9.13-share.png 325 SHA256 cbd268fc44900f6f25a79000a799a9653eb170f6cb1450322a748edf1532680d SHA512 19dc9139e97a99bf06fded2958bc52bc856fa11d0dc50f57e6c54214373795534cb74883ab5da7a05e2ddb69a2870d3b02dcf2ab0628bdf289f1ffd925e044e2 WHIRLPOOL 93f49283e42b35464e2b51d765e2bab23884506734a48d4e4aec9744ceaf649c6d342f37b75aeba030b38e4f4ae4030bb7bfbdfc771928b69b70ea7aae9b5a81 +DIST graphite-web-0.9.13.tar.gz 2182781 SHA256 745ee8cd4c16735df1f7c0a7211dbfdd1234678262a1453aef14d04438260851 SHA512 5e2cc84ec57e1fa0ecff8c9671d8753655a8ce2c07ce2f446451ceaad7679b0cefe932de45315be360b8f13eb25cd25ef179814f340c2c42b0e7048a3d4f4a96 WHIRLPOOL d13f111aaaadb91c5da62a1fd62d36e623501822e5faf3cdea78a7b165a4c111717b2d8d007af29e9bd54e1f5f0b5b648d10908b4721360ae00229aca145623f +EBUILD graphite-web-0.9.13-r3.ebuild 3418 SHA256 6083cddb5245adeb8836eb234f167a764d368ba5950a6e6b8931ff41c2d1869f SHA512 6ec67b34b46994ab4e9761bcf72b58ec5f62609353ef1349a26ef2580a9bff16c1737423c9073add748a141002f235a019ee5f6f36d98f8e43f2b7eafa00675a WHIRLPOOL 48530ab086cbde1b49993e0cc54e18d1391f62f9c5a5fcb5381c3b0bf82a7c0884e8ee94c0a3724b97da9a8fa60de87353c30a72d6d027614a6a97c3e3aceb37 +MISC ChangeLog 3103 SHA256 915bcb8e2ad2b4f3a9f51e569f1d0f8b454d1e6e82d2c3a1bc332eb6244c4276 SHA512 f7fa591eb12bfff8c90f8c1c0f319f445b15b149a50ffad8cde482d00684f377a6f6ddd79380be9587a977e6679aee6dc83de6139812e3d7e532cbf4fff0fba1 WHIRLPOOL 34937650c648f10d6d656e3a880b430f57dbd2257387f79216f55db48ecf4029b2ac6f29e9806da66c9434e2e95ea76ccd2ee180703e8f23903d78229d1b4412 +MISC ChangeLog-2015 1077 SHA256 53000ff696798c8d17bc8cfcc28e2b1cdb34ad6b6644f5616f3a94362fd3a287 SHA512 dde7712d3f660a2e37fb9e4e85851e24a01f612cfa5689b26bfe6f805a564606139fc011c054abf734882ca3022b63ec6170bf4452f07a130bb037a17ec294b7 WHIRLPOOL 3bc778e326fa586d8925a7e1f73f35910a4f55666fb705728b99a1a4f04bd729a037054a1b7a339e47eb88b716324b909d4b1f97a46c51fc7024048cc217bf06 +MISC metadata.xml 460 SHA256 7553f4d9c7122a2aa971eb1b8ba824239b346efd056bcca8921bb78678a433e1 SHA512 ef9a9d13235f8f393cba7eb33c2e86ff1ef965a13283c7ab46a5b0bd5ce23d4b6fc2dabe5ef36166eeb4076ef8f1e578b8cde2c223139306dfc562ab5016fc4a WHIRLPOOL b529a484d0e3ee1d2c2e894741292057cc853dbfae4ccd98eac11749ee8879fb4259cc3a8a783250296ef9340a0c3263242cb56fb30e97f4608be76278e1f53f diff --git a/net-analyzer/graphite-web/files/graphite-web-0.9.13-fhs-paths.patch b/net-analyzer/graphite-web/files/graphite-web-0.9.13-fhs-paths.patch new file mode 100644 index 000000000000..ecfce96e0536 --- /dev/null +++ b/net-analyzer/graphite-web/files/graphite-web-0.9.13-fhs-paths.patch @@ -0,0 +1,76 @@ +Install FHS-style paths + +--- graphite-web-0.9.13/conf/graphite.wsgi.example ++++ graphite-web-0.9.13/conf/graphite.wsgi.example +@@ -1,5 +1,5 @@ + import os, sys +-sys.path.append('/opt/graphite/webapp') ++sys.path.append('@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web/webapp') + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'graphite.settings') + + import django +--- graphite-web-0.9.13/setup.py ++++ graphite-web-0.9.13/setup.py +@@ -59,7 +59,6 @@ + ], + package_data={'graphite' : + ['templates/*', 'local_settings.py.example']}, +- scripts=glob('bin/*'), +- data_files=webapp_content.items() + storage_dirs + conf_files + examples, ++ data_files=webapp_content.items(), + **setup_kwargs + ) +--- graphite-web-0.9.13/webapp/graphite/local_settings.py.example ++++ graphite-web-0.9.13/webapp/graphite/local_settings.py.example +@@ -54,14 +54,14 @@ + ##################################### + # Change only GRAPHITE_ROOT if your install is merely shifted from /opt/graphite + # to somewhere else +-#GRAPHITE_ROOT = '/opt/graphite' ++GRAPHITE_ROOT = '@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web' + + # Most installs done outside of a separate tree such as /opt/graphite will only + # need to change these three settings. Note that the default settings for each + # of these is relative to GRAPHITE_ROOT +-#CONF_DIR = '/opt/graphite/conf' +-#STORAGE_DIR = '/opt/graphite/storage' +-#CONTENT_DIR = '/opt/graphite/webapp/content' ++CONF_DIR = '@GENTOO_PORTAGE_EPREFIX@/etc/graphite-web' ++STORAGE_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon' ++CONTENT_DIR = '@GENTOO_PORTAGE_EPREFIX@/usr/share/graphite-web/webapp/content' + + # To further or fully customize the paths, modify the following. Note that the + # default settings for each of these are relative to CONF_DIR and STORAGE_DIR +@@ -69,6 +69,8 @@ + ## Webapp config files + #DASHBOARD_CONF = '/opt/graphite/conf/dashboard.conf' + #GRAPHTEMPLATES_CONF = '/opt/graphite/conf/graphTemplates.conf' ++DASHBOARD_CONF = '@GENTOO_PORTAGE_EPREFIX@/etc/graphite-web/dashboard.conf' ++GRAPHTEMPLATES_CONF = '@GENTOO_PORTAGE_EPREFIX@/etc/graphite-web/graphTemplates.conf' + + ## Data directories + # NOTE: If any directory is unreadable in DATA_DIRS it will break metric browsing +@@ -77,7 +79,11 @@ + #DATA_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables + #LOG_DIR = '/opt/graphite/storage/log/webapp' + #INDEX_FILE = '/opt/graphite/storage/index' # Search index file +- ++WHISPER_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon/whisper' ++RRD_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/lib/carbon/rrd' ++DATA_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables ++LOG_DIR = '@GENTOO_PORTAGE_EPREFIX@/var/log/graphite-web/' ++INDEX_FILE = '@GENTOO_PORTAGE_EPREFIX@/var/lib/graphite-web/index' # Search index file + + ##################################### + # Email Configuration # +--- graphite-web-0.9.13/webapp/graphite/manage.py ++++ graphite-web-0.9.13/webapp/graphite/manage.py +@@ -6,7 +6,7 @@ + + + if __name__ == "__main__": +- os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings") ++ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "graphite.settings") + + from django.core.management import execute_from_command_line + diff --git a/net-analyzer/graphite-web/files/graphite-web-0.9.13-system-libs.patch b/net-analyzer/graphite-web/files/graphite-web-0.9.13-system-libs.patch new file mode 100644 index 000000000000..be5bbb9ab761 --- /dev/null +++ b/net-analyzer/graphite-web/files/graphite-web-0.9.13-system-libs.patch @@ -0,0 +1,100 @@ +From 1ca73dd4ec442d6ada765e5375efee84bbc7522b Mon Sep 17 00:00:00 2001 +From: Jamie Nguyen <j@jamielinux.com> +Date: Mon, 29 Sep 2014 09:53:22 +0100 +Subject: [PATCH] Force use of system libraries + +--- + setup.py | 2 -- + webapp/graphite/cli/parser.py | 2 +- + webapp/graphite/render/attime.py | 5 +---- + webapp/graphite/render/glyph.py | 5 +---- + webapp/graphite/render/grammar.py | 2 +- + webapp/graphite/render/views.py | 5 +---- + 6 files changed, 5 insertions(+), 16 deletions(-) + +diff --git a/setup.py b/setup.py +index 4dc0ce0..1b910d1 100644 +--- a/setup.py ++++ b/setup.py +@@ -54,8 +54,6 @@ setup( + 'graphite.graphlot', + 'graphite.events', + 'graphite.version', +- 'graphite.thirdparty', +- 'graphite.thirdparty.pytz', + ], + package_data={'graphite' : + ['templates/*', 'local_settings.py.example']}, +diff --git a/webapp/graphite/cli/parser.py b/webapp/graphite/cli/parser.py +index ec1a435..7d7d48d 100644 +--- a/webapp/graphite/cli/parser.py ++++ b/webapp/graphite/cli/parser.py +@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License.""" + +-from graphite.thirdparty.pyparsing import * ++from pyparsing import * + + grammar = Forward() + +diff --git a/webapp/graphite/render/attime.py b/webapp/graphite/render/attime.py +index 55a644c..8adde3f 100644 +--- a/webapp/graphite/render/attime.py ++++ b/webapp/graphite/render/attime.py +@@ -16,10 +16,7 @@ from datetime import datetime,timedelta + from time import daylight + from django.conf import settings + +-try: # See if there is a system installation of pytz first +- import pytz +-except ImportError: # Otherwise we fall back to Graphite's bundled version +- from graphite.thirdparty import pytz ++import pytz + + + months = ['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec'] +diff --git a/webapp/graphite/render/glyph.py b/webapp/graphite/render/glyph.py +index a2cc893..c6f31f1 100644 +--- a/webapp/graphite/render/glyph.py ++++ b/webapp/graphite/render/glyph.py +@@ -22,10 +22,7 @@ from graphite.render.datalib import TimeSeries + from graphite.util import json + + +-try: # See if there is a system installation of pytz first +- import pytz +-except ImportError: # Otherwise we fall back to Graphite's bundled version +- from graphite.thirdparty import pytz ++import pytz + + INFINITY = float('inf') + +diff --git a/webapp/graphite/render/grammar.py b/webapp/graphite/render/grammar.py +index 07e3e4b..2b0ba41 100644 +--- a/webapp/graphite/render/grammar.py ++++ b/webapp/graphite/render/grammar.py +@@ -1,4 +1,4 @@ +-from graphite.thirdparty.pyparsing import * ++from pyparsing import * + + ParserElement.enablePackrat() + grammar = Forward() +diff --git a/webapp/graphite/render/views.py b/webapp/graphite/render/views.py +index 186232e..cd747a7 100644 +--- a/webapp/graphite/render/views.py ++++ b/webapp/graphite/render/views.py +@@ -25,10 +25,7 @@ try: + except ImportError: + import pickle + +-try: # See if there is a system installation of pytz first +- import pytz +-except ImportError: # Otherwise we fall back to Graphite's bundled version +- from graphite.thirdparty import pytz ++import pytz + + from graphite.util import getProfileByUsername, json, unpickle + from graphite.remote_storage import HTTPConnectionWithTimeout +-- +1.9.3 diff --git a/net-analyzer/graphite-web/graphite-web-0.9.13-r3.ebuild b/net-analyzer/graphite-web/graphite-web-0.9.13-r3.ebuild new file mode 100644 index 000000000000..437a290d1014 --- /dev/null +++ b/net-analyzer/graphite-web/graphite-web-0.9.13-r3.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) + +inherit distutils-r1 python-utils-r1 prefix + +DESCRIPTION="Enterprise scalable realtime graphing" +HOMEPAGE="http://graphite.readthedocs.org/" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz + https://raw.githubusercontent.com/graphite-project/graphite-web/522d84fed687bd946878e48d85982d59f7bd1267/webapp/content/img/share.png -> ${P}-share.png" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="+carbon ldap mysql memcached postgres +sqlite" + +DEPEND="" +RDEPEND=" + dev-lang/python[sqlite?] + sqlite? ( >=dev-python/django-1.4[sqlite?,${PYTHON_USEDEP}] ) + mysql? ( >=dev-python/django-1.4[${PYTHON_USEDEP}] + || ( + dev-python/mysql-python[${PYTHON_USEDEP}] + dev-python/mysqlclient[${PYTHON_USEDEP}] + ) + ) + postgres? ( + >=dev-python/django-1.4[${PYTHON_USEDEP}] + dev-python/psycopg:2[${PYTHON_USEDEP}] + ) + >=dev-python/twisted-core-10.0[${PYTHON_USEDEP}] + >=dev-python/django-tagging-0.3.1[${PYTHON_USEDEP}] + /dev/null || die + ln -s ../../../../../etc/${PN}/local_settings.py local_settings.py + popd > /dev/null || die +} + +pkg_config() { + "${ROOT}"/usr/bin/${PN}-manage syncdb --noinput + local idx=$(grep 'INDEX_FILE =' "${EROOT}"/etc/graphite-web/local_settings.py 2>/dev/null) + if [[ -n ${idx} ]] ; then + idx=${idx##*=} + idx=$(echo ${idx}) + eval "idx=${idx}" + touch "${ROOT}"/"${idx}"/index + fi +} + +pkg_postinst() { + einfo "You need to configure ${PN} to run with a WSGI server of your choice." + einfo "Don't forget to edit local_settings.py in ${EPREFIX}/etc/${PN}" + einfo "See http://graphite.readthedocs.org/en/latest/config-local-settings.html" + einfo "Run emerge --config =${PN}-${PVR} if this is a fresh install." +} diff --git a/net-analyzer/graphite-web/metadata.xml b/net-analyzer/graphite-web/metadata.xml new file mode 100644 index 000000000000..51189851a341 --- /dev/null +++ b/net-analyzer/graphite-web/metadata.xml @@ -0,0 +1,15 @@ + + + + + grobian@gentoo.org + Fabian Groffen + + + Enable memcached support + Enable carbon support + + + graphite-web + + -- cgit v1.2.3