Adjust gpg code to kill daemons, cutting down on race conditions

This commit is contained in:
J0WI 2018-06-05 00:39:32 +02:00
parent a194c2cfad
commit 8f97d7ff0d
2 changed files with 6 additions and 6 deletions

View File

@ -66,12 +66,12 @@ RUN set -ex; \
export GNUPGHOME="$(mktemp -d)"; \ export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys F3E4C04BB3DB5D4215C45F7F5AB2BAA141C4F7D5; \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys F3E4C04BB3DB5D4215C45F7F5AB2BAA141C4F7D5; \
gpg --batch --verify roundcubemail.tar.gz.asc roundcubemail.tar.gz; \ gpg --batch --verify roundcubemail.tar.gz.asc roundcubemail.tar.gz; \
rm -r "$GNUPGHOME" roundcubemail.tar.gz.asc; \
tar -xzf roundcubemail.tar.gz -C /usr/src/; \ tar -xzf roundcubemail.tar.gz -C /usr/src/; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" roundcubemail.tar.gz.asc roundcubemail.tar.gz; \
# upstream tarballs include ./roundcubemail-${ROUNDCUBEMAIL_VERSION}/ so this gives us /usr/src/roundcubemail-${ROUNDCUBEMAIL_VERSION} # upstream tarballs include ./roundcubemail-${ROUNDCUBEMAIL_VERSION}/ so this gives us /usr/src/roundcubemail-${ROUNDCUBEMAIL_VERSION}
mv /usr/src/roundcubemail-${ROUNDCUBEMAIL_VERSION} /usr/src/roundcubemail; \ mv /usr/src/roundcubemail-${ROUNDCUBEMAIL_VERSION} /usr/src/roundcubemail; \
rm -rf /usr/src/roundcubemail/installer; \ rm -rf /usr/src/roundcubemail/installer
rm roundcubemail.tar.gz
# include the wait-for-it.sh script # include the wait-for-it.sh script
RUN curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > /wait-for-it.sh && chmod +x /wait-for-it.sh RUN curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > /wait-for-it.sh && chmod +x /wait-for-it.sh

View File

@ -63,12 +63,12 @@ RUN set -ex; \
export GNUPGHOME="$(mktemp -d)"; \ export GNUPGHOME="$(mktemp -d)"; \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys F3E4C04BB3DB5D4215C45F7F5AB2BAA141C4F7D5; \ gpg --keyserver ha.pool.sks-keyservers.net --recv-keys F3E4C04BB3DB5D4215C45F7F5AB2BAA141C4F7D5; \
gpg --batch --verify roundcubemail.tar.gz.asc roundcubemail.tar.gz; \ gpg --batch --verify roundcubemail.tar.gz.asc roundcubemail.tar.gz; \
rm -r "$GNUPGHOME" roundcubemail.tar.gz.asc; \
tar -xzf roundcubemail.tar.gz -C /usr/src/; \ tar -xzf roundcubemail.tar.gz -C /usr/src/; \
gpgconf --kill all; \
rm -r "$GNUPGHOME" roundcubemail.tar.gz.asc roundcubemail.tar.gz; \
# upstream tarballs include ./roundcubemail-${ROUNDCUBEMAIL_VERSION}/ so this gives us /usr/src/roundcubemail-${ROUNDCUBEMAIL_VERSION} # upstream tarballs include ./roundcubemail-${ROUNDCUBEMAIL_VERSION}/ so this gives us /usr/src/roundcubemail-${ROUNDCUBEMAIL_VERSION}
mv /usr/src/roundcubemail-${ROUNDCUBEMAIL_VERSION} /usr/src/roundcubemail; \ mv /usr/src/roundcubemail-${ROUNDCUBEMAIL_VERSION} /usr/src/roundcubemail; \
rm -rf /usr/src/roundcubemail/installer; \ rm -rf /usr/src/roundcubemail/installer
rm roundcubemail.tar.gz
# include the wait-for-it.sh script # include the wait-for-it.sh script
RUN curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > /wait-for-it.sh && chmod +x /wait-for-it.sh RUN curl https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > /wait-for-it.sh && chmod +x /wait-for-it.sh