Commit 97560dca authored by Daniel Baumann's avatar Daniel Baumann
Browse files

Adding upstream version 4.0~alpha31.

parent 6ed737c9
#!/bin/sh
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2013 Daniel Baumann <mail@daniel-baumann.ch>
##
## This program 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.
set -e
# Including common functions
[ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
# Setting static variables
DESCRIPTION="$(Echo 'schedule live packages for installation')"
HELP=""
USAGE="${PROGRAM} [--force]"
Arguments "${@}"
# Reading configuration files
Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source
Set_defaults
# Requiring stage file
Require_stagefile .build/config .build/bootstrap
# Checking stage file
Check_stagefile .build/chroot_live-packages
# Checking lock file
Check_lockfile .lock
# Creating lock file
Create_lockfile .lock
# Queue installation of live-boot
if [ -n "${LB_INITRAMFS}" ] && [ "${LB_INITRAMFS}" != "none" ]
then
_PACKAGES="${LB_INITRAMFS}"
fi
# Queue installation of live-config
if [ -n "${LB_INITSYSTEM}" ] && [ "${LB_INITSYSTEM}" != "none" ]
then
_PACKAGES="${_PACKAGES} live-config live-config-${LB_INITSYSTEM}"
fi
# Do initsystem specific hacks
case "${LB_INITSYSTEM}" in
systemd)
_PACKAGES="${_PACKAGES} systemd-sysv"
if [ -e chroot/var/lib/dpkg/info/sysvinit.list ]
then
Chroot chroot "dpkg --force-remove-essential --purge sysvinit"
fi
;;
sysvinit)
_PACKAGES="${_PACKAGES} sysvinit"
if [ -e chroot/var/lib/dpkg/info/systemd-sysv.list ]
then
Chroot chroot "dpkg --force-remove-essential --purge systemd systemd-sysv"
fi
;;
esac
# Install live packages
if [ -n "${_PACKAGES}" ]
then
case "${LB_APT}" in
apt|apt-get)
Chroot chroot "apt-get ${APT_OPTIONS} install ${_PACKAGES}"
;;
aptitude)
Chroot chroot "aptitude ${APTITUDE_OPTIONS} install ${_PACKAGES}"
;;
esac
# Creating stage file
Create_stagefile .build/chroot_live-packages
fi
......@@ -888,10 +888,6 @@ else
Echo_message "Updating config tree for a ${LB_MODE}/${LB_DISTRIBUTION}/${LIVE_IMAGE_ARCHITECTURE} system"
fi
# Creating bootstrap configuration
mkdir -p config
mkdir -p config/includes
# Creating live-build configuration
cat > config/common << EOF
# config/common - common options for live-build(7)
......@@ -1103,8 +1099,6 @@ EOF
# Creating lb_chroot_* configuration
mkdir -p config/archives
mkdir -p config/apt
mkdir -p config/hooks
mkdir -p config/includes.chroot
mkdir -p config/packages
mkdir -p config/packages.chroot
mkdir -p config/package-lists
......@@ -1152,7 +1146,6 @@ EOF
# Creating lb_binary_* configuration
mkdir -p config/debian-installer
mkdir -p config/includes.binary
mkdir -p config/includes.installer
mkdir -p config/packages.binary
mkdir -p config/package-lists
......@@ -1344,29 +1337,6 @@ then
rmdir --ignore-fail-on-non-empty local > /dev/null 2>&1 || true
fi
if echo "${VERSION}" | grep -qs "alpha"
then
# live-build alpha version
Echo_warning "WARNING: THIS VERSION OF LIVE-BUILD IS EXPERIMENTAL!"
Echo_warning "IT IS UNFINISHED AND CHANGES HEAVILY WITHOUT PRIOR NOTICE."
Echo_warning "USER DISCRETION IS ADVISED."
Echo_warning ""
Echo_warning "Please also note that you are running a live-build development version"
Echo_warning "and that we are only supporting the newest development version."
Echo_warning ""
Echo_warning "Make sure you are using the newest version at all times."
fi
Echo_message "Symlinking hooks..."
for _HOOK in "${LIVE_BUILD}"/share/hooks/*.hook* /usr/share/live/build/hooks/*.hook*
do
if [ -e "${_HOOK}" ] && [ ! -e "config/hooks/$(basename ${_HOOK})" ]
then
ln -s "${_HOOK}" "config/hooks/$(basename ${_HOOK})"
fi
done
cat > config/build << EOF
[Image]
Architecture: ${LIVE_IMAGE_ARCHITECTURE}
......@@ -1395,89 +1365,5 @@ Name: ${LIVE_IMAGE_NAME}
Type: ${LIVE_IMAGE_TYPE}
EOF
# TODO: allow verification against user-specified keyring
# For now, we'll only validate against debian-keyring
# TODO2: use chrooted validation rather than host system based one
case "${LB_MODE}" in
progress-linux)
case "${LB_DISTRIBUTION}" in
artax)
_KEYS="1-artax"
;;
artax-backports)
_KEYS="1-artax 1+-artax-backports"
;;
baureo)
_KEYS="2-baureo"
;;
baureo-backports)
_KEYS="2-baureo 2+-baureo-backports"
;;
chairon)
_KEYS="3-chairon"
;;
chairon-backports)
_KEYS="3-chairon 3+-chairon-backports"
;;
esac
_URL="${LB_MIRROR_CHROOT}/project/keys"
;;
*)
_KEYS=""
;;
esac
for _KEY in ${_KEYS}
do
Echo_message "Fetching archive-key ${_KEY}..."
wget ${WGET_OPTIONS} "${_URL}/archive-key-${_KEY}.asc" -O config/archives/${LB_MODE}.bootstrap.key
wget ${WGET_OPTIONS} "${_URL}/archive-key-${_KEY}.asc.sig" -O config/archives/${LB_MODE}.bootstrap.key.sig
if [ -e /usr/bin/gpgv ]
then
if [ -e /usr/share/keyrings/debian-keyring.gpg ] || [ -e /usr/share/keyrings/debian-maintainers.gpg ]
then
_KEY_VALID=""
for _KEYRING in /usr/share/keyrings/debian-keyring.gpg /usr/share/keyrings/debian-maintainers.gpg
do
if [ -e "${_KEYRING}" ]
then
Echo_message "Verifying archive-key ${_KEY} against $(basename ${_KEYRING} .gpg | sed -e 's|-keyring||') keyring..."
set +e
/usr/bin/gpgv --quiet --keyring ${_KEYRING} config/archives/${LB_MODE}.key.sig config/archives/${LB_MODE}.key > /dev/null 2>&1 && _KEY_VALID="true" && break
set -e
fi
done
case "${_KEY_VALID}" in
true)
Echo_message "Verifying ${_KEY} signature successful."
;;
*)
Echo_error "Verifying ${_KEY} signature failed."
return 1
;;
esac
else
Echo_warning "Skipping archive-key ${_KEY} verification, debian-keyring not available..."
fi
else
Echo_warning "Skipping archive-key ${_KEY} verification, gpgv not available..."
fi
done
# Creating stage file
Create_stagefile .build/config
......@@ -37,6 +37,7 @@
<td>
<select id="Distribution" name="distribution" size="1">
<option selected value="wheezy">wheezy</option>
<option value="jessie">jessie</option>
<option value="sid">sid</option>
</select>
</td>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment