[Osaas-commits] r57 - in trunk: . packaging packaging/debian

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Dec 22 17:31:34 CET 2008


Author: sholl
Date: 2008-12-22 17:31:33 +0100 (Mon, 22 Dec 2008)
New Revision: 57

Added:
   trunk/packaging/debian/
   trunk/packaging/debian/changelog
   trunk/packaging/debian/compat
   trunk/packaging/debian/conffiles
   trunk/packaging/debian/control
   trunk/packaging/debian/copyright
   trunk/packaging/debian/init.d
   trunk/packaging/debian/osaas-server.default
   trunk/packaging/debian/postinst
   trunk/packaging/debian/preinst
   trunk/packaging/debian/rules
   trunk/packaging/debian/templates
Modified:
   trunk/ChangeLog
Log:
	* packaging/debian, packaging/debian/control,
	  packaging/debian/compat, packaging/debian/postinst,
	  packaging/debian/preinst, packaging/debian/init.d,
	  packaging/debian/changelog, packaging/debian/copyright,
	  packaging/debian/conffiles, packaging/debian/rules,
	  packaging/debian/osaas-server.default, packaging/debian/templates:
	  New. Initial version of debian-packaging files to generate
	  OSAAS-server-packages



Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2008-12-22 13:09:48 UTC (rev 56)
+++ trunk/ChangeLog	2008-12-22 16:31:33 UTC (rev 57)
@@ -1,5 +1,16 @@
 2008-12-22  Stephan Holl  <stephan.holl at intevation.de>
 
+	* packaging/debian, packaging/debian/control,
+	  packaging/debian/compat, packaging/debian/postinst,
+	  packaging/debian/preinst, packaging/debian/init.d,
+	  packaging/debian/changelog, packaging/debian/copyright,
+	  packaging/debian/conffiles, packaging/debian/rules,
+	  packaging/debian/osaas-server.default, packaging/debian/templates:
+	  New. Initial version of debian-packaging files to generate
+	  OSAAS-server-packages
+
+2008-12-22  Stephan Holl  <stephan.holl at intevation.de>
+
 	* contrib/osaas, contrib/README.txt: Added a more specific
 	  hint about the configuration file for the startup-script.
 	  Added a variable for the osaas-user who runs the server in a

Added: trunk/packaging/debian/changelog
===================================================================
--- trunk/packaging/debian/changelog	2008-12-22 13:09:48 UTC (rev 56)
+++ trunk/packaging/debian/changelog	2008-12-22 16:31:33 UTC (rev 57)
@@ -0,0 +1,6 @@
+osaas (1.1.0-1) unstable; urgency=low
+
+  * Initial debianization of OSAAS
+
+ -- Stephan Holl <stephan.holl at intevation.de>  Mon, 22 Dec 2008 14:12:50 +0100
+

Added: trunk/packaging/debian/compat
===================================================================
--- trunk/packaging/debian/compat	2008-12-22 13:09:48 UTC (rev 56)
+++ trunk/packaging/debian/compat	2008-12-22 16:31:33 UTC (rev 57)
@@ -0,0 +1 @@
+5

Added: trunk/packaging/debian/conffiles
===================================================================
--- trunk/packaging/debian/conffiles	2008-12-22 13:09:48 UTC (rev 56)
+++ trunk/packaging/debian/conffiles	2008-12-22 16:31:33 UTC (rev 57)
@@ -0,0 +1,2 @@
+./etc/osaas/osaas-config.xml
+./etc/osaas/osaas-users

Added: trunk/packaging/debian/control
===================================================================
--- trunk/packaging/debian/control	2008-12-22 13:09:48 UTC (rev 56)
+++ trunk/packaging/debian/control	2008-12-22 16:31:33 UTC (rev 57)
@@ -0,0 +1,14 @@
+Source: osaas
+Section: unknown
+Priority: extra
+Maintainer: Stephan Holl <stephan.holl at intevation.de>
+Build-Depends: debhelper (>= 5)
+Standards-Version: 3.7.2
+
+Package: osaas-server
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, deegree-owsproxy, python (>= 2.3), python-psycopg2, postgresql (>= 8.1) 
+Suggests: osaas-client
+Provides: osaas-server
+Description: OSAAS is an OGC Statistics And Accounting System. 
+ It gathers data about requests made to WMS/WFS servers to support billing and statistic.

