Compare commits

..

2 Commits

Author SHA1 Message Date
Daniel Baumann 3de9626c27 Adding support for virtualbox binary images (incomplete). 2011-04-05 15:51:09 +02:00
Daniel Baumann 87f788b31d Enabling xz compression for squashfs by default. 2011-03-25 15:57:44 +01:00
824 changed files with 165421 additions and 35759 deletions

View File

@ -2,9 +2,9 @@
SHELL := sh -e
LANGUAGES = $(shell cd manpages/po && ls)
LANGUAGES = de
SCRIPTS = frontend/* functions/* examples/auto/* examples/hooks/*.chroot examples/hooks/reproducible/*.chroot scripts/*.sh scripts/*/* share/bin/* share/hooks/*/*
SCRIPTS = cgi/* functions/* examples/*/*.sh examples/auto/* scripts/*.sh scripts/*/*
all: build
@ -19,17 +19,18 @@ test:
@echo " done."
@# We can't just fail yet on bashisms (FIXME)
@echo -n "Checking for bashisms"
@if [ -x /usr/bin/checkbashisms ]; \
then \
for SCRIPT in $(SCRIPTS); \
do \
checkbashisms -f -x $${SCRIPT}; \
checkbashisms -f -x $${SCRIPT} || true; \
echo -n "."; \
done; \
else \
echo "WARNING: Skipping bashism test - you need to install devscripts."; \
echo "WARNING: skipping bashism test - you need to install devscripts."; \
fi
@echo " done."
@ -40,20 +41,15 @@ build:
install:
# Installing shared data
mkdir -p $(DESTDIR)/usr/share/live/build
cp -r data functions $(DESTDIR)/usr/share/live/build
sed -e 's/.*(\(.*\)).*/\1/; s/^[0-9]://; q' debian/changelog >$(DESTDIR)/usr/share/live/build/VERSION
cp -r share/* $(DESTDIR)/usr/share/live/build
cp -r cgi data examples functions scripts hooks includes lists repositories templates $(DESTDIR)/usr/share/live/build
# Installing executables
mkdir -p $(DESTDIR)/usr/bin
cp -a frontend/* $(DESTDIR)/usr/bin
mkdir -p $(DESTDIR)/usr/lib/live
cp -a scripts/* $(DESTDIR)/usr/lib/live
mv $(DESTDIR)/usr/share/live/build/scripts/build/lb $(DESTDIR)/usr/share/live/build/scripts/build/live-build $(DESTDIR)/usr/bin
# Installing documentation
mkdir -p $(DESTDIR)/usr/share/doc/live-build
cp -r COPYING examples $(DESTDIR)/usr/share/doc/live-build
cp -r COPYING docs/* $(DESTDIR)/usr/share/doc/live-build
# Installing manpages
for MANPAGE in manpages/en/*; \
@ -71,10 +67,13 @@ install:
done; \
done
# Installing logfile
mkdir -p $(DESTDIR)/var/log
uninstall:
# Uninstalling shared data
rm -rf $(DESTDIR)/usr/share/live/build
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/live > /dev/null 2>&1 || true
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/live
# Uninstalling executables
rm -f $(DESTDIR)/usr/bin/lb $(DESTDIR)/usr/bin/live-build
@ -103,5 +102,3 @@ clean:
distclean:
reinstall: uninstall install
.PHONY: all test build install uninstall clean distclean reinstall

1
VERSION Normal file
View File

@ -0,0 +1 @@
3.0~a14

19
cgi/Makefile Normal file
View File

@ -0,0 +1,19 @@
# Makefile
install:
install -D -m 0755 cgi $(DESTDIR)/usr/lib/cgi-bin/live-build
install -D -m 0755 cron $(DESTDIR)/etc/cron.d/live-build.cgi
install -D -m 0644 default $(DESTDIR)/etc/default/live-build.cgi
install -D -m 0644 logrotate $(DESTDIR)/etc/logrotate.d/live-build.cgi
install -d -m 0755 $(DESTDIR)/var/log
touch $(DESTDIR)/var/log/live
chown www-data:www-data $(DESTDIR)/var/log/live
uninstall:
rm -f $(DESTDIR)/usr/lib/cgi-bin/live-build
rm -f $(DESTDIR)/etc/cron.d/live-build.cgi
rm -f $(DESTDIR)/etc/default/live-build.cgi
rm -f $(DESTDIR)/etc/logrotate.d/live-build.cgi
reinstall: uninstall install

226
cgi/cgi Executable file
View File

@ -0,0 +1,226 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2011 Daniel Baumann <daniel@debian.org>
##
## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
# Including common functions
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Reading defaults
if [ -r /etc/default/live-build.cgi ]
then
. /etc/default/live-build.cgi
else
echo "E: /etc/default/live-build.cgi missing"
exit 1
fi
# Turn on debug if enabled
if [ "${_DEBUG}" = "enabled" ]
then
set -x
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#LB_MIRROR_BOOTSTRAP#${LB_MIRROR_BOOTSTRAP}#" \
-e "s#LB_MIRROR_BINARY_SECURITY#${LB_MIRROR_BINARY_SECURITY}#" \
-e "s#LB_MIRROR_BINARY#${LB_MIRROR_BINARY}#" \
-e "s/VERSION/${VERSION}/" \
-e "s/DATE/`date +%Y%m%d-%H:%M`/" \
"${_TEMPLATES}"/form.html
else
# Converting spaces: sed 's/+/ /g'
# Converting '@': sed 's/%40/@/g'
# Converting ':': sed 's/%3A/:/g'
# Converting ';': sed 's/%3B/\;/g'
# Converting '/': sed 's/%2F/\//g'
# Converting '~': sed 's/%7E/\~/g'
# 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)
# 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)
LB_PACKAGE_LISTS=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])package_lists=[-0-9a-z]+' | cut -f 2 -d '=' | head -n1)
LB_TASKS=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])tasks=[-0-9a-zA-Z. _]+' | cut -f 2 -d '=' | head -n1)
LB_PACKAGES=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])packages=[-0-9a-zA-Z. _+]+' | cut -f 2 -d '=' | head -n1)
# Advanced bootstrap options
LB_ARCHITECTURES=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])architectures=[0-9a-z]+' | cut -f 2 -d '=' | head -n1)
LB_BOOTSTRAP_FLAVOUR=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])bootstrap_flavour=[a-z]+' | cut -f 2 -d '=' | head -n1)
LB_MIRROR_BOOTSTRAP=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])mirror_bootstrap=[-0-9a-zA-Z.~:/_]+' | cut -f 2 -d '=' | head -n1)
LB_MIRROR_BINARY=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])mirror_binary=[-0-9a-zA-Z.~:/_]+' | cut -f 2 -d '=' | head -n1)
LB_MIRROR_BINARY_SECURITY=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])mirror_binary_security=[-0-9a-zA-Z.~:/_]+' | cut -f 2 -d '=' | head -n1)
LB_ARCHIVE_AREAS=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])archive_areas=[a-z]+' | cut -f 2 -d '=' | head -n1)
# Advanced chroot options
LB_CHROOT_FILESYSTEM=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])chroot_filesystem=[0-9a-z]+' | cut -f 2 -d '=' | head -n1)
LB_LINUX_FLAVOURS=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])linux_flavours=[-0-9a-z]+' | cut -f 2 -d '=' | head -n1)
LB_SECURITY=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])security=[a-z]+' | cut -f 2 -d '=' | head -n1)
# Advanced binary options
LB_BINARY_INDICES=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])binary_indices=[a-z]+' | cut -f 2 -d '=' | head -n1)
LB_BOOTAPPEND_INSTALL=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])bootappend_install=[-0-9a-zA-Z. _+=:/]+' | cut -f2- -d '=' | head -n1)
LB_BOOTAPPEND_LIVE=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])bootappend_live=[-0-9a-zA-Z. _+=:/]+' | cut -f2- -d '=' | head -n1)
LB_BOOTLOADER=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])bootloader=[a-z]+' | cut -f 2 -d '=' | head -n1)
LB_DEBIAN_INSTALLER=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])debian_installer=[a-z]+' | cut -f 2 -d '=' | head -n1)
LB_ISO_APPLICATION=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])iso_application=[-0-9a-zA-Z. ~;:/_]+' | cut -f 2 -d '=' | head -n1)
LB_ISO_PREPARER=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])iso_preparer=[-0-9a-zA-Z. ~;:/_]+' | cut -f 2 -d '=' | head -n1)
LB_ISO_PUBLISHER=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])iso_publisher=[-0-9a-zA-Z. ~;:/_@]+' | cut -f 2 -d '=' | head -n1)
LB_ISO_VOLUME=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])iso_volume=[-0-9a-zA-Z. ~;:/_]+' | cut -f 2 -d '=' | head -n1)
LB_MEMTEST=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])memtest=[0-9a-z+]+' | cut -f 2 -d '=' | head -n1)
LB_NET_ROOT_PATH=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])net_path=[-0-9a-zA-Z._/]+' | cut -f 2 -d '=' | head -n1)
LB_NET_ROOT_SERVER=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])net_server=[0-9.]+' | cut -f 2 -d '=' | head -n1)
# Advanced source options
LB_SOURCE=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])source=[a-z]+' | cut -f 2 -d '=' | head -n1)
LB_SOURCE_IMAGES=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])source_images=[a-z]+' | cut -f 2 -d '=' | head -n1)
# Unofficial options
_CUSTOM_BOOTSTRAP=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])custom_bootstrap=[-0-9a-zA-Z.~:/_]+' | cut -f 2 -d '=' | head -n1)
_CUSTOM_BINARY=$(echo "${QUERY_STRING}" | grep -oE '(^|[?&])custom_binary=[-0-9a-zA-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#LB_MIRROR_BOOTSTRAP#${LB_MIRROR_BOOTSTRAP}#" \
-e "s#LB_MIRROR_BINARY_SECURITY#${LB_MIRROR_BINARY_SECURITY}#" \
-e "s#LB_MIRROR_BINARY#${LB_MIRROR_BINARY}#" \
-e "s/VERSION/${VERSION}/" \
-e "s/DATE/`date +%Y%m%d-%H:%M`/" \
"${_TEMPLATES}"/form.html
exit
fi
# Getting build identifier
_BUILD=$(date +%Y%m%d.%H%M%S.%N)
#echo "${QUERY_STRING}"
# Sending html confirmation
# Note: On each string remember to use a delimeter that is not in the string.
sed -e "s/BUILD/${_BUILD}/g" \
-e "s/EMAIL/${_EMAIL}/" \
-e "s/LB_BINARY_IMAGES/${LB_BINARY_IMAGES}/" \
-e "s/LB_DISTRIBUTION/${LB_DISTRIBUTION}/" \
-e "s/LB_PACKAGE_LISTS/${LB_PACKAGE_LISTS}/" \
-e "s/LB_TASKS/${LB_TASKS}/" \
-e "s/LB_PACKAGES/${LB_PACKAGES}/" \
-e "s/LB_ARCHITECTURES/${LB_ARCHITECTURES}/" \
-e "s/LB_BOOTSTRAP_FLAVOUR/${LB_BOOTSTRAP_FLAVOUR}/" \
-e "s#LB_MIRROR_BOOTSTRAP#${LB_MIRROR_BOOTSTRAP}#" \
-e "s#LB_MIRROR_BINARY_SECURITY#${LB_MIRROR_BINARY_SECURITY}#" \
-e "s#LB_MIRROR_BINARY#${LB_MIRROR_BINARY}#" \
-e "s/LB_ARCHIVE_AREAS/${LB_ARCHIVE_AREAS}/" \
-e "s/LB_CHROOT_FILESYSTEM/${LB_CHROOT_FILESYSTEM}/" \
-e "s/LB_LINUX_FLAVOURS/${LB_LINUX_FLAVOURS}/" \
-e "s/LB_SECURITY/${LB_SECURITY}/" \
-e "s/LB_BINARY_INDICES/${LB_BINARY_INDICES}/" \
-e "s#LB_BOOTAPPEND_INSTALL#${LB_BOOTAPPEND_INSTALL}#" \
-e "s#LB_BOOTAPPEND_LIVE#${LB_BOOTAPPEND_LIVE}#" \
-e "s/LB_BOOTLOADER/${LB_BOOTLOADER}/" \
-e "s/LB_DEBIAN_INSTALLER/${LB_DEBIAN_INSTALLER}/" \
-e "s#LB_ISO_APPLICATION#${LB_ISO_APPLICATION}#" \
-e "s#LB_ISO_PREPARER#${LB_ISO_PREPARER}#" \
-e "s#LB_ISO_PUBLISHER#${LB_ISO_PUBLISHER}#" \
-e "s#LB_ISO_VOLUME#${LB_ISO_VOLUME}#" \
-e "s/LB_MEMTEST/${LB_MEMTEST}/" \
-e "s#LB_NET_ROOT_PATH#${LB_NET_ROOT_PATH}#" \
-e "s/LB_NET_ROOT_SERVER/${LB_NET_ROOT_SERVER}/" \
-e "s#SERVER#${_SERVER}#g" \
-e "s/LB_SOURCE_IMAGES/${LB_SOURCE_IMAGES}/" \
-e "s/LB_SOURCE/${LB_SOURCE}/" \
-e "s#CUSTOM_BOOTSTRAP#${_CUSTOM_BOOTSTRAP}#" \
-e "s#CUSTOM_BINARY#${_CUSTOM_BINARY}#" \
"${_TEMPLATES}"/build.html
# Creating temporary directory
mkdir -p "${_TEMPDIR}"
# Writing build file
cat > "${_TEMPDIR}"/"${_BUILD}".build << EOF
# live-build.cgi "${VERSION}" build file
# `date -R`
_BUILD="${_BUILD}"
_EMAIL="${_EMAIL}"
REMOTE_ADDR="${REMOTE_ADDR}"
# Standard options
LB_BINARY_IMAGES="${LB_BINARY_IMAGES}"
LB_DISTRIBUTION="${LB_DISTRIBUTION}"
LB_PACKAGE_LISTS="${LB_PACKAGE_LISTS}"
LB_TASKS="${LB_TASKS}"
LB_PACKAGES="${LB_PACKAGES}"
# Advanced bootstrap options
LB_ARCHITECTURES="${LB_ARCHITECTURES}"
LB_MIRROR_BOOTSTRAP="${LB_MIRROR_BOOTSTRAP}"
LB_MIRROR_BINARY_SECURITY="${LB_MIRROR_BINARY_SECURITY}"
LB_MIRROR_BINARY="${LB_MIRROR_BINARY}"
LB_ARCHIVE_AREAS="${LB_ARCHIVE_AREAS}"
# Advanced chroot options
LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM}"
LB_LINUX_FLAVOURS="${LB_LINUX_FLAVOURS}"
LB_SECURITY="${LB_SECURITY}"
# Advanced binary options
LB_BINARY_INDICES="${LB_BINARY_INDICES}"
LB_BOOTAPPEND_INSTALL="${LB_BOOTAPPEND_INSTALL}"
LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE}"
LB_BOOTLOADER="${LB_BOOTLOADER}"
LB_DEBIAN_INSTALLER="${LB_DEBIAN_INSTALLER}"
LB_ISO_APPLICATION="${LB_ISO_APPLICATION}"
LB_ISO_PREPARER="${LB_ISO_PREPARER}"
LB_ISO_PUBLISHER="${LB_ISO_PUBLISHER}"
LB_ISO_VOLUME="${LB_ISO_VOLUME}"
LB_MEMTEST="${LB_MEMTEST}"
LB_NET_ROOT_PATH="${LB_NET_ROOT_PATH}"
LB_NET_ROOT_SERVER="${LB_NET_ROOT_SERVER}"
# Advanced source options
LB_SOURCE_IMAGES="${LB_SOURCE_IMAGES}"
LB_SOURCE="${LB_SOURCE}"
# Unofficial options
_CUSTOM_BOOTSTRAP="${_CUSTOM_BOOTSTRAP}"
_CUSTOM_BINARY="${_CUSTOM_BINARY}"
# Other
LB_REPOSITORIES="${LB_REPOSITORIES}"
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}|package_lists ${LB_PACKAGE_LISTS}|tasks ${LB_TASKS}|packages ${LB_PACKAGES}|architectures ${LB_ARCHITECTURES}|mirror_bootstrap_security ${LB_MIRROR_BOOTSTRAP}|mirror_bootstrap ${LB_MIRROR_BOOTSTRAP}|mirror_binary_security ${LB_MIRROR_BINARY_SECURITY}|mirror_binary ${LB_MIRROR_BINARY}|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}|source ${LB_SOURCE}|custom_bootstrap ${_CUSTOM_BOOTSTRAP}|custom_binary ${_CUSTOM_BINARY}\n" >> /var/log/live
fi
sed -e "s/VERSION/${VERSION}/" "${_TEMPLATES}"/footer.html

192
cgi/cron Executable file
View File

@ -0,0 +1,192 @@
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2011 Daniel Baumann <daniel@debian.org>
##
## live-build comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
## This is free software, and you are welcome to redistribute it
## under certain conditions; see COPYING for details.
# Including common functions
. "${LB_BASE:-/usr/share/live/build}"/scripts/build.sh
# Reading defaults
if [ -r /etc/default/live-build.cgi ]
then
. /etc/default/live-build.cgi
else
echo "E: /etc/default/live-build.cgi missing"
exit 1
fi
# Exit if disabled
if [ "${_WEBBUILD}" != "enabled" ]
then
exit 0
fi
# Turn on debug if enabled
if [ "${_DEBUG}" = "enabled" ]
then
set -x
fi
# Checking lock file
if [ -f /var/lock/live-build.cgi.lock ]
then
echo "E: live-build.cgi already/still running."
exit 1
fi
# Creating lock trap
trap "test -f /var/lock/live-build.cgi.lock && rm -f /var/lock/live-build.cgi.lock; exit 0" 0 1 2 3 9 15
# Creating lock file
touch /var/lock/live-build.cgi.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-build.cgi: remove web build (`date -d yesterday +%Y%m%d.%H`*)." >> /var/log/live
fi
# Ok from here spin through the live-build.cgi files we have waiting to build
#if ls "${_TEMPDIR}"/*.build > /dev/null 2>&1
if Find_files ${_TEMPDIR}/*.build
then
for _FILE in "${_TEMPDIR}"/*.build
do
# Pull in the variables we want from the config file.
# Pul in the build number
_BUILD=`awk -F\" '/^_BUILD=/{print $2}' ${_FILE}`
# Pull in the email address
_EMAIL=`awk -F\" '/^_EMAIL=/{print $2}' ${_FILE}`
# Pull in the remote address, atchitecture, and distribution
_REMOTE_ADDR=`awk -F\" '/^REMOTE_ADDR=/{print $2}' ${_FILE}`
_LB_ARCHITECTURES=`awk -F\" '/^LB_ARCHITECTURES=/{print $2}' ${_FILE}`
_LB_DISTRIBUTION=`awk -F\" '/^LB_DISTRIBUTION=/{print $2}' ${_FILE}`
_LB_PACKAGE_LISTS=`awk -F\" '/^LB_PACKAGE_LISTS=/{print $2}' ${_FILE}`
_LB_PACKAGES=`awk -F\" '/^LB_PACKAGES=/{print $2}' ${_FILE}`
# Pull in the custom bootstrap
_CUSTOM_BOOTSTRAP=`awk -F\" '/^_CUSTOM_BOOTSTRAP=/{print $2}' ${_FILE}`
# Pull in the custom binary
_CUSTOM_BINARY=`awk -F\" '/^_CUSTOM_BINARY=/{print $2}' ${_FILE}`
# Drop out some build data for information if something goes wrong.
echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-build.cgi: begin web build (${_BUILD})." >> /var/log/live
# Creating build directory which also creates the config/chroot_sources folder
mkdir -p "${_TEMPDIR}"/"${_BUILD}"/config/chroot_sources
# The next two tests are for unofficial third party repositories
if [ -n "${_CUSTOM_BOOTSTRAP}" ]
then
echo "${_CUSTOM_BOOTSTRAP}" > "${_TEMPDIR}"/"${_BUILD}"/config/chroot_sources/custom.bootstrap
fi
if [ -n "${_CUSTOM_BINARY}" ]
then
echo "${_CUSTOM_BINARY}" > "${_TEMPDIR}"/"${_BUILD}"/config/chroot_sources/custom.binary
fi
_DATE_START="`date -R`"
echo "Begin: ${_DATE_START}" > "${_TEMPDIR}"/"${_BUILD}"/log
# Generating image
cd "${_TEMPDIR}"/"${_BUILD}"
lb config -c ${_FILE} >> "${_TEMPDIR}"/"${_BUILD}"/log 2>&1
_ERRORCONFIG="${?}"
lb build >> "${_TEMPDIR}"/"${_BUILD}"/log 2>&1
_ERRORBUILD="${?}"
_DATE_END="`date -R`"
echo "End: ${_DATE_END}" >> "${_TEMPDIR}"/"${_BUILD}"/log
# Creating image directory
mkdir -p "${_DESTDIR}"/"${_BUILD}"
# Creating mail and logging.
if [ "${_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_PACKAGE_LISTS}/${_LB_PACKAGES}\" 200 - \"-\" \"\"">>/var/log/live-cgi.builds
else
_STATUS="maybe-failed"
echo "${_REMOTE_ADDR} - - `date +[%d/%b/%Y:%H:%m:%S\ %z]` \"${_BUILD} ${_LB_ARCHITECTURES}/${_LB_DISTRIBUTION}/${_LB_PACKAGE_LISTS}/${_LB_PACKAGES}\" 404 - \"-\" \"\"">>/var/log/live-cgi.builds
fi
sed -e "s/BUILD/${_BUILD}/g" \
-e "s/EMAIL/${_EMAIL}/" \
-e "s/VERSION/${VERSION}/" \
-e "s/DATE_START/${_DATE_START}/" \
-e "s/DATE_END/${_DATE_END}/" \
-e "s/STATUS/${_STATUS}/" \
-e "s#SERVER#${_SERVER}#" \
"${_TEMPLATES}"/mail.txt > "${_DESTDIR}"/"${_BUILD}"/mail
cat >> "${_DESTDIR}"/"${_BUILD}"/mail << EOF
---
Here's a list of all build-options that were used to build your image:
EOF
cat "${_TEMPDIR}"/"${_BUILD}".build >> "${_DESTDIR}"/"${_BUILD}"/mail
# Moving binary image
#if ls "${_TEMPDIR}"/"${_BUILD}"/binary*.* > /dev/null 2>&1
if Find_files ${_TEMPDIR}/${_BUILD}/binary*.*
then
mv "${_TEMPDIR}"/"${_BUILD}"/binary*.* "${_DESTDIR}"/"${_BUILD}"
fi
# Moving source image
#if ls "${_TEMPDIR}"/"${_BUILD}"/source.* > /dev/null 2>&1
if Find_files ${_TEMPDIR}/${_BUILD}/source.*
then
mv "${_TEMPDIR}"/"${_BUILD}"/source.* "${_DESTDIR}"/"${_BUILD}"
fi
# Moving build
mv "${_TEMPDIR}"/"${_BUILD}".build "${_DESTDIR}"/"${_BUILD}"/build
# Moving log
mv "${_TEMPDIR}"/"${_BUILD}"/log "${_DESTDIR}"/"${_BUILD}"
# Generating md5sum
cd "${_DESTDIR}"/"${_BUILD}"
md5sum * > md5sum
cd "${OLDPWD}"
# Sending mail
cat "${_DESTDIR}"/"${_BUILD}"/mail | /usr/sbin/sendmail -t
# Unmounting devpts-live
#if ls "${_TEMPDIR}"/"${_BUILD}"/chroot/dev/pts/* > /dev/null 2>&1
if Find_files ${_TEMPDIR}/${_BUILD}/chroot/dev/pts/*
then
umount "${_TEMPDIR}"/${_BUILD}/chroot/dev/pts
fi
# Unmounting proc
if [ -f "${_TEMPDIR}"/"${_BUILD}"/chroot/proc/version ]
then
umount "${_TEMPDIR}"/"${_BUILD}"/chroot/proc
fi
# Unmounting sysfs
if [ -d "${_TEMPDIR}"/"${_BUILD}"/chroot/sys/kernel ]
then
umount "${_TEMPDIR}"/${_BUILD}/chroot/sys
fi
# Removing build directory
rm -rf "${_TEMPDIR}"/"${_BUILD}"
echo "`date +%b\ %d\ %H:%M:%S` ${HOSTNAME} live-build.cgi: end web build (${_BUILD}: ${_STATUS})." >> /var/log/live
done
fi

7
cgi/crontab Normal file
View File

@ -0,0 +1,7 @@
# /etc/crontab - system-wide crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command
*/1 * * * * root /etc/cron.hourly/live-webhelper > /dev/null 2>&1

