Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v2 0/2] gpg_sign: avoid unsupported gpg-agent argument passing
@ 2026-12-02 12:53 Adarsh Jagadish Kamini
  2026-12-02 12:53 ` [PATCH v2 1/2] lib/oe/gpg_sign.py: serialize signing instead of passing agent options Adarsh Jagadish Kamini
  2026-12-02 12:53 ` [PATCH v2 2/2] oeqa: selftest: signing: test parallel signing and GPG_SIGN_SERIALIZE Adarsh Jagadish Kamini
  0 siblings, 2 replies; 5+ messages in thread
From: Adarsh Jagadish Kamini @ 2026-12-02 12:53 UTC (permalink / raw)
  To: openembedded-core

Replace the "--agent-program=gpg-agent|--auto-expand-secmem" hack with a
lock around signing, with GPG_SIGN_SERIALIZE = "0" as an opt-out. Neither
GETINFO nor gpgconf reports whether a running agent has
auto-expand-secmem (GnuPG 2.4.4 and 2.5.24), so this can't be decided
per agent.

A launcher was also tested: a script passed with --agent-program that
starts gpg-agent with --auto-expand-secmem. gpg only runs it if no
agent is already running for GPG_PATH.

Signed core-image-minimal --runall=package_write_rpm, 141 tasks,
BB_NUMBER_THREADS = 64, gnupg-native 2.5.24. "Plain" is an agent
started without auto-expand-secmem:

  agent before build        lock  launcher  failed tasks
  plain, already running    no    no        138
  plain, already running    no    yes       137
  plain, already running    yes   no          0
  none                      no    yes         0
  none (auto-expand-secmem  no    no          0
  set in gpg-agent.conf)

No clear slowdown was observed in this build: with auto-expand-secmem
enabled, medians were 929s with the lock and 924s without, over three
runs each. The cost for sstate signing, which also takes the lock, was
not measured. The lock only serializes signing that shares a TMPDIR.

Adarsh Jagadish Kamini (2):
  lib/oe/gpg_sign.py: serialize signing instead of passing agent options
  oeqa: selftest: signing: test parallel signing and GPG_SIGN_SERIALIZE

 meta/classes/sign_ipk.bbclass           |  3 +
 meta/classes/sign_package_feed.bbclass  |  3 +
 meta/classes/sign_rpm.bbclass           |  3 +
 meta/lib/oe/gpg_sign.py                 | 22 +++---
 meta/lib/oeqa/selftest/cases/signing.py | 98 ++++++++++++++++++++++++-
 5 files changed, 117 insertions(+), 12 deletions(-)


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-03 13:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 12:53 [PATCH v2 0/2] gpg_sign: avoid unsupported gpg-agent argument passing Adarsh Jagadish Kamini
2026-12-02 12:53 ` [PATCH v2 1/2] lib/oe/gpg_sign.py: serialize signing instead of passing agent options Adarsh Jagadish Kamini
2026-12-02 12:53 ` [PATCH v2 2/2] oeqa: selftest: signing: test parallel signing and GPG_SIGN_SERIALIZE Adarsh Jagadish Kamini
2026-12-03  6:43   ` [OE-core] " Mathieu Dubois-Briand
2026-12-03 13:48     ` Adarsh Jagadish Kamini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox