Bug 174594

Summary: SRPM uses hard-coded build-root, disregards %_buildroot
Product: [Fedora] Fedora Reporter: Steve Snyder <swsnyder>
Component: gcc4Assignee: Jakub Jelinek <jakub>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4CC: ekanter
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-12-02 08:49:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steve Snyder 2005-11-30 15:40:09 UTC
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:

Comment 1 Jakub Jelinek 2005-12-02 08:49:27 UTC
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.

Comment 2 Jakub Jelinek 2006-04-04 09:41:51 UTC
*** Bug 187864 has been marked as a duplicate of this bug. ***