17
cgi/default Normal file
View File

@ -0,0 +1,17 @@
# Defaults for /etc/cron.daily/live-build.cgi
_WEBBUILD="disabled"
_MODE="debian-official"
_DEBUG="disabled"
_DESTDIR="/srv/debian-live/build/www"
_TEMPLATES="/usr/share/live/build/templates/cgi/${_MODE}"
_TEMPDIR="/srv/debian-live/build/tmp"
LB_MIRROR_BOOTSTRAP="http://ftp.de.debian.org/debian/"
LB_MIRROR_BINARY="http://ftp.debian.org/debian/"
LB_MIRROR_BINARY_SECURITY="http://security.debian.org/"
_SERVER="http://live.debian.net/build"

11
cgi/logrotate Normal file
View File

@ -0,0 +1,11 @@
# /etc/logrotate.d/live-build
/var/log/live
{
compress
copytruncate
missingok
monthly
notifempty
rotate 24
}

View File

@ -0,0 +1,74 @@
#!/usr/bin/env python
"""
live-helper simulated execution graph generator.
Copyright (C) 2007 Chris Lamb <chris@chris-lamb.co.uk>
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 3 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, see <http://www.gnu.org/licenses/>.
"""
import sys, re
import pygraphviz
groups = {
'lh_bootstrap' : 'orange',
'lh_chroot' : 'red',
'lh_source' : 'blue',
'lh_binary' : 'green',
'lh_build' : 'brown'
}
pattern = re.compile(r'^(lh_.+?) ')
def main(start):
global prev
G = pygraphviz.AGraph(directed=True)
G.graph_attr['label'] = 'Simulated execution trace for live-helper.'
def helper(filename):
global prev
for line in gen_matches(filename):
G.add_edge(prev, line)
style(G.get_node(prev), prev)
prev = line
helper(line)
prev = start
helper(start)
G.layout(prog='dot')
print G.draw(format='svg')
def style(node, name):
if name in groups.keys():
node.attr['shape'] = 'box'
node.attr['style'] = 'bold'
else:
node.attr['fontsize'] = '11'
for group_name, color in groups.iteritems():
if name.startswith(group_name):
node.attr['color'] = color
return node
def gen_matches(filename):
f = open('/usr/bin/%s' % filename, 'r')
for line in f.xreadlines():
match = pattern.match(line)
if match:
yield match.group(1)
f.close()
if __name__ == "__main__":
if len(sys.argv) == 2:
main(sys.argv[1])
else:
main('lh_build')

