]>
Commit | Line | Data |
---|---|---|
93bf0719 | 1 | # |
caa662d1 | 2 | # TODO: |
93bf0719 | 3 | # |
a2cbcdae | 4 | Summary: HA monitor built upon LVS, VRRP and services poller |
0149773c | 5 | Summary(pl.UTF-8): Monitor HA zbudowany w oparciu o LVS, VRRP i narzędzie do sprawdzania usług |
4047b92e | 6 | Name: keepalived |
09c1b291 | 7 | Version: 1.1.19 |
963b7a22 | 8 | Release: 1 |
a2cbcdae | 9 | License: GPL v2 |
10 | Group: Applications/System | |
11 | Source0: http://www.keepalived.org/software/%{name}-%{version}.tar.gz | |
09c1b291 | 12 | # Source0-md5: a35b8d9d462810f7650d292bd7457523 |
ab328a2a | 13 | Source1: %{name}.init |
14 | Source2: %{name}.sysconfig | |
f2b2d5e5 | 15 | Patch0: %{name}-config.patch |
112ebe28 | 16 | Patch1: %{name}-use-linux-libc-headers.patch |
a2cbcdae | 17 | URL: http://www.keepalived.org/ |
caa662d1 | 18 | #BuildRequires: kernel-source >= 2.6.0 |
a2cbcdae | 19 | BuildRequires: openssl-devel >= 0.9.7d |
20 | BuildRequires: popt-devel | |
ab328a2a | 21 | BuildRequires: rpmbuild(macros) >= 1.268 |
4047b92e JB |
22 | Requires(post,preun): /sbin/chkconfig |
23 | Requires: rc-scripts | |
9bff40d3 | 24 | Suggests: genhash |
a2cbcdae | 25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %description | |
28 | The main goal of the keepalived project is to add a strong & robust | |
29 | keepalive facility to the Linux Virtual Server project. This project | |
30 | is written in C with multilayer TCP/IP stack checks. Keepalived | |
4047b92e | 31 | implements a framework based on three family checks: Layer3, Layer4 & |
a2cbcdae | 32 | Layer5. This framework gives the daemon the ability of checking a LVS |
33 | server pool states. When one of the server of the LVS server pool is | |
4047b92e JB |
34 | down, keepalived informs the Linux kernel via a setsockopt call to |
35 | remove this server entry from the LVS topology. In addition | |
a2cbcdae | 36 | keepalived implements a VRRPv2 stack to handle director failover. So |
37 | in short keepalived is a userspace daemon for LVS cluster nodes | |
38 | healthchecks and LVS directors failover. | |
39 | ||
a6d1eb96 JR |
40 | %description -l pl.UTF-8 |
41 | Głównym celem projektu keepalived jest dodanie potężnego udogodnienia | |
4047b92e JB |
42 | keepalive do projektu Linux Virtual Server. Ten projekt jest napisany |
43 | w C z wielowarstwowym sprawdzaniem stosu TCP/IP. keepalived | |
44 | implementuje szkielet oparty na sprawdzaniu trzech rodzin: warstwy 3, | |
a6d1eb96 JR |
45 | warstwy 4 i warstwy 5. Ten szkielet daje demonowi możliwość |
46 | sprawdzania stanów puli serwerów LVS. Kiedy jeden serwer z puli | |
47 | serwerów LVS przestaje działać, keepalived informuje o tym jądro | |
48 | Linuksa poprzez wywołanie setsockopt w celu usunięcia wpisu o serwerze | |
4047b92e | 49 | z topologii LVS. Poza tym keepalived implementuje stos VRRPv2 do |
a6d1eb96 JR |
50 | obsługi przejmowania zadań (failover) samego urządzenia zarządzającego |
51 | (director). Czyli w skrócie keepalived to działający w przestrzeni | |
52 | użytkownika demon do sprawdzania stanu węzłów klastra LVS oraz | |
53 | przejmowania zadań urządzenia zarządzającego. | |
4047b92e | 54 | |
9bff40d3 | 55 | %package genhash |
56 | Summary: genhash - md5 hash generation tool for remote web pages | |
57 | Group: Applications/System | |
58 | Provides: genhash | |
59 | ||
60 | %description genhash | |
61 | genhash is a tool used for generating md5sum hashes of remote web | |
62 | pages. genhash can use HTTP or HTTPS to connect to the web page. | |
63 | The output by this utility includes the HTTP header, page data, | |
64 | and the md5sum of the data. This md5sum can then be used within | |
65 | the keepalived program, for monitoring HTTP and HTTPS services. | |
66 | ||
a2cbcdae | 67 | %prep |
68 | %setup -q | |
f2b2d5e5 | 69 | %patch0 -p1 |
112ebe28 | 70 | %patch1 -p1 |
a2cbcdae | 71 | |
72 | %build | |
73 | %configure \ | |
d5721ff4 | 74 | CFLAGS="%{rpmcflags} -include %{_includedir}/linux/errno.h -D_WITH_LINKWATCH_" |
a2cbcdae | 75 | %{__make} |
76 | ||
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
caa662d1 | 79 | install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} |
a2cbcdae | 80 | |
caa662d1 PG |
81 | %{__make} install \ |
82 | DESTDIR=$RPM_BUILD_ROOT | |
a2cbcdae | 83 | |
caa662d1 PG |
84 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
85 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
86 | ||
87 | # Cleanups: | |
88 | rm -rf $RPM_BUILD_ROOT/etc/keepalived/samples | |
89 | rm -f $RPM_BUILD_ROOT/etc/init.d/keepalived | |
a2cbcdae | 90 | |
91 | %clean | |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | ||
94 | %post | |
95 | /sbin/chkconfig --add keepalived | |
ab328a2a | 96 | %service keepalived restart |
a2cbcdae | 97 | |
98 | %preun | |
4047b92e | 99 | if [ "$1" = "0" ]; then |
ab328a2a | 100 | %service keepalived stop |
4047b92e JB |
101 | /sbin/chkconfig --del keepalived |
102 | fi | |
a2cbcdae | 103 | |
104 | %files | |
105 | %defattr(644,root,root,755) | |
caa662d1 PG |
106 | %doc AUTHOR ChangeLog CONTRIBUTORS README TODO doc/samples doc/keepalived* |
107 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/keepalived/keepalived.conf | |
108 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name} | |
a2cbcdae | 109 | %attr(755,root,root) %{_sbindir}/keepalived |
caa662d1 | 110 | %attr(754,root,root) /etc/rc.d/init.d/%{name} |
ab328a2a | 111 | %dir %{_sysconfdir}/keepalived |
9bff40d3 | 112 | %{_mandir}/man5/keepalived.conf.5* |
113 | %{_mandir}/man8/keepalived.8* | |
114 | ||
115 | %files genhash | |
116 | %defattr(644,root,root,755) | |
117 | %attr(755,root,root) %{_bindir}/genhash | |
118 | %{_mandir}/man1/genhash.1* |