1 Summary: Common Address Redundancy Protocol (CARP) for Unix
2 Summary(pl.UTF-8): CARP (Common Address Redundancy Protocol) dla Uniksa
7 Group: Applications/Networking
8 Source0: ftp://ftp.ucarp.org/pub/ucarp/%{name}-%{version}.tar.gz
9 # Source0-md5: e3caa733316a32c09e5d3817617e9145
11 Source2: %{name}.sysconfig
12 Source3: %{name}.config.template
13 Source4: %{name}.tmpfiles
14 Source5: ucarp-service-generator
16 Source7: ucarp@.service
17 URL: http://www.ucarp.org/
18 BuildRequires: autoconf
19 BuildRequires: automake
20 BuildRequires: gettext-tools
21 BuildRequires: libpcap-devel
22 BuildRequires: libtool
23 BuildRequires: rpmbuild(macros) >= 1.671
24 BuildRequires: systemd-devel
25 Requires(post,preun): /sbin/chkconfig
26 Requires(post,preun,postun): systemd-units >= 38
27 Requires: systemd-units >= 38
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 UCARP allows a couple of hosts to share common virtual IP addresses in
32 order to provide automatic failover. It is a portable userland
33 implementation of the secure and patent-free Common Address Redundancy
34 Protocol (CARP, OpenBSD's alternative to the VRRP).
36 Strong points of the CARP protocol are: very low overhead,
37 cryptographically signed messages, interoperability between different
38 operating systems and no need for any dedicated extra network link
39 between redundant hosts.
41 %description -l pl.UTF-8
42 UCARP pozwala kilku hostom na dzielenie wspólnych wirtualnych adresów
43 IP w celu automatycznego przejmowania w przypadku awarii. Jest to
44 przenośna implementacja w przestrzeni użytkownika bezpiecznego i
45 wolnego od patentów protokołu CARP (Common Address Redundancy Protocol
46 - alternatywy OpenBSD dla VRRP).
48 Silne punkty protokołu CARP to: bardzo mały narzut, kryptograficznie
49 podpisywanie komunikaty, współdziałanie między różnymi systemami
50 operacyjnymi i brak potrzeby dedykowanego dodatkowego połączenia
51 sieciowego między nadmiarowymi hostami.
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name} \
69 $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig} \
70 $RPM_BUILD_ROOT%{_varrun}/%{name} \
71 $RPM_BUILD_ROOT/usr/lib/tmpfiles.d \
72 $RPM_BUILD_ROOT{%{systemdtmpfilesdir},%{systemdunitdir}} \
73 $RPM_BUILD_ROOT/lib/systemd/system-generators
76 DESTDIR=$RPM_BUILD_ROOT
78 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
79 cp -a %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
80 cp -a %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/config.template
81 install -p examples/linux/vip-down.sh $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
82 install -p examples/linux/vip-up.sh $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
84 install %{SOURCE4} $RPM_BUILD_ROOT/usr/lib/tmpfiles.d/%{name}.conf
86 install -p %{SOURCE5} $RPM_BUILD_ROOT/lib/systemd/system-generators/ucarp-service-generator
87 install -p %{SOURCE6} $RPM_BUILD_ROOT%{systemdunitdir}/ucarp.target
88 install -p %{SOURCE7} $RPM_BUILD_ROOT%{systemdunitdir}/ucarp@.service
89 ln -s /dev/null $RPM_BUILD_ROOT%{systemdunitdir}/ucarp.service
92 rm -rf $RPM_BUILD_ROOT
95 /sbin/chkconfig --add ucarp
96 %service ucarp restart "UCARP"
97 %systemd_post ucarp.target
100 if [ "$1" = "0" ]; then
102 /sbin/chkconfig --del ucarp
104 %systemd_preun ucarp.target
110 %defattr(644,root,root,755)
111 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
112 %attr(754,root,root) /etc/rc.d/init.d/%{name}
113 %attr(755,root,root) /lib/systemd/system-generators/%{name}-service-generator
114 %{systemdunitdir}/%{name}.service
115 %{systemdunitdir}/%{name}.target
116 %{systemdunitdir}/%{name}@.service
117 %attr(755,root,root) %{_sbindir}/*
118 %dir %{_sysconfdir}/%{name}
119 %{_sysconfdir}/%{name}/config.template
120 %attr(750,root,root) %{_sysconfdir}/%{name}/vip-down.sh
121 %attr(750,root,root) %{_sysconfdir}/%{name}/vip-up.sh
122 /usr/lib/tmpfiles.d/%{name}.conf