View File

@ -0,0 +1,26 @@
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.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -1 +0,0 @@
squeeze/

View File

@ -1 +0,0 @@
squeeze/

1
data/debian-cd/dapper Symbolic link
View File

@ -0,0 +1 @@
maverick

1
data/debian-cd/hardy Symbolic link
View File

@ -0,0 +1 @@
maverick

1
data/debian-cd/intrepid Symbolic link
View File

@ -0,0 +1 @@
maverick

1
data/debian-cd/jaunty Symbolic link
View File

@ -0,0 +1 @@
maverick

View File

@ -1 +0,0 @@
sid

View File

@ -1 +0,0 @@
sid

View File

@ -1 +0,0 @@
sid

1
data/debian-cd/karmic Symbolic link
View File

@ -0,0 +1 @@
maverick

1
data/debian-cd/lucid Symbolic link
View File

@ -0,0 +1 @@
maverick

View File

@ -0,0 +1,4 @@
netcfg
ethdetect
pcmcia-cs-udeb
wireless-tools-udeb

View File

@ -0,0 +1,4 @@
netcfg
ethdetect
pcmcia-cs-udeb
wireless-tools-udeb

View File

@ -0,0 +1,4 @@
netcfg
ethdetect
pcmcia-cs-udeb
wireless-tools-udeb

View File

@ -0,0 +1,4 @@
netcfg
ethdetect
pcmcia-cs-udeb
wireless-tools-udeb

View File

@ -0,0 +1 @@
kernel-image-*

View File

@ -0,0 +1,5 @@
choose-mirror
netcfg
ethdetect
pcmcia-cs-udeb
wireless-tools-udeb

View File

@ -0,0 +1,4 @@
netcfg
ethdetect
pcmcia-cs-udeb
wireless-tools-udeb

View File

@ -0,0 +1,4 @@
netcfg
ethdetect
pcmcia-cs-udeb
wireless-tools-udeb

View File

@ -0,0 +1,4 @@
netcfg
ethdetect
pcmcia-cs-udeb
wireless-tools-udeb

View File

@ -0,0 +1,4 @@
netcfg
ethdetect
pcmcia-cs-udeb
wireless-tools-udeb

View File

@ -0,0 +1,4 @@
choose-mirror
netcfg
ethdetect
wireless-tools-udeb

View File

@ -0,0 +1,3 @@
netcfg
ethdetect
wireless-tools-udeb

View File

@ -0,0 +1,4 @@
netcfg
ethdetect
pcmcia-cs-udeb
wireless-tools-udeb

View File

@ -0,0 +1,4 @@
netcfg
ethdetect
pcmcia-cs-udeb
wireless-tools-udeb

1
data/debian-cd/natty Symbolic link
View File

@ -0,0 +1 @@
maverick

View File

@ -1 +1 @@
trixie
squeeze

View File

@ -1,4 +1,4 @@
choose-mirror
netcfg
ethdetect
pcmciautils-udeb
fdisk-udeb

View File

@ -1,3 +1,3 @@
netcfg
ethdetect
pcmciautils-udeb
fdisk-udeb

View File

@ -1,3 +1,3 @@
netcfg
ethdetect
pcmciautils-udeb
fdisk-udeb

View File

@ -1 +0,0 @@
trixie

View File

@ -1,2 +0,0 @@
This is a manual copy of the exclude lists is debian-cd/data
https://salsa.debian.org/images-team/debian-cd

View File

@ -1,143 +0,0 @@
# These udebs build the d-i cdrom initrd. As such, there is no reason
# to keep another copy of them on the CD in udeb form.
#
# This duplicates data found in the file build/pkg-lists/kernel, in d-i svn
kernel-image-*
# build/pkg-lists/base in d-i svn
archdetect
rootskel
main-menu
cdebconf-udeb
udpkg
anna
di-utils
di-utils-shell
di-utils-reboot
lowmemcheck
# build/pkg-lists/cdrom/common, in d-i svn (also included in the
# root+cd-drivers floppies)
busybox-udeb
installation-locale
localechooser
iso-3166-udeb
hw-detect
cdrom-detect
cdrom-retriever
load-cdrom
cdrom-checker
bogl-bterm-udeb
di-utils-terminfo
cdebconf-priority
cdebconf-newt-udeb
usb-discover
preseed-common
initrd-preseed
file-preseed
nano-udeb
floppy-retriever
libfribidi0-udeb
# Already on the initrd as dependencies
libdebconfclient0-udeb
libdebian-installer4-udeb
libdebian-installer-extra4-udeb
# These udebs are only useful in building the boot floppy image
busybox-floppy-udeb
rootskel-bootfloppy
# Graphical installer: common udebs included in initrd
rootskel-gtk
cdebconf-gtk-udeb
fontconfig-udeb
gtk2-engines-udeb
libatk1.0-udeb
libexpat1-udeb
libfreetype6-udeb
libglib2.0-udeb
libgtk2-engines-udeb
libpango1.0-udeb
libpcre3-udeb
libpixman-1-0-udeb
libpng*-udeb
libsdl1.2debian-udeb
mouse-modules-*
ttf-*
fbset-udeb
# Graphical installer: udebs for directfb
libdirectfb-*-udeb
libcairo-directfb2-udeb
libgtk-directfb-2.0-0-udeb
# Graphical installer: udebs for X.Org
xserver-xorg-core-udeb
xserver-xorg-input-evdev-udeb
xserver-xorg-video-fbdev-udeb
x11-xkb-utils-udeb
xkb-data-udeb
libcairo2-udeb
libdrm2-udeb
libfontenc1-udeb
libgtk-x11-udeb
libpciaccess0-udeb
libx11-6-udeb
libxau6-udeb
libxcb1-udeb
libxcursor1-udeb
libxdmcp6-udeb
libxext6-udeb
libxfixes3-udeb
libxfont1-udeb
libxft2-udeb
libxi6-udeb
libxinerama1-udeb
libxkbfile1-udeb
libxrender1-udeb
# Graphical installer: terminal support is included in initrd
cdebconf-gtk-terminal
libvte9-udeb
# Not currently used
cdebootstrap-udeb
hdparm-udeb
dhcp-client-udeb
# This package is only useful in the d-i-demo
di-utils-exit-installer
# No need for these loaders.
download-installer
load-floppy
# Only useful in the hd-media initrd
iso-scan
load-iso
# These are not really needed, the regular netcfg subsumes them
netcfg-static
# skolelinux stuff, not for the stock CDs
debian-edu-install-udeb
debian-edu-profile-udeb
debian-edu-archive-keyring-udeb
ltsp-client-builder
autopartkit
# live CD stuff
live-installer
simple-cdd-profiles
# If needed, will be on the initrd already
module-init-tools-udeb
env-preseed
rescue-check
cdebconf-text-udeb
brltty-udeb
klibc-utils-udeb
libklibc-udeb
udev-udeb
udev-gtk-udeb
ai-choosers
auto-install
libslang2-udeb
kbd-chooser
kbd-udeb
console-setup-*
# Currently unused
debian-ports-archive-keyring-udeb
emdebian-archive-keyring-udeb
nbd-client-udeb
pwgen-udeb
# Eh?
gnumach-udeb
# We only support grub these days, drop lilo and elilo
lilo-installer
elilo-installer

View File

@ -1,42 +0,0 @@
# These udebs are in the d-i cdrom initrd and the hd-media initrd.
# As such, there is no reason to keep another copy of them on the CD
# in udeb form.
console-keymaps-at
console-keymaps-usb
kbd-chooser
acpi-modules-*
ata-modules-*
cdrom-core-modules-*
core-modules-*
fat-modules-*
fb-modules-*
ide-core-modules-*
ide-modules-*
input-modules-*
isofs-modules-*
mmc-modules-*
nls-core-modules-*
parport-modules-*
pcmcia-modules-*
sata-modules-*
scsi-common-modules-*
scsi-core-modules-*
scsi-modules-*
serial-modules-*
speakup-modules-*
usb-modules-*
usb-serial-modules-*
usb-storage-modules-*
# Not used on amd64
console-keymaps-acorn
console-keymaps-amiga
console-keymaps-atari
console-keymaps-dec
console-keymaps-sun
# Not needed with the 2.6 kernel on amd64.
userdevfs
# Only needed on arches that use partconf or autopartkit.
partconf-mkfstab
# Not needed on arches that use partman
mdcfg
lvmcfg

View File

@ -1 +0,0 @@
apt-mirror-setup

View File

@ -1 +0,0 @@
sid

27
debian/NEWS vendored
View File

@ -1,27 +0,0 @@
live-build (1:20220505) unstable; urgency=medium
The support for FTP proxies has ended. You are advised to use http or https
while configuring the debian package mirror, instead of ftp.
See https://salsa.debian.org/live-team/live-build/-/merge_requests/252#note_243114
-- Roland Clobus <rclobus@rclobus.nl> Wed, 8 Sep 2021 11:55:00 +0200
live-build (1:20210329) unstable; urgency=medium
The 'filesystem.size' file is no longer created and included in the image,
as it is often incorrect and variates depending on the build environment,
breaking reproducibility. For more information see the following thread:
https://lists.debian.org/debian-live/2021/03/msg00008.html
-- Luca Boccassi <bluca@debian.org> Mon, 29 Mar 2021 10:49:43 +0100
live-build (1:20180411) unstable; urgency=medium
The live-boot mount points have been moved from /lib/live/mount to
/run/live. Since this is a backward-incompatible change, a compat
recursive bind mount point is being provided in /lib/live/mount so
that existing scripts will not break in Debian 10 (Buster).
Please note that this will be removed in Debian 11 (Bullseye) so
plan accordingly and update any required scripts.
-- Luca Boccassi <bluca@debian.org> Wed, 11 Apr 2018 12:35:19 +0100

4242
debian/changelog vendored

File diff suppressed because it is too large Load Diff

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
8

53
debian/control vendored
View File

@ -1,34 +1,33 @@
Source: live-build
Section: misc
Priority: optional
Maintainer: Debian Live <debian-live@lists.debian.org>
Uploaders: Raphaël Hertzog <raphael@offensive-security.com>,
Luca Boccassi <bluca@debian.org>
Build-Depends: debhelper-compat (= 13), devscripts, gettext, po4a
Standards-Version: 4.7.0
Rules-Requires-Root: no
Homepage: https://wiki.debian.org/DebianLive
Vcs-Browser: https://salsa.debian.org/live-team/live-build
Vcs-Git: https://salsa.debian.org/live-team/live-build.git
Maintainer: Debian Live Project <debian-live@lists.debian.org>
Uploaders: Daniel Baumann <daniel@debian.org>
Build-Depends: debhelper (>= 8)
Build-Depends-Indep: gettext
Standards-Version: 3.9.1
Homepage: http://live.debian.net/devel/live-build/
Vcs-Browser: http://live.debian.net/gitweb/?p=live-build.git
Vcs-Git: git://live.debian.net/git/live-build.git
Package: live-build
Architecture: all
Depends: cpio, debootstrap, ${misc:Depends}
Recommends: apt-utils,
bzip2,
cryptsetup,
file,
live-boot-doc,
live-config-doc,
live-manual-html | live-manual,
rsync,
systemd-container,
wget,
xz-utils
Suggests: e2fsprogs, eatmydata, git, mtd-utils, parted
Description: Live System Build Components
The Debian Live project maintains the components to build Debian based Live
systems and the official Debian Live images themselves.
Depends: ${misc:Depends}, debootstrap | cdebootstrap | cdebootstrap-static
Recommends: cpio, gettext-base, gnu-fdisk
Suggests:
dosfstools, genisoimage, memtest86+ | memtest86, mtools, parted,
squashfs-tools | genext2fs | mtd-tools, sudo | fakeroot, syslinux | grub,
uuid-runtime, win32-loader
Description: Debian Live - System Build Scripts
live-build contains the scripts that build a Debian Live system image from a
configuration directory.
Package: live-build-cgi
Architecture: all
Depends: ${misc:Depends}
Recommends: apache2 | httpd
Description: Debian Live - System Build Scripts (cgi frontend)
live-build contains the scripts that build a Debian Live system image from a
configuration directory.
.
live-build contains the components to build a live system from a configuration
directory.
This package contains the cgi frontend.

60
debian/copyright vendored
View File

@ -1,14 +1,5 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: live-build
Upstream-Contact: Debian Live Project <debian-live@lists.debian.org>
Files: *
Copyright:
2016-2020 The Debian Live team
2016-2017 Raphaël Hertzog <hertzog@debian.org>
2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
License: GPL-3+
Copyright: (C) 2006-2011 Daniel Baumann <daniel@debian.org>
License: GPL-3+
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
@ -23,5 +14,52 @@ License: GPL-3+
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
The complete text of the GNU General Public License
On Debian systems, the complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-3 file.
Files: contrib/graph-helpers
Copyright: (C) 2007 Chris Lamb <chris@chris-lamb.co.uk>
License: GPL-3+
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 3 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, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General Public License
can be found in /usr/share/common-licenses/GPL-3 file.
Files: contrib/grub-splash/lenny
License: other
The 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.

55
debian/gitlab-ci.yml vendored
View File

