Bug 1433033 - Set Acquire::Check-Valid-Until in apt config file rather than pass it on the command line. r?dustin draft
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 25 Jan 2018 15:24:05 +0900
changeset 747485 e05fd8f04dd53ce5d713d0b8836e04327b10d47e
parent 747484 2eaffe6795e27fd455c9b5739748bf35bf9e6da0
child 747486 5e5c2745ea4353ccfd4cc58c5d998655fa563cdd
push id96908
push userbmo:mh+mozilla@glandium.org
push dateFri, 26 Jan 2018 02:31:20 +0000
reviewersdustin
bugs1433033
milestone60.0a1
Bug 1433033 - Set Acquire::Check-Valid-Until in apt config file rather than pass it on the command line. r?dustin Also set it in the android-build image, which is Debian-snapshot-based too.
taskcluster/docker/android-build/Dockerfile
taskcluster/docker/debian7-build/Dockerfile
taskcluster/docker/toolchain-build/Dockerfile
--- a/taskcluster/docker/android-build/Dockerfile
+++ b/taskcluster/docker/android-build/Dockerfile
@@ -27,16 +27,18 @@ ENV HOME=/builds/worker \
     DEBIAN_FRONTEND=noninteractive
 
 # Set a default command useful for debugging.
 CMD ["/bin/bash", "--login"]
 
 # Set apt sources list to a snapshot.
 COPY sources.list /etc/apt/
 
+RUN echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99check-valid-until
+
 # rsync is required for l10n single locale repacks.  less, screen, and
 # vim, help debugging interactive tasks in Task Cluster.
 # git and openssh-client are used to upload GeckoView javadoc to Github.
 RUN apt-get update -q && \
     apt-get install -yyq --no-install-recommends \
       autoconf2.13 \
       build-essential \
       base-files \
--- a/taskcluster/docker/debian7-build/Dockerfile
+++ b/taskcluster/docker/debian7-build/Dockerfile
@@ -26,35 +26,36 @@ ENV HOME=/builds/worker \
     DEBIAN_FRONTEND=noninteractive
 
 # Set a default command useful for debugging
 CMD ["/bin/bash", "--login"]
 
 # Set apt sources list to a snapshot.
 RUN for s in debian_wheezy debian_wheezy-updates debian_wheezy-backports debian-security_wheezy/updates; do \
       echo "deb http://snapshot.debian.org/archive/${s%_*}/20171210T214726Z/ ${s#*_} main"; \
-    done > /etc/apt/sources.list
+    done > /etc/apt/sources.list && \
+    echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99check-valid-until
 
-RUN apt-get -o Acquire::Check-Valid-Until=false update -q && \
+RUN apt-get update -q && \
     apt-get install -yyq --no-install-recommends \
       apt-transport-https \
       ca-certificates
 
 # %ARG DOCKER_IMAGE_PACKAGES
 RUN for task in $DOCKER_IMAGE_PACKAGES; do \
       echo "deb [trusted=yes] https://queue.taskcluster.net/v1/task/$task/runs/0/artifacts/public/build/ debian/" >> /etc/apt/sources.list; \
     done
 
 # %ARG ARCH
 RUN dpkg --add-architecture $ARCH
 
 # Ideally, we wouldn't need gcc-multilib and the extra linux-libc-dev,
 # but the latter is required to make the former installable, and the former
 # because of bug 1409276.
-RUN apt-get -o Acquire::Check-Valid-Until=false update -q && \
+RUN apt-get update -q && \
     apt-get install -yyq --no-install-recommends \
       autoconf2.13 \
       automake \
       bzip2 \
       curl \
       file \
       gawk \
       gcc-multilib \
--- a/taskcluster/docker/toolchain-build/Dockerfile
+++ b/taskcluster/docker/toolchain-build/Dockerfile
@@ -26,29 +26,30 @@ ENV HOME=/builds/worker \
     DEBIAN_FRONTEND=noninteractive
 
 # Set a default command useful for debugging
 CMD ["/bin/bash", "--login"]
 
 # Set apt sources list to a snapshot.
 RUN for s in debian_wheezy debian_wheezy-updates debian-security_wheezy/updates; do \
       echo "deb http://snapshot.debian.org/archive/${s%_*}/20171210T214726Z/ ${s#*_} main"; \
-    done > /etc/apt/sources.list
+    done > /etc/apt/sources.list && \
+    echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99check-valid-until
 
-RUN apt-get -o Acquire::Check-Valid-Until=false update -q && \
+RUN apt-get update -q && \
     apt-get install -yyq --no-install-recommends \
       apt-transport-https \
       ca-certificates
 
 # %ARG DOCKER_IMAGE_PACKAGES
 RUN for task in $DOCKER_IMAGE_PACKAGES; do \
       echo "deb [trusted=yes] https://queue.taskcluster.net/v1/task/$task/runs/0/artifacts/public/build/ debian/" >> /etc/apt/sources.list; \
     done
 
-RUN apt-get -o Acquire::Check-Valid-Until=false update -q && \
+RUN apt-get update -q && \
     apt-get install -yyq --no-install-recommends \
       autoconf \
       automake \
       bison \
       build-essential \
       curl \
       cmake \
       flex \