[Debian-live-changes] r1950 - dists/sid dists/sid/live-webhelper/debian dists/sid/live-webhelper/manpages dists/sid/live-webhelper/scripts releases/live-webhelper releases/live-webhelper/1.0~a13-1/debian releases/live-webhelper/1.0~a13-1/manpages releases/live-webhelper/1.0~a13-1/scripts

daniel at alioth.debian.org daniel at alioth.debian.org
Sun Jun 3 13:37:15 UTC 2007


Author: daniel
Date: 2007-06-03 13:37:15 +0000 (Sun, 03 Jun 2007)
New Revision: 1950

Added:
   dists/sid/live-webhelper/
   dists/sid/live-webhelper/debian/changelog
   dists/sid/live-webhelper/manpages/live-webhelper.en.7
   dists/sid/live-webhelper/scripts/cgi
   dists/sid/live-webhelper/scripts/cron
   releases/live-webhelper/1.0~a13-1/
   releases/live-webhelper/1.0~a13-1/debian/changelog
   releases/live-webhelper/1.0~a13-1/manpages/live-webhelper.en.7
   releases/live-webhelper/1.0~a13-1/scripts/cgi
   releases/live-webhelper/1.0~a13-1/scripts/cron
Removed:
   dists/sid/live-webhelper/debian/changelog
   dists/sid/live-webhelper/manpages/live-webhelper.en.7
   dists/sid/live-webhelper/scripts/cgi
   dists/sid/live-webhelper/scripts/cron
   releases/live-webhelper/1.0~a13-1/debian/changelog
   releases/live-webhelper/1.0~a13-1/manpages/live-webhelper.en.7
   releases/live-webhelper/1.0~a13-1/scripts/cgi
   releases/live-webhelper/1.0~a13-1/scripts/cron
Log:


Copied: dists/sid/live-webhelper (from rev 1915, dists/trunk/live-webhelper)

Deleted: dists/sid/live-webhelper/debian/changelog
===================================================================
--- dists/trunk/live-webhelper/debian/changelog	2007-06-02 04:06:58 UTC (rev 1915)
+++ dists/sid/live-webhelper/debian/changelog	2007-06-03 13:37:15 UTC (rev 1950)
@@ -1,5 +0,0 @@
-live-webhelper (1.0~a13-1) UNRELEASED; urgency=low
-
-  * Initial release.
-
- -- Daniel Baumann <daniel at debian.org>  Mon,  4 Jun 2007 00:00:00 +0200

