[Rpm-maint] [rpm-software-management/rpm] Implement a separate lock for the keystore (PR #4123)

Panu Matilainen notifications at github.com
Tue Feb 24 12:25:59 UTC 2026


https://github.com/rpm-software-management/rpm/commit/79b26f1ac5c4abe3a2ebbb8679f023cf3a2dd412 introduced transaction locking on the keyring, mostly considered a "for now" solution, but the fact it blocks rpm queries while a transaction is in progress is too jarring a change.

More details in the commit notes but in short, this introduces another lock for the keystore, using the same machinery as the transaction lock. This much locking is more or less necessary to ensure keyring coherence, but these can proceed independently and keyring writes don't take minutes like package transactions can.

What bothers me about this solution is that it's kind of an API/ABI break in a place where we don't want one, but then I fail to see a way to address this without that breakage. In this form, it's also silent breakage. It should probably error out, or at least warn if the wrong kind of txn handle is handed to a function.  So this seems incomplete in this form, but then I seem to be kinda stuck on this, so hoping some external feedback on it.

Fixes: #4110
You can view, comment on, or merge this pull request online at:

  https://github.com/rpm-software-management/rpm/pull/4123

-- Commit Summary --

  * Add some tests for rpm access from scriptlets
  * Refactor rpmtxn lock initialization a bit to make it more generic
  * Implement a separate lock for the keystore

-- File Changes --

    M include/rpm/rpmts.h (8)
    M lib/rpmts.cc (68)
    M lib/rpmts_internal.hh (2)
    M macros.in (2)
    A tests/data/SPECS/selfimport.spec (20)
    A tests/data/SPECS/selfinst.spec (20)
    A tests/data/SPECS/selfkeys.spec (20)
    A tests/data/SPECS/selfquery.spec (20)
    M tests/rpmi.at (60)
    M tools/rpmkeys.cc (4)

-- Patch Links --

https://github.com/rpm-software-management/rpm/pull/4123.patch
https://github.com/rpm-software-management/rpm/pull/4123.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/4123
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/4123 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20260224/c8834b14/attachment.htm>


More information about the Rpm-maint mailing list