]> git.pld-linux.org Git - packages/heartbeat.git/blob - heartbeat.spec
-added patch for CLK_TCK
[packages/heartbeat.git] / heartbeat.spec
1 Summary: heartbeat - heartbeat subsystem for High-Availability Linux
2 Summary(pl):  podsystem heartbeat dla systemów o podwy¿szonej niezawodno¶ci
3 Name:   heartbeat
4 Version:        0.4.9
5 Release:        2
6 Copyright: GPL
7 URL: http://linux-ha.org/
8 Group: Utilities
9 Group(pl): Narzêdzia
10 #Packager: Alan Robertson <alanr@henge.com>
11 Source: http://linux-ha.org/download/heartbeat-0.4.9.tar.gz
12 Patch0: heartbeat.brzydki.patch
13 #Buildroot: /var/tmp/heartbeat-root
14 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
15 BuildPreReq: links
16 Requires: sysklogd
17
18 #%package stonith
19 #Summary: Provides an interface to Shoot The Other Node In The Head 
20 #Group: Utilities
21
22 %description
23 heartbeat is a basic heartbeat subsystem for Linux-HA.
24 It will run scripts at initialization, and when machines go up or down.
25 This version will also perform IP address takeover using gratuitous ARPs.
26 It works correctly for a 2-node configuration, and is extensible to larger
27 configurations.
28
29
30 It implements the following kinds of heartbeats:
31         - Bidirectional Serial Rings ("raw" serial ports)
32         - UDP/IP broadcast (ethernet, etc)
33         - Bidirectional Serial PPP/UDP Rings (using PPP)
34         - "ping" heartbeats (for routers, switches, etc.)
35            (to be used for breaking ties in 2-node systems)
36 %description(pl)
37 heartbeat jest podstawowym podsystemem dla systemów o podwy¿szonej dostêpno¶ci budowanych w oparciu o Linuxa. Zajmuje siê uruchamianiem skryptów podczas startu i zamykania systemu. Ta wersja pakietu pozwala na przejmowanie adresów IP. Oprogramowanie dzia³a poprawnie dla konfiguracji sk³adaj±cej siê z 2 hostów, mo¿na je równie¿ stosowaæ do bardziej skomplikowanych konfiguracji.
38
39 %changelog
40 #
41 %prep
42 %setup
43 %patch0 -p0
44 #patch -p0 < %{PATCH0}
45 %build
46
47 #zmienic to:
48 sed -e 's/MAKE=gmake/MAKE=make/g' < Makefile > aqq
49 mv aqq Makefile
50 cd doc
51 sed -e 's/lynx/links/' > aqq < Makefile
52 mv aqq Makefile
53 cd ..
54 make
55 ###########################################################
56 %install
57 ###########################################################
58 if
59   [ -z "${RPM_BUILD_ROOT}"  -a "${RPM_BUILD_ROOT}" != "/" ]
60 then
61   rm -rf $RPM_BUILD_ROOT
62 fi
63 RPM_BUILD=yes BUILD_ROOT=$RPM_BUILD_ROOT make install
64 (
65   cd $RPM_BUILD_ROOT/etc/ha.d/resource.d
66   rm -f ldirectord
67   ln -s /usr/sbin/ldirectord ldirectord
68 )
69
70 TEMPL=$RPM_BUILD_ROOT/var/adm/fillup-templates
71 if
72   [ ! -d $TEMPL ]
73 then
74   mkdir -p $TEMPL
75 fi
76 install -m 644 rc.config.heartbeat $TEMPL
77
78 ###########################################################
79 %files
80 ###########################################################
81 %defattr(-,root,root)
82 %dir /etc/ha.d
83 /etc/ha.d/harc
84 /etc/ha.d/shellfuncs
85 /etc/ha.d/rc.d
86 /etc/ha.d/README.config
87 /etc/ha.d/conf
88 /usr/lib/heartbeat
89 /usr/lib/libhbclient.so
90 /usr/lib/libhbclient.a
91 /etc/ha.d/resource.d/
92 /etc/init.d/heartbeat
93 /etc/logrotate.d/heartbeat
94 /var/adm/fillup-templates/rc.config.heartbeat
95 %dir /var/lib/heartbeat
96 %attr (600, root, root)       /var/lib/heartbeat/fifo
97 %attr (750, root, haclient) /var/lib/heartbeat/api
98 %attr (620, root, haclient) /var/lib/heartbeat/register
99 %attr (1770, root, haclient) /var/lib/heartbeat/casual
100 /usr/man/man8/heartbeat.8*
101 %doc doc/*
102
103
104 ###########################################################
105 %clean
106 ###########################################################
107 rm -rf $RPM_BUILD_ROOT
108 rm -rf $RPM_BUILD_DIR/heartbeat-0.4.9
109
110 ###########################################################
111 %pre
112 ###########################################################
113 #
114 #       This isn't perfect.  But getting every distribution
115 #       to agree on group id's seems hard to me :-(
116 #
117 if
118   grep '^haclient:' etc/group >/dev/null
119 then
120   : OK group haclient already present
121 else
122   GROUPOPT="-g 60"
123   if
124     usr/sbin/groupadd $GROUPOPT haclient 2>/dev/null
125   then
126     : OK we were able to add group haclient
127   else
128     usr/sbin/groupadd haclient
129   fi
130 fi
131 #
132 #  Multi-distribution kludge for init scripts...
133 #
134 if
135   [ ! -d etc/init.d ]
136 then
137   if
138     [ -d sbin/init.d  -a ! -L sbin/init.d ]
139   then
140     ln -s ../sbin/init.d etc/init.d
141   elif
142     [ -d etc/rc.d/init.d ]
143   then
144     ln -s rc.d/init.d etc/init.d
145   else
146     # I give up!
147     echo "Warning: making directory /etc/init.d"
148     mkdir -p etc/init.d
149   fi
150 fi
151 ###########################################################
152 #
153 #  Multi-distribution kludge for init scripts...
154 #
155 if
156   [ ! -d etc/init.d ]
157 then
158   if
159     [ -d sbin/init.d  -a ! -L sbin/init.d ]
160   then
161     ln -s ../sbin/init.d etc/init.d
162   elif
163     [ -d etc/rc.d/init.d ]
164   then
165     ln -s rc.d/init.d etc/init.d
166   else
167     # I give up!
168     echo "Warning: making directory /etc/init.d"
169     mkdir -p etc/init.d
170   fi
171 fi
172 ###########################################################
173 %post
174 ###########################################################
175
176 # Run heartbeat on startup
177 if
178   [ -f etc/SuSE-release ]
179 then
180   for d in etc/rc.d/init.d/rc[23].d
181   do
182     rm -f $d/S10heartbeat
183     rm -f $d/S99heartbeat; ln -s ../heartbeat $d/S99heartbeat 
184     rm -f $d/K35heartbeat; ln -s ../heartbeat $d/K35heartbeat
185   done
186   FILLUP=/bin/fillup
187   if 
188     $FILLUP -q -d = etc/rc.config var/adm/fillup-templates/rc.config.heartbeat
189   then
190     : fillup returned OK
191   else
192     echo "ERROR: $FILLUP failed. This should not happen. Please compare"
193     echo "/etc/rc.config and /var/adm/fillup-templates/rc.config.heartbeat"
194     echo "and update by hand."
195   fi
196 elif
197   [ -x sbin/chkconfig ]
198 then
199   sbin/chkconfig --add heartbeat
200 fi
201 true
202
203 ###########################################################
204 %preun
205 ###########################################################
206
207 Uninstall_PPP_hack() {
208   file2hack=etc/ppp/ip-up.local
209   echo "NOTE: Restoring /$file2hack"
210   MARKER="Heartbeat"
211   ed -s $file2hack <<-!EOF  2>/dev/null
212 H
213 g/ $MARKER\$/d
214 w
215 !EOF
216 }
217
218 if
219   [ $1 = 0 ]
220 then
221   [ -x sbin/chkconfig ] && sbin/chkconfig --del heartbeat
222   if
223     [ ! -x etc/ppp/ip-up.heart ]
224   then
225     Uninstall_PPP_hack
226   fi
227 fi
228 if
229    [ -r etc/SuSE-release ]
230 then
231   rm -f sbin/init.d/rc[23]/*heartbeat
232 fi
233 true
This page took 0.135609 seconds and 3 git commands to generate.