]> git.pld-linux.org Git - packages/heartbeat.git/blob - heartbeat.spec
- GPL v2+
[packages/heartbeat.git] / heartbeat.spec
1 Summary:        Heartbeat - subsystem for High-Availability Linux
2 Summary(es):    Subsistema heartbeat para Linux "High-Availability"
3 Summary(pl):    Podsystem heartbeat dla systemów o podwy¿szonej niezawodno¶ci
4 Summary(pt_BR): Implementa sistema de monitoração (heartbeats) visando Alta Disponibilidade
5 Name:           heartbeat
6 Version:        0.4.9
7 Release:        4
8 License:        GPL v2+
9 Group:          Applications/System
10 Source0:        http://linux-ha.org/download/%{name}-%{version}.tar.gz
11 Patch0:         %{name}.dirty.time.h.patch
12 Patch1:         %{name}-remove_groupadd_and_chgrp.patch
13 Patch2:         %{name}-manpath.patch
14 # SuSE-specific; transformation unfinished
15 Patch3:         %{name}-init.patch
16 URL:            http://linux-ha.org/
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 BuildRequires:  links
19 Requires(pre):  /sbin/chkconfig
20 Requires(pre):  /usr/bin/getgid
21 Requires(pre):  /usr/sbin/groupadd
22 Requires(post): /usr/sbin/groupdel
23 Requires:       syslogdaemon
24
25 %description
26 heartbeat is a basic heartbeat subsystem for Linux-HA. It will run
27 scripts at initialization, and when machines go up or down. This
28 version will also perform IP address takeover using gratuitous ARPs.
29 It works correctly for a 2-node configuration, and is extensible to
30 larger configurations.
31
32 It implements the following kinds of heartbeats:
33  - Bidirectional Serial Rings ("raw" serial ports)
34
35 %description -l es
36 heartbeat es un sistema básico para Linux-HA. La función de este
37 software es ejecutar scripts en la inicialización y al apagar las
38 máquinas que lo utilizan.
39
40 %description -l pl
41 heartbeat jest podstawowym podsystemem dla systemów o podwy¿szonej
42 dostêpno¶ci budowanych w oparciu o Linuksa. Zajmuje siê uruchamianiem
43 skryptów podczas startu i zamykania systemu. Ta wersja pakietu pozwala
44 na przejmowanie adresów IP. Oprogramowanie dzia³a poprawnie dla
45 konfiguracji sk³adaj±cej siê z 2 hostów, mo¿na je równie¿ stosowaæ do
46 bardziej skomplikowanych konfiguracji.
47
48 #%package stonith
49 #Summary: Provides an interface to Shoot The Other Node In The Head
50 #Group: Utilities
51
52 %prep
53 %setup -q
54 %patch0 -p0
55 %patch1 -p0
56 %patch2 -p0
57 %patch3 -p0
58
59 %build
60 #zmienic to:
61 sed -e 's/MAKE=gmake/MAKE=make/g' < Makefile > aqq
62 mv -f aqq Makefile
63 cd doc
64 sed -e 's/lynx/links/' > aqq < Makefile
65 mv -f aqq Makefile
66 cd ..
67 %{__make}
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 RPM_BUILD=yes BUILD_ROOT=$RPM_BUILD_ROOT %{__make} install
72 (
73 cd $RPM_BUILD_ROOT%{_sysconfdir}/ha.d/resource.d
74   rm -f ldirectord
75 ln -sf %{_sbindir}/ldirectord ldirectord
76 )
77
78 TEMPL=$RPM_BUILD_ROOT/var/adm/fillup-templates
79 if [ ! -d $TEMPL ]; then
80         install -d $TEMPL
81 fi
82 install rc.config.heartbeat $TEMPL
83
84 rm -f doc/{*.html,*.8,COPYING,Makefile*}
85
86 %files
87 %defattr(644,root,root,755)
88 %doc doc/*
89 # needs fixing - don't use defattr(-)!!!
90 %defattr(-,root,root)
91 %dir %{_sysconfdir}/ha.d
92 %attr (755,root,root) %{_sysconfdir}/ha.d/harc
93 %{_sysconfdir}/ha.d/shellfuncs
94 %{_sysconfdir}/ha.d/rc.d
95 %{_sysconfdir}/ha.d/README.config
96 %{_sysconfdir}/ha.d/conf
97
98 # this is probably not the best location for binaries...
99 %{_libdir}/heartbeat
100 %{_libdir}/libhbclient.so
101 %{_libdir}/libhbclient.a
102 %{_sysconfdir}/ha.d/resource.d/
103 %{_sysconfdir}/rc.d/init.d/heartbeat
104 %{_sysconfdir}/logrotate.d/heartbeat
105 /var/adm/fillup-templates/rc.config.heartbeat
106 %dir /var/lib/heartbeat
107 %attr (600, root, root)     /var/lib/heartbeat/fifo
108 %attr (750, root, haclient) /var/lib/heartbeat/api
109 %attr (620, root, haclient) /var/lib/heartbeat/register
110 %attr (1770, root, haclient) /var/lib/heartbeat/casual
111 %{_mandir}/man8/heartbeat.8*
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT
115
116 %pre
117 if [ -n "`/usr/bin/getgid haclient`" ]; then
118         if [ "`/usr/bin/getgid haclient`" != "60" ]; then
119                 echo "Error: group haclient doesn't have gid=60. Correct this before installing heartbeat." 1>&2
120                 exit 1
121         fi
122 else
123         /usr/sbin/groupadd -g 60 -r haclient
124 fi
125
126 %post
127 /sbin/chkconfig --add heartbeat
128
129 %preun
130 Uninstall_PPP_hack() {
131   file2hack=etc/ppp/ip-up.local
132   echo "NOTE: Restoring /$file2hack"
133   MARKER="Heartbeat"
134   ed -s $file2hack <<-!EOF  2>/dev/null
135 H
136 g/ $MARKER\$/d
137 w
138 !EOF
139 }
140
141 if [ "$1" = "0" ]; then
142         /sbin/chkconfig --del heartbeat
143         if [ ! -x etc/ppp/ip-up.heart ]; then
144                 Uninstall_PPP_hack
145         fi
146 fi
147
148 %postun
149 if [ "$1" = "0" ]; then
150         /usr/sbin/groupdel haclient 2>/dev/null
151 fi
This page took 0.080349 seconds and 4 git commands to generate.