summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Nelson <unixabg@gmail.com>2014-06-22 12:15:39 -0500
committerRichard Nelson <unixabg@gmail.com>2014-06-22 12:15:39 -0500
commitca941152b4b2e3d474f251a5058df7d11741b0f9 (patch)
tree68a1a9704c9ff025eb1bfa02983f30c5f5be7949
parent846e8a079578507f576f6cb9e2628cb8ff8ca138 (diff)
downloadvyos-live-build-ca941152b4b2e3d474f251a5058df7d11741b0f9.tar.gz
vyos-live-build-ca941152b4b2e3d474f251a5058df7d11741b0f9.zip
Add --apt option on frontend/cgi.
-rwxr-xr-xfrontend/cgi/live-build-cgi5
-rwxr-xr-xfrontend/cgi/live-build-cgi.cron2
-rw-r--r--templates/cgi/debian/build.html1
-rw-r--r--templates/cgi/debian/form.html9
4 files changed, 15 insertions, 2 deletions
diff --git a/frontend/cgi/live-build-cgi b/frontend/cgi/live-build-cgi
index 15326df08..b68d34c39 100755
--- a/frontend/cgi/live-build-cgi
+++ b/frontend/cgi/live-build-cgi
@@ -78,6 +78,7 @@ else
# Standard options
LIVE_IMAGE_TYPE=$(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)
+ LB_APT=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])apt=[a-u]+' | cut -f 2 -d '=' | head -n1)
# Advanced bootstrap options
LIVE_IMAGE_ARCHITECTURE=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])architectures=[0-9a-z]+' | cut -f 2 -d '=' | head -n1)
@@ -135,6 +136,7 @@ else
-e "s/LIVE_IMAGE_TYPE/${LIVE_IMAGE_TYPE}/" \
-e "s/LB_DISTRIBUTION/${LB_DISTRIBUTION}/" \
-e "s#_LB_CONFIG#${_LB_CONFIG}#" \
+ -e "s/LB_APT/${LB_APT}/" \
-e "s/_LB_CGIPACKAGES/${_LB_CGIPACKAGES}/" \
-e "s/LIVE_IMAGE_ARCHITECTURE/${LIVE_IMAGE_ARCHITECTURE}/" \
-e "s/LIVE_IMAGE_ARCHIVE_AREAS/${LIVE_IMAGE_ARCHIVE_AREAS}/" \
@@ -180,6 +182,7 @@ _LB_CONFIG="${_LB_CONFIG}"
# Standard options
LIVE_IMAGE_TYPE="${LIVE_IMAGE_TYPE}"
LB_DISTRIBUTION="${LB_DISTRIBUTION}"
+LB_APT="${LB_APT}"
# Advanced bootstrap options
LIVE_IMAGE_ARCHITECTURE="${LIVE_IMAGE_ARCHITECTURE}"
@@ -211,7 +214,7 @@ LB_SOURCE="${LB_SOURCE}"
EOF
echo "$(date +%b\ %d\ %H:%M:%S) ${_HOSTNAME} live-build-cgi: add web build (${_BUILD}) from ${REMOTE_ADDR}." >> /var/log/live/live-build-request
- echo "$(date +%b\ %d\ %H:%M:%S) ${_HOSTNAME} live-build-cgi: options ${_BUILD} |email ${_EMAIL}|binary_images ${LIVE_IMAGE_TYPE}|distribution ${LB_DISTRIBUTION}|config ${_LB_CONFIG}|cgipackages ${_LB_CGIPACKAGES}|architectures ${LIVE_IMAGE_ARCHITECTURE}|archive_areas ${LIVE_IMAGE_ARCHIVE_AREAS}|chroot_filesystem ${LB_CHROOT_FILESYSTEM}|linux_flavours ${LB_LINUX_FLAVOURS}|security ${LB_SECURITY}|apt_indices ${LB_APT_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}" >> /var/log/live/live-build-request
+ echo "$(date +%b\ %d\ %H:%M:%S) ${_HOSTNAME} live-build-cgi: options ${_BUILD} |email ${_EMAIL}|binary_images ${LIVE_IMAGE_TYPE}|distribution ${LB_DISTRIBUTION}|config ${_LB_CONFIG}|apt ${LB_APT}|cgipackages ${_LB_CGIPACKAGES}|architectures ${LIVE_IMAGE_ARCHITECTURE}|archive_areas ${LIVE_IMAGE_ARCHIVE_AREAS}|chroot_filesystem ${LB_CHROOT_FILESYSTEM}|linux_flavours ${LB_LINUX_FLAVOURS}|security ${LB_SECURITY}|apt_indices ${LB_APT_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}" >> /var/log/live/live-build-request
fi
sed -e "s/VERSION/${VERSION}/" "${_TEMPLATES}"/footer.html
diff --git a/frontend/cgi/live-build-cgi.cron b/frontend/cgi/live-build-cgi.cron
index fa3599f81..b5e81c6cd 100755
--- a/frontend/cgi/live-build-cgi.cron
+++ b/frontend/cgi/live-build-cgi.cron
@@ -102,7 +102,7 @@ then
then
cd "${_BUILD_PATH}"
# Do config with git and stack on config file params to build
- lb config ${_CGI_CONFIG_APPEND} --distribution "${LB_DISTRIBUTION}" --binary-images "${LB_BINARY_IMAGES}" --architectures "${LIVE_IMAGE_ARCHITECTURE}" --archive-areas "${LIVE_IMAGE_ARCHIVE_AREAS}" --chroot-filesystem "${LB_CHROOT_FILESYSTEM}" --linux-flavours "${LB_LINUX_FLAVOURS}" --security "${LB_SECURITY}" --apt-indices "${LB_APT_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-root-path "${LB_NET_ROOT_PATH}" --net-root-server "${LB_NET_ROOT_SERVER}" --source-images "${LB_SOURCE_IMAGES}" --source "${LB_SOURCE}"
+ lb config ${_CGI_CONFIG_APPEND} --apt "${LB_APT}" --distribution "${LB_DISTRIBUTION}" --binary-images "${LB_BINARY_IMAGES}" --architectures "${LIVE_IMAGE_ARCHITECTURE}" --archive-areas "${LIVE_IMAGE_ARCHIVE_AREAS}" --chroot-filesystem "${LB_CHROOT_FILESYSTEM}" --linux-flavours "${LB_LINUX_FLAVOURS}" --security "${LB_SECURITY}" --apt-indices "${LB_APT_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-root-path "${LB_NET_ROOT_PATH}" --net-root-server "${LB_NET_ROOT_SERVER}" --source-images "${LB_SOURCE_IMAGES}" --source "${LB_SOURCE}"
_ERRORCONFIG="${?}"
else
echo "Config stage skipped. The git clone produced an error: ${_ERRORGIT}" >> "${_BUILD_PATH}"/log
diff --git a/templates/cgi/debian/build.html b/templates/cgi/debian/build.html
index 6d4062451..b16e35a9e 100644
--- a/templates/cgi/debian/build.html
+++ b/templates/cgi/debian/build.html
@@ -15,6 +15,7 @@
<tr><td>--binary-image: </td><td>LIVE_IMAGE_TYPE</td></tr>
<tr><td>--distribution: </td><td>LB_DISTRIBUTION</td></tr>
<tr><td>--config: </td><td>_LB_CONFIG</td></tr>
+ <tr><td>--apt: </td><td>LB_APT</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 46991c573..77dd81236 100644
--- a/templates/cgi/debian/form.html
+++ b/templates/cgi/debian/form.html
@@ -56,6 +56,15 @@
</td>
</tr>
<tr>
+ <td><label for="Apt">--apt:</label> </td>
+ <td>
+ <select id="Apt" name="apt" size="1" >
+ <option selected value="apt">apt</option>
+ <option value="aptitude">aptitude</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
<td><label for="Packages">cgipackages.list.chroot:</label> </td>
<td><input id="Packages" name="cgipackages" maxlength="2000" size="50" type="text" /></td>
</tr>