Greetings,
I've got an interesting (to me, at least.

) scenario with RPMs here
that I would like some help with.
I'm creating the root file system for an embedded target using RPMs
appropriate for that target. I will be taking a list of RPM packages
that comprise of the rootfs and then "installing" them into a
directory under a user directory, then package that directory and
deploy to the target.
The way I go about this is.
In user "builder"'s directory.
Assume the path is: /home/builder/project
<builder>: rpm --initdb --dbpath `pwd`/database
<builder>: rpm -ivh --dbpath `pwd`/database --prefix `pwd`/rootfs
<list of rpms>
Once all the packages are installed, the rootfs directory contains all
the files and the database directory contains the database. I can then
do:
<builder>: rpm -qa --dbpath `pwd`/database
and get a list of all installed packages. When I do a "-ql" on an
installed package, I get the list, but everything is prefixed with
/home/builder/project/.../..., which is what I expect because I used
the "--prefix" option during the RPM install.
Now I take the database directory and populate it into the rootfs
directory under /var/lib/rpm.
I now move the rootfs onto the target and boot it. Everything works
fine. I can do a "rpm -qa" on the target and get the list of packages,
doing a "tpm -ql" on a package lists the files as being under
/home/builder/project/.../.... Trying to verify the list obviously
fails, because the root directory is wrong.
My question, phew, is what can I do on the target with the database
that has been created elsewhere that will allow me to rebase the files
from "/home/builder/project" => "/".
Rebuilding the database doesn't do this, I didn't see any other RPM
options that dealt with this specifically.
On the other hand, if this isn't possible on the target. Is thre
anything I can don the Host machine while installing the RPMs that
will allow me to place them in a user directory and not have the
/home/builder/project stuff in?
Regards