You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Robert Hunter <ro...@gen-i.co.nz> on 2005/02/13 20:52:04 UTC

[OT] RPM building as non-root (was RE: Victory - built subversion from RH9 source rpm!)

Steve Cohen wrote:
>> When I started building SRPMS back in Red Hat 5.2 days, I couldn't
>> imagine having to be root to do it, so I asked on the RPM mailing list 
>> and found the black magic for doing it as a mortal. 
>
>That would be changing the ownership of /usr/src/redhat?  Actually, I 
>didn't even have to do that.  I chmodded it to g+w and put myself into 
>the root group.  That also did the job.

All RPM building really needs is a directory structure to write to,
and a one-line entry in ~/.rpmmacros to tell it where that is.

I've included an untested script to demonstrate this process :-)

#!/bin/bash
mkdir ~/rpm
for fulldir in /usr/src/redhat/*
do
	dir=$(basename "$fulldir")
	mkdir ~/rpm/"$dir"
done
cat > ~/.rpmmacrostest << EOT
%_topdir	%(echo ${HOME}/rpm}
%_tmppath	%{$_topdir}/tmp
EOT


*****************************************************************************
This communication, including any attachments, is confidential.
If you are not the intended recipient, you should not read it
- please contact me immediately, destroy it, and do not copy
or use any part of this communication or disclose anything about it,
Thank you.
Please note that this communication does not designate an information system
for the purposes of the Electronic Transactions Act 2002
******************************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org