debian: initial import
This commit is contained in:
commit
766b22aebf
|
@ -0,0 +1,6 @@
|
|||
passerelle for Debian
|
||||
---------------------
|
||||
|
||||
# passerelle_manage.py syncdb
|
||||
|
||||
-- Jérôme Schneider <jschneider@entrouvert.com> Fri, 10 May 2013 10:08:45 +0200
|
|
@ -0,0 +1,9 @@
|
|||
passerelle for Debian
|
||||
---------------------
|
||||
|
||||
<this file describes information about the source package, see Debian policy
|
||||
manual section 4.14. You WILL either need to modify or delete this file>
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<VirtualHost *:80>
|
||||
ServerAdmin webmaster@example.com
|
||||
ServerName passerelle.example.com
|
||||
|
||||
Alias /passerelle/static /usr/share/passerelle/static
|
||||
|
||||
<Proxy *>
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</Proxy>
|
||||
|
||||
ProxyPass /passerelle/static !
|
||||
ProxyPass / http://127.0.0.1:8091
|
||||
ProxyPassReverse / http://127.0.0.1:8091
|
||||
|
||||
LogLevel warn
|
||||
ErrorLog /var/log/apache2/error.log
|
||||
CustomLog /var/log/apache2/access.log combined
|
||||
</VirtualHost>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
passerelle (0.2.12.g828e940-1) unstable; urgency=low
|
||||
|
||||
* Initial release ...
|
||||
|
||||
-- Jérôme Schneider <jschneider@entrouvert.com> Thu, 13 Jun 2013 12:29:42 +0200
|
|
@ -0,0 +1,21 @@
|
|||
Source: passerelle
|
||||
Section: python
|
||||
Priority: optional
|
||||
Maintainer: Jérôme Schneider <jschneider@entrouvert.com>
|
||||
Build-Depends: debhelper (>= 8.0.0),
|
||||
python-django (>= 1.5.0),
|
||||
python-setuptools
|
||||
Standards-Version: 3.9.4
|
||||
Homepage: https://dev.entrouvert.org/projects/passerelle
|
||||
|
||||
Package: passerelle
|
||||
Architecture: all
|
||||
Depends: ${python:Depends},
|
||||
${misc:Depends},
|
||||
gunicorn (>= 0.14),
|
||||
python-django (>= 1.5.0),
|
||||
python-django-jsonresponse,
|
||||
python-django-model-utils,
|
||||
python-setuptools
|
||||
Description: Passerelle provides an uniform access to multiple data sources and services.
|
||||
Passerelle provides an uniform access to multiple data sources and services.
|
|
@ -0,0 +1,38 @@
|
|||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: passerelle
|
||||
Source: <url://example.com>
|
||||
|
||||
Files: *
|
||||
Copyright: <years> <put author's name and email here>
|
||||
<years> <likewise for another author>
|
||||
License: <special license>
|
||||
<Put the license of the package here indented by 1 space>
|
||||
<This follows the format of Description: lines in control file>
|
||||
.
|
||||
<Including paragraphs>
|
||||
|
||||
# If you want to use GPL v2 or later for the /debian/* files use
|
||||
# the following clauses, or change it to suit. Delete these two lines
|
||||
Files: debian/*
|
||||
Copyright: 2013 Jérôme Schneider <jschneider@entrouvert.com>
|
||||
License: GPL-2+
|
||||
This package 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 package 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.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General
|
||||
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
|
||||
|
||||
# Please also look if there are files or directories which have a
|
||||
# different copyright/license attached and list them here.
|
||||
# Please avoid to pick license terms that are more restrictive than the
|
||||
# packaged work, as it may make Debian's contributions unacceptable upstream.
|
|
@ -0,0 +1,161 @@
|
|||
#!/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=passerelle
|
||||
GROUP=passerelle
|
||||
|
||||
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 \
|
||||
passerelle.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
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
debian/local_settings.py /etc/passerelle/
|
||||
debian/apache-example /etc/passerelle/
|
|
@ -0,0 +1,32 @@
|
|||
#! /bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
if ! getent passwd passerelle >/dev/null; then
|
||||
adduser --disabled-password --quiet --system \
|
||||
--no-create-home\
|
||||
--gecos "Passerelle software user" --group passerelle
|
||||
chown passerelle:passerelle /var/run/passerelle
|
||||
chown passerelle:passerelle /var/log/passerelle
|
||||
chown -R passerelle:passerelle /var/lib/passerelle
|
||||
fi
|
||||
/usr/bin/passerelle_manage.py collectstatic --noinput --link
|
||||
;;
|
||||
reconfigure)
|
||||
/usr/bin/passerelle_manage.py collectstatic --noinput --link
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
# postrm script for passerelle
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
||||
set -e
|
||||
|
||||
case "$1" in purge)
|
||||
deluser --quiet --system passerelle > /dev/null || true
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
exit 0
|
|
@ -0,0 +1 @@
|
|||
2.6-2.7
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/make -f
|
||||
# -*- makefile -*-
|
||||
# Sample debian/rules that uses debhelper.
|
||||
# This file was originally written by Joey Hess and Craig Small.
|
||||
# As a special exception, when this file is copied by dh-make into a
|
||||
# dh-make output file, you may use that output file without restriction.
|
||||
# This special exception was added by Craig Small in version 0.37 of dh-make.
|
||||
|
||||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
BUILD_DIR := 'debian/passerelle'
|
||||
|
||||
%:
|
||||
dh $@
|
||||
|
||||
override_dh_install:
|
||||
dh_install
|
||||
ln -s $(BUILD_DIR) /etc/passerelle/local_settings.py $(BUILD_DIR)/usr/lib/python2.6/dist-packages/passerelle/
|
||||
install -d -m 0755 $(BUILD_DIR)/var/lib/passerelle
|
||||
install -d -m 0755 $(BUILD_DIR)/var/lib/passerelle/media
|
||||
install -d -m 0755 $(BUILD_DIR)/var/run/passerelle
|
||||
install -d -m 0755 $(BUILD_DIR)/var/log/passerelle
|
||||
install -d -m 0755 $(BUILD_DIR)/usr/share/passerelle/static
|
||||
|
Loading…
Reference in New Issue