]> git.pld-linux.org Git - packages/heartbeat.git/blob - heartbeat.spec
- up to 1.99.5, many changes, start way to proper PLD reality
[packages/heartbeat.git] / heartbeat.spec
1 %include        /usr/lib/rpm/macros.perl
2 Summary:        Heartbeat - subsystem for High-Availability Linux
3 Summary(es):    Subsistema heartbeat para Linux "High-Availability"
4 Summary(pl):    Podsystem heartbeat dla systemów o podwy¿szonej niezawodno¶ci
5 Summary(pt_BR): Implementa sistema de monitoração (heartbeats) visando Alta Disponibilidade
6 Name:           heartbeat
7 Version:        1.99.5
8 Release:        0.2
9 License:        GPL v2+
10 Group:          Applications/System
11 Source0:        http://linux-ha.org/download/%{name}-%{version}.tar.gz
12 # Source0-md5:  808dd7884954553515757af6ad6dedb2
13 Source1:        %{name}.init
14 Source2:        ldirectord.init
15 URL:            http://linux-ha.org/
16 BuildRequires:  OpenIPMI-devel
17 BuildRequires:  autoconf
18 BuildRequires:  automake
19 BuildRequires:  gdbm-devel
20 BuildRequires:  glib2-devel
21 BuildRequires:  libnet-devel >= 1.1.0
22 BuildRequires:  libltdl-devel
23 BuildRequires:  libtool
24 BuildRequires:  libuuid-devel
25 BuildRequires:  libwrap-devel
26 BuildRequires:  libxml2-devel
27 BuildRequires:  net-snmp-devel
28 BuildRequires:  pkgconfig
29 BuildRequires:  rpm-devel
30 BuildRequires:  rpm-perlprov
31 BuildRequires:  rpmbuild(macros) >= 1.202
32 BuildRequires:  swig
33 PreReq:         rc-scripts
34 Requires(pre):  /usr/bin/getgid
35 Requires(pre):  /usr/sbin/groupadd
36 Requires(post,preun):   /sbin/chkconfig
37 Requires(post,postun):  /sbin/ldconfig
38 Requires(postun):       /usr/sbin/groupdel
39 Requires:       syslogdaemon
40 Provides:       group(haclient)
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %description
44 heartbeat is a basic heartbeat subsystem for Linux-HA. It will run
45 scripts at initialization, and when machines go up or down. This
46 version will also perform IP address takeover using gratuitous ARPs.
47 It works correctly for a 2-node configuration, and is extensible to
48 larger configurations.
49
50 It implements the following kinds of heartbeats:
51  - Bidirectional Serial Rings ("raw" serial ports)
52
53 %description -l es
54 heartbeat es un sistema básico para Linux-HA. La función de este
55 software es ejecutar scripts en la inicialización y al apagar las
56 máquinas que lo utilizan.
57
58 %description -l pl
59 heartbeat jest podstawowym podsystemem dla systemów o podwy¿szonej
60 dostêpno¶ci budowanych w oparciu o Linuksa. Zajmuje siê uruchamianiem
61 skryptów podczas startu i zamykania systemu. Ta wersja pakietu pozwala
62 na przejmowanie adresów IP. Oprogramowanie dzia³a poprawnie dla
63 konfiguracji sk³adaj±cej siê z 2 hostów, mo¿na je równie¿ stosowaæ do
64 bardziej skomplikowanych konfiguracji.
65
66 %package stonith
67 Summary: Provides an interface to Shoot The Other Node In The Head
68 Group: Utilities
69
70 %description stonith
71
72 %package ldirectord
73 Summary:        Monitor daemon for maintaining high availability resources
74 Group:          Utilities
75 PreReq:         rc-scripts
76 Requires(post,preun):   /sbin/chkconfig
77 Requires:       ipvsadm
78
79 %description ldirectord
80
81 %package devel
82 Summary:        -
83 Group:          Networking/Utilities
84
85 %description devel
86
87 %package static
88 Summary:        -
89 Group:          Networking/Utilities
90 %description static
91
92 #%package
93
94 %prep
95 %setup -q
96 #%%patch0 -p1
97
98 rm -rf libltdl
99
100 %build
101 %{__libtoolize} --ltdl
102 %{__aclocal}
103 %{__autoconf}
104 %{__automake}
105 %configure \
106         PING=/bin/ping \
107         MOUNT=/bin/mount \
108         FSCK=/sbin/fsck \
109         --with-initdir=/etc/rc.d/init.d \
110         --enable-lrm \
111         --enable-crm \
112         --enable-perl-vendor
113
114 %{__make}
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118
119 %{__make} install \
120         DESTDIR=$RPM_BUILD_ROOT
121
122 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d/ldirectord
123 ln -sf %{_sbindir}/ldirectord $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d/ldirectord
124
125 # plugins are lt_dlopened, but using *.so names, so *.la are not used
126 rm -f $RPM_BUILD_ROOT%{_libdir}/{heartbeat,pils,stonith}/plugins/*/*.{la,a}
127
128 rm -f $RPM_BUILD_ROOT/etc/rc.d/init.d/heartbeat
129 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/heartbeat
130
131 > $RPM_BUILD_ROOT/etc/ha.d/haresources
132 echo -e "auth 2\n2 crc" > $RPM_BUILD_ROOT/etc/ha.d/authkeys
133 install doc/ha.cf $RPM_BUILD_ROOT/etc/ha.d
134
135 rm -f $RPM_BUILD_ROOT/etc/rc.d/init.d/ldirectord
136 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/ldirectord
137 install ldirectord/ldirectord.cf $RPM_BUILD_ROOT%{_sysconfdir}/ha.d
138
139 %clean
140 rm -rf $RPM_BUILD_ROOT
141
142 %pre
143 %groupadd -g 60 haclient
144 %useradd -u 17 -d /var/lib/heartbeat/cores/hacluster -c "Heartbeat User" -g haclient hacluster
145
146 %post
147 /sbin/ldconfig
148 /sbin/chkconfig --add heartbeat
149
150 %preun
151 Uninstall_PPP_hack() {
152         file2hack=/etc/ppp/ip-up.local
153         echo "NOTE: Restoring /$file2hack"
154         MARKER="Heartbeat"
155         ed -s $file2hack <<-!EOF  2>/dev/null
156 H
157 g/ $MARKER\$/d
158 w
159 !EOF
160 }
161
162 if [ "$1" = "0" ]; then
163         /sbin/chkconfig --del heartbeat
164         if [ ! -x /etc/ppp/ip-up.heart ]; then
165                 Uninstall_PPP_hack
166         fi
167 fi
168
169 %postun
170 /sbin/ldconfig
171 if [ "$1" = "0" ]; then
172         %groupremove haclient
173 fi
174
175 %files
176 %defattr(644,root,root,755)
177 %doc doc/{*.html,AUTHORS,apphbd.cf,authkeys,ha.cf,haresources,startstop}
178 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
179 %dir %{_libdir}/heartbeat
180 %dir %{_libdir}/heartbeat/cts
181 %attr(755,root,root) %{_libdir}/heartbeat/cts/*.py
182 %dir %{_libdir}/heartbeat/plugins
183 %dir %{_libdir}/heartbeat/plugins/*
184 %attr(755,root,root) %{_libdir}/heartbeat/plugins/*/*.so
185 %attr(755,root,root) %{_libdir}/heartbeat/[!cp]*
186 %attr(755,root,root) %{_libdir}/heartbeat/c[!t]*
187 %dir %{_libdir}/pils
188 %dir %{_libdir}/pils/plugins
189 %dir %{_libdir}/pils/plugins/*
190 %attr(755,root,root) %{_libdir}/pils/plugins/*/*.so
191 %dir %{_sysconfdir}/ha.d
192 %attr(755,root,root) %{_sysconfdir}/ha.d/rc.d
193 %attr(755,root,root) %{_sysconfdir}/ha.d/resource.d
194 %{_sysconfdir}/ha.d/README.config
195 %attr(755,root,root) %{_sysconfdir}/ha.d/harc
196 %{_sysconfdir}/ha.d/shellfuncs
197 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/heartbeat
198 %attr(754,root,root) /etc/rc.d/init.d/heartbeat
199 %dir /var/lib/heartbeat
200 #%%attr(750,root,haclient) %dir /var/lib/heartbeat/api
201 #%%attr(1770,root,haclient) %dir /var/lib/heartbeat/casual
202 #%%attr(755,hacluster,haclient) %dir /var/lib/heartbeat/ccm
203 %attr(755,root,haclient) %dir /var/lib/heartbeat/ccm
204 #%%attr(755,root,haclient) %dir /var/lib/heartbeat/ckpt
205 #%%attr(600,root,root) /var/lib/heartbeat/fifo
206 %{_mandir}/man1/*.1*
207 %{_mandir}/man8/*.8*
208 /var/lib/heartbeat/cores
209 %attr(755,root,root)%{_bindir}/cl*
210 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/ha.d/haresources
211 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/ha.d/authkeys
212
213 %files stonith
214 %defattr(644,root,root,755)
215 %dir %{_libdir}/stonith
216 %dir %{_libdir}/stonith/plugins
217 %dir %{_libdir}/stonith/plugins/external
218 %dir %{_libdir}/stonith/plugins/stonith2
219 %{_libdir}/libstonith.so.*
220 %attr(755,root,root) %{_libdir}/stonith/plugins/stonith2/*.so
221 %attr(755,root,root) %{_sbindir}/meatclient
222 %attr(755,root,root) %{_sbindir}/stonith
223
224 %files ldirectord
225 %defattr(644,root,root,755)
226 %dir %{_sysconfdir}/ha.d/conf
227 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/ha.d/ldirectord.cf
228 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ldirectord
229 %attr(754,root,root) /etc/rc.d/init.d/ldirectord
230 %attr(755,root,root) %{_sbindir}/*ldirectord*
231 %{_mandir}/man8/*ldirectord*8.gz
232
233 %files devel
234 %defattr(644,root,root,755)
235 %{_includedir}
236 %{_libdir}/*.la
237
238 %files static
239 %defattr(644,root,root,755)
240 %{_libdir}/*.a
This page took 0.082684 seconds and 4 git commands to generate.