Skip to content

Commit

Permalink
Merge pull request #32 from infosiftr/auto-mirror
Browse files Browse the repository at this point in the history
Use Apache's "closer.cgi?action=download" functionality for automatic mirror selection
  • Loading branch information
yosifkit authored Sep 23, 2016
2 parents 75fd77b + b13054c commit 89a75f8
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 9 deletions.
8 changes: 6 additions & 2 deletions 2.2/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ RUN apt-get update \

ENV HTTPD_VERSION 2.2.31
ENV HTTPD_SHA1 e3b55387112206307ba76526820a2627472f3787
ENV HTTPD_BZ2_URL https://www.apache.org/dist/httpd/httpd-$HTTPD_VERSION.tar.bz2

# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394
ENV HTTPD_BZ2_URL https://www.apache.org/dyn/closer.cgi?action=download&filename=httpd/httpd-$HTTPD_VERSION.tar.bz2
# not all the mirrors actually carry the .asc files :'(
ENV HTTPD_ASC_URL https://www.apache.org/dist/httpd/httpd-$HTTPD_VERSION.tar.bz2.asc

RUN set -x \
&& buildDeps=' \
Expand All @@ -43,7 +47,7 @@ RUN set -x \
&& wget -O httpd.tar.bz2 "$HTTPD_BZ2_URL" \
&& echo "$HTTPD_SHA1 *httpd.tar.bz2" | sha1sum -c - \
# see https://httpd.apache.org/download.cgi#verify
&& wget -O httpd.tar.bz2.asc "$HTTPD_BZ2_URL.asc" \
&& wget -O httpd.tar.bz2.asc "$HTTPD_ASC_URL" \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B1B96F45DFBDCCF974019235193F180AB55D9977 \
&& gpg --batch --verify httpd.tar.bz2.asc httpd.tar.bz2 \
Expand Down
9 changes: 6 additions & 3 deletions 2.2/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ WORKDIR $HTTPD_PREFIX

ENV HTTPD_VERSION 2.2.31
ENV HTTPD_SHA1 e3b55387112206307ba76526820a2627472f3787
ENV HTTPD_BZ2_URL https://www.apache.org/dist/httpd/httpd-$HTTPD_VERSION.tar.bz2

# see https://httpd.apache.org/docs/2.4/install.html#requirements
# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394
ENV HTTPD_BZ2_URL https://www.apache.org/dyn/closer.cgi?action=download&filename=httpd/httpd-$HTTPD_VERSION.tar.bz2
# not all the mirrors actually carry the .asc files :'(
ENV HTTPD_ASC_URL https://www.apache.org/dist/httpd/httpd-$HTTPD_VERSION.tar.bz2.asc

RUN set -x \
&& runDeps=' \
apr-dev \
Expand All @@ -41,7 +44,7 @@ RUN set -x \
&& wget -O httpd.tar.bz2 "$HTTPD_BZ2_URL" \
&& echo "$HTTPD_SHA1 *httpd.tar.bz2" | sha1sum -c - \
# see https://httpd.apache.org/download.cgi#verify
&& wget -O httpd.tar.bz2.asc "$HTTPD_BZ2_URL.asc" \
&& wget -O httpd.tar.bz2.asc "$HTTPD_ASC_URL" \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B1B96F45DFBDCCF974019235193F180AB55D9977 \
&& gpg --batch --verify httpd.tar.bz2.asc httpd.tar.bz2 \
Expand Down
9 changes: 7 additions & 2 deletions 2.4/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@ RUN apt-get update \

ENV HTTPD_VERSION 2.4.23
ENV HTTPD_SHA1 5101be34ac4a509b245adb70a56690a84fcc4e7f
ENV HTTPD_BZ2_URL https://www.apache.org/dist/httpd/httpd-$HTTPD_VERSION.tar.bz2

# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394
ENV HTTPD_BZ2_URL https://www.apache.org/dyn/closer.cgi?action=download&filename=httpd/httpd-$HTTPD_VERSION.tar.bz2
# not all the mirrors actually carry the .asc files :'(
ENV HTTPD_ASC_URL https://www.apache.org/dist/httpd/httpd-$HTTPD_VERSION.tar.bz2.asc

# see https://httpd.apache.org/docs/2.4/install.html#requirements
RUN set -x \
&& buildDeps=' \
bzip2 \
Expand All @@ -43,7 +48,7 @@ RUN set -x \
&& wget -O httpd.tar.bz2 "$HTTPD_BZ2_URL" \
&& echo "$HTTPD_SHA1 *httpd.tar.bz2" | sha1sum -c - \
# see https://httpd.apache.org/download.cgi#verify
&& wget -O httpd.tar.bz2.asc "$HTTPD_BZ2_URL.asc" \
&& wget -O httpd.tar.bz2.asc "$HTTPD_ASC_URL" \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \
&& gpg --batch --verify httpd.tar.bz2.asc httpd.tar.bz2 \
Expand Down
8 changes: 6 additions & 2 deletions 2.4/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ WORKDIR $HTTPD_PREFIX

ENV HTTPD_VERSION 2.4.23
ENV HTTPD_SHA1 5101be34ac4a509b245adb70a56690a84fcc4e7f
ENV HTTPD_BZ2_URL https://www.apache.org/dist/httpd/httpd-$HTTPD_VERSION.tar.bz2

# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394
ENV HTTPD_BZ2_URL https://www.apache.org/dyn/closer.cgi?action=download&filename=httpd/httpd-$HTTPD_VERSION.tar.bz2
# not all the mirrors actually carry the .asc files :'(
ENV HTTPD_ASC_URL https://www.apache.org/dist/httpd/httpd-$HTTPD_VERSION.tar.bz2.asc

# see https://httpd.apache.org/docs/2.4/install.html#requirements
RUN set -x \
Expand All @@ -41,7 +45,7 @@ RUN set -x \
&& wget -O httpd.tar.bz2 "$HTTPD_BZ2_URL" \
&& echo "$HTTPD_SHA1 *httpd.tar.bz2" | sha1sum -c - \
# see https://httpd.apache.org/download.cgi#verify
&& wget -O httpd.tar.bz2.asc "$HTTPD_BZ2_URL.asc" \
&& wget -O httpd.tar.bz2.asc "$HTTPD_ASC_URL" \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys A93D62ECC3C8EA12DB220EC934EA76E6791485A8 \
&& gpg --batch --verify httpd.tar.bz2.asc httpd.tar.bz2 \
Expand Down

0 comments on commit 89a75f8

Please sign in to comment.