Bug 174594 - SRPM uses hard-coded build-root, disregards %_buildroot
Summary: SRPM uses hard-coded build-root, disregards %_buildroot
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc4
Version: 4
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
: 187864 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2005-11-30 15:40 UTC by Steve Snyder
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Clone Of:
Last Closed: 2005-12-02 08:49:27 UTC

Attachments (Terms of Use)

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):

How reproducible:

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

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. ***

Note You need to log in before you can comment on or make changes to this bug.