From c7fd13a4602d30e5a1392f223b69fdfc59874440 Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Thu, 2 Mar 2023 14:33:54 +0100 Subject: [PATCH] repro: Add `protoc` dependency to repro-build --- contrib/reprobuild/Dockerfile.bionic | 9 +++++++++ contrib/reprobuild/Dockerfile.focal | 9 +++++++++ contrib/reprobuild/Dockerfile.jammy | 9 +++++++++ 3 files changed, 27 insertions(+) diff --git a/contrib/reprobuild/Dockerfile.bionic b/contrib/reprobuild/Dockerfile.bionic index 782631de3..0395a8140 100644 --- a/contrib/reprobuild/Dockerfile.bionic +++ b/contrib/reprobuild/Dockerfile.bionic @@ -4,6 +4,7 @@ ENV TZ=UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ENV RUST_PROFILE=release ENV PATH=/root/.cargo/bin:/root/.pyenv/shims:/root/.pyenv/bin:$PATH +ENV PROTOC_VERSION=22.0 RUN sed -i '/updates/d' /etc/apt/sources.list && \ sed -i '/security/d' /etc/apt/sources.list @@ -47,6 +48,14 @@ RUN wget https://sh.rustup.rs -O rustup-install.sh && \ rm rustup-install.sh && \ /root/.cargo/bin/rustup install 1.62 +# Download protoc manually, it is in the update repos which we +# disabled above, so `apt-get` can't find it anymore. +RUN cd /tmp/ && \ + wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \ + unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip && \ + mv bin/protoc /usr/local/bin && \ + rm -rf include bin protoc-${PROTOC_VERSION}-linux-x86_64.zip + RUN mkdir /build WORKDIR /build diff --git a/contrib/reprobuild/Dockerfile.focal b/contrib/reprobuild/Dockerfile.focal index b0a20f10d..c6a25b970 100644 --- a/contrib/reprobuild/Dockerfile.focal +++ b/contrib/reprobuild/Dockerfile.focal @@ -4,6 +4,7 @@ ENV TZ=UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ENV RUST_PROFILE=release ENV PATH=/root/.cargo/bin:$PATH +ENV PROTOC_VERSION=22.0 RUN sed -i '/updates/d' /etc/apt/sources.list && \ sed -i '/security/d' /etc/apt/sources.list @@ -36,6 +37,14 @@ RUN wget https://sh.rustup.rs -O rustup-install.sh && \ rm rustup-install.sh && \ /root/.cargo/bin/rustup install 1.62 +# Download protoc manually, it is in the update repos which we +# disabled above, so `apt-get` can't find it anymore. +RUN cd /tmp/ && \ + wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \ + unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip && \ + mv bin/protoc /usr/local/bin && \ + rm -rf include bin protoc-${PROTOC_VERSION}-linux-x86_64.zip + RUN mkdir /build WORKDIR /build diff --git a/contrib/reprobuild/Dockerfile.jammy b/contrib/reprobuild/Dockerfile.jammy index f76d2ea64..f2c5c7e93 100644 --- a/contrib/reprobuild/Dockerfile.jammy +++ b/contrib/reprobuild/Dockerfile.jammy @@ -4,6 +4,7 @@ ENV TZ=UTC RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ENV RUST_PROFILE=release ENV PATH=/root/.cargo/bin:$PATH +ENV PROTOC_VERSION=22.0 RUN sed -i '/updates/d' /etc/apt/sources.list && \ sed -i '/security/d' /etc/apt/sources.list @@ -37,6 +38,14 @@ RUN wget https://sh.rustup.rs -O rustup-install.sh && \ rm rustup-install.sh && \ /root/.cargo/bin/rustup install 1.62 +# Download protoc manually, it is in the update repos which we +# disabled above, so `apt-get` can't find it anymore. +RUN cd /tmp/ && \ + wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \ + unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip && \ + mv bin/protoc /usr/local/bin && \ + rm -rf include bin protoc-${PROTOC_VERSION}-linux-x86_64.zip + RUN mkdir /build WORKDIR /build