From 93dd2037ba9de1e80e8c17b65649485d7b7112f5 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 29 Feb 2016 09:15:45 -0800 Subject: [PATCH] Fix "gpg" usage to stop relying on deprecated and insecure behavior --- 2.7/Dockerfile | 11 ++++++----- 2.7/alpine/Dockerfile | 11 ++++++----- 2.7/slim/Dockerfile | 11 ++++++----- 2.7/wheezy/Dockerfile | 11 +++++++---- 3.3/Dockerfile | 9 +++++---- 3.3/alpine/Dockerfile | 9 +++++---- 3.3/slim/Dockerfile | 9 +++++---- 3.3/wheezy/Dockerfile | 9 +++++---- 3.4/Dockerfile | 9 +++++---- 3.4/alpine/Dockerfile | 9 +++++---- 3.4/slim/Dockerfile | 9 +++++---- 3.4/wheezy/Dockerfile | 9 +++++---- 3.5/Dockerfile | 9 +++++---- 3.5/alpine/Dockerfile | 9 +++++---- 3.5/slim/Dockerfile | 9 +++++---- 15 files changed, 80 insertions(+), 63 deletions(-) diff --git a/2.7/Dockerfile b/2.7/Dockerfile index 9e08c4c76..f9eaeda7f 100644 --- a/2.7/Dockerfile +++ b/2.7/Dockerfile @@ -16,14 +16,15 @@ ENV PYTHON_VERSION 2.7.11 ENV PYTHON_PIP_VERSION 8.0.3 RUN set -ex \ + && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ + && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ - && curl -fSL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ - && gpg --verify python.tar.xz.asc \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ - && rm python.tar.xz* \ - && rm -r ~/.gnupg \ + && rm python.tar.xz \ \ && cd /usr/src/python \ && ./configure --enable-shared --enable-unicode=ucs4 \ diff --git a/2.7/alpine/Dockerfile b/2.7/alpine/Dockerfile index 2580cf014..f75a564b9 100644 --- a/2.7/alpine/Dockerfile +++ b/2.7/alpine/Dockerfile @@ -14,15 +14,16 @@ ENV PYTHON_PIP_VERSION 8.0.3 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps curl gnupg \ + && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ + && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ - && curl -fSL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ - && gpg --verify python.tar.xz.asc \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src \ && tar -xJC /usr/src -f python.tar.xz \ && mv "/usr/src/Python-$PYTHON_VERSION" /usr/src/python \ - && rm python.tar.xz* \ - && rm -r ~/.gnupg \ + && rm python.tar.xz \ \ && apk add --no-cache --virtual .build-deps \ bzip2-dev \ diff --git a/2.7/slim/Dockerfile b/2.7/slim/Dockerfile index 05e139a62..65063e221 100644 --- a/2.7/slim/Dockerfile +++ b/2.7/slim/Dockerfile @@ -36,14 +36,15 @@ RUN set -ex \ zlib1g-dev \ ' \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ + && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ + && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ - && curl -fSL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ - && gpg --verify python.tar.xz.asc \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ - && rm python.tar.xz* \ - && rm -r ~/.gnupg \ + && rm python.tar.xz \ \ && cd /usr/src/python \ && ./configure --enable-shared --enable-unicode=ucs4 \ diff --git a/2.7/wheezy/Dockerfile b/2.7/wheezy/Dockerfile index eb8557033..7d81c173a 100644 --- a/2.7/wheezy/Dockerfile +++ b/2.7/wheezy/Dockerfile @@ -16,13 +16,16 @@ ENV PYTHON_VERSION 2.7.11 ENV PYTHON_PIP_VERSION 8.0.3 RUN set -ex \ + && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ + && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ - && curl -fSL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ - && curl -fSL "https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ - && gpg --verify python.tar.xz.asc \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ - && rm python.tar.xz* \ + && rm python.tar.xz \ + \ && cd /usr/src/python \ && ./configure --enable-shared --enable-unicode=ucs4 \ && make -j$(nproc) \ diff --git a/3.3/Dockerfile b/3.3/Dockerfile index 7ff0dab67..fa624da4a 100644 --- a/3.3/Dockerfile +++ b/3.3/Dockerfile @@ -16,14 +16,15 @@ ENV PYTHON_VERSION 3.3.6 ENV PYTHON_PIP_VERSION 8.0.3 RUN set -ex \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ - && gpg --verify python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ - && rm python.tar.xz* \ - && rm -r ~/.gnupg \ + && rm python.tar.xz \ \ && cd /usr/src/python \ && ./configure --enable-shared --enable-unicode=ucs4 \ diff --git a/3.3/alpine/Dockerfile b/3.3/alpine/Dockerfile index 6acc52a14..06b33bd21 100644 --- a/3.3/alpine/Dockerfile +++ b/3.3/alpine/Dockerfile @@ -14,15 +14,16 @@ ENV PYTHON_PIP_VERSION 8.0.3 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps curl gnupg \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ - && gpg --verify python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src \ && tar -xJC /usr/src -f python.tar.xz \ && mv "/usr/src/Python-$PYTHON_VERSION" /usr/src/python \ - && rm python.tar.xz* \ - && rm -r ~/.gnupg \ + && rm python.tar.xz \ \ && apk add --no-cache --virtual .build-deps \ bzip2-dev \ diff --git a/3.3/slim/Dockerfile b/3.3/slim/Dockerfile index 87724bcb0..6180f78e1 100644 --- a/3.3/slim/Dockerfile +++ b/3.3/slim/Dockerfile @@ -36,14 +36,15 @@ RUN set -ex \ zlib1g-dev \ ' \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ - && gpg --verify python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ - && rm python.tar.xz* \ - && rm -r ~/.gnupg \ + && rm python.tar.xz \ \ && cd /usr/src/python \ && ./configure --enable-shared --enable-unicode=ucs4 \ diff --git a/3.3/wheezy/Dockerfile b/3.3/wheezy/Dockerfile index 969c519bd..37a67a443 100644 --- a/3.3/wheezy/Dockerfile +++ b/3.3/wheezy/Dockerfile @@ -16,14 +16,15 @@ ENV PYTHON_VERSION 3.3.6 ENV PYTHON_PIP_VERSION 8.0.3 RUN set -ex \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ - && gpg --verify python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ - && rm python.tar.xz* \ - && rm -r ~/.gnupg \ + && rm python.tar.xz \ \ && cd /usr/src/python \ && ./configure --enable-shared --enable-unicode=ucs4 \ diff --git a/3.4/Dockerfile b/3.4/Dockerfile index e917c1da3..72c271f49 100644 --- a/3.4/Dockerfile +++ b/3.4/Dockerfile @@ -16,14 +16,15 @@ ENV PYTHON_VERSION 3.4.4 ENV PYTHON_PIP_VERSION 8.0.3 RUN set -ex \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ - && gpg --verify python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ - && rm python.tar.xz* \ - && rm -r ~/.gnupg \ + && rm python.tar.xz \ \ && cd /usr/src/python \ && ./configure --enable-shared --enable-unicode=ucs4 \ diff --git a/3.4/alpine/Dockerfile b/3.4/alpine/Dockerfile index eb714c00c..5d99d4261 100644 --- a/3.4/alpine/Dockerfile +++ b/3.4/alpine/Dockerfile @@ -14,15 +14,16 @@ ENV PYTHON_PIP_VERSION 8.0.3 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps curl gnupg \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ - && gpg --verify python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src \ && tar -xJC /usr/src -f python.tar.xz \ && mv "/usr/src/Python-$PYTHON_VERSION" /usr/src/python \ - && rm python.tar.xz* \ - && rm -r ~/.gnupg \ + && rm python.tar.xz \ && apk del .fetch-deps \ \ && apk add --no-cache --virtual .build-deps \ diff --git a/3.4/slim/Dockerfile b/3.4/slim/Dockerfile index 5740b1e48..50ecd2a96 100644 --- a/3.4/slim/Dockerfile +++ b/3.4/slim/Dockerfile @@ -36,14 +36,15 @@ RUN set -ex \ zlib1g-dev \ ' \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ - && gpg --verify python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ - && rm python.tar.xz* \ - && rm -r ~/.gnupg \ + && rm python.tar.xz \ \ && cd /usr/src/python \ && ./configure --enable-shared --enable-unicode=ucs4 \ diff --git a/3.4/wheezy/Dockerfile b/3.4/wheezy/Dockerfile index 4b4865345..e77854275 100644 --- a/3.4/wheezy/Dockerfile +++ b/3.4/wheezy/Dockerfile @@ -16,14 +16,15 @@ ENV PYTHON_VERSION 3.4.4 ENV PYTHON_PIP_VERSION 8.0.3 RUN set -ex \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ - && gpg --verify python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ - && rm python.tar.xz* \ - && rm -r ~/.gnupg \ + && rm python.tar.xz \ \ && cd /usr/src/python \ && ./configure --enable-shared --enable-unicode=ucs4 \ diff --git a/3.5/Dockerfile b/3.5/Dockerfile index 9b6b56086..61f44fc42 100644 --- a/3.5/Dockerfile +++ b/3.5/Dockerfile @@ -16,14 +16,15 @@ ENV PYTHON_VERSION 3.5.1 ENV PYTHON_PIP_VERSION 8.0.3 RUN set -ex \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ - && gpg --verify python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ - && rm python.tar.xz* \ - && rm -r ~/.gnupg \ + && rm python.tar.xz \ \ && cd /usr/src/python \ && ./configure --enable-shared --enable-unicode=ucs4 \ diff --git a/3.5/alpine/Dockerfile b/3.5/alpine/Dockerfile index d33a9d8f1..d4863b93d 100644 --- a/3.5/alpine/Dockerfile +++ b/3.5/alpine/Dockerfile @@ -14,15 +14,16 @@ ENV PYTHON_PIP_VERSION 8.0.3 RUN set -ex \ && apk add --no-cache --virtual .fetch-deps curl gnupg \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ - && gpg --verify python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src \ && tar -xJC /usr/src -f python.tar.xz \ && mv "/usr/src/Python-$PYTHON_VERSION" /usr/src/python \ - && rm python.tar.xz* \ - && rm -r ~/.gnupg \ + && rm python.tar.xz \ && apk del .fetch-deps \ \ && apk add --no-cache --virtual .build-deps \ diff --git a/3.5/slim/Dockerfile b/3.5/slim/Dockerfile index b402e11fd..d69ce18ad 100644 --- a/3.5/slim/Dockerfile +++ b/3.5/slim/Dockerfile @@ -36,14 +36,15 @@ RUN set -ex \ zlib1g-dev \ ' \ && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \ - && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz" -o python.tar.xz \ && curl -fSL "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc" -o python.tar.xz.asc \ - && gpg --verify python.tar.xz.asc \ + && export GNUPGHOME="$(mktemp -d)" \ + && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$GPG_KEY" \ + && gpg --batch --verify python.tar.xz.asc python.tar.xz \ + && rm -r "$GNUPGHOME" python.tar.xz.asc \ && mkdir -p /usr/src/python \ && tar -xJC /usr/src/python --strip-components=1 -f python.tar.xz \ - && rm python.tar.xz* \ - && rm -r ~/.gnupg \ + && rm python.tar.xz \ \ && cd /usr/src/python \ && ./configure --enable-shared --enable-unicode=ucs4 \