@ -1,55 +0,0 @@
---
include:
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
- https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
variables:
SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1
SALSA_CI_DISABLE_BUILD_PACKAGE_I386: 1
.lb-build:
stage: test
script:
- apt-get update
- apt-get install -y "$(find . -type f -name '*.deb')"
- lb --version
# We need to stay within the maximum limit for artifacts on Salsa (250M),
# so disable a few things
- lb config --apt-indices false --apt-recommends false --firmware-chroot false --source false --distribution sid --updates false --debootstrap-options "--variant=minbase" --bootloaders grub-efi
# But do install user-setup and sudo to have a usable image
- echo "user-setup sudo" > config/package-lists/recommends.list.chroot
# xz compresses initrds much better than zstd
- echo xz-utils >> config/package-lists/live.list.chroot
- mkdir -p config/includes.chroot_after_packages/etc/initramfs-tools/conf.d/
- printf 'COMPRESS=xz\nCOMPRESSLEVEL=9\n' > config/includes.chroot_after_packages/etc/initramfs-tools/conf.d/compress
# Remove stuff not really needed to boot
- echo 'rm -rf /usr/share/doc/* /usr/share/i18n/* /usr/share/man/* /usr/share/locale/*' >> config/hooks/normal/9020-remove-man-cache.hook.chroot
# Build the ISO
- lb build
- ls -lh
- cp live-image-${BUILD_ARCH}.contents ${WORKING_DIR}
- cp live-image-${BUILD_ARCH}.hybrid.iso ${WORKING_DIR}
artifacts:
when: always
paths:
- ${WORKING_DIR}/live-image-${BUILD_ARCH}.contents
- ${WORKING_DIR}/live-image-${BUILD_ARCH}.hybrid.iso
needs:
- job: build
artifacts: true
ISO amd64:
extends:
- .lb-build
variables:
BUILD_ARCH: 'amd64'
ISO arm64:
extends:
- .lb-build
rules:
- if: $CI_PROJECT_ROOT_NAMESPACE != "rclobus-guest"
variables:
BUILD_ARCH: 'arm64'
tags:
- $SALSA_CI_ARM_RUNNER_TAG

View File

@ -1,9 +1,9 @@
Before submitting a bug report against live-build, please make sure
that you have read your guidelines for live systems bug reports:
that you have read your guidlines for Debian Live bug reports:
https://live-team.pages.debian.net/live-manual/
http://live.debian.net/manual/
By providing the required information as outlined in the guidelines makes
By providing the required information as outlined in the guidlines makes
sure that we can optimally reproduce and fix bugs, not doing so wastes a
lot of time for both the maintainers and the submitters.

View File

@ -2,7 +2,11 @@
DEFAULT_SETTINGS="/etc/live/build.conf"
dpkg -l debootstrap
# Checking depends
dpkg -l debootstrap cdebootstrap
# Checking suggests
dpkg -l dosfstools genisoimage memtest86+ memtest86 mtools parted squashfs-tools genext2fs mtd-tools sudo fakeroot syslinux grub uuid-runtime win32-loader
if [ -e "${DEFAULT_SETTINGS}" ]; then
echo "Contents of ${DEFAULT_SETTINGS}:"

View File

@ -1,6 +0,0 @@
live-build: absolute-symlink-in-top-level-folder
# Those cases are legitimate uses of direct access to the database
live-build: uses-dpkg-database-directly [usr/lib/live/build/chroot_tmpfs]
live-build: uses-dpkg-database-directly [usr/lib/live/build/clean]
live-build: uses-dpkg-database-directly [usr/share/live/build/functions/chroot.sh]
live-build: uses-dpkg-database-directly [usr/share/live/build/hooks/normal/8010-remove-backup-files.hook.chroot]

27
debian/rules vendored
View File

@ -1,18 +1,27 @@
#!/usr/bin/make -f
%:
dh $@
dh ${@}
override_dh_auto_clean:
$(MAKE) -C po clean
override_dh_auto_build:
$(MAKE) -C po update-po
override_dh_auto_install:
# Update manual pages first
$(MAKE) -C manpages update
$(MAKE) -C manpages build
$(MAKE) DESTDIR=$(CURDIR)/debian/live-build install
$(MAKE) -C po DESTDIR=$(CURDIR)/debian/live-build install
dh_auto_install -- DESTDIR=debian/live-build
mv debian/live-build/usr/share/doc/live-build/ChangeLog.live-package debian/live-build/usr/share/doc/live-build/changelog.live-package
mv debian/live-build/usr/share/doc/live-build/ChangeLog.live-webhelper debian/live-build/usr/share/doc/live-build/changelog.live-webhelper
# Removing unused files
rm -f debian/live-build/usr/share/doc/live-build/COPYING
rm -f debian/live-build/usr/share/doc/live-build/ChangeLog
override_dh_link:
# workaround dh_link conversion of absolute symlinks to relative symlinks
dh_link -X.c32 -Xisolinux.bin -Xpxelinux.0
# live-buld-cgi
mkdir -p debian/live-build-cgi/usr/share/live/build
mv debian/live-build/usr/share/live/build/cgi debian/live-build-cgi/usr/share/live/build
override_dh_installchangelogs:
dh_installchangelogs docs/ChangeLog

View File

@ -1 +1 @@
3.0 (native)
3.0 (quilt)

View File

@ -1,11 +0,0 @@
# Ignore those errors, it's not nice but works currently
absolute-symbolic-link-target-in-source /usr/lib/ISOLINUX/isolinux.bin [share/bootloaders/isolinux/isolinux.bin]
absolute-symbolic-link-target-in-source /usr/lib/PXELINUX/pxelinux.0 [share/bootloaders/pxelinux/pxelinux.0]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/hdt.c32 [share/bootloaders/syslinux_common/hdt.c32]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/ldlinux.c32 [share/bootloaders/isolinux/ldlinux.c32]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/ldlinux.c32 [share/bootloaders/pxelinux/ldlinux.c32]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/libcom32.c32 [share/bootloaders/syslinux_common/libcom32.c32]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/libgpl.c32 [share/bootloaders/syslinux_common/libgpl.c32]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/libmenu.c32 [share/bootloaders/syslinux_common/libmenu.c32]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/libutil.c32 [share/bootloaders/syslinux_common/libutil.c32]
absolute-symbolic-link-target-in-source /usr/lib/syslinux/modules/bios/vesamenu.c32 [share/bootloaders/syslinux_common/vesamenu.c32]

2
debian/source/options vendored Normal file
View File

@ -0,0 +1,2 @@
compression = gzip
compression-level = 9

View File

@ -1,15 +0,0 @@
#!/bin/bash
set -eu
set -o pipefail
cd "${AUTOPKGTEST_TMP}"
# Use the default values
lb config --verbose
# Verify some values
lb config --dump | grep 'LB_DISTRIBUTION="testing"'
lb config --dump | grep 'LB_UPDATES="true"'
lb config --dump | grep 'LB_SECURITY="true"'
lb config --dump | grep 'LB_PROPOSED_UPDATES="false"'
lb build --verbose
ls -l

View File

@ -1,21 +0,0 @@
#!/bin/bash
set -eu
set -o pipefail
# Ensure Kali's keyring archive is installed and is always up to date
echo "Acquire::Retries 5;" > /etc/apt/apt.conf.d/live-build-ci
curl https://archive.kali.org/archive-key.asc > /etc/apt/trusted.gpg.d/kali.asc
mkdir -p /etc/apt/sources.list.d
echo "deb http://http.kali.org/kali kali-rolling main" > /etc/apt/sources.list.d/kali.list
apt-get update
apt-get install -y kali-archive-keyring
rm -f /etc/apt/trusted.gpg.d/kali.asc /etc/apt/sources.list.d/kali.list /etc/apt/apt.conf.d/live-build-ci
apt-get update
cd "${AUTOPKGTEST_TMP}"
git clone --depth 1 --no-tags https://gitlab.com/kalilinux/build-scripts/live-build-config.git
cd live-build-config
./build.sh --verbose
ls -l
ls -l images

View File

@ -1,14 +0,0 @@
#!/bin/bash
set -eu
set -o pipefail
cd "${AUTOPKGTEST_TMP}"
# A minimal command line
lb config --verbose --distribution stable
# Verify some default values
lb config --dump | grep 'LB_UPDATES="true"'
lb config --dump | grep 'LB_SECURITY="true"'
lb config --dump | grep 'LB_PROPOSED_UPDATES="false"'
lb build --verbose
ls -l

20
debian/tests/control vendored
View File

@ -1,20 +0,0 @@
Tests: build-default-image
Depends: live-build
Restrictions: allow-stderr, needs-internet, needs-root
Tests: build-stable-image
Depends: live-build
Restrictions: allow-stderr, needs-internet, needs-root
Tests: build-kali-image
Depends: apt-utils,
bzip2,
ca-certificates,
cpio,
curl,
file,
git,
live-build,
wget,
xz-utils
Restrictions: allow-stderr, flaky, needs-internet, needs-root

9
docs/AUTHORS Normal file
View File

@ -0,0 +1,9 @@
Main Author:
* Daniel Baumann <daniel@debian.org>
Main Contributors:
* Chris Lamb <lamby@debian.org>
* Otavio Salvador <otavio@debian.org>
* Richard Nelson <unixabg@gmail.com>

64
docs/CREDITS Normal file
View File

@ -0,0 +1,64 @@
Patches (alphabetical order):
* Alex Owen <r.a.owen@qmul.ac.uk>
* An-Cheng Huang <ancheng@vyatta.com>
* Antonio Amorim <Antonio.Amorim@sim.fc.ul.pt>
* Antonio Terceiro <terceiro@softwarelivre.org>
* Bas Wijnen <wijnen@debian.org>
* Ben Armstrong <synrg@debian.org>
* Cedric Lucantis <omer@no-log.org>
* Chris Lamb <lamby@debian.org>
* Cody A.W. Somerville <cody.somerville@canonical.com>
* Cyril Brulebois <cyril.brulebois@kerlabs.com>
* David Madore <david.madore@ens.fr>
* Erwan Le Gall <elegall@linagora.com>
* Fathi Boudra <fabo@debian.org>
* Franklin Piat <fpiat@bigfoot.com>
* Frederic Daniel Luc Lehobey <Frederic@Lehobey.net>
* Guerkan Senguen <gurkan@linuks.mine.nu>
* Hadar Weiss <whadar@gmail.com>
* Inigo Tejedor Arrondo <inigo@navarrux.org>
* Jason D. Clinton <me@jasonclinton.com>
* Jean Pierre LeJacq <jp.lejacq@quoininc.com>
* Jesse Hathaway <jesse@mbuki-mvuki.org>
* Justin Pryzby <pryzbyj@justinpryzby.com>
* Kai Hendry <hendry@webconverger.com>
* Kel Modderman <kel@otaku42.de>
* Maarten ter Huurne <maarten@treewalker.org>
* Marcelo D. Re <mdre@rectorado.unl.edu.ar>
* Marco Amadori <marco.amadori@gmail.com>
* Markus Bauer <bauer-markus@web.de>
* Mathieu Geli <mathieu.geli@gmail.com>
* Otavio Salvador <otavio@debian.org>
* Peter Holik <peter@holik.at>
* Peter Skogstroem <peter.skogstrom@bitrunner.com>
* Rene Merou <ochominutosdearco@gmail.com>
* Richard Nelson <unixabg@gmail.com>
* Scott Edwards <debian@foss.daxal.com>
* Sebastian Raveau <sebastien.raveau@epita.fr>
* Thomas Lange <lange@informatik.uni-koeln.de>
* Tiago Bortoletto Vaz <tiago@debian-ba.org>
* Trent Buck <trentbuck@gmail.com>
* Tzafrir Cohen <tzafrir.cohen@xorcom.com>
* Vladimir Stavrinov <vs@inist.ru>
Donations (alphabetical order):
* Gracie <gracie@bithawk.net>
Special thanks (alphabetical order):
* Ben Armstrong <synrg@debian.org> for his IRC support and tremendous work on
documentation.
* Jason D. Clinton <me@jasonclinton.com> for his work on netboot type.
* Otavio Salvador <otavio@debian.org> for his QA patches.
* Richard Nelson <rjent@rjent.pair.com> for live-webhelper.
* Sebastian Raveau <sebastien.raveau@epita.fr> for his work on encryption
support.
* Scott Edwards <debian@foss.daxal.com> for his work on d-i/g-i integration.
* Michael Dorrington <mike@zen.co.uk> for distracting Luk Claes on DebConf 7,
so that Luk couldn't disturb me all the time and I could finally do some
work.
...and countless other people showed up on the #debian-live IRC channel since
February 2006: thanks for all your help, ideas, and wishes.

1560
docs/ChangeLog Normal file

File diff suppressed because it is too large Load Diff

474
docs/ChangeLog.live-package Normal file
View File

