[libvirt] [PATCH] fix building error on non fedora system

We forget to define with_storage_rbd if the system is not fedora, or the version is less than 16. --- libvirt.spec.in | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 8c4a2fd..0b83969 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -75,6 +75,8 @@ %define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}} %if 0%{?fedora} >= 16 %define with_storage_rbd 0%{!?_without_storage_rbd:%{server_drivers}} +%else +%define with_storage_rbd 0 %endif %define with_numactl 0%{!?_without_numactl:%{server_drivers}} %define with_selinux 0%{!?_without_selinux:%{server_drivers}} -- 1.7.1

On 05/22/2012 02:07 AM, Wen Congyang wrote:
We forget to define with_storage_rbd if the system is not fedora, or the version is less than 16.
--- libvirt.spec.in | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index 8c4a2fd..0b83969 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -75,6 +75,8 @@ %define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}} %if 0%{?fedora} >= 16 %define with_storage_rbd 0%{!?_without_storage_rbd:%{server_drivers}} +%else +%define with_storage_rbd 0
This would hard-code things so that even if you backport rbd to Fedora 15 or to RHEL, you cannot use it. But then again, we have that same issue for lots of other variables, so it would be a global cleanup to allow someone to give overrides to force rbd even it is not default. In fact, such a global cleanup has been proposed in the past, although I never cleaned it up to the point of inclusion: https://www.redhat.com/archives/libvir-list/2011-November/msg00870.html ACK - I'm fine with you pushing this patch as-is. -- Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 05/22/2012 08:58 PM, Eric Blake wrote:
On 05/22/2012 02:07 AM, Wen Congyang wrote:
We forget to define with_storage_rbd if the system is not fedora, or the version is less than 16.
--- libvirt.spec.in | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index 8c4a2fd..0b83969 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -75,6 +75,8 @@ %define with_storage_mpath 0%{!?_without_storage_mpath:%{server_drivers}} %if 0%{?fedora}>= 16 %define with_storage_rbd 0%{!?_without_storage_rbd:%{server_drivers}} +%else +%define with_storage_rbd 0
This would hard-code things so that even if you backport rbd to Fedora 15 or to RHEL, you cannot use it. But then again, we have that same issue for lots of other variables, so it would be a global cleanup to allow someone to give overrides to force rbd even it is not default. In fact, such a global cleanup has been proposed in the past, although I never cleaned it up to the point of inclusion: https://www.redhat.com/archives/libvir-list/2011-November/msg00870.html
ACK - I'm fine with you pushing this patch as-is.
Thanks, pushed Wen Congyang
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list
participants (3)
-
Eric Blake
-
Wen Congyang
-
Wen Congyang