Hi,
Why is BuildRoot in spec files? (Don't say tradition.) It seems to me that its a _build system_ tunable and not something that each spec file should do differently. Can we define that in rpmmacros and take it out of all spec files? The fact that it comes up in spec file reviews and we are supposed to have the _same thing_ in each file just screams to be relocated to a central place and no longer controlled by each spec file.
-Steve
____________________________________________________________________________________ Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/
On Thursday 15 February 2007 08:31, Steve G wrote:
Why is BuildRoot in spec files? (Don't say tradition.) It seems to me that its a _build system_ tunable and not something that each spec file should do differently. Can we define that in rpmmacros and take it out of all spec files? The fact that it comes up in spec file reviews and we are supposed to have the _same thing_ in each file just screams to be relocated to a central place and no longer controlled by each spec file.
A macro doesn't work. It won't get used unless BuildRoot is in the spec file. yes this is a "bug" in rpm. There have been patches submitted to rpm.org upstream to set BuildRoot completely internal to rpm and remove it completely from the spec file. However it will take some time for this change to get integrated and put into a release of rpm we ship, and may not be ported to older releases for which we still maintain packages.
A macro doesn't work. It won't get used unless BuildRoot is in the spec file.
I don't buy this at all. To start with, we can define a macro:
%buildrootdir %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
This could be used in spec files:
BuildRoot: %{buildrootdir}
Just doing that much would be an improvement.
Then I look at somethings we did in the past like RPM_OPT_FLAGS and how we had to put that in spec files by hand and then someone figured out how to get that done automatically. I think we can make this get applied automatically, too.
-Steve
____________________________________________________________________________________ Need Mail bonding? Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users. http://answers.yahoo.com/dir/?link=list&sid=396546091