From 41b7e09631013a5a287546c0bee4de35d35bf708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Schneider?= Date: Fri, 14 Jun 2013 09:15:02 +0200 Subject: [PATCH] Removing debian directory (will be add in debian branch) * .gitignore: add all local_settings.py * authentic2/settings.py: expose local_file into the environement --- .gitignore | 2 +- authentic2/settings.py | 2 +- debian/README.Debian | 8 -- debian/README.source | 6 -- debian/apache2.conf | 0 debian/authentic2.dirs | 3 - debian/authentic2.init | 161 ------------------------------------- debian/authentic2.install | 2 - debian/authentic2.postinst | 63 --------------- debian/authentic2.wsgi | 9 --- debian/changelog | 20 ----- debian/compat | 1 - debian/control | 21 ----- debian/copyright | 23 ------ debian/local_settings.py | 38 --------- debian/pycompat | 1 - debian/pyversions | 1 - debian/rules | 20 ----- 18 files changed, 2 insertions(+), 379 deletions(-) delete mode 100644 debian/README.Debian delete mode 100644 debian/README.source delete mode 100644 debian/apache2.conf delete mode 100644 debian/authentic2.dirs delete mode 100644 debian/authentic2.init delete mode 100644 debian/authentic2.install delete mode 100644 debian/authentic2.postinst delete mode 100644 debian/authentic2.wsgi delete mode 100644 debian/changelog delete mode 100644 debian/compat delete mode 100644 debian/control delete mode 100644 debian/copyright delete mode 100644 debian/local_settings.py delete mode 100644 debian/pycompat delete mode 100644 debian/pyversions delete mode 100755 debian/rules diff --git a/.gitignore b/.gitignore index 8ca28853a..51859bf16 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,6 @@ dist/ static/ doc/_build authentic.egg-info -./local_settings.py +local_settings.py log.log authentic2/locale/fr/LC_MESSAGES/django.mo diff --git a/authentic2/settings.py b/authentic2/settings.py index 2720164f2..afae7b531 100644 --- a/authentic2/settings.py +++ b/authentic2/settings.py @@ -297,7 +297,7 @@ LOGGING = { 'level':'DEBUG', 'class':'logging.FileHandler', 'formatter': 'verbose', - 'filename': os.path.join(_PROJECT_PATH, 'log.log'), + 'filename': os.environ.get('LOG_ROOT', os.path.join(_PROJECT_PATH, 'log.log')), 'filters': ['cleaning'], }, 'syslog': { diff --git a/debian/README.Debian b/debian/README.Debian deleted file mode 100644 index 1d77d092f..000000000 --- a/debian/README.Debian +++ /dev/null @@ -1,8 +0,0 @@ -Setting up an Authentic server -============================== - -You need to create an empty database and you should add a -super user, using the following command:: - - su authentic -p -c "authentic2-ctl syncdb" - diff --git a/debian/README.source b/debian/README.source deleted file mode 100644 index 51d3bced9..000000000 --- a/debian/README.source +++ /dev/null @@ -1,6 +0,0 @@ -This package uses quilt to patch the upstream source. - -You can find some info on how to generate the patched source, add a new -modification, and remove an existing modification on: - /usr/share/doc/quilt/README.source - diff --git a/debian/apache2.conf b/debian/apache2.conf deleted file mode 100644 index e69de29bb..000000000 diff --git a/debian/authentic2.dirs b/debian/authentic2.dirs deleted file mode 100644 index 13ac2d84b..000000000 --- a/debian/authentic2.dirs +++ /dev/null @@ -1,3 +0,0 @@ -etc/authentic2 -usr/share/authentic2/static -var/lib/authentic2/media diff --git a/debian/authentic2.init b/debian/authentic2.init deleted file mode 100644 index 390a13e00..000000000 --- a/debian/authentic2.init +++ /dev/null @@ -1,161 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: passerelle -# Required-Start: $network $local_fs -# Required-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Passerelle provides an uniform access to multiple data sources and services -# Description: Passerelle provides an uniform access to multiple data sources and services. -### END INIT INFO - -# Author: Jérôme Schneider - -PATH=/sbin:/usr/sbin:/bin:/usr/bin -DESC=passerelle -NAME=passerelle -DAEMON=/usr/bin/gunicorn -PIDFILE=/var/run/passerelle/$NAME.pid -LOG_DIR=/var/log/passerelle -SCRIPTNAME=/etc/init.d/$NAME - -USER=authentic -GROUP=authentic - -DAEMON_ARGS="--pid $PIDFILE \ ---user $USER --group $GROUP \ ---daemon \ ---access-logfile $LOG_DIR/gunicorn-access.log \ ---log-file $LOG_DIR/gunicorn-error.log \ ---bind=127.0.0.1:8091 \ ---workers=10 \ ---worker-class=sync \ ---timeout=60 \ -authentic2.wsgi:application" - -# Exit if the package is not installed -[ -x $DAEMON ] || exit 0 - -# Read configuration variable file if it is present -[ -r /etc/default/$NAME ] && . /etc/default/$NAME - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. -. /lib/lsb/init-functions - -# -# Function that starts the daemon/service -# -do_start() -{ - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \ - || return 1 - start-stop-daemon --start --quiet --exec $DAEMON -- \ - $DAEMON_ARGS \ - || return 2 -} - -# -# Function that stops the daemon/service -# -do_stop() -{ - # Return - # 0 if daemon has been stopped - # 1 if daemon was already stopped - # 2 if daemon could not be stopped - # other if a failure occurred - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - # Wait for children to finish too if this is a daemon that forks - # and if the daemon is only ever run from this initscript. - # If the above conditions are not satisfied then add some other code - # that waits for the process to drop all resources that could be - # needed by services started subsequently. A last resort is to - # sleep for some time. - start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON - [ "$?" = 2 ] && return 2 - # Many daemons don't delete their pidfiles when they exit. - rm -f $PIDFILE - return "$RETVAL" -} - -# -# Function that sends a SIGHUP to the daemon/service -# -do_reload() { - # - # If the daemon can reload its configuration without - # restarting (for example, when it is sent a SIGHUP), - # then implement that here. - # - start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME - return 0 -} - -case "$1" in - start) - log_daemon_msg "Starting $DESC " "$NAME" - do_start - case "$?" in - 0|1) log_end_msg 0 ;; - 2) log_end_msg 1 ;; - esac - ;; - stop) - log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) log_end_msg 0 ;; - 2) log_end_msg 1 ;; - esac - ;; - status) - status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? - ;; - #reload|force-reload) - # - # If do_reload() is not implemented then leave this commented out - # and leave 'force-reload' as an alias for 'restart'. - # - #log_daemon_msg "Reloading $DESC" "$NAME" - #do_reload - #log_end_msg $? - #;; - restart|force-reload) - # - # If the "reload" option is implemented then remove the - # 'force-reload' alias - # - log_daemon_msg "Restarting $DESC" "$NAME" - do_stop - case "$?" in - 0|1) - do_start - case "$?" in - 0) log_end_msg 0 ;; - 1) log_end_msg 1 ;; # Old process is still running - *) log_end_msg 1 ;; # Failed to start - esac - ;; - *) - # Failed to stop - log_end_msg 1 - ;; - esac - ;; - *) - #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 - exit 3 - ;; -esac - diff --git a/debian/authentic2.install b/debian/authentic2.install deleted file mode 100644 index d20fb4290..000000000 --- a/debian/authentic2.install +++ /dev/null @@ -1,2 +0,0 @@ -debian/local_settings.py /etc/authentic2/ -debian/apache2.conf /etc/authentic2/ diff --git a/debian/authentic2.postinst b/debian/authentic2.postinst deleted file mode 100644 index a1db70aad..000000000 --- a/debian/authentic2.postinst +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh -# -# Postinst script for authentic2 -# - -set -e - -AUTHENTIC_USER=authentic -AUTHENTIC_GROUP=authentic -AUTHENTIC_HOME=/var/lib/authentic - -case "$1" in - configure) - if ! getent group $AUTHENTIC_GROUP > /dev/null 2>&1; then - echo -n "Adding group $AUTHENTIC_GROUP.." - addgroup --quiet --system $AUTHENTIC_GROUP - echo "..done" - fi - if ! getent passwd $AUTHENTIC_USER > /dev/null 2>&1; then - echo -n "Adding user $AUTHENTIC_USER.." - adduser --quiet --system --gecos "Pootle daemon" \ - --ingroup $AUTHENTIC_GROUP \ - --no-create-home --home $AUTHENTIC_HOME \ - $AUTHENTIC_USER - echo "..done" - fi - - chown $AUTHENTIC_USER:$AUTHENTIC_GROUP /var/lib/authentic2 - - /usr/bin/authentic2-ctl collectstatic --noinput --link - /usr/bin/authentic2-ctl compilemessages - - ;; - - reconfigure) - /usr/bin/authentic2-ctl collectstatic --noinput --link - /usr/bin/authentic2-ctl compilemessages - - ;; - - abort-upgrade|abort-remove|abort-deconfigure) - ;; - - *) - echo "postinst called with unknown argument \`$1'" >&2 - exit 1 - ;; -esac - -case "$1" in - configure) - if [ -z "$2" ]; then - su authentic -p -c "django-admin syncdb --settings authentic2.settings --noinput" - fi - ;; -esac - -# dh_installdeb will replace this with shell code automatically -# generated by other debhelper scripts. - -#DEBHELPER# - -exit 0 diff --git a/debian/authentic2.wsgi b/debian/authentic2.wsgi deleted file mode 100644 index d32ee17c6..000000000 --- a/debian/authentic2.wsgi +++ /dev/null @@ -1,9 +0,0 @@ -import os -import sys - -# Allows to lookup local_settings.py -sys.path.append('/etc/authentic2') - -os.environ['DJANGO_SETTINGS_MODULE'] = 'authentic2.settings.prod' -import django.core.handlers.wsgi -application = django.core.handlers.wsgi.WSGIHandler() diff --git a/debian/changelog b/debian/changelog deleted file mode 100644 index fe8527a04..000000000 --- a/debian/changelog +++ /dev/null @@ -1,20 +0,0 @@ -authentic2 (2.0.2.199.g5ddda2a-1) unstable; urgency=low - - * debian: add mission local_config.py - * fix setup.py - - -- Jérôme Schneider Thu, 13 Jun 2013 20:33:09 +0200 - -authentic2 (2.0.2.196.g8409882-1) unstable; urgency=low - - * debian: port to squeeze - * debian: add an init script - * debian: add static files - - -- Jérôme Schneider Thu, 13 Jun 2013 17:14:30 +0200 - -authentic2 (1.9.0-0) unstable; urgency=low - - * Initial packaging. - - -- Frederic Peters Tue, 01 Jun 2010 14:28:56 +0200 diff --git a/debian/compat b/debian/compat deleted file mode 100644 index 7f8f011eb..000000000 --- a/debian/compat +++ /dev/null @@ -1 +0,0 @@ -7 diff --git a/debian/control b/debian/control deleted file mode 100644 index f035d3f60..000000000 --- a/debian/control +++ /dev/null @@ -1,21 +0,0 @@ -Source: authentic2 -Section: python -Priority: optional -Maintainer: Frederic Peters -Build-Depends-Indep: python-all-dev (>= 2.5) -Build-Depends: debhelper (>= 8.0), python-setuptools, git -Standards-Version: 3.8.3 -Homepage: http://authentic.labs.libre-entreprise.org -X-Python-Version: >= 2.6 - -Package: authentic2 -Architecture: all -Pre-Depends: python-django -Depends: ${misc:Depends}, ${python:Depends}, python-django-registration -Description: Versatile identity server - Authentic is a versatile identity provider aiming to address a broad - range of needs, from simple to complex setups; it has support for many - protocols and can bridge between them. - . - It has support for ID-FF and SAMLv2 thanks to Lasso, a free (GNU GPL) - implementation of the Liberty Alliance specifications. diff --git a/debian/copyright b/debian/copyright deleted file mode 100644 index b51cd89ab..000000000 --- a/debian/copyright +++ /dev/null @@ -1,23 +0,0 @@ -This package was debianized by Nicolas FRANCOIS (Nekral) - on Mon, 16 Oct 2005. - -It was downloaded from http://translate.sourceforge.net - -Copyright (C) 2004-2008 Zuza Software Foundation - -Upstream Authors: David Fraser, translate.org.za - -License: - -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -On Debian GNU/Linux systems, the complete text of the GNU General Public -License can be found in ‘/usr/share/common-licenses/GPL-2’. diff --git a/debian/local_settings.py b/debian/local_settings.py deleted file mode 100644 index ae2997910..000000000 --- a/debian/local_settings.py +++ /dev/null @@ -1,38 +0,0 @@ -DEBUG = False - -# traceback recipients if DEBUG=False -ADMINS = ( -# ('root', 'root@localhost'), -# ('admin authentic', 'admin-authentic@domaine.com'), -) -MANAGERS = ADMINS - -SECRET_KEY = 'coin' - -# we're behind a pile of reverse-proxies... -# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts -ALLOWED_HOSTS = ['*'] - -# Local time zone for this installation. Choices can be found here: -# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name -# although not all choices may be available on all operating systems. -# In a Windows environment this must be set to your system time zone. -TIME_ZONE = 'Europe/Paris' - -# Language code for this installation. All choices can be found here: -# http://www.i18nguy.com/unicode/language-identifiers.html -LANGUAGE_CODE = 'fr-fr' - -# -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': '/var/lib/passerelle/passerelle.db', - } -} - -MEDIA_ROOT = '/var/lib/passerelle/media' -MEDIA_URL = '/passerelle/media/' - -STATIC_ROOT = '/usr/share/passerelle/static' -STATIC_URL = '/passerelle/static/' diff --git a/debian/pycompat b/debian/pycompat deleted file mode 100644 index 0cfbf0888..000000000 --- a/debian/pycompat +++ /dev/null @@ -1 +0,0 @@ -2 diff --git a/debian/pyversions b/debian/pyversions deleted file mode 100644 index 57a7586e4..000000000 --- a/debian/pyversions +++ /dev/null @@ -1 +0,0 @@ -2.3- diff --git a/debian/rules b/debian/rules deleted file mode 100755 index f1d584e80..000000000 --- a/debian/rules +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/make -f - -d=$(CURDIR)/debian/authentic2 - -%: - dh $@ - -# FIXME: remove this overrides when we will have a clean upstream branch -override_dh_auto_clean: - git status - dh_auto_clean - -override_dh_auto_build: - git status - dh_auto_build - -override_dh_auto_install: - git status - dh_auto_install -