Bug 100653 - %buildroot ignored in final packaging step
Summary: %buildroot ignored in final packaging step
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm   
(Show other bugs)
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2003-07-24 00:46 UTC by Kenneth Porter
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-01-06 14:33:07 UTC
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-24 00:50 UTC, Kenneth Porter
no flags Details

Description Kenneth Porter 2003-07-24 00:46:45 UTC

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-24 00:50:35 UTC
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 14:35:30 UTC
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 14:33:07 UTC
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.