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