Skip to content
Snippets Groups Projects
Commit f3fc4d57 authored by Clemens Buchacher's avatar Clemens Buchacher Committed by Konstantin Pavlov
Browse files

downgrade to gnupg1


The build sometimes fails to remove the `S.gpg-agent.extra` unix domain socket
when it deletes the temporary GNUPGHOME directory after running gpg commands.

    rm: can't remove '/tmp/tmp.hBDCKF/S.gpg-agent.extra': No such file or directory

The previous gpg --recv-keys command starts the gpg-agent. The gpg-agent
connects to the following sockets and does not terminate on its own.

    / # netstat -x -a -p
    Active UNIX domain sockets (servers and established)
    Proto RefCnt Flags       Type       State         I-Node PID/Program name    Path
    unix  2      [ ACC ]     STREAM     LISTENING     8627378 17/dirmngr          /root/.gnupg/S.dirmngr
    unix  2      [ ACC ]     STREAM     LISTENING     8625135 21/gpg-agent        /root/.gnupg/S.gpg-agent
    unix  2      [ ACC ]     STREAM     LISTENING     8625136 21/gpg-agent        /root/.gnupg/S.gpg-agent.extra
    unix  2      [ ACC ]     STREAM     LISTENING     8625137 21/gpg-agent        /root/.gnupg/S.gpg-agent.browser
    unix  2      [ ACC ]     STREAM     LISTENING     8625138 21/gpg-agent        /root/.gnupg/S.gpg-agent.ssh

If one of the sockets is removed, then the agent terminates and removes the
other sockets as well. This causes a race condition between `rm -rf $GNUPGHOME`
and gpg-agent. If gpg-agent manages to remove the sockets first, then `rm`
fails while trying to remove the same socket.

Move to gnupg1 in alpine just like we do for stretch. Gnupg version 1
does not launch a GPG agent. It is not possible to disable gpg-agent in
gnupg version 2.

(cherry picked from commit 684e1c634b56694633402c34e73b0cbc500b8d0e)
Signed-off-by: default avatarKonstantin Pavlov <thresh@videolan.org>
parent 3b108b59
Branches gh-pages
No related tags found
No related merge requests found
...@@ -62,7 +62,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ ...@@ -62,7 +62,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \
zlib-dev \ zlib-dev \
linux-headers \ linux-headers \
curl \ curl \
gnupg \ gnupg1 \
libxslt-dev \ libxslt-dev \
gd-dev \ gd-dev \
geoip-dev \ geoip-dev \
......
...@@ -61,7 +61,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ ...@@ -61,7 +61,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \
zlib-dev \ zlib-dev \
linux-headers \ linux-headers \
curl \ curl \
gnupg \ gnupg1 \
libxslt-dev \ libxslt-dev \
gd-dev \ gd-dev \
geoip-dev \ geoip-dev \
......
...@@ -62,7 +62,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ ...@@ -62,7 +62,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \
zlib-dev \ zlib-dev \
linux-headers \ linux-headers \
curl \ curl \
gnupg \ gnupg1 \
libxslt-dev \ libxslt-dev \
gd-dev \ gd-dev \
geoip-dev \ geoip-dev \
......
...@@ -61,7 +61,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \ ...@@ -61,7 +61,7 @@ RUN GPG_KEYS=B0F4253373F8F6F510D42178520A9993A1C052F8 \
zlib-dev \ zlib-dev \
linux-headers \ linux-headers \
curl \ curl \
gnupg \ gnupg1 \
libxslt-dev \ libxslt-dev \
gd-dev \ gd-dev \
geoip-dev \ geoip-dev \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment