From 1a1923c6c0984ffa74cd517496578dee119676b5 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Thu, 22 Jun 2023 17:55:05 -0400 Subject: [PATCH] Fix docker build by using our own mirror. snapshot.debian.org is super flaky and unreliable. At this point it's easier to host our own mirror snapshot. --- reproducible-builds/Dockerfile | 23 +++++++++----------- reproducible-builds/docker/dependencies.txt | 9 -------- reproducible-builds/docker/print-versions.sh | 7 ------ reproducible-builds/docker/sources.list | 5 +++-- 4 files changed, 13 insertions(+), 31 deletions(-) delete mode 100644 reproducible-builds/docker/dependencies.txt delete mode 100755 reproducible-builds/docker/print-versions.sh diff --git a/reproducible-builds/Dockerfile b/reproducible-builds/Dockerfile index d773c46e7e..92648a415b 100644 --- a/reproducible-builds/Dockerfile +++ b/reproducible-builds/Dockerfile @@ -1,21 +1,18 @@ -FROM debian:bullseye +FROM ubuntu:22.04 COPY docker/ docker/ COPY docker/apt.conf docker/sources.list /etc/apt/ -RUN apt-get update -y +# Bit of a chicken-and-egg problem. +# Ubuntu needs the ca-certificates package before it'll trust our mirror. +# But we can't install it because it doesn't trust our mirror! +# To resolve, we temporarily disable verification. +RUN apt update -oAcquire::https::Verify-Peer=false +RUN apt install -oAcquire::https::Verify-Peer=false -y ca-certificates -RUN apt-get install -y --allow-downgrades libc6=2.31-13+deb11u5 -RUN apt-get install -y --allow-downgrades libncurses5=6.2+20201114-2 -RUN apt-get install -y --allow-downgrades libstdc++6=10.2.1-6 -RUN apt-get install -y --allow-downgrades lib32z1=1:1.2.11.dfsg-2+deb11u2 -RUN apt-get install -y --allow-downgrades wget=1.21-1+deb11u1 -RUN apt-get install -y --allow-downgrades openjdk-11-jdk=11.0.18+10-1~deb11u1 -RUN apt-get install -y --allow-downgrades openjdk-17-jdk=17.0.6+10-1~deb11u1 -RUN apt-get install -y --allow-downgrades git=1:2.30.2-1+deb11u2 -RUN apt-get install -y --allow-downgrades unzip=6.0-26+deb11u1 - -RUN docker/print-versions.sh docker/dependencies.txt +# Back to normal, verification back on +RUN apt update +RUN apt install -y git openjdk-11-jdk openjdk-17-jdk unzip wget ENV ANDROID_COMMAND_LINE_TOOLS_FILENAME commandlinetools-linux-7583922_latest.zip ENV ANDROID_API_LEVELS android-33 diff --git a/reproducible-builds/docker/dependencies.txt b/reproducible-builds/docker/dependencies.txt deleted file mode 100644 index 7db13ac186..0000000000 --- a/reproducible-builds/docker/dependencies.txt +++ /dev/null @@ -1,9 +0,0 @@ -libc6=2.31-13+deb11u5 -libncurses5=6.2+20201114-2 -libstdc++6=10.2.1-6 -lib32z1=1:1.2.11.dfsg-2+deb11u2 -wget=1.21-1+deb11u1 -openjdk-11-jdk=11.0.18+10-1~deb11u1 -openjdk-17-jdk=17.0.6+10-1~deb11u1 -git=1:2.30.2-1+deb11u2 -unzip=6.0-26+deb11u1 diff --git a/reproducible-builds/docker/print-versions.sh b/reproducible-builds/docker/print-versions.sh deleted file mode 100755 index 954a69e995..0000000000 --- a/reproducible-builds/docker/print-versions.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -while read dep; do - dep_name=$(echo $dep | cut -f1 -d '=') - version=$(dpkg -s $dep_name | grep 'Version: ' | cut -f2 -d ' ') - echo "$dep_name=$version" -done < $1 diff --git a/reproducible-builds/docker/sources.list b/reproducible-builds/docker/sources.list index c94491f8e1..13c9ed69f0 100644 --- a/reproducible-builds/docker/sources.list +++ b/reproducible-builds/docker/sources.list @@ -1,2 +1,3 @@ -deb http://snapshot.debian.org/archive/debian-security/20230414T163652Z/ bullseye-security/updates main -deb http://snapshot.debian.org/archive/debian/20230415T205358Z/ bullseye main +deb http://mirror.signalusers.org/ubuntu/1687461439/ jammy main universe +deb http://mirror.signalusers.org/ubuntu/1687461439/ jammy-security main universe +deb http://mirror.signalusers.org/ubuntu/1687461439/ jammy-updates main universe \ No newline at end of file