keepalived-vl.spec 6.0 KB

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