[Rpm-maint] RPM NDB and chroot failure
Darren Hart
dvhart at infradead.org
Tue Jul 18 17:59:03 UTC 2017
While testing my previous patches to allow for an NDB only build of RPM, I ran
across an issue using the --root argument.
When passing --root, the strace log shows that after the chroot call, a stat()
of the Packages.db absolute path fails, which triggers a reopen, which fails as
it attempts open() using the absolute path.
This manifests in lib/backend/ndb/rpmpkg.c:
rpmpkgLock
rpmpkgGetLock
is_correct_db
reopen_db
open(pkgdb->filename, ...)
The pkgdb->filename is not being updated after chroot.
I'm looking into how to fix this, but I'm still a bit green on the RPM DB
abstractions.
Should the ndb implementation be using the rpmbd_internal API? For example,
rather than accessing pkgdb->filename directly, should the ndb implementation
have a call which provides it with the chroot adjusted path to the RPM DB?
Something using rpmdbHome() for example?
--
Darren Hart
VMware Open Source Technology Center
More information about the Rpm-maint
mailing list