From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2a) Gecko/20020910
Description of problem:
I find that rpm -bb is difficult to run when you are not root. /usr/src/redhat
is usually not accessable by the user. Without root access the only way for me
to build rpms is to redifine the %_topdir macro in the spec file:
%define _topdir /var/tmp/rpm
Then you have to create the whole rpm directory structure under there. The
enchancement I am asking for is 2 fold:
1. Add a --topdir option to the build command to specify where the directories
are (rather then having the user change the spec file)
2. Try to create these directories if they don't exist.
If you are on a system hosted by someone else, root access is not nesseserally
available to change the permissions of /usr/src/redhat dirs.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
run rpm -bb blah.spec as anything except root on a default installed RH system.
Actual Results: permission denied errors.
Expected Results: I would not get those since i would use the --topdir option
to point to a writable directory.
echo '%_topdir /home/mitr/data/redhat' >> ~/.rpmmacros
is better than that, it is permanent and you don't need
to add the --target to every rpmbuild invocation.
You can add a --topdir option to rpmbuild by
putting in /etc/popt or ~/.popt
rpmbuild alias --topdir --define '_topdir !#:+'
rpm has way too many options for this to be added
as part of default configuration