From d9d47b7b88b47719ff972f27a448f9cdf6982c4a Mon Sep 17 00:00:00 2001 From: Marian Csontos Date: Tue, 7 Jul 2015 16:27:17 +0200 Subject: [PATCH] spec: Move lvm2-lockd into separate package --- spec/packages.inc | 52 ++++++++++++++++++++++++++++++++++++----------- 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/spec/packages.inc b/spec/packages.inc index ed02822a2..33dda2ed0 100644 --- a/spec/packages.inc +++ b/spec/packages.inc @@ -86,10 +86,6 @@ fi %if %{have_service lvmpolld} %{_sbindir}/lvmpolld %endif -%if %{have_service lvmlockd} - %{_sbindir}/lvmlockd - %{_sbindir}/lvmlockctl -%endif %if %{have_with cache} %{_mandir}/man7/lvmcache.7.gz %endif @@ -160,9 +156,6 @@ fi %{_mandir}/man8/lvmpolld.8.gz %{_mandir}/man8/lvm-lvpoll.8.gz %endif -%if %{have_service lvmlockd} - %{_mandir}/man8/lvmlockd.8.gz -%endif %dir %{_sysconfdir}/lvm %ghost %{_sysconfdir}/lvm/cache/.cache %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lvm/lvm.conf @@ -174,7 +167,6 @@ fi %dir %{_sysconfdir}/lvm/backup %dir %{_sysconfdir}/lvm/cache %dir %{_sysconfdir}/lvm/archive -%dir %{_default_locking_dir} %dir %{_default_run_dir} %if %{enable_systemd} %config(noreplace) %{_prefix}/lib/tmpfiles.d/%{name}.conf @@ -189,10 +181,6 @@ fi %{_unitdir}/lvm2-lvmpolld.service %{_unitdir}/lvm2-lvmpolld.socket %endif - %if %{have_service lvmlockd} - %{_unitdir}/lvm2-lvmlockd.service - %{_unitdir}/lvm2-lvmlocking.service - %endif %else %{_sysconfdir}/rc.d/init.d/lvm2-monitor %{_sysconfdir}/rc.d/init.d/blk-availability @@ -259,6 +247,46 @@ This package contains shared lvm2 libraries for applications. %{_libdir}/libdevmapper-event-lvm2snapshot.so %{_libdir}/libdevmapper-event-lvm2raid.so + +############################################################################## +# LVM locking daemon +############################################################################## +%if %{have_service lvmlockd} +%package lockd +Summary: LVM locking daemon +Group: System Environment/Base +Requires: lvm2 = %{version}-%{release} +%if %{enable_lockd_dlm} +Requires: dlm >= %{dlm_version} +%endif +%if %{enable_lockd_sanlock} +Requires: sanlock-lib >= %{sanlock_version} +%endif +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units + +%description lockd +LVM commands use lvmlockd to coordinate access to shared storage. + +%post lockd +%systemd_post lvm2-lvmlockd.service lvm2-lvmlocking.service + +%preun lockd +%systemd_preun lvm2-lvmlockd.service lvm2-lvmlocking.service + +%postun lockd +%systemd_postun lvm2-lvmlockd.service lvm2-lvmlocking.service + +%files lockd +%{_sbindir}/lvmlockd +%{_sbindir}/lvmlockctl +%{_mandir}/man8/lvmlockd.8.gz +%dir %{_default_locking_dir} +%{_unitdir}/lvm2-lvmlockd.service +%{_unitdir}/lvm2-lvmlocking.service +%endif + ############################################################################## # Cluster subpackage ##############################################################################