From Bugzilla Helper: User-Agent: Mozilla/4.77 [en] (X11; U; Linux 2.4.3-12 i686) Description of problem: Passing a --buildroot option seems to be ignored. That is, even when passing a --buildroot option, RPM looks for source files in the default build root (/usr/src/redhat) and complains when the source files aren't there. Further, using a "buildroot: <path>" option in a .rpmrc results in an error message: "error: bad option 'buildroot' in /home/johnsond/.rpmrc:1". Version-Release number of selected component (if applicable): 4.0.2-8 How reproducible: Always Steps to Reproduce: 1. rpm -ba <specfile> --buildroot <path to build root> Additional info:
You're confusing --buildroot with the macro value %{_builddir}. And you're probably looking to change the macro %{_topdir} to something other than /usr/src/redhat. Do that by echo "%_topdir /wherever/you/want" >> ~/.rpmmacros