Scenario:
I want the users of the rpm packages I'm building for my project to be able
to install said packages as a non-root user.
I see that rpm has a '--root' parameter, and that appears to work when
installing my package (eg, using '--root
/home/<my-non-root-user>'). However, my .rpm packages tend to have many
dependencies that may be typically installed as "root" system packages, eg,
PostgreSQL, MySQL, Boost libraries, bzip2 compression libs, libpqxx,
OpenSSL libs, xerces-c libs, and possibly more...not to mention all the
"standard" dependencies like libc/libstdc++/libpthread/libgcc,
etc. Therefore, when running the '--root /home/<my-non-root-user>'
command, all sorts of missing dependencies show up, even though all of the
above modules/libraries may already be installed on my system...but not in
the rpm database found in /home/<my-non-root-user>.
One way I'm thinking about solving this problem:
What if the non-root user could acquire the *existing* root-rpm-database
info (from /usr/lib/rpmdb/i386-redhat-linux/CentOS, what I understand is
the typical db info...for a CentOS install, anyway) and copy it into
/home/<my-non-root-user>/usr/lib/rpmdb/i386-redhat-linux/CentOS?
This way I'm hoping that a non-root user could copy the existing system
package info that points to the existing modules/packages, and then said
non-root user can install the new package(s) into their own database and
/home/<my-non-root-user> filesystem?
Are there any other ways to solve the
install-the-package-as-a-non-root-user problem?
-Matt