[Pkg-mono-svn-commits] rev 281 - in xsp-snapshot/trunk/debian: . official
Pablo Fischer
pabl0-guest@quantz.debian.org
Wed, 18 Feb 2004 04:44:16 +0100
Author: pabl0-guest
Date: 2004-02-18 04:44:15 +0100 (Wed, 18 Feb 2004)
New Revision: 281
Added:
xsp-snapshot/trunk/debian/official/
xsp-snapshot/trunk/debian/official/README.Debian
xsp-snapshot/trunk/debian/official/TODO
xsp-snapshot/trunk/debian/official/asp.net-examples.dirs
xsp-snapshot/trunk/debian/official/asp.net-examples.menu
xsp-snapshot/trunk/debian/official/asp.net-examples.postinst
xsp-snapshot/trunk/debian/official/asp.net-examples.prerm
xsp-snapshot/trunk/debian/official/changelog
xsp-snapshot/trunk/debian/official/control
xsp-snapshot/trunk/debian/official/copyright
xsp-snapshot/trunk/debian/official/dirs
xsp-snapshot/trunk/debian/official/files
xsp-snapshot/trunk/debian/official/mono-server.config
xsp-snapshot/trunk/debian/official/mono-server.default
xsp-snapshot/trunk/debian/official/mono-server.dirs
xsp-snapshot/trunk/debian/official/mono-server.files
xsp-snapshot/trunk/debian/official/mono-server.init
xsp-snapshot/trunk/debian/official/mono-server.postinst
xsp-snapshot/trunk/debian/official/mono-server.templates
xsp-snapshot/trunk/debian/official/mono-xsp.config
xsp-snapshot/trunk/debian/official/mono-xsp.default
xsp-snapshot/trunk/debian/official/mono-xsp.dirs
xsp-snapshot/trunk/debian/official/mono-xsp.init
xsp-snapshot/trunk/debian/official/mono-xsp.postinst
xsp-snapshot/trunk/debian/official/mono-xsp.templates
xsp-snapshot/trunk/debian/official/rules
xsp-snapshot/trunk/debian/official/virtual-modmono.conf
xsp-snapshot/trunk/debian/official/virtual-xsp.conf
xsp-snapshot/trunk/debian/official/web.config
Log:
Official Version (Pablo Work)
Added: xsp-snapshot/trunk/debian/official/README.Debian
===================================================================
--- xsp-snapshot/trunk/debian/official/README.Debian 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/README.Debian 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,9 @@
+xsp for Debian
+--------------
+
+The package components are the xsp server itself (package mono-xsp), the
+mono_mod_server variant which works in combination with mod_mono_unix,
+and the ASP.NET demos in the package asp.net-examples.
+
+ -- Eduard Bloch <blade@debian.org>, Thu, 22 Jan 2004 23:16:13 +0100
+
Added: xsp-snapshot/trunk/debian/official/TODO
===================================================================
--- xsp-snapshot/trunk/debian/official/TODO 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/TODO 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,52 @@
+16 feb 2004 22:55:35
+
+Ok, today:
+
+* XSP can run multiple virtual directories
+* XSP Can run in background with start-stop-daemon
+
+* ASP.NET sample works great with the mono-xsp
+
+TODO:
+
+* Check why the start-stop-daemon stop process does not works, it doesn't stops the XSP daemon.
+
+
+28 ene 2004 23:23:22
+
+Today I worked in the xsp, asp.net samples and mono-server, I'm going
+to create another package:
+
+* mono-server. I know that this file contains just the mod-mono-server,
+however, I added to this:
+
+ * a init.d script
+ * a virtual web system (/etc/mono-server/virtual.conf), where every
+ 'asp.net' package that will be added.
+
+The init script does the following:
+ * Get default values from /etc/default/mono-server
+ * Reads the mono-server/virtual.conf
+ * Do a `cat` over the virtual.conf and add each line (entry) to the
+ mono-server.
+
+TODO:
+
+* Find the apache init values, and configure mono-server to start
+BEFORE apache starts.
+* Do the same for xsp, a init process that read virtual directories
+from /etc/xsp/virtual.conf
+
+See ya!
+Pablo
+
+---
+TODO: write an init script with /etc/defaults/mono-xsp where we provide
+similar mapping to boa or apache. See xsp --help.
+
+extend xsp to work as full httpd replacement (look at boa features).
+
+ * dir listing
+ * returning "Location: foo/" if URL was "foo" and foo is a dir
+ * executing CGI scripts as www-data (note: Process.StartInfo... uses an
+ incomplete class to sore environment variables. Must be fixed first)
Added: xsp-snapshot/trunk/debian/official/asp.net-examples.dirs
===================================================================
--- xsp-snapshot/trunk/debian/official/asp.net-examples.dirs 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/asp.net-examples.dirs 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,3 @@
+usr/bin
+usr/share/asp.net-demos/asp
+usr/share/asp.net-demos/dll
Added: xsp-snapshot/trunk/debian/official/asp.net-examples.menu
===================================================================
--- xsp-snapshot/trunk/debian/official/asp.net-examples.menu 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/asp.net-examples.menu 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,2 @@
+?package(asp.net-examples):needs=text section=Apps/Programming \
+ title="ASP.NET demo pages" command="/usr/bin/asp.net-examples-server"
Added: xsp-snapshot/trunk/debian/official/asp.net-examples.postinst
===================================================================
--- xsp-snapshot/trunk/debian/official/asp.net-examples.postinst 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/asp.net-examples.postinst 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,11 @@
+#!/bin/sh -e
+
+if [ -x /usr/bin/xsp.exe -a -d /etc/xsp-snapshot ]; then
+ echo "Updating Root Servers..."
+ echo "/samples:/usr/share/asp.net-demos/asp" >> /etc/xsp-snapshot/virtual.conf
+fi
+
+if [ -x /usr/bin/mod-mono-server.exe -a -d /etc/mono-server-snapshot ]; then
+ echo "Updating Root Servers..."
+ echo "/samples:/usr/share/asp.net-demos/asp" >> /etc/mono-server-snapshot/virtual.conf
+fi
Property changes on: xsp-snapshot/trunk/debian/official/asp.net-examples.postinst
___________________________________________________________________
Name: svn:executable
+ *
Added: xsp-snapshot/trunk/debian/official/asp.net-examples.prerm
===================================================================
--- xsp-snapshot/trunk/debian/official/asp.net-examples.prerm 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/asp.net-examples.prerm 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+
+if [ -f /etc/xsp-snapshot/virtual.conf ]; then
+ tempfile=`/bin/tempfile`
+ sed s/\\/samples:\\/usr\\/share\\/asp.net-demos\\/asp\// /etc/xsp-snapshot/virtual.conf > $tempfile
+ cp $tempfile /etc/xsp-snapshot/virtual.conf
+ rm -f /etc/xsp-snapshot/virtual.conf
+fi
+
+if [ -f /etc/mono-server-snapshot/virtual.conf ]; then
+ tempfile=`/bin/tempfile`
+ sed s/\\/samples:\\/usr\\/share\\/asp.net-demos\\/asp\// /etc/xsp-snapshot/virtual.conf > $tempfile
+ cp $tempfile /etc/mono-server-snapshot/virtual.conf
+ rm -f /etc/mono-server-snapshot/virtual.conf
+fi
Property changes on: xsp-snapshot/trunk/debian/official/asp.net-examples.prerm
___________________________________________________________________
Name: svn:executable
+ *
Added: xsp-snapshot/trunk/debian/official/changelog
===================================================================
--- xsp-snapshot/trunk/debian/official/changelog 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/changelog 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,11 @@
+xsp (0.9) unstable; urgency=low
+
+ * NOT RELEASED YET
+
+ -- Pablo Fischer <pablo@pablo.com.mx> Wed, 28 Jan 2004 21:18:52 -0600
+
+xsp (snapshot-20040128) unstable; urgency=low
+
+ * NOT RELEASED YET
+
+ -- Pablo Fischer <pablo@pablo.com.mx> Wed, 28 Jan 2004 21:18:52 -0600
Added: xsp-snapshot/trunk/debian/official/control
===================================================================
--- xsp-snapshot/trunk/debian/official/control 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/control 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,33 @@
+Source: xsp
+Section: web
+Priority: optional
+Maintainer: Debian Mono group <pkg-mono-group@lists.alioth.debian.org>
+Standards-Version: 3.6.0
+Build-Depends: debhelper (>= 3), mono-mcs | c-sharp-compiler, libmono-dev
+
+Package: mono-xsp-snapshot
+Architecture: all
+Depends: ${shlibs:Depends}, mono-jit
+Description: simple web server to run ASP.NET applications
+ XSP is a simple web server written in C# that can be used to run your
+ ASP.NET applications.
+ .
+ The package also includes the mod-mono-server applications that works
+ as backend for mod_mono_unix.
+
+Package: asp.net-examples-snapshot
+Architecture: all
+Depends: ${shlibs:Depends}, mono-xsp-snapshot | libapache-mod-mono
+Description: demo pages for ASP.NET infrastructure
+ Sample set of .aspx pages to test the XSP server or the mod_mono Apache
+ module.
+
+Package: mono-server-snapshot
+Architecture: all
+Depends: ${shlibs:Depends}, mono-jit
+Description: The mod-mono server
+ It contains the mod-mono-server, that will start the mod-mono server
+ and create the *socket* (the one in /tmp).
+
+
+
Added: xsp-snapshot/trunk/debian/official/copyright
===================================================================
--- xsp-snapshot/trunk/debian/official/copyright 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/copyright 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,15 @@
+This package was debianized by Pablo Fischer pablo@pablo.com.mx on
+Wed, 7 Jan 2004 12:49:46 -0600.
+
+It was downloaded from http://www.go-mono.com/.
+
+Upstream authors:
+
+Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+Copyright:
+
+Copyright (c) 2001-2004 Novell
+
+Distributed on the terms of the GNU General Public License which can
+be found in the file /usr/share/common-licenses/GPL on Debian systems.
Added: xsp-snapshot/trunk/debian/official/dirs
===================================================================
--- xsp-snapshot/trunk/debian/official/dirs 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/dirs 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,2 @@
+usr/bin
+usr/share/man/man1
Added: xsp-snapshot/trunk/debian/official/files
===================================================================
--- xsp-snapshot/trunk/debian/official/files 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/files 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,3 @@
+mono-xsp-snapshot_0.9_all.deb web optional
+asp.net-examples-snapshot_0.9_all.deb web optional
+mono-server-snapshot_0.9_all.deb web optional
Added: xsp-snapshot/trunk/debian/official/mono-server.config
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-server.config 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/mono-server.config 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,35 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+db_capb backup
+db_title ModMono Server
+
+STATE=1
+while [ "$STATE" != 0 -a "$STATE" != 2 ]; do
+ case "$STATE" in
+ 1)
+ db_input medium monoserver_snapshot/monoserver_autostart || true
+ if db_go; then
+ db_get monoserver_snapshot/monoserver_autostart || true
+ if [ "$RET" = "true" ]; then
+ STATE=2
+ else
+ db_set monoserver_snapshot/monoserver_autostart false || true
+ STATE=2
+ fi
+ else
+ STATE=0
+ fi
+ ;;
+ esac
+done
+
+if [ "$STATE" = 0 ]; then
+ exit 1
+fi
+
+
+
+
+
Property changes on: xsp-snapshot/trunk/debian/official/mono-server.config
___________________________________________________________________
Name: svn:executable
+ *
Added: xsp-snapshot/trunk/debian/official/mono-server.default
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-server.default 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/mono-server.default 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,14 @@
+# Defaults for mono-server, snapshot version
+# sourced by /etc/init.d/mono-server-snapshot
+
+# Should we start it?
+start_boot=true
+
+# User and group to chmod the *socket*
+user=www-data
+group=www-data
+
+# Name of the socket file
+socket_file=/tmp/.mono-server-snapshot/mod_mono_server
+
+
Added: xsp-snapshot/trunk/debian/official/mono-server.dirs
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-server.dirs 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/mono-server.dirs 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,2 @@
+usr/bin
+etc/mono-server-snapshot
Added: xsp-snapshot/trunk/debian/official/mono-server.files
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-server.files 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/mono-server.files 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,2 @@
+usr/bin/mod-mono-server.exe
+usr/bin/mod-mono-server
Added: xsp-snapshot/trunk/debian/official/mono-server.init
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-server.init 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/mono-server.init 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,126 @@
+#! /bin/sh
+#
+# mono-server Start the mono-server, the mod-mono-server one
+#
+# Written by Pablo Fischer <pablo@pablo.com.mx>
+# Modified for Debian GNU/Linux
+#
+# Version: @(#)mono-server pablo@pablo.com.mx
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/mod-mono-server
+NAME=mono-server-snapshot
+DESC="Mono Server, mod-mono-server"
+DEFAULT=/etc/default/$NAME
+CFGDIR=/etc/$NAME
+VIRTUALFILE=$CFGDIR/virtual.conf
+
+prepare_socket() {
+ . $DEFAULT
+ if [ -d /tmp/.mono-server-snapshot ]; then
+ mkdir /tmp/.mono-server-snapshot
+ fi
+}
+
+fix_privileges() {
+ . $DEFAULT
+ chown $user.$group $socket_file
+}
+
+should_start() {
+ if [ -e $DEFAULT ]; then
+ . $DEFAULT
+ if [ "$start_boot" != "true" ]; then
+ echo "$NAME not started as requested"
+ exit 0
+ fi
+ fi
+ if [ ! -x $DAEMON ]; then
+ echo "$NAME is not executable, not starting"
+ exit 0
+ fi
+
+ if [ -e $VIRTUALFILE ]; then
+ echo "You dont have $VIRTUALFILE "
+ echo "To have it, you need to install at least one package for xsp (like asp.net-examples)"
+ exit 0
+ fi
+
+ if [ -e /var/run/$NAME ]; then
+ echo "$NAME is already running, you could restart it (restart)"
+ exit 0
+ fi
+}
+
+
+should_stop() {
+ if [ ! -e /var/run/$NAME ]; then
+ echo "Sorry, $NAME is not running.."
+ exit 0
+ fi
+}
+
+set -e
+
+case "$1" in
+ start)
+ should_start
+ virtual_dirs=`echo $(cat $VIRTUALFILE | tr '\n' , | sed 's/.$//')`
+ . $DEFAULT
+ echo -n "Starting $DESC: $NAME"
+ start-stop-daemon --start --background --make-pidfile \
+ --quiet --pidfile /var/run/$NAME.pid \
+ --exec $DAEMON -- --applications $virtual_dirs --filename $socket_file --nonstop
+ echo "."
+ fix_privileges
+ ;;
+ stop)
+ should_stop
+ echo -n "Stopping $DESC: $NAME "
+ start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid
+ echo "."
+ ;;
+ #reload)
+ #
+ # If the daemon can reload its config files on the fly
+ # for example by sending it SIGHUP, do it here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this a do-nothing entry.
+ #
+ # echo -n "Reloading $DESC configuration..."
+ # start-stop-daemon --stop --signal 1 --quiet --pidfile \
+ # /var/run/$NAME.pid --exec $DAEMON
+ # echo "done."
+ #;;
+ restart|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".
+ #
+ should_stop
+ echo -n "Restarting $DESC: $NAME"
+ start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid
+ sleep 1
+
+ should_start
+
+ virtual_dirs=`echo $(cat $VIRTUALFILE | tr '\n' , | sed 's/.$//')`
+ . $DEFAULT
+ start-stop-daemon --start --background --make-pidfile \
+ --quiet --pidfile /var/run/$NAME.pid \
+ --exec $DAEMON -- --applications $virtual_dirs --filename $socket_file --nonstop
+ echo "."
+ fix_privileges
+ ;;
+ *)
+ 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: xsp-snapshot/trunk/debian/official/mono-server.init
___________________________________________________________________
Name: svn:executable
+ *
Added: xsp-snapshot/trunk/debian/official/mono-server.postinst
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-server.postinst 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/mono-server.postinst 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,51 @@
+#! /bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+tempfile=`/bin/tempfile`
+modmono_default="/etc/default/mono-server-snapshot"
+
+activate_monoserver() {
+ sed s/start_boot=false/start_boot=true/g $modmono_default > $tempfile
+ cp -f $tempfile $xsp_default
+
+}
+
+deactivate_monoserver() {
+ sed s/start_boot=true/start_boot=false/g $modmono_default > $tempfile
+ cp -f $tempfile $xsp_default
+}
+
+
+case "$1" in
+ configure)
+ db_get monoserver_snapshot/monoserver_autostart || true
+ if [ "$RET" = "true" ]; then
+ activate_monoserver
+ else
+ deactivate_monoserver
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ #Do nothing..
+ ;;
+ *)
+ echo "postinst failed \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+exit 0
+
+
+
+
+
+
+
+
+
Property changes on: xsp-snapshot/trunk/debian/official/mono-server.postinst
___________________________________________________________________
Name: svn:executable
+ *
Added: xsp-snapshot/trunk/debian/official/mono-server.templates
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-server.templates 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/mono-server.templates 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,5 @@
+Template: monoserver_snapshot/monoserver_autostart
+Type: boolean
+Default: true
+Description: Autostart the mod-mono-server
+ Would you like to autostart the mod-mono-server?
Added: xsp-snapshot/trunk/debian/official/mono-xsp.config
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-xsp.config 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/mono-xsp.config 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,36 @@
+#!/bin/sh -e
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+db_capb backup
+db_title XSP WebServer
+
+STATE=1
+while [ "$STATE" != 0 -a "$STATE" != 2 ]; do
+ case "$STATE" in
+ 1)
+ db_input medium xsp_snapshot/xsp_autostart || true
+ if db_go; then
+ db_get xsp_snapshot/xsp_autostart || true
+ if [ "$RET" = "true" ]; then
+ STATE=2
+ else
+ db_set xsp_snapshot/xsp_autostart false || true
+ STATE=2
+ fi
+ else
+ STATE=0
+ fi
+ ;;
+ esac
+done
+
+if [ "$STATE" = 0 ]; then
+ exit 1
+fi
+
+
+
+
+
+
Property changes on: xsp-snapshot/trunk/debian/official/mono-xsp.config
___________________________________________________________________
Name: svn:executable
+ *
Added: xsp-snapshot/trunk/debian/official/mono-xsp.default
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-xsp.default 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/mono-xsp.default 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,15 @@
+# Defaults for mono-xsp, snapshot version
+# sourced by /etc/init.d/mono-xsp-snapshot
+
+# Should we start it?
+start_boot=true
+
+# User and group by default
+user=www-data
+group=www-data
+
+# Default port
+port=8080
+
+# Directory for config files
+config_files=/etc/mono-xsp-snapshot
Added: xsp-snapshot/trunk/debian/official/mono-xsp.dirs
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-xsp.dirs 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/mono-xsp.dirs 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,2 @@
+usr/bin
+etc/xsp-snapshot
Added: xsp-snapshot/trunk/debian/official/mono-xsp.init
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-xsp.init 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/mono-xsp.init 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,99 @@
+#! /bin/sh
+#
+# mono-xsp-snapshot Start the XSP WebServer, that works just for ASP.NET scripts.
+#
+# Written by Pablo Fischer <pablo@pablo.com.mx>.
+# Modified for Debian GNU/Linux
+#
+# Version: @(#)mono-xsp pablo@pablo.com.mx
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/bin/xsp
+NAME=mono-xsp-snapshot
+DESC="XSP WebServer"
+DEFAULT=/etc/default/$NAME
+CFGDIR=/etc/xsp-snapshot
+VIRTUALFILE=$CFGDIR/virtual.conf
+
+
+should_start() {
+ if [ -e $DEFAULT ]; then
+ . $DEFAULT
+ if [ "$start_boot" != "true" ]; then
+ echo "$NAME not started as requested"
+ exit 0
+ fi
+ fi
+ if [ ! -x $DAEMON ]; then
+ echo "$NAME is not executable, not starting"
+ exit 0
+ fi
+
+ if [ ! -e $VIRTUALFILE ]; then
+ echo "You dont have $VIRTUALFILE "
+ echo "To have it, you need to install at least one package for xsp (like asp.net-examples)"
+ exit 0
+ fi
+
+ if [ -e /var/run/$NAME ]; then
+ echo "$NAME is already running, you could restart it (restart)"
+ exit 0
+ fi
+}
+
+should_stop() {
+ if [ ! -e /var/run/$NAME ]; then
+ echo "Sorry, $NAME is not running.."
+ exit 0
+ fi
+}
+
+
+case "$1" in
+ start)
+ should_start
+ virtual_dirs=`echo $(cat $VIRTUALFILE | tr '\n' , | sed 's/.$//')`
+ . $DEFAULT
+ echo -n "Starting $DESC: $NAME"
+ start-stop-daemon --start --background --make-pidfile \
+ --quiet --pidfile /var/run/$NAME \
+ --exec $DAEMON -- \
+ --port $port --applications $virtual_dirs --nonstop
+ echo "."
+ ;;
+ stop)
+ should_stop
+ echo -n "Stopping $DESC: $NAME "
+ start-stop-daemon --stop --quiet --pidfile /var/run/$NAME
+ echo "."
+ ;;
+ restart|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".
+ #
+ should_stop
+ echo -n "Restarting $DESC: $NAME"
+ start-stop-daemon --stop --quiet --pidfile /var/run/$NAME
+ sleep 1
+
+ should_start
+ virtual_dirs=`echo $(cat $VIRTUALFILE | tr '\n' , | sed 's/.$//')`
+ . $DEFAULT
+ echo "Starting $DESC: $NAME"
+ start-stop-daemon --start --background --make-pidfile \
+ --quiet --pidfile /var/run/$NAME \
+ --exec $DAEMON -- \
+ --port $port --applications $virtual_dirs --nonstop
+ echo "."
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
Property changes on: xsp-snapshot/trunk/debian/official/mono-xsp.init
___________________________________________________________________
Name: svn:executable
+ *
Added: xsp-snapshot/trunk/debian/official/mono-xsp.postinst
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-xsp.postinst 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/mono-xsp.postinst 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,72 @@
+#! /bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+tempfile=`/bin/tempfile`
+xsp_default="/etc/default/mono-xsp-snapshot"
+
+activate_xsp() {
+ sed s/start_boot=false/start_boot=true/g $xsp_default > $tempfile
+ cp -f $tempfile $xsp_default
+
+}
+
+deactivate_xsp() {
+ sed s/start_boot=true/start_boot=false/g $xsp_default > $tempfile
+ cp -f $tempfile $xsp_default
+}
+
+enable_8080() {
+ sed s/port=8081/port=8080/g $xsp_default > $tempfile
+ cp -f $tempfile $xsp_default
+}
+
+disable_8080() {
+ sed s/port=8080/port=8081/g $xsp_default > $tempfile
+ cp -f $tempfile $xsp_default
+}
+
+
+case "$1" in
+ configure)
+ db_get xsp_snapshot/xsp_autostart || true
+ if [ "$RET" = "true" ]; then
+ activate_xsp
+ else
+ deactivate_xsp
+ fi
+
+ #Check the port 8080, is it available?
+ port_8080=`netstat -ta | grep localhost:webcache | wc -l`
+
+ if [ $port_8080 = "1" ]; then
+ disable_8080
+ echo "XSP is going to use the port 8081"
+ else
+ enable_8080
+ echo "XSP is going to use the port 8080 (default)"
+ fi
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ #Do nothing..
+ ;;
+ *)
+ echo "postinst failed \`$1'" >&2
+ exit 0
+ ;;
+esac
+
+exit 0
+
+
+
+
+
+
+
+
+
Property changes on: xsp-snapshot/trunk/debian/official/mono-xsp.postinst
___________________________________________________________________
Name: svn:executable
+ *
Added: xsp-snapshot/trunk/debian/official/mono-xsp.templates
===================================================================
--- xsp-snapshot/trunk/debian/official/mono-xsp.templates 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/mono-xsp.templates 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,5 @@
+Template: xsp_snapshot/xsp_autostart
+Type: boolean
+Default: true
+Description: Autostart XSP WebServer
+ Would you like to autostart the XSP process when you start your computer?.
Added: xsp-snapshot/trunk/debian/official/rules
===================================================================
--- xsp-snapshot/trunk/debian/official/rules 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/rules 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,109 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+export DH_COMPAT=3
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+
+CFLAGS = -Wall -g
+
+config.status: configure
+ dh_testdir
+ # Add here commands to configure the package.
+ CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
+
+
+build: build-stamp
+
+build-stamp: config.status
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+ #/usr/bin/docbook-to-man debian/xsp.sgml > xsp.1
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+
+ # Add here commands to clean up after the build process.
+ -$(MAKE) distclean
+#ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+# cp -f /usr/share/misc/config.sub config.sub
+#endif
+#ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+# cp -f /usr/share/misc/config.guess config.guess
+#endif
+
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ cd server && $(MAKE) install DESTDIR=$(CURDIR)/debian/mono-xsp-snapshot
+ /bin/echo -e "#!/bin/sh\nexec /usr/bin/cli /usr/bin/xsp.exe" ' "$$@"' > $(CURDIR)/debian/mono-xsp-snapshot/usr/bin/xsp
+ chmod +x $(CURDIR)/debian/mono-xsp-snapshot/usr/bin/xsp
+
+ /bin/echo -e "#!/bin/sh\nexec /usr/bin/mono /usr/bin/mod-mono-server.exe" ' "$$@"' > $(CURDIR)/debian/mono-server-snapshot/usr/bin/mod-mono-server
+ chmod +x $(CURDIR)/debian/mono-server-snapshot/usr/bin/mod-mono-server
+
+ # only the server, the asp tool install is broken
+ #$(MAKE) install DESTDIR=$(CURDIR)/debian/xsp
+
+binary-arch: build install
+# We have nothing to do by default.
+
+binary-indep: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs ChangeLog
+ dh_installdocs
+ dh_installexamples
+ dh_installdirs
+ cd test && cp ServiceClient.exe *.aspx *.ascx *.asmx *.ashx *.config *.asax *.xml *.png *.inc *.xsl *.cs $(CURDIR)/debian/asp.net-examples-snapshot/usr/share/asp.net-demos/asp
+ cp debian/web.config $(CURDIR)/debian/asp.net-examples-snapshot/usr/share/asp.net-demos/asp
+ cd test && cp *.dll $(CURDIR)/debian/asp.net-examples-snapshot/usr/share/asp.net-demos/dll
+ rm -Rf $(CURDIR)/debian/asp.net-examples-snapshot/usr/share/asp.net-demos/asp/monodoc.ashx
+ chmod -x $(CURDIR)/debian/asp.net-examples-snapshot/usr/share/asp.net-demos/*/*
+ cp $(CURDIR)/debian/virtual-modmono.conf $(CURDIR)/debian/mono-server-snapshot/etc/mono-server-snapshot/virtual.conf
+ cp $(CURDIR)/debian/virtual-xsp.conf $(CURDIR)/debian/mono-xsp-snapshot/etc/xsp-snapshot/virtual.conf
+# install -m755 debian/asp.net-examples-server-snapshot $(CURDIR)/debian/asp.net-examples-snapshot/usr/bin
+ #cd test && cp *.dll $(CURDIR)/debian/asp.net-examples/usr/lib
+# dh_install
+# dh_installmenu
+ dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+ dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman doc/xsp.1
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_python
+# dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
Property changes on: xsp-snapshot/trunk/debian/official/rules
___________________________________________________________________
Name: svn:executable
+ *
Added: xsp-snapshot/trunk/debian/official/virtual-modmono.conf
===================================================================
--- xsp-snapshot/trunk/debian/official/virtual-modmono.conf 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/virtual-modmono.conf 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,12 @@
+# Here you will add your virtual hosts for ModMono
+# The format of each virtual host is:
+# /alias:/real/path/of/your/directory
+# For example:
+# If you have your ASP.NET application that has 'foo' as the
+# alias and /usr/share/bar as your real path directory, you
+# should add:
+# /foo:/usr/share/bar
+# And to view it from your browser, just point it to:
+# http://localhost:port/alias
+# Like:
+# http http://localhost:8080/foo
Added: xsp-snapshot/trunk/debian/official/virtual-xsp.conf
===================================================================
--- xsp-snapshot/trunk/debian/official/virtual-xsp.conf 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/virtual-xsp.conf 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,12 @@
+# Here you will add your virtual hosts for XSP
+# The format of each virtual host is:
+# /alias:/real/path/of/your/directory
+# For example:
+# If you have your ASP.NET application that has 'foo' as the
+# alias and /usr/share/bar as your real path directory, you
+# should add:
+# /foo:/usr/share/bar
+# And to view it from your browser, just point it to:
+# http://localhost:port/alias
+# Like:
+# http http://localhost:8080/foo
Added: xsp-snapshot/trunk/debian/official/web.config
===================================================================
--- xsp-snapshot/trunk/debian/official/web.config 2004-02-18 03:38:21 UTC (rev 280)
+++ xsp-snapshot/trunk/debian/official/web.config 2004-02-18 03:44:15 UTC (rev 281)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+ <configSections>
+ <sectionGroup name="mono.aspnet">
+ <section name="acceptEncoding" type="Mono.Http.AcceptEncodingSectionHandler, Mono.Http"/>
+ </sectionGroup>
+ </configSections>
+
+ <system.web>
+ <customErrors mode="Off"/>
+ <webServices>
+ <soapExtensionTypes>
+ <add type="DumpExtension, extensions" priority="0" group="0" />
+ <add type="EncryptExtension, extensions" priority="1" group="0" />
+ </soapExtensionTypes>
+ </webServices>
+ <authentication mode= "Forms">
+ </authentication>
+ <!--httpModules>
+ <add name="AcceptEncodingModule" type="Mono.Http.AcceptEncodingModule, Mono.Http"/>
+ </httpModules-->
+ </system.web>
+
+ <mono.aspnet>
+ <acceptEncoding>
+ <!-- Change disabled to 'no' to enable gzip content encoding -->
+ <add encoding="gzip" type="Mono.Http.GZipWriteFilter, Mono.Http" disabled="no" />
+ </acceptEncoding>
+ </mono.aspnet>
+
+ <appSettings>
+ <add key="MonoServerDefaultIndexFiles"
+ value="index.aspx, Default.aspx, default.aspx, index.html, index.htm" />
+ <add key="DBProviderAssembly"
+ value="Mono.Data.PostgreSqlClient"/>
+ <add key="DBConnectionType"
+ value="Mono.Data.PostgreSqlClient.PgSqlConnection"/>
+ <add key="DBConnectionString"
+ value="hostaddr=127.0.0.1;user=monotest;password=monotest;dbname=monotest"/>
+ </appSettings>
+</configuration>
+