192
192
# Configuration options, defaults and descriptions
193
193
config_options = []
194
config_options.append(ConfigOption("root_dir", "/",
194
config_options.append(ConfigOption("root_dir", "/ivle",
195
195
"""Root directory where IVLE is located (in URL space):""",
197
197
# In URL space, where in the site is IVLE located. (All URLs will be prefixed
270
270
(Caution: This password is stored in plaintext in lib/conf/conf.py)""",
272
272
# Database password"""))
273
config_options.append(ConfigOption("svn_conf", "/opt/ivle/svn/svn.conf",
274
"""The location of the subversion configuration file used by apache
275
to host the user repositories:""",
277
# The location of the subversion configuration file used by
278
# apache to host the user repositories."""))
279
config_options.append(ConfigOption("svn_repo_path", "/home/informatics/repositories",
280
"""The root directory for the subversion repositories:""",
282
# The root directory for the subversion repositories."""))
283
config_options.append(ConfigOption("svn_auth_ivle", "/opt/ivle/svn/ivle.auth",
284
"""The location of the password file used to authenticate users
285
of the subversion repository from the ivle server:""",
287
# The location of the password file used to authenticate users
288
# of the subversion repository from the ivle server."""))
289
config_options.append(ConfigOption("svn_auth_local", "/opt/ivle/svn/local.auth",
290
"""The location of the password file used to authenticate local users
291
of the subversion repository:""",
293
# The location of the password file used to authenticate local users
294
# of the subversion repository."""))
295
config_options.append(ConfigOption("usrmgt_host", "localhost",
296
"""The hostname where the usrmgt-server runs:""",
298
# The hostname where the usrmgt-server runs."""))
299
config_options.append(ConfigOption("usrmgt_port", "2178",
300
"""The port where the usrmgt-server runs:""",
302
# The port where the usrmgt-server runs."""))
303
config_options.append(ConfigOption("usrmgt_magic", "",
304
"""The password for the usrmgt-server:""",
306
# The password for the usrmgt-server."""))
308
274
# Try importing existing conf, but if we can't just set up defaults
309
275
# The reason for this is that these settings are used by other phases
476
442
# We build two separate lists, by walking www and console
477
443
list_www = build_list_py_files('www')
478
444
list_lib = build_list_py_files('lib')
445
list_scripts = build_list_py_files('scripts')
479
446
list_subjects = build_list_py_files('subjects', no_top_level=True)
480
447
list_problems = build_list_py_files('problems', no_top_level=True)
482
"scripts/python-console",
483
"scripts/fileservice",
484
"scripts/usrmgt-server",
486
448
# Make sure that the files generated by conf are in the list
487
449
# (since listmake is typically run before conf)
488
450
if "lib/conf/conf.py" not in list_lib:
489
451
list_lib.append("lib/conf/conf.py")
452
# Make sure that console/python-console is in the list
453
if "scripts/python-console" not in list_scripts:
454
list_scripts.append("scripts/python-console")
455
if "scripts/fileservice" not in list_scripts:
456
list_scripts.append("scripts/fileservice")
490
457
# Write these out to a file
491
458
cwd = os.getcwd()
492
459
# the files that will be created/overwritten
631
598
"Invalid DB port (%s).\n"
632
599
"Must be an integer between 0 and 65535." % repr(db_port))
635
usrmgt_port = int(usrmgt_port)
636
if usrmgt_port < 0 or usrmgt_port >= 65536: raise ValueError()
638
print >>sys.stderr, (
639
"Invalid user management port (%s).\n"
640
"Must be an integer between 0 and 65535." % repr(usrmgt_port))
643
602
# Write lib/conf/conf.py