@ -0,0 +1,474 @@
2007-03-10 Daniel Baumann <daniel@debian.org>
* Added knoppix and knoppix-dvd package lists.
2007-03-09 Daniel Baumann <daniel@debian.org>
* Getting free loopdevice from inside the chroot, not outside.
2007-03-09 Daniel Baumann <daniel@debian.org>
* Added kbd to all !minimal lists.
* Uploaded 0.99.25.
2007-03-08 Otavio Salvador <otavio@debian.org>
* helpers/lh_configapt: Fix aptitude configuration to really avoid
recommended packages to get installed.
* src/scripts/02defaults.sh: Export LIVE_ISOLINUX_SPLASH.
2007-03-04 Daniel Baumann <daniel@debian.org>
* Replaced removal of kernel on minimal flavours with excludes on the
mksquashfs call.
* Added LIVE_INCLUDE_CHROOT to the manual exported variables as reported
by Mathieu Geli <mathieu.geli@gmail.com>.
* Exported CODENAME_* manually as reported by Cédric Lucantis
<omer@no-log.org>.
* Fixed typo s/aptiude/aptitude/ as reported by Kai Hendry
<hendry@iki.fi>.
* Uploaded 0.99.24.
2007-02-22 Daniel Baumann <daniel@debian.org>
* Added xresprobe to all x11 lists.
2007-02-22 Daniel Baumann <daniel@debian.org>
* Applied patches from Otavio Salvador <otavio@debian.org>:
- add and cleanup variable exporting in defaults.
- add LIVE_BOOTSTRAP_CONFIG to lh_debootstrap.
* Uploaded 0.99.23.
2007-02-21 Daniel Baumann <daniel@debian.org>
* Added gnome-junior, kde-junior and xfce-junior lists.
* Uploaded 0.99.22.
2007-02-19 Daniel Baumann <daniel@debian.org>
* Fixed manifest.
2007-02-15 Daniel Baumann <daniel@debian.org>
* Applied patch from Sebastian Raveau <sebastien.raveau@epita.fr> to
add support for filesystem images encrypted with loop-aes.
2007-02-13 Daniel Baumann <daniel@debian.org>
* Broken out scripts into modularized lh_* subscripts.
2007-02-12 Daniel Baumann <daniel@debian.org>
* Added some code as suggested by Alex Owen <r.a.owen@qmul.ac.uk> to
check if the depends (syslinux, memtest etc.) are intentionally
installed in the chroot, and hence, don't remove them.
* Moved some depends into the chroot.
* Uploaded 0.99.21.
2007-02-11 Daniel Baumann <daniel@debian.org>
* Added mini flavour.
2007-02-10 Daniel Baumann <daniel@debian.org>
* Added legacy code for genisoimage.
* Uploaded 0.99.20.
2007-02-09 Daniel Baumann <daniel@debian.org>
* Added usb type.
2007-02-08 Daniel Baumann <daniel@debian.org>
* Added desktop task to the *-desktop flavours.
2007-02-07 Daniel Baumann <daniel@debian.org>
* Extended cron job a bit.
* Fixed manual pruning in minimal flavour as suggested by Bas Wijnen
<wijnen@debian.org>
2007-02-02 Daniel Baumann <daniel@debian.org>
* Added "--without-daemons".
2007-02-01 Daniel Baumann <daniel@debian.org>
* Added "--tasks".
* Added desktop-base to all desktop package lists.
2007-01-31 Daniel Baumann <daniel@debian.org>
* Changed vars in autobuilding script to be able to source
make-live.conf.
* Uploaded 0.99.19.
2007-01-30 Daniel Baumann <daniel@debian.org>
* Added cron job for autobuilding images.
2007-01-25 Daniel Baumann <daniel@debian.org>
* Added additional pruning to minimal flavour.
* Using interactive frontend while processing --hook.
* Uploaded 0.99.18.
2007-01-24 Daniel Baumann <daniel@debian.org>
* Applied patches from Otavio Salvador <otavio@debian.org>:
- adding "--keyring" flag.
- adding LIVE_DISK_VOLUME.
- adding start-stop-daemon wrapper to avoid daemons to be started.
- adding workaround to prevent binfmt locking /proc.
- adding LIVE_ISOLINUX_SPLASH.
* Uploaded 0.99.17.
2007-01-19 Daniel Baumann <daniel@debian.org>
* Replacing mkisofs with genisoimage.
2007-01-18 Daniel Baumann <daniel@debian.org>
* Cleanups.
* Uploaded 0.99.16.
2007-01-16 Daniel Baumann <daniel@debian.org>
* Switched default distribution back to unstable, as unstable is usable
again from the kernel point of view.
* Added file to the minimal package list.
* Uploaded 0.99.15.
2007-01-04 Daniel Baumann <daniel@debian.org>
* Added workaround for new xorg packages by including
xserver-xorg-input-all and xserver-xorg-video-all in all X11 package
lists. See #405639 for more information.
* Added xdebconfigurator to all X11 package lists.
* Adding workaround for initrd backup files.
2006-11-06 Daniel Baumann <daniel@debian.org>
* Uploaded 0.99.14.
2006-11-05 Daniel Baumann <daniel@debian.org>
* Applied patch from Markus Bauer <bauer-markus@web.de>:
- fixing script sourcing to exclude files in .svn
2006-11-03 Daniel Baumann <daniel@debian.org>
* Fixed typo in the policy-rc.d hack.
2006-11-02 Daniel Baumann <daniel@debian.org>
* Using aptitude instead of apt-get.
* Added '--with-recommends' and '--without-recommends'.
2006-11-01 Daniel Baumann <daniel@debian.org>
* Fixed regression when using -d ${CODENAME} wrt/ kernel packages.
2006-10-30 Daniel Baumann <daniel@debian.org>
* Uploaded 0.99.13.
2006-10-29 Daniel Baumann <daniel@debian.org>
* Added minimal-net flavour.
2006-10-28 Daniel Baumann <daniel@debian.org>
* Added console-common to standard selection.
2006-10-27 Daniel Baumann <daniel@debian.org>
* Added patch from Otavio Salvador <otavio@debian.org>:
- fixing preseeding error-handling.
2006-10-26 Daniel Baumann <daniel@debian.org>
* Added gnustep package selection based on the suggestion of
Guerkan Senguen <gurkan@linuks.mine.nu>.
2006-10-25 Daniel Baumann <daniel@debian.org>
* Applied patch from Marcelo D. Re <mdre@rectorado.unl.edu.ar>:
- skip deb-src source-list entries when building images with
--without-source.
* Applied patches from Otavio Salvador <otavio@debian.org>:
- adding '--bootstrap-config' to support cdebootstraps
'--suite-config'.
- allowing override of ${BASE}.
- adjust sourcing of scripts, so that only the real scripts are
sourced and not other (backup) files.
- allowing override of kernel-packages.
* Reverted mangling of LIVE_DISTRIBUTION for sources.list generation.
2006-10-23 Daniel Baumann <daniel@debian.org>
* Uploaded 0.99.12.
2006-10-18 Daniel Baumann <daniel@debian.org>
* Autodetecting proxy now.
2006-10-16 Daniel Baumann <daniel@debian.org>
* Readded and slightly changed --clone and --preseed.
* Uploaded 0.99.11.
2006-10-09 Daniel Baumann <daniel@debian.org>
* Cleanups.
* Uploaded 0.99.10.
2006-10-02 Daniel Baumann <daniel@debian.org>
* Uploaded 0.99.9.
2006-10-01 Daniel Baumann <daniel@debian.org>
* Added multiple repositories.
* Using LIVE_PROXY_* also for bootstraping.
2006-09-27 Daniel Baumann <daniel@debian.org>
* Changing manpage section.
2006-09-26 Daniel Baumann <daniel@debian.org>
* Added default flavour hooks.
* minimal flavour does not install debian-archive-keyring to save space.
* Adjusted network patch.
2006-09-25 Daniel Baumann <daniel@debian.org>
* Removed now unused initramfs-tools hack.
* Simplified xorg check based on distribution rather than version.
* Added fix from Bas Wijnen <wijnen@debian.org> for space handling in
arguments.
* Fixed package list handling similar to the fix suggested by Alex Owen
<r.alex.owen@gmail.com>.
* Uploaded 0.99.8.
2006-09-24 Marco Amadori <marco.amadori@gmail.com>
* 13hack.sh: initramfs-tools hack, check added for xorg.
2006-09-18 Daniel Baumann <daniel@debian.org>
* Uploaded 0.99.7.
2006-09-15 Daniel Baumann <daniel@debian.org>
* Added eject to minimal package selection.
2006-09-14 Daniel Baumann <daniel@debian.org>
* Adjustements for linux 2.6.17 testing propagation.
2006-09-11 Daniel Baumann <daniel@debian.org>
* Uploaded 0.99.6.
2006-09-08 Marco Amadori <marco.amadori@gmail.com>
* 23net.sh: Fixed binary missing directory creation.
* templates/iso: Moved common files to templates/common.
2006-09-07 Daniel Baumann <daniel@debian.org>
* Minor cleanups.
* Fixed dist target.
2006-09-06 Marco Amadori <marco.amadori@gmail.com>
* 14chroot.sh, main.sh: Added manifest support.
* 23net.sh: Added 2 variables for basenames to ease readability.
* main.sh, 02default.sh: Modified Usage() uses.
2006-09-04 Daniel Baumann <daniel@debian.org>
* Uploaded 0.99.5.
2006-09-03 Daniel Baumann <daniel@debian.org>
* Added dist parameter to easily pull images for live.debian.net.
* Added "--output" to specify the image name prefix.
* Exclude iso templates for minimal flavour.
2006-09-02 Daniel Baumann <daniel@debian.org>
* Added experimental as distribution.
* Added source image generation.
* Using dpkg instead of dpkg-architecture, removed dpkg-dev dependency.
2006-08-31 Daniel Baumann <daniel@debian.org>
* Added "--disable-generic-indices" and "--enable-generic-indices".
* Fixed i18n lists.
* Rewritten all lists, comments are now possible.
* Lists must be now explicitly given with --package-list, no longer as
last argument of the make-live call.
* Setting default sources.list while the image generation, restoring
customized ones afterwards.
2006-08-30 Daniel Baumann <daniel@debian.org>
* Cleanups:
- moved 14patch_packages.sh to 13hack.sh.
- simplified 13hack.sh.
2006-08-29 Marco Amadori <marco.amadori@gmail.com>
* pxelinux.cfg: Updated to right defaults, first cifs then nfs or
select your favorite way. Rationale: /dev/nfs is for kernel
discovering, not for initramfs discover, casper will be just fine
with "netboot".
* 13chroot.sh, 14patch_packages.sh: Added a simple system for patching
packages, mainly for xserver-xorg so far.
2006-08-28 Daniel Baumann <daniel@debian.org>
* Updated documentation.
* Added patch from Alex Owen <r.a.owen@qmul.ac.uk> to update
pxelinux.cfg for NFS root in casper.
* Uploaded 0.99.4.
2006-08-27 Daniel Baumann <daniel@debian.org>
* Cleanups.
2006-08-27 Marco Amadori <marco.amadori@gmail.com>
* Added sysv init blocking policy.
2006-08-22 Daniel Baumann <daniel@debian.org>
* Reorganised sources.
* Added staging support.
* Cleaned up parameter names.
* testing is now supported.
2006-08-21 Daniel Baumann <daniel@debian.org>
* Uploaded 0.99.3.
2006-08-02 Marco Amadori <marco.amadori@gmail.com>
* Rewrote netboot support.
* Added support for pure directory rootfs images.
2006-07-31 Daniel Baumann <daniel@debian.org>
* Uploaded 0.99.2.
2006-07-28 Daniel Baumann <daniel@debian.org>
* Added DEBIAN_FRONTEND to chroots(), now completely non-interactive.
* Fixed wrong chroot patch.
2006-07-27 Marco Amadori <marco.amadori@gmail.com>
* Changed amd64 kernel naming scheme.
2006-07-24 Daniel Baumann <daniel@debian.org>
* Uploaded 0.99.1.
2006-07-19 Daniel Baumann <daniel@debian.org>
* Bugfixes.
2006-07-18 Daniel Baumann <daniel@debian.org>
* Added iso templates.
2006-07-17 Daniel Baumann <daniel@debian.org>
* Added chroot to 01-patch.sh.
* Added "--logfile".
* Uploaded 0.99.
2006-07-01 Daniel Baumann <daniel.baumann@panthera-systems.net>
* Added "--flavour".
2006-06-28 Daniel Baumann <daniel.baumann@panthera-systems.net>
* Added "--debug" and "--verbose".
2006-06-23 Daniel Baumann <daniel.baumann@panthera-systems.net>
* Rewritten manpages.
2006-06-19 Marco Amadori <marco.amadori@gmail.com>
* Added "--templates" options.
* Fixed some typos.
2006-06-15 Daniel Baumann <daniel.baumann@panthera-systems.net>
* General fixes.
2006-06-18 Marco Amadori <marco.amadori@gmail.com>
* Added "-a|--architecture" and "-p|--package-list" options.
* Reworked how lists works.
2006-06-15 Daniel Baumann <daniel.baumann@panthera-systems.net>
* General cleanup.
2006-06-14 Marco Amadori <marco.amadori@gmail.com>
* Re-added "-f|--filesystem".
2006-06-12 Marco Amadori <marco.amadori@gmail.com>
* Added "--conffile", "--preseed", "--clone", and "--rootfs" options.
2006-06-12 Daniel Baumann <daniel.baumann@panthera-systems.net>
* Added new splash.rle.
* Added memtest86+.
* Added "--distribution", and "--section" options.
* Moved /etc/default/make-live to /etc/make-live.conf.
2006-06-11 Marco Amadori <marco.amadori@gmail.com>
* Added handling of md5sums.
2006-06-09 Marco Amadori <marco.amadori@gmail.com>
* Added splashy support.
* Added ext2 rootfs support.
* Added external hook and path support.
* Swiched to getopt.
2006-06-02 Daniel Baumann <daniel.baumann@panthera-systems.net>
* Added patch from Jason D. Clinton <me@jasonclinton.com>:
- Added netboot flavour.
- Thanks to SafeDesk Solutions <http://www.safedesk.com/>.
2006-06-01 Daniel Baumann <daniel.baumann@panthera-systems.net>
* Moved syslinux inside the chroot.
2006-05-31 Daniel Baumann <daniel.baumann@panthera-systems.net>
* Added kde-*i18n and standard-i18n lists.
2006-05-28 Daniel Baumann <daniel.baumann@panthera-systems.net>
* Added patch from Frederic Lehobey <Frederic.Lehobey@free.fr>:
- Added locales to LIVE_PACKAGES.
- Added LIVE_MIRROR_KEY, LIVE_REPOSITORY, LIVE_REPOSITORY_KEY, and
LIVE_BOOTAPPEND.
2006-05-27 Daniel Baumann <daniel.baumann@panthera-systems.net>
* Initial release.

View File

