diff --git a/config.ini b/config.ini new file mode 100644 index 0000000..54b715f --- /dev/null +++ b/config.ini @@ -0,0 +1,27 @@ +[database] +; http://docs.sqlalchemy.org/en/rel_0_8/core/engines.html +url: postgresql://mandaye-cud@/mandaye-cud + +[dirs] +config_root: /etc/mandaye-cud/sites-enabled +data_dir: /var/lib/mandaye-cud/data +static_root: /usr/share/mandaye-cud/static + +[debug] +debug: false +use_long_trace: true +log_debug: false +; you need to install python-raven for this feature +sentry_dsn: + +[template_vars] +idp_url: https://idp-cud.dev.entrouvert.org + +[session] + file, dbm, memory or memcached +; ; if memcached you need to install python-memcached and memcached +type: memcached +url: 127.0.0.1:11211 +cookie_expires: true +timeout: 3600 +data_dir: /var/lib/mandaye-cud/sessions diff --git a/control b/control index 0e4c410..16b5e3a 100644 --- a/control +++ b/control @@ -9,11 +9,13 @@ X-Python-Version: current Package: mandaye-cud Architecture: all Depends: ${misc:Depends}, ${python:Depends}, - python-mandaye (>= 0.8), + python-mandaye (>= 0.9), python-beautifulsoup (>= 3.1), python-crypto (>= 2.6), python-lasso (>= 2.4.0), + python-memcache, python-psycopg2, + memcached, gunicorn (>= 0.17) Recommends: postgresql, python-raven Description: CUD Mandaye project, modular authentification reverse proxy diff --git a/dirs b/dirs index 89ef421..d25c3da 100644 --- a/dirs +++ b/dirs @@ -2,3 +2,9 @@ etc/mandaye-cud etc/mandaye-cud/certs etc/mandaye-cud/sites-available etc/mandaye-cud/sites-enabled +var/lib/mandaye-cud +var/lib/mandaye-cud/data +var/lib/mandaye-cud/sessions +var/log/mandaye-cud +var/run/mandaye-cud +usr/share/mandaye-cud diff --git a/install b/install index ec4ba1f..b52e46f 100644 --- a/install +++ b/install @@ -1 +1 @@ -debian/local_config.py /etc/mandaye-cud/ +debian/config.ini /etc/mandaye-cud/ diff --git a/local_config.py b/local_config.py deleted file mode 100644 index 6c04e77..0000000 --- a/local_config.py +++ /dev/null @@ -1,42 +0,0 @@ -## SQL Backend config -# http://docs.sqlalchemy.org/en/rel_0_7/core/engines.html -# rfc 1738 https://tools.ietf.org/html/rfc1738 -# dialect+driver://username:password@host:port/database -db_url = 'postgresql://mandaye-cud@/mandaye_cud' - -## Logging configuration -debug = False - -# Configuration directory -config_root = '/etc/mandaye-cud/sites-enabled' -# Static folder -static_root = '/usr/share/mandaye-cud/static' -# Data directory -data_dir = '/var/lib/mandaye-cud/data' - -# Raven Sentry configuration -raven_dsn = None - -## Email notification configuration -email_notification = False -smtp_host = 'localhost' -smtp_port = 25 -email_from = 'admin+mandaye-cud@entrouvert.com' -email_to = ['admin+mandaye-cud@entrouvert.com'] - - -## Session configuration -# http://beaker.readthedocs.org/en/latest/configuration.html#options-for-sessions-and-caching -session_opts = { - 'session.type': 'file', - 'session.cookie_expires': True, - 'session.timeout': 3600, - 'session.data_dir': '/var/lib/mandaye-cud/sessions' -} - -## Encrypt service provider passwords with a secret -# You should install pycypto to use this feature -encrypt_sp_password = True -# Must be a 16, 24, or 32 bytes long -encrypt_secret = 'CHANGEME' - diff --git a/rules b/rules index d7cb374..4de1354 100755 --- a/rules +++ b/rules @@ -7,13 +7,4 @@ BUILD_DIR=$(CURDIR)/debian/mandaye-cud override_dh_install: dh_install - for ver in $(shell pyversions -vr); do \ - ln -s /etc/mandaye-cud/local_config.py $(BUILD_DIR)/usr/lib/python$$ver/dist-packages/mandaye_cud/; \ - done - install -d -m 0755 $(BUILD_DIR)/var/lib/mandaye-cud - install -d -m 0755 $(BUILD_DIR)/var/lib/mandaye-cud/data - install -d -m 0750 $(BUILD_DIR)/var/lib/mandaye-cud/sessions - install -d -m 0755 $(BUILD_DIR)/var/run/mandaye-cud - install -d -m 0755 $(BUILD_DIR)/var/log/mandaye-cud - install -d -m 0755 $(BUILD_DIR)/usr/share/mandaye-cud cp -R mandaye_cud/static $(BUILD_DIR)/usr/share/mandaye-cud