[TriLUG] rpm as non root

Jeremy Portzer jeremyp at pobox.com
Fri Dec 13 17:27:18 EST 2002


On Fri, 2002-12-13 at 17:07, H Brett Bolen wrote:

> 
> gotcha, but doesn't src rpms require access to the rpm database also?

No, "installing" a source RPM just unpacks it and copies the files to
various places in the RPM build tree.  By default this tree is
/usr/src/redhat (on Red Hat Linux at least, I dunno how Mandrake does
that).  Therefore you have to be root to write to that directory.

However, it's very simple to setup a build tree in your home directory. 
For example, do this from your homedir:

mkdir rpm	(or whatever you wanna call it)
cd rpm
mkdir BUILD RPMS SOURCES SPECS SRPMS
echo "%_topdir		$HOME/rpm" > ~/.rpmmacros

Substitute the home directory path as appropriate.
Then, you can install source RPMs and use the functions of rpmbuild
without being root (for example "rpmbuild --rebuild foo.src.rpm").

Hope this helps,
Jeremy




More information about the TriLUG mailing list