Copied: dists/sid/live-webhelper/debian/changelog (from rev 1948, dists/trunk/live-webhelper/debian/changelog)
===================================================================
--- dists/sid/live-webhelper/debian/changelog	                        (rev 0)
+++ dists/sid/live-webhelper/debian/changelog	2007-06-03 13:37:15 UTC (rev 1950)
@@ -0,0 +1,5 @@
+live-webhelper (1.0~a13-1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Daniel Baumann <daniel at debian.org>  Mon,  4 Jun 2007 00:00:00 +0200

Deleted: dists/sid/live-webhelper/manpages/live-webhelper.en.7
===================================================================
--- dists/trunk/live-webhelper/manpages/live-webhelper.en.7	2007-06-02 04:06:58 UTC (rev 1915)
+++ dists/sid/live-webhelper/manpages/live-webhelper.en.7	2007-06-03 13:37:15 UTC (rev 1950)
@@ -1,30 +0,0 @@
-.TH LIVE\-WEBHELPER 7 "2007\-06\-04" "1.0~a13" "live\-webhelper"
-
-.SH NAME
-live\-webhelper \- Debian Live helper programs (web frontend)
-
-.SH DESCRIPTION
-Live\-helper is a collection of programs that can be used to build Debian Live system images. The philosophy behind live\-helper is to provide a collection of small, simple, and easily understood tools that can be used in your own program to automate building of a Live system.
-.PP
-A typical program that uses live\-helper will call several live\-helper commands in sequence. Live\-helper commands are all named with a "lh_" prefix. Examples of such a program that uses live\-helper is \fImake\-live\fR(1).
-.PP
-This package contains the web frontend.
-
-.SH FILES
-.B /usr/share/live-webhelper/templates
-
-.SH SEE ALSO
-\fIlive\-helper\fR(7)
-.PP
-\fIlive\-initramfs\fR(7)
-.PP
-\fIlive\-sysvinit\fR(7)
-
-.SH BUGS
-Report bugs against live\-initramfs <\fIhttp://packages.qa.debian.org/live\-initramfs/\fR>.
-
-.SH HOMEPAGE
-More information about the Debian Live project can be found at <\fIhttp://debian\-live.alioth.debian.org/\fR> and <\fIhttp://wiki.debian.org/DebianLive/\fR>.
-
-.SH AUTHORS
-live\-helper was written by Richard Nelson <\fIrjent at rjent.pair.com\fR> and Daniel Baumann <\fIdaniel at debian.org\fR> for the Debian project.

Copied: dists/sid/live-webhelper/manpages/live-webhelper.en.7 (from rev 1948, dists/trunk/live-webhelper/manpages/live-webhelper.en.7)
===================================================================
--- dists/sid/live-webhelper/manpages/live-webhelper.en.7	                        (rev 0)
+++ dists/sid/live-webhelper/manpages/live-webhelper.en.7	2007-06-03 13:37:15 UTC (rev 1950)
@@ -0,0 +1,30 @@
+.TH LIVE\-WEBHELPER 7 "2007\-06\-04" "1.0~a13" "live\-webhelper"
+
+.SH NAME
+live\-webhelper \- Debian Live helper programs (web frontend)
+
+.SH DESCRIPTION
+Live\-helper is a collection of programs that can be used to build Debian Live system images. The philosophy behind live\-helper is to provide a collection of small, simple, and easily understood tools that can be used in your own program to automate building of a Live system.
+.PP
+A typical program that uses live\-helper will call several live\-helper commands in sequence. Live\-helper commands are all named with a "lh_" prefix. Examples of such a program that uses live\-helper is \fImake\-live\fR(1).
+.PP
+This package contains the web frontend.
+
+.SH FILES
+.B /usr/share/live-webhelper/templates
+
+.SH SEE ALSO
+\fIlive\-helper\fR(7)
+.PP
+\fIlive\-initramfs\fR(7)
+.PP
+\fIlive\-sysvinit\fR(7)
+
+.SH BUGS
+Report bugs against live\-initramfs <\fIhttp://packages.qa.debian.org/live\-initramfs/\fR>.
+
+.SH HOMEPAGE
+More information about the Debian Live project can be found at <\fIhttp://debian\-live.alioth.debian.org/\fR> and <\fIhttp://wiki.debian.org/DebianLive/\fR>.
+
+.SH AUTHORS
+live\-webhelper was written by Richard Nelson <\fIrjent at rjent.pair.com\fR> and Daniel Baumann <\fIdaniel at debian.org\fR> for the Debian project.

Deleted: dists/sid/live-webhelper/scripts/cgi
===================================================================
--- dists/trunk/live-webhelper/scripts/cgi	2007-06-02 04:06:58 UTC (rev 1915)
+++ dists/sid/live-webhelper/scripts/cgi	2007-06-03 13:37:15 UTC (rev 1950)
@@ -1,205 +0,0 @@
-#!/bin/sh
-
-# live-webhelper - web interface to live-helper
-# Copyright (C) 2007 Richard Nelson <rjent at rjent.pair.com>
-# Copyright (C) 2007 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 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#MIRROR_BOOTSTRAP_SECURITY#${MIRROR_BOOTSTRAP_SECURITY}#" \
-	    -e "s#MIRROR_BOOTSTRAP#${MIRROR_BOOTSTRAP}#" \
-	    -e "s#MIRROR_BINARY_SECURITY#${MIRROR_BINARY_SECURITY}#" \
-	    -e "s#MIRROR_BINARY#${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/%2F/\//g"
-
-	# Filtering url parameters
-	EMAIL="`echo ${QUERY_STRING} | grep -oE '(^|[?&])email=[0-9,a-z,A-Z,.,%,-]+' | sed 's/%40/@/g' | cut -f 2 -d '=' | head -n1`"
-
-	# Standard options
-	BINARY_IMAGES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])binary_images=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	DISTRIBUTION="`echo ${QUERY_STRING} | grep -oE '(^|[?&])distribution=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	PACKAGES_LISTS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])packages_lists=[a-z,-]+' | cut -f 2 -d '=' | head -n1`"
-	PACKAGES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])packages=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
-
-	# Advanced bootstrap options
-	ARCHITECTURE="`echo ${QUERY_STRING} | grep -oE '(^|[?&])architecture=[0-9,a-z]+' | cut -f 2 -d '=' | head -n1`"
-	BOOTSTRAP_FLAVOUR="`echo ${QUERY_STRING} | grep -oE '(^|[?&])bootstrap_flavour=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	#MIRROR_BOOTSTRAP
-	#MIRROR_BOOTSTRAP_SECURITY
-	#MIRROR_BINARY
-	#MIRROR_BINARY_SECURITY
-	SECTIONS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])sections=[a-z]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
-
-	# Advanced chroot options
-	CHROOT_FILESYSTEM="`echo ${QUERY_STRING} | grep -oE '(^|[?&])chroot_filesystem=[0-9,a-z]+' | cut -f 2 -d '=' | head -n1`"
-	LINUX_FLAVOURS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])linux_flavours=[0-9,a-z,-,]+' | cut -f 2 -d '=' | head -n1`"
-	SECURITY="`echo ${QUERY_STRING} | grep -oE '(^|[?&])security=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	SYMLINKS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])symlinks=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	SYSVINIT="`echo ${QUERY_STRING} | grep -oE '(^|[?&])sysvinit=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-
-	# Advanced binary options
-	BINARY_INDICES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])binary_indices=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	BOOTAPPEND="`echo ${QUERY_STRING} | grep -oE '(^|[?&])bootappend=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
-	BOOTLOADER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])bootloader=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	DEBIAN_INSTALLER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])debian_installer=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	ENCRYPTION="`echo ${QUERY_STRING} | grep -oE '(^|[?&])encryption=[0-9,a-z,A-Z]+' | cut -f 2 -d '=' | head -n1`"
-	HOSTNAME="`echo ${QUERY_STRING} | grep -oE '(^|[?&])hostname=[0-9,a-z,A-Z,.,-]+' | cut -f 2 -d '=' | head -n1`"
-	ISO_APPLICATION="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_application=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
-	ISO_PREPARER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_preparer=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
-	ISO_PUBLISHER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_publisher=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
-	ISO_VOLUME="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_volume=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
-	MEMTEST="`echo ${QUERY_STRING} | grep -oE '(^|[?&])memtest=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
-	NET_PATH="`echo ${QUERY_STRING} | grep -oE '(^|[?&])net_path=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
-	NET_SERVER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])net_server=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
-	USERNAME="`echo ${QUERY_STRING} | grep -oE '(^|[?&])username=[0-9,a-z,A-Z,.,-]+' | cut -f 2 -d '=' | head -n1`"
-
-	# Advanced source options
-	SOURCE="`echo ${QUERY_STRING} | grep -oE '(^|[?&])source=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	SOURCE_IMAGES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])source_images=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-
-	# FIXME: filter invalid options
-	unset QUERY_STRING
-
-	# Getting build identifier
-	BUILD="`date +%Y%m%d.%H%M%S.%N`"
-
-	# Sending html confirmation
-	sed -e "s/BUILD/${BUILD}/" \
-	    -e "s/EMAIL/${EMAIL}/" \
-	    -e "s/BINARY_IMAGES/${BINARY_IMAGES}/" \
-	    -e "s/DISTRIBUTION/${DISTRIBUTION}/" \
-	    -e "s/PACKAGES_LISTS/${PACKAGES_LISTS}/" \
-	    -e "s/PACKAGES/${PACKAGES}/" \
-	    -e "s/ARCHITECTURE/${ARCHITECTURE}/" \
-	    -e "s/BOOTSTRAP_FLAVOUR/${BOOTSTRAP_FLAVOUR}/" \
-	    -e "s#MIRROR_BOOTSTRAP_SECURITY#${MIRROR_BOOTSTRAP}#" \
-	    -e "s#MIRROR_BOOTSTRAP#${MIRROR_BOOTSTRAP}#" \
-	    -e "s#MIRROR_BINARY_SECURITY#${MIRROR_BINARY_SECURITY}#" \
-	    -e "s#MIRROR_BINARY#${MIRROR_BINARY}#" \
-	    -e "s/SECTIONS/${SECTIONS}/" \
-	    -e "s/CHROOT_FILESYSTEM/${CHROOT_FILESYSTEM}/" \
-	    -e "s/LINUX_FLAVOURS/${LINUX_FLAVOURS}/" \
-	    -e "s/SECURITY/${SECURITY}/" \
-	    -e "s/SYMLINKS/${SYMLINKS}/" \
-	    -e "s/SYSVINIT/${SYSVINIT}/" \
-	    -e "s/BINARY_INDICES/${BINARY_INDICES}/" \
-	    -e "s/BOOTAPPEND/${BOOTAPPEND}/" \
-	    -e "s/BOOTLOADER/${BOOTLOADER}/" \
-	    -e "s/DEBIAN_INSTALLER/${DEBIAN_INSTALLER}/" \
-	    -e "s/ENCRYPTION/${ENCRYPTION}/" \
-	    -e "s/HOSTNAME/${HOSTNAME}/" \
-	    -e "s/ISO_APPLICATION/${ISO_APPLICATION}/" \
-	    -e "s/ISO_PREPARER/${ISO_PREPARER}/" \
-	    -e "s/ISO_PUBLISHER/${ISO_PUBLISHER}/" \
-	    -e "s/ISO_VOLUME/${ISO_VOLUME}/" \
-	    -e "s/MEMTEST/${MEMTEST}/" \
-	    -e "s#NET_PATH#${NET_PATH}#" \
-	    -e "s/NET_SERVER/${NET_SERVER}/" \
-	    -e "s/USERNAME/${USERNAME}/" \
-	    -e "s/SOURCE_IMAGES/${SOURCE_IMAGES}/" \
-	    -e "s/SOURCE/${SOURCE}/" \
-	"${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
-BINARY_IMAGES="${BINARY_IMAGES}"
-DISTRIBUTION="${DISTRIBUTION}"
-PACKAGES_LISTS="${PACKAGES_LISTS}"
-PACKAGES="${PACKAGES}"
-
-# Advanced bootstrap options
-ARCHITECTURE="${ARCHITECTURE}"
-MIRROR_BOOTSTRAP_SECURITY="${MIRROR_BOOTSTRAP}"
-MIRROR_BOOTSTRAP="${MIRROR_BOOTSTRAP}"
-MIRROR_BINARY_SECURITY="${MIRROR_BINARY_SECURITY}"
-MIRROR_BINARY="${MIRROR_BINARY}"
-SECTIONS="${SECTIONS}"
-
-# Advanced chroot options
-CHROOT_FILESYSTEM="${CHROOT_FILESYSTEM}"
-LINUX_FLAVOURS="${LINUX_FLAVOURS}"
-SECURITY="${SECURITY}"
-SYMLINKS="${SYMLINKS}"
-SYSVINIT="${SYSVINIT}"
-
-# Advanced binary options
-BINARY_INDICES="${BINARY_INDICES}"
-BOOTAPPEND="${BOOTAPPEND}"
-BOOTLOADER="${BOOTLOADER}"
-DEBIAN_INSTALLER="${DEBIAN_INSTALLER}"
-ENCRYPTION="${ENCRYPTION}"
-HOSTNAME="${HOSTNAME}"
-ISO_APPLICATION="${ISO_APPLICATION}"
-ISO_PREPARER="${ISO_PREPARER}"
-ISO_PUBLISHER="${ISO_PUBLISHER}"
-ISO_VOLUME="${ISO_VOLUME}"
-MEMTEST="${MEMTEST}"
-NET_PATH="${NET_PATH}"
-NET_SERVER="${NET_SERVER}"
-USERNAME="${USERNAME}"
-
-# Advanced source options
-SOURCE_IMAGES="${SOURCE_IMAGES}"
-SOURCE="${SOURCE}"
-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 ${BINARY_IMAGES}|distribution ${DISTRIBUTION}|packages_lists ${PACKAGES_LISTS}|packages ${PACKAGES}|architecture ${ARCHITECTURE}|mirror_bootstrap_security ${MIRROR_BOOTSTRAP}|mirror_bootstrap ${MIRROR_BOOTSTRAP}|mirror_binary_security ${MIRROR_BINARY_SECURITY}|mirror_binary ${MIRROR_BINARY}|sections ${SECTIONS}|chroot_filesystem ${CHROOT_FILESYSTEM}|linux_flavours ${LINUX_FLAVOURS}|security ${SECURITY}|symlinks ${SYMLINKS}|sysvinit ${SYSVINIT}|binary_indices ${BINARY_INDICES}|bootappend ${BOOTAPPEND}|bootloader ${BOOTLOADER}|debian_installer ${DEBIAN_INSTALLER}|encryption ${ENCRYPTION}|hostname ${HOSTNAME}|iso_application ${ISO_APPLICATION}|iso_preparer ${ISO_PREPARER}|iso_publisher ${ISO_PUBLISHER}|iso_volume ${ISO_VOLUME}|memtest ${MEMTEST}|net_path ${NET_PATH}|net_server ${NET_SERVER}|username ${USERNAME}|source_images ${SOURCE_IMAGES}|source ${SOURCE}|" >> /var/log/live
-fi
-
-sed -e "s/VERSION/${VERSION}/" "${TEMPLATES}"/footer.html

