]> git.pld-linux.org Git - packages/heartbeat.git/blob - heartbeat.spec
- cl_status is expected to be sgid haclient
[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.4
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 Patch0:         %{name}-sh.patch
16 Patch1:         %{name}-ipmi.patch
17 Patch2:         %{name}-ac.patch
18 Patch3:         %{name}-chld.patch
19 URL:            http://linux-ha.org/
20 BuildRequires:  OpenIPMI-devel >= 2.0.0
21 BuildRequires:  autoconf
22 BuildRequires:  automake
23 BuildRequires:  gdbm-devel
24 BuildRequires:  glib2-devel
25 BuildRequires:  libnet-devel >= 1.1.0
26 BuildRequires:  libltdl-devel
27 BuildRequires:  libtool
28 BuildRequires:  libuuid-devel
29 BuildRequires:  libwrap-devel
30 BuildRequires:  libxml2-devel
31 BuildRequires:  net-snmp-devel >= 5.1
32 BuildRequires:  perl-devel >= 1:5.8.1
33 BuildRequires:  pkgconfig
34 BuildRequires:  rpm-devel
35 BuildRequires:  rpm-perlprov
36 BuildRequires:  rpmbuild(macros) >= 1.202
37 BuildRequires:  swig >= 1.3.19
38 PreReq:         rc-scripts
39 Requires(pre):  /bin/id
40 Requires(pre):  /usr/bin/getgid
41 Requires(pre):  /usr/sbin/groupadd
42 Requires(pre):  /usr/sbin/useradd
43 Requires(post,preun):   /sbin/chkconfig
44 Requires(post,postun):  /sbin/ldconfig
45 Requires(postun):       /usr/sbin/groupdel
46 Requires(postun):       /usr/sbin/userdel
47 Requires:       syslogdaemon
48 Provides:       group(haclient)
49 Provides:       user(hacluster)
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %description
53 heartbeat is a basic heartbeat subsystem for Linux-HA. It will run
54 scripts at initialization, and when machines go up or down. This
55 version will also perform IP address takeover using gratuitous ARPs.
56 It works correctly for a 2-node configuration, and is extensible to
57 larger configurations.
58
59 It implements the following kinds of heartbeats:
60  - Bidirectional Serial Rings ("raw" serial ports)
61
62 %description -l es
63 heartbeat es un sistema básico para Linux-HA. La función de este
64 software es ejecutar scripts en la inicialización y al apagar las
65 máquinas que lo utilizan.
66
67 %description -l pl
68 heartbeat jest podstawowym podsystemem dla systemów o podwy¿szonej
69 dostêpno¶ci budowanych w oparciu o Linuksa. Zajmuje siê uruchamianiem
70 skryptów podczas startu i zamykania systemu. Ta wersja pakietu pozwala
71 na przejmowanie adresów IP. Oprogramowanie dzia³a poprawnie dla
72 konfiguracji sk³adaj±cej siê z 2 hostów, mo¿na je równie¿ stosowaæ do
73 bardziej skomplikowanych konfiguracji.
74
75 %package stonith
76 Summary:        Provides an interface to Shoot The Other Node In The Head
77 Summary(pl):    Interfejs do "odstrzelenia" drugiego wêz³a w klastrze
78 Group:          Applications/System
79
80 %description stonith
81 Provides an interface to Shoot The Other Node In The Head.
82
83 %description stonith -l pl
84 STONITH (Shoot The Other Node In The Head) to interfejs s³u¿±cy do
85 "odstrzelenia" drugiego wêz³a w klastrze.
86
87 %package ldirectord
88 Summary:        Monitor virtual services provided by LVS
89 Summary(pl):    Demon monitoruj±cy wirtualne us³ugi dostarczane poprzez LVS
90 Group:          Applications/System
91 PreReq:         rc-scripts
92 Requires(post,preun):   /sbin/chkconfig
93 Requires:       ipvsadm
94
95 %description ldirectord
96 ldirectord is a stand-alone daemon to monitor services of real
97 for virtual services provided by The Linux Virtual Server
98 (http://www.linuxvirtualserver.org/).
99
100 %description ldirectord -l pl
101 ldirectord to samodzielny demon monitoruj±cy rzeczywiste us³ugi dla
102 wirtualnych us³ug dostarczanych poprzez Linux Virtual Server
103 (http://www.linuxvirtualserver.org/).
104
105 %package devel
106 Summary:        Heartbeat developement header files and libraries
107 Summary(pl):    Pliki nag³ówkowe i biblioteki heartbeat
108 Group:          Development/Libraries
109 Requires:       %{name} = %{version}-%{release}
110
111 %description devel
112 Heartbeat developement header files and libraries.
113
114 %description devel -l pl
115 Pliki nag³ówkowe i biblioteki heartbeat.
116
117 %package static
118 Summary:        Heartbeat static libraries
119 Summary(pl):    Biblioteki statyczne heartbeat
120 Group:          Development/Libraries
121 Requires:       %{name}-devel = %{version}-%{release}
122
123 %description static
124 Heartbeat static libraries.
125
126 %description -l static
127 Biblioteki statyczne heartbeat.
128
129 %package -n perl-heartbeat
130 Summary:        Perl binding for Heartbeat
131 Summary(pl):    Dowi±zania Perla dla Heartbeata
132 Group:          Development/Languages/Perl
133 Requires:       %{name} = %{version}-%{release}
134
135 %description -n perl-heartbeat
136 Perl binding for Heartbeat.
137
138 %description -n perl-heartbeat -l pl
139 Dowi±zania Perla dla Heartbeata.
140
141 %prep
142 %setup -q
143 %patch0 -p1
144 %patch1 -p1
145 %patch2 -p1
146 %patch3 -p1
147
148 rm -rf libltdl
149
150 %build
151 %{__libtoolize} --ltdl
152 %{__aclocal}
153 %{__autoconf}
154 %{__automake}
155 %configure \
156         PING=/bin/ping \
157         MOUNT=/bin/mount \
158         FSCK=/sbin/fsck \
159         --with-initdir=/etc/rc.d/init.d \
160         --enable-lrm \
161         --enable-crm \
162         --enable-perl-vendor
163
164 %{__make}
165
166 %install
167 rm -rf $RPM_BUILD_ROOT
168
169 %{__make} install \
170         DESTDIR=$RPM_BUILD_ROOT
171
172 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d/ldirectord
173 ln -sf %{_sbindir}/ldirectord $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d/ldirectord
174
175 # plugins are lt_dlopened, but using *.so names, so *.la are not used
176 rm -f $RPM_BUILD_ROOT%{_libdir}/{heartbeat,pils,stonith}/plugins/*/*.{la,a}
177
178 rm -f $RPM_BUILD_ROOT/etc/rc.d/init.d/heartbeat
179 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/heartbeat
180
181 > $RPM_BUILD_ROOT/etc/ha.d/haresources
182 echo -e "auth 2\n2 crc" > $RPM_BUILD_ROOT/etc/ha.d/authkeys
183 install doc/ha.cf $RPM_BUILD_ROOT/etc/ha.d
184
185 rm -f $RPM_BUILD_ROOT/etc/rc.d/init.d/ldirectord
186 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/ldirectord
187 install ldirectord/ldirectord.cf $RPM_BUILD_ROOT%{_sysconfdir}/ha.d
188
189 %clean
190 rm -rf $RPM_BUILD_ROOT
191
192 %pre
193 %groupadd -g 60 haclient
194 %useradd -u 17 -d /var/lib/heartbeat/cores/hacluster -c "Heartbeat User" -g haclient hacluster
195
196 %post
197 /sbin/ldconfig
198 /sbin/chkconfig --add heartbeat
199
200 %preun
201 Uninstall_PPP_hack() {
202         file2hack=/etc/ppp/ip-up.local
203         echo "NOTE: Restoring /$file2hack"
204         MARKER="Heartbeat"
205         ed -s $file2hack <<-!EOF 2>/dev/null
206 H
207 g/ $MARKER\$/d
208 w
209 !EOF
210 }
211
212 if [ "$1" = "0" ]; then
213         /sbin/chkconfig --del heartbeat
214         if [ ! -x /etc/ppp/ip-up.heart ]; then
215                 Uninstall_PPP_hack
216         fi
217 fi
218
219 %postun
220 /sbin/ldconfig
221 if [ "$1" = "0" ]; then
222         %userremove hacluster
223         %groupremove haclient
224 fi
225
226 %post   stonith -p /sbin/ldconfig
227 %postun stonith -p /sbin/ldconfig
228
229 %files
230 %defattr(644,root,root,755)
231 %doc doc/{*.html,AUTHORS,apphbd.cf,authkeys,ha.cf,haresources,startstop}
232 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
233 %dir %{_libdir}/heartbeat
234 %dir %{_libdir}/heartbeat/cts
235 %attr(755,root,root) %{_libdir}/heartbeat/cts/*.py
236 %dir %{_libdir}/heartbeat/plugins
237 %dir %{_libdir}/heartbeat/plugins/*
238 %attr(755,root,root) %{_libdir}/heartbeat/plugins/*/*.so
239 %attr(755,root,root) %{_libdir}/heartbeat/[!cp]*
240 %attr(755,root,root) %{_libdir}/heartbeat/c[!t]*
241 %attr(755,root,root) %{_libdir}/heartbeat/p[!l]*
242 %dir %{_libdir}/pils
243 %dir %{_libdir}/pils/plugins
244 %dir %{_libdir}/pils/plugins/*
245 %attr(755,root,root) %{_libdir}/pils/plugins/*/*.so
246 %dir %{_sysconfdir}/ha.d
247 %attr(755,root,root) %{_sysconfdir}/ha.d/rc.d
248 %attr(755,root,root) %{_sysconfdir}/ha.d/resource.d
249 %{_sysconfdir}/ha.d/README.config
250 %attr(755,root,root) %{_sysconfdir}/ha.d/harc
251 %{_sysconfdir}/ha.d/shellfuncs
252 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/heartbeat
253 %attr(754,root,root) /etc/rc.d/init.d/heartbeat
254 %attr(755,root,root) %{_libdir}/ocf
255 %dir /var/lib/heartbeat
256 #%%attr(750,root,haclient) %dir /var/lib/heartbeat/api
257 #%%attr(1770,root,haclient) %dir /var/lib/heartbeat/casual
258 #%%attr(755,hacluster,haclient) %dir /var/lib/heartbeat/ccm
259 %attr(755,root,haclient) %dir /var/lib/heartbeat/ccm
260 #%%attr(755,root,haclient) %dir /var/lib/heartbeat/ckpt
261 #%%attr(600,root,root) /var/lib/heartbeat/fifo
262 %{_mandir}/man1/*.1*
263 %{_mandir}/man8/[a-h]*.8*
264 /var/lib/heartbeat/cores
265 %attr(755,root,root) %{_bindir}/cl_respawn
266 %attr(2755,root,haclient) %{_bindir}/cl_status
267 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/ha.d/haresources
268 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/ha.d/authkeys
269 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/ha.d/ha.cf
270 %{_datadir}/snmp/mibs/*mib
271
272 %files stonith
273 %defattr(644,root,root,755)
274 %attr(755,root,root) %{_libdir}/libstonith.so.*.*.*
275 %dir %{_libdir}/stonith
276 %dir %{_libdir}/stonith/plugins
277 %dir %{_libdir}/stonith/plugins/external
278 %dir %{_libdir}/stonith/plugins/stonith2
279 %attr(755,root,root) %{_libdir}/stonith/plugins/*/*
280 %attr(755,root,root) %{_sbindir}/meatclient
281 %attr(755,root,root) %{_sbindir}/stonith
282 %{_mandir}/man8/stonith.8*
283 %{_mandir}/man8/meatclient.8*
284
285 %files ldirectord
286 %defattr(644,root,root,755)
287 %dir %{_sysconfdir}/ha.d/conf
288 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/ha.d/ldirectord.cf
289 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/ldirectord
290 %attr(754,root,root) /etc/rc.d/init.d/ldirectord
291 %attr(755,root,root) %{_sbindir}/*ldirectord*
292 %{_mandir}/man8/*ldirectord*.8*
293
294 %files devel
295 %defattr(644,root,root,755)
296 %{_includedir}/*
297 %{_libdir}/*.la
298
299 %files static
300 %defattr(644,root,root,755)
301 %{_libdir}/*.a
302
303 %files -n perl-heartbeat
304 %defattr(644,root,root,755)
305 %{perl_vendorarch}/heartbeat
306 %dir %{perl_vendorarch}/auto/heartbeat
307 %dir %{perl_vendorarch}/auto/heartbeat/cl_raw
308 %{perl_vendorarch}/auto/heartbeat/cl_raw/cl_raw.bs
309 %attr(755,root,root) %{perl_vendorarch}/auto/heartbeat/cl_raw/cl_raw.so
310 %{_mandir}/man3/heartbeat::*.3pm*
This page took 0.08286 seconds and 3 git commands to generate.