[Rpm-maint] [rpm-software-management/rpm] rpmdb --exportdb does not work on read-only fs (Issue #3371)

Panu Matilainen notifications at github.com
Fri Oct 11 11:05:29 UTC 2024


rpmdb --exportdb calls rpmtxnBegin() with RPMTXN_READ flags. Internally that function calls rpmlockNew() and rpmlockAcquire(). Neither function has a flags parameter to specify what kind of lock is requested. rpmlockNew() automatically creates a read lock if it can't open the .rpm.lock file in RW mode. rpmlockAcquire() however wants to establish a write lock always so won't work on a read-only lock.

So in the end it means that means rpmdb --exportdb only works as root on a read-write file system. Doesn't work for unprivileged users, nor on read only file systems. That doesn't seem to be intentional given the rpmlockNew() fallback to a read lock.

(and yes, this is an exact duplicate of #1266, which for whatever reason isn't getting synced to our Jira which messes up our stuff, so apologies for the noise)

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

Message ID: <rpm-software-management/rpm/issues/3371 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241011/c7311953/attachment.html>


More information about the Rpm-maint mailing list