[PATCH] spec: fix invalid syntax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit 20e01504 broke 'make rpm':

error: line 540: Unknown tag:     %elif 020 >= 12 || 0 >= 6

Apparently, even though shell has elif so that you can do a chain
of conditionals, the rpm spec file does not, and you have to nest
things instead.

* libvirt.spec.in: Convert %elif to proper nested %if.

Signed-off-by: Eric Blake <eblake@xxxxxxxxxx>
---

Pushing under the build-breaker rule.

 libvirt.spec.in | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 47bfec5..9c7b241 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -537,10 +537,12 @@ BuildRequires: cyrus-sasl-devel
 %if %{with_polkit}
     %if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
 BuildRequires: polkit-devel >= 0.112
-    %elif 0%{?fedora} >= 12 || 0%{?rhel} >= 6
-BuildRequires: polkit-devel >= 0.93
     %else
+        %if 0%{?fedora} >= 12 || 0%{?rhel} >= 6
+BuildRequires: polkit-devel >= 0.93
+        %else
 BuildRequires: PolicyKit-devel >= 0.6
+        %endif
     %endif
 %endif
 %if %{with_storage_fs}
@@ -702,10 +704,12 @@ Requires: avahi-libs
     %if %{with_polkit}
         %if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
 Requires: polkit >= 0.112
-        %elif 0%{?fedora} >= 12 || 0%{?rhel} >=6
-Requires: polkit >= 0.93
         %else
+            %if 0%{?fedora} >= 12 || 0%{?rhel} >=6
+Requires: polkit >= 0.93
+            %else
 Requires: PolicyKit >= 0.6
+            %endif
         %endif
     %endif
     %if %{with_cgconfig}
-- 
1.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]