summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarian Csontos <mcsontos@redhat.com>2015-07-07 14:54:57 +0200
committerMarian Csontos <mcsontos@redhat.com>2015-07-07 14:54:57 +0200
commit9a5fd94da7bd4f55c87b2c04101657d3dfa8f8f9 (patch)
treecb37f3f1cdeadbdb4390a96eeab5aae293c9623d
parentb174c27d4dd0081396048102e0f6decb8cd569bd (diff)
downloadlvm2-dev-mcsontos-lockd-test.tar.gz
spec: Update to use enable_lockd_*dev-mcsontos-lockd-test
-rw-r--r--spec/build.inc5
-rw-r--r--spec/source.inc22
2 files changed, 25 insertions, 2 deletions
diff --git a/spec/build.inc b/spec/build.inc
index db9bcc2f6..94d5e06d3 100644
--- a/spec/build.inc
+++ b/spec/build.inc
@@ -7,7 +7,10 @@
%global enable_lvmpolld %(if echo %{services} | grep -q lvmpolld; then echo 1; else echo 0; fi)
%enableif %{enable_lvmpolld} lvmpolld
%global enable_lvmlockd %(if echo %{services} | grep -q lvmlockd; then echo 1; else echo 0; fi)
-%enableif %{enable_lvmlockd} lvmlockd
+%if %{enable_lvmlockd}
+%enableif %{enable_lockd_dlm} lockd-dlm
+%enableif %{enable_lockd_sanlock} lockd-sanlock
+%endif
%build
%configure \
diff --git a/spec/source.inc b/spec/source.inc
index 0a0d9e5a9..717ff66cb 100644
--- a/spec/source.inc
+++ b/spec/source.inc
@@ -8,6 +8,9 @@
%global enable_udev 1
%global enable_systemd 1
%global enable_cmirror 1
+#%global enable_lvmlockd 0
+#%global enable_lockd_dlm 0
+#%global enable_lockd_sanlock 0
%global buildreq_cluster corosync-devel >= 1.99.9-1, dlm-devel >= 3.99.1-1
%global req_cluster corosync >= 1.99.9-1, dlm >= 3.99.2-1
@@ -28,7 +31,22 @@
%service lvmpolld 1
%if %{fedora} >= 22 || %{rhel} >= 7
-%service lvmlockd 1
+ %service lvmlockd 1
+ %define sanlock_version 3.2.4-1
+ %define enable_lockd_dlm 1
+ %define enable_lockd_sanlock 1
+ %if %{rhel}
+ %ifarch i686 x86_64 s390x
+ %global buildreq_lockd_dlm dlm-devel >= %{dlm_version}
+ %else
+ %define enable_lockd_dlm 0
+ %endif
+ %ifarch x86_64 ppc64le ppc64 aarch64
+ %buildreq_lockd_sanlock sanlock-devel >= %{sanlock_version}
+ %else
+ %define enable_lockd_sanlock 0
+ %endif
+ %endif
%endif
##############################################################
@@ -109,6 +127,8 @@ BuildRequires: pkgconfig
%maybe BuildRequires: %{?buildreq_udev}
%maybe BuildRequires: %{?buildreq_cluster}
+%maybe BuildRequires: %{?buildreq_lockd_dlm}
+%maybe BuildRequires: %{?buildreq_lockd_sanlock}
%description
LVM2 includes all of the support for handling read/write operations on