sign_rpm_ext: Use socket redirection to avoid GPG_PATH length limitation

Currently, an error will be thrown when trying to use a GPG homedir whose path
length exceeds 80 characters. This limitation can be worked around by providing
libassuan socket redirection files for "S.gpg-agent.yocto-native",
"S.gpg-agent.ssh", "S.gpg-agent.browser" and "S.gpg-agent.extra"
sockets. The redirection files will point to the real sockets in /tmp
directory. The sockets will be automatically cleaned up by gpg agent.

References:
[1] https://dev.gnupg.org/T1752
[2] https://gnupg.org/documentation/manuals/assuan.pdf

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
This commit is contained in:
Ovidiu Panait authored and Jia Zhang committed 2020-03-01 19:26:24 +08:00
1 parent 8853e39b1e
commit b1dee36ce6
2 files changed
+11 -5

No files matched your search

@@ -34,9 +34,4 @@ python () {
if not gpg_path:
gpg_path = d.getVar('TMPDIR', True) + '/.gnupg'
d.setVar('GPG_PATH', gpg_path)
if len(gpg_path) > 80:
msg = "The default GPG_PATH {} of {} characters is too long. Due to GPG homedir path length limit, please set GPG_PATH shorter than 80 characters.".format(gpg_path, len(gpg_path))
raise bb.parse.SkipRecipe(msg)
}