From 9be0709ac9805903953a72b3405915950bbb118e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Schneider?= Date: Thu, 10 Jul 2014 10:09:25 +0200 Subject: [PATCH] using new config.ini --- config.ini | 32 ++++++++++++++++++++++++++++++++ control | 2 ++ install | 2 +- local_config.py | 42 ------------------------------------------ rules | 3 --- 5 files changed, 35 insertions(+), 46 deletions(-) create mode 100644 config.ini delete mode 100644 local_config.py diff --git a/config.ini b/config.ini new file mode 100644 index 0000000..3846b6e --- /dev/null +++ b/config.ini @@ -0,0 +1,32 @@ +[database] +; http://docs.sqlalchemy.org/en/rel_0_8/core/engines.html +url: postgresql://mandaye-vincennes@/mandaye_vincennes + +[dirs] +config_root: /etc/mandaye-vincennes/sites-enabled +data_dir: /var/lib/mandaye-vincennes/data +static_root: /usr/share/mandaye-vincennes/static + +[mandaye] +; if you want to encypt password set to true +; you need to install pycrypto for this feature +encrypt_sp_password: false +; if encrypt_sp_password then you need to choose a secret +; must be a 16, 24, or 32 bytes long +encrypt_secret: + +[debug] +debug: false +log_debug: false +use_long_trace: true +; you need to install python-raven for this feature +sentry_dsn: + +[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-vincennes/sessions diff --git a/control b/control index 3bf09c5..5a9e0dd 100644 --- a/control +++ b/control @@ -13,6 +13,8 @@ Depends: ${misc:Depends}, ${python:Depends}, python-beautifulsoup (>= 3.1), python-crypto (>= 2.6), python-lasso (>= 2.4.0), + python-memcache, + memcached, gunicorn (>= 0.17) Recommends: postgresql, python-psycopg2, python-raven Description: Vincennes Mandaye project, modular reverse proxy to authentic diff --git a/install b/install index 219c891..6869ed4 100644 --- a/install +++ b/install @@ -1 +1 @@ -debian/local_config.py /etc/mandaye-vincennes/ +debian/config.ini /etc/mandaye-vincennes/ diff --git a/local_config.py b/local_config.py deleted file mode 100644 index f5589cd..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-vincennes@/mandaye_vincennes' - -## Logging configuration -debug = False - -# Configuration directory -config_root = '/etc/mandaye-vincennes/sites-enabled' -# Static folder -static_root = '/usr/share/mandaye-vincennes/static' -# Data directory -data_dir = '/var/lib/mandaye-vincennes/data' - -# Raven Sentry configuration -raven_dsn = None - -## Email notification configuration -email_notification = False -smtp_host = 'localhost' -smtp_port = 25 -email_from = 'admin+mandaye-vincennes@entrouvert.com' -email_to = ['admin+mandaye-vincennes@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-vincennes/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 6e3756e..c68d3f8 100755 --- a/rules +++ b/rules @@ -7,7 +7,4 @@ BUILD_DIR=$(CURDIR)/debian/mandaye-vincennes override_dh_install: dh_install - for ver in $(shell pyversions -vr); do \ - ln -s /etc/mandaye-vincennes/local_config.py $(BUILD_DIR)/usr/lib/python$$ver/dist-packages/mandaye_vincennes/; \ - done cp -R mandaye_vincennes/static $(BUILD_DIR)/usr/share/mandaye-vincennes