[libvirt] RPM spec file patch
Eric Blake
eblake at redhat.com
Thu Dec 8 16:55:45 UTC 2011
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 at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111208/a435256f/attachment-0001.sig>
More information about the libvir-list
mailing list