Bug 100653 - %buildroot ignored in final packaging step
%buildroot ignored in final packaging step
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Depends On:
  Show dependency treegraph
Reported: 2003-07-23 20:46 EDT by Kenneth Porter
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-01-06 09:33:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Trivial example to reproduce bug (418 bytes, text/plain)
2003-07-23 20:50 EDT, Kenneth Porter
no flags Details

  None (edit)
Description Kenneth Porter 2003-07-23 20:46:45 EDT

Build a package as mortal that lacks a BuildRoot directive.
Define %buildroot in ~/.rpmmacros. All steps complete successfully up to
%install (including stripping and compressing) but the final packaging step
fails when rpmbuild looks for the files in the packaged location, not the build
Comment 1 Kenneth Porter 2003-07-23 20:50:35 EDT
Created attachment 93092 [details]
Trivial example to reproduce bug

Define %buildroot in mortal's ~/.rpmmacros. Build this with "rpmbuild -ba
Comment 2 Kenneth Porter 2005-03-21 09:35:30 EST
According to http://www.rpm.org/max-rpm-snapshot/ch-rpm-anywhere.html "Several
requirements must be met in order for a build root to be utilized: * A default
build root must be defined in the package's spec file." So I guess this is
working as designed. What motivated this design decision? Shouldn't %buildroot
(and $RPM_BUILD_ROOT) always work?
Comment 3 Jeff Johnson 2006-01-06 09:33:07 EST
The BuildRoot: directive sets the %buildroot macro which is used to set RPM_BUILD_ROOT in scriptlets.

This is consistent behavior, expecting %define buildroot /some path during *.spec parse to
Do The Right Thing is impossible because BuildRoot: is a FIFO object, while macro values
are LIFO (i.e. %define buildroot /some/path can be done multiple times).

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