Added: trunk/packaging/debian/copyright
===================================================================
--- trunk/packaging/debian/copyright	2008-12-22 13:09:48 UTC (rev 56)
+++ trunk/packaging/debian/copyright	2008-12-22 16:31:33 UTC (rev 57)
@@ -0,0 +1,16 @@
+This package was debianized by Stephan Holl <stephan.holl at intevation.de> on
+Mon, 22 Dec 2008 14:12:50 +0100.
+
+It was downloaded from http://wald.intevation.org/projects/osaas/
+
+Upstream Author: Bernhard Herzog <bh at intevation.de>
+
+Copyright: 2007, 2008, Intevation GmbH
+
+License:
+
+GNU GENERAL PUBLIC LICENSE Version 2, June 1991
+
+
+The Debian packaging is (C) 2008, Stephan Holl <stephan.holl at intevation.de> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.

Added: trunk/packaging/debian/init.d
===================================================================
--- trunk/packaging/debian/init.d	2008-12-22 13:09:48 UTC (rev 56)
+++ trunk/packaging/debian/init.d	2008-12-22 16:31:33 UTC (rev 57)
@@ -0,0 +1,69 @@
+#! /bin/sh
+#
+# skeleton	example file to build /etc/init.d/ scripts.
+#		This file should be used to construct scripts for /etc/init.d.
+#
+#		Written by Miquel van Smoorenburg <miquels at cistron.nl>.
+#		Modified for Debian 
+#		by Ian Murdock <imurdock at gnu.ai.mit.edu>.
+#
+# Version:	@(#)skeleton  1.9  26-Feb-2001  miquels at cistron.nl
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/opt/gispatcher/osaas-server/server/startosaas.py
+NAME=osaas
+DESC=OSAAS-Server
+
+test -x $DAEMON || exit 0
+
+# Include osaas defaults if available
+if [ -f /etc/default/osaas ] ; then
+	. /etc/default/osaas
+fi
+
+set -e
+
+case "$1" in
+  start)
+	echo -n "Starting $DESC: "
+	start-stop-daemon --start -c $OSAAS_USER:$OSAAS_GROUP --quiet --pidfile $OSAAS_PID \
+		--exec $DAEMON -- 
+	echo "$NAME."
+	;;
+  stop)
+	echo -n "Stopping $DESC: "
+	start-stop-daemon --stop -c $OSAAS_USER:$OSAAS_GROUP --quiet --pidfile $OSAAS_PID \
+		--exec $DAEMON
+	echo "$NAME."
+	;;
+  force-reload)
+	#
+	#	If the "reload" option is implemented, move the "force-reload"
+	#	option to the "reload" entry above. If not, "force-reload" is
+	#	just the same as "restart" except that it does nothing if the
+	#   daemon isn't already running.
+	# check wether $DAEMON is running. If so, restart
+	start-stop-daemon --stop -c $OSAAS_USER:$OSAAS_GROUP --test --quiet --pidfile \
+		$OSAAS_PID --exec $DAEMON \
+	&& $0 restart \
+	|| exit 0
+	;;
+  restart)
+    echo -n "Restarting $DESC: "
+	start-stop-daemon --stop -c $OSAAS_USER:$OSAAS_GROUP --quiet --pidfile \
+		$OSAAS_PID --exec $DAEMON
+	sleep 1
+	start-stop-daemon --start -c $OSAAS_USER:$OSAAS_GROUP --quiet --pidfile \
+		$OSAAS_PID --exec $DAEMON --
+	echo "$NAME."
+	;;
+  *)
+	N=/etc/init.d/$NAME
+	# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+	echo "Usage: $N {start|stop|restart|force-reload}" >&2
+	exit 1
+	;;
+esac
+
+exit 0


Property changes on: trunk/packaging/debian/init.d
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/packaging/debian/osaas-server.default
===================================================================
--- trunk/packaging/debian/osaas-server.default	2008-12-22 13:09:48 UTC (rev 56)
+++ trunk/packaging/debian/osaas-server.default	2008-12-22 16:31:33 UTC (rev 57)
@@ -0,0 +1,23 @@
+# Defaults for osaas initscript
+# sourced by /etc/init.d/osaas
+# installed at /etc/default/osaas by the maintainer scripts
+
+#
+# This is a POSIX shell fragment
+#
+
+# Daemon-path
+DAEMON="/opt/gispatcher/osaas-server/server/startosaas.py"
+
+# Configuration file for OSAAS-service
+CONFIG_FILE="/etc/osaas/osaas-config.xml"
+
+# PID-file for OSAAS-Service
+OSAAS_PID="/opt/gispatcher/osaas-server/osaas.pid"
+
+# OSAAS-user, under which the service will run
+OSAAS_USER=osaas
+
+# OSAAS-group, under which the service will run
+OSAAS_GROUP=osaas
+

