Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37370801
en ru br
Репозитории ALT
S:2.2.8-alt1
5.1: 1.1.17-alt2
4.1: 1.1.13-alt1
www.altlinux.org/Changes

Группа :: Сети/Прочее
Пакет: keepalived

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define _unpackaged_files_terminate_build 1
%define _localstatedir %_var

%def_enable lvs
%def_enable vrrp
%def_enable bfd
%def_enable fwmark
%def_enable snmp
%def_disable dbus
%def_enable regex
%def_enable json
%def_enable routes
%def_enable libiptc
%def_enable libipset
%def_enable nftables
%def_enable libnl

Name: keepalived
Version: 2.2.8
Release: alt1

Summary: HA monitor built upon LVS, VRRP and services poller
License: GPLv2
Group: Networking/Other

Url: http://www.keepalived.org
Source0: %name-%version.tar
Source1: %name.init
Patch0: 0002-update-systemd-unit-file.patch

BuildRequires: libpopt-devel libssl-devel
BuildRequires: pkgconfig(libkmod)
%{?_enable_libiptc:BuildRequires: pkgconfig(libiptc)}
%{?_enable_libipset:BuildRequires: pkgconfig(libipset)}
%{?_enable_nftables:BuildRequires: pkgconfig(libnftnl) pkgconfig(libmnl)}
%{?_enable_libnl:BuildRequires: pkgconfig(libnl-genl-3.0) pkgconfig(libnl-route-3.0)}
%{?_enable_snmp:BuildRequires: libnet-snmp-devel}
%{?_enable_regex:BuildRequires: pkgconfig(libpcre2-8)}
BuildRequires: libmagic-devel
BuildRequires: systemd-devel

%description
The main goal of the keepalived project is to add a strong & robust keepalive
facility to the Linux Virtual Server project. This project is written in C with
multilayer TCP/IP stack checks. Keepalived implements a framework based on three
family checks : Layer3, Layer4 & Layer5/7. This framework gives the daemon the
ability of checking a LVS server pool states. When one of the server of the LVS
server pool is down, keepalived informs the linux kernel via a setsockopt call
to remove this server entrie from the LVS topology. In addition keepalived implements
an independent VRRPv2 stack to handle director failover. So in short keepalived is a
userspace daemon for LVS cluster nodes healthchecks and LVS directors failover.

%prep
%setup
%patch0 -p1
%ifarch %e2k
# lcc 1.23's edg frontend can only do numbers here (#4061)
sed -i 's,"O0",0,' lib/utils.c
%endif

%build
%autoreconf
%configure \
--with-kernel-dir=/usr/include/linux-default \
--enable-strict-config-checks \
--enable-dynamic-linking \
%{subst_enable lvs} \
%{subst_enable vrrp} \
%{subst_enable bfd} \
%{subst_enable fwmark} \
%{?_enable_snmp:--enable-snmp --enable-snmp-rfc} \
%{subst_enable dbus} \
%{subst_enable regex} \
%{subst_enable json} \
%{subst_enable routes} \
%{?_enable_libiptc:--enable-libiptc-dynamic} \
%{subst_enable libipset} \
%{subst_enable nftables} \
%{?_enable_libnl:--enable-libnl-dynamic} \
--with-init=systemd \
--with-systemdsystemunitdir=%_unitdir

%make_build STRIP=/bin/true

%install
%makeinstall_std
install -pD -m755 %SOURCE1 %buildroot%_initdir/%name
rm -rf %buildroot%_sysconfdir/%name/samples
rm -rf %buildroot%_defaultdocdir/%name
mv %buildroot%_sysconfdir/%name/keepalived.conf.sample \
  %buildroot%_sysconfdir/%name/keepalived.conf

mkdir -p %buildroot%_datadir/mibs/%name
for f in %buildroot%_datadir/snmp/mibs/*.txt; do
   bn=$(basename "$f" .txt)
   mv "$f" "%buildroot%_datadir/mibs/%name/$bn"
done

%preun
%preun_service keepalived

%post
%post_service keepalived

%files
%_bindir/*
%_sbindir/*
%_man1dir/genhash.*
%_man5dir/keepalived.conf.*
%_man8dir/keepalived.*
%_initdir/%name
%_unitdir/%name.service
%dir %_sysconfdir/%name
%config(noreplace) %_sysconfdir/%name/%name.conf
%config(noreplace) %_sysconfdir/sysconfig/%name
%_datadir/mibs/%name

%doc AUTHOR ChangeLog README
%doc doc/keepalived.conf.SYNOPSIS
%doc doc/*-MIB*
%doc doc/*.txt
%doc doc/samples

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin