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