Commit 21cb43c0 authored by Daniel Baumann's avatar Daniel Baumann
Browse files

Adding upstream version 4.0~a1.

parent cc9c082a
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org>
## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
......
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org>
## Copyright (C) 2006-2012 Daniel Baumann <daniel@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
......@@ -30,9 +30,10 @@ then
man live-build
exit 0
else
Echo "live-build contains the scripts to build a Debian Live system from a configuration directory."
Echo "live-build is a set of scripts to build Debian Live system images."
echo
Echo "The idea behind live-build is a framework that uses a configuration directory to completely automate and customize all aspects of building a Live image."
echo
Echo "An introduction to live-build can be found in the live-build(7) manpage."
exit 0
fi
The grub splash for Debian Live was made by Daniel Baumann <daniel@debian.org>
based on the original work of Mark Riedesel.
The contribution of Daniel is hereby placed in the public domain (no rights
reserved).
---------------
http://dugnet.com/klown/pics/klowner_debboot.png
by Mark Riedesel, license same as open use logo
To create klowner.rle:
1. convert klowner.png klowner.bmp
2. bmptoppm < klowner.bmp | ppmtolss16 #FBFDFA=7 > klowner.rle
(FBFDFA is the color used for the inside of the "n" in Debian.)
---------------
Debian Open Use Logo License
Copyright (c) 1999 Software in the Public Interest
This logo or a modified version may be used by anyone to refer to the Debian
project, but does not indicate endorsement by the project.
Note: we would appreciate that you make the image a link to
http://www.debian.org/ if you use it on a web page.
#!/bin/sh
set -e
lb build noauto "${@}" 2>&1 | tee build.log
#!/bin/sh
set -e
lb clean noauto "${@}"
rm -f config/binary config/bootstrap config/chroot config/common config/source
......
#!/bin/sh
set -e
lb config noauto \
"${@}"
binary/
binary*.iso
binary*.img
binary*.tar*
binary*.contents
binary*.packages
binary*.zsync
.build/
build.log
cache/
chroot/
chroot.packages.*
config/binary
config/bootstrap
config/chroot
config/common
config/source
source/
source*.iso
source*.img
source*.tar*
source*.contents
source*.packages
source*.zsync
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org>
## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
......
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org>
## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
......@@ -31,7 +31,7 @@ done
apt-get autoremove --yes || true
# Removing unused files
find . -name *~ -print0 | xargs -0 rm -f
find . -name *~ | xargs rm -f
rm -rf /usr/include/*
#rm -rf /usr/share/groff/*
......
#!/bin/sh
# This is a hook for live-build(7) to install localepurge.
# To enable it, copy or symlink this hook into your config/chroot_local-hooks
# directory.
#
_PURGE=""
if [ ! -x "$(which symlinks 2>/dev/null)" ]
then
_PURGE="true"
apt-get install symlinks
fi
symlinks -c -r -s /
if [ "${_PURGE}" = "true" ]
then
apt-get remove --purge symlinks
fi
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org>
## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
......@@ -22,8 +22,8 @@ fi
_HOSTNAME="$(hostname -f)"
# Turn on debug if true
if [ "${_DEBUG}" = "true" ]
# Turn on debug if enabled
if [ "${_DEBUG}" = "enabled" ]
then
set -x
fi
......@@ -32,14 +32,6 @@ fi
echo "Content-type: text/html"
echo
#QUERY_STRING=`cat /dev/stdin`
QUERY_STRING=$(cat /dev/stdin)
# 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' -e 's/%3D/=/g' -e 's/%2B/+/g')
# Debug the filtering string
# echo ${QUERY_STRING}
# Sending html header
cat "${_TEMPLATES}"/header.html
......@@ -60,6 +52,11 @@ else
# Converting '=': sed 's/%3D/=/g'
# Converting '+': sed 's/%2B/+/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' -e 's/%3D/=/g' -e 's/%2B/+/g')
# Debug the filtering string
# echo ${QUERY_STRING}
# Email
_EMAIL=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])email=[-0-9a-zA-Z._@]+' | cut -f 2 -d '=' | head -n1)
......@@ -67,7 +64,8 @@ else
_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=$(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)
......
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org>
## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
......@@ -20,15 +20,15 @@ else
fi
# Exit if disabled
if [ "${_WEBBUILD}" != "true" ]
if [ "${_WEBBUILD}" != "enabled" ]
then
exit 0
fi
_HOSTNAME="$(hostname -f)"
# Turn on debug if true
if [ "${_DEBUG}" = "true" ]
# Turn on debug if enabled
if [ "${_DEBUG}" = "enabled" ]
then
set -x
fi
......@@ -63,57 +63,47 @@ then
# Pull in variables from the build file.
. "${_FILE}"
# 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_GIT} "${_TEMPDIR}"/"${_BUILD}" >> /var/log/live
git clone ${_LB_CONFIG} "${_TEMPDIR}"/"${_BUILD}" >> /var/log/live
_ERRORGIT="${?}"
# Sanity check to default to something since we are going to build from git clone.
if [ -z "${_LB_CONFIG}" ]
then
_LB_CONFIG="standard"
fi
# Now set a variable for the correct build path
_BUILD_PATH="${_TEMPDIR}/${_BUILD}/images/${_LB_CONFIG}"
_DATE_START="`date -R`"
echo "Begin live-build-cgi: ${_DATE_START}" > "${_BUILD_PATH}"/log
echo "Info live-build-cgi: Config tree cloned from ${_LB_GIT} for build ${_BUILD}" >> "${_BUILD_PATH}"/log
# 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
# Creating directory for the config/package-lists
mkdir -p "${_BUILD_PATH}"/config/package-lists
mkdir -p "${_TEMPDIR}"/"${_BUILD}"/config/package-lists
# Add cgipackages.list.chroot
if [ -n "${_LB_CGIPACKAGES}" ]
then
echo "${_LB_CGIPACKAGES}" > "${_BUILD_PATH}"/config/package-lists/cgipackages.list.chroot
echo "${_LB_CGIPACKAGES}" > "${_TEMPDIR}"/"${_BUILD}"/config/package-lists/cgipackages.list.chroot
fi
_DATE_START="`date -R`"
echo "Begin: ${_DATE_START}" > "${_TEMPDIR}"/"${_BUILD}"/log
# Generating config here
if [ "${_ERRORGIT}" -eq "0" ]
then
cd "${_BUILD_PATH}"
cd "${_TEMPDIR}"/"${_BUILD}"
# 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 "${LB_ARCHITECTURES}" --archive-areas "${LB_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 --distribution "${LB_DISTRIBUTION}" --architectures "${LB_ARCHITECTURES}" --archive-areas "${LB_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
echo "Config stage skipped. The git clone produced an error: ${_ERRORGIT}" > "${_TEMPDIR}"/"${_BUILD}"/log
fi
# Run build if config went ok
if [ "${_ERRORCONFIG}" -eq "0" ]
then
lb build >> "${_BUILD_PATH}"/log 2>&1
lb build >> "${_TEMPDIR}"/"${_BUILD}"/log 2>&1
_ERRORBUILD="${?}"
else
echo "Build stage skipped. Config produced an error: ${_ERRORCONFIG}" >> "${_BUILD_PATH}"/log
echo "Build stage skipped. Config produced an error: ${_ERRORCONFIG}" > "${_TEMPDIR}"/"${_BUILD}"/log
fi
_DATE_END="`date -R`"
echo "End: ${_DATE_END}" >> "${_BUILD_PATH}"/log
echo "End: ${_DATE_END}" >> "${_TEMPDIR}"/"${_BUILD}"/log
# Creating image directory
mkdir -p "${_DESTDIR}"/"${_BUILD}"
......@@ -149,23 +139,23 @@ EOF
# Moving binary image
#if ls "${_TEMPDIR}"/"${_BUILD}"/binary*.* > /dev/null 2>&1
if Find_files ${_BUILD_PATH}/binary*.*
if Find_files ${_TEMPDIR}/${_BUILD}/binary*.*
then
mv "${_BUILD_PATH}"/binary*.* "${_DESTDIR}"/"${_BUILD}"
mv "${_TEMPDIR}"/"${_BUILD}"/binary*.* "${_DESTDIR}"/"${_BUILD}"
fi
# Moving source image
#if ls "${_TEMPDIR}"/"${_BUILD}"/source.* > /dev/null 2>&1
if Find_files ${_BUILD_PATH}/source.*
if Find_files ${_TEMPDIR}/${_BUILD}/source.*
then
mv "${_BUILD_PATH}"/source.* "${_DESTDIR}"/"${_BUILD}"
mv "${_TEMPDIR}"/"${_BUILD}"/source.* "${_DESTDIR}"/"${_BUILD}"
fi
# Moving build
mv "${_TEMPDIR}"/"${_BUILD}".build "${_DESTDIR}"/"${_BUILD}"/build
# Moving log
mv "${_BUILD_PATH}"/log "${_DESTDIR}"/"${_BUILD}"
mv "${_TEMPDIR}"/"${_BUILD}"/log "${_DESTDIR}"/"${_BUILD}"
# Generating md5sum
cd "${_DESTDIR}"/"${_BUILD}"
......@@ -177,21 +167,21 @@ EOF
# Unmounting devpts-live
#if ls "${_TEMPDIR}"/"${_BUILD}"/chroot/dev/pts/* > /dev/null 2>&1
if Find_files ${_BUILD_PATH}/chroot/dev/pts/*
if Find_files ${_TEMPDIR}/${_BUILD}/chroot/dev/pts/*
then
umount "${_BUILD_PATH}"/chroot/dev/pts
umount "${_TEMPDIR}"/${_BUILD}/chroot/dev/pts
fi
# Unmounting proc
if [ -f "${_BUILD_PATH}"/chroot/proc/version ]
if [ -f "${_TEMPDIR}"/"${_BUILD}"/chroot/proc/version ]
then
umount "${_BUILD_PATH}"/chroot/proc
umount "${_TEMPDIR}"/"${_BUILD}"/chroot/proc
fi
# Unmounting sysfs
if [ -d "${_BUILD_PATH}"/chroot/sys/kernel ]
if [ -d "${_TEMPDIR}"/"${_BUILD}"/chroot/sys/kernel ]
then
umount "${_BUILD_PATH}"/chroot/sys
umount "${_TEMPDIR}"/${_BUILD}/chroot/sys
fi
# Removing build directory
......
# Defaults for /etc/cron.daily/live-build-cgi
_WEBBUILD="false"
_WEBBUILD="disabled"
_MODE="debian"
_DEBUG="false"
_DEBUG="disabled"
_DESTDIR="/srv/debian-live/build/www"
_TEMPLATES="/usr/share/live/build/templates/cgi/${_MODE}"
_TEMPDIR="/srv/debian-live/build/tmp"
_SERVER="http://live.debian.net/build"
_LB_GIT="git://live-systems.org/git/live-images.git"
_CGI_CONFIG_APPEND=""
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org>
## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
......
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org>
## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org>
##
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment