##// END OF EJS Templates
ini: tweak mako comment markup - prepare for variable expansion in ## lines by only "quoting" ##
Mads Kiilerich -
r8273:6eb1f66a stable
parent child Browse files
Show More
@@ -228,7 +228,7 b' allow_custom_hooks_settings = True'
228 # CHANGELOG
228 # CHANGELOG
229
229
230 ####################################
230 ####################################
231 ### SSH CONFIG ####
231 ## SSH CONFIG ##
232 ####################################
232 ####################################
233
233
234 ## SSH is disabled by default, until an Administrator decides to enable it.
234 ## SSH is disabled by default, until an Administrator decides to enable it.
@@ -247,7 +247,7 b' ssh_enabled = false'
247 #ssh_locale = C.UTF-8
247 #ssh_locale = C.UTF-8
248
248
249 ####################################
249 ####################################
250 ### CELERY CONFIG ####
250 ## CELERY CONFIG ##
251 ####################################
251 ####################################
252
252
253 ## Note: Celery doesn't support Windows.
253 ## Note: Celery doesn't support Windows.
@@ -269,7 +269,7 b' celery.worker_max_tasks_per_child = 1'
269 celery.task_always_eager = false
269 celery.task_always_eager = false
270
270
271 ####################################
271 ####################################
272 ### BEAKER CACHE ####
272 ## BEAKER CACHE ##
273 ####################################
273 ####################################
274
274
275 beaker.cache.data_dir = %(here)s/data/cache/data
275 beaker.cache.data_dir = %(here)s/data/cache/data
@@ -286,7 +286,7 b' beaker.cache.long_term_file.expire = 604'
286 beaker.cache.long_term_file.key_length = 256
286 beaker.cache.long_term_file.key_length = 256
287
287
288 ####################################
288 ####################################
289 ### BEAKER SESSION ####
289 ## BEAKER SESSION ##
290 ####################################
290 ####################################
291
291
292 ## Name of session cookie. Should be unique for a given host and path, even when running
292 ## Name of session cookie. Should be unique for a given host and path, even when running
@@ -319,7 +319,7 b' session.secret = development-not-secret'
319 #session.table_name = db_session
319 #session.table_name = db_session
320
320
321 ####################################
321 ####################################
322 ### ERROR HANDLING ####
322 ## ERROR HANDLING ##
323 ####################################
323 ####################################
324
324
325 ## Show a nice error page for application HTTP errors and exceptions (default true)
325 ## Show a nice error page for application HTTP errors and exceptions (default true)
@@ -347,16 +347,16 b' get trace_errors.smtp_use_tls = smtp_use'
347
347
348
348
349 ##################################
349 ##################################
350 ### LOGVIEW CONFIG ###
350 ## LOGVIEW CONFIG ##
351 ##################################
351 ##################################
352
352
353 logview.sqlalchemy = #faa
353 logview.sqlalchemy = #faa
354 logview.pylons.templating = #bfb
354 logview.pylons.templating = #bfb
355 logview.pylons.util = #eee
355 logview.pylons.util = #eee
356
356
357 #########################################################
357 #########################
358 ### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###
358 ## DB CONFIG ##
359 #########################################################
359 #########################
360
360
361 ## SQLITE [default]
361 ## SQLITE [default]
362 sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
362 sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
@@ -366,14 +366,14 b' sqlalchemy.url = sqlite:///%(here)s/kall'
366 sqlalchemy.pool_recycle = 3600
366 sqlalchemy.pool_recycle = 3600
367
367
368 ################################
368 ################################
369 ### ALEMBIC CONFIGURATION ####
369 ## ALEMBIC CONFIGURATION ##
370 ################################
370 ################################
371
371
372 [alembic]
372 [alembic]
373 script_location = kallithea:alembic
373 script_location = kallithea:alembic
374
374
375 ################################
375 ################################
376 ### LOGGING CONFIGURATION ####
376 ## LOGGING CONFIGURATION ##
377 ################################
377 ################################
378
378
379 [loggers]
379 [loggers]
@@ -1,59 +1,59 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%text>###################################################################################</%text>
2 <%text>##</%text>#################################################################################
3 <%text>###################################################################################</%text>
3 <%text>##</%text>#################################################################################
4 <%text>## Kallithea config file generated with kallithea-config ##</%text>
4 <%text>##</%text> Kallithea config file generated with kallithea-config ##
5 <%text>## ##</%text>
5 <%text>##</%text> ##
6 <%text>## The %(here)s variable will be replaced with the parent directory of this file ##</%text>
6 <%text>##</%text> The %(here)s variable will be replaced with the parent directory of this file ##
7 <%text>###################################################################################</%text>
7 <%text>##</%text>#################################################################################
8 <%text>###################################################################################</%text>
8 <%text>##</%text>#################################################################################
9
9
10 [DEFAULT]
10 [DEFAULT]
11
11
12 <%text>################################################################################</%text>
12 <%text>##</%text>##############################################################################
13 <%text>## Email settings ##</%text>
13 <%text>##</%text> Email settings ##
14 <%text>## ##</%text>
14 <%text>##</%text> ##
15 <%text>## Refer to the documentation ("Email settings") for more details. ##</%text>
15 <%text>##</%text> Refer to the documentation ("Email settings") for more details. ##
16 <%text>## ##</%text>
16 <%text>##</%text> ##
17 <%text>## It is recommended to use a valid sender address that passes access ##</%text>
17 <%text>##</%text> It is recommended to use a valid sender address that passes access ##
18 <%text>## validation and spam filtering in mail servers. ##</%text>
18 <%text>##</%text> validation and spam filtering in mail servers. ##
19 <%text>################################################################################</%text>
19 <%text>##</%text>##############################################################################
20
20
21 <%text>## 'From' header for application emails. You can optionally add a name.</%text>
21 <%text>##</%text> 'From' header for application emails. You can optionally add a name.
22 <%text>## Default:</%text>
22 <%text>##</%text> Default:
23 #app_email_from = Kallithea
23 #app_email_from = Kallithea
24 <%text>## Examples:</%text>
24 <%text>##</%text> Examples:
25 #app_email_from = Kallithea <kallithea-noreply@example.com>
25 #app_email_from = Kallithea <kallithea-noreply@example.com>
26 #app_email_from = kallithea-noreply@example.com
26 #app_email_from = kallithea-noreply@example.com
27
27
28 <%text>## Subject prefix for application emails.</%text>
28 <%text>##</%text> Subject prefix for application emails.
29 <%text>## A space between this prefix and the real subject is automatically added.</%text>
29 <%text>##</%text> A space between this prefix and the real subject is automatically added.
30 <%text>## Default:</%text>
30 <%text>##</%text> Default:
31 #email_prefix =
31 #email_prefix =
32 <%text>## Example:</%text>
32 <%text>##</%text> Example:
33 #email_prefix = [Kallithea]
33 #email_prefix = [Kallithea]
34
34
35 <%text>## Recipients for error emails and fallback recipients of application mails.</%text>
35 <%text>##</%text> Recipients for error emails and fallback recipients of application mails.
36 <%text>## Multiple addresses can be specified, comma-separated.</%text>
36 <%text>##</%text> Multiple addresses can be specified, comma-separated.
37 <%text>## Only addresses are allowed, do not add any name part.</%text>
37 <%text>##</%text> Only addresses are allowed, do not add any name part.
38 <%text>## Default:</%text>
38 <%text>##</%text> Default:
39 #email_to =
39 #email_to =
40 <%text>## Examples:</%text>
40 <%text>##</%text> Examples:
41 #email_to = admin@example.com
41 #email_to = admin@example.com
42 #email_to = admin@example.com,another_admin@example.com
42 #email_to = admin@example.com,another_admin@example.com
43 email_to =
43 email_to =
44
44
45 <%text>## 'From' header for error emails. You can optionally add a name.</%text>
45 <%text>##</%text> 'From' header for error emails. You can optionally add a name.
46 <%text>## Default: (none)</%text>
46 <%text>##</%text> Default: (none)
47 <%text>## Examples:</%text>
47 <%text>##</%text> Examples:
48 #error_email_from = Kallithea Errors <kallithea-noreply@example.com>
48 #error_email_from = Kallithea Errors <kallithea-noreply@example.com>
49 #error_email_from = kallithea_errors@example.com
49 #error_email_from = kallithea_errors@example.com
50 error_email_from =
50 error_email_from =
51
51
52 <%text>## SMTP server settings</%text>
52 <%text>##</%text> SMTP server settings
53 <%text>## If specifying credentials, make sure to use secure connections.</%text>
53 <%text>##</%text> If specifying credentials, make sure to use secure connections.
54 <%text>## Default: Send unencrypted unauthenticated mails to the specified smtp_server.</%text>
54 <%text>##</%text> Default: Send unencrypted unauthenticated mails to the specified smtp_server.
55 <%text>## For "SSL", use smtp_use_ssl = true and smtp_port = 465.</%text>
55 <%text>##</%text> For "SSL", use smtp_use_ssl = true and smtp_port = 465.
56 <%text>## For "STARTTLS", use smtp_use_tls = true and smtp_port = 587.</%text>
56 <%text>##</%text> For "STARTTLS", use smtp_use_tls = true and smtp_port = 587.
57 smtp_server =
57 smtp_server =
58 smtp_username =
58 smtp_username =
59 smtp_password =
59 smtp_password =
@@ -62,67 +62,67 b' smtp_use_ssl = false'
62 smtp_use_tls = false
62 smtp_use_tls = false
63
63
64 %if http_server != 'uwsgi':
64 %if http_server != 'uwsgi':
65 <%text>## Entry point for 'gearbox serve'</%text>
65 <%text>##</%text> Entry point for 'gearbox serve'
66 [server:main]
66 [server:main]
67 host = ${host}
67 host = ${host}
68 port = ${port}
68 port = ${port}
69
69
70 %if http_server == 'gearbox':
70 %if http_server == 'gearbox':
71 <%text>## Gearbox default web server ##</%text>
71 <%text>##</%text> Gearbox default web server ##
72 use = egg:gearbox#wsgiref
72 use = egg:gearbox#wsgiref
73 <%text>## nr of worker threads to spawn</%text>
73 <%text>##</%text> nr of worker threads to spawn
74 threadpool_workers = 1
74 threadpool_workers = 1
75 <%text>## max request before thread respawn</%text>
75 <%text>##</%text> max request before thread respawn
76 threadpool_max_requests = 100
76 threadpool_max_requests = 100
77 <%text>## option to use threads of process</%text>
77 <%text>##</%text> option to use threads of process
78 use_threadpool = true
78 use_threadpool = true
79
79
80 %elif http_server == 'gevent':
80 %elif http_server == 'gevent':
81 <%text>## Gearbox gevent web server ##</%text>
81 <%text>##</%text> Gearbox gevent web server ##
82 use = egg:gearbox#gevent
82 use = egg:gearbox#gevent
83
83
84 %elif http_server == 'waitress':
84 %elif http_server == 'waitress':
85 <%text>## WAITRESS ##</%text>
85 <%text>##</%text> WAITRESS ##
86 use = egg:waitress#main
86 use = egg:waitress#main
87 <%text>## number of worker threads</%text>
87 <%text>##</%text> number of worker threads
88 threads = 1
88 threads = 1
89 <%text>## MAX BODY SIZE 100GB</%text>
89 <%text>##</%text> MAX BODY SIZE 100GB
90 max_request_body_size = 107374182400
90 max_request_body_size = 107374182400
91 <%text>## use poll instead of select, fixes fd limits, may not work on old</%text>
91 <%text>##</%text> use poll instead of select, fixes fd limits, may not work on old
92 <%text>## windows systems.</%text>
92 <%text>##</%text> windows systems.
93 #asyncore_use_poll = True
93 #asyncore_use_poll = True
94
94
95 %elif http_server == 'gunicorn':
95 %elif http_server == 'gunicorn':
96 <%text>## GUNICORN ##</%text>
96 <%text>##</%text> GUNICORN ##
97 use = egg:gunicorn#main
97 use = egg:gunicorn#main
98 <%text>## number of process workers. You must set `instance_id = *` when this option</%text>
98 <%text>##</%text> number of process workers. You must set `instance_id = *` when this option
99 <%text>## is set to more than one worker</%text>
99 <%text>##</%text> is set to more than one worker
100 workers = 4
100 workers = 4
101 <%text>## process name</%text>
101 <%text>##</%text> process name
102 proc_name = kallithea
102 proc_name = kallithea
103 <%text>## type of worker class, one of sync, eventlet, gevent, tornado</%text>
103 <%text>##</%text> type of worker class, one of sync, eventlet, gevent, tornado
104 <%text>## recommended for bigger setup is using of of other than sync one</%text>
104 <%text>##</%text> recommended for bigger setup is using of of other than sync one
105 worker_class = sync
105 worker_class = sync
106 max_requests = 1000
106 max_requests = 1000
107 <%text>## amount of time a worker can handle request before it gets killed and</%text>
107 <%text>##</%text> amount of time a worker can handle request before it gets killed and
108 <%text>## restarted</%text>
108 <%text>##</%text> restarted
109 timeout = 3600
109 timeout = 3600
110
110
111 %endif
111 %endif
112 %else:
112 %else:
113 <%text>## UWSGI ##</%text>
113 <%text>##</%text> UWSGI ##
114 [uwsgi]
114 [uwsgi]
115 <%text>## Note: this section is parsed by the uWSGI .ini parser when run as:</%text>
115 <%text>##</%text> Note: this section is parsed by the uWSGI .ini parser when run as:
116 <%text>## uwsgi --venv /srv/kallithea/venv --ini-paste-logged my.ini</%text>
116 <%text>##</%text> uwsgi --venv /srv/kallithea/venv --ini-paste-logged my.ini
117 <%text>## Note: in uWSGI 2.0.18 or older, pastescript needs to be installed to</%text>
117 <%text>##</%text> Note: in uWSGI 2.0.18 or older, pastescript needs to be installed to
118 <%text>## get correct application logging. In later versions this is not necessary.</%text>
118 <%text>##</%text> get correct application logging. In later versions this is not necessary.
119 <%text>## pip install pastescript</%text>
119 <%text>##</%text> pip install pastescript
120
120
121 <%text>## HTTP Basics:</%text>
121 <%text>##</%text> HTTP Basics:
122 http-socket = ${host}:${port}
122 http-socket = ${host}:${port}
123 buffer-size = 65535 ; Mercurial will use huge GET headers for discovery
123 buffer-size = 65535 ; Mercurial will use huge GET headers for discovery
124
124
125 <%text>## Scaling:</%text>
125 <%text>##</%text> Scaling:
126 master = true ; Use separate master and worker processes
126 master = true ; Use separate master and worker processes
127 auto-procname = true ; Name worker processes accordingly
127 auto-procname = true ; Name worker processes accordingly
128 lazy = true ; App *must* be loaded in workers - db connections can't be shared
128 lazy = true ; App *must* be loaded in workers - db connections can't be shared
@@ -130,7 +130,7 b' workers = 4 ;'
130 cheaper = 1 ; Initial and on demand scaling down to this many worker processes
130 cheaper = 1 ; Initial and on demand scaling down to this many worker processes
131 max-requests = 1000 ; Graceful reload of worker processes to avoid leaks
131 max-requests = 1000 ; Graceful reload of worker processes to avoid leaks
132
132
133 <%text>## Tweak defaults:</%text>
133 <%text>##</%text> Tweak defaults:
134 strict = true ; Fail on unknown config directives
134 strict = true ; Fail on unknown config directives
135 enable-threads = true ; Enable Python threads (not threaded workers)
135 enable-threads = true ; Enable Python threads (not threaded workers)
136 vacuum = true ; Delete sockets during shutdown
136 vacuum = true ; Delete sockets during shutdown
@@ -140,197 +140,197 b' need-app = true ;'
140 reload-on-exception = true ; Don't assume that the application worker can process more requests after a severe error
140 reload-on-exception = true ; Don't assume that the application worker can process more requests after a severe error
141
141
142 %endif
142 %endif
143 <%text>## middleware for hosting the WSGI application under a URL prefix</%text>
143 <%text>##</%text> middleware for hosting the WSGI application under a URL prefix
144 #[filter:proxy-prefix]
144 #[filter:proxy-prefix]
145 #use = egg:PasteDeploy#prefix
145 #use = egg:PasteDeploy#prefix
146 #prefix = /<your-prefix>
146 #prefix = /<your-prefix>
147
147
148 [app:main]
148 [app:main]
149 use = egg:kallithea
149 use = egg:kallithea
150 <%text>## enable proxy prefix middleware</%text>
150 <%text>##</%text> enable proxy prefix middleware
151 #filter-with = proxy-prefix
151 #filter-with = proxy-prefix
152
152
153 full_stack = true
153 full_stack = true
154 static_files = true
154 static_files = true
155
155
156 <%text>## Internationalization (see setup documentation for details)</%text>
156 <%text>##</%text> Internationalization (see setup documentation for details)
157 <%text>## By default, the languages requested by the browser are used if available, with English as default.</%text>
157 <%text>##</%text> By default, the languages requested by the browser are used if available, with English as default.
158 <%text>## Set i18n.enabled=false to disable automatic language choice.</%text>
158 <%text>##</%text> Set i18n.enabled=false to disable automatic language choice.
159 #i18n.enabled = true
159 #i18n.enabled = true
160 <%text>## To Force a language, set i18n.enabled=false and specify the language in i18n.lang.</%text>
160 <%text>##</%text> To Force a language, set i18n.enabled=false and specify the language in i18n.lang.
161 <%text>## Valid values are the names of subdirectories in kallithea/i18n with a LC_MESSAGES/kallithea.mo</%text>
161 <%text>##</%text> Valid values are the names of subdirectories in kallithea/i18n with a LC_MESSAGES/kallithea.mo
162 #i18n.lang = en
162 #i18n.lang = en
163
163
164 cache_dir = %(here)s/data
164 cache_dir = %(here)s/data
165 index_dir = %(here)s/data/index
165 index_dir = %(here)s/data/index
166
166
167 <%text>## uncomment and set this path to use archive download cache</%text>
167 <%text>##</%text> uncomment and set this path to use archive download cache
168 archive_cache_dir = %(here)s/tarballcache
168 archive_cache_dir = %(here)s/tarballcache
169
169
170 <%text>## change this to unique ID for security</%text>
170 <%text>##</%text> change this to unique ID for security
171 app_instance_uuid = ${uuid()}
171 app_instance_uuid = ${uuid()}
172
172
173 <%text>## cut off limit for large diffs (size in bytes)</%text>
173 <%text>##</%text> cut off limit for large diffs (size in bytes)
174 cut_off_limit = 256000
174 cut_off_limit = 256000
175
175
176 <%text>## force https in Kallithea, fixes https redirects, assumes it's always https</%text>
176 <%text>##</%text> force https in Kallithea, fixes https redirects, assumes it's always https
177 force_https = false
177 force_https = false
178
178
179 <%text>## use Strict-Transport-Security headers</%text>
179 <%text>##</%text> use Strict-Transport-Security headers
180 use_htsts = false
180 use_htsts = false
181
181
182 <%text>## number of commits stats will parse on each iteration</%text>
182 <%text>##</%text> number of commits stats will parse on each iteration
183 commit_parse_limit = 25
183 commit_parse_limit = 25
184
184
185 <%text>## Path to Python executable to be used for git hooks.</%text>
185 <%text>##</%text> Path to Python executable to be used for git hooks.
186 <%text>## This value will be written inside the git hook scripts as the text</%text>
186 <%text>##</%text> This value will be written inside the git hook scripts as the text
187 <%text>## after '#!' (shebang). When empty or not defined, the value of</%text>
187 <%text>##</%text> after '#!' (shebang). When empty or not defined, the value of
188 <%text>## 'sys.executable' at the time of installation of the git hooks is</%text>
188 <%text>##</%text> 'sys.executable' at the time of installation of the git hooks is
189 <%text>## used, which is correct in many cases but for example not when using uwsgi.</%text>
189 <%text>##</%text> used, which is correct in many cases but for example not when using uwsgi.
190 <%text>## If you change this setting, you should reinstall the Git hooks via</%text>
190 <%text>##</%text> If you change this setting, you should reinstall the Git hooks via
191 <%text>## Admin > Settings > Remap and Rescan.</%text>
191 <%text>##</%text> Admin > Settings > Remap and Rescan.
192 #git_hook_interpreter = /srv/kallithea/venv/bin/python3
192 #git_hook_interpreter = /srv/kallithea/venv/bin/python3
193 %if git_hook_interpreter:
193 %if git_hook_interpreter:
194 git_hook_interpreter = ${git_hook_interpreter}
194 git_hook_interpreter = ${git_hook_interpreter}
195 %endif
195 %endif
196
196
197 <%text>## path to git executable</%text>
197 <%text>##</%text> path to git executable
198 git_path = git
198 git_path = git
199
199
200 <%text>## git rev filter option, --all is the default filter, if you need to</%text>
200 <%text>##</%text> git rev filter option, --all is the default filter, if you need to
201 <%text>## hide all refs in changelog switch this to --branches --tags</%text>
201 <%text>##</%text> hide all refs in changelog switch this to --branches --tags
202 #git_rev_filter = --branches --tags
202 #git_rev_filter = --branches --tags
203
203
204 <%text>## RSS feed options</%text>
204 <%text>##</%text> RSS feed options
205 rss_cut_off_limit = 256000
205 rss_cut_off_limit = 256000
206 rss_items_per_page = 10
206 rss_items_per_page = 10
207 rss_include_diff = false
207 rss_include_diff = false
208
208
209 <%text>## options for showing and identifying changesets</%text>
209 <%text>##</%text> options for showing and identifying changesets
210 show_sha_length = 12
210 show_sha_length = 12
211 show_revision_number = false
211 show_revision_number = false
212
212
213 <%text>## Canonical URL to use when creating full URLs in UI and texts.</%text>
213 <%text>##</%text> Canonical URL to use when creating full URLs in UI and texts.
214 <%text>## Useful when the site is available under different names or protocols.</%text>
214 <%text>##</%text> Useful when the site is available under different names or protocols.
215 <%text>## Defaults to what is provided in the WSGI environment.</%text>
215 <%text>##</%text> Defaults to what is provided in the WSGI environment.
216 #canonical_url = https://kallithea.example.com/repos
216 #canonical_url = https://kallithea.example.com/repos
217
217
218 <%text>## gist URL alias, used to create nicer urls for gist. This should be an</%text>
218 <%text>##</%text> gist URL alias, used to create nicer urls for gist. This should be an
219 <%text>## url that does rewrites to _admin/gists/<gistid>.</%text>
219 <%text>##</%text> url that does rewrites to _admin/gists/<gistid>.
220 <%text>## example: http://gist.example.com/{gistid}. Empty means use the internal</%text>
220 <%text>##</%text> example: http://gist.example.com/{gistid}. Empty means use the internal
221 <%text>## Kallithea url, ie. http[s]://kallithea.example.com/_admin/gists/<gistid></%text>
221 <%text>##</%text> Kallithea url, ie. http[s]://kallithea.example.com/_admin/gists/<gistid>
222 gist_alias_url =
222 gist_alias_url =
223
223
224 <%text>## default encoding used to convert from and to unicode</%text>
224 <%text>##</%text> default encoding used to convert from and to unicode
225 <%text>## can be also a comma separated list of encoding in case of mixed encodings</%text>
225 <%text>##</%text> can be also a comma separated list of encoding in case of mixed encodings
226 default_encoding = utf-8
226 default_encoding = utf-8
227
227
228 <%text>## Set Mercurial encoding, similar to setting HGENCODING before launching Kallithea</%text>
228 <%text>##</%text> Set Mercurial encoding, similar to setting HGENCODING before launching Kallithea
229 hgencoding = utf-8
229 hgencoding = utf-8
230
230
231 <%text>## issue tracker for Kallithea (leave blank to disable, absent for default)</%text>
231 <%text>##</%text> issue tracker for Kallithea (leave blank to disable, absent for default)
232 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
232 #bugtracker = https://bitbucket.org/conservancy/kallithea/issues
233
233
234 <%text>## issue tracking mapping for commit messages, comments, PR descriptions, ...</%text>
234 <%text>##</%text> issue tracking mapping for commit messages, comments, PR descriptions, ...
235 <%text>## Refer to the documentation ("Integration with issue trackers") for more details.</%text>
235 <%text>##</%text> Refer to the documentation ("Integration with issue trackers") for more details.
236
236
237 <%text>## regular expression to match issue references</%text>
237 <%text>##</%text> regular expression to match issue references
238 <%text>## This pattern may/should contain parenthesized groups, that can</%text>
238 <%text>##</%text> This pattern may/should contain parenthesized groups, that can
239 <%text>## be referred to in issue_server_link or issue_sub using Python backreferences</%text>
239 <%text>##</%text> be referred to in issue_server_link or issue_sub using Python backreferences
240 <%text>## (e.g. \1, \2, ...). You can also create named groups with '(?P<groupname>)'.</%text>
240 <%text>##</%text> (e.g. \1, \2, ...). You can also create named groups with '(?P<groupname>)'.
241 <%text>## To require mandatory whitespace before the issue pattern, use:</%text>
241 <%text>##</%text> To require mandatory whitespace before the issue pattern, use:
242 <%text>## (?:^|(?<=\s)) before the actual pattern, and for mandatory whitespace</%text>
242 <%text>##</%text> (?:^|(?<=\s)) before the actual pattern, and for mandatory whitespace
243 <%text>## behind the issue pattern, use (?:$|(?=\s)) after the actual pattern.</%text>
243 <%text>##</%text> behind the issue pattern, use (?:$|(?=\s)) after the actual pattern.
244
244
245 issue_pat = #(\d+)
245 issue_pat = #(\d+)
246
246
247 <%text>## server url to the issue</%text>
247 <%text>##</%text> server url to the issue
248 <%text>## This pattern may/should contain backreferences to parenthesized groups in issue_pat.</%text>
248 <%text>##</%text> This pattern may/should contain backreferences to parenthesized groups in issue_pat.
249 <%text>## A backreference can be \1, \2, ... or \g<groupname> if you specified a named group</%text>
249 <%text>##</%text> A backreference can be \1, \2, ... or \g<groupname> if you specified a named group
250 <%text>## called 'groupname' in issue_pat.</%text>
250 <%text>##</%text> called 'groupname' in issue_pat.
251 <%text>## The special token {repo} is replaced with the full repository name</%text>
251 <%text>##</%text> The special token {repo} is replaced with the full repository name
252 <%text>## including repository groups, while {repo_name} is replaced with just</%text>
252 <%text>##</%text> including repository groups, while {repo_name} is replaced with just
253 <%text>## the name of the repository.</%text>
253 <%text>##</%text> the name of the repository.
254
254
255 issue_server_link = https://issues.example.com/{repo}/issue/\1
255 issue_server_link = https://issues.example.com/{repo}/issue/\1
256
256
257 <%text>## substitution pattern to use as the link text</%text>
257 <%text>##</%text> substitution pattern to use as the link text
258 <%text>## If issue_sub is empty, the text matched by issue_pat is retained verbatim</%text>
258 <%text>##</%text> If issue_sub is empty, the text matched by issue_pat is retained verbatim
259 <%text>## for the link text. Otherwise, the link text is that of issue_sub, with any</%text>
259 <%text>##</%text> for the link text. Otherwise, the link text is that of issue_sub, with any
260 <%text>## backreferences to groups in issue_pat replaced.</%text>
260 <%text>##</%text> backreferences to groups in issue_pat replaced.
261
261
262 issue_sub =
262 issue_sub =
263
263
264 <%text>## issue_pat, issue_server_link and issue_sub can have suffixes to specify</%text>
264 <%text>##</%text> issue_pat, issue_server_link and issue_sub can have suffixes to specify
265 <%text>## multiple patterns, to other issues server, wiki or others</%text>
265 <%text>##</%text> multiple patterns, to other issues server, wiki or others
266 <%text>## below an example how to create a wiki pattern</%text>
266 <%text>##</%text> below an example how to create a wiki pattern
267 <%text>## wiki-some-id -> https://wiki.example.com/some-id</%text>
267 <%text>##</%text> wiki-some-id -> https://wiki.example.com/some-id
268
268
269 #issue_pat_wiki = wiki-(\S+)
269 #issue_pat_wiki = wiki-(\S+)
270 #issue_server_link_wiki = https://wiki.example.com/\1
270 #issue_server_link_wiki = https://wiki.example.com/\1
271 #issue_sub_wiki = WIKI-\1
271 #issue_sub_wiki = WIKI-\1
272
272
273 <%text>## alternative return HTTP header for failed authentication. Default HTTP</%text>
273 <%text>##</%text> alternative return HTTP header for failed authentication. Default HTTP
274 <%text>## response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with</%text>
274 <%text>##</%text> response is 401 HTTPUnauthorized. Currently Mercurial clients have trouble with
275 <%text>## handling that. Set this variable to 403 to return HTTPForbidden</%text>
275 <%text>##</%text> handling that. Set this variable to 403 to return HTTPForbidden
276 auth_ret_code =
276 auth_ret_code =
277
277
278 <%text>## allows to change the repository location in settings page</%text>
278 <%text>##</%text> allows to change the repository location in settings page
279 allow_repo_location_change = True
279 allow_repo_location_change = True
280
280
281 <%text>## allows to setup custom hooks in settings page</%text>
281 <%text>##</%text> allows to setup custom hooks in settings page
282 allow_custom_hooks_settings = True
282 allow_custom_hooks_settings = True
283
283
284 <%text>## extra extensions for indexing, space separated and without the leading '.'.</%text>
284 <%text>##</%text> extra extensions for indexing, space separated and without the leading '.'.
285 #index.extensions =
285 #index.extensions =
286 # gemfile
286 # gemfile
287 # lock
287 # lock
288
288
289 <%text>## extra filenames for indexing, space separated</%text>
289 <%text>##</%text> extra filenames for indexing, space separated
290 #index.filenames =
290 #index.filenames =
291 # .dockerignore
291 # .dockerignore
292 # .editorconfig
292 # .editorconfig
293 # INSTALL
293 # INSTALL
294 # CHANGELOG
294 # CHANGELOG
295
295
296 <%text>####################################</%text>
296 <%text>##</%text>##################################
297 <%text>### SSH CONFIG ####</%text>
297 <%text>##</%text> SSH CONFIG ##
298 <%text>####################################</%text>
298 <%text>##</%text>##################################
299
299
300 <%text>## SSH is disabled by default, until an Administrator decides to enable it.</%text>
300 <%text>##</%text> SSH is disabled by default, until an Administrator decides to enable it.
301 ssh_enabled = false
301 ssh_enabled = false
302
302
303 <%text>## File where users' SSH keys will be stored *if* ssh_enabled is true.</%text>
303 <%text>##</%text> File where users' SSH keys will be stored *if* ssh_enabled is true.
304 #ssh_authorized_keys = /home/kallithea/.ssh/authorized_keys
304 #ssh_authorized_keys = /home/kallithea/.ssh/authorized_keys
305 %if user_home_path:
305 %if user_home_path:
306 ssh_authorized_keys = ${user_home_path}/.ssh/authorized_keys
306 ssh_authorized_keys = ${user_home_path}/.ssh/authorized_keys
307 %endif
307 %endif
308
308
309 <%text>## Path to be used in ssh_authorized_keys file to invoke kallithea-cli with ssh-serve.</%text>
309 <%text>##</%text> Path to be used in ssh_authorized_keys file to invoke kallithea-cli with ssh-serve.
310 #kallithea_cli_path = /srv/kallithea/venv/bin/kallithea-cli
310 #kallithea_cli_path = /srv/kallithea/venv/bin/kallithea-cli
311 %if kallithea_cli_path:
311 %if kallithea_cli_path:
312 kallithea_cli_path = ${kallithea_cli_path}
312 kallithea_cli_path = ${kallithea_cli_path}
313 %endif
313 %endif
314
314
315 <%text>## Locale to be used in the ssh-serve command.</%text>
315 <%text>##</%text> Locale to be used in the ssh-serve command.
316 <%text>## This is needed because an SSH client may try to use its own locale</%text>
316 <%text>##</%text> This is needed because an SSH client may try to use its own locale
317 <%text>## settings, which may not be available on the server.</%text>
317 <%text>##</%text> settings, which may not be available on the server.
318 <%text>## See `locale -a` for valid values on this system.</%text>
318 <%text>##</%text> See `locale -a` for valid values on this system.
319 #ssh_locale = C.UTF-8
319 #ssh_locale = C.UTF-8
320 %if ssh_locale:
320 %if ssh_locale:
321 ssh_locale = ${ssh_locale}
321 ssh_locale = ${ssh_locale}
322 %endif
322 %endif
323
323
324 <%text>####################################</%text>
324 <%text>##</%text>##################################
325 <%text>### CELERY CONFIG ####</%text>
325 <%text>##</%text> CELERY CONFIG ##
326 <%text>####################################</%text>
326 <%text>##</%text>##################################
327
327
328 <%text>## Note: Celery doesn't support Windows.</%text>
328 <%text>##</%text> Note: Celery doesn't support Windows.
329 use_celery = false
329 use_celery = false
330
330
331 <%text>## Celery config settings from https://docs.celeryproject.org/en/4.4.0/userguide/configuration.html prefixed with 'celery.'.</%text>
331 <%text>##</%text> Celery config settings from https://docs.celeryproject.org/en/4.4.0/userguide/configuration.html prefixed with 'celery.'.
332
332
333 <%text>## Example: use the message queue on the local virtual host 'kallitheavhost' as the RabbitMQ user 'kallithea':</%text>
333 <%text>##</%text> Example: use the message queue on the local virtual host 'kallitheavhost' as the RabbitMQ user 'kallithea':
334 celery.broker_url = amqp://kallithea:thepassword@localhost:5672/kallitheavhost
334 celery.broker_url = amqp://kallithea:thepassword@localhost:5672/kallitheavhost
335
335
336 celery.result.backend = db+sqlite:///celery-results.db
336 celery.result.backend = db+sqlite:///celery-results.db
@@ -340,12 +340,12 b' celery.result.backend = db+sqlite:///cel'
340 celery.worker_concurrency = 2
340 celery.worker_concurrency = 2
341 celery.worker_max_tasks_per_child = 1
341 celery.worker_max_tasks_per_child = 1
342
342
343 <%text>## If true, tasks will never be sent to the queue, but executed locally instead.</%text>
343 <%text>##</%text> If true, tasks will never be sent to the queue, but executed locally instead.
344 celery.task_always_eager = false
344 celery.task_always_eager = false
345
345
346 <%text>####################################</%text>
346 <%text>##</%text>##################################
347 <%text>### BEAKER CACHE ####</%text>
347 <%text>##</%text> BEAKER CACHE ##
348 <%text>####################################</%text>
348 <%text>##</%text>##################################
349
349
350 beaker.cache.data_dir = %(here)s/data/cache/data
350 beaker.cache.data_dir = %(here)s/data/cache/data
351 beaker.cache.lock_dir = %(here)s/data/cache/lock
351 beaker.cache.lock_dir = %(here)s/data/cache/lock
@@ -360,56 +360,56 b' beaker.cache.long_term_file.type = file'
360 beaker.cache.long_term_file.expire = 604800
360 beaker.cache.long_term_file.expire = 604800
361 beaker.cache.long_term_file.key_length = 256
361 beaker.cache.long_term_file.key_length = 256
362
362
363 <%text>####################################</%text>
363 <%text>##</%text>##################################
364 <%text>### BEAKER SESSION ####</%text>
364 <%text>##</%text> BEAKER SESSION ##
365 <%text>####################################</%text>
365 <%text>##</%text>##################################
366
366
367 <%text>## Name of session cookie. Should be unique for a given host and path, even when running</%text>
367 <%text>##</%text> Name of session cookie. Should be unique for a given host and path, even when running
368 <%text>## on different ports. Otherwise, cookie sessions will be shared and messed up.</%text>
368 <%text>##</%text> on different ports. Otherwise, cookie sessions will be shared and messed up.
369 session.key = kallithea
369 session.key = kallithea
370 <%text>## Sessions should always only be accessible by the browser, not directly by JavaScript.</%text>
370 <%text>##</%text> Sessions should always only be accessible by the browser, not directly by JavaScript.
371 session.httponly = true
371 session.httponly = true
372 <%text>## Session lifetime. 2592000 seconds is 30 days.</%text>
372 <%text>##</%text> Session lifetime. 2592000 seconds is 30 days.
373 session.timeout = 2592000
373 session.timeout = 2592000
374
374
375 <%text>## Server secret used with HMAC to ensure integrity of cookies.</%text>
375 <%text>##</%text> Server secret used with HMAC to ensure integrity of cookies.
376 session.secret = ${uuid()}
376 session.secret = ${uuid()}
377 <%text>## Further, encrypt the data with AES.</%text>
377 <%text>##</%text> Further, encrypt the data with AES.
378 #session.encrypt_key = <key_for_encryption>
378 #session.encrypt_key = <key_for_encryption>
379 #session.validate_key = <validation_key>
379 #session.validate_key = <validation_key>
380
380
381 <%text>## Type of storage used for the session, current types are</%text>
381 <%text>##</%text> Type of storage used for the session, current types are
382 <%text>## dbm, file, memcached, database, and memory.</%text>
382 <%text>##</%text> dbm, file, memcached, database, and memory.
383
383
384 <%text>## File system storage of session data. (default)</%text>
384 <%text>##</%text> File system storage of session data. (default)
385 #session.type = file
385 #session.type = file
386
386
387 <%text>## Cookie only, store all session data inside the cookie. Requires secure secrets.</%text>
387 <%text>##</%text> Cookie only, store all session data inside the cookie. Requires secure secrets.
388 #session.type = cookie
388 #session.type = cookie
389
389
390 <%text>## Database storage of session data.</%text>
390 <%text>##</%text> Database storage of session data.
391 #session.type = ext:database
391 #session.type = ext:database
392 #session.sa.url = postgresql://postgres:qwe@localhost/kallithea
392 #session.sa.url = postgresql://postgres:qwe@localhost/kallithea
393 #session.table_name = db_session
393 #session.table_name = db_session
394
394
395 <%text>####################################</%text>
395 <%text>##</%text>##################################
396 <%text>### ERROR HANDLING ####</%text>
396 <%text>##</%text> ERROR HANDLING ##
397 <%text>####################################</%text>
397 <%text>##</%text>##################################
398
398
399 <%text>## Show a nice error page for application HTTP errors and exceptions (default true)</%text>
399 <%text>##</%text> Show a nice error page for application HTTP errors and exceptions (default true)
400 #errorpage.enabled = true
400 #errorpage.enabled = true
401
401
402 <%text>## Enable Backlash client-side interactive debugger (default false)</%text>
402 <%text>##</%text> Enable Backlash client-side interactive debugger (default false)
403 <%text>## WARNING: *THIS MUST BE false IN PRODUCTION ENVIRONMENTS!!!*</%text>
403 <%text>##</%text> WARNING: *THIS MUST BE false IN PRODUCTION ENVIRONMENTS!!!*
404 <%text>## This debug mode will allow all visitors to execute malicious code.</%text>
404 <%text>##</%text> This debug mode will allow all visitors to execute malicious code.
405 #debug = false
405 #debug = false
406
406
407 <%text>## Enable Backlash server-side error reporting (unless debug mode handles it client-side) (default true)</%text>
407 <%text>##</%text> Enable Backlash server-side error reporting (unless debug mode handles it client-side) (default true)
408 #trace_errors.enable = true
408 #trace_errors.enable = true
409 <%text>## Errors will be reported by mail if trace_errors.error_email is set.</%text>
409 <%text>##</%text> Errors will be reported by mail if trace_errors.error_email is set.
410
410
411 <%text>## Propagate email settings to ErrorReporter of TurboGears2</%text>
411 <%text>##</%text> Propagate email settings to ErrorReporter of TurboGears2
412 <%text>## You do not normally need to change these lines</%text>
412 <%text>##</%text> You do not normally need to change these lines
413 get trace_errors.smtp_server = smtp_server
413 get trace_errors.smtp_server = smtp_server
414 get trace_errors.smtp_port = smtp_port
414 get trace_errors.smtp_port = smtp_port
415 get trace_errors.from_address = error_email_from
415 get trace_errors.from_address = error_email_from
@@ -419,12 +419,12 b' get trace_errors.smtp_password = smtp_pa'
419 get trace_errors.smtp_use_tls = smtp_use_tls
419 get trace_errors.smtp_use_tls = smtp_use_tls
420
420
421 %if error_aggregation_service == 'sentry':
421 %if error_aggregation_service == 'sentry':
422 <%text>################</%text>
422 <%text>##</%text>##############
423 <%text>### [sentry] ###</%text>
423 <%text>##</%text> [sentry] ##
424 <%text>################</%text>
424 <%text>##</%text>##############
425
425
426 <%text>## sentry is a alternative open source error aggregator</%text>
426 <%text>##</%text> sentry is a alternative open source error aggregator
427 <%text>## you must install python packages `sentry` and `raven` to enable</%text>
427 <%text>##</%text> you must install python packages `sentry` and `raven` to enable
428
428
429 sentry.dsn = YOUR_DNS
429 sentry.dsn = YOUR_DNS
430 sentry.servers =
430 sentry.servers =
@@ -439,45 +439,45 b' sentry.exclude_paths ='
439
439
440 %endif
440 %endif
441
441
442 <%text>##################################</%text>
442 <%text>##</%text>################################
443 <%text>### LOGVIEW CONFIG ###</%text>
443 <%text>##</%text> LOGVIEW CONFIG ##
444 <%text>##################################</%text>
444 <%text>##</%text>################################
445
445
446 logview.sqlalchemy = #faa
446 logview.sqlalchemy = #faa
447 logview.pylons.templating = #bfb
447 logview.pylons.templating = #bfb
448 logview.pylons.util = #eee
448 logview.pylons.util = #eee
449
449
450 <%text>#########################################################</%text>
450 <%text>##</%text>#######################
451 <%text>### DB CONFIGS - EACH DB WILL HAVE IT'S OWN CONFIG ###</%text>
451 <%text>##</%text> DB CONFIG ##
452 <%text>#########################################################</%text>
452 <%text>##</%text>#######################
453
453
454 %if database_engine == 'sqlite':
454 %if database_engine == 'sqlite':
455 <%text>## SQLITE [default]</%text>
455 <%text>##</%text> SQLITE [default]
456 sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
456 sqlalchemy.url = sqlite:///%(here)s/kallithea.db?timeout=60
457
457
458 %elif database_engine == 'postgres':
458 %elif database_engine == 'postgres':
459 <%text>## POSTGRESQL</%text>
459 <%text>##</%text> POSTGRESQL
460 sqlalchemy.url = postgresql://user:pass@localhost/kallithea
460 sqlalchemy.url = postgresql://user:pass@localhost/kallithea
461
461
462 %elif database_engine == 'mysql':
462 %elif database_engine == 'mysql':
463 <%text>## MySQL</%text>
463 <%text>##</%text> MySQL
464 sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8
464 sqlalchemy.url = mysql://user:pass@localhost/kallithea?charset=utf8
465
465
466 %endif
466 %endif
467 <%text>## see sqlalchemy docs for other backends</%text>
467 <%text>##</%text> see sqlalchemy docs for other backends
468
468
469 sqlalchemy.pool_recycle = 3600
469 sqlalchemy.pool_recycle = 3600
470
470
471 <%text>################################</%text>
471 <%text>##</%text>##############################
472 <%text>### ALEMBIC CONFIGURATION ####</%text>
472 <%text>##</%text> ALEMBIC CONFIGURATION ##
473 <%text>################################</%text>
473 <%text>##</%text>##############################
474
474
475 [alembic]
475 [alembic]
476 script_location = kallithea:alembic
476 script_location = kallithea:alembic
477
477
478 <%text>################################</%text>
478 <%text>##</%text>##############################
479 <%text>### LOGGING CONFIGURATION ####</%text>
479 <%text>##</%text> LOGGING CONFIGURATION ##
480 <%text>################################</%text>
480 <%text>##</%text>##############################
481
481
482 [loggers]
482 [loggers]
483 keys = root, routes, kallithea, sqlalchemy, tg, gearbox, beaker, templates, whoosh_indexer, werkzeug, backlash
483 keys = root, routes, kallithea, sqlalchemy, tg, gearbox, beaker, templates, whoosh_indexer, werkzeug, backlash
@@ -488,21 +488,21 b' keys = console, console_color, console_c'
488 [formatters]
488 [formatters]
489 keys = generic, color_formatter, color_formatter_sql
489 keys = generic, color_formatter, color_formatter_sql
490
490
491 <%text>#############</%text>
491 <%text>##</%text>###########
492 <%text>## LOGGERS ##</%text>
492 <%text>##</%text> LOGGERS ##
493 <%text>#############</%text>
493 <%text>##</%text>###########
494
494
495 [logger_root]
495 [logger_root]
496 level = NOTSET
496 level = NOTSET
497 handlers = console
497 handlers = console
498 <%text>## For coloring based on log level:</%text>
498 <%text>##</%text> For coloring based on log level:
499 #handlers = console_color
499 #handlers = console_color
500
500
501 [logger_routes]
501 [logger_routes]
502 level = WARN
502 level = WARN
503 handlers =
503 handlers =
504 qualname = routes.middleware
504 qualname = routes.middleware
505 <%text>## "level = DEBUG" logs the route matched and routing variables.</%text>
505 <%text>##</%text> "level = DEBUG" logs the route matched and routing variables.
506
506
507 [logger_beaker]
507 [logger_beaker]
508 level = WARN
508 level = WARN
@@ -533,7 +533,7 b' qualname = gearbox'
533 level = WARN
533 level = WARN
534 handlers =
534 handlers =
535 qualname = sqlalchemy.engine
535 qualname = sqlalchemy.engine
536 <%text>## For coloring based on log level and pretty printing of SQL:</%text>
536 <%text>##</%text> For coloring based on log level and pretty printing of SQL:
537 #level = INFO
537 #level = INFO
538 #handlers = console_color_sql
538 #handlers = console_color_sql
539 #propagate = 0
539 #propagate = 0
@@ -553,9 +553,9 b' level = WARN'
553 handlers =
553 handlers =
554 qualname = backlash
554 qualname = backlash
555
555
556 <%text>##############</%text>
556 <%text>##</%text>############
557 <%text>## HANDLERS ##</%text>
557 <%text>##</%text> HANDLERS ##
558 <%text>##############</%text>
558 <%text>##</%text>############
559
559
560 [handler_console]
560 [handler_console]
561 class = StreamHandler
561 class = StreamHandler
@@ -563,13 +563,13 b' args = (sys.stderr,)'
563 formatter = generic
563 formatter = generic
564
564
565 [handler_console_color]
565 [handler_console_color]
566 <%text>## ANSI color coding based on log level</%text>
566 <%text>##</%text> ANSI color coding based on log level
567 class = StreamHandler
567 class = StreamHandler
568 args = (sys.stderr,)
568 args = (sys.stderr,)
569 formatter = color_formatter
569 formatter = color_formatter
570
570
571 [handler_console_color_sql]
571 [handler_console_color_sql]
572 <%text>## ANSI color coding and pretty printing of SQL statements</%text>
572 <%text>##</%text> ANSI color coding and pretty printing of SQL statements
573 class = StreamHandler
573 class = StreamHandler
574 args = (sys.stderr,)
574 args = (sys.stderr,)
575 formatter = color_formatter_sql
575 formatter = color_formatter_sql
@@ -578,9 +578,9 b' formatter = color_formatter_sql'
578 class = NullHandler
578 class = NullHandler
579 args = ()
579 args = ()
580
580
581 <%text>################</%text>
581 <%text>##</%text>##############
582 <%text>## FORMATTERS ##</%text>
582 <%text>##</%text> FORMATTERS ##
583 <%text>################</%text>
583 <%text>##</%text>##############
584
584
585 [formatter_generic]
585 [formatter_generic]
586 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
586 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
@@ -596,20 +596,20 b' class = kallithea.lib.colored_formatter.'
596 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
596 format = %(asctime)s.%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
597 datefmt = %Y-%m-%d %H:%M:%S
597 datefmt = %Y-%m-%d %H:%M:%S
598
598
599 <%text>#################</%text>
599 <%text>##</%text>###############
600 <%text>## SSH LOGGING ##</%text>
600 <%text>##</%text> SSH LOGGING ##
601 <%text>#################</%text>
601 <%text>##</%text>###############
602
602
603 <%text>## The default loggers use 'handler_console' that uses StreamHandler with</%text>
603 <%text>##</%text> The default loggers use 'handler_console' that uses StreamHandler with
604 <%text>## destination 'sys.stderr'. In the context of the SSH server process, these log</%text>
604 <%text>##</%text> destination 'sys.stderr'. In the context of the SSH server process, these log
605 <%text>## messages would be sent to the client, which is normally not what you want.</%text>
605 <%text>##</%text> messages would be sent to the client, which is normally not what you want.
606 <%text>## By default, when running ssh-serve, just use NullHandler and disable logging</%text>
606 <%text>##</%text> By default, when running ssh-serve, just use NullHandler and disable logging
607 <%text>## completely. For other logging options, see:</%text>
607 <%text>##</%text> completely. For other logging options, see:
608 <%text>## https://docs.python.org/2/library/logging.handlers.html</%text>
608 <%text>##</%text> https://docs.python.org/2/library/logging.handlers.html
609
609
610 [ssh_serve:logger_root]
610 [ssh_serve:logger_root]
611 level = CRITICAL
611 level = CRITICAL
612 handlers = null
612 handlers = null
613
613
614 <%text>## Note: If logging is configured with other handlers, they might need similar</%text>
614 <%text>##</%text> Note: If logging is configured with other handlers, they might need similar
615 <%text>## muting for ssh-serve too.</%text>
615 <%text>##</%text> muting for ssh-serve too.
@@ -55,7 +55,7 b' def main():'
55 print('reading:', makofile)
55 print('reading:', makofile)
56 mako_org = open(makofile).read()
56 mako_org = open(makofile).read()
57 mako_no_text_markup = re.sub(r'</?%text>', '', mako_org)
57 mako_no_text_markup = re.sub(r'</?%text>', '', mako_org)
58 mako_marked_up = re.sub(r'\n(##.*)', r'\n<%text>\1</%text>', mako_no_text_markup, flags=re.MULTILINE)
58 mako_marked_up = re.sub(r'\n##(.*)', r'\n<%text>##</%text>\1', mako_no_text_markup, flags=re.MULTILINE)
59 if mako_marked_up != mako_org:
59 if mako_marked_up != mako_org:
60 print('writing:', makofile)
60 print('writing:', makofile)
61 open(makofile, 'w').write(mako_marked_up)
61 open(makofile, 'w').write(mako_marked_up)
General Comments 0
You need to be logged in to leave comments. Login now