Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH] verify-sig.eclass: Workaround GPG problems with long TMPDIR
Date: Tue, 08 Nov 2022 04:48:23
Message-Id: 20221108044813.107446-1-mgorny@gentoo.org
1 Force using TMPDIR=/tmp to workaround GPG failing when TMPDIR happens
2 to be long enough to cause UNIX socket paths to exceed the system limit.
3
4 Closes: https://bugs.gentoo.org/854492
5 Signed-off-by: Michał Górny <mgorny@g.o>
6 ---
7 eclass/verify-sig.eclass | 6 ++++++
8 1 file changed, 6 insertions(+)
9
10 diff --git a/eclass/verify-sig.eclass b/eclass/verify-sig.eclass
11 index 1d7c62d4dce2..394ce2e44427 100644
12 --- a/eclass/verify-sig.eclass
13 +++ b/eclass/verify-sig.eclass
14 @@ -141,6 +141,9 @@ verify-sig_verify_detached() {
15 einfo "Verifying ${filename} ..."
16 case ${VERIFY_SIG_METHOD} in
17 openpgp)
18 + # gpg can't handle very long TMPDIR
19 + # https://bugs.gentoo.org/854492
20 + local -x TMPDIR=/tmp
21 gemato gpg-wrap -K "${key}" "${extra_args[@]}" -- \
22 gpg --verify "${sig}" "${file}" ||
23 die "PGP signature verification failed"
24 @@ -190,6 +193,9 @@ verify-sig_verify_message() {
25 einfo "Verifying ${filename} ..."
26 case ${VERIFY_SIG_METHOD} in
27 openpgp)
28 + # gpg can't handle very long TMPDIR
29 + # https://bugs.gentoo.org/854492
30 + local -x TMPDIR=/tmp
31 gemato gpg-wrap -K "${key}" "${extra_args[@]}" -- \
32 gpg --verify --output="${output_file}" "${file}" ||
33 die "PGP signature verification failed"
34 --
35 2.38.1