|
Packit |
c22fc9 |
# Ugly, but we need headers from a kernel to rebuild against
|
|
Packit |
c22fc9 |
%define kernel %(rpm -q kernel-devel --qf '%{RPMTAG_VERSION}-%{RPMTAG_RELEASE}\\n' 2>/dev/null | head -1)
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
Summary: HA monitor built upon LVS, VRRP and services poller
|
|
Packit |
c22fc9 |
Name: keepalived
|
|
Packit |
c22fc9 |
Version: @VERSION@
|
|
Packit |
c22fc9 |
Release: 1
|
|
Packit |
c22fc9 |
License: GPL
|
|
Packit |
c22fc9 |
Group: Applications/System
|
|
Packit |
c22fc9 |
URL: http://www.keepalived.org/
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
Source0: http://www.keepalived.org/software/keepalived-%{version}.tar.gz
|
|
Packit |
c22fc9 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
BuildRequires: openssl-devel
|
|
Packit |
c22fc9 |
# We need both of these for proper LVS support
|
|
Packit |
c22fc9 |
BuildRequires: kernel, kernel-devel
|
|
Packit |
c22fc9 |
BuildRequires: libnfnetlink-devel
|
|
Packit |
c22fc9 |
@SNMP_TRUE@BuildRequires: net-snmp-devel
|
|
Packit |
c22fc9 |
@WITH_DBUS_TRUE@BuildRequires: glib2-devel
|
|
Packit |
c22fc9 |
@LIBIPTC_TRUE@BuildRequires: iptables-devel
|
|
Packit |
c22fc9 |
@LIBIPSET_TRUE@BuildRequires: ipset-devel
|
|
Packit |
c22fc9 |
@LIBNL1_TRUE@BuildRequires: libnl-devel
|
|
Packit |
c22fc9 |
@LIBNL3_TRUE@BuildRequires: libnl3-devel
|
|
Packit |
c22fc9 |
@INIT_SYSV_TRUE@Requires(post): /sbin/chkconfig
|
|
Packit |
c22fc9 |
@INIT_SYSV_TRUE@Requires(preun): /sbin/service, /sbin/chkconfig
|
|
Packit |
c22fc9 |
@INIT_SYSV_TRUE@Requires(postun): /sbin/service
|
|
Packit |
c22fc9 |
BuildRequires: autoconf automake pkgconfig
|
|
Packit |
c22fc9 |
@INIT_SYSTEMD_TRUE@BuildRequires: systemd-units
|
|
Packit |
c22fc9 |
@WITH_REGEX_TRUE@BuildRequires: pcre2-devel
|
|
Packit |
c22fc9 |
@WITH_REGEX_TRUE@Requires: pcre2
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
%description
|
|
Packit |
c22fc9 |
The main goal of the keepalived project is to add a strong & robust keepalive
|
|
Packit |
c22fc9 |
facility to the Linux Virtual Server project. This project is written in C with
|
|
Packit |
c22fc9 |
multilayer TCP/IP stack checks. Keepalived implements a framework based on
|
|
Packit |
c22fc9 |
three family checks : Layer3, Layer4 & Layer5/7. This framework gives the
|
|
Packit |
c22fc9 |
daemon the ability to check the state of an LVS server pool. When one of the
|
|
Packit |
c22fc9 |
servers of the LVS server pool is down, keepalived informs the linux kernel via
|
|
Packit |
c22fc9 |
a setsockopt call to remove this server entry from the LVS topology. In
|
|
Packit |
c22fc9 |
addition keepalived implements an independent VRRPv2 stack to handle director
|
|
Packit |
c22fc9 |
failover. So in short keepalived is a userspace daemon for LVS cluster nodes
|
|
Packit |
c22fc9 |
healthchecks and LVS directors failover.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
%prep
|
|
Packit |
c22fc9 |
%setup
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
%build
|
|
Packit |
c22fc9 |
CONFIG_OPTS=
|
|
Packit |
c22fc9 |
@DEBUG_TRUE@CONFIG_OPTS="$CONFIG_OPTS --enable-debug"
|
|
Packit |
c22fc9 |
@PROFILE_TRUE@CONFIG_OPTS="$CONFIG_OPTS --enable-profile"
|
|
Packit |
c22fc9 |
@WITH_VRRP_FALSE@CONFIG_OPTS="$CONFIG_OPTS --disable-vrrp"
|
|
Packit |
c22fc9 |
@WITH_IPVS_FALSE@CONFIG_OPTS="$CONFIG_OPTS --disable-lvs"
|
|
Packit |
c22fc9 |
@SNMP_KEEPALIVED_TRUE@CONFIG_OPTS="$CONFIG_OPTS --enable-snmp"
|
|
Packit |
c22fc9 |
@SNMP_KEEPALIVED_FALSE@@SNMP_VRRP_TRUE@CONFIG_OPTS="$CONFIG_OPTS --enable-snmp-vrrp"
|
|
Packit |
c22fc9 |
@SNMP_KEEPALIVED_FALSE@@SNMP_CHECKER_TRUE@CONFIG_OPTS="$CONFIG_OPTS --enable-snmp-checker"
|
|
Packit |
c22fc9 |
@SNMP_RFC_TRUE@CONFIG_OPTS="$CONFIG_OPTS --enable-snmp-rfc"
|
|
Packit |
c22fc9 |
@SNMP_RFC_FALSE@@SNMP_RFCV2_TRUE@CONFIG_OPTS="$CONFIG_OPTS --enable-snmp-rfcv2"
|
|
Packit |
c22fc9 |
@SNMP_RFC_FALSE@@SNMP_RFCV3_TRUE@CONFIG_OPTS="$CONFIG_OPTS --enable-snmp-rfcv3"
|
|
Packit |
c22fc9 |
@SNMP_REPLY_V3_FOR_V2_FALSE@CONFIG_OPTS="$CONFIG_OPTS --disable-snmp-reply-v3-for-v2"
|
|
Packit |
c22fc9 |
@WITH_SHA1_TRUE@CONFIG_OPTS="$CONFIG_OPTS --enable-sha1"
|
|
Packit |
c22fc9 |
@WITH_DBUS_TRUE@CONFIG_OPTS="$CONFIG_OPTS --enable-dbus"
|
|
Packit |
c22fc9 |
@INIT_SYSTEMD_TRUE@CONFIG_OPTS="$CONFIG_OPTS --with-init=systemd"
|
|
Packit |
c22fc9 |
@WITH_REGEX_TRUE@CONFIG_OPTS="$CONFIG_OPTS --enable-regex"
|
|
Packit |
c22fc9 |
%{?el3:export CPPFLAGS="-I/usr/kerberos/include"}
|
|
Packit |
c22fc9 |
%{?rh9:export CPPFLAGS="-I/usr/kerberos/include"}
|
|
Packit |
c22fc9 |
autoreconf -f -i
|
|
Packit |
c22fc9 |
%configure $CONFIG_OPTS \
|
|
Packit |
c22fc9 |
%{?el3:--includedir="/usr/kerberos/include"} \
|
|
Packit |
c22fc9 |
%{?rh9:--includedir="/usr/kerberos/include"} \
|
|
Packit |
c22fc9 |
--with-kernel-dir="/lib/modules/%{kernel}/build"
|
|
Packit |
c22fc9 |
%{__make} %{?_smp_mflags} STRIP=/bin/true
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
%install
|
|
Packit |
c22fc9 |
%{__rm} -rf %{buildroot}
|
|
Packit |
c22fc9 |
%{__make} install DESTDIR=%{buildroot}
|
|
Packit |
c22fc9 |
# Remove "samples", as we include them in %%doc
|
|
Packit |
c22fc9 |
%{__rm} -rf %{buildroot}%{_sysconfdir}/keepalived/samples/
|
|
Packit |
c22fc9 |
# Likewise remove README
|
|
Packit |
c22fc9 |
%{__rm} -f %{buildroot}%{_docdir}/%{name}/README
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
%check
|
|
Packit |
c22fc9 |
# A build could silently have LVS support disabled if the kernel includes can't
|
|
Packit |
c22fc9 |
# be properly found, we need to avoid that.
|
|
Packit |
c22fc9 |
if ! grep -q "#define _WITH_LVS_ *1" lib/config.h; then
|
|
Packit |
c22fc9 |
%{__echo} "ERROR: We do not want keepalived lacking LVS support."
|
|
Packit |
c22fc9 |
exit 1
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
%clean
|
|
Packit |
c22fc9 |
%{__rm} -rf %{buildroot}
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
%post
|
|
Packit |
c22fc9 |
if [ $1 -eq 1 ]; then
|
|
Packit |
c22fc9 |
# Enable (but don't start) the units by default
|
|
Packit |
c22fc9 |
@INIT_SYSV_TRUE@ /sbin/chkconfig --add keepalived
|
|
Packit |
c22fc9 |
@INIT_SYSTEMD_TRUE@ /bin/systemctl enable keepalived.service >/dev/null 2>&1 || :
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
%preun
|
|
Packit |
c22fc9 |
if [ $1 -eq 0 ]; then
|
|
Packit |
c22fc9 |
# Disable and stop the units
|
|
Packit |
c22fc9 |
@INIT_SYSV_TRUE@ /sbin/service keepalived stop &>/dev/null || :
|
|
Packit |
c22fc9 |
@INIT_SYSV_TRUE@ /sbin/chkconfig --del keepalived
|
|
Packit |
c22fc9 |
@INIT_SYSTEMD_TRUE@ /bin/systemctl disable keepalived.service >/dev/null 2>&1 || :
|
|
Packit |
c22fc9 |
@INIT_SYSTEMD_TRUE@ /bin/systemctl stop keepalived.service >/dev/null 2>&1 || :
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
%postun
|
|
Packit |
c22fc9 |
if [ $1 -ge 1 ]; then
|
|
Packit |
c22fc9 |
@INIT_SYSV_TRUE@ /sbin/service keepalived condrestart &>/dev/null || :
|
|
Packit |
c22fc9 |
# On upgrade, reload init system configuration if we changed unit files
|
|
Packit |
c22fc9 |
# and restart the daemon
|
|
Packit |
c22fc9 |
@INIT_SYSTEMD_TRUE@ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
Packit |
c22fc9 |
@INIT_SYSTEMD_TRUE@ /bin/systemctl try-restart keepalived.service >/dev/null 2>&1 || :
|
|
Packit |
c22fc9 |
fi
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
%files
|
|
Packit |
c22fc9 |
%defattr(-, root, root, -)
|
|
Packit |
c22fc9 |
%doc AUTHOR ChangeLog CONTRIBUTORS COPYING README TODO
|
|
Packit |
c22fc9 |
%doc doc/keepalived.conf.SYNOPSIS doc/samples/
|
|
Packit |
c22fc9 |
%dir %{_sysconfdir}/keepalived/
|
|
Packit |
c22fc9 |
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/keepalived/keepalived.conf
|
|
Packit |
c22fc9 |
%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/keepalived
|
|
Packit |
c22fc9 |
@INIT_SYSTEMD_TRUE@%{_unitdir}/keepalived.service
|
|
Packit |
c22fc9 |
@INIT_SYSV_TRUE@%{_initdir}/keepalived
|
|
Packit |
c22fc9 |
@INIT_UPSTART_TRUE@%{_sysconfdir}/init/keepalived.conf
|
|
Packit |
c22fc9 |
@SNMP_TRUE@%{_datadir}/snmp/mibs/KEEPALIVED-MIB.txt
|
|
Packit |
c22fc9 |
@SNMP_RFCV2_TRUE@%{_datadir}/snmp/mibs/VRRP-MIB.txt
|
|
Packit |
c22fc9 |
@SNMP_RFCV3_TRUE@%{_datadir}/snmp/mibs/VRRPv3-MIB.txt
|
|
Packit |
c22fc9 |
%{_bindir}/genhash
|
|
Packit |
c22fc9 |
%attr(0755,root,root) %{_sbindir}/keepalived
|
|
Packit |
c22fc9 |
%{_mandir}/man1/genhash.1*
|
|
Packit |
c22fc9 |
%{_mandir}/man5/keepalived.conf.5*
|
|
Packit |
c22fc9 |
%{_mandir}/man8/keepalived.8*
|
|
Packit |
c22fc9 |
@WITH_DBUS_TRUE@%attr(0644,root,root) %{_sysconfdir}/dbus-1/system.d/org.keepalived.Vrrp1.conf
|
|
Packit |
c22fc9 |
@WITH_DBUS_TRUE@%attr(0644,root,root) %{_datarootdir}/dbus-1/interfaces/org.keepalived.Vrrp1.Instance.xml
|
|
Packit |
c22fc9 |
@WITH_DBUS_TRUE@%attr(0644,root,root) %{_datarootdir}/dbus-1/interfaces/org.keepalived.Vrrp1.Vrrp.xml
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
%changelog
|
|
Packit |
c22fc9 |
* Wed Nov 1 2017 Quentin Armitage <quentin@armitage.org.uk> 1.3.9-1
|
|
Packit |
c22fc9 |
- Fix installation of keepalived.service
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Tue Oct 17 2017 Quentin Armitage <quentin@armitage.org.uk> 1.3.8-1
|
|
Packit |
c22fc9 |
- Handle Fedora and CentOS differences for %{_docdir_fmt}
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Fri Sep 16 2016 Quentin Armitage <quentin@armitage.org.uk> 1.2.24-2
|
|
Packit |
c22fc9 |
- Fixes to allow building on a systemd based system
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Wed Sep 14 2016 Quentin Armitage <quentin@armitage.org.uk> 1.2.24-1
|
|
Packit |
c22fc9 |
- Add more BuildRequires
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Tue Sep 13 2016 Quentin Armitage <quentin@armitage.org.uk> 1.2.24
|
|
Packit |
c22fc9 |
- Update for changed format due of config.log due to using automake
|
|
Packit |
c22fc9 |
- Add support for systemd and upstart based systems
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Thu Sep 13 2007 Alexandre Cassen <acassen@linux-vs.org> 1.1.14
|
|
Packit |
c22fc9 |
- Merge work done by freshrpms.net... Thanks guys !!! ;)
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Wed Feb 14 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-5
|
|
Packit |
c22fc9 |
- Add missing scriplet requirements.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Tue Feb 13 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-4
|
|
Packit |
c22fc9 |
- Add missing \n to the kernel define, for when multiple kernels are installed.
|
|
Packit |
c22fc9 |
- Pass STRIP=/bin/true to "make" in order to get a useful debuginfo package.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Tue Feb 13 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-3
|
|
Packit |
c22fc9 |
- Add %%check section to make sure any build without LVS support will fail.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Mon Feb 5 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-2
|
|
Packit |
c22fc9 |
- Use our own init script, include a sysconfig entry used by it for options.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Thu Jan 25 2007 Matthias Saou <http://freshrpms.net/> 1.1.13-1
|
|
Packit |
c22fc9 |
- Update to 1.1.13.
|
|
Packit |
c22fc9 |
- Change mode of configuration file to 0600.
|
|
Packit |
c22fc9 |
- Don't include all of "doc" since it meant re-including all man pages.
|
|
Packit |
c22fc9 |
- Don't include samples in the main configuration path, they're in %%doc.
|
|
Packit |
c22fc9 |
- Include patch to add an optional label to interfaces.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Sat Apr 08 2006 Dries Verachtert <dries@ulyssis.org> - 1.1.12-1.2
|
|
Packit |
c22fc9 |
- Rebuild for Fedora Core 5.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Sun Mar 12 2006 Dag Wieers <dag@wieers.com> - 1.1.12-1
|
|
Packit |
c22fc9 |
- Updated to release 1.1.12.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Fri Mar 04 2005 Dag Wieers <dag@wieers.com> - 1.1.11-1
|
|
Packit |
c22fc9 |
- Updated to release 1.1.11.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Wed Feb 23 2005 Dag Wieers <dag@wieers.com> - 1.1.10-2
|
|
Packit |
c22fc9 |
- Fixed IPVS/LVS support. (Joe Sauer)
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Tue Feb 15 2005 Dag Wieers <dag@wieers.com> - 1.1.10-1
|
|
Packit |
c22fc9 |
- Updated to release 1.1.10.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Mon Feb 07 2005 Dag Wieers <dag@wieers.com> - 1.1.9-1
|
|
Packit |
c22fc9 |
- Updated to release 1.1.9.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Sun Oct 17 2004 Dag Wieers <dag@wieers.com> - 1.1.7-2
|
|
Packit |
c22fc9 |
- Fixes to build with kernel IPVS support. (Tim Verhoeven)
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Fri Sep 24 2004 Dag Wieers <dag@wieers.com> - 1.1.7-1
|
|
Packit |
c22fc9 |
- Updated to release 1.1.7. (Mathieu Lubrano)
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Mon Feb 23 2004 Dag Wieers <dag@wieers.com> - 1.1.6-0
|
|
Packit |
c22fc9 |
- Updated to release 1.1.6.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Mon Jan 26 2004 Dag Wieers <dag@wieers.com> - 1.1.5-0
|
|
Packit |
c22fc9 |
- Updated to release 1.1.5.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Mon Dec 29 2003 Dag Wieers <dag@wieers.com> - 1.1.4-0
|
|
Packit |
c22fc9 |
- Updated to release 1.1.4.
|
|
Packit |
c22fc9 |
|
|
Packit |
c22fc9 |
* Fri Jun 06 2003 Dag Wieers <dag@wieers.com> - 1.0.3-0
|
|
Packit |
c22fc9 |
- Initial package. (using DAR)
|
|
Packit |
c22fc9 |
|