]>
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 | |
da3fb05a | 6 | Version: 1.1.7 |
d45bf2c6 | 7 | Release: 1.1 |
01ea2d51 JK |
8 | License: GPL v2+; LGPL v2.1+ |
9 | Group: Applications/System | |
da3fb05a JK |
10 | # https://github.com/ClusterLabs/pacemaker/tarball/Pacemaker-%{version} |
11 | Source0: ClusterLabs-pacemaker-Pacemaker-%{version}-0-gee0730e.tar.gz | |
12 | # Source0-md5: 61076a946cf2ba549dce1458e2ef76e2 | |
0fe40bd1 | 13 | Source1: %{name}.tmpfiles |
d45bf2c6 JK |
14 | Source2: %{name}.init |
15 | Source3: %{name}.service | |
01ea2d51 | 16 | Patch0: %{name}-ncurses.patch |
6a94b894 | 17 | Patch1: %{name}-libs.patch |
6847cb86 | 18 | Patch2: %{name}-awk.patch |
2949dbee | 19 | Patch3: %{name}-cs_quorum.patch |
01ea2d51 | 20 | URL: http://clusterlabs.org/wiki/Main_Page |
da3fb05a | 21 | BuildRequires: asciidoc |
01ea2d51 JK |
22 | BuildRequires: autoconf |
23 | BuildRequires: automake | |
24 | BuildRequires: bzip2-devel | |
07ce3f2c | 25 | %{?with_corosync:BuildRequires: corosync-devel} |
01ea2d51 JK |
26 | BuildRequires: e2fsprogs-devel |
27 | BuildRequires: glib2-devel | |
28 | BuildRequires: gnutls-devel | |
69ee3b2e | 29 | %{?with_heartbeat:BuildRequires: heartbeat-devel >= 2.99} |
01ea2d51 | 30 | BuildRequires: libesmtp-devel |
2949dbee | 31 | BuildRequires: libqb |
01ea2d51 JK |
32 | BuildRequires: libtool |
33 | BuildRequires: libxml2-devel | |
34 | BuildRequires: libxslt-devel | |
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 |
01ea2d51 | 41 | BuildRequires: swig |
b35e723c | 42 | BuildRequires: pciutils-devel |
1b9d584d | 43 | BuildRequires: cluster-glue-libs-devel |
49485c8c | 44 | Requires: resource-agents |
01ea2d51 | 45 | Requires: %{name}-libs = %{version}-%{release} |
20da0353 JK |
46 | Provides: group(haclient) |
47 | Provides: user(hacluster) | |
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 | |
88 | Requires: %{name} = %{version}-%{release} | |
89 | ||
90 | %description corosync | |
91 | This package allows using Pacemaker on a Corosync cluster. | |
92 | ||
01ea2d51 JK |
93 | %package devel |
94 | Summary: Header files for Pacemaker libraries | |
95 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Pacemaker | |
96 | Group: Development/Libraries | |
97 | Requires: %{name}-libs = %{version}-%{release} | |
98 | ||
99 | %description devel | |
100 | Header files for Pacemaker libraries. | |
101 | ||
102 | %package static | |
103 | Summary: Static Pacemaker libraries | |
104 | Summary(pl.UTF-8): Statyczne biblioteki Pacemaker | |
105 | Group: Development/Libraries | |
106 | Requires: %{name}-devel = %{version}-%{release} | |
107 | ||
108 | %description static | |
109 | Static Pacemaker libraries. | |
110 | ||
111 | %prep | |
da3fb05a | 112 | %setup -qn ClusterLabs-pacemaker-b5b0a7b |
01ea2d51 | 113 | %patch0 -p1 |
6a94b894 | 114 | %patch1 -p1 |
6847cb86 | 115 | %patch2 -p1 |
07a1bb37 | 116 | %if %{with corosync} |
2949dbee | 117 | %patch3 -p1 |
07a1bb37 | 118 | %endif |
01ea2d51 JK |
119 | |
120 | %build | |
121 | %{__libtoolize} | |
122 | %{__aclocal} | |
123 | %{__autoconf} | |
124 | %{__autoheader} | |
125 | %{__automake} | |
126 | ||
127 | %configure \ | |
da3fb05a JK |
128 | CPPFLAGS="%{rpmcppflags} %{?with_heartbeat:-I/usr/include/heartbeat}" \ |
129 | --with-heartbeat%{!?with_heartbeat:=no} \ | |
130 | --with-corosync%{!?with_corosync:=no} \ | |
01ea2d51 JK |
131 | --with-snmp \ |
132 | --with-esmtp \ | |
66b40b4d | 133 | --with-initdir=/etc/rc.d/init.d \ |
01ea2d51 JK |
134 | --disable-fatal-warnings |
135 | ||
136 | %{__make} | |
137 | ||
138 | %install | |
139 | rm -rf $RPM_BUILD_ROOT | |
d45bf2c6 | 140 | install -d $RPM_BUILD_ROOT{/usr/lib/tmpfiles.d,/etc/rc.d/init.d,%{systemdunitdir}} |
01ea2d51 JK |
141 | |
142 | %{__make} install \ | |
143 | DESTDIR=$RPM_BUILD_ROOT | |
144 | ||
07ce3f2c | 145 | rm -r $RPM_BUILD_ROOT%{_docdir}/pacemaker |
c57367ae | 146 | rm $RPM_BUILD_ROOT%{_libdir}/heartbeat/plugins/RAExec/*.{la,a} |
01ea2d51 | 147 | |
0fe40bd1 | 148 | install %{SOURCE1} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf |
d45bf2c6 JK |
149 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
150 | install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service | |
0fe40bd1 | 151 | |
01ea2d51 JK |
152 | %clean |
153 | rm -rf $RPM_BUILD_ROOT | |
154 | ||
20da0353 JK |
155 | %pre |
156 | %groupadd -g 60 haclient | |
157 | %useradd -u 17 -d /var/lib/heartbeat/cores/hacluster -c "Heartbeat User" -g haclient hacluster | |
158 | ||
da3fb05a JK |
159 | %post corosync |
160 | /sbin/chkconfig --add %{name} | |
161 | %service %{name} restart "%{name} daemon" | |
162 | ||
163 | %systemd_post %{name}.service | |
164 | ||
165 | %preun | |
166 | if [ "$1" = "0" ]; then | |
167 | %service %{name} stop | |
168 | /sbin/chkconfig --del %{name} | |
169 | fi | |
170 | %systemd_preun %{name}.service | |
171 | ||
172 | %postun corosync | |
173 | %systemd_reload | |
174 | ||
175 | %post libs -p /sbin/ldconfig | |
176 | %postun libs -p /sbin/ldconfig | |
177 | ||
01ea2d51 JK |
178 | %files |
179 | %defattr(644,root,root,755) | |
da3fb05a | 180 | %doc doc/README* doc/*.html doc/*.txt AUTHORS COPYING* |
01ea2d51 | 181 | %{_datadir}/pacemaker |
da3fb05a JK |
182 | %dir %{_libdir}/%{name} |
183 | %attr(755,root,root) %{_libdir}/%{name}/attrd | |
184 | %attr(755,root,root) %{_libdir}/%{name}/cib | |
185 | %attr(755,root,root) %{_libdir}/%{name}/cibmon | |
186 | %attr(755,root,root) %{_libdir}/%{name}/crmd | |
187 | %attr(755,root,root) %{_libdir}/%{name}/hb2openais.sh | |
188 | %attr(755,root,root) %{_libdir}/%{name}/pengine | |
189 | %attr(755,root,root) %{_libdir}/%{name}/stonith-test | |
190 | %attr(755,root,root) %{_libdir}/%{name}/stonithd | |
191 | %{_libdir}/%{name}/*.py* | |
192 | %attr(755,root,root) %{_bindir}/ccs2cib | |
193 | %attr(755,root,root) %{_bindir}/ccs_flatten | |
194 | %attr(755,root,root) %{_bindir}/disable_rgmanager | |
195 | %attr(755,root,root) %{_sbindir}/attrd_updater | |
01ea2d51 | 196 | %attr(755,root,root) %{_sbindir}/cibadmin |
da3fb05a JK |
197 | %attr(755,root,root) %{_sbindir}/cibpipe |
198 | %attr(755,root,root) %{_sbindir}/crm | |
01ea2d51 JK |
199 | %attr(755,root,root) %{_sbindir}/crm_attribute |
200 | %attr(755,root,root) %{_sbindir}/crm_diff | |
201 | %attr(755,root,root) %{_sbindir}/crm_failcount | |
202 | %attr(755,root,root) %{_sbindir}/crm_master | |
203 | %attr(755,root,root) %{_sbindir}/crm_mon | |
da3fb05a JK |
204 | %attr(755,root,root) %{_sbindir}/crm_node |
205 | %attr(755,root,root) %{_sbindir}/crm_report | |
01ea2d51 | 206 | %attr(755,root,root) %{_sbindir}/crm_resource |
da3fb05a JK |
207 | %attr(755,root,root) %{_sbindir}/crm_simulate |
208 | %attr(755,root,root) %{_sbindir}/crm_shadow | |
01ea2d51 | 209 | %attr(755,root,root) %{_sbindir}/crm_standby |
da3fb05a JK |
210 | %attr(755,root,root) %{_sbindir}/crm_ticket |
211 | %attr(755,root,root) %{_sbindir}/crm_uuid | |
01ea2d51 JK |
212 | %attr(755,root,root) %{_sbindir}/crm_verify |
213 | %attr(755,root,root) %{_sbindir}/crmadmin | |
da3fb05a JK |
214 | %attr(755,root,root) %{_sbindir}/fence_legacy |
215 | %attr(755,root,root) %{_sbindir}/fence_pcmk | |
01ea2d51 | 216 | %attr(755,root,root) %{_sbindir}/iso8601 |
01ea2d51 | 217 | %attr(755,root,root) %{_sbindir}/ptest |
da3fb05a | 218 | %attr(755,root,root) %{_sbindir}/stonith_admin |
07ce3f2c | 219 | %{py_sitedir}/crm |
69ee3b2e | 220 | %{py_sitedir}/cts |
9a170153 | 221 | %{_datadir}/snmp/mibs |
01ea2d51 | 222 | %{_mandir}/man8/*.8* |
da3fb05a | 223 | %{_mandir}/man7/*.7* |
01ea2d51 JK |
224 | %dir %attr(750,hacluster,haclient) %{_var}/lib/pengine |
225 | %dir %attr(750,hacluster,haclient) %{_var}/run/crm | |
b35e723c | 226 | %dir %{_prefix}/lib/ocf/resource.d/pacemaker |
227 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/ClusterMon | |
228 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/Dummy | |
229 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/HealthCPU | |
230 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/HealthSMART | |
231 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/Stateful | |
232 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/SysInfo | |
233 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/SystemHealth | |
234 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/controld | |
235 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/o2cb | |
236 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/ping | |
237 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/pingd | |
0fe40bd1 | 238 | /usr/lib/tmpfiles.d/%{name}.conf |
2b79a2a7 | 239 | %dir %attr(750,hacluster,haclient) %{_var}/lib/heartbeat/crm |
01ea2d51 JK |
240 | |
241 | %files libs | |
242 | %defattr(644,root,root,755) | |
243 | %attr(755,root,root) %{_libdir}/lib*.so.*.* | |
244 | %attr(755,root,root) %{_libdir}/lib*.so.[0-9] | |
245 | ||
da3fb05a JK |
246 | %if %{with heartbeat} |
247 | %files heartbeat | |
248 | %defattr(644,root,root,755) | |
249 | %dir %{_libdir}/heartbeat/plugins/RAExec | |
250 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/RAExec/*.so | |
251 | %attr(755,root,root) %{_libdir}/heartbeat/attrd | |
252 | %attr(755,root,root) %{_libdir}/heartbeat/cib | |
253 | %attr(755,root,root) %{_libdir}/heartbeat/crmd | |
254 | %attr(755,root,root) %{_libdir}/heartbeat/pengine | |
255 | %attr(755,root,root) %{_libdir}/heartbeat/stonithd | |
da3fb05a JK |
256 | %endif |
257 | ||
258 | %if %{with corosync} | |
259 | %files corosync | |
260 | %defattr(644,root,root,755) | |
261 | %attr(755,root,root) %{_sbindir}/pacemakerd | |
262 | %attr(755,root,root) /etc/rc.d/init.d/%{name} | |
263 | %{systemdunitdir}/%{name}.service | |
264 | %{_libdir}/lcrso/pacemaker.lcrso | |
265 | %endif | |
266 | ||
01ea2d51 JK |
267 | %files devel |
268 | %defattr(644,root,root,755) | |
269 | %{_includedir}/pacemaker | |
01ea2d51 JK |
270 | %{_libdir}/*.so |
271 | %{_libdir}/*.la | |
da3fb05a | 272 | %{_pkgconfigdir}/*.pc |
01ea2d51 JK |
273 | |
274 | %files static | |
275 | %defattr(644,root,root,755) | |
276 | %{_libdir}/*.a |