Berkeley DB 4.6.19 appears to be caching (and using) paths
within a dbenv, which breaks lazy table opens using rpm --root in
rather complicated ways. The fundamental cause is simply that
sometimes file paths need prefixing, and sometimes not.
The quick-n-dirty workaround if you are making extensive use of rpm --
is to open all tables before entering the chroot by setting this
macro to 1:
# Open all indices before doing chroot(2).
I say "workaround" because opening all indices before entering chroot
a) the tables to be opened never change
b) there is no outside attempt to access from within the chroot,
chroot /path/to/chroot rpm -qa
instead of doing
rpm -qa --dbpath /path/to/chroot/var/lib/rpm
as each of those accesses opens with different file paths.
However, there are no clear engineering solutions to any of the
above, thank you POSIX and UGLIX.
Because of the often requested feature to be able to install using
rpm --root as an
unprivileged user (chroot(2) is limited to uid=0), the forward
answer will be to attempt to emulate chroot prefixing for
but that too is a largish change that assumes that all file paths
through a syscall wrapper, not through the syscall itself.
73 de Jeff
Received on Sun Sep 23 20:03:35 2007