Bug 16480

Summary: oe.gpg_sign should use supported method of passing gpg-agent arguments
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Barker <paul>
Component: oe-core otherAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: normal    
Priority: Undecided    
Version: unspecified   
Target Milestone: 0.0.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Paul Barker 2026-10-30 18:18:26 UTC
Using a `|` character with `gpg --agent-program` to specify arguments for the gpg-agent process is not officially supported. The docs describe it as "a regression test suite hack" [1].

This is easy to fix for the selftests where we create a temporary gnupg homedir. In that case we can safely write a gpg-agent.conf file with the required options and know that there is no pre-existing gpg-agent running for this homedir without the options set. However, in the more general case supported by oe.gpg_sign, we can't modify the configuration files in the gnupg homedir as this is likely to be provided and managed by the user. We also can't guarantee that there isn't already a gpg-agent process running which lacks the required options.

Fixing this in the general case is tricky. We may need to simply document the requirement for the gpg-agent to have the auto-expand-secmem option enabled and leave it to users to ensure that is set in their environments.

[1]: https://www.gnupg.org/documentation/manuals/gnupg24/gpg.1.html