summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/graphite-web
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/graphite-web')
-rw-r--r--net-analyzer/graphite-web/Manifest2
-rw-r--r--net-analyzer/graphite-web/files/graphite-web-0.9.13-fhs-paths.patch76
-rw-r--r--net-analyzer/graphite-web/files/graphite-web-0.9.13-system-libs.patch100
-rw-r--r--net-analyzer/graphite-web/graphite-web-0.9.13-r1.ebuild99
-rw-r--r--net-analyzer/graphite-web/metadata.xml14
5 files changed, 291 insertions, 0 deletions
diff --git a/net-analyzer/graphite-web/Manifest b/net-analyzer/graphite-web/Manifest
new file mode 100644
index 000000000000..e904dbc77447
--- /dev/null
+++ b/net-analyzer/graphite-web/Manifest
@@ -0,0 +1,2 @@
+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
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 &lt;j@jamielinux.com&gt;
+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-r1.ebuild b/net-analyzer/graphite-web/graphite-web-0.9.13-r1.ebuild
new file mode 100644
index 000000000000..51720e934971
--- /dev/null
+++ b/net-analyzer/graphite-web/graphite-web-0.9.13-r1.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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="ldap mysql memcached +sqlite"
+
+DEPEND=""
+RDEPEND="dev-lang/python[sqlite?]
+ || ( >=dev-python/django-1.4[sqlite?,mysql?,${PYTHON_USEDEP}]
+ ( >=dev-python/django-1.6[sqlite?,${PYTHON_USEDEP}]
+ mysql? ( || ( dev-python/mysql-python dev-python/mysqlclient ) ) ) )
+ >=dev-python/twisted-core-10.0[${PYTHON_USEDEP}]
+ >=dev-python/django-tagging-0.3.1[${PYTHON_USEDEP}]
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ dev-python/zope-interface[${PYTHON_USEDEP}]
+ dev-python/pytz[${PYTHON_USEDEP}]
+ dev-python/pyparsing[${PYTHON_USEDEP}]
+ dev-python/txAMQP[${PYTHON_USEDEP}]
+ dev-python/carbon[${PYTHON_USEDEP}]
+ dev-python/whisper[${PYTHON_USEDEP}]
+ media-libs/fontconfig
+ memcached? ( dev-python/python-memcached[${PYTHON_USEDEP}] )
+ ldap? ( dev-python/python-ldap[${PYTHON_USEDEP}] )"
+
+PATCHES=(
+ # Do not install the configuration and data files. We install them
+ # somewhere sensible by hand.
+ "${FILESDIR}"/${P}-fhs-paths.patch
+ "${FILESDIR}"/${P}-system-libs.patch
+)
+
+EXAMPLES=(
+ examples/example-graphite-vhost.conf
+)
+
+src_prepare() {
+ # use FHS-style paths
+ rm setup.cfg || die
+ # make sure we don't use bundled stuff
+ rm -Rf webapp/graphite/thirdparty
+ distutils-r1_src_prepare
+ eprefixify \
+ conf/graphite.wsgi.example \
+ webapp/graphite/local_settings.py.example
+}
+
+python_install() {
+ distutils-r1_python_install \
+ --install-data="${EPREFIX}"/usr/share/${PN}
+
+ # make manage.py available from an easier location/name
+ dodir /usr/bin
+ mv "${D}"/$(python_get_sitedir)/graphite/manage.py \
+ "${ED}"/usr/bin/${PN}-manage || die
+ chmod 0755 "${ED}"/usr/bin/${PN}-manage || die
+ python_fix_shebang "${ED}"/usr/bin/${PN}-manage
+
+ # shortener image isn't included for some reason
+ cp "${DISTDIR}"/"${P}"-share.png "${ED}"/usr/share/${PN}/webapp/content/img/
+
+ insinto /etc/${PN}
+ newins webapp/graphite/local_settings.py.example local_settings.py
+ pushd "${D}"/$(python_get_sitedir)/graphite > /dev/null || die
+ ln -s ../../../../../etc/${PN}/local_settings.py local_settings.py
+ popd > /dev/null || die
+ doins conf/dashboard.conf.example
+ doins conf/graphite.wsgi.example
+}
+
+pkg_config() {
+ "${ROOT}"/usr/bin/${PN}-manage syncdb --noinput
+ local idx=$(grep 'INDEX_FILE =' "${EROOT}"/etc/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 will need to ${PN} it with Apache (mod_wsgi) or nginx (uwsgi)."
+ 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..92e7f9027c11
--- /dev/null
+++ b/net-analyzer/graphite-web/metadata.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>grobian@gentoo.org</email>
+ <name>Fabian Groffen</name>
+ </maintainer>
+ <use>
+ <flag name="memcached">Enable memcached support</flag>
+ </use>
+ <upstream>
+ <remote-id type="pypi">graphite-web</remote-id>
+ </upstream>
+</pkgmetadata>