@ -0,0 +1,182 @@
commit 1f4cf146edbd72a2d61ac2e60324d392569c9f24
Author: Daniel Baumann <daniel@debian.org>
Date: Wed Oct 14 13:35:25 2009 +0200
Updating vcs fields.
commit d1ab019de29691407e3bde1af2ff5efe9a284380
Author: Richard Nelson <unixabg@gmail.com>
Date: Wed May 27 09:42:55 2009 -0500
Update quoting on variables for safety.
commit 601b25634d291706fc477342b712554a54c42016
Author: Richard Nelson <unixabg@gmail.com>
Date: Sat Mar 14 22:19:41 2009 -0500
update copyright years
commit fed4e5adfd49b339bec16b0338b73f9f90ca40ce
Author: Richard Nelson <unixabg@gmail.com>
Date: Sat Mar 14 21:47:27 2009 -0500
Set lenny as defualt build
commit 083a14f46cc1298b33908991dea145cf4ec7415d
Author: Richard Nelson <unixabg@gmail.com>
Date: Sun Nov 30 16:41:15 2008 -0600
Bug fix on usb-hdd builds.
commit 7742576d3a9b84807c6456007ad3bc0147ca3024
Author: Richard Nelson <unixabg@gmail.com>
Date: Thu Nov 27 22:44:51 2008 -0600
Remove -x flag left on cron during debug operations.
commit 6817dca69fd0c53578c1e14c9c5333d5be94419d
Author: Richard Nelson <unixabg@gmail.com>
Date: Thu Nov 27 22:42:58 2008 -0600
Update to start using more live-helper functions.
commit 649fc3a0fac8eae1b8a239a9ba250e89f4b89dfd
Author: Richard Nelson <unixabg@gmail.com>
Date: Wed Nov 26 22:13:57 2008 -0600
Update Copyright (C) to 2007-2008
commit 5449c921111b2f300006cc41d7b6582270959a82
Author: Daniel Baumann <daniel@debian.org>
Date: Fri Nov 7 18:08:01 2008 +0100
Replacing obsolete dh_clean -k with dh_prep.
commit cd7a4a353ae652a45057da5726467e23401be52d
Author: Richard Nelson <unixabg@gmail.com>
Date: Tue Nov 4 18:40:06 2008 -0600
Bug fix on custom bootstrap and custom binary.
commit fc227fc32f06ba8e5af8c9ebdcd147f98790b6ea
Author: Richard Nelson <unixabg@gmail.com>
Date: Thu Oct 2 17:24:37 2008 -0500
Bug fix in netboot server and path.
commit 446a99439bfee38c89615e1e24bb4729b2223e9e
Author: Richard Nelson <unixabg@gmail.com>
Date: Mon Sep 8 21:39:37 2008 -0500
Include common functions from live-helper for code reuse.
commit 359e51591318966e97128b00bff38c62d07c6827
Author: Richard Nelson <unixabg@gmail.com>
Date: Mon Sep 8 21:35:52 2008 -0500
Added test for unmounting devpts-live.
commit 3fdcc59654986d57f014b6c6721b2a3abde2f722
Author: Richard Nelson <unixabg@gmail.com>
Date: Mon Sep 8 21:29:41 2008 -0500
Local variable prefix with _ on VAR i.e. _VAR
commit 4bbf10e31754f290d3aa0e158a45d09316487544
Author: Richard Nelson <unixabg@gmail.com>
Date: Mon Sep 8 16:12:22 2008 -0500
Local variable LH_ removal/cleanup.
commit 472a6a0825656fbc16f4df6cb19bb16e1df8605f
Author: Richard Nelson <unixabg@gmail.com>
Date: Mon Sep 8 16:02:36 2008 -0500
Minor local variable confusion for LH_ prefix cleanup.
commit df23442fca1c727dd43ca1ea464b277e3617cb0f
Author: Richard Nelson <unixabg@gmail.com>
Date: Mon Sep 8 15:59:08 2008 -0500
Upgrade variables to have the LH_ prefix for LH_* variable, to work with the current live-helper version.
commit f00e0cb212e0c84268e099ca35ca386982e4d82b
Author: Daniel Baumann <daniel@debian.org>
Date: Sun Sep 7 21:57:51 2008 +0200
Removing currently unused Upstream-Depends field in control.
commit 4c85494fa2907a54dd99eaf17816a4d403ddb5bc
Author: Daniel Baumann <daniel@debian.org>
Date: Sun Sep 7 21:57:41 2008 +0200
Updating vcs fields in control file.
commit eaf87ebd9f828740430cc60d3e9f201d88c67c25
Author: Daniel Baumann <daniel@debian.org>
Date: Thu Aug 28 23:40:35 2008 +0200
Setting project email address to the new debian-live@lists.debian.org.
commit 6fbca8e14be271dc62988d5555bba9f453ddbaa7
Author: Daniel Baumann <daniel@debian.org>
Date: Wed Apr 23 18:50:17 2008 +0200
Updating Richards email address.
commit 25e1e7bc4f6a095aaf248a80aeaa3795f4a3e3a9
Author: Daniel Baumann <daniel@debian.org>
Date: Tue Oct 30 11:04:42 2007 +0100
Correcting vcs fields.
commit c49d9ff77bd5be73d5367fd567a9e39fccf78410
Author: Daniel Baumann <daniel@debian.org>
Date: Wed Oct 3 09:11:29 2007 +0200
Fixing wrong homepage field.
commit 8e01ba16a737d04a0367ecf1d4f3d7f80437fe97
Author: Daniel Baumann <daniel@debian.org>
Date: Sun Sep 23 16:04:04 2007 +0200
Using new Homepage field now.
commit 49ca83a4d57051b2b4b4b950178063c6df25e222
Author: Daniel Baumann <daniel@debian.org>
Date: Sun Sep 23 16:04:04 2007 +0200
Adding Upstream-Depends field.
commit 39a9d3e82c71451734f0d4ddb630b67c9d55541a
Author: Daniel Baumann <daniel@debian.org>
Date: Sun Sep 23 16:04:04 2007 +0200
Moving from svn to git.
commit 7e823babbe815bdf520becbfd6f4ccec814aa7e2
Author: Daniel Baumann <daniel@debian.org>
Date: Sun Sep 23 16:04:03 2007 +0200
Removing not uploaded versions.
commit 46e8777246485a15fc6d5a202a361662f4e724b5
Author: Daniel Baumann <daniel@debian.org>
Date: Sun Sep 23 16:03:52 2007 +0200
Adding live-webhelper trunk 20070911.
2007-07-19 Daniel Baumann <daniel@debian.org>
* Introducing build modes.
2007-07-14 Daniel Baumann <daniel@debian.org>
* scripts/cgi:
- Quick fix in EMAIL.
2007-06-04 Daniel Baumann <daniel@debian.org>
* templates/form.html:
- Set default source image to 'generic'.
* Starting live-webhelper.

View File

@ -1,5 +1,3 @@
#!/bin/sh
set -e
lb build noauto "${@}" 2>&1 | tee build.log
lb build noauto "${@}" 2>&1 | tee binary.log

View File

@ -1,8 +1,5 @@
#!/bin/sh
set -e
lb clean noauto "${@}"
rm -f config/binary config/bootstrap config/chroot config/common config/source
rm -f build.log
rm -f binary.log

View File

@ -1,6 +1,5 @@
#!/bin/sh
set -e
lb config noauto \
--packages-lists "standard" \
"${@}"

View File

@ -1,31 +0,0 @@
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
config/control
source/
source*.iso
source*.img
source*.tar*
source*.contents
source*.packages
source*.zsync

View File

@ -0,0 +1,34 @@
#!/bin/sh
# This is an binary hook for live-build(7) to overwrite the banner
# in the graphical Debian Installer.
# To enable it, copy or symlink this hook into your config/binary_local-hooks
# directory and add a replacement banner.png at:
#
# config/binary_debian-installer/banner.png
#
# The file should be a PNG image of dimensions 800 x 75.
set -e
if [ -e config/binary_debian-installer/banner.png ]
then
TARGET_INITRD="binary/install/gtk/initrd.gz"
REPACK_TMPDIR="binary.initrd"
if [ -e "${TARGET_INITRD}" ]
then
# cpio does not have a "extract to directory", so we must change
# directory
mkdir -p ${REPACK_TMPDIR}
cd ${REPACK_TMPDIR}
gzip -d < ../${TARGET_INITRD} | cpio -i --make-directories --no-absolute-filenames
# Overwrite banner
cp ../config/binary_debian-installer/banner.png ./usr/share/graphics/logo_debian.png
find | cpio -H newc -o | gzip -9 > ../${TARGET_INITRD}
cd ..
rm -rf ${REPACK_TMPDIR}
fi
fi

View File

@ -0,0 +1,24 @@
#!/bin/sh
# This is a hook for live-build(7) to install live-build and its config into
# the binary image.
# To enable it, copy or symlink this hook into your config/chroot_local-hooks
# directory.
DIRECTORY="binary/tools/live"
mkdir -p "${DIRECTORY}"
cp -a config "${DIRECTORY}"
if [ -e live-build ]
then
cp -a live-build "${DIRECTORY}"
else
mkdir -p "${DIRECTORY}"/live-build/bin
cp -a /usr/bin/lh* "${DIRECTORY}"/live-build/bin
cp -a /usr/share/live/build "${DIRECTORY}"/live-build/share
cp -a /usr/share/doc/live-build "${DIRECTORY}"/live-build/doc
fi

View File

@ -0,0 +1,16 @@
#!/bin/sh
# This is a hook for live-build(7) to enable automaunting with hal for block devices.
#
# To enable it, copy or symlink this hook into your config/chroot_local-hooks
# directory.
# Remove automount disabling
rm -f /usr/share/hal/fdi/policy/10osvendor/debian-storage-policy-fixed-drives.fdi
# Use ntfs-3g by default to mount ntfs partitions
if [ -x /usr/bin/ntfs-3g ]
then
rm -f /sbin/mount.ntfs
ln -s /usr/bin/ntfs-3g /sbin/mount.ntfs
fi

View File

@ -0,0 +1,10 @@
#!/bin/sh
# This is a hook for live-build(7) to remove any kernel except the newest one.
# To enable it, copy or symlink this hook into your config/chroot_local-hooks
# directory.
for VERSION in $(basename $(ls /boot/vmlinuz-* | head -n-1) | sed -e 's|^vmlinuz-||g')
do
echo apt-get remove --purge linux-image-${VERSION}
done

View File

@ -0,0 +1,15 @@
#!/bin/sh
# This is a hook for live-build(7) to add entries to /etc/modules.
# To enable it, copy or symlink this hook into your config/chroot_local-hooks
# directory.
MODULES=""
for MODULE in ${MODULES}
do
if ! grep -qs /etc/modules ${MODULE}
then
echo ${MODULE} >> /etc/modules
fi
done

View File

@ -0,0 +1,22 @@
#!/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.
#
cat > /tmp/localepurge.preseed << EOF
localepurge localepurge/nopurge multiselect en
#localepurge localepurge/mandelete boolean true
#localepurge localepurge/dontbothernew boolean false
localepurge localepurge/showfreedspace boolean false
#localepurge localepurge/quickndirtycalc boolean true
#localepurge localepurge/verbose boolean false
EOF
debconf-set-selections < /tmp/localepurge.preseed
rm -f /tmp/localepurge.preseed
apt-get install --yes localepurge
dpkg-reconfigure localepurge
localepurge

View File

