[libvirt] [PATCH] spec: Use correct versions of libgfapi in RHEL builds

RHEL still uses the 3.4.0 package of libgfapi and the package is built only for x86_64. --- libvirt.spec.in | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index 3d5a69e..67b5557 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -98,7 +98,7 @@ %else %define with_storage_sheepdog 0 %endif -%if 0%{?fedora} >= 19 +%if 0%{?fedora} >= 19 || 0%{?rhel >= 6} %define with_storage_gluster 0%{!?_without_storage_gluster:%{server_drivers}} %else %define with_storage_gluster 0 @@ -153,6 +153,13 @@ %define with_numactl 0 %endif +# libgfapi is built only on x86_64 on rhel +%ifnarch x86_64 + %if 0%{?rhel >= 6} + %define with_storage_gluster 0 + %endif +%endif + # RHEL doesn't ship OpenVZ, VBox, UML, PowerHypervisor, # VMWare, libxenserver (xenapi), libxenlight (Xen 4.1 and newer), # or HyperV. @@ -571,9 +578,14 @@ BuildRequires: ceph-devel %endif %endif %if %{with_storage_gluster} +%if 0%{?rhel} >= 6 +BuildRequires: glusterfs-api-devel >= 3.4.0 +BuildRequires: glusterfs-devel >= 3.4.0 +%else BuildRequires: glusterfs-api-devel >= 3.4.1 BuildRequires: glusterfs-devel >= 3.4.1 %endif +%endif %if %{with_numactl} # For QEMU/LXC numa info BuildRequires: numactl-devel -- 1.8.5.5

On Wed, Feb 26, 2014 at 13:09:48 +0100, Peter Krempa wrote:
RHEL still uses the 3.4.0 package of libgfapi and the package is built only for x86_64. --- libvirt.spec.in | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index 3d5a69e..67b5557 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -98,7 +98,7 @@ %else %define with_storage_sheepdog 0 %endif -%if 0%{?fedora} >= 19 +%if 0%{?fedora} >= 19 || 0%{?rhel >= 6} %define with_storage_gluster 0%{!?_without_storage_gluster:%{server_drivers}} %else %define with_storage_gluster 0 @@ -153,6 +153,13 @@ %define with_numactl 0 %endif
+# libgfapi is built only on x86_64 on rhel +%ifnarch x86_64 + %if 0%{?rhel >= 6} + %define with_storage_gluster 0 + %endif +%endif + # RHEL doesn't ship OpenVZ, VBox, UML, PowerHypervisor, # VMWare, libxenserver (xenapi), libxenlight (Xen 4.1 and newer), # or HyperV. @@ -571,9 +578,14 @@ BuildRequires: ceph-devel %endif %endif %if %{with_storage_gluster} +%if 0%{?rhel} >= 6 +BuildRequires: glusterfs-api-devel >= 3.4.0 +BuildRequires: glusterfs-devel >= 3.4.0 +%else BuildRequires: glusterfs-api-devel >= 3.4.1 BuildRequires: glusterfs-devel >= 3.4.1 %endif +%endif
The nested if/else/endif should be indented.
%if %{with_numactl} # For QEMU/LXC numa info BuildRequires: numactl-devel
ACK once fixed. Jirka

On 02/26/14 13:15, Jiri Denemark wrote:
On Wed, Feb 26, 2014 at 13:09:48 +0100, Peter Krempa wrote:
RHEL still uses the 3.4.0 package of libgfapi and the package is built only for x86_64. --- libvirt.spec.in | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
+%else BuildRequires: glusterfs-api-devel >= 3.4.1 BuildRequires: glusterfs-devel >= 3.4.1 %endif +%endif
The nested if/else/endif should be indented.
%if %{with_numactl} # For QEMU/LXC numa info BuildRequires: numactl-devel
ACK once fixed.
Fixed && pushed.
Jirka
Peter

On Wed, Feb 26, 2014 at 01:09:48PM +0100, Peter Krempa wrote:
RHEL still uses the 3.4.0 package of libgfapi and the package is built only for x86_64. --- libvirt.spec.in | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index 3d5a69e..67b5557 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -98,7 +98,7 @@ %else %define with_storage_sheepdog 0 %endif -%if 0%{?fedora} >= 19 +%if 0%{?fedora} >= 19 || 0%{?rhel >= 6}
Be consistent, this ...
%define with_storage_gluster 0%{!?_without_storage_gluster:%{server_drivers}} %else %define with_storage_gluster 0 @@ -153,6 +153,13 @@ %define with_numactl 0 %endif
+# libgfapi is built only on x86_64 on rhel +%ifnarch x86_64 + %if 0%{?rhel >= 6}
... and this doesn't look like ...
+ %define with_storage_gluster 0 + %endif +%endif + # RHEL doesn't ship OpenVZ, VBox, UML, PowerHypervisor, # VMWare, libxenserver (xenapi), libxenlight (Xen 4.1 and newer), # or HyperV. @@ -571,9 +578,14 @@ BuildRequires: ceph-devel %endif %endif %if %{with_storage_gluster} +%if 0%{?rhel} >= 6
... this, which is the only one that'll work, I guess. BTW: If 3.4.0 is enough, why are we requiring 3.4.1 somewhere? Martin
+BuildRequires: glusterfs-api-devel >= 3.4.0 +BuildRequires: glusterfs-devel >= 3.4.0 +%else BuildRequires: glusterfs-api-devel >= 3.4.1 BuildRequires: glusterfs-devel >= 3.4.1 %endif +%endif %if %{with_numactl} # For QEMU/LXC numa info BuildRequires: numactl-devel

On 02/26/2014 05:35 AM, Martin Kletzander wrote:
On Wed, Feb 26, 2014 at 01:09:48PM +0100, Peter Krempa wrote:
RHEL still uses the 3.4.0 package of libgfapi and the package is built only for x86_64. --- libvirt.spec.in | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/libvirt.spec.in b/libvirt.spec.in index 3d5a69e..67b5557 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -98,7 +98,7 @@ %else %define with_storage_sheepdog 0 %endif -%if 0%{?fedora} >= 19 +%if 0%{?fedora} >= 19 || 0%{?rhel >= 6}
Be consistent, this ...
rpmbuild isn't dying, but I think this is trying to compute the value of a variable literally named 'rhel >= 6', which doesn't exist, so the overall %if ends up looking like '%if ... || 0' and the rhel arm never fires.
... and this doesn't look like ...
%endif %if %{with_storage_gluster} +%if 0%{?rhel} >= 6
... this, which is the only one that'll work, I guess.
Indeed, this is the form that works whether 'rhel' is defined ('%if 07
= 6', remembering that %if does decimal math rather than octal), or undefined ('%if 0 >= 6').
BTW: If 3.4.0 is enough, why are we requiring 3.4.1 somewhere?
3.4.1 happens to be what Fedora ships with, and where gluster was originally tested. But I'm okay with going with the simpler change of just requiring 3.4.0 as a minimum, now that we've tested that, rather than trying to make this quite so complex. We definitely need a followup. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
participants (4)
-
Eric Blake
-
Jiri Denemark
-
Martin Kletzander
-
Peter Krempa