From Bugzilla Helper: User-Agent: Opera/8.51 (X11; Linux i686; U; en) Description of problem: The spec file for the gcc-4.0.1-4.fc4 source RPM contains a hardcoded BuildRoot value, rather trhan using the standard %__buildroot variable. The spec file has this line: BuildRoot: /var/tmp/gcc-root Version-Release number of selected component (if applicable): gcc-4.0.1-4.fc4 How reproducible: Always Steps to Reproduce: 1. rpmbuild --rebuild gcc-4.0.1-4.fc4.src.rpm 2. note that building of binary packages is done beneath /var/tmp 3. Actual Results: The build halted because I didn't have permission to write to /var/tmp. The permissions problem was my own fault, previously created by my fat fingers. I had not had any problems in building previous packages, though, because I always build entirely beneath /home/rpmbuild/. Expected Results: The build-root should always use the value specified by %_buildroot in the . rpmmacros file (if it exists). Additional info:
There is no %_buildroot macro that I know of. Some spec files just use %{_tmppath}/something and others use /var/tmp/something I guess it is about 50%/50%. If you want to override it in your builds, you need to override buildroot macro, say with rpmbuild --buildroot=/foo/bar/baz/ and that of course overrides any specified tag. Nevertheless, I have changed gcc41.spec in 4.1.0-0.4 to use %{_tmppath}/ in the tag, but definitely not plan to change it in older rpms.
*** Bug 187864 has been marked as a duplicate of this bug. ***