[lug] rpm DB intiializing for non-root
D. Stimits
stimits at idcomm.com
Mon Aug 5 01:07:59 MDT 2002
In order to allow experimenting with rpm's by a non-root user, I have
added some regular user .rpmmacros lines, and created directories to
accept files that parallel the root versions. The following is what I
had until now, which let me do source rpm rebuilds by a non-root user
"foo", but will not let me do package building by "foo" to the alternate
directories:
%_topdir /home/foo/rpm
%_tmppath %{_topdir}/tmp
Then I have in /home/foo:
rpm
rpm/BUILD/
rpm/SOURCES/
rpm/SPECS/
rpm/SRPMS/
rpm/tmp/
rpm/RPMS/
rpm/RPMS/athlon/
rpm/RPMS/i386/
rpm/RPMS/i486/
rpm/RPMS/i586/
rpm/RPMS/i686/
rpm/RPMS/noarch/
I can rebuild rpms quite well from that. However, I'm dabbling with
taking an existing source rpm, with an inadequate spec file (it doesn't
use the right autoconf --configure type arguments, so I am customizing
the autoconf configure arguments), and creating a new source rpm from
that, based on the modified spec file.
First, I found I wanted to have a fake/alternate rpm DB that non-root
can go to, so I expanded the .rpmmacros file to become:
%_topdir /home/foo/rpm
%_tmppath %{_topdir}/tmp
%_dbpath %{_topdir}/db
...then I added directory:
~/rpm/db/
...and ran:
rpm --initdb
All of this looks good so far. But when I start to do any rpm -b type
command based on the spec file, it complains about some of the other
files in the db directory that are missing (in reality I can issue
nodeps, and get it to build, but it indicates that the dependency
mechanism uses those other db3 files, I would like dependencies to work):
Providename, Name, Conflictname
(all of these and more exist in the real rpm db directory /var/lib/rpm/)
Now my question is, since --initdb and --rebuilddb do not add these
files, and since blank versions created by touch will not work (even
after a new initdb or rebuilddb), is there a standard mechanism to
create these for my non-root user? Can they be built with an rpm
command? All I need is a cheap and empty rpm DB for non-root, perhaps
I'll test install relocateable rpm's into the non-root user's home
directory area.
D. Stimits, stimits AT idcomm.com
More information about the LUG
mailing list