@ -0,0 +1,495 @@
#!/bin/sh
# This hook was based and adapted from:
# http://lists.debian.org/debian-live/2009/04/msg00186.html
# ---------------------------------------------------------
#
#
# NOTE 1: this was not tested with persistent boot option,
# but it seems logic that persistent and lukshome can't
# coexist as boot options (because of snapshots and others), so lukshome
# won't be executed if any persistent option is given on boot.
#
# NOTE 2: if using an USB key, it will eventualy end up failing someday.
# You should backup the encrypted disk image file itself (luks-home.img) to
# prevent loosing your data.
#
# This hook will create 3 files:
#
# /usr/local/sbin/create-lukshome-file.sh
# script to create an disk file image (luks-home.img) with a
# LUKS encrypted ext2 filesystem inside to be placed in a
# partition labeled lukshome.
#
# /usr/local/sbin/lukshome.sh
# detects a partition with lukshome label, updates fstab and crypttab so
# the encrypted file is mounted later in a loopback device (/dev/loopX).
# It also changes /etc/init.d/umountfs so the encrypted home is correctly
# umounted.
#
# /usr/share/initramfs-tools/scripts/live-bottom/13live_luks_home
# a live-boot hook to execute lukshome.sh script
# in initrd.
#
#
# HOWTO lukshome
# --------------
#
# First build your live system with this hook inside config/chroot_local-hooks/.
# If you have an existing live-build build directory with a previous live
# build, you might have to run
#
# lh_clean
# lh_clean --stage
#
# to make sure this hook is included in the live system. Then (re)build your
# live system.
#
# lh_build
#
# After booting your (re)built live system, setup the encrypted losetup
# filesystem to be used as /home using the instructions present in the
# create-lukshome-file.sh script.
#
# Reboot and now use the "lukshome" boot option to mount the encrypted /home,
# like when using "persistent" boot option with a home-rw file in some partition.
#
# install needed packages (in case apt recommends are off)
# make sure that cryptsetup is installed
echo "I: checking for cryptsetup."
if [ ! -x /sbin/cryptsetup ]
then
echo "I: installing cryptsetup."
DEBIAN_FRONTEND="dialog" apt-get install --yes --force-yes -y cryptsetup
fi
echo "I: to see how to use lukshome hook run create-lukshome-file.sh as root."
echo "I: creating script /usr/local/sbin/create-lukshome-file.sh"
cat > /usr/local/sbin/create-lukshome-file.sh << 'EOF'
#!/bin/sh
# This script will create an encrypted filesystem in a file to
# be used as /home in a live system built with Debian Live Helper with
# this hook in config/chroot_local-hooks/.
#
# The lukshome boot option will do the following:
# - search for a partition with label 'lukshome'
# (btw, you can't use the live system partition itself)
# - mount the partition as /luks-home in the live system
# - open /luks-home/luks-home.img file as a loopback device (/dev/loop)
# - open the loopback device with cryptsetup
# - mount the encrypted filesystem as /home
#
# This script will only create the luks-home.img file. Next are details of how
# to use this script.
#
# CAUTION! THIS CAN WIPE YOUR DATA, backup first!
# Be sure to understand what you will do, or you can end up
# wiping disks or partitions you don't want to!
#
# Login as root:
# $ sudo -i
#
# Create a mountpoint (don't use /mnt, it will be used by this script):
# # mkdir /media/target
#
# !!! *** Skip the next line if you don't want to wipe a partition *** !!!
# !!! * Just change the partition label to 'lukshome' (without quotes) * !!!
# Create an ext2 filesystem in a partition with 'lukshome' label:
# # mkfs.ext2 -L lukshome /dev/the_partition_to_be_used
#
# Mount the partition and cd into it:
# # mount /dev/the_partition_to_be_used /media/target
# # cd /media/target
#
# Create the encrypted file:
# # create-lukshome-file.sh
#
# The script is located in /usr/local/sbin/, so it's in root $PATH.
# It will copy the directories in /home/* into the file.
# Now return to $HOME to be able to umount the target partition:
# # cd
#
# Umount the target partition:
# # umount /media/target
#
# Reboot and use the "lukshome" boot option to mount the encrypted /home,
# like in using "persistent" boot option with a home-rw file in some partition.
#
# To use another partition label use the following boot options:
# lukshome lukspart=partition_label
#
# If you want to use another filename instead of luks-home.img, rename (mv)
# the file and use the following boot options:
# lukshome luksfile=filename
#
# Both boot options can be used at the same time, but always with lukshome:
# lukshome lukspart=partition_label luksfile=filename
#
# By default, if just the lukshome boot option is used, the script will
# search for a partition labeled 'lukshome' and a file named 'luks-home.img'.
#
# Press Shift-PgUp/Shift-PgDn to scrool the instructions on the screen.
# check if root/sudo
if [ "${USER}" != "root" ]
then
echo " ** Please run this script as root or with sudo."
exit 1
fi
# check if /mnt is available and empty
mount | grep "/mnt" > /dev/null
MNT_IS_MOUNTED=${?}
if [ "${MNT_IS_MOUNTED}" == 0 ]
then
echo "** ERROR: /mnt is mounted at the moment. Please umount it to use this script."
exit 1
fi
if [ "$(ls -A /mnt)" ]
then
echo "** ERROR: /mnt is not empty. An empty /mnt is needed to use this script."
exit 1
fi
# check if /dev/mapper/luks-home is available
if [ -f /dev/mapper/luks-home ]
then
echo "** ERROR: /dev/mapper/luks-home is being used at the moment. Please run «cryptsetup remove luks-home» to use this script."
exit 1
fi
# show instructions
echo ""
echo "** Instructions to use create-lukshome-file.sh (this script):"
sed -n '2,64p' /usr/local/sbin/create-lukshome-file.sh | sed 's/^.//'
echo ""
# proceed?
echo "** Do you want to proceed with this script? (y/N)"
read CONFIRM
case "${CONFIRM}" in
y*|Y*)
echo ""
;;
*)
exit 0
;;
esac
# create file
echo ""
echo "** Please type the size of the file disk image."
echo "Size of the file in MB: "
read FILE_SIZE
echo ""
echo "** Creating file luks-home.img."
echo "** Filling file image with /dev/urandom output. It will take some time."
echo "(Edit this script to use /dev/random. It's known to be more secure but "
echo "it will take a *very* long time to complete."
dd if=/dev/urandom of=luks-home.img bs=1M count=${FILE_SIZE}
# To use /dev/random comment the line above and uncomment the next line
#dd if=/dev/random of=luks-home.img ibs=128 obs=128 count=$((8192*${FILE_SIZE}))
# You might have to increase kernel entropy by moving the mouse, typing keyboard,
# make the computer read the disk or use network connections.
echo "** Done."
echo ""
# losetup
FREE_LOSETUP=$(losetup -f)
echo "** Using ${FREE_LOSETUP} to open luks-home.img"
losetup ${FREE_LOSETUP} ./luks-home.img
echo "** Done."
echo ""
# cryptsetup
echo "** Running cryptsetup."
echo ""
echo "** luksFormat"
cryptsetup luksFormat ${FREE_LOSETUP}
EXIT_CODE=${?}
if [ "${EXIT_CODE}" != 0 ]
then
echo "** ERROR: Error while trying to format disk file image."
losetup -d ${FREE_LOSETUP}
exit 1
fi
echo ""
echo "** luksOpen"
cryptsetup luksOpen ${FREE_LOSETUP} luks-home
EXIT_CODE=${?}
if [ "${EXIT_CODE}" != 0 ]
then
echo "** ERROR: Error while trying to open LUKS file image."
losetup -d ${FREE_LOSETUP}
exit 1
fi
echo ""
# format encrypted filesystem
echo "** Now formating /dev/mapper/luks-home"
mkfs.ext2 /dev/mapper/luks-home
EXIT_CODE=${?}
if [ "${EXIT_CODE}" != 0 ]
then
echo "** ERROR: Error while trying to format LUKS file."
cryptsetup remove luks-home
losetup -d ${FREE_LOSETUP}
exit 1
fi
echo ""
# mount in /mnt
echo "** Now mounting luks-home.img in /mnt"
mount /dev/mapper/luks-home /mnt
EXIT_CODE=${?}
if [ "${EXIT_CODE}" != 0 ]
then
echo "** ERROR: Error while trying to mount LUKS file in /mnt."
umount /mnt
cryptsetup remove luks-home
losetup -d ${FREE_LOSETUP}
exit 1
fi
echo ""
# copy files
HOME_DIR="/home/*"
echo "** Copying ${HOME_DIR}."
cp -rav ${HOME_DIR} /mnt
EXIT_CODE=${?}
if [ "${EXIT_CODE}" != 0 ]
then
echo "** ERROR: Error while trying to copy files to /mnt."
umount /mnt
cryptsetup remove luks-home
losetup -d ${FREE_LOSETUP}
exit 1
fi
echo "** Done."
echo ""
echo "** All done."
echo "** Closing losetup, cryptsetup and mounted /mnt."
# umount and close
umount /mnt
cryptsetup remove luks-home
losetup -d ${FREE_LOSETUP}
echo "** The disk file image luks-home.img is done and ready. Move it into a partition"
echo "** with 'lukshome' as label and reboot with lukshome boot option to use it."
echo ""
EOF
chmod 0755 /usr/local/sbin/create-lukshome-file.sh
echo "I: creating script /usr/local/sbin/lukshome.sh"
cat > /usr/local/sbin/lukshome.sh << 'EOF'
#!/bin/sh
# this script is to be executed by a hook in live-boot. It searches
# for a partition with 'lukshome' label, mounts it as /luks-home, then opens an
# encrypted disk image file called luks-home.img as a loopback device, opens it
# with cryptsetup and finally mounts the present filesystem as /home.
# It also changes /etc/init.d/umountfs to umount the lukshome partition
# (/luks-home) and clear the loopback device on shutdown.
# functions taken from live-helpers
. /usr/share/initramfs-tools/scripts/live-helpers
# set default values
LUKSPART="lukshome"
LUKSFILE="luks-home.img"
# get boot option lukshome - adapted from live-helpers
for ARGUMENT in $(cat /proc/cmdline)
do
case "${ARGUMENT}" in
lukshome)
LUKSHOME=1
;;
luksfile=*)
LUKSFILE="${ARGUMENT#luksfile=}"
LUKSHOME=1
;;
lukspart=*)
LUKSPART="${ARGUMENT#lukspart=}"
LUKSHOME=1
;;
esac
done
CRYPTHOME=$(/sbin/blkid -L ${LUKSPART})
# if no partition found, exit
if [ -z "${CRYPTHOME}" ]
then
echo "Could not find any partition with ${LUKSPART} label. "
echo "Proceeding with no encrypted /home."
exit 0
fi
# mount partition where file container is
echo "Mounting /luks-home with ${CRYPTHOME}."
mkdir -p /luks-home
mount -t $(get_fstype "${CRYPTHOME}") "${CRYPTHOME}" /luks-home
# mount losetup encrypted file
FREE_LOOP="$(/sbin/losetup -f)"
echo "Opening file /luks-home/${LUKSFILE} in ${FREE_LOOP}."
if [ -f /luks-home/"${LUKSFILE}" ]
then
/sbin/losetup ${FREE_LOOP} /luks-home/"${LUKSFILE}"
echo "Adding ${FREE_LOOP} home to /etc/crypttab and setting it as /home in /etc/fstab."
# update crypttab
echo "home ${FREE_LOOP} none luks,check,timeout" >> /etc/crypttab
# update fstab
echo "/dev/mapper/home /home ext2 defaults,noatime 0 0" >> /etc/fstab
else
echo "Did not found any file named ${LUKSFILE} in ${CRYPTHOME}!"
echo "Proceeding with no encrypted /home."
sleep 2
umount -r /luks-home
exit 0
fi
# changes to /etc/init.d/umountfs to make /luks-home being umounted on shutdown
sed -i 's/[\t]do_stop/CHANGE_HERE/' /etc/init.d/umountfs
sed -i 's|CHANGE_HERE| \
# added by lukshome hook - umount \/luks-home to prevent busy device on shutdown \
LOOP_LUKSHOME=$(losetup -a \| grep luks-home \|cut -c 1-10) \
if [ -n ${LOOP_LUKSHOME} ] \
then \
umount -r -d \/home \
cryptsetup remove home \
losetup -d ${LOOP_LUKSHOME} \
umount -r \/luks-home \
fi \
\
do_stop \
|' /etc/init.d/umountfs
EOF
chmod 0755 /usr/local/sbin/lukshome.sh
# scripts/live-bottom/13live_luks_home, right after 12fstab
echo "I: creating /usr/share/initramfs-tools/scripts/live-bottom/13live_luks_home"
cat > /usr/share/initramfs-tools/scripts/live-bottom/13live_luks_home << 'EOF'
#!/bin/sh
#set -e
# initramfs-tools header
PREREQ=""
prereqs()
{
echo "${PREREQ}"
}
case "${1}" in
prereqs)
prereqs
exit 0
;;
esac
. /scripts/live-functions
# live-boot hook to use an disk image file with encrypted filesystem as /home.
log_begin_msg "Executing losetup-lukshome"
# get boot option lukshome - adapted from live-helpers
for ARGUMENT in $(cat /proc/cmdline)
do
case "${ARGUMENT}" in
lukshome)
LUKSHOME=1
;;
luksfile=*)
LUKSFILE="${ARGUMENT#luksfile=}"
LUKSHOME=1
;;
lukspart=*)
LUKSPART="${ARGUMENT#lukspart=}"
LUKSHOME=1
;;
esac
done
# don't use persistent* and lukshome
if [ -n "${PERSISTENT}" ] && [ -n "${LUKSHOME}" ]
then
echo "You should not use persistent and lukshome at the same time."
echo "Skipping lukshome. Persistent medium, if any, will be used instead."
log_end_msg
exit 0
fi
# if no lukshome boot option, exit
if [ -z "${LUKSHOME}" ]
then
log_end_msg
exit 0
fi
log_begin_msg "Executing lukshome.sh script."
mount -o bind /sys /root/sys
mount -o bind /proc /root/proc
mount -o bind /dev /root/dev
# lukshome.sh detects lukshome partition and file location, mounts it
# and opens the file and then updates fstab and crypttab to use it as /home.
chroot /root /usr/local/sbin/lukshome.sh
umount /root/sys
umount /root/proc
umount /root/dev
# delete the lukshome.sh script, not needed anymore
# rm -f /root/usr/local/sbin/lukshome.sh
log_end_msg
EOF
chmod 0755 /usr/share/initramfs-tools/scripts/live-bottom/13live_luks_home
echo "I: update-initramfs to include 13live_luks_home."
# if you already have installed the update-initramfs.sh hook, you can remove
# this.
for KERNEL in /boot/vmlinuz-*
do
VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
update-initramfs -k ${VERSION} -t -u
done

View File

@ -0,0 +1,19 @@
#!/bin/sh
# This is a hook for live-build(7) to install ralink rt2570 drivers
# To enable it, copy or symlink this hook into your config/chroot_local-hooks
# directory.
apt-get install --yes build-essential
which module-assistant || apt-get install --yes module-assistant
module-assistant update
for KERNEL in /boot/vmlinuz-*
do
VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
module-assistant --non-inter --quiet auto-install rt2570-source -l ${VERSION}
done
module-assistant clean rt2570-source

View File

@ -0,0 +1,31 @@
#!/bin/sh
# This is a hook for live-build(7) to install sun-java.
# To enable it, copy or symlink this hook into your config/chroot_local-hooks
# directory.
#
# Note: This hook requires packages from the non-free category. Make sure you
# enabled it in your configuration.
# live-build sets DEBIAN_FRONTEND to 'noninteractive' to advise debconf to not
# ask any questions while installing packages. Suns redistribution terms for
# Java do not allow this, therefore we need to overwrite DEBIAN_FRONTEND for
# this apt-get call only.
# In case you do accept the license terms, you can also preseed the values
# for a complete non-interactive build, by uncommenting the following three lines:
#echo "sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true" > /root/preseed
#debconf-set-selections < /root/preseed
#rm -f /root/preseed
DEBIAN_FRONTEND="dialog" apt-get install --yes sun-java6-bin sun-java6-demo \
sun-java6-doc sun-java6-fonts sun-java6-jdk sun-java6-jre \
sun-java6-plugin sun-java6-source
# Ensure that /tmp has the right permissions; apparently sun-java5-doc tampers
# with it
chmod 1777 /tmp
# Set sun-java as default java
update-alternatives --set java /usr/lib/jvm/java-6-sun/jre/bin/java

