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