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