keepalived-vl.spec 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. %bcond_with systemd
  2. Summary: HA monitor built upon LVS, VRRP and services poller
  3. Name: keepalived
  4. Version: 2.1.5
  5. Release: 1%{?_dist_release}%{?with_systemd:.systemd}
  6. Group: network
  7. Vendor: Project Vine
  8. Distribution: Vine Linux
  9. License: GPL
  10. URL: http://www.keepalived.org/
  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. %debug_package
  40. %prep
  41. %setup
  42. %build
  43. %configure \
  44. %if %{with systemd}
  45. --with-init=systemd \
  46. %else
  47. --with-init=SYSV \
  48. %endif
  49. --enable-snmp --enable-snmp-rfc \
  50. --enable-sha1
  51. %{__make} %{?_smp_mflags} STRIP=/bin/true
  52. %install
  53. %{__rm} -rf %{buildroot}
  54. %{__make} install DESTDIR=%{buildroot}
  55. # Remove "samples", as we include them in %%doc
  56. %{__rm} -rf %{buildroot}%{_sysconfdir}/keepalived/samples/
  57. %{__rm} -rf %{buildroot}%{_docdir}/keepalived
  58. mkdir -p %{buildroot}%{_libexecdir}/keepalived
  59. %if %{with systemd}
  60. rm -rf %{buildroot}%{_initrddir}/
  61. %{__install} -p -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/keepalived.service
  62. %endif
  63. %clean
  64. %{__rm} -rf %{buildroot}
  65. %post
  66. %if %{with systemd}
  67. %systemd_post keepalived.service
  68. %else
  69. /sbin/chkconfig --add keepalived
  70. %endif
  71. %preun
  72. %if %{with systemd}
  73. %systemd_preun keepalived.service
  74. %else
  75. if [ $1 -eq 0 -o -x /bin/systemctl ]; then
  76. /sbin/service keepalived stop &>/dev/null || :
  77. /sbin/chkconfig --del keepalived
  78. fi
  79. %endif
  80. %postun
  81. %if %{with systemd}
  82. %systemd_postun_with_restart keepalived.service
  83. %else
  84. if [ $1 -ge 1 ]; then
  85. /sbin/service keepalived condrestart &>/dev/null || :
  86. fi
  87. %endif
  88. %files
  89. %defattr(-, root, root, -)
  90. %license COPYING
  91. %doc AUTHOR ChangeLog CONTRIBUTORS README TODO
  92. %doc doc/keepalived.conf.SYNOPSIS doc/samples/keepalived.conf.*
  93. %attr(0755,root,root) %{_bindir}/genhash
  94. %attr(0755,root,root) %{_sbindir}/keepalived
  95. %attr(0644, root, root) %config(noreplace) %{_sysconfdir}/keepalived/keepalived.conf
  96. %attr(0644, root, root) %config(noreplace) %{_sysconfdir}/sysconfig/keepalived
  97. %if %{with systemd}
  98. %{_unitdir}/keepalived.service
  99. %else
  100. %{_sysconfdir}/rc.d/init.d/keepalived
  101. %endif
  102. %dir %{_sysconfdir}/keepalived/
  103. %dir %{_libexecdir}/keepalived/
  104. %{_datadir}/snmp/mibs/*
  105. %{_mandir}/man1/genhash.1*
  106. %{_mandir}/man5/keepalived.conf.5*
  107. %{_mandir}/man8/keepalived.8*
  108. %changelog
  109. * Tue Sep 08 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.1.5-1
  110. - new upstream release.
  111. * Sun Apr 05 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.20-1
  112. - new upstream release.
  113. - added systemd stuff (disabled as default).
  114. * Sun Sep 08 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.18-1
  115. - new upstream release.
  116. * Thu Nov 08 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2.0.8-1
  117. - new upstream release.
  118. * Tue Mar 15 2016 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 1.2.19-1
  119. - new upstream release.
  120. * Mon Apr 08 2013 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.7-1
  121. - initial build for Vine Linux
  122. * Thu Sep 13 2007 Alexandre Cassen <acassen@linux-vs.org> 1.1.14
  123. - Merge work done by freshrpms.net... Thanks guys !!! ;)
  124. * Wed Feb 14 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-5
  125. - Add missing scriplet requirements.
  126. * Tue Feb 13 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-4
  127. - Add missing \n to the kernel define, for when multiple kernels are installed.
  128. - Pass STRIP=/bin/true to "make" in order to get a useful debuginfo package.
  129. * Tue Feb 13 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-3
  130. - Add %%check section to make sure any build without LVS support will fail.
  131. * Mon Feb 5 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-2
  132. - Use our own init script, include a sysconfig entry used by it for options.
  133. * Thu Jan 25 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-1
  134. - Update to 1.1.13.
  135. - Change mode of configuration file to 0600.
  136. - Don't include all of "doc" since it meant re-including all man pages.
  137. - Don't include samples in the main configuration path, they're in %%doc.
  138. - Include patch to add an optional label to interfaces.
  139. * Sat Apr 08 2006 Dries Verachtert <dries@ulyssis.org> - 1.1.12-1.2
  140. - Rebuild for Fedora Core 5.
  141. * Sun Mar 12 2006 Dag Wieers <dag@wieers.com> - 1.1.12-1
  142. - Updated to release 1.1.12.
  143. * Fri Mar 04 2005 Dag Wieers <dag@wieers.com> - 1.1.11-1
  144. - Updated to release 1.1.11.
  145. * Wed Feb 23 2005 Dag Wieers <dag@wieers.com> - 1.1.10-2
  146. - Fixed IPVS/LVS support. (Joe Sauer)
  147. * Tue Feb 15 2005 Dag Wieers <dag@wieers.com> - 1.1.10-1
  148. - Updated to release 1.1.10.
  149. * Mon Feb 07 2005 Dag Wieers <dag@wieers.com> - 1.1.9-1
  150. - Updated to release 1.1.9.
  151. * Sun Oct 17 2004 Dag Wieers <dag@wieers.com> - 1.1.7-2
  152. - Fixes to build with kernel IPVS support. (Tim Verhoeven)
  153. * Fri Sep 24 2004 Dag Wieers <dag@wieers.com> - 1.1.7-1
  154. - Updated to release 1.1.7. (Mathieu Lubrano)
  155. * Mon Feb 23 2004 Dag Wieers <dag@wieers.com> - 1.1.6-0
  156. - Updated to release 1.1.6.
  157. * Mon Jan 26 2004 Dag Wieers <dag@wieers.com> - 1.1.5-0
  158. - Updated to release 1.1.5.
  159. * Mon Dec 29 2003 Dag Wieers <dag@wieers.com> - 1.1.4-0
  160. - Updated to release 1.1.4.
  161. * Fri Jun 06 2003 Dag Wieers <dag@wieers.com> - 1.0.3-0
  162. - Initial package. (using DAR)