[libvirt] [PATCH] Fix rpm build with sanlock and without QEmu
Wen Congyang
wencongyang at gmail.com
Thu Jul 14 15:08:04 UTC 2011
At 14/07/11 15:14, Daniel Veillard write:
> On Thu, Jul 14, 2011 at 01:22:10PM +0800, Wen Congyang wrote:
>> At 07/06/2011 11:15 AM, Daniel Veillard Write:
>>>
>>> The qemu-sanlock.conf file is not installed in this case
>>>
>>> Pushed under build breaker rules
>>>
>>> Daniel
>>>
>>> diff --git a/libvirt.spec.in b/libvirt.spec.in
>>> index bf220f3..230237e 100644
>>> --- a/libvirt.spec.in
>>> +++ b/libvirt.spec.in
>>> @@ -1031,7 +1031,9 @@ fi
>>> %if %{with_sanlock}
>>> %files lock-sanlock
>>> %defattr(-, root, root)
>>> +%if %{with_qemu}
>>> %config(noreplace) %{_sysconfdir}/libvirt/qemu-sanlock.conf
>>> +%endif
>>
>> Agree with it. But when builing without libvirtd, with_qemu is 1 here
>> and qemu-sanlock.conf is not installed.
>>
>> The reason is that we disable some drivers when building without libvirtd
>> in configure, but we do not do the same thing in libvirt.spec.
>
> Well I think we never tried to build the rpms with libvirtd disabled.
>
>> This patch can fix this problem.
>>
>> > From d358ab3de02e643f62dcd25bfd10c5a2cb8f5126 Mon Sep 17 00:00:00 2001
>> From: Wen Congyang<wency at cn.fujitsu.com>
>> Date: Thu, 14 Jul 2011 13:20:19 +0800
>> Subject: [PATCH] build: disable some dirvers when building without libvirt daemon
>>
>> We disable some drivers when building without libvirtd in configure,
>> but we do not do the same thing in libvirt.spec. It may break rpm
>> building without libvirtd.
>>
>> ---
>> libvirt.spec.in | 23 ++++++++++++++++-------
>> 1 files changed, 16 insertions(+), 7 deletions(-)
>>
>> diff --git a/libvirt.spec.in b/libvirt.spec.in
>> index 230237e..4aba20a 100644
>> --- a/libvirt.spec.in
>> +++ b/libvirt.spec.in
>> @@ -168,6 +168,22 @@
>> %define with_sanlock 0%{!?_without_sanlock:%{server_drivers}}
>> %endif
>>
>> +# Disable some dirvers when building without libvirt daemon.
>
> typo : drivers
>
>> +# The logic is the same as in configure.ac
>> +%if ! %{with_libvirtd}
>> +%define with_network 0
>> +%define with_qemu 0
>> +%define with_lxc 0
>> +%define with_uml 0
>> +%define with_hal 0
>> +%define with_udev 0
>> +%define with_storage_fs 0
>> +%define with_storage_lvm 0
>> +%define with_storage_iscsi 0
>> +%define with_storage_mpath 0
>> +%define with_storage_disk 0
>> +%endif
>> +
>> # Enable libpcap library
>> %if %{with_qemu}
>> %define with_nwfilter 0%{!?_without_nwfilter:%{server_drivers}}
>> @@ -212,13 +228,6 @@
>> %define with_rhel5 0
>> %endif
>>
>> -
>> -# there's no use compiling the network driver without
>> -# the libvirt daemon
>> -%if ! %{with_libvirtd}
>> -%define with_network 0
>> -%endif
>> -
>> Summary: Library providing a simple virtualization API
>> Name: libvirt
>> Version: @VERSION@
>
> that sounds right to me, ACK,
Thanks, pushed with typo fixed.
Wen Congyang
>
> Daniel
>
More information about the libvir-list
mailing list