Bug 174594 - SRPM uses hard-coded build-root, disregards %_buildroot
SRPM uses hard-coded build-root, disregards %_buildroot
Product: Fedora
Classification: Fedora
Component: gcc4 (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
: 187864 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2005-11-30 10:40 EST by Steve Snyder
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-12-02 03:49:27 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Steve Snyder 2005-11-30 10:40:09 EST
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 03:49:27 EST
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 05:41:51 EDT
*** 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.