Logoj0ke.net Open Build Service > Projects > home:jg:playground > heartbeat > Changes
Sign Up | Log In

Changes of Revision 7

[-] Added heartbeat.spec
x
 
1
@@ -0,0 +1,1359 @@
2
+%define           ENABLE_SNMP_SUBAGENT 0
3
+%define           ENABLE_MGMT 1
4
+%define           uid 24
5
+%define           gname haclient
6
+%define           uname hacluster
7
+Summary:          Heartbeat subsystem for High-Availability Linux
8
+Name:             heartbeat
9
+Version:          2.0.8
10
+Release:          1%{?dist}
11
+License:          GPL/LGPL
12
+URL:              http://linux-ha.org/
13
+Group:            System Environment/Daemons
14
+Source0:          http://linux-ha.org/download/%{name}-%{version}.tar.gz
15
+Patch0:           heartbeat-fedora-pam.patch
16
+Patch1:           heartbeat-fedora-chkconfig.patch
17
+BuildRoot:        %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 
18
+BuildRequires:    glib2-devel
19
+BuildRequires:    iputils
20
+BuildRequires:    libnet-devel
21
+BuildRequires:    libtool-ltdl-devel
22
+BuildRequires:    net-snmp-devel >= 5.4
23
+BuildRequires:    bzip2-devel 
24
+BuildRequires:    ncurses-devel
25
+%if %{ENABLE_MGMT}
26
+BuildRequires:    gnutls-devel 
27
+BuildRequires:    pam-devel
28
+BuildRequires:    python-devel
29
+BuildRequires:    swig
30
+%endif
31
+Requires:         stonith = %{version}-%{release}
32
+Requires:         pils = %{version}-%{release}
33
+Requires:         ldirectord = %{version}-%{release}
34
+Requires:         pygtk2 >= 2.4
35
+Requires(pre):    fedora-usermgmt
36
+Requires(postun): fedora-usermgmt
37
+Requires(post):   /sbin/chkconfig
38
+Requires(preun):  /sbin/chkconfig
39
+%if %{ENABLE_MGMT}
40
+Requires:         gettext
41
+%endif
42
+
43
+%description
44
+heartbeat is a basic high-availability subsystem for Linux-HA.
45
+It will run scripts at initialization, and when machines go up or down.
46
+This version will also perform IP address takeover using gratuitous ARPs.
47
+It supports "n-node" clusters with significant capabilities for managing
48
+resources and dependencies.
49
+
50
+In addition it continues to support the older release 1 style of
51
+2-node clustering.
52
+
53
+It implements the following kinds of heartbeats:
54
+        - Serial ports
55
+        - UDP/IP multicast (ethernet, etc)
56
+        - UDP/IP broadcast (ethernet, etc)
57
+        - UDP/IP heartbeats
58
+        - "ping" heartbeats (for routers, switches, etc.)
59
+           (to be used for breaking ties in 2-node systems)
60
+
61
+%package -n ldirectord
62
+Summary:          Monitor daemon for maintaining high availability resources
63
+Group:            System Environment/Daemons
64
+Requires:         ipvsadm
65
+Requires(post):   /sbin/chkconfig
66
+Requires(preun):  /sbin/chkconfig
67
+
68
+%description -n ldirectord
69
+ldirectord is a stand-alone daemon to monitor services of real 
70
+for virtual services provided by The Linux Virtual Server
71
+(http://www.linuxvirtualserver.org/). It is simple to install 
72
+and works with the heartbeat code (http://www.linux-ha.org/).
73
+
74
+%package -n stonith
75
+Requires:       pils = %{version}-%{release}
76
+Requires:       net-snmp-libs
77
+Summary:        Provides an interface to Shoot The Other Node In The Head 
78
+Group:          System Environment/Daemons
79
+
80
+%description -n stonith
81
+The STONITH module (a.k.a. STOMITH) provides an extensible interface
82
+for remotely powering down a node in the cluster.  The idea is quite simple:
83
+When the software running on one machine wants to make sure another
84
+machine in the cluster is not using a resource, pull the plug on the other 
85
+machine. It's simple and reliable, albeit admittedly brutal.
86
+
87
+%package -n pils
88
+Summary:        Provides a general plugin and interface loading library
89
+Group:          System Environment/Daemons
90
+
91
+%description -n pils
92
+PILS is an generalized and portable open source Plugin and Interface Loading 
93
+System. PILS was developed as part of the Open Cluster Framework reference 
94
+implementation, and is designed to be directly usable by a wide variety of 
95
+other applications.
96
+PILS manages both plugins (loadable objects), and the interfaces these plugins 
97
+implement. PILS is designed to support any number of plugins implementing any 
98
+number of interfaces.
99
+
100
+%package devel 
101
+Summary:        Heartbeat development package 
102
+Group:          System Environment/Daemons
103
+Requires:       heartbeat = %{version}-%{release}
104
+
105
+%description devel
106
+Heartbeat development package
107
+
108
+%prep
109
+%setup -q
110
+%patch0 -p1
111
+%patch1 -p1
112
+ 
113
+%build
114
+# disable-fatal-warnings flag used to disable gcc4.x warnings of 'difference in signedness'
115
+CFLAGS=${RPM_OPT_FLAGS} \
116
+%configure \
117
+  --disable-fatal-warnings \
118
+  --disable-static \
119
+%if %{ENABLE_MGMT}
120
+  --enable-mgmt
121
+%else
122
+  --disable-mgmt
123
+%endif
124
+make
125
+
126
+%install
127
+rm -rf $RPM_BUILD_ROOT
128
+mkdir -p $RPM_BUILD_ROOT
129
+make DESTDIR=$RPM_BUILD_ROOT install
130
+(
131
+  cd $RPM_BUILD_ROOT/etc/ha.d/resource.d
132
+  ln -s /usr/sbin/ldirectord ldirectord
133
+)
134
+
135
+# cleanup
136
+[ -d $RPM_BUILD_ROOT/usr/man ] && rm -rf $RPM_BUILD_ROOT/usr/man
137
+[ -d $RPM_BUILD_ROOT/usr/share/libtool ] && rm -rf $RPM_BUILD_ROOT/usr/share/libtool
138
+find $RPM_BUILD_ROOT -type f -name *.la -exec rm -f {} ';'
139
+
140
+sed -i -e '1i# -*-Shell-script-*-' $RPM_BUILD_ROOT/%{_libdir}/heartbeat/ocf-shellfuncs 
141
+sed -i -e '1i# -*-Shell-script-*-' $RPM_BUILD_ROOT/%{_sysconfdir}/ha.d/shellfuncs
142
+chmod -x $RPM_BUILD_ROOT/%{_libdir}/heartbeat/ocf-shellfuncs
143
+chmod -x $RPM_BUILD_ROOT/%{_sysconfdir}/ha.d/shellfuncs
144
+chmod -x $RPM_BUILD_ROOT/%{_libdir}/heartbeat-gui/pymgmt.py
145
+
146
+%clean
147
+if [ -n "${RPM_BUILD_ROOT}"  -a "${RPM_BUILD_ROOT}" != "/" ]; then
148
+  rm -rf $RPM_BUILD_ROOT
149
+fi
150
+rm -rf $RPM_BUILD_DIR/heartbeat-%{version}
151
+
152
+%pre
153
+/usr/sbin/fedora-groupadd %{uid} -r %{gname} &>/dev/null || :
154
+/usr/sbin/fedora-useradd %{uid} -r -s /sbin/nologin -d /var/lib/heartbeat/cores/hacluster -M \
155
+        -c 'heartbeat user' -g %{gname} %{uname} &>/dev/null || :
156
+
157
+%post
158
+/sbin/ldconfig
159
+/sbin/chkconfig --add heartbeat
160
+
161
+%preun
162
+if [ $1 = 0 ] ; then
163
+    /sbin/service heartbeat stop
164
+    /sbin/chkconfig --del heartbeat
165
+fi
166
+
167
+%postun 
168
+if [ "$1" -ge "1" ] ; then
169
+    /sbin/service heartbeat condrestart
170
+fi
171
+/sbin/ldconfig
172
+test "$1" != 0 || /usr/sbin/fedora-userdel  %{uname} &>/dev/null || :
173
+test "$1" != 0 || /usr/sbin/fedora-groupdel %{gname} &>/dev/null || :
174
+
175
+%post -n ldirectord
176
+/sbin/chkconfig --add ldirectord
177
+
178
+%preun -n ldirectord
179
+/sbin/chkconfig --del ldirectord
180
+
181
+%post -n stonith -p /sbin/ldconfig
182
+
183
+%postun -n stonith -p /sbin/ldconfig
184
+
185
+%files
186
+%doc %{_datadir}/doc/%{name}-%{version}
187
+%defattr(-,root,root)
188
+%dir %{_sysconfdir}/ha.d
189
+%{_sysconfdir}/ha.d/harc
190
+%config(noreplace) %{_sysconfdir}/ha.d/shellfuncs
191
+%{_sysconfdir}/ha.d/rc.d
192
+%config(noreplace) %{_sysconfdir}/ha.d/README.config
193
+%{_libdir}/heartbeat
194
+%{_libdir}/heartbeat-gui
195
+%{_libdir}/libapphb.so.*
196
+%{_libdir}/libccmclient.so.*
197
+%{_libdir}/libcib.so.*
198
+%{_libdir}/libclm.so.*
199
+%{_libdir}/libcrmcommon.so.*
200
+%{_libdir}/libtransitioner.so.*
201
[+] Added heartbeat-fedora-chkconfig.patch ^
[+] Added heartbeat-fedora-pam.patch ^
Added heartbeat-2.0.8-1.fc7.src.rpm ^
Added heartbeat-2.0.8.tar.gz ^