keepalived-vl.spec 6.6 KB

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