Added: trunk/packaging/debian/postinst
===================================================================
--- trunk/packaging/debian/postinst	2008-12-22 13:09:48 UTC (rev 56)
+++ trunk/packaging/debian/postinst	2008-12-22 16:31:33 UTC (rev 57)
@@ -0,0 +1,55 @@
+#!/bin/sh
+# postinst script for osaas
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# source debconf library
+#export DEBCONF_DEBUG=developer # for debugging
+. /usr/share/debconf/confmodule
+
+PKGNAME=osaas-server
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    configure)
+        # set user and password for osaas-user to connect between client
+        # and server
+        db_input high ${PKGNAME}/create-osaas-user
+        db_go
+
+        # Database-schema-creation
+        db_input high ${PKGNAME}/create-osaas-db
+        db_go
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+


Property changes on: trunk/packaging/debian/postinst
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/packaging/debian/preinst
===================================================================
--- trunk/packaging/debian/preinst	2008-12-22 13:09:48 UTC (rev 56)
+++ trunk/packaging/debian/preinst	2008-12-22 16:31:33 UTC (rev 57)
@@ -0,0 +1,47 @@
+#!/bin/sh
+# preinst script for osaas
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <new-preinst> `install'
+#        * <new-preinst> `install' <old-version>
+#        * <new-preinst> `upgrade' <old-version>
+#        * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    install)
+    # create users
+    groupadd -o -r osaas >/dev/null 2>&1 || :
+    useradd -M -g osaas -o -r -d /opt/gispatcher/osaas-server -s /bin/bash -c "OSAAS-Server " osaas >/dev/null 2>&1 || :
+    install -d /var/log/osaas
+    install -d /opt/gispatcher/osaas-server
+    chown osaas:osaas /var/log/osaas
+    chown -R osaas:osaas /opt/gispatcher/osaas-server
+    chmod 0700 /var/log/osaas
+    ;;
+
+    upgrade)
+    ;;
+    abort-upgrade)
+    ;;
+
+    *)
+        echo "preinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+


Property changes on: trunk/packaging/debian/preinst
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/packaging/debian/rules
===================================================================
--- trunk/packaging/debian/rules	2008-12-22 13:09:48 UTC (rev 56)
+++ trunk/packaging/debian/rules	2008-12-22 16:31:33 UTC (rev 57)
@@ -0,0 +1,60 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+TARGET_DIR=/opt/gispatcher/osaas-server
+
+build: build-stamp
+
+build-stamp:
+	dh_testdir
+
+	touch $@
+	(cd server && python test/runtests.py)
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+    
+	# clean up the pyc-files
+	find . -name "*.pyc" |xargs rm -rf
+
+	# Files
+	dh_install -Xtest server $(TARGET_DIR)
+
+	# Create osaas-users-file
+	install -d $(CURDIR)/debian/osaas-server/etc/osaas
+	touch $(CURDIR)/debian/osaas-server/etc/osaas/osaas-users
+
+	# Create osaas-config-file as a symlink
+	ln -s $(TARGET_DIR)/server/demo-config.xml $(CURDIR)/debian/osaas-server/etc/osaas/osaas-config.xml
+
+	# Docs
+	dh_installchangelogs ChangeLog
+	dh_installdocs README.txt
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installdebconf	
+	dh_pysupport
+	dh_installinit
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install


Property changes on: trunk/packaging/debian/rules
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/packaging/debian/templates
===================================================================
--- trunk/packaging/debian/templates	2008-12-22 13:09:48 UTC (rev 56)
+++ trunk/packaging/debian/templates	2008-12-22 16:31:33 UTC (rev 57)
@@ -0,0 +1,18 @@
+Template: osaas-server/create-osaas-user
+Type: note
+Description: Finish OSAAS-Server-Installation
+ To finish up your OSAAS-Server installation, you need to create a user
+ with a secret password to authenticate between OSAAS-client and
+ OSAAS-server. 
+ /opt/gispatcher/osaas-server/server/adduser.py -f /etc/osaas/osaas-users <yourOsaasUser>
+ To create the database, please update the parameters in
+ /etc/osaas/osaas-config.xml accordingly.
+
+Template: osaas-server/create-osaas-db
+Type: note
+Description: Finish OSAAS-Server-Installation
+ To create the database, please update the parameters in
+ /etc/osaas/osaas-config.xml accordingly, especially the <Parameters> entry.
+ After that you should run
+ /opt/gis/osaas-server/server/initosaasdb.py --config-file=/etc/osaas/osaas-config.xml
+



More information about the Osaas-commits mailing list