Copied: dists/sid/live-webhelper/scripts/cgi (from rev 1941, dists/trunk/live-webhelper/scripts/cgi)
===================================================================
--- dists/sid/live-webhelper/scripts/cgi	                        (rev 0)
+++ dists/sid/live-webhelper/scripts/cgi	2007-06-03 13:37:15 UTC (rev 1950)
@@ -0,0 +1,220 @@
+#!/bin/sh
+
+# live-webhelper - web interface to live-helper
+# Copyright (C) 2007 Richard Nelson <rjent at rjent.pair.com>
+# Copyright (C) 2007 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 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#MIRROR_BOOTSTRAP_SECURITY#${MIRROR_BOOTSTRAP_SECURITY}#" \
+	    -e "s#MIRROR_BOOTSTRAP#${MIRROR_BOOTSTRAP}#" \
+	    -e "s#MIRROR_BINARY_SECURITY#${MIRROR_BINARY_SECURITY}#" \
+	    -e "s#MIRROR_BINARY#${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/%2F/\//g"
+
+	# Filtering url parameters
+	EMAIL="`echo ${QUERY_STRING} | grep -oE '(^|[?&])email=[0-9,a-z,A-Z,.,%,-]+' | sed 's/%40/@/g' | cut -f 2 -d '=' | head -n1`"
+
+	# Standard options
+	BINARY_IMAGES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])binary_images=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	DISTRIBUTION="`echo ${QUERY_STRING} | grep -oE '(^|[?&])distribution=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	PACKAGES_LISTS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])packages_lists=[a-z,-]+' | cut -f 2 -d '=' | head -n1`"
+	PACKAGES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])packages=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
+
+	# Advanced bootstrap options
+	ARCHITECTURE="`echo ${QUERY_STRING} | grep -oE '(^|[?&])architecture=[0-9,a-z]+' | cut -f 2 -d '=' | head -n1`"
+	BOOTSTRAP_FLAVOUR="`echo ${QUERY_STRING} | grep -oE '(^|[?&])bootstrap_flavour=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	#MIRROR_BOOTSTRAP
+	#MIRROR_BOOTSTRAP_SECURITY
+	#MIRROR_BINARY
+	#MIRROR_BINARY_SECURITY
+	SECTIONS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])sections=[a-z]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
+
+	# Advanced chroot options
+	CHROOT_FILESYSTEM="`echo ${QUERY_STRING} | grep -oE '(^|[?&])chroot_filesystem=[0-9,a-z]+' | cut -f 2 -d '=' | head -n1`"
+	LINUX_FLAVOURS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])linux_flavours=[0-9,a-z,-,]+' | cut -f 2 -d '=' | head -n1`"
+	SECURITY="`echo ${QUERY_STRING} | grep -oE '(^|[?&])security=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	SYMLINKS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])symlinks=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	SYSVINIT="`echo ${QUERY_STRING} | grep -oE '(^|[?&])sysvinit=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+
+	# Advanced binary options
+	BINARY_INDICES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])binary_indices=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	BOOTAPPEND="`echo ${QUERY_STRING} | grep -oE '(^|[?&])bootappend=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
+	BOOTLOADER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])bootloader=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	DEBIAN_INSTALLER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])debian_installer=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	ENCRYPTION="`echo ${QUERY_STRING} | grep -oE '(^|[?&])encryption=[0-9,a-z,A-Z]+' | cut -f 2 -d '=' | head -n1`"
+	HOSTNAME="`echo ${QUERY_STRING} | grep -oE '(^|[?&])hostname=[0-9,a-z,A-Z,.,-]+' | cut -f 2 -d '=' | head -n1`"
+	ISO_APPLICATION="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_application=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
+	ISO_PREPARER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_preparer=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
+	ISO_PUBLISHER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_publisher=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
+	ISO_VOLUME="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_volume=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
+	MEMTEST="`echo ${QUERY_STRING} | grep -oE '(^|[?&])memtest=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
+	NET_PATH="`echo ${QUERY_STRING} | grep -oE '(^|[?&])net_path=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
+	NET_SERVER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])net_server=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
+	USERNAME="`echo ${QUERY_STRING} | grep -oE '(^|[?&])username=[0-9,a-z,A-Z,.,-]+' | cut -f 2 -d '=' | head -n1`"
+
+	# Advanced source options
+	SOURCE="`echo ${QUERY_STRING} | grep -oE '(^|[?&])source=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	SOURCE_IMAGES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])source_images=[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#MIRROR_BOOTSTRAP_SECURITY#${MIRROR_BOOTSTRAP_SECURITY}#" \
+		    -e "s#MIRROR_BOOTSTRAP#${MIRROR_BOOTSTRAP}#" \
+		    -e "s#MIRROR_BINARY_SECURITY#${MIRROR_BINARY_SECURITY}#" \
+		    -e "s#MIRROR_BINARY#${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`"
+
+	# Sending html confirmation
+	sed -e "s/BUILD/${BUILD}/" \
+	    -e "s/EMAIL/${EMAIL}/" \
+	    -e "s/BINARY_IMAGES/${BINARY_IMAGES}/" \
+	    -e "s/DISTRIBUTION/${DISTRIBUTION}/" \
+	    -e "s/PACKAGES_LISTS/${PACKAGES_LISTS}/" \
+	    -e "s/PACKAGES/${PACKAGES}/" \
+	    -e "s/ARCHITECTURE/${ARCHITECTURE}/" \
+	    -e "s/BOOTSTRAP_FLAVOUR/${BOOTSTRAP_FLAVOUR}/" \
+	    -e "s#MIRROR_BOOTSTRAP_SECURITY#${MIRROR_BOOTSTRAP_SECURITY}#" \
+	    -e "s#MIRROR_BOOTSTRAP#${MIRROR_BOOTSTRAP}#" \
+	    -e "s#MIRROR_BINARY_SECURITY#${MIRROR_BINARY_SECURITY}#" \
+	    -e "s#MIRROR_BINARY#${MIRROR_BINARY}#" \
+	    -e "s/SECTIONS/${SECTIONS}/" \
+	    -e "s/CHROOT_FILESYSTEM/${CHROOT_FILESYSTEM}/" \
+	    -e "s/LINUX_FLAVOURS/${LINUX_FLAVOURS}/" \
+	    -e "s/SECURITY/${SECURITY}/" \
+	    -e "s/SYMLINKS/${SYMLINKS}/" \
+	    -e "s/SYSVINIT/${SYSVINIT}/" \
+	    -e "s/BINARY_INDICES/${BINARY_INDICES}/" \
+	    -e "s/BOOTAPPEND/${BOOTAPPEND}/" \
+	    -e "s/BOOTLOADER/${BOOTLOADER}/" \
+	    -e "s/DEBIAN_INSTALLER/${DEBIAN_INSTALLER}/" \
+	    -e "s/ENCRYPTION/${ENCRYPTION}/" \
+	    -e "s/HOSTNAME/${HOSTNAME}/" \
+	    -e "s/ISO_APPLICATION/${ISO_APPLICATION}/" \
+	    -e "s/ISO_PREPARER/${ISO_PREPARER}/" \
+	    -e "s/ISO_PUBLISHER/${ISO_PUBLISHER}/" \
+	    -e "s/ISO_VOLUME/${ISO_VOLUME}/" \
+	    -e "s/MEMTEST/${MEMTEST}/" \
+	    -e "s#NET_PATH#${NET_PATH}#" \
+	    -e "s/NET_SERVER/${NET_SERVER}/" \
+	    -e "s/USERNAME/${USERNAME}/" \
+	    -e "s/SOURCE_IMAGES/${SOURCE_IMAGES}/" \
+	    -e "s/SOURCE/${SOURCE}/" \
+	"${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
+BINARY_IMAGES="${BINARY_IMAGES}"
+DISTRIBUTION="${DISTRIBUTION}"
+PACKAGES_LISTS="${PACKAGES_LISTS}"
+PACKAGES="${PACKAGES}"
+
+# Advanced bootstrap options
+ARCHITECTURE="${ARCHITECTURE}"
+MIRROR_BOOTSTRAP_SECURITY="${MIRROR_BOOTSTRAP}"
+MIRROR_BOOTSTRAP="${MIRROR_BOOTSTRAP}"
+MIRROR_BINARY_SECURITY="${MIRROR_BINARY_SECURITY}"
+MIRROR_BINARY="${MIRROR_BINARY}"
+SECTIONS="${SECTIONS}"
+
+# Advanced chroot options
+CHROOT_FILESYSTEM="${CHROOT_FILESYSTEM}"
+LINUX_FLAVOURS="${LINUX_FLAVOURS}"
+SECURITY="${SECURITY}"
+SYMLINKS="${SYMLINKS}"
+SYSVINIT="${SYSVINIT}"
+
+# Advanced binary options
+BINARY_INDICES="${BINARY_INDICES}"
+BOOTAPPEND="${BOOTAPPEND}"
+BOOTLOADER="${BOOTLOADER}"
+DEBIAN_INSTALLER="${DEBIAN_INSTALLER}"
+ENCRYPTION="${ENCRYPTION}"
+HOSTNAME="${HOSTNAME}"
+ISO_APPLICATION="${ISO_APPLICATION}"
+ISO_PREPARER="${ISO_PREPARER}"
+ISO_PUBLISHER="${ISO_PUBLISHER}"
+ISO_VOLUME="${ISO_VOLUME}"
+MEMTEST="${MEMTEST}"
+NET_PATH="${NET_PATH}"
+NET_SERVER="${NET_SERVER}"
+USERNAME="${USERNAME}"
+
+# Advanced source options
+SOURCE_IMAGES="${SOURCE_IMAGES}"
+SOURCE="${SOURCE}"
+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 ${BINARY_IMAGES}|distribution ${DISTRIBUTION}|packages_lists ${PACKAGES_LISTS}|packages ${PACKAGES}|architecture ${ARCHITECTURE}|mirror_bootstrap_security ${MIRROR_BOOTSTRAP}|mirror_bootstrap ${MIRROR_BOOTSTRAP}|mirror_binary_security ${MIRROR_BINARY_SECURITY}|mirror_binary ${MIRROR_BINARY}|sections ${SECTIONS}|chroot_filesystem ${CHROOT_FILESYSTEM}|linux_flavours ${LINUX_FLAVOURS}|security ${SECURITY}|symlinks ${SYMLINKS}|sysvinit ${SYSVINIT}|binary_indices ${BINARY_INDICES}|bootappend ${BOOTAPPEND}|bootloader ${BOOTLOADER}|debian_installer ${DEBIAN_INSTALLER}|encryption ${ENCRYPTION}|hostname ${HOSTNAME}|iso_application ${ISO_APPLICATION}|iso_preparer ${ISO_PREPARER}|iso_publisher ${ISO_PUBLISHER}|iso_volume ${ISO_VOLUME}|memtest ${MEMTEST}|net_path ${NET_PATH}|net_server ${NET_SERVER}|username ${USERNAME}|source_images ${SOURCE_IMAGES}|source ${SOURCE}|" >> /var/log/live
+fi
+
+sed -e "s/VERSION/${VERSION}/" "${TEMPLATES}"/footer.html

