Skip to content

Commit

Permalink
Use temporary directory for gpg keys
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGoderre committed Oct 27, 2023
1 parent af458ec commit 9fbc827
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 60 deletions.
17 changes: 7 additions & 10 deletions 10/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 7 additions & 10 deletions 11/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 7 additions & 10 deletions 12/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 7 additions & 10 deletions 13/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 7 additions & 10 deletions 9/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 7 additions & 10 deletions Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ ENV GPG_KEYS \
# 4096R/09B5FA62 2020-05-28 Jakub Jelinek <[email protected]>
D3A93CAD751C2AF4F8C7AD516C35B99309B5FA62

RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
gnupg \
; \
rm -rf /var/lib/apt/lists/*; \
for key in $GPG_KEYS; do \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \
done

# https://gcc.gnu.org/mirrors.html
ENV GCC_MIRRORS \
https://ftpmirror.gnu.org/gcc \
Expand All @@ -48,6 +38,7 @@ RUN set -ex; \
apt-get install -y --no-install-recommends \
dpkg-dev \
flex \
gnupg \
; \
rm -r /var/lib/apt/lists/*; \
\
Expand All @@ -65,7 +56,13 @@ RUN set -ex; \
\
_fetch "gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.{{ .compression }}.sig" 'gcc.tar.{{ .compression }}.sig'; \
_fetch "gcc-$GCC_VERSION/gcc-$GCC_VERSION.tar.{{ .compression }}" 'gcc.tar.{{ .compression }}'; \
export GNUPGHOME="$(mktemp -d)"; \
for key in $GPG_KEYS; do \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; \
done; \
gpg --batch --verify gcc.tar.{{ .compression }}.sig gcc.tar.{{ .compression }}; \
gpgconf --kill all; \
rm -rf "$GNUPGHOME"; \
mkdir -p /usr/src/gcc; \
tar -xf gcc.tar.{{ .compression }} -C /usr/src/gcc --strip-components=1; \
rm gcc.tar.{{ .compression }}*; \
Expand Down

0 comments on commit 9fbc827

Please sign in to comment.