Summary: | sys-libs/compiler-rt-sanitizers-14.0.6[verify-sig]: gpg: can't connect to the agent: IPC connect call failed | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Sam James <sam> |
Component: | Current packages | Assignee: | LLVM support project <llvm> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | mgorny |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://github.com/gentoo/gentoo/pull/28180 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | build.log |
Description
Sam James
2022-06-26 22:09:47 UTC
Created attachment 787841 [details]
build.log
What's weird is that other verify-sig packages (outside of LLVM, I guess) are fine: ``` >>> Emerging (1 of 1) sys-apps/sed-4.8::gentoo * sed-4.8.tar.xz BLAKE2B SHA512 size ;-) ... [ ok ] * sed-4.8.tar.xz.sig BLAKE2B SHA512 size ;-) ... [ ok ] >>> Unpacking source... * Verifying sed-4.8.tar.xz ... gpg: Signature made Wed Jan 15 04:12:10 2020 GMT gpg: using RSA key 155D3FC500C834486D1EEA677FD9FCCB000BEEEE gpg: Good signature from "Jim Meyering <jim@meyering.net>" [ultimate] gpg: aka "Jim Meyering <meyering@redhat.com>" [ultimate] gpg: aka "Jim Meyering <meyering@gnu.org>" [ultimate] >>> Unpacking sed-4.8.tar.xz to /var/tmp/portage.notmp/portage/sys-apps/sed-4.8/work >>> Unpacking sed-4.8.tar.xz.sig to /var/tmp/portage.notmp/portage/sys-apps/sed-4.8/work unpack sed-4.8.tar.xz.sig: file format not recognized. Ignoring. >>> Source unpacked in /var/tmp/portage.notmp/portage/sys-apps/sed-4.8/work >>> Preparing source in /var/tmp/portage.notmp/portage/sys-apps/sed-4.8/work/sed-4.8 ... >>> Source prepared. >>> Configuring source in /var/tmp/portage.notmp/portage/sys-apps/sed-4.8/work/sed-4.8 ... ``` In fact, even Clang is okay, but not compiler-rt-sanitizers! Works okay outside of Portage: ``` # gemato gpg-wrap -K /usr/share/openpgp-keys/llvm.asc -R -- gpg --verify /var/tmp/portage.notmp/portage/sys-libs/compiler-rt-sanitizers-14.0.6/distdir/llvm-project-14.0.6.src.tar.xz.sig /var/tmp/portage.notmp/portage/sys-libs/compiler-rt-sanitizers-14.0.6/distdir/llvm-project-14.0.6.src.tar.xz gpg: Signature made Sat Jun 25 05:09:12 2022 BST gpg: using RSA key 474E22316ABF4785A88C6E8EA2C794A986419D8A gpg: Good signature from "Tom Stellard <tstellar@redhat.com>" [ultimate] ``` And as non-root. Apparently it can't handle the dir being "/var/tmp/portage.notmp". Maybe permissions or something (although they seem right to me). Maybe it exceeds UNIX socket path limit. Try setting a shorter TMPDIR inside the verify-sig eclass. If that helps, I can update it to use a shorter TMPDIR for gpg invocations. (In reply to Michał Górny from comment #6) > Maybe it exceeds UNIX socket path limit. Try setting a shorter TMPDIR > inside the verify-sig eclass. If that helps, I can update it to use a > shorter TMPDIR for gpg invocations. That seems to be it. The long package name 'compiler-rt-sanitizers' seems to push it over the limit. The other LLVM packages, with shorter names but using the same eclass, work fine. The following was working for me at the command prompt but not during the build: gemato gpg-wrap -K /usr/share/openpgp-keys/llvm.asc -R -- gpg --verify /mnt/scratch/portage/portage/sys-libs/compiler-rt-sanitizers-14.0.6/distdir/llvm-project-14.0.6.src.tar.xz.sig /mnt/scratch/portage/portage/sys-libs/compiler-rt-sanitizers-14.0.6/distdir/llvm-project-14.0.6.src.tar.xz I altered TMPDIR to be /mnt/scratch instead of /mnt/scratch/portage (it seems it creates its own portage subdirectory anyway) and the build worked. I don't know whether it's worth using a shortened name in the compiler-rt-sanitizers ebuild or perhaps adding a length check in the llvm.org eclass. Just using a shortened name should reduce the likelihood of hitting this. As you can see, shaving off just eight characters worked for me. The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48b23e4578736c4e9d29c270ce3be72be73a9405 commit 48b23e4578736c4e9d29c270ce3be72be73a9405 Author: Michał Górny <mgorny@gentoo.org> AuthorDate: 2022-11-08 04:45:44 +0000 Commit: Michał Górny <mgorny@gentoo.org> CommitDate: 2022-11-10 17:08:10 +0000 verify-sig.eclass: Workaround GPG problems with long TMPDIR Force using TMPDIR=/tmp to workaround GPG failing when TMPDIR happens to be long enough to cause UNIX socket paths to exceed the system limit. Closes: https://bugs.gentoo.org/854492 Signed-off-by: Michał Górny <mgorny@gentoo.org> eclass/verify-sig.eclass | 6 ++++++ 1 file changed, 6 insertions(+) |