[global]
# This is where all of your settings go for your development environment
# Settings that are the same for both development and production
# (such as template engine, encodings, etc.) all go in 
# mirrormanager/config/app.cfg

# pick the form for your database
# sqlobject.dburi="postgres://username@hostname/databasename"
# sqlobject.dburi="mysql://username:password@hostname:port/databasename"
# sqlobject.dburi="sqlite:///file_name_and_path"

# If you have sqlite, here's a simple default to get you started
# in development
#sqlobject.dburi="postgres://mirrormanager@127.0.0.1/mirrormanager"

# This is for local development purposes.  It won't be used for
# production.
{% if env == "staging" %}
sqlobject.dburi="notrans_postgres://mirroradmin:{{ mirrorPassword }}@db-mirrormanager.stg:5432/mirrormanager"
{% else %}
sqlobject.dburi="notrans_postgres://mirroradmin:{{ mirrorPassword }}@db-mirrormanager:5432/mirrormanager"
{% endif %}

# if you are using a database or table type without transactions
# (MySQL default, for example), you should turn off transactions
# by prepending notrans_ on the uri
# sqlobject.dburi="notrans_mysql://username:password@hostname:port/databasename"

# for Windows users, sqlite URIs look like:
# sqlobject.dburi="sqlite:///drive_letter:/path/to/file"

# SERVER

# Some server parameters that you may want to tweak
# running as a WSGI under apache.  This is used by TG when it generates a redirect.
server.socket_port=80

server.socket_timeout = 60
server.thread_pool = 50
server.socket_queue_size = 30

# Enable the debug output at the end on pages.
# log_debug_info_filter.on = False

server.environment="production"
server.webpath="/mirrormanager"
autoreload.package="mirrormanager"

# session_filter.on = True

# Set to True if you'd like to abort execution if a controller gets an
# unexpected parameter. False by default
tg.strict_parameters = True
tg.ignore_parameters = ["_csrf_token"]

##############################
# Fedora Account System config
fas.url = 'https://admin.fedoraproject.org/accounts/'
identity.provider='jsonfas2'
identity.saprovider.model.visit="fedora.accounts.tgfas.VisitIdentity"
visit.manager="jsonfas2"
visit.saprovider.model="fedora.accounts.tgfas.Visit"
visit.cookie.secure = True
visit.cookie.httponly = True

mirrormanager.admin_group = 'sysadmin-web'
mirrormanager.max_stale_days = 2
mirrormanager.max_propogation_days = 1
mirrormanager.report_problems_to_email = 'mirror-admin at fedoraproject.org'

##############################
# update-master-directory-list category list and master locations
# be very careful here.  Trailing slashes on url directory names are necessary.
umdl.master_directories = ''' [
	{ 'type':'directory', 'path':'/pub/fedora/linux/', 'category':'Fedora Linux' },
	{ 'type':'directory', 'path':'/pub/archive/', 'category':'Fedora Archive' },
 	{ 'type':'directory', 'path':'/pub/epel/', 'category':'Fedora EPEL' },
	{ 'type':'directory', 'path':'/pub/fedora-secondary/', 'category':'Fedora Secondary Arches' },
	{ 'type':'directory', 'path':'/pub/alt/', 'category':'Fedora Other',
          'excludes':['.*/stage$']},
	{ 'type':'directory', 'path':'/pub/redhat/rhel/', 'category':'RHEL' },
	] '''

# manage-repo-redirects (mrr) repository definition
# this can be used to define a repository redirect
# for example from an upcoming release to the current development tree
mrr.repos = ''' {
	'fedora-%s':'rawhide',
	'fedora-debug-%s':'rawhide-debug',
	'fedora-source-%s':'rawhide-source',
	'updates-released-f%s':'rawhide',
	'updates-released-debug-f%s':'rawhide-debug',
	'updates-released-source-f%s':'rawhide-source',
	'updates-testing-f%s':'rawhide',
	'updates-testing-debug-f%s':'rawhide-debug',
	'updates-testing-source-f%s':'rawhide-source'
	} '''

base_url_filter.on = True
{% if env == "staging" %}
base_url_filter.base_url = "https://admin.stg.fedoraproject.org"
{% else %}
base_url_filter.base_url = "https://admin.fedoraproject.org"
{% endif %}
base_url_filter.use_x_forwarded_host = False

[/xmlrpc]
xmlrpc_filter.on = True

# LOGGING
# Logging configuration generally follows the style of the standard
# Python logging module configuration. Note that when specifying
# log format messages, you need to use *() for formatting variables.
# Deployment independent log configuration is in mirrormanager/config/log.cfg
[logging]

[[loggers]]
[[[mirrormanager]]]
level='DEBUG'
qualname='mirrormanager'
handlers=['debug_out']

[[[allinfo]]]
level='INFO'
handlers=['debug_out']

[[[access]]]
level='WARN'
qualname='turbogears.access'
handlers=['access_out']
propagate=0
