]>
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 |
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 JK |
30 | BuildRequires: libesmtp-devel |
31 | BuildRequires: libtool | |
32 | BuildRequires: libxml2-devel | |
33 | BuildRequires: libxslt-devel | |
34 | BuildRequires: ncurses-devel | |
35 | BuildRequires: net-snmp-devel | |
36 | BuildRequires: pam-devel | |
37 | BuildRequires: pkgconfig | |
38 | BuildRequires: python-devel | |
07ce3f2c | 39 | BuildRequires: rpm-pythonprov |
01ea2d51 | 40 | BuildRequires: swig |
b35e723c | 41 | BuildRequires: pciutils-devel |
1b9d584d | 42 | BuildRequires: cluster-glue-libs-devel |
01ea2d51 | 43 | Requires: %{name}-libs = %{version}-%{release} |
20da0353 JK |
44 | Provides: group(haclient) |
45 | Provides: user(hacluster) | |
01ea2d51 JK |
46 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
47 | ||
da3fb05a JK |
48 | # Unresolved symbol in libpe_status.so.3.0.0: get_object_root |
49 | # not handled by -libs patch, as it is a circular dependency | |
50 | %define skip_post_check_so libpe_status.so.* | |
51 | ||
01ea2d51 JK |
52 | %description |
53 | Pacemaker makes use of your cluster infrastructure (either OpenAIS or | |
54 | Heartbeat) to stop, start and monitor the health of the services (aka. | |
55 | resources) you want the cluster to provide. | |
56 | ||
57 | It can do this for clusters of practically any size and comes with a | |
58 | powerful dependency model that allows the administrator to accurately | |
59 | express the relationships (both ordering and location) between the | |
60 | cluster resources. | |
61 | ||
62 | Pacemaker was formely a part of Heartbeat. | |
63 | ||
64 | %package libs | |
65 | Summary: Pacemaker libraries | |
66 | Group: Libraries | |
67 | ||
68 | %description libs | |
69 | Shared libraries for Pacemaker. | |
70 | ||
da3fb05a JK |
71 | %package heartbeat |
72 | Summary: Pacemaker for Heartbeat cluster | |
73 | Group: Applications/System | |
74 | Requires: heartbeat | |
75 | Obsoletes: %{name} < 1.1 | |
76 | Conflicts: heartbeat < 2.99.0 | |
77 | Requires: %{name} = %{version}-%{release} | |
78 | ||
79 | %description heartbeat | |
80 | This package allows using Pacemaker on a Heartbeat cluster. | |
81 | ||
82 | %package corosync | |
83 | Summary: Pacemaker for Corosync cluster | |
84 | Group: Applications/System | |
85 | Requires: corosync | |
86 | Requires: %{name} = %{version}-%{release} | |
87 | ||
88 | %description corosync | |
89 | This package allows using Pacemaker on a Corosync cluster. | |
90 | ||
01ea2d51 JK |
91 | %package devel |
92 | Summary: Header files for Pacemaker libraries | |
93 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek Pacemaker | |
94 | Group: Development/Libraries | |
95 | Requires: %{name}-libs = %{version}-%{release} | |
96 | ||
97 | %description devel | |
98 | Header files for Pacemaker libraries. | |
99 | ||
100 | %package static | |
101 | Summary: Static Pacemaker libraries | |
102 | Summary(pl.UTF-8): Statyczne biblioteki Pacemaker | |
103 | Group: Development/Libraries | |
104 | Requires: %{name}-devel = %{version}-%{release} | |
105 | ||
106 | %description static | |
107 | Static Pacemaker libraries. | |
108 | ||
109 | %prep | |
da3fb05a | 110 | %setup -qn ClusterLabs-pacemaker-b5b0a7b |
01ea2d51 | 111 | %patch0 -p1 |
6a94b894 | 112 | %patch1 -p1 |
6847cb86 | 113 | %patch2 -p1 |
01ea2d51 JK |
114 | |
115 | %build | |
116 | %{__libtoolize} | |
117 | %{__aclocal} | |
118 | %{__autoconf} | |
119 | %{__autoheader} | |
120 | %{__automake} | |
121 | ||
122 | %configure \ | |
da3fb05a JK |
123 | CPPFLAGS="%{rpmcppflags} %{?with_heartbeat:-I/usr/include/heartbeat}" \ |
124 | --with-heartbeat%{!?with_heartbeat:=no} \ | |
125 | --with-corosync%{!?with_corosync:=no} \ | |
01ea2d51 JK |
126 | --with-snmp \ |
127 | --with-esmtp \ | |
66b40b4d | 128 | --with-initdir=/etc/rc.d/init.d \ |
01ea2d51 JK |
129 | --disable-fatal-warnings |
130 | ||
131 | %{__make} | |
132 | ||
133 | %install | |
134 | rm -rf $RPM_BUILD_ROOT | |
da3fb05a | 135 | install -d $RPM_BUILD_ROOT{/usr/lib/tmpfiles.d,/etc/rc.d} |
01ea2d51 JK |
136 | |
137 | %{__make} install \ | |
138 | DESTDIR=$RPM_BUILD_ROOT | |
139 | ||
07ce3f2c | 140 | rm -r $RPM_BUILD_ROOT%{_docdir}/pacemaker |
c57367ae | 141 | rm $RPM_BUILD_ROOT%{_libdir}/heartbeat/plugins/RAExec/*.{la,a} |
01ea2d51 | 142 | |
0fe40bd1 JK |
143 | install %{SOURCE1} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf |
144 | ||
01ea2d51 JK |
145 | %clean |
146 | rm -rf $RPM_BUILD_ROOT | |
147 | ||
20da0353 JK |
148 | %pre |
149 | %groupadd -g 60 haclient | |
150 | %useradd -u 17 -d /var/lib/heartbeat/cores/hacluster -c "Heartbeat User" -g haclient hacluster | |
151 | ||
da3fb05a JK |
152 | %post corosync |
153 | /sbin/chkconfig --add %{name} | |
154 | %service %{name} restart "%{name} daemon" | |
155 | ||
156 | %systemd_post %{name}.service | |
157 | ||
158 | %preun | |
159 | if [ "$1" = "0" ]; then | |
160 | %service %{name} stop | |
161 | /sbin/chkconfig --del %{name} | |
162 | fi | |
163 | %systemd_preun %{name}.service | |
164 | ||
165 | %postun corosync | |
166 | %systemd_reload | |
167 | ||
168 | %post libs -p /sbin/ldconfig | |
169 | %postun libs -p /sbin/ldconfig | |
170 | ||
01ea2d51 JK |
171 | %files |
172 | %defattr(644,root,root,755) | |
da3fb05a | 173 | %doc doc/README* doc/*.html doc/*.txt AUTHORS COPYING* |
01ea2d51 | 174 | %{_datadir}/pacemaker |
da3fb05a JK |
175 | %dir %{_libdir}/%{name} |
176 | %attr(755,root,root) %{_libdir}/%{name}/attrd | |
177 | %attr(755,root,root) %{_libdir}/%{name}/cib | |
178 | %attr(755,root,root) %{_libdir}/%{name}/cibmon | |
179 | %attr(755,root,root) %{_libdir}/%{name}/crmd | |
180 | %attr(755,root,root) %{_libdir}/%{name}/hb2openais.sh | |
181 | %attr(755,root,root) %{_libdir}/%{name}/pengine | |
182 | %attr(755,root,root) %{_libdir}/%{name}/stonith-test | |
183 | %attr(755,root,root) %{_libdir}/%{name}/stonithd | |
184 | %{_libdir}/%{name}/*.py* | |
185 | %attr(755,root,root) %{_bindir}/ccs2cib | |
186 | %attr(755,root,root) %{_bindir}/ccs_flatten | |
187 | %attr(755,root,root) %{_bindir}/disable_rgmanager | |
188 | %attr(755,root,root) %{_sbindir}/attrd_updater | |
01ea2d51 | 189 | %attr(755,root,root) %{_sbindir}/cibadmin |
da3fb05a JK |
190 | %attr(755,root,root) %{_sbindir}/cibpipe |
191 | %attr(755,root,root) %{_sbindir}/crm | |
01ea2d51 JK |
192 | %attr(755,root,root) %{_sbindir}/crm_attribute |
193 | %attr(755,root,root) %{_sbindir}/crm_diff | |
194 | %attr(755,root,root) %{_sbindir}/crm_failcount | |
195 | %attr(755,root,root) %{_sbindir}/crm_master | |
196 | %attr(755,root,root) %{_sbindir}/crm_mon | |
da3fb05a JK |
197 | %attr(755,root,root) %{_sbindir}/crm_node |
198 | %attr(755,root,root) %{_sbindir}/crm_report | |
01ea2d51 | 199 | %attr(755,root,root) %{_sbindir}/crm_resource |
da3fb05a JK |
200 | %attr(755,root,root) %{_sbindir}/crm_simulate |
201 | %attr(755,root,root) %{_sbindir}/crm_shadow | |
01ea2d51 | 202 | %attr(755,root,root) %{_sbindir}/crm_standby |
da3fb05a JK |
203 | %attr(755,root,root) %{_sbindir}/crm_ticket |
204 | %attr(755,root,root) %{_sbindir}/crm_uuid | |
01ea2d51 JK |
205 | %attr(755,root,root) %{_sbindir}/crm_verify |
206 | %attr(755,root,root) %{_sbindir}/crmadmin | |
da3fb05a JK |
207 | %attr(755,root,root) %{_sbindir}/fence_legacy |
208 | %attr(755,root,root) %{_sbindir}/fence_pcmk | |
01ea2d51 | 209 | %attr(755,root,root) %{_sbindir}/iso8601 |
01ea2d51 | 210 | %attr(755,root,root) %{_sbindir}/ptest |
da3fb05a | 211 | %attr(755,root,root) %{_sbindir}/stonith_admin |
07ce3f2c | 212 | %{py_sitedir}/crm |
69ee3b2e | 213 | %{py_sitedir}/cts |
9a170153 | 214 | %{_datadir}/snmp/mibs |
01ea2d51 | 215 | %{_mandir}/man8/*.8* |
da3fb05a | 216 | %{_mandir}/man7/*.7* |
01ea2d51 JK |
217 | %dir %attr(750,hacluster,haclient) %{_var}/lib/pengine |
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 |
01ea2d51 JK |
232 | |
233 | %files libs | |
234 | %defattr(644,root,root,755) | |
235 | %attr(755,root,root) %{_libdir}/lib*.so.*.* | |
236 | %attr(755,root,root) %{_libdir}/lib*.so.[0-9] | |
237 | ||
da3fb05a JK |
238 | %if %{with heartbeat} |
239 | %files heartbeat | |
240 | %defattr(644,root,root,755) | |
241 | %dir %{_libdir}/heartbeat/plugins/RAExec | |
242 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/RAExec/*.so | |
243 | %attr(755,root,root) %{_libdir}/heartbeat/attrd | |
244 | %attr(755,root,root) %{_libdir}/heartbeat/cib | |
245 | %attr(755,root,root) %{_libdir}/heartbeat/crmd | |
246 | %attr(755,root,root) %{_libdir}/heartbeat/pengine | |
247 | %attr(755,root,root) %{_libdir}/heartbeat/stonithd | |
248 | %dir %attr(750,hacluster,haclient) %{_var}/lib/heartbeat/crm | |
249 | %endif | |
250 | ||
251 | %if %{with corosync} | |
252 | %files corosync | |
253 | %defattr(644,root,root,755) | |
254 | %attr(755,root,root) %{_sbindir}/pacemakerd | |
255 | %attr(755,root,root) /etc/rc.d/init.d/%{name} | |
256 | %{systemdunitdir}/%{name}.service | |
257 | %{_libdir}/lcrso/pacemaker.lcrso | |
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 |