From e37dd15bbf8683bab8454ea0eec8e9968ce982b2 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Fri, 28 Mar 2008 22:57:29 -0400 Subject: [PATCH] Moved sipb-xen-www into a package svn path=/trunk/web; revision=303 --- Makefile => code/Makefile | 0 cache_acls.py => code/cache_acls.py | 0 controls.py => code/controls.py | 0 getafsgroups.py => code/getafsgroups.py | 0 code/iptables.rules | 17 --- main.py => code/main.py | 0 {static => code/static}/VncViewer.jar | 0 {static => code/static}/about.html | 0 {static => code/static}/layout.css | 0 {static => code/static}/prototype.js | 0 {static => code/static}/style.css | 0 {templates => code/templates}/Makefile | 0 {templates => code/templates}/__init__.py | 0 {templates => code/templates}/command.tmpl | 0 {templates => code/templates}/create.tmpl | 0 {templates => code/templates}/error.tmpl | 0 {templates => code/templates}/functions.tmpl | 0 {templates => code/templates}/help.tmpl | 0 {templates => code/templates}/info.tmpl | 0 {templates => code/templates}/invalid.tmpl | 0 {templates => code/templates}/list.tmpl | 0 {templates => code/templates}/skeleton.tmpl | 0 {templates => code/templates}/vnc.tmpl | 0 validation.py => code/validation.py | 0 webcommon.py => code/webcommon.py | 0 xen-ips => code/xen-ips | 0 debian/changelog | 4 +- debian/control | 8 +- debian/rules | 4 +- debian/sipb-xen-iptables.init | 112 -------------------- ...b-xen-iptables.install => sipb-xen-www.install} | 0 debian/sipb-xen-www.postinst | 43 ++++++++ 32 files changed, 51 insertions(+), 137 deletions(-) rename Makefile => code/Makefile (100%) rename cache_acls.py => code/cache_acls.py (100%) rename controls.py => code/controls.py (100%) rename getafsgroups.py => code/getafsgroups.py (100%) delete mode 100644 code/iptables.rules rename main.py => code/main.py (100%) rename {static => code/static}/VncViewer.jar (100%) rename {static => code/static}/about.html (100%) rename {static => code/static}/layout.css (100%) rename {static => code/static}/prototype.js (100%) rename {static => code/static}/style.css (100%) rename {templates => code/templates}/Makefile (100%) rename {templates => code/templates}/__init__.py (100%) rename {templates => code/templates}/command.tmpl (100%) rename {templates => code/templates}/create.tmpl (100%) rename {templates => code/templates}/error.tmpl (100%) rename {templates => code/templates}/functions.tmpl (100%) rename {templates => code/templates}/help.tmpl (100%) rename {templates => code/templates}/info.tmpl (100%) rename {templates => code/templates}/invalid.tmpl (100%) rename {templates => code/templates}/list.tmpl (100%) rename {templates => code/templates}/skeleton.tmpl (100%) rename {templates => code/templates}/vnc.tmpl (100%) rename validation.py => code/validation.py (100%) rename webcommon.py => code/webcommon.py (100%) rename xen-ips => code/xen-ips (100%) delete mode 100644 debian/sipb-xen-iptables.init rename debian/{sipb-xen-iptables.install => sipb-xen-www.install} (100%) create mode 100755 debian/sipb-xen-www.postinst diff --git a/Makefile b/code/Makefile similarity index 100% rename from Makefile rename to code/Makefile diff --git a/cache_acls.py b/code/cache_acls.py similarity index 100% rename from cache_acls.py rename to code/cache_acls.py diff --git a/controls.py b/code/controls.py similarity index 100% rename from controls.py rename to code/controls.py diff --git a/getafsgroups.py b/code/getafsgroups.py similarity index 100% rename from getafsgroups.py rename to code/getafsgroups.py diff --git a/code/iptables.rules b/code/iptables.rules deleted file mode 100644 index 15b079a..0000000 --- a/code/iptables.rules +++ /dev/null @@ -1,17 +0,0 @@ -# Generated by iptables-save v1.3.6 on Mon Oct 8 01:59:16 2007 -*filter -:INPUT ACCEPT [366:44912] -:FORWARD ACCEPT [0:0] -:OUTPUT ACCEPT [292:53151] --A FORWARD -d 18.181.0.60 -i eth0 -o eth0 -p tcp -m tcp --dport 10003 -j ACCEPT -COMMIT -# Completed on Mon Oct 8 01:59:16 2007 -# Generated by iptables-save v1.3.6 on Mon Oct 8 01:59:16 2007 -*nat -:PREROUTING ACCEPT [5:300] -:POSTROUTING ACCEPT [8:674] -:OUTPUT ACCEPT [8:674] --A PREROUTING -s ! 18.181.0.60 -i eth0 -p tcp -m tcp --dport 10003 -j DNAT --to-destination 18.181.0.60:10003 --A POSTROUTING -d 18.181.0.60 -o eth0 -p tcp -m tcp --dport 10003 -j SNAT --to-source 18.181.0.62 -COMMIT -# Completed on Mon Oct 8 01:59:16 2007 diff --git a/main.py b/code/main.py similarity index 100% rename from main.py rename to code/main.py diff --git a/static/VncViewer.jar b/code/static/VncViewer.jar similarity index 100% rename from static/VncViewer.jar rename to code/static/VncViewer.jar diff --git a/static/about.html b/code/static/about.html similarity index 100% rename from static/about.html rename to code/static/about.html diff --git a/static/layout.css b/code/static/layout.css similarity index 100% rename from static/layout.css rename to code/static/layout.css diff --git a/static/prototype.js b/code/static/prototype.js similarity index 100% rename from static/prototype.js rename to code/static/prototype.js diff --git a/static/style.css b/code/static/style.css similarity index 100% rename from static/style.css rename to code/static/style.css diff --git a/templates/Makefile b/code/templates/Makefile similarity index 100% rename from templates/Makefile rename to code/templates/Makefile diff --git a/templates/__init__.py b/code/templates/__init__.py similarity index 100% rename from templates/__init__.py rename to code/templates/__init__.py diff --git a/templates/command.tmpl b/code/templates/command.tmpl similarity index 100% rename from templates/command.tmpl rename to code/templates/command.tmpl diff --git a/templates/create.tmpl b/code/templates/create.tmpl similarity index 100% rename from templates/create.tmpl rename to code/templates/create.tmpl diff --git a/templates/error.tmpl b/code/templates/error.tmpl similarity index 100% rename from templates/error.tmpl rename to code/templates/error.tmpl diff --git a/templates/functions.tmpl b/code/templates/functions.tmpl similarity index 100% rename from templates/functions.tmpl rename to code/templates/functions.tmpl diff --git a/templates/help.tmpl b/code/templates/help.tmpl similarity index 100% rename from templates/help.tmpl rename to code/templates/help.tmpl diff --git a/templates/info.tmpl b/code/templates/info.tmpl similarity index 100% rename from templates/info.tmpl rename to code/templates/info.tmpl diff --git a/templates/invalid.tmpl b/code/templates/invalid.tmpl similarity index 100% rename from templates/invalid.tmpl rename to code/templates/invalid.tmpl diff --git a/templates/list.tmpl b/code/templates/list.tmpl similarity index 100% rename from templates/list.tmpl rename to code/templates/list.tmpl diff --git a/templates/skeleton.tmpl b/code/templates/skeleton.tmpl similarity index 100% rename from templates/skeleton.tmpl rename to code/templates/skeleton.tmpl diff --git a/templates/vnc.tmpl b/code/templates/vnc.tmpl similarity index 100% rename from templates/vnc.tmpl rename to code/templates/vnc.tmpl diff --git a/validation.py b/code/validation.py similarity index 100% rename from validation.py rename to code/validation.py diff --git a/webcommon.py b/code/webcommon.py similarity index 100% rename from webcommon.py rename to code/webcommon.py diff --git a/xen-ips b/code/xen-ips similarity index 100% rename from xen-ips rename to code/xen-ips diff --git a/debian/changelog b/debian/changelog index e17189a..cdc7a10 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,5 @@ -sipb-xen-iptables (1) unstable; urgency=low +sipb-xen-www (1) unstable; urgency=low * Initial Release. - -- SIPB Xen Project Sun, 25 Feb 2008 00:05:12 -0500 + -- SIPB Xen Project Sun, 28 Mar 2008 22:43:12 -0500 diff --git a/debian/control b/debian/control index 2f7912d..0f156c5 100644 --- a/debian/control +++ b/debian/control @@ -1,11 +1,11 @@ -Source: sipb-xen-iptables +Source: sipb-xen-www Section: base Priority: extra Maintainer: SIPB Xen Project Build-Depends: cdbs (>= 0.4.23-1.1), debhelper (>= 4.1.0), subversion Standards-Version: 3.7.2 -Package: sipb-xen-iptables +Package: sipb-xen-www Architecture: all -Depends: ${misc:Depends}, iptables -Description: Configure at boot the iptables rules for the VNC proxy client +Depends: ${misc:Depends}, python-cheetah, python-simple-json, sipb-xen-database-client, sipb-xen-vnc-client +Description: Install the sipb-xen-dev website diff --git a/debian/rules b/debian/rules index 3f9af0f..6e66d75 100755 --- a/debian/rules +++ b/debian/rules @@ -2,5 +2,5 @@ include /usr/share/cdbs/1/rules/debhelper.mk -binary-fixup/sipb-xen-iptables:: - svn co https://sipb-xen-dev.mit.edu:1111/trunk/packages/sipb-xen-iptables/code/ $(DEB_DESTDIR)/usr/local/share/sipb-xen-iptables +binary-fixup/sipb-xen-dhcp:: + svn co https://sipb-xen-dev.mit.edu:1111/trunk/packages/sipb-xen-www/code/ $(DEB_DESTDIR)/var/www/sipb-xen-www diff --git a/debian/sipb-xen-iptables.init b/debian/sipb-xen-iptables.init deleted file mode 100644 index 49f92d3..0000000 --- a/debian/sipb-xen-iptables.init +++ /dev/null @@ -1,112 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: sipb-xen-iptables -# Required-Start: $local_fs $remote_fs -# Required-Stop: $local_fs $remote_fs -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: sipb-xen iptables rules -# Description: -### END INIT INFO - -# Author: SIPB Xen Project - -# Do NOT "set -e" - -# PATH should only include /usr/* if it runs after the mountnfs.sh script -PATH=/sbin:/usr/sbin:/bin:/usr/bin -DESC="Load the sipb-xen iptables rules" -NAME=sipb-xen-iptables -RULES=/usr/local/share/sipb-xen-iptables/iptables.rules - -# 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 - /sbin/iptables-restore < $RULES -} - -# -# 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 - return 0 -} - -case "$1" in - start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; - esac - ;; - #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|restart|force-reload}" >&2 - exit 3 - ;; -esac - -: diff --git a/debian/sipb-xen-iptables.install b/debian/sipb-xen-www.install similarity index 100% rename from debian/sipb-xen-iptables.install rename to debian/sipb-xen-www.install diff --git a/debian/sipb-xen-www.postinst b/debian/sipb-xen-www.postinst new file mode 100755 index 0000000..e4d526b --- /dev/null +++ b/debian/sipb-xen-www.postinst @@ -0,0 +1,43 @@ +#!/bin/sh +# postinst script for #PACKAGE# +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + cd /var/www/sipb-xen-www + make clean && make all + ;; + + 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 + + -- 1.7.9.5