diff options
Diffstat (limited to 'net-analyzer/graphite-web/files/graphite-web-0.9.13-fhs-paths.patch')
-rw-r--r-- | net-analyzer/graphite-web/files/graphite-web-0.9.13-fhs-paths.patch | 76 |
1 files changed, 76 insertions, 0 deletions
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 + |