Deleted: dists/sid/live-webhelper/scripts/cron
===================================================================
--- dists/trunk/live-webhelper/scripts/cron	2007-06-02 04:06:58 UTC (rev 1915)
+++ dists/sid/live-webhelper/scripts/cron	2007-06-03 13:37:15 UTC (rev 1950)
@@ -1,211 +0,0 @@
-#!/bin/sh
-
-# live-webhelper - web interface to live-helper
-# Copyright (C) 2007 Richard Nelson <rjent at rjent.pair.com>
-# Copyright (C) 2007 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.
-
-# 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
-then
-	for FILE in "${TEMPDIR}"/*.build
-	do
-		# Reading build file
-		. "${FILE}"
-
-		echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-webhelper: begin web build (${BUILD})." >> /var/log/live
-
-		# Assembling standard options
-		if [ -n "${BINARY_IMAGES}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --binary-images ${BINARY_IMAGES}"
-		fi
-
-		if [ -n "${DISTRIBUTION}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --distribution ${DISTRIBUTION}"
-		fi
-
-		if [ -n "${PACKAGES}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --packages ${PACKAGES}"
-		fi
-
-		if [ -n "${PACKAGES_LISTS}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --packages-lists ${PACKAGES_LISTS}"
-		fi
-
-		# Assembling chroot options
-		if [ -n "${CHROOT_FILESYSTEM}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --chroot-filesystem ${CHROOT_FILESYSTEM}"
-		fi
-
-		# Assembling binary options
-		if [ -n "${ISO_APPLICATION}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-application ${ISO_APPLICATION}"
-		fi
-
-		if [ -n "${ISO_PREPARER}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-preparer ${ISO_PREPARER}"
-		fi
-
-		if [ -n "${ISO_PUBLISHER}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-publisher ${ISO_PUBLISHER}"
-		fi
-
-		if [ -n "${ISO_VOLUME}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-volume ${ISO_VOLUME}"
-		fi
-
-		# Assembling other options
-		if [ -n "${MIRROR_BOOTSTRAP}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-bootstrap ${MIRROR_BOOTSTRAP}"
-		fi
-
-		if [ -n "${MIRROR_BOOTSTRAP_SECURITY}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY}"
-		fi
-
-		if [ -n "${MIRROR_BINARY}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-binary ${MIRROR_BINARY}"
-		fi
-
-		if [ -n "${MIRROR_BINARY_SECURITY}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-binary-security ${MIRROR_BINARY_SECURITY}"
-		fi
-
-		# Creating build directory
-		mkdir -p "${TEMPDIR}"/"${BUILD}"
-
-		DATE_START="`date -R`"
-		echo "Begin: ${DATE_START}" > "${TEMPDIR}"/"${BUILD}"/log.txt
-
-		# Generating image
-		cd "${TEMPDIR}"/"${BUILD}"
-		make-live ${LIVE_OPTIONS} >> "${TEMPDIR}"/"${BUILD}"/log.txt 2>&1
-		ERROR="${?}"
-
-		DATE_END="`date -R`"
-		echo "End: ${DATE_END}" >> "${TEMPDIR}"/"${BUILD}"/log.txt
-
-		# Creating image directory
-		mkdir -p "${DESTDIR}"/"${BUILD}"
-
-		# Creating mail
-		if [ "${ERROR}" -eq "0" ]
-		then
-			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/maybe-successful/" \
-			    -e "s#SERVER#${SERVER}#" \
-			"${TEMPLATES}"/mail.txt > "${DESTDIR}"/"${BUILD}"/mail.txt
-		else
-			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/maybe-failed/" \
-			    -e "s#SERVER#${SERVER}#" \
-			"${TEMPLATES}"/mail.txt > "${DESTDIR}"/"${BUILD}"/mail.txt
-		fi
-
-		# Moving binary image
-		if ls "${TEMPDIR}"/"${BUILD}"/debian-live/binary.* > /dev/null 2>&1
-		then
-			mv "${TEMPDIR}"/"${BUILD}"/debian-live/binary.* "${DESTDIR}"/"${BUILD}"
-		fi
-
-		# Moving source image
-		if ls "${TEMPDIR}"/"${BUILD}"/debian-live/source.* > /dev/null 2>&1
-		then
-			mv "${TEMPDIR}"/"${BUILD}"/debian-live/source.* "${DESTDIR}"/"${BUILD}"
-		fi
-
-		# Moving build
-		mv "${TEMPDIR}"/"${BUILD}".build "${DESTDIR}"/"${BUILD}"/build
-
-		# Moving log
-		mv "${TEMPDIR}"/"${BUILD}"/log.txt "${DESTDIR}"/"${BUILD}"
-
-		# Generating md5sum
-		cd "${DESTDIR}"/"${BUILD}"
-		md5sum * > md5sum.txt
-		cd "${OLDPWD}"
-
-		# Sending mail
-		cat "${DESTDIR}"/"${BUILD}"/mail.txt | /usr/sbin/sendmail -t
-
-		# Unmounting proc
-		if [ -f "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/proc/version ]
-		then
-			umount "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/proc
-		fi
-
-		# Unmounting sysfs
-		if [ -d "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/sys/kernel ]
-		then
-			umount "${TEMPDIR}"/${BUILD}/debian-live/chroot/sys
-		fi
-
-		# Removing build directory
-		rm -rf "${TEMPDIR}"/"${BUILD}"
-
-		echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-webhelper: end web build (${BUILD})." >> /var/log/live
-	done
-fi

Copied: dists/sid/live-webhelper/scripts/cron (from rev 1942, dists/trunk/live-webhelper/scripts/cron)
===================================================================
--- dists/sid/live-webhelper/scripts/cron	                        (rev 0)
+++ dists/sid/live-webhelper/scripts/cron	2007-06-03 13:37:15 UTC (rev 1950)
@@ -0,0 +1,211 @@
+#!/bin/sh
+
+# live-webhelper - web interface to live-helper
+# Copyright (C) 2007 Richard Nelson <rjent at rjent.pair.com>
+# Copyright (C) 2007 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.
+
+# 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
+then
+	for FILE in "${TEMPDIR}"/*.build
+	do
+		# Reading build file
+		. "${FILE}"
+
+		echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-webhelper: begin web build (${BUILD})." >> /var/log/live
+
+		# Assembling standard options
+		if [ -n "${BINARY_IMAGES}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --binary-images ${BINARY_IMAGES}"
+		fi
+
+		if [ -n "${DISTRIBUTION}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --distribution ${DISTRIBUTION}"
+		fi
+
+		if [ -n "${PACKAGES}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --packages ${PACKAGES}"
+		fi
+
+		if [ -n "${PACKAGES_LISTS}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --packages-lists ${PACKAGES_LISTS}"
+		fi
+
+		# Assembling chroot options
+		if [ -n "${CHROOT_FILESYSTEM}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --chroot-filesystem ${CHROOT_FILESYSTEM}"
+		fi
+
+		# Assembling binary options
+		if [ -n "${ISO_APPLICATION}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-application ${ISO_APPLICATION}"
+		fi
+
+		if [ -n "${ISO_PREPARER}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-preparer ${ISO_PREPARER}"
+		fi
+
+		if [ -n "${ISO_PUBLISHER}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-publisher ${ISO_PUBLISHER}"
+		fi
+
+		if [ -n "${ISO_VOLUME}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-volume ${ISO_VOLUME}"
+		fi
+
+		# Assembling other options
+		if [ -n "${MIRROR_BOOTSTRAP}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-bootstrap ${MIRROR_BOOTSTRAP}"
+		fi
+
+		if [ -n "${MIRROR_BOOTSTRAP_SECURITY}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY}"
+		fi
+
+		if [ -n "${MIRROR_BINARY}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-binary ${MIRROR_BINARY}"
+		fi
+
+		if [ -n "${MIRROR_BINARY_SECURITY}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-binary-security ${MIRROR_BINARY_SECURITY}"
+		fi
+
+		# Creating build directory
+		mkdir -p "${TEMPDIR}"/"${BUILD}"
+
+		DATE_START="`date -R`"
+		echo "Begin: ${DATE_START}" > "${TEMPDIR}"/"${BUILD}"/log
+
+		# Generating image
+		cd "${TEMPDIR}"/"${BUILD}"
+		make-live ${LIVE_OPTIONS} >> "${TEMPDIR}"/"${BUILD}"/log 2>&1
+		ERROR="${?}"
+
+		DATE_END="`date -R`"
+		echo "End: ${DATE_END}" >> "${TEMPDIR}"/"${BUILD}"/log
+
+		# Creating image directory
+		mkdir -p "${DESTDIR}"/"${BUILD}"
+
+		# Creating mail
+		if [ "${ERROR}" -eq "0" ]
+		then
+			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/maybe-successful/" \
+			    -e "s#SERVER#${SERVER}#" \
+			"${TEMPLATES}"/mail.txt > "${DESTDIR}"/"${BUILD}"/mail
+		else
+			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/maybe-failed/" \
+			    -e "s#SERVER#${SERVER}#" \
+			"${TEMPLATES}"/mail.txt > "${DESTDIR}"/"${BUILD}"/mail
+		fi
+
+		# Moving binary image
+		if ls "${TEMPDIR}"/"${BUILD}"/debian-live/binary.* > /dev/null 2>&1
+		then
+			mv "${TEMPDIR}"/"${BUILD}"/debian-live/binary.* "${DESTDIR}"/"${BUILD}"
+		fi
+
+		# Moving source image
+		if ls "${TEMPDIR}"/"${BUILD}"/debian-live/source.* > /dev/null 2>&1
+		then
+			mv "${TEMPDIR}"/"${BUILD}"/debian-live/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 proc
+		if [ -f "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/proc/version ]
+		then
+			umount "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/proc
+		fi
+
+		# Unmounting sysfs
+		if [ -d "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/sys/kernel ]
+		then
+			umount "${TEMPDIR}"/${BUILD}/debian-live/chroot/sys
+		fi
+
+		# Removing build directory
+		rm -rf "${TEMPDIR}"/"${BUILD}"
+
+		echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-webhelper: end web build (${BUILD})." >> /var/log/live
+	done
+fi

Copied: releases/live-webhelper/1.0~a13-1 (from rev 1915, dists/trunk/live-webhelper)

Deleted: releases/live-webhelper/1.0~a13-1/debian/changelog
===================================================================
--- dists/trunk/live-webhelper/debian/changelog	2007-06-02 04:06:58 UTC (rev 1915)
+++ releases/live-webhelper/1.0~a13-1/debian/changelog	2007-06-03 13:37:15 UTC (rev 1950)
@@ -1,5 +0,0 @@
-live-webhelper (1.0~a13-1) UNRELEASED; urgency=low
-
-  * Initial release.
-
- -- Daniel Baumann <daniel at debian.org>  Mon,  4 Jun 2007 00:00:00 +0200

Copied: releases/live-webhelper/1.0~a13-1/debian/changelog (from rev 1948, dists/trunk/live-webhelper/debian/changelog)
===================================================================
--- releases/live-webhelper/1.0~a13-1/debian/changelog	                        (rev 0)
+++ releases/live-webhelper/1.0~a13-1/debian/changelog	2007-06-03 13:37:15 UTC (rev 1950)
@@ -0,0 +1,5 @@
+live-webhelper (1.0~a13-1) unstable; urgency=low
+
+  * Initial release.
+
+ -- Daniel Baumann <daniel at debian.org>  Mon,  4 Jun 2007 00:00:00 +0200

Deleted: releases/live-webhelper/1.0~a13-1/manpages/live-webhelper.en.7
===================================================================
--- dists/trunk/live-webhelper/manpages/live-webhelper.en.7	2007-06-02 04:06:58 UTC (rev 1915)
+++ releases/live-webhelper/1.0~a13-1/manpages/live-webhelper.en.7	2007-06-03 13:37:15 UTC (rev 1950)
@@ -1,30 +0,0 @@
-.TH LIVE\-WEBHELPER 7 "2007\-06\-04" "1.0~a13" "live\-webhelper"
-
-.SH NAME
-live\-webhelper \- Debian Live helper programs (web frontend)
-
-.SH DESCRIPTION
-Live\-helper is a collection of programs that can be used to build Debian Live system images. The philosophy behind live\-helper is to provide a collection of small, simple, and easily understood tools that can be used in your own program to automate building of a Live system.
-.PP
-A typical program that uses live\-helper will call several live\-helper commands in sequence. Live\-helper commands are all named with a "lh_" prefix. Examples of such a program that uses live\-helper is \fImake\-live\fR(1).
-.PP
-This package contains the web frontend.
-
-.SH FILES
-.B /usr/share/live-webhelper/templates
-
-.SH SEE ALSO
-\fIlive\-helper\fR(7)
-.PP
-\fIlive\-initramfs\fR(7)
-.PP
-\fIlive\-sysvinit\fR(7)
-
-.SH BUGS
-Report bugs against live\-initramfs <\fIhttp://packages.qa.debian.org/live\-initramfs/\fR>.
-
-.SH HOMEPAGE
-More information about the Debian Live project can be found at <\fIhttp://debian\-live.alioth.debian.org/\fR> and <\fIhttp://wiki.debian.org/DebianLive/\fR>.
-
-.SH AUTHORS
-live\-helper was written by Richard Nelson <\fIrjent at rjent.pair.com\fR> and Daniel Baumann <\fIdaniel at debian.org\fR> for the Debian project.

Copied: releases/live-webhelper/1.0~a13-1/manpages/live-webhelper.en.7 (from rev 1948, dists/trunk/live-webhelper/manpages/live-webhelper.en.7)
===================================================================
--- releases/live-webhelper/1.0~a13-1/manpages/live-webhelper.en.7	                        (rev 0)
+++ releases/live-webhelper/1.0~a13-1/manpages/live-webhelper.en.7	2007-06-03 13:37:15 UTC (rev 1950)
@@ -0,0 +1,30 @@
+.TH LIVE\-WEBHELPER 7 "2007\-06\-04" "1.0~a13" "live\-webhelper"
+
+.SH NAME
+live\-webhelper \- Debian Live helper programs (web frontend)
+
+.SH DESCRIPTION
+Live\-helper is a collection of programs that can be used to build Debian Live system images. The philosophy behind live\-helper is to provide a collection of small, simple, and easily understood tools that can be used in your own program to automate building of a Live system.
+.PP
+A typical program that uses live\-helper will call several live\-helper commands in sequence. Live\-helper commands are all named with a "lh_" prefix. Examples of such a program that uses live\-helper is \fImake\-live\fR(1).
+.PP
+This package contains the web frontend.
+
+.SH FILES
+.B /usr/share/live-webhelper/templates
+
+.SH SEE ALSO
+\fIlive\-helper\fR(7)
+.PP
+\fIlive\-initramfs\fR(7)
+.PP
+\fIlive\-sysvinit\fR(7)
+
+.SH BUGS
+Report bugs against live\-initramfs <\fIhttp://packages.qa.debian.org/live\-initramfs/\fR>.
+
+.SH HOMEPAGE
+More information about the Debian Live project can be found at <\fIhttp://debian\-live.alioth.debian.org/\fR> and <\fIhttp://wiki.debian.org/DebianLive/\fR>.
+
+.SH AUTHORS
+live\-webhelper was written by Richard Nelson <\fIrjent at rjent.pair.com\fR> and Daniel Baumann <\fIdaniel at debian.org\fR> for the Debian project.

Deleted: releases/live-webhelper/1.0~a13-1/scripts/cgi
===================================================================
--- dists/trunk/live-webhelper/scripts/cgi	2007-06-02 04:06:58 UTC (rev 1915)
+++ releases/live-webhelper/1.0~a13-1/scripts/cgi	2007-06-03 13:37:15 UTC (rev 1950)
@@ -1,205 +0,0 @@
-#!/bin/sh
-
-# live-webhelper - web interface to live-helper
-# Copyright (C) 2007 Richard Nelson <rjent at rjent.pair.com>
-# Copyright (C) 2007 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 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#MIRROR_BOOTSTRAP_SECURITY#${MIRROR_BOOTSTRAP_SECURITY}#" \
-	    -e "s#MIRROR_BOOTSTRAP#${MIRROR_BOOTSTRAP}#" \
-	    -e "s#MIRROR_BINARY_SECURITY#${MIRROR_BINARY_SECURITY}#" \
-	    -e "s#MIRROR_BINARY#${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/%2F/\//g"
-
-	# Filtering url parameters
-	EMAIL="`echo ${QUERY_STRING} | grep -oE '(^|[?&])email=[0-9,a-z,A-Z,.,%,-]+' | sed 's/%40/@/g' | cut -f 2 -d '=' | head -n1`"
-
-	# Standard options
-	BINARY_IMAGES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])binary_images=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	DISTRIBUTION="`echo ${QUERY_STRING} | grep -oE '(^|[?&])distribution=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	PACKAGES_LISTS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])packages_lists=[a-z,-]+' | cut -f 2 -d '=' | head -n1`"
-	PACKAGES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])packages=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
-
-	# Advanced bootstrap options
-	ARCHITECTURE="`echo ${QUERY_STRING} | grep -oE '(^|[?&])architecture=[0-9,a-z]+' | cut -f 2 -d '=' | head -n1`"
-	BOOTSTRAP_FLAVOUR="`echo ${QUERY_STRING} | grep -oE '(^|[?&])bootstrap_flavour=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	#MIRROR_BOOTSTRAP
-	#MIRROR_BOOTSTRAP_SECURITY
-	#MIRROR_BINARY
-	#MIRROR_BINARY_SECURITY
-	SECTIONS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])sections=[a-z]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
-
-	# Advanced chroot options
-	CHROOT_FILESYSTEM="`echo ${QUERY_STRING} | grep -oE '(^|[?&])chroot_filesystem=[0-9,a-z]+' | cut -f 2 -d '=' | head -n1`"
-	LINUX_FLAVOURS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])linux_flavours=[0-9,a-z,-,]+' | cut -f 2 -d '=' | head -n1`"
-	SECURITY="`echo ${QUERY_STRING} | grep -oE '(^|[?&])security=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	SYMLINKS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])symlinks=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	SYSVINIT="`echo ${QUERY_STRING} | grep -oE '(^|[?&])sysvinit=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-
-	# Advanced binary options
-	BINARY_INDICES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])binary_indices=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	BOOTAPPEND="`echo ${QUERY_STRING} | grep -oE '(^|[?&])bootappend=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
-	BOOTLOADER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])bootloader=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	DEBIAN_INSTALLER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])debian_installer=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	ENCRYPTION="`echo ${QUERY_STRING} | grep -oE '(^|[?&])encryption=[0-9,a-z,A-Z]+' | cut -f 2 -d '=' | head -n1`"
-	HOSTNAME="`echo ${QUERY_STRING} | grep -oE '(^|[?&])hostname=[0-9,a-z,A-Z,.,-]+' | cut -f 2 -d '=' | head -n1`"
-	ISO_APPLICATION="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_application=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
-	ISO_PREPARER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_preparer=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
-	ISO_PUBLISHER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_publisher=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
-	ISO_VOLUME="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_volume=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
-	MEMTEST="`echo ${QUERY_STRING} | grep -oE '(^|[?&])memtest=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
-	NET_PATH="`echo ${QUERY_STRING} | grep -oE '(^|[?&])net_path=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
-	NET_SERVER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])net_server=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
-	USERNAME="`echo ${QUERY_STRING} | grep -oE '(^|[?&])username=[0-9,a-z,A-Z,.,-]+' | cut -f 2 -d '=' | head -n1`"
-
-	# Advanced source options
-	SOURCE="`echo ${QUERY_STRING} | grep -oE '(^|[?&])source=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-	SOURCE_IMAGES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])source_images=[a-z]+' | cut -f 2 -d '=' | head -n1`"
-
-	# FIXME: filter invalid options
-	unset QUERY_STRING
-
-	# Getting build identifier
-	BUILD="`date +%Y%m%d.%H%M%S.%N`"
-
-	# Sending html confirmation
-	sed -e "s/BUILD/${BUILD}/" \
-	    -e "s/EMAIL/${EMAIL}/" \
-	    -e "s/BINARY_IMAGES/${BINARY_IMAGES}/" \
-	    -e "s/DISTRIBUTION/${DISTRIBUTION}/" \
-	    -e "s/PACKAGES_LISTS/${PACKAGES_LISTS}/" \
-	    -e "s/PACKAGES/${PACKAGES}/" \
-	    -e "s/ARCHITECTURE/${ARCHITECTURE}/" \
-	    -e "s/BOOTSTRAP_FLAVOUR/${BOOTSTRAP_FLAVOUR}/" \
-	    -e "s#MIRROR_BOOTSTRAP_SECURITY#${MIRROR_BOOTSTRAP}#" \
-	    -e "s#MIRROR_BOOTSTRAP#${MIRROR_BOOTSTRAP}#" \
-	    -e "s#MIRROR_BINARY_SECURITY#${MIRROR_BINARY_SECURITY}#" \
-	    -e "s#MIRROR_BINARY#${MIRROR_BINARY}#" \
-	    -e "s/SECTIONS/${SECTIONS}/" \
-	    -e "s/CHROOT_FILESYSTEM/${CHROOT_FILESYSTEM}/" \
-	    -e "s/LINUX_FLAVOURS/${LINUX_FLAVOURS}/" \
-	    -e "s/SECURITY/${SECURITY}/" \
-	    -e "s/SYMLINKS/${SYMLINKS}/" \
-	    -e "s/SYSVINIT/${SYSVINIT}/" \
-	    -e "s/BINARY_INDICES/${BINARY_INDICES}/" \
-	    -e "s/BOOTAPPEND/${BOOTAPPEND}/" \
-	    -e "s/BOOTLOADER/${BOOTLOADER}/" \
-	    -e "s/DEBIAN_INSTALLER/${DEBIAN_INSTALLER}/" \
-	    -e "s/ENCRYPTION/${ENCRYPTION}/" \
-	    -e "s/HOSTNAME/${HOSTNAME}/" \
-	    -e "s/ISO_APPLICATION/${ISO_APPLICATION}/" \
-	    -e "s/ISO_PREPARER/${ISO_PREPARER}/" \
-	    -e "s/ISO_PUBLISHER/${ISO_PUBLISHER}/" \
-	    -e "s/ISO_VOLUME/${ISO_VOLUME}/" \
-	    -e "s/MEMTEST/${MEMTEST}/" \
-	    -e "s#NET_PATH#${NET_PATH}#" \
-	    -e "s/NET_SERVER/${NET_SERVER}/" \
-	    -e "s/USERNAME/${USERNAME}/" \
-	    -e "s/SOURCE_IMAGES/${SOURCE_IMAGES}/" \
-	    -e "s/SOURCE/${SOURCE}/" \
-	"${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
-BINARY_IMAGES="${BINARY_IMAGES}"
-DISTRIBUTION="${DISTRIBUTION}"
-PACKAGES_LISTS="${PACKAGES_LISTS}"
-PACKAGES="${PACKAGES}"
-
-# Advanced bootstrap options
-ARCHITECTURE="${ARCHITECTURE}"
-MIRROR_BOOTSTRAP_SECURITY="${MIRROR_BOOTSTRAP}"
-MIRROR_BOOTSTRAP="${MIRROR_BOOTSTRAP}"
-MIRROR_BINARY_SECURITY="${MIRROR_BINARY_SECURITY}"
-MIRROR_BINARY="${MIRROR_BINARY}"
-SECTIONS="${SECTIONS}"
-
-# Advanced chroot options
-CHROOT_FILESYSTEM="${CHROOT_FILESYSTEM}"
-LINUX_FLAVOURS="${LINUX_FLAVOURS}"
-SECURITY="${SECURITY}"
-SYMLINKS="${SYMLINKS}"
-SYSVINIT="${SYSVINIT}"
-
-# Advanced binary options
-BINARY_INDICES="${BINARY_INDICES}"
-BOOTAPPEND="${BOOTAPPEND}"
-BOOTLOADER="${BOOTLOADER}"
-DEBIAN_INSTALLER="${DEBIAN_INSTALLER}"
-ENCRYPTION="${ENCRYPTION}"
-HOSTNAME="${HOSTNAME}"
-ISO_APPLICATION="${ISO_APPLICATION}"
-ISO_PREPARER="${ISO_PREPARER}"
-ISO_PUBLISHER="${ISO_PUBLISHER}"
-ISO_VOLUME="${ISO_VOLUME}"
-MEMTEST="${MEMTEST}"
-NET_PATH="${NET_PATH}"
-NET_SERVER="${NET_SERVER}"
-USERNAME="${USERNAME}"
-
-# Advanced source options
-SOURCE_IMAGES="${SOURCE_IMAGES}"
-SOURCE="${SOURCE}"
-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 ${BINARY_IMAGES}|distribution ${DISTRIBUTION}|packages_lists ${PACKAGES_LISTS}|packages ${PACKAGES}|architecture ${ARCHITECTURE}|mirror_bootstrap_security ${MIRROR_BOOTSTRAP}|mirror_bootstrap ${MIRROR_BOOTSTRAP}|mirror_binary_security ${MIRROR_BINARY_SECURITY}|mirror_binary ${MIRROR_BINARY}|sections ${SECTIONS}|chroot_filesystem ${CHROOT_FILESYSTEM}|linux_flavours ${LINUX_FLAVOURS}|security ${SECURITY}|symlinks ${SYMLINKS}|sysvinit ${SYSVINIT}|binary_indices ${BINARY_INDICES}|bootappend ${BOOTAPPEND}|bootloader ${BOOTLOADER}|debian_installer ${DEBIAN_INSTALLER}|encryption ${ENCRYPTION}|hostname ${HOSTNAME}|iso_application ${ISO_APPLICATION}|iso_preparer ${ISO_PREPARER}|iso_publisher ${ISO_PUBLISHER}|iso_volume ${ISO_VOLUME}|memtest ${MEMTEST}|net_path ${NET_PATH}|net_server ${NET_SERVER}|username ${USERNAME}|source_images ${SOURCE_IMAGES}|source ${SOURCE}|" >> /var/log/live
-fi
-
-sed -e "s/VERSION/${VERSION}/" "${TEMPLATES}"/footer.html

Copied: releases/live-webhelper/1.0~a13-1/scripts/cgi (from rev 1941, dists/trunk/live-webhelper/scripts/cgi)
===================================================================
--- releases/live-webhelper/1.0~a13-1/scripts/cgi	                        (rev 0)
+++ releases/live-webhelper/1.0~a13-1/scripts/cgi	2007-06-03 13:37:15 UTC (rev 1950)
@@ -0,0 +1,220 @@
+#!/bin/sh
+
+# live-webhelper - web interface to live-helper
+# Copyright (C) 2007 Richard Nelson <rjent at rjent.pair.com>
+# Copyright (C) 2007 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 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#MIRROR_BOOTSTRAP_SECURITY#${MIRROR_BOOTSTRAP_SECURITY}#" \
+	    -e "s#MIRROR_BOOTSTRAP#${MIRROR_BOOTSTRAP}#" \
+	    -e "s#MIRROR_BINARY_SECURITY#${MIRROR_BINARY_SECURITY}#" \
+	    -e "s#MIRROR_BINARY#${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/%2F/\//g"
+
+	# Filtering url parameters
+	EMAIL="`echo ${QUERY_STRING} | grep -oE '(^|[?&])email=[0-9,a-z,A-Z,.,%,-]+' | sed 's/%40/@/g' | cut -f 2 -d '=' | head -n1`"
+
+	# Standard options
+	BINARY_IMAGES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])binary_images=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	DISTRIBUTION="`echo ${QUERY_STRING} | grep -oE '(^|[?&])distribution=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	PACKAGES_LISTS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])packages_lists=[a-z,-]+' | cut -f 2 -d '=' | head -n1`"
+	PACKAGES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])packages=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
+
+	# Advanced bootstrap options
+	ARCHITECTURE="`echo ${QUERY_STRING} | grep -oE '(^|[?&])architecture=[0-9,a-z]+' | cut -f 2 -d '=' | head -n1`"
+	BOOTSTRAP_FLAVOUR="`echo ${QUERY_STRING} | grep -oE '(^|[?&])bootstrap_flavour=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	#MIRROR_BOOTSTRAP
+	#MIRROR_BOOTSTRAP_SECURITY
+	#MIRROR_BINARY
+	#MIRROR_BINARY_SECURITY
+	SECTIONS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])sections=[a-z]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
+
+	# Advanced chroot options
+	CHROOT_FILESYSTEM="`echo ${QUERY_STRING} | grep -oE '(^|[?&])chroot_filesystem=[0-9,a-z]+' | cut -f 2 -d '=' | head -n1`"
+	LINUX_FLAVOURS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])linux_flavours=[0-9,a-z,-,]+' | cut -f 2 -d '=' | head -n1`"
+	SECURITY="`echo ${QUERY_STRING} | grep -oE '(^|[?&])security=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	SYMLINKS="`echo ${QUERY_STRING} | grep -oE '(^|[?&])symlinks=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	SYSVINIT="`echo ${QUERY_STRING} | grep -oE '(^|[?&])sysvinit=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+
+	# Advanced binary options
+	BINARY_INDICES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])binary_indices=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	BOOTAPPEND="`echo ${QUERY_STRING} | grep -oE '(^|[?&])bootappend=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
+	BOOTLOADER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])bootloader=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	DEBIAN_INSTALLER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])debian_installer=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	ENCRYPTION="`echo ${QUERY_STRING} | grep -oE '(^|[?&])encryption=[0-9,a-z,A-Z]+' | cut -f 2 -d '=' | head -n1`"
+	HOSTNAME="`echo ${QUERY_STRING} | grep -oE '(^|[?&])hostname=[0-9,a-z,A-Z,.,-]+' | cut -f 2 -d '=' | head -n1`"
+	ISO_APPLICATION="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_application=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
+	ISO_PREPARER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_preparer=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
+	ISO_PUBLISHER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_publisher=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
+	ISO_VOLUME="`echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_volume=[0-9,a-z,A-Z,.,_,+,-]+' | sed 's/+/ /g' | cut -f 2 -d '=' | head -n1`"
+	MEMTEST="`echo ${QUERY_STRING} | grep -oE '(^|[?&])memtest=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
+	NET_PATH="`echo ${QUERY_STRING} | grep -oE '(^|[?&])net_path=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
+	NET_SERVER="`echo ${QUERY_STRING} | grep -oE '(^|[?&])net_server=[0-9,a-z,A-Z,.,_,+,-]+' | cut -f 2 -d '=' | head -n1`"
+	USERNAME="`echo ${QUERY_STRING} | grep -oE '(^|[?&])username=[0-9,a-z,A-Z,.,-]+' | cut -f 2 -d '=' | head -n1`"
+
+	# Advanced source options
+	SOURCE="`echo ${QUERY_STRING} | grep -oE '(^|[?&])source=[a-z]+' | cut -f 2 -d '=' | head -n1`"
+	SOURCE_IMAGES="`echo ${QUERY_STRING} | grep -oE '(^|[?&])source_images=[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#MIRROR_BOOTSTRAP_SECURITY#${MIRROR_BOOTSTRAP_SECURITY}#" \
+		    -e "s#MIRROR_BOOTSTRAP#${MIRROR_BOOTSTRAP}#" \
+		    -e "s#MIRROR_BINARY_SECURITY#${MIRROR_BINARY_SECURITY}#" \
+		    -e "s#MIRROR_BINARY#${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`"
+
+	# Sending html confirmation
+	sed -e "s/BUILD/${BUILD}/" \
+	    -e "s/EMAIL/${EMAIL}/" \
+	    -e "s/BINARY_IMAGES/${BINARY_IMAGES}/" \
+	    -e "s/DISTRIBUTION/${DISTRIBUTION}/" \
+	    -e "s/PACKAGES_LISTS/${PACKAGES_LISTS}/" \
+	    -e "s/PACKAGES/${PACKAGES}/" \
+	    -e "s/ARCHITECTURE/${ARCHITECTURE}/" \
+	    -e "s/BOOTSTRAP_FLAVOUR/${BOOTSTRAP_FLAVOUR}/" \
+	    -e "s#MIRROR_BOOTSTRAP_SECURITY#${MIRROR_BOOTSTRAP_SECURITY}#" \
+	    -e "s#MIRROR_BOOTSTRAP#${MIRROR_BOOTSTRAP}#" \
+	    -e "s#MIRROR_BINARY_SECURITY#${MIRROR_BINARY_SECURITY}#" \
+	    -e "s#MIRROR_BINARY#${MIRROR_BINARY}#" \
+	    -e "s/SECTIONS/${SECTIONS}/" \
+	    -e "s/CHROOT_FILESYSTEM/${CHROOT_FILESYSTEM}/" \
+	    -e "s/LINUX_FLAVOURS/${LINUX_FLAVOURS}/" \
+	    -e "s/SECURITY/${SECURITY}/" \
+	    -e "s/SYMLINKS/${SYMLINKS}/" \
+	    -e "s/SYSVINIT/${SYSVINIT}/" \
+	    -e "s/BINARY_INDICES/${BINARY_INDICES}/" \
+	    -e "s/BOOTAPPEND/${BOOTAPPEND}/" \
+	    -e "s/BOOTLOADER/${BOOTLOADER}/" \
+	    -e "s/DEBIAN_INSTALLER/${DEBIAN_INSTALLER}/" \
+	    -e "s/ENCRYPTION/${ENCRYPTION}/" \
+	    -e "s/HOSTNAME/${HOSTNAME}/" \
+	    -e "s/ISO_APPLICATION/${ISO_APPLICATION}/" \
+	    -e "s/ISO_PREPARER/${ISO_PREPARER}/" \
+	    -e "s/ISO_PUBLISHER/${ISO_PUBLISHER}/" \
+	    -e "s/ISO_VOLUME/${ISO_VOLUME}/" \
+	    -e "s/MEMTEST/${MEMTEST}/" \
+	    -e "s#NET_PATH#${NET_PATH}#" \
+	    -e "s/NET_SERVER/${NET_SERVER}/" \
+	    -e "s/USERNAME/${USERNAME}/" \
+	    -e "s/SOURCE_IMAGES/${SOURCE_IMAGES}/" \
+	    -e "s/SOURCE/${SOURCE}/" \
+	"${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
+BINARY_IMAGES="${BINARY_IMAGES}"
+DISTRIBUTION="${DISTRIBUTION}"
+PACKAGES_LISTS="${PACKAGES_LISTS}"
+PACKAGES="${PACKAGES}"
+
+# Advanced bootstrap options
+ARCHITECTURE="${ARCHITECTURE}"
+MIRROR_BOOTSTRAP_SECURITY="${MIRROR_BOOTSTRAP}"
+MIRROR_BOOTSTRAP="${MIRROR_BOOTSTRAP}"
+MIRROR_BINARY_SECURITY="${MIRROR_BINARY_SECURITY}"
+MIRROR_BINARY="${MIRROR_BINARY}"
+SECTIONS="${SECTIONS}"
+
+# Advanced chroot options
+CHROOT_FILESYSTEM="${CHROOT_FILESYSTEM}"
+LINUX_FLAVOURS="${LINUX_FLAVOURS}"
+SECURITY="${SECURITY}"
+SYMLINKS="${SYMLINKS}"
+SYSVINIT="${SYSVINIT}"
+
+# Advanced binary options
+BINARY_INDICES="${BINARY_INDICES}"
+BOOTAPPEND="${BOOTAPPEND}"
+BOOTLOADER="${BOOTLOADER}"
+DEBIAN_INSTALLER="${DEBIAN_INSTALLER}"
+ENCRYPTION="${ENCRYPTION}"
+HOSTNAME="${HOSTNAME}"
+ISO_APPLICATION="${ISO_APPLICATION}"
+ISO_PREPARER="${ISO_PREPARER}"
+ISO_PUBLISHER="${ISO_PUBLISHER}"
+ISO_VOLUME="${ISO_VOLUME}"
+MEMTEST="${MEMTEST}"
+NET_PATH="${NET_PATH}"
+NET_SERVER="${NET_SERVER}"
+USERNAME="${USERNAME}"
+
+# Advanced source options
+SOURCE_IMAGES="${SOURCE_IMAGES}"
+SOURCE="${SOURCE}"
+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 ${BINARY_IMAGES}|distribution ${DISTRIBUTION}|packages_lists ${PACKAGES_LISTS}|packages ${PACKAGES}|architecture ${ARCHITECTURE}|mirror_bootstrap_security ${MIRROR_BOOTSTRAP}|mirror_bootstrap ${MIRROR_BOOTSTRAP}|mirror_binary_security ${MIRROR_BINARY_SECURITY}|mirror_binary ${MIRROR_BINARY}|sections ${SECTIONS}|chroot_filesystem ${CHROOT_FILESYSTEM}|linux_flavours ${LINUX_FLAVOURS}|security ${SECURITY}|symlinks ${SYMLINKS}|sysvinit ${SYSVINIT}|binary_indices ${BINARY_INDICES}|bootappend ${BOOTAPPEND}|bootloader ${BOOTLOADER}|debian_installer ${DEBIAN_INSTALLER}|encryption ${ENCRYPTION}|hostname ${HOSTNAME}|iso_application ${ISO_APPLICATION}|iso_preparer ${ISO_PREPARER}|iso_publisher ${ISO_PUBLISHER}|iso_volume ${ISO_VOLUME}|memtest ${MEMTEST}|net_path ${NET_PATH}|net_server ${NET_SERVER}|username ${USERNAME}|source_images ${SOURCE_IMAGES}|source ${SOURCE}|" >> /var/log/live
+fi
+
+sed -e "s/VERSION/${VERSION}/" "${TEMPLATES}"/footer.html

Deleted: releases/live-webhelper/1.0~a13-1/scripts/cron
===================================================================
--- dists/trunk/live-webhelper/scripts/cron	2007-06-02 04:06:58 UTC (rev 1915)
+++ releases/live-webhelper/1.0~a13-1/scripts/cron	2007-06-03 13:37:15 UTC (rev 1950)
@@ -1,211 +0,0 @@
-#!/bin/sh
-
-# live-webhelper - web interface to live-helper
-# Copyright (C) 2007 Richard Nelson <rjent at rjent.pair.com>
-# Copyright (C) 2007 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.
-
-# 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
-then
-	for FILE in "${TEMPDIR}"/*.build
-	do
-		# Reading build file
-		. "${FILE}"
-
-		echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-webhelper: begin web build (${BUILD})." >> /var/log/live
-
-		# Assembling standard options
-		if [ -n "${BINARY_IMAGES}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --binary-images ${BINARY_IMAGES}"
-		fi
-
-		if [ -n "${DISTRIBUTION}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --distribution ${DISTRIBUTION}"
-		fi
-
-		if [ -n "${PACKAGES}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --packages ${PACKAGES}"
-		fi
-
-		if [ -n "${PACKAGES_LISTS}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --packages-lists ${PACKAGES_LISTS}"
-		fi
-
-		# Assembling chroot options
-		if [ -n "${CHROOT_FILESYSTEM}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --chroot-filesystem ${CHROOT_FILESYSTEM}"
-		fi
-
-		# Assembling binary options
-		if [ -n "${ISO_APPLICATION}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-application ${ISO_APPLICATION}"
-		fi
-
-		if [ -n "${ISO_PREPARER}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-preparer ${ISO_PREPARER}"
-		fi
-
-		if [ -n "${ISO_PUBLISHER}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-publisher ${ISO_PUBLISHER}"
-		fi
-
-		if [ -n "${ISO_VOLUME}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-volume ${ISO_VOLUME}"
-		fi
-
-		# Assembling other options
-		if [ -n "${MIRROR_BOOTSTRAP}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-bootstrap ${MIRROR_BOOTSTRAP}"
-		fi
-
-		if [ -n "${MIRROR_BOOTSTRAP_SECURITY}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY}"
-		fi
-
-		if [ -n "${MIRROR_BINARY}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-binary ${MIRROR_BINARY}"
-		fi
-
-		if [ -n "${MIRROR_BINARY_SECURITY}" ]
-		then
-			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-binary-security ${MIRROR_BINARY_SECURITY}"
-		fi
-
-		# Creating build directory
-		mkdir -p "${TEMPDIR}"/"${BUILD}"
-
-		DATE_START="`date -R`"
-		echo "Begin: ${DATE_START}" > "${TEMPDIR}"/"${BUILD}"/log.txt
-
-		# Generating image
-		cd "${TEMPDIR}"/"${BUILD}"
-		make-live ${LIVE_OPTIONS} >> "${TEMPDIR}"/"${BUILD}"/log.txt 2>&1
-		ERROR="${?}"
-
-		DATE_END="`date -R`"
-		echo "End: ${DATE_END}" >> "${TEMPDIR}"/"${BUILD}"/log.txt
-
-		# Creating image directory
-		mkdir -p "${DESTDIR}"/"${BUILD}"
-
-		# Creating mail
-		if [ "${ERROR}" -eq "0" ]
-		then
-			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/maybe-successful/" \
-			    -e "s#SERVER#${SERVER}#" \
-			"${TEMPLATES}"/mail.txt > "${DESTDIR}"/"${BUILD}"/mail.txt
-		else
-			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/maybe-failed/" \
-			    -e "s#SERVER#${SERVER}#" \
-			"${TEMPLATES}"/mail.txt > "${DESTDIR}"/"${BUILD}"/mail.txt
-		fi
-
-		# Moving binary image
-		if ls "${TEMPDIR}"/"${BUILD}"/debian-live/binary.* > /dev/null 2>&1
-		then
-			mv "${TEMPDIR}"/"${BUILD}"/debian-live/binary.* "${DESTDIR}"/"${BUILD}"
-		fi
-
-		# Moving source image
-		if ls "${TEMPDIR}"/"${BUILD}"/debian-live/source.* > /dev/null 2>&1
-		then
-			mv "${TEMPDIR}"/"${BUILD}"/debian-live/source.* "${DESTDIR}"/"${BUILD}"
-		fi
-
-		# Moving build
-		mv "${TEMPDIR}"/"${BUILD}".build "${DESTDIR}"/"${BUILD}"/build
-
-		# Moving log
-		mv "${TEMPDIR}"/"${BUILD}"/log.txt "${DESTDIR}"/"${BUILD}"
-
-		# Generating md5sum
-		cd "${DESTDIR}"/"${BUILD}"
-		md5sum * > md5sum.txt
-		cd "${OLDPWD}"
-
-		# Sending mail
-		cat "${DESTDIR}"/"${BUILD}"/mail.txt | /usr/sbin/sendmail -t
-
-		# Unmounting proc
-		if [ -f "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/proc/version ]
-		then
-			umount "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/proc
-		fi
-
-		# Unmounting sysfs
-		if [ -d "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/sys/kernel ]
-		then
-			umount "${TEMPDIR}"/${BUILD}/debian-live/chroot/sys
-		fi
-
-		# Removing build directory
-		rm -rf "${TEMPDIR}"/"${BUILD}"
-
-		echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-webhelper: end web build (${BUILD})." >> /var/log/live
-	done
-fi

Copied: releases/live-webhelper/1.0~a13-1/scripts/cron (from rev 1942, dists/trunk/live-webhelper/scripts/cron)
===================================================================
--- releases/live-webhelper/1.0~a13-1/scripts/cron	                        (rev 0)
+++ releases/live-webhelper/1.0~a13-1/scripts/cron	2007-06-03 13:37:15 UTC (rev 1950)
@@ -0,0 +1,211 @@
+#!/bin/sh
+
+# live-webhelper - web interface to live-helper
+# Copyright (C) 2007 Richard Nelson <rjent at rjent.pair.com>
+# Copyright (C) 2007 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.
+
+# 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
+then
+	for FILE in "${TEMPDIR}"/*.build
+	do
+		# Reading build file
+		. "${FILE}"
+
+		echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-webhelper: begin web build (${BUILD})." >> /var/log/live
+
+		# Assembling standard options
+		if [ -n "${BINARY_IMAGES}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --binary-images ${BINARY_IMAGES}"
+		fi
+
+		if [ -n "${DISTRIBUTION}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --distribution ${DISTRIBUTION}"
+		fi
+
+		if [ -n "${PACKAGES}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --packages ${PACKAGES}"
+		fi
+
+		if [ -n "${PACKAGES_LISTS}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --packages-lists ${PACKAGES_LISTS}"
+		fi
+
+		# Assembling chroot options
+		if [ -n "${CHROOT_FILESYSTEM}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --chroot-filesystem ${CHROOT_FILESYSTEM}"
+		fi
+
+		# Assembling binary options
+		if [ -n "${ISO_APPLICATION}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-application ${ISO_APPLICATION}"
+		fi
+
+		if [ -n "${ISO_PREPARER}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-preparer ${ISO_PREPARER}"
+		fi
+
+		if [ -n "${ISO_PUBLISHER}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-publisher ${ISO_PUBLISHER}"
+		fi
+
+		if [ -n "${ISO_VOLUME}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --iso-volume ${ISO_VOLUME}"
+		fi
+
+		# Assembling other options
+		if [ -n "${MIRROR_BOOTSTRAP}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-bootstrap ${MIRROR_BOOTSTRAP}"
+		fi
+
+		if [ -n "${MIRROR_BOOTSTRAP_SECURITY}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-bootstrap-security ${MIRROR_BOOTSTRAP_SECURITY}"
+		fi
+
+		if [ -n "${MIRROR_BINARY}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-binary ${MIRROR_BINARY}"
+		fi
+
+		if [ -n "${MIRROR_BINARY_SECURITY}" ]
+		then
+			LIVE_OPTIONS="${LIVE_OPTIONS} --mirror-binary-security ${MIRROR_BINARY_SECURITY}"
+		fi
+
+		# Creating build directory
+		mkdir -p "${TEMPDIR}"/"${BUILD}"
+
+		DATE_START="`date -R`"
+		echo "Begin: ${DATE_START}" > "${TEMPDIR}"/"${BUILD}"/log
+
+		# Generating image
+		cd "${TEMPDIR}"/"${BUILD}"
+		make-live ${LIVE_OPTIONS} >> "${TEMPDIR}"/"${BUILD}"/log 2>&1
+		ERROR="${?}"
+
+		DATE_END="`date -R`"
+		echo "End: ${DATE_END}" >> "${TEMPDIR}"/"${BUILD}"/log
+
+		# Creating image directory
+		mkdir -p "${DESTDIR}"/"${BUILD}"
+
+		# Creating mail
+		if [ "${ERROR}" -eq "0" ]
+		then
+			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/maybe-successful/" \
+			    -e "s#SERVER#${SERVER}#" \
+			"${TEMPLATES}"/mail.txt > "${DESTDIR}"/"${BUILD}"/mail
+		else
+			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/maybe-failed/" \
+			    -e "s#SERVER#${SERVER}#" \
+			"${TEMPLATES}"/mail.txt > "${DESTDIR}"/"${BUILD}"/mail
+		fi
+
+		# Moving binary image
+		if ls "${TEMPDIR}"/"${BUILD}"/debian-live/binary.* > /dev/null 2>&1
+		then
+			mv "${TEMPDIR}"/"${BUILD}"/debian-live/binary.* "${DESTDIR}"/"${BUILD}"
+		fi
+
+		# Moving source image
+		if ls "${TEMPDIR}"/"${BUILD}"/debian-live/source.* > /dev/null 2>&1
+		then
+			mv "${TEMPDIR}"/"${BUILD}"/debian-live/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 proc
+		if [ -f "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/proc/version ]
+		then
+			umount "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/proc
+		fi
+
+		# Unmounting sysfs
+		if [ -d "${TEMPDIR}"/"${BUILD}"/debian-live/chroot/sys/kernel ]
+		then
+			umount "${TEMPDIR}"/${BUILD}/debian-live/chroot/sys
+		fi
+
+		# Removing build directory
+		rm -rf "${TEMPDIR}"/"${BUILD}"
+
+		echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-webhelper: end web build (${BUILD})." >> /var/log/live
+	done
+fi




More information about the Debian-live-changes mailing list