]> git.pld-linux.org Git - packages/graphite-web.git/blob - config.patch
configure default db as sqlite3
[packages/graphite-web.git] / config.patch
1 --- ./check-dependencies.py.orig        2012-05-31 00:28:54.000000000 -0600
2 +++ ./check-dependencies.py     2012-11-24 14:09:50.040701191 -0700
3 @@ -58,6 +58,19 @@ except:
4    django = None
5    fatal += 1
6  
7 +# Test for pytz
8 +try:
9 +  import pytz
10 +except:
11 +  print "[FATAL] Unable to import the 'pytz' module, do you have pytz module installed for python %s?\n" % py_version
12 +  fatal += 1
13 +
14 +# Test for pyparsing
15 +try:
16 +  import pyparsing
17 +except:
18 +  print "[FATAL] Unable to import the 'pyparsing' module, do you have pyparsing module installed for python %s?\n" % py_version
19 +  fatal += 1
20  
21  # Test for django-tagging
22  try:
23 --- ./conf/graphite.wsgi.example.orig   2012-05-31 00:28:54.000000000 -0600
24 +++ ./conf/graphite.wsgi.example        2012-11-24 14:10:08.310633299 -0700
25 @@ -1,5 +1,5 @@
26  import os, sys
27 -sys.path.append('/opt/graphite/webapp')
28 +sys.path.append('/usr/share/graphite/webapp')
29  os.environ['DJANGO_SETTINGS_MODULE'] = 'graphite.settings'
30  
31  import django.core.handlers.wsgi
32 --- ./MANIFEST.in.orig  2012-05-31 00:28:54.000000000 -0600
33 +++ ./MANIFEST.in       2012-11-24 14:09:50.039701194 -0700
34 @@ -5,7 +5,6 @@ include check-dependencies.py
35  include examples/*
36  include conf/*.example
37  include webapp/graphite/local_settings.py.example
38 -include webapp/graphite/thirdparty/pytz/pytz-LICENSE.txt
39  recursive-include distro/ *
40  recursive-include webapp/graphite/ *.html
41  recursive-include webapp/content/ *
42 --- ./setup.cfg.orig    2012-11-24 14:09:51.776694909 -0700
43 +++ ./setup.cfg 2012-11-24 14:10:08.311633295 -0700
44 @@ -1,6 +1,7 @@
45  [install]
46 -prefix = /opt/graphite
47 -install-lib = %(prefix)s/webapp
48 +#prefix = /opt/graphite
49 +#install-lib = %(prefix)s/webapp
50 +install-data = /usr/share/graphite
51  
52  [bdist_rpm]
53  requires = Django => 1.1.4
54 --- ./setup.py.orig     2012-11-24 14:09:51.776694909 -0700
55 +++ ./setup.py  2012-11-24 14:10:08.312633291 -0700
56 @@ -58,6 +58,7 @@ setup(
57    package_data={'graphite' :
58      ['templates/*', 'local_settings.py.example']},
59    scripts=glob('bin/*'),
60 -  data_files=webapp_content.items() + storage_dirs + conf_files + examples,
61 +  #data_files=webapp_content.items() + storage_dirs + conf_files + examples,
62 +  data_files=webapp_content.items(),
63    **setup_kwargs
64  )
65 --- ./webapp/graphite/cli/parser.py.orig        2012-05-31 00:28:54.000000000 -0600
66 +++ ./webapp/graphite/cli/parser.py     2012-11-24 14:09:51.777694906 -0700
67 @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY
68  See the License for the specific language governing permissions and
69  limitations under the License."""
70  
71 -from graphite.thirdparty.pyparsing import *
72 +from pyparsing import *
73  
74  grammar = Forward()
75  
76 --- ./webapp/graphite/local_settings.py.example 2012-11-24 14:10:08.313633288 -0700
77 +++ graphite-web-0.9.10/webapp/graphite/local_settings.py.example       2013-04-09 23:56:35.520679534 +0300
78 @@ -43,29 +43,29 @@
79  #####################################
80  # Change only GRAPHITE_ROOT if your install is merely shifted from /opt/graphite
81  # to somewhere else
82 -#GRAPHITE_ROOT = '/opt/graphite'
83 +GRAPHITE_ROOT = '/usr/share/graphite'
84  
85  # Most installs done outside of a separate tree such as /opt/graphite will only
86  # need to change these three settings. Note that the default settings for each
87  # of these is relative to GRAPHITE_ROOT
88 -#CONF_DIR = '/opt/graphite/conf'
89 -#STORAGE_DIR = '/opt/graphite/storage'
90 -#CONTENT_DIR = '/opt/graphite/webapp/content'
91 +CONF_DIR = '/etc/webapps/graphite-web'
92 +STORAGE_DIR = '/var/lib/graphite-web'
93 +CONTENT_DIR = '/usr/share/graphite/webapp/content'
94  
95  # To further or fully customize the paths, modify the following. Note that the
96  # default settings for each of these are relative to CONF_DIR and STORAGE_DIR
97  #
98  ## Webapp config files
99 -#DASHBOARD_CONF = '/opt/graphite/conf/dashboard.conf'
100 -#GRAPHTEMPLATES_CONF = '/opt/graphite/conf/graphTemplates.conf'
101 +#DASHBOARD_CONF = '/etc/webapps/graphite-web/dashboard.conf'
102 +#GRAPHTEMPLATES_CONF = '/etc/webapps/graphite-web/graphTemplates.conf'
103  
104  ## Data directories
105  # NOTE: If any directory is unreadable in DATA_DIRS it will break metric browsing
106 -#WHISPER_DIR = '/opt/graphite/storage/whisper'
107 -#RRD_DIR = '/opt/graphite/storage/rrd'
108 -#DATA_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables
109 -#LOG_DIR = '/opt/graphite/storage/log/webapp'
110 -#INDEX_FILE = '/opt/graphite/storage/index'  # Search index file
111 +WHISPER_DIR = '/var/lib/carbon/whisper/'
112 +RRD_DIR = '/var/lib/carbon/rrd'
113 +DATA_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables
114 +LOG_DIR = '/var/log/graphite-web/'
115 +INDEX_FILE = '/var/lib/graphite-web/index'  # Search index file
116  
117  
118  #####################################
119 @@ -138,17 +138,17 @@
120  #
121  # Users with Django 1.2 or greater should use the new dictionary
122  # specification as the old database specification style is removed in 1.4
123 -#DATABASES = {
124 -#    'default': {
125 -#        'NAME': '/opt/graphite/storage/graphite.db',
126 -#        'ENGINE': 'django.db.backends.sqlite3',
127 -#        'USER': '',
128 -#        'PASSWORD': '',
129 -#        'HOST': '',
130 -#        'PORT': ''
131 -#    }
132 -#}
133 -#
134 +DATABASES = {
135 +    'default': {
136 +        'NAME': '/var/lib/graphie-web/graphite.db',
137 +        'ENGINE': 'django.db.backends.sqlite3',
138 +        'USER': '',
139 +        'PASSWORD': '',
140 +        'HOST': '',
141 +        'PORT': ''
142 +    }
143 +}
144 +
145  # Users still on Django 1.1 must use the old method instead:
146  #DATABASE_ENGINE = 'django.db.backends.mysql'
147  #DATABASE_NAME = 'graphite'      # Or path to the database file if using sqlite3
148 --- ./webapp/graphite/render/attime.py.orig     2012-05-31 00:28:54.000000000 -0600
149 +++ ./webapp/graphite/render/attime.py  2012-11-24 14:09:51.777694906 -0700
150 @@ -16,11 +16,7 @@ from datetime import datetime,timedelta
151  from time import daylight
152  from django.conf import settings
153  
154 -try: # See if there is a system installation of pytz first
155 -  import pytz
156 -except ImportError: # Otherwise we fall back to Graphite's bundled version
157 -  from graphite.thirdparty import pytz
158 -
159 +import pytz
160  
161  months = ['jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec']
162  weekdays = ['sun','mon','tue','wed','thu','fri','sat']
163 --- ./webapp/graphite/render/glyph.py.orig      2012-05-31 00:28:54.000000000 -0600
164 +++ ./webapp/graphite/render/glyph.py   2012-11-24 14:09:51.779694900 -0700
165 @@ -22,10 +22,7 @@ from graphite.render.datalib import Time
166  from graphite.util import json
167  
168  
169 -try: # See if there is a system installation of pytz first
170 -  import pytz
171 -except ImportError: # Otherwise we fall back to Graphite's bundled version
172 -  from graphite.thirdparty import pytz
173 +import pytz
174  
175  INFINITY = float('inf')
176  
177 --- ./webapp/graphite/render/grammar.py.orig    2012-05-31 00:28:54.000000000 -0600
178 +++ ./webapp/graphite/render/grammar.py 2012-11-24 14:09:51.779694900 -0700
179 @@ -1,4 +1,4 @@
180 -from graphite.thirdparty.pyparsing import *
181 +from pyparsing import *
182  
183  ParserElement.enablePackrat()
184  grammar = Forward()
185 --- ./webapp/graphite/settings.py.orig  2012-05-31 14:30:23.000000000 -0600
186 +++ ./webapp/graphite/settings.py       2012-11-24 14:09:51.780694897 -0700
187 @@ -31,7 +31,6 @@ JAVASCRIPT_DEBUG = False
188  WEB_DIR = dirname( abspath(__file__) )
189  WEBAPP_DIR = dirname(WEB_DIR)
190  GRAPHITE_ROOT = dirname(WEBAPP_DIR)
191 -THIRDPARTY_DIR = join(WEB_DIR,'thirdparty')
192  # Initialize additional path variables
193  # Defaults for these are set after local_settings is imported
194  CONTENT_DIR = ''
195 @@ -50,8 +49,6 @@ DATA_DIRS = []
196  CLUSTER_SERVERS = []
197  
198  sys.path.insert(0, WEBAPP_DIR)
199 -# Allow local versions of the libs shipped in thirdparty to take precedence
200 -sys.path.append(THIRDPARTY_DIR)
201  
202  # Memcache settings
203  MEMCACHE_HOSTS = []
This page took 0.067156 seconds and 4 git commands to generate.