summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Preksavec <mario at slackware dot hr>2015-02-28 03:30:02 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-02-28 03:30:02 +0700
commite3c8c6afff14d8f8fec396709117b30cfd207aae (patch)
tree099d47c17385a377727f9bf08622b93c5a9df8c3
parent46e7f74c3c1ffb67267f8cf290646467b9bd4818 (diff)
downloadslackbuilds-e3c8c6afff14d8f8fec396709117b30cfd207aae.tar.gz
system/graphite-web: Added (Enterprise Scalable Realtime Graphing).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--system/graphite-web/README3
-rw-r--r--system/graphite-web/doinst.sh18
-rw-r--r--system/graphite-web/graphite-web.SlackBuild111
-rw-r--r--system/graphite-web/graphite-web.conf31
-rw-r--r--system/graphite-web/graphite-web.cron7
-rw-r--r--system/graphite-web/graphite-web.info10
-rw-r--r--system/graphite-web/graphite-web.logrotate8
-rw-r--r--system/graphite-web/man1/graphite-build-search-index.119
-rw-r--r--system/graphite-web/man1/graphite-manage.135
-rw-r--r--system/graphite-web/patches/graphite.wsgi.example.diff9
-rw-r--r--system/graphite-web/patches/local_settings.patch85
-rw-r--r--system/graphite-web/patches/remove_internal_logrotate.patch45
-rw-r--r--system/graphite-web/patches/settings_debian.patch25
-rw-r--r--system/graphite-web/patches/setup.cfg.diff23
-rw-r--r--system/graphite-web/patches/setup.py.diff13
-rw-r--r--system/graphite-web/scripts/graphite-build-search-index21
-rw-r--r--system/graphite-web/scripts/graphite-manage3
-rw-r--r--system/graphite-web/slack-desc19
18 files changed, 485 insertions, 0 deletions
diff --git a/system/graphite-web/README b/system/graphite-web/README
new file mode 100644
index 0000000000..4117158296
--- /dev/null
+++ b/system/graphite-web/README
@@ -0,0 +1,3 @@
+graphite-web (Enterprise Scalable Realtime Graphing)
+
+Django-based web application that renders graphs and dashboards.
diff --git a/system/graphite-web/doinst.sh b/system/graphite-web/doinst.sh
new file mode 100644
index 0000000000..1d7bac2725
--- /dev/null
+++ b/system/graphite-web/doinst.sh
@@ -0,0 +1,18 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/httpd/extra/graphite-web.conf.new
+config etc/logrotate.d/graphite-web.new
+
+find etc/graphite -type f -name '*.new' \
+ | while read new ; do config $new ; done
diff --git a/system/graphite-web/graphite-web.SlackBuild b/system/graphite-web/graphite-web.SlackBuild
new file mode 100644
index 0000000000..53e26ad1ba
--- /dev/null
+++ b/system/graphite-web/graphite-web.SlackBuild
@@ -0,0 +1,111 @@
+#!/bin/sh
+
+# Slackware build script for graphite-web
+
+# Copyright 2015 Mario Preksavec, Zagreb, Croatia
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=graphite-web
+VERSION=${VERSION:-0.9.3pre1}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+SRCVER=0.9.13-pre1
+ARCH=noarch
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$SRCVER
+tar xvf $CWD/$v$SRCVER.tar.gz
+cd $PRGNAM-$SRCVER
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# We don't have a RedHat system
+patch -p1 <$CWD/patches/setup.cfg.diff
+
+# Change path to wsgi
+patch -p1 <$CWD/patches/graphite.wsgi.example.diff
+
+# Patches thanks to Debian folks!
+patch -p1 <$CWD/patches/local_settings.patch
+patch -p1 <$CWD/patches/settings_debian.patch
+patch -p1 <$CWD/patches/remove_internal_logrotate.patch
+
+python setup.py install --root=$PKG
+
+# Need some dirs
+mkdir -p $PKG/etc/{httpd/extra,logrotate.d} $PKG/usr/share/$PRGNAM \
+ $PKG/var/log/graphite
+chown graphite:graphite $PKG/var/log/graphite
+
+# Add apache config
+cat $CWD/$PRGNAM.conf > $PKG/etc/httpd/extra/$PRGNAM.conf.new
+
+# Cruft removal
+rm -rf $PKG/usr/{storage,examples} $PKG/usr/bin/*
+find $PKG/usr -name 'local_settings.py.example' -delete
+
+# Scripts and crontab mostly from Debian
+install -m0755 -oroot -groot -t $PKG/usr/bin $CWD/scripts/graphite-manage \
+ $CWD/scripts/graphite-build-search-index
+install -D -m0755 -oroot -groot $CWD/$PRGNAM.cron \
+ $PKG/etc/cron.hourly/graphite-build-search-index
+cat $CWD/$PRGNAM.logrotate > $PKG/etc/logrotate.d/$PRGNAM.new
+
+# Move wsgi script
+mv $PKG/usr/conf/graphite.wsgi.example $PKG/usr/share/$PRGNAM/graphite.wsgi
+
+# Configuration goes into /etc/graphite
+mv $PKG/usr/conf $PKG/etc/graphite
+for i in $PKG/etc/graphite/*.example ; do mv $i ${i/.example/.new} ; done
+cat webapp/graphite/local_settings.py.example \
+ > $PKG/etc/graphite/local_settings.py.new
+
+# Move webapp dir
+mv $PKG/usr/webapp $PKG/usr/share/$PRGNAM/static
+
+# Manpages also from Debian
+mkdir -p $PKG/usr/man
+cp -a $CWD/man1 $PKG/usr/man
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a INSTALL LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/graphite-web/graphite-web.conf b/system/graphite-web/graphite-web.conf
new file mode 100644
index 0000000000..983db9ce83
--- /dev/null
+++ b/system/graphite-web/graphite-web.conf
@@ -0,0 +1,31 @@
+# This line needs to be in your server's config.
+#Include /etc/httpd/extra/mod_wsgi.conf
+
+WSGISocketPrefix /var/run/wsgi
+
+<VirtualHost *:80>
+
+ ServerName graphite
+ ServerAlias graphite.*
+
+ WSGIDaemonProcess graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120 user=graphite group=graphite
+ WSGIProcessGroup graphite
+ WSGIApplicationGroup %{GLOBAL}
+ WSGIImportScript /usr/share/graphite-web/graphite.wsgi process-group=graphite application-group=%{GLOBAL}
+ WSGIScriptAlias / /usr/share/graphite-web/graphite.wsgi
+
+ <Directory /usr/share/graphite-web/>
+ Order deny,allow
+ Allow from all
+ Require all granted
+ </Directory>
+
+ Alias /content/ /usr/share/graphite-web/static/content/
+ <Location /content/>
+ SetHandler None
+ </Location>
+
+ ErrorLog /var/log/httpd/graphite_error_log
+ CustomLog /var/log/httpd/graphite_access_log common
+
+</VirtualHost>
diff --git a/system/graphite-web/graphite-web.cron b/system/graphite-web/graphite-web.cron
new file mode 100644
index 0000000000..856466af08
--- /dev/null
+++ b/system/graphite-web/graphite-web.cron
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+
+if [ -x /usr/bin/graphite-build-search-index ]; then
+ /usr/bin/graphite-build-search-index
+fi
diff --git a/system/graphite-web/graphite-web.info b/system/graphite-web/graphite-web.info
new file mode 100644
index 0000000000..997f1339dc
--- /dev/null
+++ b/system/graphite-web/graphite-web.info
@@ -0,0 +1,10 @@
+PRGNAM="graphite-web"
+VERSION="0.9.13pre1"
+HOMEPAGE="https://github.com/graphite-project/"
+DOWNLOAD="https://github.com/graphite-project/graphite-web/archive/0.9.13-pre1.tar.gz"
+MD5SUM="527da1f89b9a60ae2af29eed06accdf3"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="graphite-carbon"
+MAINTAINER="Mario Preksavec"
+EMAIL="mario at slackware dot hr"
diff --git a/system/graphite-web/graphite-web.logrotate b/system/graphite-web/graphite-web.logrotate
new file mode 100644
index 0000000000..fad29bef4c
--- /dev/null
+++ b/system/graphite-web/graphite-web.logrotate
@@ -0,0 +1,8 @@
+/var/log/graphite/*.log {
+ weekly
+ missingok
+ rotate 4
+ compress
+ notifempty
+ create 644 graphite graphite
+}
diff --git a/system/graphite-web/man1/graphite-build-search-index.1 b/system/graphite-web/man1/graphite-build-search-index.1
new file mode 100644
index 0000000000..d5ae9f6606
--- /dev/null
+++ b/system/graphite-web/man1/graphite-build-search-index.1
@@ -0,0 +1,19 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "GRAPHITE\-BUILD\-SEARCH\-INDEX" "1" "December 2012" "" ""
+.
+.SH "NAME"
+\fBgraphite\-build\-search\-index\fR \- create search index for Graphite Webapp
+.
+.SH "SYNOPSIS"
+graphite\-build\-search\-index
+.
+.SH "DESCRIPTION"
+This script creates the search index of Whisper files for the Graphite Webapp\. It will run as hourly cronjob\. You don\'t need to run this command manual except you want to force generating the search index\.
+.
+.SH "AUTHOR"
+Jonas Genannt
+.
+.P
+This manual page was written by Jonas Genannt \fIjonas\.genannt@capi2name\.de\fR for the Debian Project\.
diff --git a/system/graphite-web/man1/graphite-manage.1 b/system/graphite-web/man1/graphite-manage.1
new file mode 100644
index 0000000000..8a8de8eb5f
--- /dev/null
+++ b/system/graphite-web/man1/graphite-manage.1
@@ -0,0 +1,35 @@
+.\" generated with Ronn/v0.7.3
+.\" http://github.com/rtomayko/ronn/tree/0.7.3
+.
+.TH "GRAPHITE\-MANAGE" "1" "December 2012" "" ""
+.
+.SH "NAME"
+\fBgraphite\-manage\fR \- manage\.py wrapper for the Graphite Webapp
+.
+.SH "SYNOPSIS"
+graphite\-manage
+.
+.SH "DESCRIPTION"
+graphite\-manage is an wrapper script to access Django manage\.py for the Graphite Webapp\.
+.
+.P
+See \fBgraphite\-manage \-\-help\fR for complete help\.
+.
+.P
+To create an new sqlite database and an superuser do:
+.
+.IP "\(bu" 4
+graphite\-manage syncdb
+.
+.IP "\(bu" 4
+chown graphite:graphite /var/lib/graphite/graphite\.db
+.
+.IP "" 0
+.
+.SH "AUTHOR"
+Jonas Genannt
+.
+.P
+This manual page was written by Jonas Genannt \fIjonas\.genannt@capi2name\.de\fR for the Debian Project\.
+.br
+Modified by Mario Preksavec \fImario@slackware\.hr\fR for Slackware
diff --git a/system/graphite-web/patches/graphite.wsgi.example.diff b/system/graphite-web/patches/graphite.wsgi.example.diff
new file mode 100644
index 0000000000..d4f436ae7a
--- /dev/null
+++ b/system/graphite-web/patches/graphite.wsgi.example.diff
@@ -0,0 +1,9 @@
+--- graphite-web-0.9.13-pre1/conf/graphite.wsgi.example.orig 2014-12-31 17:51:36.000000000 +0100
++++ graphite-web-0.9.13-pre1/conf/graphite.wsgi.example 2015-02-19 18:26:43.753661979 +0100
+@@ -1,5 +1,5 @@
+ import os, sys
+-sys.path.append('/opt/graphite/webapp')
++sys.path.append('/usr/share/graphite/static')
+ os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'graphite.settings')
+
+ import django
diff --git a/system/graphite-web/patches/local_settings.patch b/system/graphite-web/patches/local_settings.patch
new file mode 100644
index 0000000000..f5f647f5bf
--- /dev/null
+++ b/system/graphite-web/patches/local_settings.patch
@@ -0,0 +1,85 @@
+Description: Other defaults for Debian
+Author: Jonas Genannt <jonas.genannt@capi2name.de>
+Forwarded: not-needed
+
+diff --git a/webapp/graphite/local_settings.py.example b/webapp/graphite/local_settings.py.example
+index 73a0c57..c40b1e0 100644
+--- a/webapp/graphite/local_settings.py.example
++++ b/webapp/graphite/local_settings.py.example
+@@ -26,9 +26,10 @@
+ #DOCUMENTATION_URL = "http://graphite.readthedocs.org/"
+
+ # Logging
+-#LOG_RENDERING_PERFORMANCE = True
+-#LOG_CACHE_PERFORMANCE = True
+-#LOG_METRIC_ACCESS = True
++# True see: https://answers.launchpad.net/graphite/+question/159731
++LOG_RENDERING_PERFORMANCE = True
++LOG_CACHE_PERFORMANCE = True
++LOG_METRIC_ACCESS = True
+
+ # Enable full debug page display on exceptions (Internal Server Error pages)
+ #DEBUG = True
+@@ -54,14 +55,14 @@
+ #####################################
+ # Change only GRAPHITE_ROOT if your install is merely shifted from /opt/graphite
+ # to somewhere else
+-#GRAPHITE_ROOT = '/opt/graphite'
++GRAPHITE_ROOT = '/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 = '/etc/graphite'
++STORAGE_DIR = '/var/lib/graphite/whisper'
++CONTENT_DIR = '/usr/share/graphite-web/static'
+
+ # 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
+@@ -72,11 +73,11 @@
+
+ ## Data directories
+ # NOTE: If any directory is unreadable in DATA_DIRS it will break metric browsing
+-#WHISPER_DIR = '/opt/graphite/storage/whisper'
++WHISPER_DIR = '/var/lib/graphite/whisper'
+ #RRD_DIR = '/opt/graphite/storage/rrd'
+ #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
++LOG_DIR = '/var/log/graphite'
++INDEX_FILE = '/var/lib/graphite/search_index' # Search index file
+
+
+ #####################################
+@@ -147,17 +148,17 @@
+ # The default is 'django.db.backends.sqlite3' with file 'graphite.db'
+ # located in STORAGE_DIR
+ #
+-#DATABASES = {
+-# 'default': {
+-# 'NAME': '/opt/graphite/storage/graphite.db',
+-# 'ENGINE': 'django.db.backends.sqlite3',
+-# 'USER': '',
+-# 'PASSWORD': '',
+-# 'HOST': '',
+-# 'PORT': ''
+-# }
+-#}
+-#
++DATABASES = {
++ 'default': {
++ 'NAME': '/var/lib/graphite/graphite.db',
++ 'ENGINE': 'django.db.backends.sqlite3',
++ 'USER': '',
++ 'PASSWORD': '',
++ 'HOST': '',
++ 'PORT': ''
++ }
++}
++
+
+
+ #########################
diff --git a/system/graphite-web/patches/remove_internal_logrotate.patch b/system/graphite-web/patches/remove_internal_logrotate.patch
new file mode 100644
index 0000000000..a78c56f11e
--- /dev/null
+++ b/system/graphite-web/patches/remove_internal_logrotate.patch
@@ -0,0 +1,45 @@
+Description: disable internal logroate
+Author: Jonas Genannt <jonas.genannt@capi2name.de>
+Forwarded: not-needed
+
+diff --git a/webapp/graphite/logger.py b/webapp/graphite/logger.py
+index afa43f4..44456ac 100644
+--- a/webapp/graphite/logger.py
++++ b/webapp/graphite/logger.py
+@@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
+ limitations under the License."""
+
+ import os, logging
+-from logging.handlers import TimedRotatingFileHandler as Rotater
++from logging import FileHandler as LogFileHandler
+ from django.conf import settings
+
+ logging.addLevelName(30,"rendering")
+@@ -37,22 +37,22 @@ class GraphiteLogger:
+ self.metricAccessLogger = logging.getLogger("metric_access")
+ #Setup formatter & handlers
+ self.formatter = logging.Formatter("%(asctime)s :: %(message)s","%a %b %d %H:%M:%S %Y")
+- self.infoHandler = Rotater(self.infoLogFile,when="midnight",backupCount=1)
++ self.infoHandler = LogFileHandler(self.infoLogFile)
+ self.infoHandler.setFormatter(self.formatter)
+ self.infoLogger.addHandler(self.infoHandler)
+- self.exceptionHandler = Rotater(self.exceptionLogFile,when="midnight",backupCount=1)
++ self.exceptionHandler = LogFileHandler(self.exceptionLogFile)
+ self.exceptionHandler.setFormatter(self.formatter)
+ self.exceptionLogger.addHandler(self.exceptionHandler)
+ if settings.LOG_CACHE_PERFORMANCE:
+- self.cacheHandler = Rotater(self.cacheLogFile,when="midnight",backupCount=1)
++ self.cacheHandler = LogFileHandler(self.cacheLogFile)
+ self.cacheHandler.setFormatter(self.formatter)
+ self.cacheLogger.addHandler(self.cacheHandler)
+ if settings.LOG_RENDERING_PERFORMANCE:
+- self.renderingHandler = Rotater(self.renderingLogFile,when="midnight",backupCount=1)
++ self.renderingHandler = LogFileHandler(self.renderingLogFile)
+ self.renderingHandler.setFormatter(self.formatter)
+ self.renderingLogger.addHandler(self.renderingHandler)
+ if settings.LOG_METRIC_ACCESS:
+- self.metricAccessHandler = Rotater(self.metricAccessLogFile,when="midnight",backupCount=10)
++ self.metricAccessHandler = LogFileHandler(self.metricAccessLogFile)
+ self.metricAccessHandler.setFormatter(self.formatter)
+ self.metricAccessLogger.addHandler(self.metricAccessHandler)
+
diff --git a/system/graphite-web/patches/settings_debian.patch b/system/graphite-web/patches/settings_debian.patch
new file mode 100644
index 0000000000..ab66647263
--- /dev/null
+++ b/system/graphite-web/patches/settings_debian.patch
@@ -0,0 +1,25 @@
+Description: Add etc/graphite to sys.path to load config from /etc/graphite
+Author: Jonas Genannt <jonas.genannt@capi2name.de>
+Forwarded: not-needed
+
+--- a/webapp/graphite/settings.py
++++ b/webapp/graphite/settings.py
+@@ -20,6 +20,9 @@
+ from os.path import abspath, dirname, join
+ from warnings import warn
+
++# Debian add etc/graphite into path
++sys.path.append('/etc/graphite')
++
+ try:
+ import rrdtool
+ except ImportError:
+@@ -128,7 +131,7 @@
+
+ ## Load our local_settings
+ try:
+- from graphite.local_settings import *
++ from local_settings import *
+ except ImportError:
+ print >> sys.stderr, "Could not import graphite.local_settings, using defaults!"
+
diff --git a/system/graphite-web/patches/setup.cfg.diff b/system/graphite-web/patches/setup.cfg.diff
new file mode 100644
index 0000000000..f7ca20c9ba
--- /dev/null
+++ b/system/graphite-web/patches/setup.cfg.diff
@@ -0,0 +1,23 @@
+--- graphite-web-0.9.13-pre1/setup.cfg.orig 2014-12-31 17:51:36.000000000 +0100
++++ graphite-web-0.9.13-pre1/setup.cfg 2015-02-19 16:45:23.526959108 +0100
+@@ -1,20 +0,0 @@
+-[install]
+-prefix = /opt/graphite
+-install-lib = %(prefix)s/webapp
+-
+-[bdist_rpm]
+-requires = Django => 1.1.4
+- django-tagging
+- carbon
+- whisper
+- mod_wsgi
+- pycairo
+- pycairo-devel
+- python-simplejson
+- python-sqlite2
+- python-hashlib
+-
+-post-install = distro/redhat/misc/postinstall
+-
+-provides = graphite
+-obsoletes = graphite <= 0.9.9
diff --git a/system/graphite-web/patches/setup.py.diff b/system/graphite-web/patches/setup.py.diff
new file mode 100644
index 0000000000..f300210bb8
--- /dev/null
+++ b/system/graphite-web/patches/setup.py.diff
@@ -0,0 +1,13 @@
+--- graphite-web-0.9.13-pre1/setup.py.orig 2014-12-31 17:51:36.000000000 +0100
++++ graphite-web-0.9.13-pre1/setup.py 2015-02-19 18:45:25.173599991 +0100
+@@ -58,8 +58,7 @@
+ 'graphite.thirdparty.pytz',
+ ],
+ package_data={'graphite' :
+- ['templates/*', 'local_settings.py.example']},
+- scripts=glob('bin/*'),
+- data_files=webapp_content.items() + storage_dirs + conf_files + examples,
++ ['templates/*']},
++ data_files=webapp_content.items() + conf_files,
+ **setup_kwargs
+ )
diff --git a/system/graphite-web/scripts/graphite-build-search-index b/system/graphite-web/scripts/graphite-build-search-index
new file mode 100644
index 0000000000..9a86ab1924
--- /dev/null
+++ b/system/graphite-web/scripts/graphite-build-search-index
@@ -0,0 +1,21 @@
+#!/bin/bash
+# Jonas Genannt <jonas.genannt@capi2name.de>, 2012 for the Debian Project
+# Modified by Mario Preksavec <mario@slackware.hr>, 2015 for Slackware
+
+set -e
+
+INDEX_FILE_TMP=$(mktemp)
+
+INDEX_FILE="/var/lib/graphite/search_index"
+WHISPER_DIR="/var/lib/graphite/whisper"
+
+
+cd ${WHISPER_DIR} && find -L . -name '*.wsp' | sed \
+ -e 's@\.wsp$@@' \
+ -e 's@^\./@@' \
+ -e 's@/@.@g' > ${INDEX_FILE_TMP}
+
+chmod 0644 ${INDEX_FILE_TMP}
+chown graphite:graphite ${INDEX_FILE_TMP}
+
+mv -f ${INDEX_FILE_TMP} ${INDEX_FILE}
diff --git a/system/graphite-web/scripts/graphite-manage b/system/graphite-web/scripts/graphite-manage
new file mode 100644
index 0000000000..d38bd5e4ae
--- /dev/null
+++ b/system/graphite-web/scripts/graphite-manage
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+django-admin.py --settings=graphite.settings
diff --git a/system/graphite-web/slack-desc b/system/graphite-web/slack-desc
new file mode 100644
index 0000000000..33daa3ec8c
--- /dev/null
+++ b/system/graphite-web/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+graphite-web: graphite-web (Enterprise Scalable Realtime Graphing)
+graphite-web:
+graphite-web: Django-based web application that renders graphs and dashboards.
+graphite-web:
+graphite-web: https://github.com/graphite-project/
+graphite-web:
+graphite-web:
+graphite-web:
+graphite-web:
+graphite-web:
+graphite-web: