3 %bcond_without dlm_stonith # build without fencing helper
5 %define _snap 4283123f0b13eafc46d825050c5142cf44be79c3
6 Summary: General-purpose distributed lock manager
7 Summary(pl.UTF-8): Zarządca rozproszonych blokad ogólnego przeznaczenia
11 License: LGPL v2.1+, GPL v2
13 Source0: https://git.fedorahosted.org/cgit/dlm.git/snapshot/%{name}-%{_snap}.tar.bz2
14 # Source0-md5: 575174a0d7b0e1a6e45ec88f447c48cc
16 Source2: %{name}.sysconfig
17 Source3: %{name}.tmpfiles
19 Patch0: %{name}-systemd-configfs.patch
20 Patch1: old_udev_dir.patch
21 URL: http://sources.redhat.com/cluster/dlm/
22 BuildRequires: corosync-devel >= 2.0
23 %{?with_dlm_stonith:BuildRequires: libxml2-devel >= 2.0}
24 %{?with_dlm_stonith:BuildRequires: pacemaker-devel >= 1.1}
25 BuildRequires: pkgconfig
26 BuildRequires: rpmbuild(macros) >= 1.644
27 BuildRequires: systemd-devel
28 Requires: %{name}-libs = %{version}-%{release}
30 Requires: systemd-units >= 208-8
31 Requires(post,preun): /sbin/chkconfig
32 Obsoletes: cluster-dlm
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 The DLM lock manager is a kernel-based VMS-like distributed lock
37 manager. It is general purpose and not specific to only GFS or CLVM.
38 Kernel and userspace locking API's are available.
40 %description -l pl.UTF-8
41 Zarządca blokad DLM to oparty na jądrze zarządca rozproszonych blokad
42 w stylu VMS. Jest ogólnego przeznaczenia, przeznaczonym nie tylko dla
43 GFS-a czy CLVM-a. Dostępne są API blokowania w jądrze i przestrzeni
47 Summary: DLM libraries
48 Summary(pl.UTF-8): Biblioteki DLM
50 Obsoletes: cluster-dlm-libs
55 %description libs -l pl.UTF-8
59 Summary: Header files and development documentation for DLM
60 Summary(pl.UTF-8): Pliki nagłówkowe i dokumentacja programisty dla DLM-a
61 Group: Development/Libraries
62 Requires: %{name}-libs = %{version}-%{release}
63 Obsoletes: cluster-dlm-devel
66 Header files and development documentation for DLM.
68 %description devel -l pl.UTF-8
69 Pliki nagłówkowe i dokumentacja programisty dla DLM-a.
72 %setup -q -n %{name}-%{_snap}
84 HDRDIR=%{_includedir} \
85 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
87 %if %{with dlm_stonith}
94 HDRDIR=%{_includedir} \
95 CC="%{__cc} %{rpmcflags} %{rpmcppflags} %{rpmldflags}"
99 rm -rf $RPM_BUILD_ROOT
100 install -d $RPM_BUILD_ROOT{%{systemdunitdir},/etc/{rc.d/init.d,sysconfig}} \
101 $RPM_BUILD_ROOT%{_sysconfdir}/%{name} \
102 $RPM_BUILD_ROOT{/var/run/dlm,%{systemdtmpfilesdir}}
105 DESTDIR=$RPM_BUILD_ROOT \
111 HDRDIR=%{_includedir}
113 %if %{with dlm_stonith}
114 %{__make} -C fence install \
115 DESTDIR=$RPM_BUILD_ROOT \
121 HDRDIR=%{_includedir}
124 cp -p init/%{name}.service $RPM_BUILD_ROOT%{systemdunitdir}
125 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
126 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
127 cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdtmpfilesdir}/%{name}.conf
128 cp -p %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name}.conf
131 rm -rf $RPM_BUILD_ROOT
134 /sbin/chkconfig --add %{name}
135 %service %{name} restart
136 %systemd_post %{name}.service
139 if [ "$1" = "0" ]; then
140 %service -q %{name} stop
141 /sbin/chkconfig --del %{name}
143 %systemd_preun %{name}.service
148 %post libs -p /sbin/ldconfig
149 %postun libs -p /sbin/ldconfig
152 %defattr(644,root,root,755)
154 %{?with_dlm_stonith:%attr(755,root,root) %{_sbindir}/dlm_controld}
155 %attr(755,root,root) %{_sbindir}/dlm_stonith
156 %attr(755,root,root) %{_sbindir}/dlm_tool
157 %dir %{_sysconfdir}/%{name}
158 %verify(not md5 mtime size) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
159 /lib/udev/rules.d/51-dlm.rules
160 %attr(754,root,root) /etc/rc.d/init.d/%{name}
161 %verify(not md5 mtime size) %config(noreplace) /etc/sysconfig/%{name}
162 %{_mandir}/man8/dlm_*.8*
163 %{_mandir}/man5/dlm.conf.5*
164 %{systemdunitdir}/%{name}.service
165 %{systemdtmpfilesdir}/%{name}.conf
169 %defattr(644,root,root,755)
170 %attr(755,root,root) %{_libdir}/libdlm.so.3.*
171 %attr(755,root,root) %ghost %{_libdir}/libdlm.so.3
172 %attr(755,root,root) %{_libdir}/libdlm_lt.so.3.*
173 %attr(755,root,root) %ghost %{_libdir}/libdlm_lt.so.3
174 %attr(755,root,root) %{_libdir}/libdlmcontrol.so.3.*
175 %attr(755,root,root) %ghost %{_libdir}/libdlmcontrol.so.3
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_libdir}/libdlm.so
180 %attr(755,root,root) %{_libdir}/libdlm_lt.so
181 %attr(755,root,root) %{_libdir}/libdlmcontrol.so
182 %{_includedir}/libdlm.h
183 %{_includedir}/libdlmcontrol.h
184 %{_mandir}/man3/dlm_*.3*
185 %{_mandir}/man3/libdlm.3*
186 %{_pkgconfigdir}/libdlm.pc
187 %{_pkgconfigdir}/libdlm_lt.pc