summaryrefslogtreecommitdiff
path: root/scripts/build
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/build')
-rwxr-xr-xscripts/build/bootstrap_archive-keys7
-rwxr-xr-xscripts/build/chroot_apt10
-rwxr-xr-xscripts/build/config12
-rwxr-xr-xscripts/build/installer_debian-installer5
4 files changed, 32 insertions, 2 deletions
diff --git a/scripts/build/bootstrap_archive-keys b/scripts/build/bootstrap_archive-keys
index 4b9324f51..2bec20db5 100755
--- a/scripts/build/bootstrap_archive-keys
+++ b/scripts/build/bootstrap_archive-keys
@@ -71,7 +71,12 @@ do
rm -f chroot/key.asc chroot/key.asc.sig
done
-Chroot chroot "apt-get update"
+if [ -n "${LB_SNAPSHOT}" ]
+then
+ Chroot chroot "apt-get update -o Acquire::Check-Valid-Until=false"
+else
+ Chroot chroot "apt-get update"
+fi
# Creating stage file
Create_stagefile .build/bootstrap_archive-keys
diff --git a/scripts/build/chroot_apt b/scripts/build/chroot_apt
index 09ece390b..89e2cdae6 100755
--- a/scripts/build/chroot_apt
+++ b/scripts/build/chroot_apt
@@ -54,6 +54,13 @@ case "${1}" in
echo "Acquire::http::Proxy \"${LB_APT_HTTP_PROXY}\";" > chroot/etc/apt/apt.conf.d/00http-proxy
fi
+ # Configuring snapshot.debian.org
+ if [ -n "${LB_SNAPSHOT}" ]
+ then
+ echo '// see bug #595801' > chroot/etc/apt/apt.conf.d/00debian-snapshot
+ echo 'Acquire::Check-Valid-Until "false";' >> chroot/etc/apt/apt.conf.d/00debian-snapshot
+ fi
+
# Configuring apt pipeline
if [ -n "${LB_APT_PIPELINE}" ]
then
@@ -227,6 +234,9 @@ EOF
# Deconfiguring aptitude http proxy
rm -f chroot/etc/apt/apt.conf.d/00http-proxy
+ # Deconfiguring snapshot.debian.org
+ rm -f chroot/etc/apt/apt.conf.d/00debian-snapshot
+
# Deconfiguring aptitude pipeline
rm -f chroot/etc/apt/apt.conf.d/00pipeline
diff --git a/scripts/build/config b/scripts/build/config
index e3b1e5170..ac8af909b 100755
--- a/scripts/build/config
+++ b/scripts/build/config
@@ -52,6 +52,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--debian-installer-distribution daily|CODENAME]\n\
\t [--debian-installer-preseedfile FILE|URL]\n\
\t [--debian-installer-gui true|false]\n\
+\t [--snapshot yyyymmdd|yyyymmddThhmmssZ\n\
\t [--debug]\n\
\t [-d|--distribution CODENAME]\n\
\t [--parent-distribution CODENAME]\n\
@@ -147,7 +148,7 @@ Local_arguments ()
net-cow-server:,net-tarball:,firmware-binary:,firmware-chroot:,swap-file-path:,swap-file-size:,
loadlin:,win32-loader:,source:,source-images:,breakpoints,conffile:,debug,force,
help,ignore-system-defaults,quiet,usage,verbose,version,bootstrap-qemu-static:,bootstrap-qemu-arch:,
- bootstrap-qemu-exclude:"
+ bootstrap-qemu-exclude:,snapshot:"
# Remove spaces added by indentation
LONG_OPTIONS="$(echo ${LONG_OPTIONS} | tr -d ' ')"
ARGUMENTS="$(getopt --longoptions ${LONG_OPTIONS} --name="${PROGRAM}" --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")"
@@ -300,6 +301,11 @@ Local_arguments ()
shift 2
;;
+ --snapshot)
+ LB_SNAPSHOT="${2}"
+ shift 2
+ ;;
+
--initramfs)
LB_INITRAMFS="${2}"
shift 2
@@ -949,6 +955,10 @@ LB_DEBCONF_FRONTEND="${LB_DEBCONF_FRONTEND}"
# (Default: ${LB_DEBCONF_PRIORITY})
LB_DEBCONF_PRIORITY="${LB_DEBCONF_PRIORITY}"
+# \$LB_SNAPSHOT: set snapshot.debian.org date to use
+# (Default: empty or not set to not use archive snapshot, or a valid date in snapshot.debian.org URL format)
+LB_SNAPSHOT="${LB_SNAPSHOT}"
+
# \$LB_INITRAMFS: set initramfs hook
# (Default: ${LB_INITRAMFS})
LB_INITRAMFS="${LB_INITRAMFS}"
diff --git a/scripts/build/installer_debian-installer b/scripts/build/installer_debian-installer
index 6415ffffd..63b90914e 100755
--- a/scripts/build/installer_debian-installer
+++ b/scripts/build/installer_debian-installer
@@ -256,6 +256,11 @@ case "${LB_DERIVATIVE}" in
# Debian Installer daily builds
URL="http://d-i.debian.org/daily-images/${LIVE_IMAGE_ARCHITECTURE}/daily/"
+ # use snapshot installer too
+ if [ -n "${LB_SNAPSHOT}" ]
+ then
+ URL="http://d-i.debian.org/daily-images/${LIVE_IMAGE_ARCHITECTURE}/$(Available_daily_installer)/"
+ fi
else
URL="${LB_MIRROR_DEBIAN_INSTALLER}/dists/${LB_DEBIAN_INSTALLER_DISTRIBUTION}/main/installer-${LIVE_IMAGE_ARCHITECTURE}/current/images/"
fi