1 | %bcond_with systemd |
---|
2 | |
---|
3 | Summary: HA monitor built upon LVS, VRRP and services poller |
---|
4 | Name: keepalived |
---|
5 | Version: 2.1.5 |
---|
6 | Release: 1%{?_dist_release}%{?with_systemd:.systemd} |
---|
7 | Group: network |
---|
8 | Vendor: Project Vine |
---|
9 | Distribution: Vine Linux |
---|
10 | |
---|
11 | License: GPL |
---|
12 | URL: http://www.keepalived.org/ |
---|
13 | Source0: https://www.keepalived.org/software/keepalived-%{version}.tar.gz |
---|
14 | Source1: keepalived.service |
---|
15 | |
---|
16 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
17 | BuildRequires: openssl-devel |
---|
18 | BuildRequires: libnl3-devel |
---|
19 | BuildRequires: ipset-devel |
---|
20 | BuildRequires: iptables-devel |
---|
21 | BuildRequires: libnfnetlink-devel |
---|
22 | BuildRequires: net-snmp-devel |
---|
23 | |
---|
24 | %if %{with systemd} |
---|
25 | BuildRequires: systemd-units |
---|
26 | %{?systemd_requires} |
---|
27 | %else |
---|
28 | Requires(post): /sbin/chkconfig |
---|
29 | Requires(preun): /sbin/service, /sbin/chkconfig |
---|
30 | Requires(postun): /sbin/service |
---|
31 | %endif |
---|
32 | |
---|
33 | %description |
---|
34 | The main goal of the keepalived project is to add a strong & robust keepalive |
---|
35 | facility to the Linux Virtual Server project. This project is written in C with |
---|
36 | multilayer TCP/IP stack checks. Keepalived implements a framework based on |
---|
37 | three family checks : Layer3, Layer4 & Layer5/7. This framework gives the |
---|
38 | daemon the ability to check the state of an LVS server pool. When one of the |
---|
39 | servers of the LVS server pool is down, keepalived informs the linux kernel via |
---|
40 | a setsockopt call to remove this server entry from the LVS topology. In |
---|
41 | addition keepalived implements an independent VRRPv2 stack to handle director |
---|
42 | failover. So in short keepalived is a userspace daemon for LVS cluster nodes |
---|
43 | healthchecks and LVS directors failover. |
---|
44 | |
---|
45 | |
---|
46 | %debug_package |
---|
47 | |
---|
48 | |
---|
49 | %prep |
---|
50 | %setup |
---|
51 | |
---|
52 | |
---|
53 | %build |
---|
54 | %configure \ |
---|
55 | %if %{with systemd} |
---|
56 | --with-init=systemd \ |
---|
57 | %else |
---|
58 | --with-init=SYSV \ |
---|
59 | %endif |
---|
60 | --enable-snmp --enable-snmp-rfc \ |
---|
61 | --enable-sha1 |
---|
62 | %{__make} %{?_smp_mflags} STRIP=/bin/true |
---|
63 | |
---|
64 | |
---|
65 | %install |
---|
66 | %{__rm} -rf %{buildroot} |
---|
67 | %{__make} install DESTDIR=%{buildroot} |
---|
68 | |
---|
69 | # Remove "samples", as we include them in %%doc |
---|
70 | %{__rm} -rf %{buildroot}%{_sysconfdir}/keepalived/samples/ |
---|
71 | |
---|
72 | %{__rm} -rf %{buildroot}%{_docdir}/keepalived |
---|
73 | |
---|
74 | mkdir -p %{buildroot}%{_libexecdir}/keepalived |
---|
75 | |
---|
76 | %if %{with systemd} |
---|
77 | rm -rf %{buildroot}%{_initrddir}/ |
---|
78 | %{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/keepalived.service |
---|
79 | %endif |
---|
80 | |
---|
81 | |
---|
82 | %clean |
---|
83 | %{__rm} -rf %{buildroot} |
---|
84 | |
---|
85 | |
---|
86 | %post |
---|
87 | %if %{with systemd} |
---|
88 | %systemd_post keepalived.service |
---|
89 | %else |
---|
90 | /sbin/chkconfig --add keepalived |
---|
91 | %endif |
---|
92 | |
---|
93 | %preun |
---|
94 | %if %{with systemd} |
---|
95 | %systemd_preun keepalived.service |
---|
96 | %else |
---|
97 | if [ $1 -eq 0 -o -x /bin/systemctl ]; then |
---|
98 | /sbin/service keepalived stop &>/dev/null || : |
---|
99 | /sbin/chkconfig --del keepalived |
---|
100 | fi |
---|
101 | %endif |
---|
102 | |
---|
103 | %postun |
---|
104 | %if %{with systemd} |
---|
105 | %systemd_postun_with_restart keepalived.service |
---|
106 | %else |
---|
107 | if [ $1 -ge 1 ]; then |
---|
108 | /sbin/service keepalived condrestart &>/dev/null || : |
---|
109 | fi |
---|
110 | %endif |
---|
111 | |
---|
112 | |
---|
113 | %files |
---|
114 | %defattr(-, root, root, -) |
---|
115 | %license COPYING |
---|
116 | %doc AUTHOR ChangeLog CONTRIBUTORS README TODO |
---|
117 | %doc doc/keepalived.conf.SYNOPSIS doc/samples/keepalived.conf.* |
---|
118 | %attr(0755,root,root) %{_bindir}/genhash |
---|
119 | %attr(0755,root,root) %{_sbindir}/keepalived |
---|
120 | %attr(0644, root, root) %config(noreplace) %{_sysconfdir}/keepalived/keepalived.conf |
---|
121 | %attr(0644, root, root) %config(noreplace) %{_sysconfdir}/sysconfig/keepalived |
---|
122 | %if %{with systemd} |
---|
123 | %{_unitdir}/keepalived.service |
---|
124 | %else |
---|
125 | %{_sysconfdir}/rc.d/init.d/keepalived |
---|
126 | %endif |
---|
127 | %dir %{_sysconfdir}/keepalived/ |
---|
128 | %dir %{_libexecdir}/keepalived/ |
---|
129 | %{_datadir}/snmp/mibs/* |
---|
130 | %{_mandir}/man1/genhash.1* |
---|
131 | %{_mandir}/man5/keepalived.conf.5* |
---|
132 | %{_mandir}/man8/keepalived.8* |
---|
133 | |
---|
134 | %changelog |
---|
135 | * Tue Sep 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.5-1 |
---|
136 | - new upstream release. |
---|
137 | |
---|
138 | * Sun Apr 05 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.20-1 |
---|
139 | - new upstream release. |
---|
140 | - added systemd stuff (disabled as default). |
---|
141 | |
---|
142 | * Sun Sep 08 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.18-1 |
---|
143 | - new upstream release. |
---|
144 | |
---|
145 | * Thu Nov 08 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.8-1 |
---|
146 | - new upstream release. |
---|
147 | |
---|
148 | * Tue Mar 15 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.2.19-1 |
---|
149 | - new upstream release. |
---|
150 | |
---|
151 | * Mon Apr 08 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.7-1 |
---|
152 | - initial build for Vine Linux |
---|
153 | |
---|
154 | * Thu Sep 13 2007 Alexandre Cassen <acassen@linux-vs.org> 1.1.14 |
---|
155 | - Merge work done by freshrpms.net... Thanks guys !!! ;) |
---|
156 | |
---|
157 | * Wed Feb 14 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-5 |
---|
158 | - Add missing scriplet requirements. |
---|
159 | |
---|
160 | * Tue Feb 13 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-4 |
---|
161 | - Add missing \n to the kernel define, for when multiple kernels are installed. |
---|
162 | - Pass STRIP=/bin/true to "make" in order to get a useful debuginfo package. |
---|
163 | |
---|
164 | * Tue Feb 13 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-3 |
---|
165 | - Add %%check section to make sure any build without LVS support will fail. |
---|
166 | |
---|
167 | * Mon Feb 5 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-2 |
---|
168 | - Use our own init script, include a sysconfig entry used by it for options. |
---|
169 | |
---|
170 | * Thu Jan 25 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-1 |
---|
171 | - Update to 1.1.13. |
---|
172 | - Change mode of configuration file to 0600. |
---|
173 | - Don't include all of "doc" since it meant re-including all man pages. |
---|
174 | - Don't include samples in the main configuration path, they're in %%doc. |
---|
175 | - Include patch to add an optional label to interfaces. |
---|
176 | |
---|
177 | * Sat Apr 08 2006 Dries Verachtert <dries@ulyssis.org> - 1.1.12-1.2 |
---|
178 | - Rebuild for Fedora Core 5. |
---|
179 | |
---|
180 | * Sun Mar 12 2006 Dag Wieers <dag@wieers.com> - 1.1.12-1 |
---|
181 | - Updated to release 1.1.12. |
---|
182 | |
---|
183 | * Fri Mar 04 2005 Dag Wieers <dag@wieers.com> - 1.1.11-1 |
---|
184 | - Updated to release 1.1.11. |
---|
185 | |
---|
186 | * Wed Feb 23 2005 Dag Wieers <dag@wieers.com> - 1.1.10-2 |
---|
187 | - Fixed IPVS/LVS support. (Joe Sauer) |
---|
188 | |
---|
189 | * Tue Feb 15 2005 Dag Wieers <dag@wieers.com> - 1.1.10-1 |
---|
190 | - Updated to release 1.1.10. |
---|
191 | |
---|
192 | * Mon Feb 07 2005 Dag Wieers <dag@wieers.com> - 1.1.9-1 |
---|
193 | - Updated to release 1.1.9. |
---|
194 | |
---|
195 | * Sun Oct 17 2004 Dag Wieers <dag@wieers.com> - 1.1.7-2 |
---|
196 | - Fixes to build with kernel IPVS support. (Tim Verhoeven) |
---|
197 | |
---|
198 | * Fri Sep 24 2004 Dag Wieers <dag@wieers.com> - 1.1.7-1 |
---|
199 | - Updated to release 1.1.7. (Mathieu Lubrano) |
---|
200 | |
---|
201 | * Mon Feb 23 2004 Dag Wieers <dag@wieers.com> - 1.1.6-0 |
---|
202 | - Updated to release 1.1.6. |
---|
203 | |
---|
204 | * Mon Jan 26 2004 Dag Wieers <dag@wieers.com> - 1.1.5-0 |
---|
205 | - Updated to release 1.1.5. |
---|
206 | |
---|
207 | * Mon Dec 29 2003 Dag Wieers <dag@wieers.com> - 1.1.4-0 |
---|
208 | - Updated to release 1.1.4. |
---|
209 | |
---|
210 | * Fri Jun 06 2003 Dag Wieers <dag@wieers.com> - 1.0.3-0 |
---|
211 | - Initial package. (using DAR) |
---|
212 | |
---|