Commit 660c0017 authored by Holger Levsen's avatar Holger Levsen
Browse files

reproducible Debian: always bootstrap schroots using mmdebstrap



Signed-off-by: Holger Levsen's avatarHolger Levsen <holger@layer-acht.org>
parent 37627a34
#!/bin/bash #!/bin/bash
# vim: set noexpandtab: # vim: set noexpandtab:
# Copyright © 2012-2020 Holger Levsen <holger@layer-acht.org> # Copyright © 2012-2022 Holger Levsen <holger@layer-acht.org>
# © 2013 Antonio Terceiro <terceiro@debian.org> # © 2013 Antonio Terceiro <terceiro@debian.org>
# © 2014 Joachim Breitner <nomeata@debian.org> # © 2014 Joachim Breitner <nomeata@debian.org>
# © 2015-2018 Mattia Rizzolo <mattia@debian.org> # © 2015-2018 Mattia Rizzolo <mattia@debian.org>
...@@ -134,28 +134,12 @@ bootstrap() { ...@@ -134,28 +134,12 @@ bootstrap() {
. /srv/jenkins/bin/jenkins_node_definitions.sh . /srv/jenkins/bin/jenkins_node_definitions.sh
get_node_information "$HOSTNAME" get_node_information "$HOSTNAME"
# choosing bootstrapping method
local DEBOOTSTRAP=() local DEBOOTSTRAP=()
if command -v mmdebstrap >/dev/null ; then DEBOOTSTRAP+=(mmdebstrap)
# not available on Ubuntu 16.04 LTS if "$NODE_RUN_IN_THE_FUTURE" ; then
DEBOOTSTRAP+=(mmdebstrap) # configure apt to ignore expired release files
if "$NODE_RUN_IN_THE_FUTURE" ; then echo "This node is reported to run in the future, configuring APT to ignore the Release file expiration..."
# configure apt to ignore expired release files DEBOOTSTRAP+=(--aptopt='Acquire::Check-Valid-Until "false"')
echo "This node is reported to run in the future, configuring APT to ignore the Release file expiration..."
DEBOOTSTRAP+=(--aptopt='Acquire::Check-Valid-Until "false"')
fi
else
DEBOOTSTRAP+=(debootstrap)
# configure dpkg to be faster (mmdebstrap expects an empty directory and is fast by design)
mkdir -p "$SCHROOT_TARGET/etc/dpkg/dpkg.cfg.d"
echo force-unsafe-io > "$SCHROOT_TARGET/etc/dpkg/dpkg.cfg.d/02dpkg-unsafe-io"
if "$NODE_RUN_IN_THE_FUTURE" ; then
# configure apt to ignore expired release files
echo "This node is reported to run in the future, configuring APT to ignore the Release file expiration..."
mkdir -p "$SCHROOT_TARGET/etc/apt/apt.conf.d/"
echo 'Acquire::Check-Valid-Until "false";' | sudo tee -a "$SCHROOT_TARGET"/etc/apt/apt.conf.d/398future >/dev/null
fi
fi fi
set -x set -x
sudo -- "${DEBOOTSTRAP[@]}" "$SUITE" "$SCHROOT_TARGET" "$MIRROR" | tee "$TMPLOG" sudo -- "${DEBOOTSTRAP[@]}" "$SUITE" "$SCHROOT_TARGET" "$MIRROR" | tee "$TMPLOG"
......
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