View File

@ -0,0 +1,22 @@
#!/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

View File

@ -0,0 +1,17 @@
#!/bin/sh
# Disable all
for _FILE in /etc/init.d/*
do
update-rc.d -f $(basename ${_FILE}) remove
done
# Re-enable all required (taken from -f standard chroot)
for _PACKAGE in live-boot live-config console-common cron dpkg ifupdown initscripts kbd klogd libc6 libdevmapper1.02 libselinux1 libsepol1 login makedev module-init-tools netbase openbsd-inetd procps sudo sysklogd udev util-linux
do
if [ -f /var/lib/dpkg/info/${_PACKAGE}.postinst ]
then
# Re-configure if existing
/var/lib/dpkg/info/${_PACKAGE}.postinst configure
fi
done

View File

@ -0,0 +1,8 @@
#!/bin/sh
# This is a hook for live-build(7) to remove udev persistent device generator
# rules.
# To enable it, copy or symlink this hook into your config/chroot_local-hooks
# directory.
rm -f /etc/udev/rules.d/*persistent-net-generator.rules

View File

@ -0,0 +1,15 @@
#!/bin/sh
# This is a hook for live-build(7) to rebuild the initramfs image.
# To enable it, copy or symlink this hook into your config/chroot_local-hooks
# directory.
#
# Note: You only want to use this hook if you have modified any initramfs-script
# during the build and need to refresh the initrd.img for that purpose.
for KERNEL in /boot/vmlinuz-*
do
VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
update-initramfs -k ${VERSION} -t -u
done

View File

@ -0,0 +1,8 @@
#!/bin/sh
# This is a hook for live-build(7) to enable virtualbox-ose module.
# To enable it, copy or symlink this hook into your config/chroot_local-hooks
# directory.
# Enabling loading of vboxdrv
sed -i -e 's|^LOAD_VBOXDRV_MODULE=.*$|LOAD_VBOXDRV_MODULE=1|' /etc/default/virtualbox-ose

View File

@ -1,63 +0,0 @@
#!/bin/sh
set -e
# util-linux creates random UUIDs when uuid_generate_random is called
# Use LD_PRELOAD to replace uuid_generate_random with a less random version
# Don't run if gcc is not installed
if [ ! -e /usr/bin/cc ];
then
exit 0
fi
cat > unrandomize_uuid_generate_random.c << END_OF_SOURCE
#include <stdlib.h>
#include <stdio.h>
#define SEQUENCE_FILENAME "/var/cache/unrandomize_uuid_generate_random.sequence_number"
/* https://tools.ietf.org/html/rfc4122 */
typedef unsigned char uuid_t[16];
/* Our pseudo-random version */
void uuid_generate_random(uuid_t out)
{
/* Nil UUID */
for (int i=0;i<16;i++) {
out[i] = 0x00;
}
out[6]=0x40; /* UUID version 4 means randomly generated */
out[8]=0x80; /* bit7=1,bit6=0 */
/* The file doesn't need to exist yet */
FILE *f = fopen(SEQUENCE_FILENAME, "rb");
if (f) {
fread(out+12, 4, 1, f);
fclose(f);
}
/* Use the next number. Endianness is not important */
(*(unsigned long*)(out+12))++;
unsigned long long epoch;
/* Use SOURCE_DATE_EPOCH when provided */
char *date = getenv("SOURCE_DATE_EPOCH");
if (date) {
epoch = strtoll(date, NULL, 10);
} else {
epoch = 0ll;
}
out[0] = (epoch & 0xFF000000) >> 24;
out[1] = (epoch & 0x00FF0000) >> 16;
out[2] = (epoch & 0x0000FF00) >> 8;
out[3] = (epoch & 0x000000FF);
/* Write the sequence number */
f = fopen(SEQUENCE_FILENAME, "wb");
if (f) {
fwrite(out+12, 4, 1, f);
fclose(f);
}
}
END_OF_SOURCE
/usr/bin/cc -shared -fPIC unrandomize_uuid_generate_random.c -Wall --pedantic -o /usr/lib/unrandomize_uuid_generate_random.so
rm -f unrandomize_uuid_generate_random.c

View File

@ -1,31 +0,0 @@
#!/bin/sh
set -e
# fontconfig creates non-reproducible files with UUIDs
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=864082
#
# Because the UUIDs should not be deleted, the proposed work-around is:
# * Use LD_PRELOAD to replace uuid_generate_random with a less random version
# Don't run if fontconfig is not installed
if [ ! -e /usr/bin/fc-cache ];
then
exit 0
fi
# Don't run if fontconfig is sufficiently new
if dpkg --compare-versions $(dpkg-query --show --showformat '${Version}\n' fontconfig | head -1) ge 2.13.1-4.4~;
then
exit 0
fi
# Don't run if the LD_PRELOAD module is not compiled
if [ ! -e /usr/lib/unrandomize_uuid_generate_random.so ];
then
echo "P: $(basename $0) Reproducible hook inactive: The UUID module was not found"
exit 0
fi
LD_PRELOAD=/usr/lib/unrandomize_uuid_generate_random.so /usr/bin/fc-cache --force --really-force --system-only --verbose
echo "P: $(basename $0) Reproducible hook has been applied"

View File

@ -1,21 +0,0 @@
#!/bin/sh
set -e
# mkconf of mdadm creates a file with a timestamp
# A bug report with patch is available at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=982607
# This script duplicates that patch
# Don't run if mdadm is not installed
if [ ! -e /usr/share/mdadm/mkconf ];
then
exit 0
fi
# If mkconf already contains references to SOURCE_DATE_EPOCH, there is no need to patch the file
if grep -q SOURCE_DATE_EPOCH /usr/share/mdadm/mkconf;
then
exit 0
fi
sed -i -e '/# This configuration was auto-generated on/cif [ -z $SOURCE_DATE_EPOCH ]; then\n echo "# This configuration was auto-generated on $(date -R) by mkconf"\nelse\n echo "# This configuration was auto-generated on $(date -R --utc -d@$SOURCE_DATE_EPOCH) by mkconf"\nfi' /usr/share/mdadm/mkconf
echo "P: $(basename $0) Reproducible hook has been applied"

View File

@ -1,28 +0,0 @@
#!/bin/sh
set -e
# update-perl-sax-parsers of libxml-sax-perl creates a file with a random order of its lines
# A bug report with patch is available at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993444
# This script duplicates that patch
# Don't run if libxml-sax-perl is not installed
if [ ! -e /usr/bin/update-perl-sax-parsers ];
then
exit 0
fi
# If Debian.pm already contains a sort line, there is no need to patch the file
if grep -q sort /usr/share/perl5/XML/SAX/Debian.pm;
then
exit 0
fi
# Patch the Perl script
sed -i -e '/foreach my $key/s/keys/sort keys/' /usr/share/perl5/XML/SAX/Debian.pm
# Regenerate the file that has more than one key-value pair
update-perl-sax-parsers --remove XML::SAX::Expat
update-perl-sax-parsers --add XML::SAX::Expat --priority 50
update-perl-sax-parsers --update
echo "P: $(basename $0) Reproducible hook has been applied"

View File

@ -1,62 +0,0 @@
#!/bin/sh
set -e
# libxmlb2 creates random GUIDs
# See https://github.com/hughsie/libxmlb/issues/110
# Fixed upstream: https://github.com/hughsie/libxmlb/commit/0652ec042cc0611b9b98e080e64e1025db9b4183
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006358
#
# Until a sufficiently new version is installed, apply the work-around
# Don't run if libxmlb2 is not installed
if [ ! -e /usr/share/doc/libxmlb2 ];
then
exit 0
fi
# Don't run if AppStream is not installed
if [ ! -e /usr/bin/appstreamcli ];
then
exit 0
fi
# Don't run if the version of libxmlb2 is sufficiently new
if dpkg --compare-versions $(dpkg-query --show --showformat '${Version}\n' libxmlb2 | head -1) ge 0.3.7~;
then
exit 0
fi
# Refresh the compressed XML files
appstreamcli refresh --force > /dev/null
# appstream <= 0.15.1 uses /var/cache/app-info
# appstream >= 0.15.2 uses /var/cache/swcatalog
if [ -d /var/cache/swcatalog ];
then
CACHE_PATH=/var/cache/swcatalog/cache
else
CACHE_PATH=/var/cache/app-info/cache
fi
# Set the GUID field for each compressed XML file to zero
for f in $(ls ${CACHE_PATH}/*.xb);
do
dd if=$f of=tmp.xb count=8 iflag=count_bytes status=none
dd if=/dev/zero of=tmp.xb count=16 iflag=count_bytes status=none oflag=append conv=notrunc
dd if=$f of=tmp.xb skip=24 iflag=skip_bytes status=none oflag=append conv=notrunc
rm $f
mv tmp.xb $f
done
# When apt update is invoked, 50appstream calls 'appstreamcli refresh'
# so add another hook to reset the guid again
#
# Before the chroot is finalised, 'apt update' is invoked again, so the reset guid step needs to be re-applied
cat << EOF > /etc/apt/apt.conf.d/51appstream_reset_guid
# Reset the GUID of the AppStream cache files when APT's cache is updated (i.e. apt update)
APT::Update::Post-Invoke-Success {
"if /usr/bin/test -w ${CACHE_PATH} -a -e /usr/bin/appstreamcli; then for f in \$(ls ${CACHE_PATH}/*.xb); do dd if=\$f of=tmp.xb count=8 iflag=count_bytes status=none; dd if=/dev/zero of=tmp.xb count=16 iflag=count_bytes status=none oflag=append conv=notrunc; dd if=\$f of=tmp.xb skip=24 iflag=skip_bytes status=none oflag=append conv=notrunc; rm \$f; mv tmp.xb \$f; done; fi";
};
EOF
echo "P: $(basename $0) Reproducible hook has been applied"

View File

@ -1,60 +0,0 @@
#!/bin/sh
set -e
# This script fixes several issues:
# 1. The fmt files contain timestamps
# 2. The fmt files randomly select the path to language.dat.lua and language.def
# (/var/lib/texmf/tex/generic/config vs /usr/share/texlive/texmf-dist/tex/generic/config)
# 3. The fmt files have a random order due to the way iterators work in lua
# The function 'exception_strings' uses these iterators
# https://sources.debian.org/src/texlive-bin/2021.20210626.59705-1/texk/web2c/luatexdir/lang/texlang.c/?hl=501#L501
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009196
# 4. The 'tex' executable intentionally ignores SOURCE_DATE_EPOCH
# See https://sources.debian.org/src/texlive-bin/2021.20210626.59705-1/debian/patches/debian-SDE-docs-in-tex-etex-manpage/?hl=36#L36
# Note: This hook must run before 0140-remove-log-files.hook.chroot and 0190-remove-temporary-files.hook.chroot
# Don't run if texlive-binaries is not installed
if [ ! -e /usr/bin/luahbtex ];
then
exit 0
fi
# This is TeX: set FORCE_SOURCE_DATE to enable SOURCE_DATE_EPOCH -> fixes 1 and 2
export FORCE_SOURCE_DATE=1
# Generate the .fmt file 10 times. If the content differs, a fix for 3 is required
for i in $(seq 1 10); do luahbtex -ini -jobname=luahbtex -progname=luabhtex luatex.ini > /dev/null; md5sum luahbtex.fmt >> md5sum.luahbtex; done
rm -f luahbtex.fmt
rm -f luahbtex.log
if [ $(sort -u < md5sum.luahbtex | wc -l) -ne 1 ];
then
# Ugly hack: remove the hyphenation exceptions -> fixes 3
# This results in incorrect hyphenation, but it is a work-around until the function 'exception_strings' has been adjusted
sed -i -e '/as-so-ciate/d;/as-so-ciates/d;/dec-li-na-tion/d;/oblig-a-tory/d;/phil-an-thropic/d;/present/d;/presents/d;/project/d;/projects/d;/reci-procity/d;/re-cog-ni-zance/d;/ref-or-ma-tion/d;/ret-ri-bu-tion/d;/ta-ble/d' /usr/share/texlive/texmf-dist/tex/generic/hyphen/hyphen.tex
echo "P: $(basename $0) Reproducible hack has been applied: hyphenation of some words will be incorrect"
fi
rm -f md5sum.luahbtex
# Rebuild all .fmt and .log files in /var/lib/texmf/web2c
fmtutil --sys --all
# Use faketime to enforce a timestamp -> fixes 4
# NB: hooks don't know about the apt/aptitude selection, so use 'apt-get'
export FAKETIME_ALREADY_INSTALLED=1
if [ ! -e /usr/bin/faketime ];
then
FAKETIME_ALREADY_INSTALLED=0
apt-get install faketime --yes -o Acquire::Check-Valid-Until=false
fi
OLD_PWD=$(pwd)
cd /var/lib/texmf/web2c/tex
faketime $(date --utc -d@$SOURCE_DATE_EPOCH --iso-8601=seconds) tex -ini -jobname=tex -progname=tex tex.ini
cd ${OLD_PWD}
if [ ${FAKETIME_ALREADY_INSTALLED} -eq 0 ];
then
apt-get remove --purge --yes faketime
apt-get autoremove --yes
fi
echo "P: $(basename $0) Reproducible hook has been applied"

Some files were not shown because too many files have changed in this diff Show More