Bug 449031 - spec templates should use %{buildroot} instead of $RPM_BUILD_ROOT
spec templates should use %{buildroot} instead of $RPM_BUILD_ROOT
Product: Fedora
Classification: Fedora
Component: rpmdevtools (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-05-29 18:09 EDT by Kyle VanderBeek
Modified: 2008-06-01 00:11 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-30 14:47:21 EDT
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 Kyle VanderBeek 2008-05-29 18:09:47 EDT
Description of problem:
Generated .spec templates use $RPM_BUILD_ROOT instead of the more modern

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. rpmdev-newspec -t python foo
2. Examine resulting foo.spec and see RPM_BUILD_ROOT at least 3 times.
Actual results:

Expected results:
Should use %{buildroot} .

Additional info:
In this package review: 


rickyz recommends I use the %{} style of macro for the build root so we don't
have any of the older shell-style variables.  If that's the way we want things
to be, we should update all of the templates to reflect that.
Comment 1 Rex Dieter 2008-05-30 11:24:47 EDT
fwiw, current fedora packaging guidelines allow either style to be used as 
long as it is used consistently, ie, no mixing of %{buildroot} and 
Comment 2 Kyle VanderBeek 2008-05-30 14:47:21 EDT
Closing since it seems rickyz's advice was not in accordance with packaging

Comment 3 Ville Skyttä 2008-05-30 15:06:29 EDT
BTW "rpmdev-newspec -m" emits templates that use the macro style.
Comment 4 Ricky Zhou 2008-06-01 00:11:35 EDT
(In reply to comment #2)
> Closing since it seems rickyz's advice was not in accordance with packaging
> standards.
I'm sorry, but I'm pretty sure that my advice was correct.  My exact words were
"Be completely consistent with your macros and use %{buildroot}
instead of $RPM_BUILD_ROOT."  As you can see, I did not recommend one style over
another, I just said to be consistent, as the guidelines suggest:
"Mixing the two styles, while valid, is bad from a QA and usability point of
view, and should not be done in Fedora packages."

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