[libvirt] [PATCH] build: Fix RPM build for non-x86 platforms

Viktor Mihajlovski mihajlov at linux.vnet.ibm.com
Wed Oct 31 21:21:06 UTC 2012


Make the post install script for the lock-sanlock package optional
to prevent break on non-x86 platforms.

Signed-off-by: Viktor Mihajlovski <mihajlov at linux.vnet.ibm.com>
---
 libvirt.spec.in |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 41d2628..f8ede3f 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1568,12 +1568,13 @@ fi
 /bin/systemctl try-restart libvirt-guests.service >/dev/null 2>&1 || :
 %endif
 
+%if %{with_sanlock}
 %post lock-sanlock
 if getent group sanlock > /dev/null ; then
     chmod 0770 %{_localstatedir}/lib/libvirt/sanlock
     chown root:sanlock %{_localstatedir}/lib/libvirt/sanlock
 fi
-
+%endif
 
 %files
 %defattr(-, root, root)
-- 
1.7.0.4




More information about the libvir-list mailing list