On 11/16/2011 11:19 PM, Chris Picton wrote:
On Wed, 2011-11-16 at 15:31 -0700, Eric Blake wrote:
> On 11/15/2011 11:42 PM, Chris Picton wrote:
>> Hi
>>
>> Please accept the following patch to the rpm spec file.
>
> Thanks for the report. However, I'm not yet quite convinced that your
> proposed patch is the best approach.
I meant to revisit this in time for 0.9.8, but obviously slipped on that
front. Oh well, it's now on my list for 0.9.9.
The following may be a better way of expressing the dependencies
1) set sane defaults for variables near the top
%define with_openvz 0%{!?_without_openvz:%{server_drivers}}
2) override these with platform specific values later on (but taking
cognisance of the user supplied options
%if 0%{?rhel}
%define with_openvz 0%{?_with_openvz:1}
...
%endif
This is already used in some cases where certain features are turned on
on specific platforms:
%if 0%{?fedora} >= 13 || 0%{?rhel} >= 6
%define with_dtrace 0%{!?_without_dtrace:1}
%endif
So the bulk of the changes would be updating the spec file to replace
%define with_xxx 0
with
%define with_xxx 0{?_with_xxx:1}
Yes, that looks like a reasonable approach.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org