Removing debian directory (will be add in debian branch)

* .gitignore: add all local_settings.py
 * authentic2/settings.py: expose local_file into the environement
This commit is contained in:
Jérôme Schneider 2013-06-14 09:15:02 +02:00
parent 106d34c7f0
commit 41b7e09631
18 changed files with 2 additions and 379 deletions

2
.gitignore vendored
View File

@ -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

View File

@ -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': {

View File

@ -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"

View File

@ -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

0
debian/apache2.conf vendored
View File

View File

@ -1,3 +0,0 @@
etc/authentic2
usr/share/authentic2/static
var/lib/authentic2/media

161
debian/authentic2.init vendored
View File

@ -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 <jschneider@entrouvert.com>
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

View File

@ -1,2 +0,0 @@
debian/local_settings.py /etc/authentic2/
debian/apache2.conf /etc/authentic2/

View File

@ -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

View File

@ -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()

20
debian/changelog vendored
View File

@ -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 <jschneider@entrouvert.com> 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 <jschneider@entrouvert.com> Thu, 13 Jun 2013 17:14:30 +0200
authentic2 (1.9.0-0) unstable; urgency=low
* Initial packaging.
-- Frederic Peters <fpeters@debian.org> Tue, 01 Jun 2010 14:28:56 +0200

1
debian/compat vendored
View File

@ -1 +0,0 @@
7

21
debian/control vendored
View File

@ -1,21 +0,0 @@
Source: authentic2
Section: python
Priority: optional
Maintainer: Frederic Peters <fpeters@debian.org>
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.

23
debian/copyright vendored
View File

@ -1,23 +0,0 @@
This package was debianized by Nicolas FRANCOIS (Nekral)
<nicolas.francois@centraliens.net> 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.

View File

@ -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/'

1
debian/pycompat vendored
View File

@ -1 +0,0 @@
2

1
debian/pyversions vendored
View File

@ -1 +0,0 @@
2.3-

20
debian/rules vendored
View File

@ -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