From 765ee9d24f25d790dbfb2294ff76b103beb730a6 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Thu, 12 Nov 2015 15:43:58 +0000 Subject: reproducible: set 'Acquire::Check-Valid-Until false' in the reproducible chroots --- bin/reproducible_setup_pbuilder.sh | 3 +++ bin/schroot-create.sh | 10 ++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/reproducible_setup_pbuilder.sh b/bin/reproducible_setup_pbuilder.sh index b4e93027..bbd7864b 100755 --- a/bin/reproducible_setup_pbuilder.sh +++ b/bin/reproducible_setup_pbuilder.sh @@ -67,6 +67,9 @@ dpkg -l echo for i in \$(dpkg -l |grep ^ii |awk -F' ' '{print \$2}'); do apt-cache madison "\$i" | head -1 | grep reproducible.alioth.debian.org || true ; done echo +echo "Configuring APT to ignore the Release file expiration" +echo 'Acquire::Check-Valid-Until "false"' > /etc/apt/apt.conf.d/400future +echo EOF } diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh index 6f7aa648..ca2a69ff 100755 --- a/bin/schroot-create.sh +++ b/bin/schroot-create.sh @@ -57,8 +57,10 @@ fi # # create script to add key for reproducible repo +# and configuring APT to ignore Release file expiration (since the host may +# have the date set far in the future) # -add_repokey() { +reproducible_setup() { cat > $1 <<- EOF echo "-----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1.4.12 (GNU/Linux) @@ -89,6 +91,10 @@ Mb0BawlXZui0MNUSnZtxHMxrjejdvZdqtskHl9srB1QThH0jasmUqbQPxCnxMbf1 4LhIp6XlXJFF1btgfCexNmcPuqeOMMDQ+du6Hqj2Yl5GYo2McWvjpSgkt5VmQfIz =X8YA -----END PGP PUBLIC KEY BLOCK-----" | apt-key add - +echo +echo "Configuring APT to ignore the Release file expiration" +echo 'Acquire::Check-Valid-Until "false"' > /etc/apt/apt.conf.d/400future +echo EOF } @@ -134,7 +140,7 @@ bootstrap() { if $REPRODUCIBLE ; then TMPFILE=$(mktemp -u) - add_repokey $SCHROOT_TARGET/$TMPFILE + reproducible_setup $SCHROOT_TARGET/$TMPFILE sudo chroot $SCHROOT_TARGET bash $TMPFILE rm $SCHROOT_TARGET/$TMPFILE fi -- cgit v1.2.3-54-g00ecf