]>
Commit | Line | Data |
---|---|---|
da3fb05a | 1 | # |
da3fb05a JK |
2 | %bcond_without corosync # build with corosync stack |
3 | %bcond_without heartbeat # build without heartbeat stack | |
01ea2d51 JK |
4 | Summary: The scalable High-Availability cluster resource manager |
5 | Name: pacemaker | |
1b4a22d1 | 6 | Version: 1.1.10 |
79e2c602 | 7 | Release: 1 |
01ea2d51 JK |
8 | License: GPL v2+; LGPL v2.1+ |
9 | Group: Applications/System | |
79e2c602 JK |
10 | Source0: https://github.com/ClusterLabs/pacemaker/archive/Pacemaker-%{version}.tar.gz |
11 | # Source0-md5: 532ec5d62b9437204a9f18fa3d5a89fc | |
0fe40bd1 | 12 | Source1: %{name}.tmpfiles |
d45bf2c6 JK |
13 | Source2: %{name}.init |
14 | Source3: %{name}.service | |
1b4a22d1 JK |
15 | Patch0: %{name}-automake.patch |
16 | Patch1: %{name}-manpage_xslt.patch | |
01ea2d51 | 17 | URL: http://clusterlabs.org/wiki/Main_Page |
da3fb05a | 18 | BuildRequires: asciidoc |
01ea2d51 JK |
19 | BuildRequires: autoconf |
20 | BuildRequires: automake | |
21 | BuildRequires: bzip2-devel | |
ed3071d2 | 22 | %{?with_corosync:BuildRequires: corosync-devel >= 2.0} |
7a65b1fb | 23 | BuildRequires: docbook-style-xsl |
01ea2d51 JK |
24 | BuildRequires: e2fsprogs-devel |
25 | BuildRequires: glib2-devel | |
26 | BuildRequires: gnutls-devel | |
d54f99ba | 27 | %{?with_heartbeat:BuildRequires: heartbeat-devel >= 3.0.5-6} |
01ea2d51 | 28 | BuildRequires: libesmtp-devel |
2949dbee | 29 | BuildRequires: libqb |
01ea2d51 JK |
30 | BuildRequires: libtool |
31 | BuildRequires: libxml2-devel | |
32 | BuildRequires: libxslt-devel | |
7a65b1fb | 33 | BuildRequires: libxslt-progs |
01ea2d51 JK |
34 | BuildRequires: ncurses-devel |
35 | BuildRequires: net-snmp-devel | |
36 | BuildRequires: pam-devel | |
37 | BuildRequires: pkgconfig | |
38 | BuildRequires: python-devel | |
07ce3f2c | 39 | BuildRequires: rpm-pythonprov |
7c510570 | 40 | BuildRequires: rpmbuild(macros) >= 1.644 |
01ea2d51 | 41 | BuildRequires: swig |
b35e723c | 42 | BuildRequires: pciutils-devel |
1b9d584d | 43 | BuildRequires: cluster-glue-libs-devel |
ed3071d2 | 44 | Requires: cluster-glue |
49485c8c | 45 | Requires: resource-agents |
01ea2d51 | 46 | Requires: %{name}-libs = %{version}-%{release} |
20da0353 JK |
47 | Provides: group(haclient) |
48 | Provides: user(hacluster) | |
ed3071d2 | 49 | Suggests: pacemaker-shell |
01ea2d51 JK |
50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
51 | ||
da3fb05a JK |
52 | # Unresolved symbol in libpe_status.so.3.0.0: get_object_root |
53 | # not handled by -libs patch, as it is a circular dependency | |
54 | %define skip_post_check_so libpe_status.so.* | |
55 | ||
01ea2d51 | 56 | %description |
d45bf2c6 JK |
57 | Pacemaker makes use of your cluster infrastructure (either |
58 | Corosync/OpenAIS or Heartbeat) to stop, start and monitor the health | |
59 | of the services (aka. resources) you want the cluster to provide. | |
01ea2d51 JK |
60 | |
61 | It can do this for clusters of practically any size and comes with a | |
62 | powerful dependency model that allows the administrator to accurately | |
63 | express the relationships (both ordering and location) between the | |
64 | cluster resources. | |
65 | ||
66 | Pacemaker was formely a part of Heartbeat. | |
67 | ||
68 | %package libs | |
69 | Summary: Pacemaker libraries | |
70 | Group: Libraries | |
71 | ||
72 | %description libs | |
73 | Shared libraries for Pacemaker. | |
74 | ||
da3fb05a JK |
75 | %package heartbeat |
76 | Summary: Pacemaker for Heartbeat cluster | |
77 | Group: Applications/System | |
78 | Requires: heartbeat | |
79 | Obsoletes: %{name} < 1.1 | |
80 | Conflicts: heartbeat < 2.99.0 | |
81 | Requires: %{name} = %{version}-%{release} | |
82 | ||
83 | %description heartbeat | |
84 | This package allows using Pacemaker on a Heartbeat cluster. | |
85 | ||
86 | %package corosync | |
87 | Summary: Pacemaker for Corosync cluster | |
88 | Group: Applications/System | |
89 | Requires: corosync | |
7c510570 | 90 | Requires: systemd-units >= 38 |
8a8116ff | 91 | %{?with_heartbeat:%requires_eq heartbeat-libs} |
da3fb05a JK |
92 | Requires: %{name} = %{version}-%{release} |
93 | ||
94 | %description corosync | |
95 | This package allows using Pacemaker on a Corosync cluster. | |
96 | ||
f4369631 JK |
97 | %package remote |
98 | Summary: Remote services manager for Pacemaker | |
99 | Group: Applications/System | |
100 | Requires: systemd-units >= 38 | |
101 | Requires: %{name} = %{version}-%{release} | |
102 | ||
103 | %description remote | |
104 | This package allows running Pacemaker-managed services on 'virtual' | |
105 | nodes without actual cluster stack. This is usefull to manage services | |
106 | in virtual machines or containers runnin on a Pacemaker cluster. | |
107 | ||
01ea2d51 JK |
108 | %package devel |
109 | Summary: Header files for Pacemaker libraries | |
110 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Pacemaker | |
111 | Group: Development/Libraries | |
112 | Requires: %{name}-libs = %{version}-%{release} | |
113 | ||
114 | %description devel | |
115 | Header files for Pacemaker libraries. | |
116 | ||
117 | %package static | |
118 | Summary: Static Pacemaker libraries | |
119 | Summary(pl.UTF-8): Statyczne biblioteki Pacemaker | |
120 | Group: Development/Libraries | |
121 | Requires: %{name}-devel = %{version}-%{release} | |
122 | ||
123 | %description static | |
124 | Static Pacemaker libraries. | |
125 | ||
126 | %prep | |
79e2c602 | 127 | %setup -qn pacemaker-Pacemaker-%{version} |
01ea2d51 | 128 | %patch0 -p1 |
9ab8266a | 129 | %patch1 -p1 |
01ea2d51 JK |
130 | |
131 | %build | |
132 | %{__libtoolize} | |
ed3071d2 | 133 | %{__aclocal} -I m4 |
01ea2d51 JK |
134 | %{__autoconf} |
135 | %{__autoheader} | |
136 | %{__automake} | |
137 | ||
138 | %configure \ | |
da3fb05a JK |
139 | CPPFLAGS="%{rpmcppflags} %{?with_heartbeat:-I/usr/include/heartbeat}" \ |
140 | --with-heartbeat%{!?with_heartbeat:=no} \ | |
141 | --with-corosync%{!?with_corosync:=no} \ | |
01ea2d51 JK |
142 | --with-snmp \ |
143 | --with-esmtp \ | |
01af9393 | 144 | --with-acl \ |
66b40b4d | 145 | --with-initdir=/etc/rc.d/init.d \ |
01ea2d51 JK |
146 | --disable-fatal-warnings |
147 | ||
148 | %{__make} | |
149 | ||
150 | %install | |
151 | rm -rf $RPM_BUILD_ROOT | |
d45bf2c6 | 152 | install -d $RPM_BUILD_ROOT{/usr/lib/tmpfiles.d,/etc/rc.d/init.d,%{systemdunitdir}} |
01ea2d51 JK |
153 | |
154 | %{__make} install \ | |
155 | DESTDIR=$RPM_BUILD_ROOT | |
156 | ||
07ce3f2c | 157 | rm -r $RPM_BUILD_ROOT%{_docdir}/pacemaker |
01ea2d51 | 158 | |
0fe40bd1 | 159 | install %{SOURCE1} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf |
d45bf2c6 JK |
160 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
161 | install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service | |
0fe40bd1 | 162 | |
01ea2d51 JK |
163 | %clean |
164 | rm -rf $RPM_BUILD_ROOT | |
165 | ||
20da0353 JK |
166 | %pre |
167 | %groupadd -g 60 haclient | |
168 | %useradd -u 17 -d /var/lib/heartbeat/cores/hacluster -c "Heartbeat User" -g haclient hacluster | |
169 | ||
da3fb05a JK |
170 | %post corosync |
171 | /sbin/chkconfig --add %{name} | |
172 | %service %{name} restart "%{name} daemon" | |
da3fb05a JK |
173 | %systemd_post %{name}.service |
174 | ||
175 | %preun | |
176 | if [ "$1" = "0" ]; then | |
177 | %service %{name} stop | |
178 | /sbin/chkconfig --del %{name} | |
179 | fi | |
7c510570 JK |
180 | |
181 | %preun corosync | |
da3fb05a JK |
182 | %systemd_preun %{name}.service |
183 | ||
184 | %postun corosync | |
185 | %systemd_reload | |
186 | ||
f4369631 JK |
187 | %post remote |
188 | /sbin/chkconfig --add pacemaker_remote | |
189 | %service pacemaker_remote restart "pacemaker_remote daemon" | |
190 | %systemd_post pacemaker_remote.service | |
191 | ||
192 | %preun remote | |
193 | %systemd_preun %{name}.service | |
194 | ||
195 | %postun remote | |
196 | %systemd_reload | |
197 | ||
da3fb05a JK |
198 | %post libs -p /sbin/ldconfig |
199 | %postun libs -p /sbin/ldconfig | |
200 | ||
01ea2d51 JK |
201 | %files |
202 | %defattr(644,root,root,755) | |
da3fb05a | 203 | %doc doc/README* doc/*.html doc/*.txt AUTHORS COPYING* |
01ea2d51 | 204 | %{_datadir}/pacemaker |
da3fb05a JK |
205 | %dir %{_libdir}/%{name} |
206 | %attr(755,root,root) %{_libdir}/%{name}/attrd | |
207 | %attr(755,root,root) %{_libdir}/%{name}/cib | |
208 | %attr(755,root,root) %{_libdir}/%{name}/cibmon | |
209 | %attr(755,root,root) %{_libdir}/%{name}/crmd | |
ed3071d2 JK |
210 | %attr(755,root,root) %{_libdir}/%{name}/lrmd |
211 | %attr(755,root,root) %{_libdir}/%{name}/lrmd_test | |
da3fb05a JK |
212 | %attr(755,root,root) %{_libdir}/%{name}/pengine |
213 | %attr(755,root,root) %{_libdir}/%{name}/stonith-test | |
214 | %attr(755,root,root) %{_libdir}/%{name}/stonithd | |
da3fb05a | 215 | %attr(755,root,root) %{_sbindir}/attrd_updater |
01ea2d51 JK |
216 | %attr(755,root,root) %{_sbindir}/cibadmin |
217 | %attr(755,root,root) %{_sbindir}/crm_attribute | |
218 | %attr(755,root,root) %{_sbindir}/crm_diff | |
ed3071d2 | 219 | %attr(755,root,root) %{_sbindir}/crm_error |
01ea2d51 JK |
220 | %attr(755,root,root) %{_sbindir}/crm_failcount |
221 | %attr(755,root,root) %{_sbindir}/crm_master | |
222 | %attr(755,root,root) %{_sbindir}/crm_mon | |
da3fb05a JK |
223 | %attr(755,root,root) %{_sbindir}/crm_node |
224 | %attr(755,root,root) %{_sbindir}/crm_report | |
01ea2d51 | 225 | %attr(755,root,root) %{_sbindir}/crm_resource |
da3fb05a JK |
226 | %attr(755,root,root) %{_sbindir}/crm_simulate |
227 | %attr(755,root,root) %{_sbindir}/crm_shadow | |
01ea2d51 | 228 | %attr(755,root,root) %{_sbindir}/crm_standby |
da3fb05a | 229 | %attr(755,root,root) %{_sbindir}/crm_ticket |
01ea2d51 JK |
230 | %attr(755,root,root) %{_sbindir}/crm_verify |
231 | %attr(755,root,root) %{_sbindir}/crmadmin | |
da3fb05a JK |
232 | %attr(755,root,root) %{_sbindir}/fence_legacy |
233 | %attr(755,root,root) %{_sbindir}/fence_pcmk | |
01ea2d51 | 234 | %attr(755,root,root) %{_sbindir}/iso8601 |
da3fb05a | 235 | %attr(755,root,root) %{_sbindir}/stonith_admin |
69ee3b2e | 236 | %{py_sitedir}/cts |
9a170153 | 237 | %{_datadir}/snmp/mibs |
f4369631 JK |
238 | %{_mandir}/man8/attrd_updater.8.gz |
239 | %{_mandir}/man8/cibadmin.8.gz | |
240 | %{_mandir}/man8/crm_attribute.8.gz | |
241 | %{_mandir}/man8/crm_diff.8.gz | |
242 | %{_mandir}/man8/crm_error.8.gz | |
243 | %{_mandir}/man8/crm_failcount.8.gz | |
244 | %{_mandir}/man8/crm_master.8.gz | |
245 | %{_mandir}/man8/crm_mon.8.gz | |
246 | %{_mandir}/man8/crm_node.8.gz | |
247 | %{_mandir}/man8/crm_report.8.gz | |
248 | %{_mandir}/man8/crm_resource.8.gz | |
249 | %{_mandir}/man8/crm_shadow.8.gz | |
250 | %{_mandir}/man8/crm_simulate.8.gz | |
251 | %{_mandir}/man8/crm_standby.8.gz | |
252 | %{_mandir}/man8/crm_ticket.8.gz | |
f4369631 JK |
253 | %{_mandir}/man8/crm_verify.8.gz |
254 | %{_mandir}/man8/crmadmin.8.gz | |
255 | %{_mandir}/man8/fence_legacy.8.gz | |
256 | %{_mandir}/man8/fence_pcmk.8.gz | |
257 | %{_mandir}/man8/iso8601.8.gz | |
258 | %{_mandir}/man8/stonith_admin.8.gz | |
da3fb05a | 259 | %{_mandir}/man7/*.7* |
01ea2d51 | 260 | %dir %attr(750,hacluster,haclient) %{_var}/run/crm |
b35e723c | 261 | %dir %{_prefix}/lib/ocf/resource.d/pacemaker |
262 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/ClusterMon | |
263 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/Dummy | |
264 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/HealthCPU | |
265 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/HealthSMART | |
266 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/Stateful | |
267 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/SysInfo | |
268 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/SystemHealth | |
269 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/controld | |
270 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/o2cb | |
271 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/ping | |
272 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/pingd | |
f4369631 | 273 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/remote |
0fe40bd1 | 274 | /usr/lib/tmpfiles.d/%{name}.conf |
ed3071d2 JK |
275 | %dir /var/lib/%{name} |
276 | %dir %attr(750,hacluster,haclient) /var/lib/%{name}/blackbox | |
277 | %dir %attr(750,hacluster,haclient) /var/lib/%{name}/cib | |
278 | %dir %attr(750,hacluster,haclient) /var/lib/%{name}/pengine | |
01ea2d51 JK |
279 | |
280 | %files libs | |
281 | %defattr(644,root,root,755) | |
282 | %attr(755,root,root) %{_libdir}/lib*.so.*.* | |
283 | %attr(755,root,root) %{_libdir}/lib*.so.[0-9] | |
284 | ||
f4369631 JK |
285 | %files remote |
286 | %defattr(644,root,root,755) | |
287 | %{_mandir}/man8/pacemaker_remoted.8.gz | |
288 | %attr(755,root,root) %{_sbindir}/pacemaker_remoted | |
289 | %attr(755,root,root) /etc/rc.d/init.d/pacemaker_remote | |
290 | %{systemdunitdir}/pacemaker_remote.service | |
291 | ||
da3fb05a JK |
292 | %if %{with heartbeat} |
293 | %files heartbeat | |
294 | %defattr(644,root,root,755) | |
7c4f002d | 295 | %attr(755,root,root) %{_sbindir}/crm_uuid |
da3fb05a JK |
296 | %attr(755,root,root) %{_libdir}/heartbeat/attrd |
297 | %attr(755,root,root) %{_libdir}/heartbeat/cib | |
298 | %attr(755,root,root) %{_libdir}/heartbeat/crmd | |
299 | %attr(755,root,root) %{_libdir}/heartbeat/pengine | |
300 | %attr(755,root,root) %{_libdir}/heartbeat/stonithd | |
7c4f002d | 301 | %{_mandir}/man8/crm_uuid.8.gz |
da3fb05a JK |
302 | %endif |
303 | ||
304 | %if %{with corosync} | |
305 | %files corosync | |
306 | %defattr(644,root,root,755) | |
f4369631 | 307 | %{_mandir}/man8/pacemakerd.8.gz |
da3fb05a JK |
308 | %attr(755,root,root) %{_sbindir}/pacemakerd |
309 | %attr(755,root,root) /etc/rc.d/init.d/%{name} | |
310 | %{systemdunitdir}/%{name}.service | |
da3fb05a JK |
311 | %endif |
312 | ||
01ea2d51 JK |
313 | %files devel |
314 | %defattr(644,root,root,755) | |
315 | %{_includedir}/pacemaker | |
01ea2d51 JK |
316 | %{_libdir}/*.so |
317 | %{_libdir}/*.la | |
da3fb05a | 318 | %{_pkgconfigdir}/*.pc |
01ea2d51 JK |
319 | |
320 | %files static | |
321 | %defattr(644,root,root,755) | |
322 | %{_libdir}/*.a |