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