[SCM] live-helper branch, debian-next, updated. debian/2.0_a8-1-8-g1db2027

Daniel Baumann daniel at debian.org
Sun Mar 7 10:54:47 UTC 2010


The following commit has been merged in the debian-next branch:
commit 1db2027d556397b06d4ce9d61a3074ddedc878c7
Author: Daniel Baumann <daniel at debian.org>
Date:   Sun Mar 7 11:49:29 2010 +0100

    Merging live-webhelper.

diff --git a/Makefile b/Makefile
index aa61e1c..6bae1cd 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ all: test install
 
 test:
 	# Checking for syntax errors
-	for SCRIPT in live-helper.sh functions/* examples/*/*.sh helpers/* hooks/*; \
+	for SCRIPT in live-helper.sh cgi/* functions/* examples/*/*.sh helpers/* hooks/*; \
 	do \
 		sh -n $$SCRIPT; \
 	done
@@ -16,7 +16,7 @@ test:
 	# Checking for bashisms
 	if [ -x /usr/bin/checkbashisms ]; \
 	then \
-		checkbashisms live-helper.sh functions/* examples/*/*.sh helpers/* hooks/*; \
+		checkbashisms live-helper.sh cgi/* functions/* examples/*/*.sh helpers/* hooks/*; \
 	else \
 		echo "WARNING: skipping bashism test - you need to install devscripts."; \
 	fi
@@ -27,7 +27,7 @@ build:
 install:
 	# Installing shared data
 	mkdir -p $(DESTDIR)/usr/share/live-helper
-	cp -r data examples live-helper.sh functions helpers hooks includes lists templates $(DESTDIR)/usr/share/live-helper
+	cp -r cgi data examples live-helper.sh functions helpers hooks includes lists templates $(DESTDIR)/usr/share/live-helper
 
 	# Installing executables
 	mkdir -p $(DESTDIR)/usr/bin
diff --git a/cgi/cgi b/cgi/cgi
new file mode 100755
index 0000000..c38054e
--- /dev/null
+++ b/cgi/cgi
@@ -0,0 +1,239 @@
+#!/bin/bash
+
+# live-webhelper - web interface to live-helper
+# Copyright (C) 2007-2010 Daniel Baumann <daniel at debian.org>
+#
+# 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.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# On Debian systems, the complete text of the GNU General Public License
+# can be found in /usr/share/common-licenses/GPL-2 file.
+
+# Reading common
+. /usr/share/live-webhelper/common
+
+# Reading defaults
+if [ -r /etc/default/live-webhelper ]
+then
+        . /etc/default/live-webhelper
+else
+        echo "E: /etc/default/live-webhelper missing"
+        exit 1
+fi
+
+# Sending http header
+echo "Content-type: text/html"
+echo
+
+# Sending html header
+cat "${_TEMPLATES}"/header.html
+
+# CGI
+if [ -z "${QUERY_STRING}" ]
+then
+	# Sending html form
+	sed -e "s#LH_MIRROR_BOOTSTRAP_SECURITY#${LH_MIRROR_BOOTSTRAP_SECURITY}#" \
+	    -e "s#LH_MIRROR_BOOTSTRAP#${LH_MIRROR_BOOTSTRAP}#" \
+	    -e "s#LH_MIRROR_BINARY_SECURITY#${LH_MIRROR_BINARY_SECURITY}#" \
+	    -e "s#LH_MIRROR_BINARY#${LH_MIRROR_BINARY}#" \
+	    -e "s/VERSION/${VERSION}/" \
+	    -e "s/DATE/`date +%Y%m%d-%H:%M`/" \
+	"${_TEMPLATES}"/form.html
+else
+	# Converting spaces:	sed 's/+/ /g'
+	# Converting '@':	sed 's/%40/@/g'
+	# Converting ':':	sed 's/%3A/:/g'
+	# Converting ';':	sed 's/%3B/\;/g'
+	# Converting '/':	sed 's/%2F/\//g'
+	# Converting '~':	sed 's/%7E/\~/g'
+
+	# Translate parameters
+        QUERY_STRING=$(echo "${QUERY_STRING}" | sed -e 's/%2F/\//g' -e 's/+/ /g' -e 's/%3B/;/g' -e 's/%7E/~/g' -e 's/%3A/:/g' -e 's/%40/@/g')
+	# Debug the filtering string
+	# echo ${QUERY_STRING}
+
+	# Email
+	_EMAIL=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])email=[0-9,a-z,A-Z,.,_,-,@]+' | cut -f 2 -d '=' | head -n1)
+
+	# Standard options
+	LH_BINARY_IMAGES=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])binary_images=[a-z,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_DISTRIBUTION=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])distribution=[a-z]+' | cut -f 2 -d '=' | head -n1)
+	LH_PACKAGES_LISTS=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])packages_lists=[0-9,a-z,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_PACKAGES=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])packages=[0-9,a-z,A-Z,., ,_,-]+' | cut -f 2 -d '=' | head -n1)
+
+	# Advanced bootstrap options
+	LH_ARCHITECTURE=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])architecture=[0-9,a-z]+' | cut -f 2 -d '=' | head -n1)
+	LH_BOOTSTRAP_FLAVOUR=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])bootstrap_flavour=[a-z]+' | cut -f 2 -d '=' | head -n1)
+	LH_MIRROR_BOOTSTRAP=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])mirror_bootstrap=[0-9,a-z,A-Z,.,~,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_MIRROR_BOOTSTRAP_SECURITY=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])mirror_bootstrap=[0-9,a-z,A-Z,.,~,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_MIRROR_BINARY=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])mirror_binary=[0-9,a-z,A-Z,.,~,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_MIRROR_BINARY_SECURITY=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])mirror_binary_security=[0-9,a-z,A-Z,.,~,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_SECTIONS=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])sections=[a-z]+' | cut -f 2 -d '=' | head -n1)
+
+	# Advanced chroot options
+	LH_CHROOT_FILESYSTEM=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])chroot_filesystem=[0-9,a-z]+' | cut -f 2 -d '=' | head -n1)
+	LH_LINUX_FLAVOURS=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])linux_flavours=[0-9,a-z,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_SECURITY=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])security=[a-z]+' | cut -f 2 -d '=' | head -n1)
+	LH_SYMLINKS=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])symlinks=[a-z]+' | cut -f 2 -d '=' | head -n1)
+	LH_SYSVINIT=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])sysvinit=[a-z]+' | cut -f 2 -d '=' | head -n1)
+
+	# Advanced binary options
+	LH_BINARY_INDICES=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])binary_indices=[a-z]+' | cut -f 2 -d '=' | head -n1)
+	LH_BOOTAPPEND=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])bootappend=[0-9,a-z,A-Z,., ,_,+,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_BOOTLOADER=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])bootloader=[a-z]+' | cut -f 2 -d '=' | head -n1)
+	LH_DEBIAN_INSTALLER=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])debian_installer=[a-z]+' | cut -f 2 -d '=' | head -n1)
+	LH_ENCRYPTION=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])encryption=[0-9,a-z,A-Z]+' | cut -f 2 -d '=' | head -n1)
+	LH_HOSTNAME=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])hostname=[0-9,a-z,A-Z,.,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_ISO_APPLICATION=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])iso_application=[0-9,a-z,A-Z,., ,~,;,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_ISO_PREPARER=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])iso_preparer=[0-9,a-z,A-Z,., ,~,;,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_ISO_PUBLISHER=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])iso_publisher=[0-9,a-z,A-Z,., ,~,;,:,/,_,/,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_ISO_VOLUME=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])iso_volume=[0-9,a-z,A-Z,., ,~,;,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_MEMTEST=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])memtest=[0-9,a-z,A-Z,.,_,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_NET_ROOT_PATH=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])net_path=[0-9,a-z,A-Z,.,_,/,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_NET_ROOT_SERVER=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])net_server=[0-9,a-z,A-Z,.,_,-]+' | cut -f 2 -d '=' | head -n1)
+	LH_USERNAME=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])username=[0-9,a-z,A-Z,.,-]+' | cut -f 2 -d '=' | head -n1)
+
+	# Advanced source options
+	LH_SOURCE=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])source=[a-z]+' | cut -f 2 -d '=' | head -n1)
+	LH_SOURCE_IMAGES=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])source_images=[a-z]+' | cut -f 2 -d '=' | head -n1)
+
+	# Unofficial options
+	_CUSTOM_BOOTSTRAP=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])custom_bootstrap=[0-9,a-z,A-Z,., ,~,;,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
+	_CUSTOM_BINARY=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])custom_binary=[0-9,a-z,A-Z,., ,~,;,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
+
+	# FIXME: filter invalid options
+	unset QUERY_STRING
+
+	if [ -z "${_EMAIL}" ]
+	then
+		echo "<h2><div style='color: red;'>Error: No email address specified.</div></h2>"
+
+		sed -e "s#LH_MIRROR_BOOTSTRAP_SECURITY#${LH_MIRROR_BOOTSTRAP_SECURITY}#" \
+		    -e "s#LH_MIRROR_BOOTSTRAP#${LH_MIRROR_BOOTSTRAP}#" \
+		    -e "s#LH_MIRROR_BINARY_SECURITY#${LH_MIRROR_BINARY_SECURITY}#" \
+		    -e "s#LH_MIRROR_BINARY#${LH_MIRROR_BINARY}#" \
+		    -e "s/VERSION/${VERSION}/" \
+		    -e "s/DATE/`date +%Y%m%d-%H:%M`/" \
+		"${_TEMPLATES}"/form.html
+
+		exit
+	fi
+
+	# Getting build identifier
+	_BUILD=$(date +%Y%m%d.%H%M%S.%N)
+
+	#echo "${QUERY_STRING}"
+	# Sending html confirmation
+	# Note: On each string remember to use a delimeter that is not in the string.
+	sed -e "s/BUILD/${_BUILD}/g" \
+	    -e "s/EMAIL/${_EMAIL}/" \
+	    -e "s/LH_BINARY_IMAGES/${LH_BINARY_IMAGES}/" \
+	    -e "s/LH_DISTRIBUTION/${LH_DISTRIBUTION}/" \
+	    -e "s/LH_PACKAGES_LISTS/${LH_PACKAGES_LISTS}/" \
+	    -e "s/LH_PACKAGES/${LH_PACKAGES}/" \
+	    -e "s/LH_ARCHITECTURE/${LH_ARCHITECTURE}/" \
+	    -e "s/LH_BOOTSTRAP_FLAVOUR/${LH_BOOTSTRAP_FLAVOUR}/" \
+	    -e "s#LH_MIRROR_BOOTSTRAP_SECURITY#${LH_MIRROR_BOOTSTRAP_SECURITY}#" \
+	    -e "s#LH_MIRROR_BOOTSTRAP#${LH_MIRROR_BOOTSTRAP}#" \
+	    -e "s#LH_MIRROR_BINARY_SECURITY#${LH_MIRROR_BINARY_SECURITY}#" \
+	    -e "s#LH_MIRROR_BINARY#${LH_MIRROR_BINARY}#" \
+	    -e "s/LH_SECTIONS/${LH_SECTIONS}/" \
+	    -e "s/LH_CHROOT_FILESYSTEM/${LH_CHROOT_FILESYSTEM}/" \
+	    -e "s/LH_LINUX_FLAVOURS/${LH_LINUX_FLAVOURS}/" \
+	    -e "s/LH_SECURITY/${LH_SECURITY}/" \
+	    -e "s/LH_SYMLINKS/${LH_SYMLINKS}/" \
+	    -e "s/LH_SYSVINIT/${LH_SYSVINIT}/" \
+	    -e "s/LH_BINARY_INDICES/${LH_BINARY_INDICES}/" \
+	    -e "s/LH_BOOTAPPEND/${LH_BOOTAPPEND}/" \
+	    -e "s/LH_BOOTLOADER/${LH_BOOTLOADER}/" \
+	    -e "s/LH_DEBIAN_INSTALLER/${LH_DEBIAN_INSTALLER}/" \
+	    -e "s/LH_ENCRYPTION/${LH_ENCRYPTION}/" \
+	    -e "s/LH_HOSTNAME/${LH_HOSTNAME}/" \
+	    -e "s#LH_ISO_APPLICATION#${LH_ISO_APPLICATION}#" \
+	    -e "s#LH_ISO_PREPARER#${LH_ISO_PREPARER}#" \
+	    -e "s#LH_ISO_PUBLISHER#${LH_ISO_PUBLISHER}#" \
+	    -e "s#LH_ISO_VOLUME#${LH_ISO_VOLUME}#" \
+	    -e "s/LH_MEMTEST/${LH_MEMTEST}/" \
+	    -e "s#LH_NET_ROOT_PATH#${LH_NET_ROOT_PATH}#" \
+	    -e "s/LH_NET_ROOT_SERVER/${LH_NET_ROOT_SERVER}/" \
+	    -e "s#SERVER#${_SERVER}#g" \
+	    -e "s/LH_USERNAME/${LH_USERNAME}/" \
+	    -e "s/LH_SOURCE_IMAGES/${LH_SOURCE_IMAGES}/" \
+	    -e "s/LH_SOURCE/${LH_SOURCE}/" \
+	    -e "s#CUSTOM_BOOTSTRAP#${_CUSTOM_BOOTSTRAP}#" \
+	    -e "s#CUSTOM_BINARY#${_CUSTOM_BINARY}#" \
+	"${_TEMPLATES}"/build.html
+
+	# Creating temporary directory
+	mkdir -p "${_TEMPDIR}"
+
+# Writing build file
+cat > "${_TEMPDIR}"/"${_BUILD}".build << EOF
+# live-webhelper "${VERSION}" build file
+# `date -R`
+
+_BUILD="${_BUILD}"
+_EMAIL="${_EMAIL}"
+
+# Standard options
+LH_BINARY_IMAGES="${LH_BINARY_IMAGES}"
+LH_DISTRIBUTION="${LH_DISTRIBUTION}"
+LH_PACKAGES_LISTS="${LH_PACKAGES_LISTS}"
+LH_PACKAGES="${LH_PACKAGES}"
+
+# Advanced bootstrap options
+LH_ARCHITECTURE="${LH_ARCHITECTURE}"
+LH_MIRROR_BOOTSTRAP_SECURITY="${LH_MIRROR_BOOTSTRAP}"
+LH_MIRROR_BOOTSTRAP="${LH_MIRROR_BOOTSTRAP}"
+LH_MIRROR_BINARY_SECURITY="${LH_MIRROR_BINARY_SECURITY}"
+LH_MIRROR_BINARY="${LH_MIRROR_BINARY}"
+LH_SECTIONS="${LH_SECTIONS}"
+
+# Advanced chroot options
+LH_CHROOT_FILESYSTEM="${LH_CHROOT_FILESYSTEM}"
+LH_LINUX_FLAVOURS="${LH_LINUX_FLAVOURS}"
+LH_SECURITY="${LH_SECURITY}"
+LH_SYMLINKS="${LH_SYMLINKS}"
+LH_SYSVINIT="${LH_SYSVINIT}"
+
+# Advanced binary options
+LH_BINARY_INDICES="${LH_BINARY_INDICES}"
+LH_BOOTAPPEND="${LH_BOOTAPPEND}"
+LH_BOOTLOADER="${LH_BOOTLOADER}"
+LH_DEBIAN_INSTALLER="${LH_DEBIAN_INSTALLER}"
+LH_ENCRYPTION="${LH_ENCRYPTION}"
+LH_HOSTNAME="${LH_HOSTNAME}"
+LH_ISO_APPLICATION="${LH_ISO_APPLICATION}"
+LH_ISO_PREPARER="${LH_ISO_PREPARER}"
+LH_ISO_PUBLISHER="${LH_ISO_PUBLISHER}"
+LH_ISO_VOLUME="${LH_ISO_VOLUME}"
+LH_MEMTEST="${LH_MEMTEST}"
+LH_NET_ROOT_PATH="${LH_NET_ROOT_PATH}"
+LH_NET_ROOT_SERVER="${LH_NET_ROOT_SERVER}"
+LH_USERNAME="${LH_USERNAME}"
+
+# Advanced source options
+LH_SOURCE_IMAGES="${LH_SOURCE_IMAGES}"
+LH_SOURCE="${LH_SOURCE}"
+
+# Unofficial options
+_CUSTOM_BOOTSTRAP="${_CUSTOM_BOOTSTRAP}"
+_CUSTOM_BINARY="${_CUSTOM_BINARY}"
+EOF
+
+	echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-webhelper: add web build (${_BUILD})." >> /var/log/live
+	echo "$(date +%b\ %d\ %H:%M:%S) ${HOSTNAME} live-webhelper: options ${_BUILD} |email ${_EMAIL}|binary_images ${LH_BINARY_IMAGES}|distribution ${LH_DISTRIBUTION}|packages_lists ${LH_PACKAGES_LISTS}|packages ${LH_PACKAGES}|architecture ${LH_ARCHITECTURE}|mirror_bootstrap_security ${LH_MIRROR_BOOTSTRAP}|mirror_bootstrap ${LH_MIRROR_BOOTSTRAP}|mirror_binary_security ${LH_MIRROR_BINARY_SECURITY}|mirror_binary ${LH_MIRROR_BINARY}|sections ${LH_SECTIONS}|chroot_filesystem ${LH_CHROOT_FILESYSTEM}|linux_flavours ${LH_LINUX_FLAVOURS}|security ${LH_SECURITY}|symlinks ${LH_SYMLINKS}|sysvinit ${LH_SYSVINIT}|binary_indices ${LH_BINARY_INDICES}|bootappend ${LH_BOOTAPPEND}|bootloader ${LH_BOOTLOADER}|debian_installer ${LH_DEBIAN_INSTALLER}|encryption ${LH_ENCRYPTION}|hostname ${LH_HOSTNAME}|iso_application ${LH_ISO_APPLICATION}|iso_preparer ${LH_ISO_PREPARER}|iso_publisher ${LH_ISO_PUBLISHER}|iso_volume ${LH_ISO_VOLUME}|memtest ${LH_MEMTEST}|net_path ${LH_NET_ROOT_PATH}|net_server ${LH_NET
 _ROOT_SERVER}|username ${LH_USERNAME}|source_images ${LH_SOURCE_IMAGES}|source ${LH_SOURCE}|custom_bootstrap ${_CUSTOM_BOOTSTRAP}|custom_binary ${_CUSTOM_BINARY}\n" >> /var/log/live
+fi
+
+sed -e "s/VERSION/${VERSION}/" "${_TEMPLATES}"/footer.html
diff --git a/cgi/common b/cgi/common
new file mode 100644
index 0000000..1e4bcb2
--- /dev/null
+++ b/cgi/common
@@ -0,0 +1 @@
+VERSION="1.0~a20"
diff --git a/cgi/cron b/cgi/cron
new file mode 100755
index 0000000..fca2db0
--- /dev/null
+++ b/cgi/cron
@@ -0,0 +1,175 @@
+#!/bin/sh
+
+# live-webhelper - web interface to live-helper
+# Copyright (C) 2007-2010 Daniel Baumann <daniel at debian.org>
+#
+# live-webhelper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+# This is free software, and you are welcome to redistribute it
+# under certain conditions; see COPYING for details.
+
+# Including common functions
+LH_BASE="${LH_BASE:-/usr/share/live-helper}"
+
+for _FUNCTION in "${LH_BASE}"/functions/*.sh
+do
+	. "${_FUNCTION}"
+done
+
+# Reading common
+. /usr/share/live-webhelper/common
+
+# Reading defaults
+if [ -r /etc/default/live-webhelper ]
+then
+	. /etc/default/live-webhelper
+else
+	echo "E: /etc/default/live-webhelper missing"
+	exit 1
+fi
+
+# Exit if disabled
+if [ "${_WEBBUILD}" != "enabled" ]
+then
+	exit 0
+fi
+
+# Checking lock file
+if [ -f /var/lock/live-webhelper.lock ]
+then
+	echo "E: live-webhelper already/still running."
+	exit 1
+fi
+
+# Creating lock trap
+trap "test -f /var/lock/live-webhelper.lock && rm -f /var/lock/live-webhelper.lock; exit 0" 0 1 2 3 9 15
+
+# Creating lock file
+touch /var/lock/live-webhelper.lock
+
+# Cleanup old builds: cron should be run at least once per hour to take effect
+if ls "${_DESTDIR}"/`date -d yesterday +%Y%m%d.%H`* > /dev/null 2>&1
+then
+	rm -rf "${_DESTDIR}"/`date -d yesterday +%Y%m%d.%H`*
+
+	echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-webhelper: remove web build (`date -d yesterday +%Y%m%d.%H`*)." >> /var/log/live
+fi
+
+# Ok from here spin through the live-webhelper files we have waiting to build
+#if ls "${_TEMPDIR}"/*.build > /dev/null 2>&1
+if Find_files ${_TEMPDIR}/*.build 
+then
+	for _FILE in "${_TEMPDIR}"/*.build
+	do
+		# Pull in the variables we want from the config file.
+		# Pul in the build number
+		_BUILD=`awk -F\" '/^_BUILD=/{print $2}' ${_FILE}`
+		# Pull in the email address
+		_EMAIL=`awk -F\" '/^_EMAIL=/{print $2}' ${_FILE}`
+		# Pull in the custom bootstrap
+		_CUSTOM_BOOTSTRAP=`awk -F\" '/^_CUSTOM_BOOTSTRAP=/{print $2}' ${_FILE}`
+		# Pull in the custom binary
+		_CUSTOM_BINARY=`awk -F\" '/^_CUSTOM_BINARY=/{print $2}' ${_FILE}`
+		
+		# Drop out some build data for information if something goes wrong.
+		echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-webhelper: begin web build (${_BUILD})." >> /var/log/live
+
+		# Creating build directory which also creates the config/chroot_sources folder
+		mkdir -p "${_TEMPDIR}"/"${_BUILD}"/config/chroot_sources
+
+		# The next two tests are for unofficial third party repositories
+		if [ -n "${_CUSTOM_BOOTSTRAP}" ]
+		then
+			echo "${_CUSTOM_BOOTSTRAP}" > "${_TEMPDIR}"/"${_BUILD}"/config/chroot_sources/custom.bootstrap
+		fi
+
+		if [ -n "${_CUSTOM_BINARY}" ]
+		then
+			echo "${_CUSTOM_BINARY}" > "${_TEMPDIR}"/"${_BUILD}"/config/chroot_sources/custom.binary
+		fi
+
+		_DATE_START="`date -R`"
+		echo "Begin: ${_DATE_START}" > "${_TEMPDIR}"/"${_BUILD}"/log
+
+		# Generating image
+		cd "${_TEMPDIR}"/"${_BUILD}"
+		lh_config -c ${_FILE} >> "${_TEMPDIR}"/"${_BUILD}"/log 2>&1
+		_ERRORCONFIG="${?}"
+		lh_build >> "${_TEMPDIR}"/"${_BUILD}"/log 2>&1
+		_ERRORBUILD="${?}"
+
+		_DATE_END="`date -R`"
+		echo "End: ${_DATE_END}" >> "${_TEMPDIR}"/"${_BUILD}"/log
+
+		# Creating image directory
+		mkdir -p "${_DESTDIR}"/"${_BUILD}"
+
+		# Creating mail
+		if [ "${_ERRORCONFIG}" -eq "0" ] && [ "${_ERRORBUILD}" -eq "0" ]
+		then
+			_STATUS="maybe-successful"
+		else
+			_STATUS="maybe-failed"
+		fi
+
+		sed -e "s/BUILD/${_BUILD}/g" \
+		    -e "s/EMAIL/${_EMAIL}/" \
+		    -e "s/VERSION/${VERSION}/" \
+		    -e "s/DATE_START/${_DATE_START}/" \
+		    -e "s/DATE_END/${_DATE_END}/" \
+		    -e "s/STATUS/${_STATUS}/" \
+		    -e "s#SERVER#${_SERVER}#" \
+		"${_TEMPLATES}"/mail.txt > "${_DESTDIR}"/"${_BUILD}"/mail
+
+		# Moving binary image
+		#if ls "${_TEMPDIR}"/"${_BUILD}"/binary*.* > /dev/null 2>&1
+		if Find_files ${_TEMPDIR}/${_BUILD}/binary*.*
+		then
+			mv "${_TEMPDIR}"/"${_BUILD}"/binary*.* "${_DESTDIR}"/"${_BUILD}"
+		fi
+
+		# Moving source image
+		#if ls "${_TEMPDIR}"/"${_BUILD}"/source.* > /dev/null 2>&1
+		if Find_files ${_TEMPDIR}/${_BUILD}/source.*
+		then
+			mv "${_TEMPDIR}"/"${_BUILD}"/source.* "${_DESTDIR}"/"${_BUILD}"
+		fi
+
+		# Moving build
+		mv "${_TEMPDIR}"/"${_BUILD}".build "${_DESTDIR}"/"${_BUILD}"/build
+
+		# Moving log
+		mv "${_TEMPDIR}"/"${_BUILD}"/log "${_DESTDIR}"/"${_BUILD}"
+
+		# Generating md5sum
+		cd "${_DESTDIR}"/"${_BUILD}"
+		md5sum * > md5sum
+		cd "${OLDPWD}"
+
+		# Sending mail
+		cat "${_DESTDIR}"/"${_BUILD}"/mail | /usr/sbin/sendmail -t
+
+		# Unmounting devpts-live
+		#if ls "${_TEMPDIR}"/"${_BUILD}"/chroot/dev/pts/* > /dev/null 2>&1
+		if Find_files ${_TEMPDIR}/${_BUILD}/chroot/dev/pts/*
+		then
+			umount "${_TEMPDIR}"/${_BUILD}/chroot/dev/pts
+		fi
+
+		# Unmounting proc
+		if [ -f "${_TEMPDIR}"/"${_BUILD}"/chroot/proc/version ]
+		then
+			umount "${_TEMPDIR}"/"${_BUILD}"/chroot/proc
+		fi
+
+		# Unmounting sysfs
+		if [ -d "${_TEMPDIR}"/"${_BUILD}"/chroot/sys/kernel ]
+		then
+			umount "${_TEMPDIR}"/${_BUILD}/chroot/sys
+		fi
+
+		# Removing build directory
+		rm -rf "${_TEMPDIR}"/"${_BUILD}"
+
+		echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-webhelper: end web build (${_BUILD}: ${_STATUS})." >> /var/log/live
+	done
+fi
diff --git a/cgi/default b/cgi/default
new file mode 100644
index 0000000..f2403bd
--- /dev/null
+++ b/cgi/default
@@ -0,0 +1,18 @@
+# Defaults for /etc/cron.daily/live-webhelper
+
+_WEBBUILD="disabled"
+
+_MODE="debian-official"
+
+_DEBUG="disabled"
+
+_DESTDIR="/srv/debian-live/www/webhelper"
+_TEMPLATES="/usr/share/live-webhelper/templates/${_MODE}"
+_TEMPDIR="/srv/tmp/live-webhelper"
+
+LH_MIRROR_BOOTSTRAP="http://ftp.de.debian.org/debian/"
+LH_MIRROR_BOOTSTRAP_SECURITY="http://ftp.de.debian.org/debian-security/"
+LH_MIRROR_BINARY="http://ftp.debian.org/debian/"
+LH_MIRROR_BINARY_SECURITY="http://security.debian.org/"
+
+_SERVER="http://live.debian.net/webhelper"
diff --git a/docs/ChangeLog.live-webhelper b/docs/ChangeLog.live-webhelper
new file mode 100644
index 0000000..b6e3df7
--- /dev/null
+++ b/docs/ChangeLog.live-webhelper
@@ -0,0 +1,182 @@
+commit 1f4cf146edbd72a2d61ac2e60324d392569c9f24
+Author: Daniel Baumann <daniel at debian.org>
+Date:   Wed Oct 14 13:35:25 2009 +0200
+
+    Updating vcs fields.
+
+commit d1ab019de29691407e3bde1af2ff5efe9a284380
+Author: Richard Nelson <unixabg at gmail.com>
+Date:   Wed May 27 09:42:55 2009 -0500
+
+    Update quoting on variables for safety.
+
+commit 601b25634d291706fc477342b712554a54c42016
+Author: Richard Nelson <unixabg at gmail.com>
+Date:   Sat Mar 14 22:19:41 2009 -0500
+
+    update copyright years
+
+commit fed4e5adfd49b339bec16b0338b73f9f90ca40ce
+Author: Richard Nelson <unixabg at gmail.com>
+Date:   Sat Mar 14 21:47:27 2009 -0500
+
+    Set lenny as defualt build
+
+commit 083a14f46cc1298b33908991dea145cf4ec7415d
+Author: Richard Nelson <unixabg at gmail.com>
+Date:   Sun Nov 30 16:41:15 2008 -0600
+
+    Bug fix on usb-hdd builds.
+
+commit 7742576d3a9b84807c6456007ad3bc0147ca3024
+Author: Richard Nelson <unixabg at gmail.com>
+Date:   Thu Nov 27 22:44:51 2008 -0600
+
+    Remove -x flag left on cron during debug operations.
+
+commit 6817dca69fd0c53578c1e14c9c5333d5be94419d
+Author: Richard Nelson <unixabg at gmail.com>
+Date:   Thu Nov 27 22:42:58 2008 -0600
+
+    Update to start using more live-helper functions.
+
+commit 649fc3a0fac8eae1b8a239a9ba250e89f4b89dfd
+Author: Richard Nelson <unixabg at gmail.com>
+Date:   Wed Nov 26 22:13:57 2008 -0600
+
+    Update Copyright (C) to 2007-2008
+
+commit 5449c921111b2f300006cc41d7b6582270959a82
+Author: Daniel Baumann <daniel at debian.org>
+Date:   Fri Nov 7 18:08:01 2008 +0100
+
+    Replacing obsolete dh_clean -k with dh_prep.
+
+commit cd7a4a353ae652a45057da5726467e23401be52d
+Author: Richard Nelson <unixabg at gmail.com>
+Date:   Tue Nov 4 18:40:06 2008 -0600
+
+    Bug fix on custom bootstrap and custom binary.
+
+commit fc227fc32f06ba8e5af8c9ebdcd147f98790b6ea
+Author: Richard Nelson <unixabg at gmail.com>
+Date:   Thu Oct 2 17:24:37 2008 -0500
+
+    Bug fix in netboot server and path.
+
+commit 446a99439bfee38c89615e1e24bb4729b2223e9e
+Author: Richard Nelson <unixabg at gmail.com>
+Date:   Mon Sep 8 21:39:37 2008 -0500
+
+    Include common functions from live-helper for code reuse.
+
+commit 359e51591318966e97128b00bff38c62d07c6827
+Author: Richard Nelson <unixabg at gmail.com>
+Date:   Mon Sep 8 21:35:52 2008 -0500
+
+    Added test for unmounting devpts-live.
+
+commit 3fdcc59654986d57f014b6c6721b2a3abde2f722
+Author: Richard Nelson <unixabg at gmail.com>
+Date:   Mon Sep 8 21:29:41 2008 -0500
+
+    Local variable prefix with _ on VAR i.e. _VAR
+
+commit 4bbf10e31754f290d3aa0e158a45d09316487544
+Author: Richard Nelson <unixabg at gmail.com>
+Date:   Mon Sep 8 16:12:22 2008 -0500
+
+    Local variable LH_ removal/cleanup.
+
+commit 472a6a0825656fbc16f4df6cb19bb16e1df8605f
+Author: Richard Nelson <unixabg at gmail.com>
+Date:   Mon Sep 8 16:02:36 2008 -0500
+
+    Minor local variable confusion for LH_ prefix cleanup.
+
+commit df23442fca1c727dd43ca1ea464b277e3617cb0f
+Author: Richard Nelson <unixabg at gmail.com>
+Date:   Mon Sep 8 15:59:08 2008 -0500
+
+    Upgrade variables to have the LH_ prefix for LH_* variable, to work with the current live-helper version.
+
+commit f00e0cb212e0c84268e099ca35ca386982e4d82b
+Author: Daniel Baumann <daniel at debian.org>
+Date:   Sun Sep 7 21:57:51 2008 +0200
+
+    Removing currently unused Upstream-Depends field in control.
+
+commit 4c85494fa2907a54dd99eaf17816a4d403ddb5bc
+Author: Daniel Baumann <daniel at debian.org>
+Date:   Sun Sep 7 21:57:41 2008 +0200
+
+    Updating vcs fields in control file.
+
+commit eaf87ebd9f828740430cc60d3e9f201d88c67c25
+Author: Daniel Baumann <daniel at debian.org>
+Date:   Thu Aug 28 23:40:35 2008 +0200
+
+    Setting project email address to the new debian-live at lists.debian.org.
+
+commit 6fbca8e14be271dc62988d5555bba9f453ddbaa7
+Author: Daniel Baumann <daniel at debian.org>
+Date:   Wed Apr 23 18:50:17 2008 +0200
+
+    Updating Richards email address.
+
+commit 25e1e7bc4f6a095aaf248a80aeaa3795f4a3e3a9
+Author: Daniel Baumann <daniel at debian.org>
+Date:   Tue Oct 30 11:04:42 2007 +0100
+
+    Correcting vcs fields.
+
+commit c49d9ff77bd5be73d5367fd567a9e39fccf78410
+Author: Daniel Baumann <daniel at debian.org>
+Date:   Wed Oct 3 09:11:29 2007 +0200
+
+    Fixing wrong homepage field.
+
+commit 8e01ba16a737d04a0367ecf1d4f3d7f80437fe97
+Author: Daniel Baumann <daniel at debian.org>
+Date:   Sun Sep 23 16:04:04 2007 +0200
+
+    Using new Homepage field now.
+
+commit 49ca83a4d57051b2b4b4b950178063c6df25e222
+Author: Daniel Baumann <daniel at debian.org>
+Date:   Sun Sep 23 16:04:04 2007 +0200
+
+    Adding Upstream-Depends field.
+
+commit 39a9d3e82c71451734f0d4ddb630b67c9d55541a
+Author: Daniel Baumann <daniel at debian.org>
+Date:   Sun Sep 23 16:04:04 2007 +0200
+
+    Moving from svn to git.
+
+commit 7e823babbe815bdf520becbfd6f4ccec814aa7e2
+Author: Daniel Baumann <daniel at debian.org>
+Date:   Sun Sep 23 16:04:03 2007 +0200
+
+    Removing not uploaded versions.
+
+commit 46e8777246485a15fc6d5a202a361662f4e724b5
+Author: Daniel Baumann <daniel at debian.org>
+Date:   Sun Sep 23 16:03:52 2007 +0200
+
+    Adding live-webhelper trunk 20070911.
+
+2007-07-19  Daniel Baumann  <daniel at debian.org>
+
+	* Introducing build modes.
+
+2007-07-14  Daniel Baumann  <daniel at debian.org>
+
+	* scripts/cgi:
+	  - Quick fix in EMAIL.
+
+2007-06-04  Daniel Baumann  <daniel at debian.org>
+
+	* templates/form.html:
+	  - Set default source image to 'generic'.
+	* Starting live-webhelper.
diff --git a/examples/cron/crontab b/examples/cron/crontab
new file mode 100644
index 0000000..0cb78a3
--- /dev/null
+++ b/examples/cron/crontab
@@ -0,0 +1,7 @@
+# /etc/crontab - system-wide crontab
+
+SHELL=/bin/sh
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+# m  h dom mon dow user command
+*/1  * *   *   *   root /etc/cron.hourly/live-webhelper > /dev/null 2>&1
diff --git a/templates/cgi/debian-official/build.html b/templates/cgi/debian-official/build.html
new file mode 100644
index 0000000..f03df68
--- /dev/null
+++ b/templates/cgi/debian-official/build.html
@@ -0,0 +1,78 @@
+<br />
+
+<h2>Your build 'BUILD' was recorded and will processed soon. Depending on the options you have selected, the build takes about between 5 and 20 minutes. You will be notified by email when the attempt has completed.</h2>
+
+<br />
+
+<h3>Your build will be available at: <a href="SERVER/BUILD/">SERVER/BUILD/</a>.</h3>
+
+<br />
+<br />
+
+<fieldset>
+
+<legend><b>Options</b></legend>
+
+<b>Standard options</b>
+
+<table>
+	<tr><td>Email: </td><td>EMAIL</td></tr>
+	<tr><td>--binary-image: </td><td>LH_BINARY_IMAGES</td></tr>
+	<tr><td>--distribution: </td><td>LH_DISTRIBUTION</td></tr>
+	<tr><td>--packages-lists: </td><td>LH_PACKAGES_LISTS</td></tr>
+	<tr><td>--packages: </td><td>LH_PACKAGES</td><tr>
+</table>
+
+<b>Advanced bootstrap options</b>
+
+<table>
+	<tr><td>--architecture: </td><td>LH_ARCHITECTURE</td></tr>
+	<tr><td>--bootstrap-flavour: </td><td>LH_BOOTSTRAP_FLAVOUR</td></tr>
+	<tr><td>--mirror-bootstrap: </td><td>LH_MIRROR_BOOTSTRAP</td></tr>
+	<tr><td>--mirror-bootstrap-security: </td><td>LH_MIRROR_BOOTSTRAP_SECURITY</td></tr>
+	<tr><td>--mirror-binary: </td><td>LH_MIRROR_BINARY</td></tr>
+	<tr><td>--mirror-binary-security: </td><td>LH_MIRROR_BINARY_SECURITY</td></tr>
+	<tr><td>--sections: </td><td>LH_SECTIONS</td></tr>
+</table>
+
+<b>Advanced chroot options</b>
+
+<table>
+	<tr><td>--chroot-fileystem: </td><td>LH_CHROOT_FILESYSTEM</td></tr>
+	<tr><td>--linux-flavours: </td><td>LH_LINUX_FLAVOURS</td></tr>
+	<tr><td>--security: </td><td>LH_SECURITY</td></tr>
+	<tr><td>--symlinks: </td><td>LH_SYMLINKS</td></tr>
+	<tr><td>--sysvinit: </td><td>LH_SYSVINIT</td></tr>
+</table>
+
+<b>Advanced binary options</b>
+
+<table>
+	<tr><td>--binary-indices: </td><td>LH_BINARY_INDICES</td></tr>
+	<tr><td>--bootappend: </td><td>LH_BOOTAPPEND</td></tr>
+	<tr><td>--bootloader: </td><td>LH_BOOTLOADER</td></tr>
+	<tr><td>--debian-installer: </td><td>LH_DEBIAN_INSTALLER</td></tr>
+	<tr><td>--encryption: </td><td>LH_ENCRYPTION</td></tr>
+	<tr><td>--hostname: </td><td>LH_HOSTNAME</td></tr>
+	<tr><td>--iso-application: </td><td>LH_ISO_APPLICATION</td></tr>
+	<tr><td>--iso-preparer: </td><td>LH_ISO_PREPARER</td></tr>
+	<tr><td>--iso-publisher: </td><td>LH_ISO_PUBLISHER</td></tr>
+	<tr><td>--iso-volume: </td><td>LH_ISO_VOLUME</td></tr>
+	<tr><td>--memtest: </td><td>LH_MEMTEST</td></tr>
+	<tr><td>--net-path: </td><td>LH_NET_ROOT_PATH</td></tr>
+	<tr><td>--net-server: </td><td>LH_NET_ROOT_SERVER</td></tr>
+	<tr><td>--username: </td><td>username</td></tr>
+</table>
+
+<b>Advanced source options</b>
+
+<table>
+	<tr><td>--source: </td><td>LH_SOURCE</td></tr>
+	<tr><td>--source-images: </td><td>LH_SOURCE_IMAGES</td></tr>
+</table>
+
+</fieldset>
+
+<br />
+
+<h2>Thank you for your submission.</h2>
diff --git a/templates/cgi/debian-official/footer.html b/templates/cgi/debian-official/footer.html
new file mode 100644
index 0000000..880028b
--- /dev/null
+++ b/templates/cgi/debian-official/footer.html
@@ -0,0 +1,7 @@
+<div id="footer">
+	live-webhelper, version VERSION<br />
+	Debian Live Project <a href="mailto:debian-live at lists.debian.org">&lt;debian-live at lists.debian.org&gt;</a> &mdash; <a href="http://debian-live.alioth.debian.org/legal.html">Legal information</a><br />
+</div>
+
+</body>
+</html>
diff --git a/templates/cgi/debian-official/form.html b/templates/cgi/debian-official/form.html
new file mode 100644
index 0000000..b523e99
--- /dev/null
+++ b/templates/cgi/debian-official/form.html
@@ -0,0 +1,338 @@
+<br />
+
+<h2>Submit your parameters (<b>working</b> email address is required) to generate your very own Debian Live system.</h2>
+
+<br />
+<br />
+
+<form action="live-webhelper" method="get">
+
+<fieldset>
+
+<legend><b>Options</b></legend>
+
+<table>
+	<tr>
+		<td><label for="Email">Email Address:</label> </td>
+		<td><input id="Email" name="email" maxlength="50" size="50" type="text" /></td>
+	</tr>
+</table>
+
+<span id="click_1" onmouseover='javascript:objectOver(this)' onmouseout='javascript:objectOut(this)' onclick='javascript:collapse(1,"<b>Standard options</b>")'>
+	<b>Standard options</b><small>&nbsp;(click to collapse)</small>
+	<br />
+</span>
+
+<div id="text_1" style='margin-left:0;display:block'>
+	<table>
+		<tr>
+			<td><label for="Binary_Images">--binary-images:</label> </td>
+			<td>
+				<select id="Binary_Images" name="binary_images" size="1">
+					<option selected value="iso">iso</option>
+					<option value="net">net</option>
+					<option value="tar">tar</option>
+					<option value="usb-hdd">usb-hdd</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Distribution">--distribution:</label> </td>
+			<td>
+				<select id="Distribution" name="distribution" size="1">
+					<option value="etch">etch</option>
+					<option selected value="lenny">lenny</option>
+					<option value="squeeze">squeeze</option>
+					<option value="sid">sid</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Packages_Lists">--packages-lists:</label> </td>
+			<td>
+				<select id="Packages_Lists" name="packages_lists" size="1" >
+					<option value="gnome">gnome</option>
+					<option value="gnome-core">gnome-core</option>
+					<option value="gnome-desktop">gnome-desktop</option>
+					<option value="gnome-full">gnome-full</option>
+					<option value="gnome-junior">gnome-junior</option>
+					<option value="gnustep">gnustep</option>
+					<option value="kde">kde</option>
+					<option value="kde-core">kde-core</option>
+					<option value="kde-desktop">kde-desktop</option>
+					<option value="kde-extra">kde-extra</option>
+					<option value="kde-full">kde-full</option>
+					<option value="kde-junior">kde-junior</option>
+					<option value="mini">mini</option>
+					<option value="minimal">minimal</option>
+					<option value="rescue">rescue</option>
+					<option selected value="standard">standard</option>
+					<option value="standard-x11">standard-x11</option>
+					<option value="xfce">xfce</option>
+					<option value="xfce-desktop">xfce-desktop</option>
+					<option value="xfce-junior">xfce-junior</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Packages">--packages:</label> </td>
+			<td><input id="Packages" name="packages" maxlength="256" size="50" type="text" /></td>
+		</tr>
+	</table>
+</div>
+
+<span id="click_2" onmouseover='javascript:objectOver(this)' onmouseout='javascript:objectOut(this)' onclick='javascript:collapse(2,"<b>Advanced bootstrap options</b>")'>
+	<b>Advanced bootstrap options</b><small>&nbsp;(click to expand)</small>
+	<br />
+</span>
+
+<div id="text_2" style='margin-left:0;display:none'>
+	<table>
+		<tr>
+			<td><label for="Architecture">--architecture:</label> </td>
+			<td>
+				<select id="Architecture" name="architecture" size="1">
+					<option selected value="i386">i386</option>
+				</select>
+			</td>
+		</tr>
+		<!-- LIVE_DISTRIBUTION -->
+		<!-- LIVE_DISTRIBUTION_CONFIG -->
+		<tr>
+			<td><label for="Bootstrap_Flavour">--bootstrap-flavour:</label> </td>
+			<td>
+				<select id="Bootstrap_Flavour" name="bootstrap_flavour" size="1">
+					<option value="minimal">minimal</option>
+					<option selected value="standard">standard</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Mirror_Bootstrap">--mirror-bootstrap:</label> </td>
+			<td><input id="Mirror_Bootstrap" name="mirror_bootstrap" maxlength="256" size="50" type="text" value="LH_MIRROR_BOOTSTRAP" readonly /></td>
+		</tr>
+		<tr>
+			<td><label for="Mirror_Bootstrap_Security">--mirror-bootstrap-security:</label> </td>
+			<td><input id="Mirror_Bootstrap_Security" name="mirror_bootstrap_security" maxlength="256" size="50" type="text" value="LH_MIRROR_BOOTSTRAP_SECURITY" readonly /></td>
+		</tr>
+		<tr>
+			<td><label for="Mirror_Binary">--mirror-binary:</label> </td>
+			<td><input id="Mirror_Binary" name="mirror_binary" maxlength="256" size="50" type="text" value="LH_MIRROR_BINARY" readonly /></td>
+		</tr>
+		<tr>
+			<td><label for="Mirror_Binary_Security">--mirror-binary-security:</label> </td>
+			<td><input id="Mirror_Binary_Security" name="mirror_binary_security" maxlength="256" size="50" type="text" value="LH_MIRROR_BINARY_SECURITY" readonly /></td>
+		</tr>
+		<tr>
+			<td><label for="Sections">--sections:</label> </td>
+			<td><input id="Sections" name="sections" maxlength="128" size="50" type="text" value="main" readonly /></td>
+		</tr>
+	</table>
+</div>
+
+<span id="click_3" onmouseover='javascript:objectOver(this)' onmouseout='javascript:objectOut(this)' onclick='javascript:collapse(3,"<b>Advanced chroot options</b>")'>
+	<b>Advanced chroot options</b><small>&nbsp;(click to expand)</small>
+	<br />
+</span>
+
+<div id="text_3" style='margin-left:0;display:none'>
+	<table>
+		<tr>
+			<td><label for="Chroot_Filesystem">--chroot-filesystem:</label> </td>
+			<td>
+				<select id="Chroot_Filesystem" name="chroot_filesystem" size="1">
+					<option value="ext2">ext2</option>
+					<option value="plain">plain</option>
+					<option selected value="squashfs">squashfs</option>
+				</select>
+			</td>
+		</tr>
+		<!-- LIVE_HOOKS -->
+		<!-- LIVE_INTERACTIVE -->
+		<!-- LIVE_KEYRING_PACKAGES -->
+		<!-- LIVE_LANGUAGE -->
+		<tr>
+			<td><label for="Linux_Flavours">--linux-flavours:</label> </td>
+			<td>
+				<select id="Linux_Flavours" name="linux_flavours" size="1">
+					<option selected value="486">486</option>
+					<option value="686">686</option>
+					<option value="686-bigmem">686-bigmem</option>
+					<option value="amd64">amd64</option>
+					<option value="k7">k7</option>
+					<option value="vserver-686">vserver-686</option>
+					<option value="vserver-k7">vserver-k7</option>
+					<option value="xen-686">xen-686</option>
+				</select>
+			</td>
+		</tr>
+		<!-- LIVE_LINUX_PACKAGES -->
+		<!-- LIVE_PACKAGES -->
+		<!-- LIVE_PACKAGES_LISTS -->
+		<!-- LIVE_TASKS -->
+		<tr>
+			<td><label for="Security">--security:</label> </td>
+			<td>
+				<select id="Security" name="security" size="1">
+					<option selected value="enabled">enabled</option>
+					<option value="disabled">disabled</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Symlinks">--symlinks:</label> </td>
+			<td>
+				<select id="Symlinks" name="symlinks" size="1">
+					<option value="enabled">enabled</option>
+					<option selected value="disabled">disabled</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Sysvinit">--sysvinit:</label> </td>
+			<td>
+				<select id="Sysvinit" name="sysvinit" size="1">
+					<option value="enabled">enabled</option>
+					<option selected value="disabled">disabled</option>
+				</select>
+			</td>
+		</tr>
+	</table>
+</div>
+
+<span id="click_4" onmouseover='javascript:objectOver(this)' onmouseout='javascript:objectOut(this)' onclick='javascript:collapse(4,"<b>Advanced binary options</b>")'>
+	<b>Advanced binary options</b><small>&nbsp;(click to expand)</small>
+	<br />
+</span>
+
+<div id="text_4" style='margin-left:0;display:none'>
+	<table>
+		<!-- LIVE_BINARY_IMAGES -->
+		<tr>
+			<td><label for="Binary_Indices">--binary-indices:</label> </td>
+			<td>
+				<select id="Binary_Indices" name="binary_indices" size="1">
+					<option selected value="enabled">enabled</option>
+					<option value="disabled">disabled</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Bootappend">--bootappend:</label> </td>
+			<td><input id="Bootappend" name="bootappend" maxlength="256" size="50" type="text" value="" /></td>
+		</tr>
+		<tr>
+			<td><label for="Bootloader">--bootloader:</label> </td>
+			<td>
+				<select id="Bootloader" name="bootloader" size="1">
+					<option value="grub">grub</option>
+					<option selected value="syslinux">syslinux</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Debian_Installer">--debian-installer:</label> </td>
+			<td>
+				<select id="Debian_Installer" name="debian_installer" size="1">
+					<option value="enabled">enabled</option>
+					<option selected value="disabled">disabled</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Encryption">--encryption:</label> </td>
+			<td>
+				<select id="Encryption" name="encryption" size="1">
+					<option selected value="">none</option>
+					<option value="AES128">AES128</option>
+					<option value="AES192">AES192</option>
+					<option value="AES256">AES256</option>
+				</select>
+			</td>
+		</tr>
+		<!-- LIVE_GRUB_SPLASH -->
+		<tr>
+			<td><label for="Hostname">--hostname:</label> </td>
+			<td><input id="Hostname" name="hostname" maxlength="128" size="50" type="text" value="debian" /></td>
+		</tr>
+		<tr>
+			<td><label for="Iso_Application">--iso-application:</label> </td>
+			<td><input id="Iso_Application" name="iso_application" maxlength="128" size="50" type="text" value="Debian Live" /></td>
+		</tr>
+		<tr>
+			<td><label for="Iso_Preparer">--iso-preparer:</label> </td>
+			<td><input id="Iso_Preparer" name="iso_preparer" maxlength="128" size="50" type="text" value="live-helper VERSION; http://packages.qa.debian.org/live-helper" /></td>
+		</tr>
+		<tr>
+			<td><label for="Iso_Publisher">--iso-publisher:</label> </td>
+			<td><input id="Iso_Publisher" name="iso_publisher" maxlength="128" size="50" type="text" value="Debian Live project; http://debian-live.alioth.debian.org/; debian-live at lists.debian.org" /></td>
+		</tr>
+		<tr>
+			<td><label for="Iso_Volume">--iso-volume:</label> </td>
+			<td><input id="Iso_Volume" name="iso_volume" maxlength="128" size="50" type="text" value="Debian Live DATE" /></td>
+		</tr>
+		<tr>
+			<td><label for="Memtest">--memtest:</label> </td>
+			<td>
+				<select id="Memtest" name="memtest" size="1">
+					<option value="memtest86">memtest86</option>
+					<option selected value="memtest86+">memtest86+</option>
+					<option value="none">none</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Net_Path">--net-path:</label> </td>
+			<td><input id="Net_Path" name="net_path" maxlength="256" size="50" type="text" value="/srv/debian-live" /></td>
+		</tr>
+		<tr>
+			<td><label for="Net_Server">--net-server:</label> </td>
+			<td><input id="Net_Server" name="net_server" maxlength="15" size="50" type="text" value="192.168.1.1" /></td>
+		</tr>
+		<!-- LIVE_SYSLINUX_SPLASH -->
+		<tr>
+			<td><label for="Username">--username:</label> </td>
+			<td><input id="Username" name="username" maxlength="128" size="50" type="text" value="user" /></td>
+		</tr>
+	</table>
+</div>
+
+<span id="click_5" onmouseover='javascript:objectOver(this)' onmouseout='javascript:objectOut(this)' onclick='javascript:collapse(5,"<b>Advanced source options</b>")'>
+	<b>Advanced source options</b><small>&nbsp;(click to expand)</small>
+	<br />
+</span>
+
+<div id="text_5" style='margin-left:0;display:none'>
+	<table>
+		<tr>
+			<td><label for="Source">--source:</label> </td>
+			<td>
+				<select id="Source" name="source" size="1">
+					<option value="enabled">enabled</option>
+					<option selected value="disabled">disabled</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Source_Images">--source-images:</label> </td>
+			<td>
+				<select id="Source_Images" name="source_images" size="1">
+					<option value="iso">iso</option>
+					<option value="net">net</option>
+					<option selected value="tar">tar</option>
+					<option value="usb-hdd">usb-hdd</option>
+				</select>
+			</td>
+		</tr>
+	</table>
+</div>
+
+</fieldset>
+
+<br />
+
+<input type="reset" value="Reset" />
+&nbsp;
+<input type="submit" value="Submit" />
+
+</form>
diff --git a/templates/cgi/debian-official/header.html b/templates/cgi/debian-official/header.html
new file mode 100644
index 0000000..d52efa6
--- /dev/null
+++ b/templates/cgi/debian-official/header.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+	<head>
+		<title>Debian Live Webhelper</title>
+		<link rel="icon" href="http://debian-live.alioth.debian.org/favicon.ico" type="image/ico">
+		<link rel="stylesheet" type="text/css" href="http://debian-live.alioth.debian.org/images/style.css" />
+		<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
+		<meta name="keywords" content="Debian, Live, Project">
+		<meta name="description" content="The Debian Live Project">
+
+		<style type="text/css">
+			label { cursor:pointer; }
+		</style>
+
+		<script type="text/javascript" language="JavaScript">
+			function collapse(x, txt)
+			{
+				var oTemp=document.getElementById("text_"+x);
+				var oClick=document.getElementById("click_"+x);
+				if (oTemp.style.display=="block")
+				{
+					oTemp.style.display="none";
+					oClick.innerHTML=txt+"&nbsp<small>(click to expand)<\/small><br \/>";
+				}
+				else
+				{
+					oTemp.style.display="block";
+					oClick.innerHTML=txt+"&nbsp<small>(click to collapse)<\/small><br \/>";
+				}
+			}
+		</script>
+	</head>
+<body>
+
+<div id="header">
+	<div id="debianlogo"><img src="http://debian-live.alioth.debian.org/images/debian.png" alt="Debian logo" width="56" height="70"></div>
+	<div id="headertitle"><a href="http://debian-live.alioth.debian.org/" title="http://debian-live.alioth.debian.org/">Debian Live</a></div>
+	<div id="headersubtitle">Live Debian systems!</div>
+</div>
+
+<div id="maincontent" style="margin: 0 0 0 0;">
+	<h1>This is webhelper of the <a href="http://debian-live.alioth.debian.org/">Debian Live</a> project.</h1>
+</div>
diff --git a/templates/cgi/debian-official/mail.txt b/templates/cgi/debian-official/mail.txt
new file mode 100644
index 0000000..f0e8222
--- /dev/null
+++ b/templates/cgi/debian-official/mail.txt
@@ -0,0 +1,16 @@
+Subject: Debian Live Webhelper - Build BUILD
+From: Debian Live Webhelper <debian-live at lists.debian.org>
+To: EMAIL
+
+Hi,
+
+This is webhelper of the Debian Live project <http://debian-live.alioth.debian.org/>.
+
+Your build BUILD was started DATE_START and ended DATE_END with status 'STATUS'.
+
+You can see the log file and download the images from <SERVER/BUILD/>.
+
+Note that builds are removed after 24 hours.
+
+Have fun,
+The Debian Live Team
diff --git a/templates/cgi/debian-unofficial/build.html b/templates/cgi/debian-unofficial/build.html
new file mode 100644
index 0000000..19bc255
--- /dev/null
+++ b/templates/cgi/debian-unofficial/build.html
@@ -0,0 +1,85 @@
+<br />
+
+<h2>Your build 'BUILD' was recorded and will processed soon. Depending on the options you have selected, the build takes about between 5 and 20 minutes. You will be notified by email when the attempt has completed.</h2>
+
+<br />
+
+<h3>Your build will be available at: <a href="SERVER/BUILD/">SERVER/BUILD/</a>.</h3>
+
+<br />
+<br />
+
+<fieldset>
+
+<legend><b>Options</b></legend>
+
+<b>Standard options</b>
+
+<table>
+	<tr><td>Email: </td><td>EMAIL</td></tr>
+	<tr><td>--binary-image: </td><td>LH_BINARY_IMAGES</td></tr>
+	<tr><td>--distribution: </td><td>LH_DISTRIBUTION</td></tr>
+	<tr><td>--packages-lists: </td><td>LH_PACKAGES_LISTS</td></tr>
+	<tr><td>--packages: </td><td>LH_PACKAGES</td><tr>
+</table>
+
+<b>Advanced bootstrap options</b>
+
+<table>
+	<tr><td>--architecture: </td><td>LH_ARCHITECTURE</td></tr>
+	<tr><td>--bootstrap-flavour: </td><td>LH_BOOTSTRAP_FLAVOUR</td></tr>
+	<tr><td>--mirror-bootstrap: </td><td>LH_MIRROR_BOOTSTRAP</td></tr>
+	<tr><td>--mirror-bootstrap-security: </td><td>LH_MIRROR_BOOTSTRAP_SECURITY</td></tr>
+	<tr><td>--mirror-binary: </td><td>LH_MIRROR_BINARY</td></tr>
+	<tr><td>--mirror-binary-security: </td><td>LH_MIRROR_BINARY_SECURITY</td></tr>
+	<tr><td>--sections: </td><td>LH_SECTIONS</td></tr>
+</table>
+
+<b>Advanced chroot options</b>
+
+<table>
+	<tr><td>--chroot-fileystem: </td><td>LH_CHROOT_FILESYSTEM</td></tr>
+	<tr><td>--linux-flavours: </td><td>LH_LINUX_FLAVOURS</td></tr>
+	<tr><td>--security: </td><td>LH_SECURITY</td></tr>
+	<tr><td>--symlinks: </td><td>LH_SYMLINKS</td></tr>
+	<tr><td>--sysvinit: </td><td>LH_SYSVINIT</td></tr>
+</table>
+
+<b>Advanced binary options</b>
+
+<table>
+	<tr><td>--binary-indices: </td><td>LH_BINARY_INDICES</td></tr>
+	<tr><td>--bootappend: </td><td>LH_BOOTAPPEND</td></tr>
+	<tr><td>--bootloader: </td><td>LH_BOOTLOADER</td></tr>
+	<tr><td>--debian-installer: </td><td>LH_DEBIAN_INSTALLER</td></tr>
+	<tr><td>--encryption: </td><td>LH_ENCRYPTION</td></tr>
+	<tr><td>--hostname: </td><td>LH_HOSTNAME</td></tr>
+	<tr><td>--iso-application: </td><td>LH_ISO_APPLICATION</td></tr>
+	<tr><td>--iso-preparer: </td><td>LH_ISO_PREPARER</td></tr>
+	<tr><td>--iso-publisher: </td><td>LH_ISO_PUBLISHER</td></tr>
+	<tr><td>--iso-volume: </td><td>LH_ISO_VOLUME</td></tr>
+	<tr><td>--memtest: </td><td>LH_MEMTEST</td></tr>
+	<tr><td>--net-path: </td><td>LH_NET_ROOT_PATH</td></tr>
+	<tr><td>--net-server: </td><td>LH_NET_ROOT_SERVER</td></tr>
+	<tr><td>--username: </td><td>username</td></tr>
+</table>
+
+<b>Advanced source options</b>
+
+<table>
+	<tr><td>--source: </td><td>LH_SOURCE</td></tr>
+	<tr><td>--source-images: </td><td>LH_SOURCE_IMAGES</td></tr>
+</table>
+
+<b>Unofficial options</b>
+
+<table>
+	<tr><td>custom.bootstrap: </td><td>CUSTOM_BOOTSTRAP</td></tr>
+	<tr><td>custom.binary: </td><td>CUSTOM_BINARY</td></tr>
+</table>
+
+</fieldset>
+
+<br />
+
+<h2>Thank you for your submission.</h2>
diff --git a/templates/cgi/debian-unofficial/footer.html b/templates/cgi/debian-unofficial/footer.html
new file mode 100644
index 0000000..880028b
--- /dev/null
+++ b/templates/cgi/debian-unofficial/footer.html
@@ -0,0 +1,7 @@
+<div id="footer">
+	live-webhelper, version VERSION<br />
+	Debian Live Project <a href="mailto:debian-live at lists.debian.org">&lt;debian-live at lists.debian.org&gt;</a> &mdash; <a href="http://debian-live.alioth.debian.org/legal.html">Legal information</a><br />
+</div>
+
+</body>
+</html>
diff --git a/templates/cgi/debian-unofficial/form.html b/templates/cgi/debian-unofficial/form.html
new file mode 100644
index 0000000..ffd6db6
--- /dev/null
+++ b/templates/cgi/debian-unofficial/form.html
@@ -0,0 +1,359 @@
+<br />
+
+<h2>Submit your parameters (<b>working</b> email address is required) to generate your very own Debian Live system.</h2>
+
+<br />
+<br />
+
+<form action="live-webhelper" method="get">
+
+<fieldset>
+
+<legend><b>Options</b></legend>
+
+<table>
+	<tr>
+		<td><label for="Email">Email Address:</label> </td>
+		<td><input id="Email" name="email" maxlength="50" size="50" type="text" /></td>
+	</tr>
+</table>
+
+<span id="click_1" onmouseover='javascript:objectOver(this)' onmouseout='javascript:objectOut(this)' onclick='javascript:collapse(1,"<b>Standard options</b>")'>
+	<b>Standard options</b><small>&nbsp;(click to collapse)</small>
+	<br />
+</span>
+
+<div id="text_1" style='margin-left:0;display:block'>
+	<table>
+		<tr>
+			<td><label for="Binary_Images">--binary-images:</label> </td>
+			<td>
+				<select id="Binary_Images" name="binary_images" size="1">
+					<option selected value="iso">iso</option>
+					<option value="net">net</option>
+					<option value="tar">tar</option>
+					<option value="usb-hdd">usb-hdd</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Distribution">--distribution:</label> </td>
+			<td>
+				<select id="Distribution" name="distribution" size="1">
+					<option value="etch">etch</option>
+					<option selected value="lenny">lenny</option>
+					<option value="squeeze">squeeze</option>
+					<option value="sid">sid</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Packages_Lists">--packages-lists:</label> </td>
+			<td>
+				<select id="Packages_Lists" name="packages_lists" size="1" >
+					<option value="gnome">gnome</option>
+					<option value="gnome-core">gnome-core</option>
+					<option value="gnome-desktop">gnome-desktop</option>
+					<option value="gnome-full">gnome-full</option>
+					<option value="gnome-junior">gnome-junior</option>
+					<option value="gnustep">gnustep</option>
+					<option value="kde">kde</option>
+					<option value="kde-core">kde-core</option>
+					<option value="kde-desktop">kde-desktop</option>
+					<option value="kde-extra">kde-extra</option>
+					<option value="kde-full">kde-full</option>
+					<option value="kde-junior">kde-junior</option>
+					<option value="mini">mini</option>
+					<option value="minimal">minimal</option>
+					<option value="rescue">rescue</option>
+					<option selected value="standard">standard</option>
+					<option value="standard-x11">standard-x11</option>
+					<option value="xfce">xfce</option>
+					<option value="xfce-desktop">xfce-desktop</option>
+					<option value="xfce-junior">xfce-junior</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Packages">--packages:</label> </td>
+			<td><input id="Packages" name="packages" maxlength="256" size="50" type="text" /></td>
+		</tr>
+	</table>
+</div>
+
+<span id="click_2" onmouseover='javascript:objectOver(this)' onmouseout='javascript:objectOut(this)' onclick='javascript:collapse(2,"<b>Advanced bootstrap options</b>")'>
+	<b>Advanced bootstrap options</b><small>&nbsp;(click to expand)</small>
+	<br />
+</span>
+
+<div id="text_2" style='margin-left:0;display:none'>
+	<table>
+		<tr>
+			<td><label for="Architecture">--architecture:</label> </td>
+			<td>
+				<select id="Architecture" name="architecture" size="1">
+					<option selected value="i386">i386</option>
+				</select>
+			</td>
+		</tr>
+		<!-- LIVE_DISTRIBUTION -->
+		<!-- LIVE_DISTRIBUTION_CONFIG -->
+		<tr>
+			<td><label for="Bootstrap_Flavour">--bootstrap-flavour:</label> </td>
+			<td>
+				<select id="Bootstrap_Flavour" name="bootstrap_flavour" size="1">
+					<option value="minimal">minimal</option>
+					<option selected value="standard">standard</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Mirror_Bootstrap">--mirror-bootstrap:</label> </td>
+			<td><input id="Mirror_Bootstrap" name="mirror_bootstrap" maxlength="256" size="50" type="text" value="LH_MIRROR_BOOTSTRAP" readonly /></td>
+		</tr>
+		<tr>
+			<td><label for="Mirror_Bootstrap_Security">--mirror-bootstrap-security:</label> </td>
+			<td><input id="Mirror_Bootstrap_Security" name="mirror_bootstrap_security" maxlength="256" size="50" type="text" value="LH_MIRROR_BOOTSTRAP_SECURITY" readonly /></td>
+		</tr>
+		<tr>
+			<td><label for="Mirror_Binary">--mirror-binary:</label> </td>
+			<td><input id="Mirror_Binary" name="mirror_binary" maxlength="256" size="50" type="text" value="LH_MIRROR_BINARY" readonly /></td>
+		</tr>
+		<tr>
+			<td><label for="Mirror_Binary_Security">--mirror-binary-security:</label> </td>
+			<td><input id="Mirror_Binary_Security" name="mirror_binary_security" maxlength="256" size="50" type="text" value="LH_MIRROR_BINARY_SECURITY" readonly /></td>
+		</tr>
+		<tr>
+			<td><label for="Sections">--sections:</label> </td>
+			<td><input id="Sections" name="sections" maxlength="128" size="50" type="text" value="main" readonly /></td>
+		</tr>
+	</table>
+</div>
+
+<span id="click_3" onmouseover='javascript:objectOver(this)' onmouseout='javascript:objectOut(this)' onclick='javascript:collapse(3,"<b>Advanced chroot options</b>")'>
+	<b>Advanced chroot options</b><small>&nbsp;(click to expand)</small>
+	<br />
+</span>
+
+<div id="text_3" style='margin-left:0;display:none'>
+	<table>
+		<tr>
+			<td><label for="Chroot_Filesystem">--chroot-filesystem:</label> </td>
+			<td>
+				<select id="Chroot_Filesystem" name="chroot_filesystem" size="1">
+					<option value="ext2">ext2</option>
+					<option value="plain">plain</option>
+					<option selected value="squashfs">squashfs</option>
+				</select>
+			</td>
+		</tr>
+		<!-- LIVE_HOOKS -->
+		<!-- LIVE_INTERACTIVE -->
+		<!-- LIVE_KEYRING_PACKAGES -->
+		<!-- LIVE_LANGUAGE -->
+		<tr>
+			<td><label for="Linux_Flavours">--linux-flavours:</label> </td>
+			<td>
+				<select id="Linux_Flavours" name="linux_flavours" size="1">
+					<option selected value="486">486</option>
+					<option value="686">686</option>
+					<option value="686-bigmem">686-bigmem</option>
+					<option value="amd64">amd64</option>
+					<option value="k7">k7</option>
+					<option value="vserver-686">vserver-686</option>
+					<option value="vserver-k7">vserver-k7</option>
+					<option value="xen-686">xen-686</option>
+				</select>
+			</td>
+		</tr>
+		<!-- LIVE_LINUX_PACKAGES -->
+		<!-- LIVE_PACKAGES -->
+		<!-- LIVE_PACKAGES_LISTS -->
+		<!-- LIVE_TASKS -->
+		<tr>
+			<td><label for="Security">--security:</label> </td>
+			<td>
+				<select id="Security" name="security" size="1">
+					<option selected value="enabled">enabled</option>
+					<option value="disabled">disabled</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Symlinks">--symlinks:</label> </td>
+			<td>
+				<select id="Symlinks" name="symlinks" size="1">
+					<option value="enabled">enabled</option>
+					<option selected value="disabled">disabled</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Sysvinit">--sysvinit:</label> </td>
+			<td>
+				<select id="Sysvinit" name="sysvinit" size="1">
+					<option value="enabled">enabled</option>
+					<option selected value="disabled">disabled</option>
+				</select>
+			</td>
+		</tr>
+	</table>
+</div>
+
+<span id="click_4" onmouseover='javascript:objectOver(this)' onmouseout='javascript:objectOut(this)' onclick='javascript:collapse(4,"<b>Advanced binary options</b>")'>
+	<b>Advanced binary options</b><small>&nbsp;(click to expand)</small>
+	<br />
+</span>
+
+<div id="text_4" style='margin-left:0;display:none'>
+	<table>
+		<!-- LIVE_BINARY_IMAGES -->
+		<tr>
+			<td><label for="Binary_Indices">--binary-indices:</label> </td>
+			<td>
+				<select id="Binary_Indices" name="binary_indices" size="1">
+					<option selected value="enabled">enabled</option>
+					<option value="disabled">disabled</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Bootappend">--bootappend:</label> </td>
+			<td><input id="Bootappend" name="bootappend" maxlength="256" size="50" type="text" value="" /></td>
+		</tr>
+		<tr>
+			<td><label for="Bootloader">--bootloader:</label> </td>
+			<td>
+				<select id="Bootloader" name="bootloader" size="1">
+					<option value="grub">grub</option>
+					<option selected value="syslinux">syslinux</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Debian_Installer">--debian-installer:</label> </td>
+			<td>
+				<select id="Debian_Installer" name="debian_installer" size="1">
+					<option value="enabled">enabled</option>
+					<option selected value="disabled">disabled</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Encryption">--encryption:</label> </td>
+			<td>
+				<select id="Encryption" name="encryption" size="1">
+					<option selected value="">none</option>
+					<option value="AES128">AES128</option>
+					<option value="AES192">AES192</option>
+					<option value="AES256">AES256</option>
+				</select>
+			</td>
+		</tr>
+		<!-- LIVE_GRUB_SPLASH -->
+		<tr>
+			<td><label for="Hostname">--hostname:</label> </td>
+			<td><input id="Hostname" name="hostname" maxlength="128" size="50" type="text" value="debian" /></td>
+		</tr>
+		<tr>
+			<td><label for="Iso_Application">--iso-application:</label> </td>
+			<td><input id="Iso_Application" name="iso_application" maxlength="128" size="50" type="text" value="Debian Live" /></td>
+		</tr>
+		<tr>
+			<td><label for="Iso_Preparer">--iso-preparer:</label> </td>
+			<td><input id="Iso_Preparer" name="iso_preparer" maxlength="128" size="50" type="text" value="live-helper VERSION; http://packages.qa.debian.org/live-helper" /></td>
+		</tr>
+		<tr>
+			<td><label for="Iso_Publisher">--iso-publisher:</label> </td>
+			<td><input id="Iso_Publisher" name="iso_publisher" maxlength="128" size="50" type="text" value="Debian Live project; http://debian-live.alioth.debian.org/; debian-live at lists.debian.org" /></td>
+		</tr>
+		<tr>
+			<td><label for="Iso_Volume">--iso-volume:</label> </td>
+			<td><input id="Iso_Volume" name="iso_volume" maxlength="128" size="50" type="text" value="Debian Live DATE" /></td>
+		</tr>
+		<tr>
+			<td><label for="Memtest">--memtest:</label> </td>
+			<td>
+				<select id="Memtest" name="memtest" size="1">
+					<option value="memtest86">memtest86</option>
+					<option selected value="memtest86+">memtest86+</option>
+					<option value="none">none</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Net_Path">--net-path:</label> </td>
+			<td><input id="Net_Path" name="net_path" maxlength="256" size="50" type="text" value="/srv/debian-live" /></td>
+		</tr>
+		<tr>
+			<td><label for="Net_Server">--net-server:</label> </td>
+			<td><input id="Net_Server" name="net_server" maxlength="15" size="50" type="text" value="192.168.1.1" /></td>
+		</tr>
+		<!-- LIVE_SYSLINUX_SPLASH -->
+		<tr>
+			<td><label for="Username">--username:</label> </td>
+			<td><input id="Username" name="username" maxlength="128" size="50" type="text" value="user" /></td>
+		</tr>
+	</table>
+</div>
+
+<span id="click_5" onmouseover='javascript:objectOver(this)' onmouseout='javascript:objectOut(this)' onclick='javascript:collapse(5,"<b>Advanced source options</b>")'>
+	<b>Advanced source options</b><small>&nbsp;(click to expand)</small>
+	<br />
+</span>
+
+<div id="text_5" style='margin-left:0;display:none'>
+	<table>
+		<tr>
+			<td><label for="Source">--source:</label> </td>
+			<td>
+				<select id="Source" name="source" size="1">
+					<option value="enabled">enabled</option>
+					<option selected value="disabled">disabled</option>
+				</select>
+			</td>
+		</tr>
+		<tr>
+			<td><label for="Source_Images">--source-images:</label> </td>
+			<td>
+				<select id="Source_Images" name="source_images" size="1">
+					<option value="iso">iso</option>
+					<option value="net">net</option>
+					<option selected value="tar">tar</option>
+					<option value="usb-hdd">usb-hdd</option>
+				</select>
+			</td>
+		</tr>
+	</table>
+</div>
+
+<span id="click_6" onmouseover='javascript:objectOver(this)' onmouseout='javascript:objectOut(this)' onclick='javascript:collapse(6,"<b>Unofficial options</b>")'>
+	<b>Unofficial options</b><small>&nbsp;(click to expand)</small>
+	<br />
+</span>
+
+<div id="text_6" style='margin-left:0;display:none'>
+	<li> With custom.bootstrap the repository will be available at build time, so you just have to list the packages you want in packages. See "Standard options" above.</li>
+	<li> With custom.binary the repository will be added to your live-system's /etc/apt/sources.list .</li>
+	<li> Example custom.{bootstrap,binary}: deb http://live.debian.net/debian/ etch main</li>
+	<table>
+		<tr>
+			<td><label for="Custom_Bootstrap">custom.bootstrap:</label> </td>
+			<td><input id="Custom_Bootstrap" name="custom_bootstrap" maxlength="128" size="50" type="text" /></td>
+		</tr>
+		<tr>
+			<td><label for="Custom_Binary">custom.binary:</label> </td>
+			<td><input id="Custom_Binary" name="custom_binary" maxlength="128" size="50" type="text" /></td>
+		</tr>
+	</table>
+</div>
+
+</fieldset>
+
+<br />
+
+<input type="reset" value="Reset" />
+&nbsp;
+<input type="submit" value="Submit" />
+
+</form>
diff --git a/templates/cgi/debian-unofficial/header.html b/templates/cgi/debian-unofficial/header.html
new file mode 100644
index 0000000..d52efa6
--- /dev/null
+++ b/templates/cgi/debian-unofficial/header.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+	<head>
+		<title>Debian Live Webhelper</title>
+		<link rel="icon" href="http://debian-live.alioth.debian.org/favicon.ico" type="image/ico">
+		<link rel="stylesheet" type="text/css" href="http://debian-live.alioth.debian.org/images/style.css" />
+		<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
+		<meta name="keywords" content="Debian, Live, Project">
+		<meta name="description" content="The Debian Live Project">
+
+		<style type="text/css">
+			label { cursor:pointer; }
+		</style>
+
+		<script type="text/javascript" language="JavaScript">
+			function collapse(x, txt)
+			{
+				var oTemp=document.getElementById("text_"+x);
+				var oClick=document.getElementById("click_"+x);
+				if (oTemp.style.display=="block")
+				{
+					oTemp.style.display="none";
+					oClick.innerHTML=txt+"&nbsp<small>(click to expand)<\/small><br \/>";
+				}
+				else
+				{
+					oTemp.style.display="block";
+					oClick.innerHTML=txt+"&nbsp<small>(click to collapse)<\/small><br \/>";
+				}
+			}
+		</script>
+	</head>
+<body>
+
+<div id="header">
+	<div id="debianlogo"><img src="http://debian-live.alioth.debian.org/images/debian.png" alt="Debian logo" width="56" height="70"></div>
+	<div id="headertitle"><a href="http://debian-live.alioth.debian.org/" title="http://debian-live.alioth.debian.org/">Debian Live</a></div>
+	<div id="headersubtitle">Live Debian systems!</div>
+</div>
+
+<div id="maincontent" style="margin: 0 0 0 0;">
+	<h1>This is webhelper of the <a href="http://debian-live.alioth.debian.org/">Debian Live</a> project.</h1>
+</div>
diff --git a/templates/cgi/debian-unofficial/mail.txt b/templates/cgi/debian-unofficial/mail.txt
new file mode 100644
index 0000000..f0e8222
--- /dev/null
+++ b/templates/cgi/debian-unofficial/mail.txt
@@ -0,0 +1,16 @@
+Subject: Debian Live Webhelper - Build BUILD
+From: Debian Live Webhelper <debian-live at lists.debian.org>
+To: EMAIL
+
+Hi,
+
+This is webhelper of the Debian Live project <http://debian-live.alioth.debian.org/>.
+
+Your build BUILD was started DATE_START and ended DATE_END with status 'STATUS'.
+
+You can see the log file and download the images from <SERVER/BUILD/>.
+
+Note that builds are removed after 24 hours.
+
+Have fun,
+The Debian Live Team

-- 
live-helper



More information about the debian-live-changes mailing list