summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfrontends/cgi/live-build-cgi10
-rwxr-xr-xfrontends/cgi/live-build-cgi.cron12
-rw-r--r--templates/cgi/debian/build.html1
-rw-r--r--templates/cgi/debian/form.html13
4 files changed, 33 insertions, 3 deletions
diff --git a/frontends/cgi/live-build-cgi b/frontends/cgi/live-build-cgi
index 4b3e86b7f..6d22c383b 100755
--- a/frontends/cgi/live-build-cgi
+++ b/frontends/cgi/live-build-cgi
@@ -63,6 +63,10 @@ else
# CGI Packages List
_LB_CGIPACKAGES=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])cgipackages=[-0-9a-zA-Z. _+]+' | cut -f 2 -d '=' | head -n1)
+ # CGI Config for git
+ _LB_CONFIG=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])config=[-a-z.]+' | cut -f 2 -d '=' | head -n1)
+ _LB_CONFIG="git://live.debian.net/git/${_LB_CONFIG}"
+
# Standard options
LB_BINARY_IMAGES=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])binary_images=[-a-z]+' | cut -f 2 -d '=' | head -n1)
LB_DISTRIBUTION=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])distribution=[a-z]+' | cut -f 2 -d '=' | head -n1)
@@ -127,6 +131,7 @@ else
-e "s/QUEUENUM/${_QUEUENUM}/" \
-e "s/LB_BINARY_IMAGES/${LB_BINARY_IMAGES}/" \
-e "s/LB_DISTRIBUTION/${LB_DISTRIBUTION}/" \
+ -e "s#_LB_CONFIG#${_LB_CONFIG}#" \
-e "s/_LB_CGIPACKAGES/${_LB_CGIPACKAGES}/" \
-e "s/LB_ARCHITECTURES/${LB_ARCHITECTURES}/" \
-e "s/LB_BOOTSTRAP_FLAVOUR/${LB_BOOTSTRAP_FLAVOUR}/" \
@@ -169,6 +174,9 @@ REMOTE_ADDR="${REMOTE_ADDR}"
# CGI Packages List
_LB_CGIPACKAGES="${_LB_CGIPACKAGES}"
+# CGI Config for git
+_LB_CONFIG="${_LB_CONFIG}"
+
# Standard options
LB_BINARY_IMAGES="${LB_BINARY_IMAGES}"
LB_DISTRIBUTION="${LB_DISTRIBUTION}"
@@ -213,7 +221,7 @@ LB_MODE="debian"
EOF
echo "$(date +%b\ %d\ %H:%M:%S) ${_HOSTNAME} live-build-cgi: add web build (${_BUILD}) from ${REMOTE_ADDR}." >> /var/log/live
- echo "$(date +%b\ %d\ %H:%M:%S) ${_HOSTNAME} live-build-cgi: options ${_BUILD} |email ${_EMAIL}|binary_images ${LB_BINARY_IMAGES}|distribution ${LB_DISTRIBUTION}|cgipackages ${_LB_CGIPACKAGES}|architectures ${LB_ARCHITECTURES}|archive_areas ${LB_ARCHIVE_AREAS}|chroot_filesystem ${LB_CHROOT_FILESYSTEM}|linux_flavours ${LB_LINUX_FLAVOURS}|security ${LB_SECURITY}|binary_indices ${LB_BINARY_INDICES}|bootappend_install ${LB_BOOTAPPEND_INSTALL}|bootappend_live ${LB_BOOTAPPEND_LIVE}|bootloader ${LB_BOOTLOADER}|debian_installer ${LB_DEBIAN_INSTALLER}|iso_application ${LB_ISO_APPLICATION}|iso_preparer ${LB_ISO_PREPARER}|iso_publisher ${LB_ISO_PUBLISHER}|iso_volume ${LB_ISO_VOLUME}|memtest ${LB_MEMTEST}|net_path ${LB_NET_ROOT_PATH}|net_server ${LB_NET_ROOT_SERVER}|source_images ${LB_SOURCE_IMAGES}|sources ${LB_SOURCE}|custom_bootstrap ${_CUSTOM_BOOTSTRAP}|custom_binary ${_CUSTOM_BINARY}" >> /var/log/live
+ echo "$(date +%b\ %d\ %H:%M:%S) ${_HOSTNAME} live-build-cgi: options ${_BUILD} |email ${_EMAIL}|binary_images ${LB_BINARY_IMAGES}|distribution ${LB_DISTRIBUTION}|config ${_LB_CONFIG}|cgipackages ${_LB_CGIPACKAGES}|architectures ${LB_ARCHITECTURES}|archive_areas ${LB_ARCHIVE_AREAS}|chroot_filesystem ${LB_CHROOT_FILESYSTEM}|linux_flavours ${LB_LINUX_FLAVOURS}|security ${LB_SECURITY}|binary_indices ${LB_BINARY_INDICES}|bootappend_install ${LB_BOOTAPPEND_INSTALL}|bootappend_live ${LB_BOOTAPPEND_LIVE}|bootloader ${LB_BOOTLOADER}|debian_installer ${LB_DEBIAN_INSTALLER}|iso_application ${LB_ISO_APPLICATION}|iso_preparer ${LB_ISO_PREPARER}|iso_publisher ${LB_ISO_PUBLISHER}|iso_volume ${LB_ISO_VOLUME}|memtest ${LB_MEMTEST}|net_path ${LB_NET_ROOT_PATH}|net_server ${LB_NET_ROOT_SERVER}|source_images ${LB_SOURCE_IMAGES}|sources ${LB_SOURCE}|custom_bootstrap ${_CUSTOM_BOOTSTRAP}|custom_binary ${_CUSTOM_BINARY}" >> /var/log/live
fi
sed -e "s/VERSION/${VERSION}/" "${_TEMPLATES}"/footer.html
diff --git a/frontends/cgi/live-build-cgi.cron b/frontends/cgi/live-build-cgi.cron
index 876cec0d1..0035438e5 100755
--- a/frontends/cgi/live-build-cgi.cron
+++ b/frontends/cgi/live-build-cgi.cron
@@ -68,6 +68,8 @@ then
_EMAIL=`awk -F\" '/^_EMAIL=/{print $2}' ${_FILE}`
# Pull in cgipackages for config/package-lists/cgipackages.list.chroot
_LB_CGIPACKAGES=`awk -F\" '/^_LB_CGIPACKAGES=/{print $2}' ${_FILE}`
+ # Pull in config for git clone
+ _LB_CONFIG=`awk -F\" '/^_LB_CONFIG=/{print $2}' ${_FILE}`
# Pull in the remote address, atchitecture, distribution, and package-lists.
_REMOTE_ADDR=`awk -F\" '/^REMOTE_ADDR=/{print $2}' ${_FILE}`
_LB_ARCHITECTURES=`awk -F\" '/^LB_ARCHITECTURES=/{print $2}' ${_FILE}`
@@ -80,6 +82,10 @@ then
# Drop out some build data for information if something goes wrong.
echo "`date +%b\ %d\ %H:%M:%S` ${_HOSTNAME} live-build-cgi: begin web build (${_BUILD})." >> /var/log/live
+ # Clone the git config to target build directory
+ git clone ${_LB_CONFIG} "${_TEMPDIR}"/"${_BUILD}" >> /var/log/live
+ _ERRORGIT="${?}"
+
# Creating build directory and the config/package-lists
mkdir -p "${_TEMPDIR}"/"${_BUILD}"/config/package-lists
@@ -106,10 +112,12 @@ then
_DATE_START="`date -R`"
echo "Begin: ${_DATE_START}" > "${_TEMPDIR}"/"${_BUILD}"/log
- # Generating image
+ # Generating image here
cd "${_TEMPDIR}"/"${_BUILD}"
+ # Stack on config file params to build dir
lb config -c ${_FILE} >> "${_TEMPDIR}"/"${_BUILD}"/log 2>&1
_ERRORCONFIG="${?}"
+ # Run build
lb build >> "${_TEMPDIR}"/"${_BUILD}"/log 2>&1
_ERRORBUILD="${?}"
@@ -120,7 +128,7 @@ then
mkdir -p "${_DESTDIR}"/"${_BUILD}"
# Creating mail and logging.
- if [ "${_ERRORCONFIG}" -eq "0" ] && [ "${_ERRORBUILD}" -eq "0" ]
+ if [ "${_ERRORGIT}" -eq "0" ] && [ "${_ERRORCONFIG}" -eq "0" ] && [ "${_ERRORBUILD}" -eq "0" ]
then
_STATUS="maybe-successful"
echo "${_REMOTE_ADDR} - - `date +[%d/%b/%Y:%H:%m:%S\ %z]` \"${_BUILD} ${_LB_ARCHITECTURES}/${_LB_DISTRIBUTION}/${_LB_CGIPACKAGES}\" 200 - \"-\" \"\"">>/var/log/live-cgi.builds
diff --git a/templates/cgi/debian/build.html b/templates/cgi/debian/build.html
index efd567fdc..d819fa8d3 100644
--- a/templates/cgi/debian/build.html
+++ b/templates/cgi/debian/build.html
@@ -14,6 +14,7 @@
<tr><td>Email: </td><td>EMAIL</td></tr>
<tr><td>--binary-image: </td><td>LB_BINARY_IMAGES</td></tr>
<tr><td>--distribution: </td><td>LB_DISTRIBUTION</td></tr>
+ <tr><td>--config: </td><td>_LB_CONFIG</td></tr>
<tr><td>cgipackages.list.chroot: </td><td>_LB_CGIPACKAGES</td><tr>
</table>
diff --git a/templates/cgi/debian/form.html b/templates/cgi/debian/form.html
index 448a27fa3..9912f4e52 100644
--- a/templates/cgi/debian/form.html
+++ b/templates/cgi/debian/form.html
@@ -45,6 +45,19 @@
</td>
</tr>
<tr>
+ <td><label for="Config">--config:</label> </td>
+ <td>
+ <select id="Config" name="config" size="1" >
+ <option value="config-gnome-desktop.git">GNOME Desktop</option>
+ <option value="config-kde-desktop.git">KDE Desktop</option>
+ <option value="config-lxde-desktop.git">LXDE Desktop</option>
+ <option value="config-rescue.git">Rescue</option>
+ <option selected value="config-standard.git">Standard</option>
+ <option value="config-xfce-desktop.git">Xfce Desktop</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
<td><label for="Packages">cgipackages.list.chroot:</label> </td>
<td><input id="Packages" name="cgipackages" maxlength="256" size="50" type="text" /></td>
</tr>