]>
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 | |
ed3071d2 | 6 | Version: 1.1.8 |
01af9393 | 7 | Release: 4 |
01ea2d51 JK |
8 | License: GPL v2+; LGPL v2.1+ |
9 | Group: Applications/System | |
ed3071d2 JK |
10 | Source0: https://github.com/ClusterLabs/pacemaker/tarball/Pacemaker-1.1.8/Pacemaker-%{version}.tar.gz |
11 | # Source0-md5: 1bbd5b2282827bc1cf4e19620d606dc7 | |
0fe40bd1 | 12 | Source1: %{name}.tmpfiles |
d45bf2c6 JK |
13 | Source2: %{name}.init |
14 | Source3: %{name}.service | |
01ea2d51 | 15 | Patch0: %{name}-ncurses.patch |
6a94b894 | 16 | Patch1: %{name}-libs.patch |
2fd577e0 | 17 | Patch2: %{name}-stonithd_crash.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} |
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 | |
33 | BuildRequires: ncurses-devel | |
34 | BuildRequires: net-snmp-devel | |
35 | BuildRequires: pam-devel | |
36 | BuildRequires: pkgconfig | |
37 | BuildRequires: python-devel | |
07ce3f2c | 38 | BuildRequires: rpm-pythonprov |
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 | |
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 | |
ed3071d2 | 112 | %setup -qn ClusterLabs-pacemaker-1f8858c |
01ea2d51 | 113 | %patch0 -p1 |
6a94b894 | 114 | %patch1 -p1 |
2fd577e0 | 115 | %patch2 -p1 |
01ea2d51 JK |
116 | |
117 | %build | |
118 | %{__libtoolize} | |
ed3071d2 | 119 | %{__aclocal} -I m4 |
01ea2d51 JK |
120 | %{__autoconf} |
121 | %{__autoheader} | |
122 | %{__automake} | |
123 | ||
124 | %configure \ | |
da3fb05a JK |
125 | CPPFLAGS="%{rpmcppflags} %{?with_heartbeat:-I/usr/include/heartbeat}" \ |
126 | --with-heartbeat%{!?with_heartbeat:=no} \ | |
127 | --with-corosync%{!?with_corosync:=no} \ | |
01ea2d51 JK |
128 | --with-snmp \ |
129 | --with-esmtp \ | |
01af9393 | 130 | --with-acl \ |
66b40b4d | 131 | --with-initdir=/etc/rc.d/init.d \ |
01ea2d51 JK |
132 | --disable-fatal-warnings |
133 | ||
134 | %{__make} | |
135 | ||
136 | %install | |
137 | rm -rf $RPM_BUILD_ROOT | |
d45bf2c6 | 138 | install -d $RPM_BUILD_ROOT{/usr/lib/tmpfiles.d,/etc/rc.d/init.d,%{systemdunitdir}} |
01ea2d51 JK |
139 | |
140 | %{__make} install \ | |
141 | DESTDIR=$RPM_BUILD_ROOT | |
142 | ||
07ce3f2c | 143 | rm -r $RPM_BUILD_ROOT%{_docdir}/pacemaker |
01ea2d51 | 144 | |
0fe40bd1 | 145 | install %{SOURCE1} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf |
d45bf2c6 JK |
146 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
147 | install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service | |
0fe40bd1 | 148 | |
01ea2d51 JK |
149 | %clean |
150 | rm -rf $RPM_BUILD_ROOT | |
151 | ||
20da0353 JK |
152 | %pre |
153 | %groupadd -g 60 haclient | |
154 | %useradd -u 17 -d /var/lib/heartbeat/cores/hacluster -c "Heartbeat User" -g haclient hacluster | |
155 | ||
da3fb05a JK |
156 | %post corosync |
157 | /sbin/chkconfig --add %{name} | |
158 | %service %{name} restart "%{name} daemon" | |
159 | ||
160 | %systemd_post %{name}.service | |
161 | ||
162 | %preun | |
163 | if [ "$1" = "0" ]; then | |
164 | %service %{name} stop | |
165 | /sbin/chkconfig --del %{name} | |
166 | fi | |
167 | %systemd_preun %{name}.service | |
168 | ||
169 | %postun corosync | |
170 | %systemd_reload | |
171 | ||
172 | %post libs -p /sbin/ldconfig | |
173 | %postun libs -p /sbin/ldconfig | |
174 | ||
01ea2d51 JK |
175 | %files |
176 | %defattr(644,root,root,755) | |
da3fb05a | 177 | %doc doc/README* doc/*.html doc/*.txt AUTHORS COPYING* |
01ea2d51 | 178 | %{_datadir}/pacemaker |
da3fb05a JK |
179 | %dir %{_libdir}/%{name} |
180 | %attr(755,root,root) %{_libdir}/%{name}/attrd | |
181 | %attr(755,root,root) %{_libdir}/%{name}/cib | |
182 | %attr(755,root,root) %{_libdir}/%{name}/cibmon | |
183 | %attr(755,root,root) %{_libdir}/%{name}/crmd | |
ed3071d2 JK |
184 | %attr(755,root,root) %{_libdir}/%{name}/lrmd |
185 | %attr(755,root,root) %{_libdir}/%{name}/lrmd_test | |
da3fb05a JK |
186 | %attr(755,root,root) %{_libdir}/%{name}/pengine |
187 | %attr(755,root,root) %{_libdir}/%{name}/stonith-test | |
188 | %attr(755,root,root) %{_libdir}/%{name}/stonithd | |
da3fb05a JK |
189 | %attr(755,root,root) %{_bindir}/ccs2cib |
190 | %attr(755,root,root) %{_bindir}/ccs_flatten | |
191 | %attr(755,root,root) %{_bindir}/disable_rgmanager | |
192 | %attr(755,root,root) %{_sbindir}/attrd_updater | |
01ea2d51 JK |
193 | %attr(755,root,root) %{_sbindir}/cibadmin |
194 | %attr(755,root,root) %{_sbindir}/crm_attribute | |
195 | %attr(755,root,root) %{_sbindir}/crm_diff | |
ed3071d2 | 196 | %attr(755,root,root) %{_sbindir}/crm_error |
01ea2d51 JK |
197 | %attr(755,root,root) %{_sbindir}/crm_failcount |
198 | %attr(755,root,root) %{_sbindir}/crm_master | |
199 | %attr(755,root,root) %{_sbindir}/crm_mon | |
da3fb05a JK |
200 | %attr(755,root,root) %{_sbindir}/crm_node |
201 | %attr(755,root,root) %{_sbindir}/crm_report | |
01ea2d51 | 202 | %attr(755,root,root) %{_sbindir}/crm_resource |
da3fb05a JK |
203 | %attr(755,root,root) %{_sbindir}/crm_simulate |
204 | %attr(755,root,root) %{_sbindir}/crm_shadow | |
01ea2d51 | 205 | %attr(755,root,root) %{_sbindir}/crm_standby |
da3fb05a JK |
206 | %attr(755,root,root) %{_sbindir}/crm_ticket |
207 | %attr(755,root,root) %{_sbindir}/crm_uuid | |
01ea2d51 JK |
208 | %attr(755,root,root) %{_sbindir}/crm_verify |
209 | %attr(755,root,root) %{_sbindir}/crmadmin | |
da3fb05a JK |
210 | %attr(755,root,root) %{_sbindir}/fence_legacy |
211 | %attr(755,root,root) %{_sbindir}/fence_pcmk | |
01ea2d51 | 212 | %attr(755,root,root) %{_sbindir}/iso8601 |
da3fb05a | 213 | %attr(755,root,root) %{_sbindir}/stonith_admin |
69ee3b2e | 214 | %{py_sitedir}/cts |
9a170153 | 215 | %{_datadir}/snmp/mibs |
01ea2d51 | 216 | %{_mandir}/man8/*.8* |
da3fb05a | 217 | %{_mandir}/man7/*.7* |
01ea2d51 | 218 | %dir %attr(750,hacluster,haclient) %{_var}/run/crm |
b35e723c | 219 | %dir %{_prefix}/lib/ocf/resource.d/pacemaker |
220 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/ClusterMon | |
221 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/Dummy | |
222 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/HealthCPU | |
223 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/HealthSMART | |
224 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/Stateful | |
225 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/SysInfo | |
226 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/SystemHealth | |
227 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/controld | |
228 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/o2cb | |
229 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/ping | |
230 | %attr(755,root,root) %{_prefix}/lib/ocf/resource.d/pacemaker/pingd | |
0fe40bd1 | 231 | /usr/lib/tmpfiles.d/%{name}.conf |
ed3071d2 JK |
232 | %dir /var/lib/%{name} |
233 | %dir %attr(750,hacluster,haclient) /var/lib/%{name}/blackbox | |
234 | %dir %attr(750,hacluster,haclient) /var/lib/%{name}/cib | |
235 | %dir %attr(750,hacluster,haclient) /var/lib/%{name}/pengine | |
01ea2d51 JK |
236 | |
237 | %files libs | |
238 | %defattr(644,root,root,755) | |
239 | %attr(755,root,root) %{_libdir}/lib*.so.*.* | |
240 | %attr(755,root,root) %{_libdir}/lib*.so.[0-9] | |
241 | ||
da3fb05a JK |
242 | %if %{with heartbeat} |
243 | %files heartbeat | |
244 | %defattr(644,root,root,755) | |
da3fb05a JK |
245 | %attr(755,root,root) %{_libdir}/heartbeat/attrd |
246 | %attr(755,root,root) %{_libdir}/heartbeat/cib | |
247 | %attr(755,root,root) %{_libdir}/heartbeat/crmd | |
248 | %attr(755,root,root) %{_libdir}/heartbeat/pengine | |
249 | %attr(755,root,root) %{_libdir}/heartbeat/stonithd | |
da3fb05a JK |
250 | %endif |
251 | ||
252 | %if %{with corosync} | |
253 | %files corosync | |
254 | %defattr(644,root,root,755) | |
255 | %attr(755,root,root) %{_sbindir}/pacemakerd | |
256 | %attr(755,root,root) /etc/rc.d/init.d/%{name} | |
257 | %{systemdunitdir}/%{name}.service | |
da3fb05a JK |
258 | %endif |
259 | ||
01ea2d51 JK |
260 | %files devel |
261 | %defattr(644,root,root,755) | |
262 | %{_includedir}/pacemaker | |
01ea2d51 JK |
263 | %{_libdir}/*.so |
264 | %{_libdir}/*.la | |
da3fb05a | 265 | %{_pkgconfigdir}/*.pc |
01ea2d51 JK |
266 | |
267 | %files static | |
268 | %defattr(644,root,root,755) | |
269 | %{_libdir}/*.a |