]>
Commit | Line | Data |
---|---|---|
fe259927 ER |
1 | # NOTE: |
2 | # - In post-2.1.4 releases, Linux-HA code is packaged in three different | |
3 | # sub-projects, leading to three separate tarballs for each release: one for | |
4 | # Heartbeat, one for Cluster Glue, and one for the Resource Agents. The three | |
5 | # projects have separate release cycles, a release for one sub-project may or | |
6 | # may not coincide with that of another. | |
7 | # The former Heartbeat CRM is now maintained as the Pacemaker project, also | |
8 | # on its own release cycle. | |
9 | # TODO | |
10 | # - from above note: Cluster Glue, Resource Agents, Heartbeat CRM packages | |
11 | # - resource agent patch: heartbeat-no_ipmilan_test.patch | |
12 | # - merge mibs supackage from 2.1 branch | |
13 | # - cleanup deps, users for 3.x | |
14 | # - fixup deps, inner deps, think of subpackages, ugprade path from 2.1 | |
fd8ad474 | 15 | # - keep /etc/ha.d/resource.d in resource-agents, not here |
288e7c20 | 16 | # |
9b9d4954 | 17 | %include /usr/lib/rpm/macros.perl |
fe259927 | 18 | %define subver rc2 |
e7ce3187 | 19 | %define rel 0.2 |
dba30e8d | 20 | Summary: Heartbeat - subsystem for High-Availability Linux |
38bf5a19 ER |
21 | Summary(es.UTF-8): Subsistema heartbeat para Linux "High-Availability" |
22 | Summary(pl.UTF-8): Podsystem heartbeat dla systemów o podwyższonej niezawodności | |
23 | Summary(pt_BR.UTF-8): Implementa sistema de monitoração (heartbeats) visando Alta Disponibilidade | |
49245a93 | 24 | Name: heartbeat |
fe259927 ER |
25 | Version: 3.0.2 |
26 | Release: 0.%{subver}.%{rel} | |
0149c089 | 27 | License: GPL v2+ |
dba30e8d | 28 | Group: Applications/System |
fe259927 ER |
29 | Source0: http://www.linux-ha.org/w/images/3/32/Heartbeat-%{version}-%{subver}.tar.bz2 |
30 | # Source0-md5: 3c45d668ebb9f964caa1b40fd0808745 | |
80a56156 | 31 | Source1: %{name}.init |
43707702 | 32 | Patch0: %{name}-ac.patch |
253e454e | 33 | URL: http://www.linux-ha.org/Heartbeat |
9b9d4954 | 34 | BuildRequires: OpenIPMI-devel >= 2.0.3 |
be5c114d JB |
35 | BuildRequires: autoconf |
36 | BuildRequires: automake | |
fe259927 | 37 | BuildRequires: cluster-glue-libs-devel |
7013fb11 | 38 | BuildRequires: docbook-dtd44-xml |
39 | BuildRequires: docbook-style-xsl | |
80a56156 | 40 | BuildRequires: gdbm-devel |
41 | BuildRequires: glib2-devel | |
7013fb11 | 42 | BuildRequires: glibc-misc |
e4375587 | 43 | BuildRequires: gnutls-devel |
be5c114d | 44 | BuildRequires: libltdl-devel |
8c7f88c8 | 45 | BuildRequires: libnet-devel >= 1.1.0 |
0eec7f7b | 46 | BuildRequires: libnl-devel |
be5c114d | 47 | BuildRequires: libtool |
80a56156 | 48 | BuildRequires: libuuid-devel |
49 | BuildRequires: libwrap-devel | |
5cabf613 | 50 | BuildRequires: libxml2-devel |
7013fb11 | 51 | BuildRequires: libxslt-progs |
43707702 | 52 | BuildRequires: lm_sensors-devel |
ecdd12e5 | 53 | BuildRequires: ncurses-devel >= 5.4 |
38cf68bf | 54 | BuildRequires: net-snmp-devel >= 5.1 |
e4375587 | 55 | BuildRequires: pam-devel |
80a56156 | 56 | BuildRequires: pkgconfig |
e4375587 | 57 | BuildRequires: python-devel |
9b9d4954 | 58 | BuildRequires: rpm-perlprov |
43707702 | 59 | BuildRequires: rpm-pythonprov |
89b00739 | 60 | BuildRequires: rpmbuild(macros) >= 1.268 |
1a1643fc | 61 | BuildRequires: swig-perl >= 1.3.25 |
45cd814e | 62 | BuildRequires: swig-python >= 1.3.25 |
86e3ff4a | 63 | Requires: %{name}-libs = %{version}-%{release} |
e7ce3187 | 64 | Requires: cluster-glue |
d503e966 | 65 | Requires: psmisc >= 22.5-2 |
89b00739 | 66 | Requires: rc-scripts |
7013fb11 | 67 | Requires: resource-agents |
4eef1bae | 68 | Requires: syslogdaemon |
b52d72b7 | 69 | Requires: which |
cb667f50 JB |
70 | # disappeared |
71 | Obsoletes: perl-heartbeat | |
c8d761f0 | 72 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
8c7f88c8 ER |
73 | |
74 | %define specflags -fgnu89-inline | |
75 | %define filterout_ld -Wl,--as-needed | |
814ecbcd | 76 | |
8060f5e4 | 77 | %description |
49245a93 MP |
78 | heartbeat is a basic heartbeat subsystem for Linux-HA. It will run |
79 | scripts at initialization, and when machines go up or down. This | |
80 | version will also perform IP address takeover using gratuitous ARPs. | |
81 | It works correctly for a 2-node configuration, and is extensible to | |
82 | larger configurations. | |
8060f5e4 | 83 | |
6585451e | 84 | It implements the following kinds of heartbeats: |
49245a93 MP |
85 | - Bidirectional Serial Rings ("raw" serial ports) |
86 | ||
48caa1d6 JR |
87 | %description -l es.UTF-8 |
88 | heartbeat es un sistema básico para Linux-HA. La función de este | |
89 | software es ejecutar scripts en la inicialización y al apagar las | |
90 | máquinas que lo utilizan. | |
91 | ||
92 | %description -l pl.UTF-8 | |
93 | heartbeat jest podstawowym podsystemem dla systemów o podwyższonej | |
94 | dostępności budowanych w oparciu o Linuksa. Zajmuje się uruchamianiem | |
95 | skryptów podczas startu i zamykania systemu. Ta wersja pakietu pozwala | |
96 | na przejmowanie adresów IP. Oprogramowanie działa poprawnie dla | |
97 | konfiguracji składającej się z 2 hostów, można je również stosować do | |
49245a93 | 98 | bardziej skomplikowanych konfiguracji. |
814ecbcd | 99 | |
d709f63f JK |
100 | %package libs |
101 | Summary: Heartbeat libraries | |
102 | Summary(pl.UTF-8): Biblioteki heartbeat | |
103 | Group: Libraries | |
86e3ff4a | 104 | Conflicts: heartbeat < 2.99.2-0.1 |
d709f63f JK |
105 | |
106 | %description libs | |
107 | Heartbeat libraries. | |
108 | ||
109 | %description libs -l pl.UTF-8 | |
110 | Biblioteki heartbeat. | |
111 | ||
80a56156 | 112 | %package devel |
2dbb1cca | 113 | Summary: Heartbeat developement header files and libraries |
38bf5a19 | 114 | Summary(pl.UTF-8): Pliki nagłówkowe i biblioteki heartbeat |
ae97f5d3 | 115 | Group: Development/Libraries |
d709f63f | 116 | Requires: %{name}-libs = %{version}-%{release} |
80a56156 | 117 | |
118 | %description devel | |
2dbb1cca | 119 | Heartbeat developement header files and libraries. |
ae97f5d3 | 120 | |
48caa1d6 JR |
121 | %description devel -l pl.UTF-8 |
122 | Pliki nagłówkowe i biblioteki heartbeat. | |
80a56156 | 123 | |
124 | %package static | |
2dbb1cca | 125 | Summary: Heartbeat static libraries |
38bf5a19 | 126 | Summary(pl.UTF-8): Biblioteki statyczne heartbeat |
ae97f5d3 JB |
127 | Group: Development/Libraries |
128 | Requires: %{name}-devel = %{version}-%{release} | |
129 | ||
80a56156 | 130 | %description static |
2dbb1cca | 131 | Heartbeat static libraries. |
80a56156 | 132 | |
48caa1d6 | 133 | %description static -l pl.UTF-8 |
2dbb1cca | 134 | Biblioteki statyczne heartbeat. |
dba30e8d | 135 | |
9b9d4954 | 136 | %package cts |
137 | Summary: Cluster Test Suite | |
38bf5a19 | 138 | Summary(pl.UTF-8): Zestaw testów klastra |
9b9d4954 | 139 | Group: Applications/System |
140 | Requires: %{name} = %{version}-%{release} | |
141 | ||
142 | %description cts | |
143 | Cluster Test Suite for heartbeat. | |
144 | ||
48caa1d6 JR |
145 | %description cts -l pl.UTF-8 |
146 | Zestaw testów klastra opartego o heartbeat. | |
9b9d4954 | 147 | |
6585451e | 148 | %prep |
fe259927 | 149 | %setup -qn %{name}-%{version}-%{subver} |
38cf68bf | 150 | %patch0 -p1 |
be5c114d JB |
151 | rm -rf libltdl |
152 | ||
6585451e | 153 | %build |
be5c114d JB |
154 | %{__libtoolize} --ltdl |
155 | %{__aclocal} | |
156 | %{__autoconf} | |
4a602b4b | 157 | %{__autoheader} |
be5c114d JB |
158 | %{__automake} |
159 | %configure \ | |
80a56156 | 160 | --with-initdir=/etc/rc.d/init.d \ |
fe259927 | 161 | --docdir=%{_docdir}/%{name}-%{version} \ |
253e454e | 162 | --enable-fatal-warnings=no \ |
e4375587 | 163 | --enable-mgmt \ |
335d776e | 164 | --enable-quorumd \ |
43707702 | 165 | --enable-snmp-subagent |
be5c114d | 166 | |
49245a93 | 167 | %{__make} |
dba30e8d | 168 | |
814ecbcd | 169 | %install |
49245a93 | 170 | rm -rf $RPM_BUILD_ROOT |
b38331b3 | 171 | %{__make} -j1 install \ |
be5c114d | 172 | DESTDIR=$RPM_BUILD_ROOT |
78882913 | 173 | |
fe259927 | 174 | install -d $RPM_BUILD_ROOT/var/run/heartbeat |
814ecbcd | 175 | |
84d8fd23 | 176 | # plugins are lt_dlopened, but using *.so names, so *.la are not used |
fe259927 | 177 | rm -f $RPM_BUILD_ROOT%{_libdir}/heartbeat/plugins/*/*.{la,a} |
814ecbcd | 178 | |
80a56156 | 179 | rm -f $RPM_BUILD_ROOT/etc/rc.d/init.d/heartbeat |
fe259927 | 180 | install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/heartbeat |
80a56156 | 181 | |
182 | > $RPM_BUILD_ROOT/etc/ha.d/haresources | |
183 | echo -e "auth 2\n2 crc" > $RPM_BUILD_ROOT/etc/ha.d/authkeys | |
fe259927 | 184 | cp -a doc/ha.cf $RPM_BUILD_ROOT/etc/ha.d |
80a56156 | 185 | |
fe259927 ER |
186 | for tool in hb_addnode hb_delnode hb_standby hb_takeover; do |
187 | tool=%{_datadir}/%{name}/$tool | |
188 | [ -x $RPM_BUILD_ROOT$tool ] || exit 1 | |
189 | ln -s $tool $RPM_BUILD_ROOT%{_bindir} | |
288e7c20 JK |
190 | done |
191 | ||
fe259927 ER |
192 | rm $RPM_BUILD_ROOT%{_datadir}/heartbeat/cts/README |
193 | ||
288e7c20 JK |
194 | sed -i -e's, /%{_lib}/libpam.la, /usr/%{_lib}/libpam.la,g' $RPM_BUILD_ROOT%{_libdir}/*.la |
195 | ||
6585451e | 196 | %clean |
6585451e | 197 | rm -rf $RPM_BUILD_ROOT |
6585451e | 198 | |
dba30e8d JB |
199 | %post |
200 | /sbin/chkconfig --add heartbeat | |
fe259927 | 201 | %service heartbeat restart |
6585451e | 202 | |
6585451e | 203 | %preun |
dba30e8d | 204 | if [ "$1" = "0" ]; then |
fe259927 | 205 | %service -q heartbeat stop |
dba30e8d | 206 | /sbin/chkconfig --del heartbeat |
6585451e | 207 | fi |
dba30e8d | 208 | |
fe259927 ER |
209 | %post libs -p /sbin/ldconfig |
210 | %postun libs -p /sbin/ldconfig | |
ae97f5d3 | 211 | |
335d776e | 212 | %files |
78882913 | 213 | %defattr(644,root,root,755) |
fe259927 | 214 | %doc doc/{*.html,AUTHORS,apphbd.cf,authkeys,ha.cf,haresources,startstop} |
84d8fd23 | 215 | %dir %{_libdir}/heartbeat |
84d8fd23 JB |
216 | %dir %{_libdir}/heartbeat/plugins |
217 | %dir %{_libdir}/heartbeat/plugins/* | |
218 | %attr(755,root,root) %{_libdir}/heartbeat/plugins/*/*.so | |
931cb2c1 JB |
219 | %attr(755,root,root) %{_libdir}/heartbeat/[!cp]* |
220 | %attr(755,root,root) %{_libdir}/heartbeat/c[!t]* | |
288e7c20 JK |
221 | %dir %{_datadir}/heartbeat |
222 | %attr(755,root,root) %{_datadir}/heartbeat/BasicSanityCheck | |
223 | %attr(755,root,root) %{_datadir}/heartbeat/ResourceManager | |
288e7c20 JK |
224 | %attr(755,root,root) %{_datadir}/heartbeat/TestHeartbeatComm |
225 | %attr(755,root,root) %{_datadir}/heartbeat/ha_* | |
226 | %attr(755,root,root) %{_datadir}/heartbeat/hb_* | |
288e7c20 JK |
227 | %attr(755,root,root) %{_datadir}/heartbeat/mach_down |
228 | %attr(755,root,root) %{_datadir}/heartbeat/req_resource | |
84d8fd23 JB |
229 | %attr(755,root,root) %{_sysconfdir}/ha.d/rc.d |
230 | %attr(755,root,root) %{_sysconfdir}/ha.d/resource.d | |
231 | %{_sysconfdir}/ha.d/README.config | |
232 | %attr(755,root,root) %{_sysconfdir}/ha.d/harc | |
80a56156 | 233 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/heartbeat |
84d8fd23 | 234 | %attr(754,root,root) /etc/rc.d/init.d/heartbeat |
9b9d4954 | 235 | %dir /var/run/heartbeat |
288e7c20 | 236 | %attr(750,hacluster,haclient) %dir /var/run/heartbeat/ccm |
288e7c20 | 237 | %dir /var/lib/heartbeat |
80a56156 | 238 | %{_mandir}/man1/*.1* |
2dbb1cca | 239 | %{_mandir}/man8/[a-h]*.8* |
fe259927 ER |
240 | %{_mandir}/man5/authkeys.5* |
241 | %{_mandir}/man5/ha.cf.5* | |
d2309f7c JB |
242 | %attr(755,root,root) %{_bindir}/cl_respawn |
243 | %attr(2755,root,haclient) %{_bindir}/cl_status | |
288e7c20 JK |
244 | %attr(755,root,root) %{_bindir}/hb_addnode |
245 | %attr(755,root,root) %{_bindir}/hb_delnode | |
246 | %attr(755,root,root) %{_bindir}/hb_standby | |
247 | %attr(755,root,root) %{_bindir}/hb_takeover | |
fe259927 ER |
248 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ha.d/haresources |
249 | %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ha.d/authkeys | |
250 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ha.d/ha.cf | |
80a56156 | 251 | |
d709f63f JK |
252 | %files libs |
253 | %defattr(644,root,root,755) | |
fe259927 ER |
254 | %attr(755,root,root) %{_libdir}/libapphb.so.*.*.* |
255 | %attr(755,root,root) %ghost %{_libdir}/libapphb.so.2 | |
256 | %attr(755,root,root) %{_libdir}/libccmclient.so.*.*.* | |
257 | %attr(755,root,root) %ghost %{_libdir}/libccmclient.so.1 | |
258 | %attr(755,root,root) %{_libdir}/libclm.so.*.*.* | |
259 | %attr(755,root,root) %ghost %{_libdir}/libclm.so.1 | |
260 | %attr(755,root,root) %{_libdir}/libhbclient.so.*.*.* | |
261 | %attr(755,root,root) %ghost %{_libdir}/libhbclient.so.1 | |
d709f63f | 262 | |
80a56156 | 263 | %files devel |
264 | %defattr(644,root,root,755) | |
fe259927 ER |
265 | %{_includedir}/heartbeat |
266 | %{_includedir}/ocf | |
267 | %{_includedir}/saf | |
268 | %attr(755,root,root) %{_libdir}/libapphb.so | |
269 | %attr(755,root,root) %{_libdir}/libccmclient.so | |
270 | %attr(755,root,root) %{_libdir}/libclm.so | |
271 | %attr(755,root,root) %{_libdir}/libhbclient.so | |
272 | %{_libdir}/libapphb.la | |
273 | %{_libdir}/libccmclient.la | |
274 | %{_libdir}/libclm.la | |
275 | %{_libdir}/libhbclient.la | |
931cb2c1 | 276 | |
38cf68bf JB |
277 | %files static |
278 | %defattr(644,root,root,755) | |
fe259927 ER |
279 | %{_libdir}/libapphb.a |
280 | %{_libdir}/libccmclient.a | |
281 | %{_libdir}/libclm.a | |
282 | %{_libdir}/libhbclient.a | |
38cf68bf | 283 | |
9b9d4954 | 284 | %files cts |
285 | %defattr(644,root,root,755) | |
286 | %doc cts/README | |
288e7c20 JK |
287 | %dir %{_datadir}/heartbeat/cts |
288 | %attr(755,root,root) %{_datadir}/heartbeat/cts/*.py | |
289 | %{_datadir}/heartbeat/cts/*.py[co] | |
290 | %attr(755,root,root) %{_datadir}/heartbeat/cts/*.sh | |
291 | %attr(755,root,root) %{_datadir}/heartbeat/cts/*Dummy |