From d6dd6869c49acd5d9ef318a28ed05c9f39aabc37 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Wed, 14 Mar 2012 10:50:03 -0500 Subject: [PATCH 01/44] Migrate to systemd. --- ucarp | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++++ ucarp.spec | 50 +++++++++++++------ 2 files changed, 177 insertions(+), 15 deletions(-) create mode 100755 ucarp diff --git a/ucarp b/ucarp new file mode 100755 index 0000000..a9e0631 --- /dev/null +++ b/ucarp @@ -0,0 +1,142 @@ +#!/bin/bash + +# Source function library. +. /etc/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +get_files() { + FILES=`find ${CONFDIR} -maxdepth 1 -type f -name 'vip-*.conf' \ + -printf "%f\n" | egrep '^vip-[[:digit:]]+\.conf$' | LC_COLLATE="C" sort` +} + +prog=$"common address redundancy protocol daemon" +LOGGER="/usr/bin/logger -p daemon.notice -t ucarp" +CONFDIR=/etc/ucarp +UPSCRIPT=/usr/libexec/ucarp/vip-up +DOWNSCRIPT=/usr/libexec/ucarp/vip-down + +start() { + RETVAL=-1 + VIP_RETVAL=0 + + echo -n $"Starting ${prog}: " + + get_files + + if [ -z "${FILES}" ]; then + ${LOGGER} "no virtual addresses are configured in ${CONFDIR}" + failure + RETVAL=1 + else + for FILE in ${FILES}; do + # Check that the file name gives us an ID between 1 and 255 + ID=`echo ${FILE}| sed 's/^vip-\(.*\).conf/\1/'` + if [ ${ID} -lt 1 -o ${ID} -gt 255 ]; then + ${LOGGER} "ID out of range (1-255) for ${FILE}, skipped VIP ID ${ID}" + continue + fi + + unset PASSWORD BIND_INTERFACE SOURCE_ADDRESS VIP_ADDRESS OPTIONS + # Source ucarp settings + . ${CONFDIR}/vip-common.conf + . ${CONFDIR}/${FILE} + TMP_RETVAL=0 + + if [ -z "${PASSWORD}" ]; then + ${LOGGER} "no PASSWORD found for ${FILE}, skipped VIP ID ${ID}" + TMP_RETVAL=1 + fi + if [ -z "${BIND_INTERFACE}" ]; then + ${LOGGER} "no BIND_INTERFACE found for ${FILE}, skipped VIP ID ${ID}" + TMP_RETVAL=1 + fi + if [ -z "${SOURCE_ADDRESS}" ]; then + ${LOGGER} "no SOURCE_ADDRESS found for ${FILE}, skipped VIP ID ${ID}" + TMP_RETVAL=1 + fi + if [ -z "${VIP_ADDRESS}" ]; then + ${LOGGER} "no VIP_ADDRESS found for ${FILE}, skipped VIP ID ${ID}" + TMP_RETVAL=1 + fi + + # If one of more of the above failed, skip the daemon launch + if [ ${TMP_RETVAL} -ne 0 ]; then + VIP_RETVAL=1 + continue + fi + + [ ${RETVAL} -eq -1 ] && RETVAL=0 + daemon /usr/sbin/ucarp --daemonize --interface=${BIND_INTERFACE} --pass=${PASSWORD} --srcip=${SOURCE_ADDRESS} --vhid=${ID} --addr=${VIP_ADDRESS} ${OPTIONS} --upscript=$UPSCRIPT --downscript=$DOWNSCRIPT >/dev/null + LAUNCH_RETVAL=$? + [ ${LAUNCH_RETVAL} -ne 0 ] && RETVAL=1 + done + + # failure/success or warning if launch worked with some vip errors + if [ ${RETVAL} -eq 0 -a ${VIP_RETVAL} -eq 0 ]; then + ${LOGGER} "all ucarp configurations were applied successfully" + success + touch /var/lock/subsys/ucarp + elif [ ${RETVAL} -eq 0 -a ${VIP_RETVAL} -eq 1 ]; then + ${LOGGER} "error in one or more of the ucarp configurations" + warning + else + ${LOGGER} "error running one or more of the ucarp daemon instances" + failure + fi + fi + echo +} + +stop() { + echo -n $"Stopping $prog: " + killproc /usr/sbin/ucarp >/dev/null + RETVAL=$? + + # With "--shutdown" in the default OPTIONS, the down script is called + # when ucarp is stopped, so IP addresses are released, no "leftovers". + + # failure/success (no warning, too complicated to handle properly) + if [ ${RETVAL} -eq 1 ]; then + ${LOGGER} "it seems like no ucarp daemon were running" + failure + else + ${LOGGER} "all ucarp daemons stopped and IP addresses unassigned" + success + rm -f /var/lock/subsys/ucarp + fi + echo +} + +# See how we were called. +#case "$1" in +# start) +# start +# ;; +# stop) +# stop +# ;; +# restart) +# stop +# start +# ;; +# condrestart) +# if [ -f /var/lock/subsys/ucarp ]; then +# stop +# start +# fi +# ;; +# status) +# status /usr/sbin/ucarp +# ;; +# *) +# echo $"Usage: $0 {start|stop|restart|condrestart|status}" +# exit 1 +#esac +start +exit $RETVAL + diff --git a/ucarp.spec b/ucarp.spec index 140d261..15c2359 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,22 +1,23 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 3%{?dist} +Release: 4%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons URL: http://www.ucarp.org/ Source0: http://download.pureftpd.org/pub/ucarp/ucarp-%{version}.tar.bz2 -Source1: ucarp.init +Source1: ucarp@.service Source2: vip-001.conf.example Source3: vip-common.conf Source4: vip-up Source5: vip-down #Source6: vip-helper.sh +Source7: ucarp BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -Requires(post): /sbin/chkconfig -Requires(preun): /sbin/chkconfig, /sbin/service -Requires(postun): /sbin/service +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units BuildRequires: gettext BuildRequires: autoconf, automake, libtool BuildRequires: libpcap-devel @@ -45,9 +46,9 @@ need for any dedicated extra network link between redundant hosts. %{__make} install DESTDIR=%{buildroot} %find_lang %{name} -# Install the init script +# Install the unit file %{__install} -D -p -m 0755 %{SOURCE1} \ - %{buildroot}/etc/rc.d/init.d/ucarp + %{buildroot}%{_unitdir}/ucarp@.service %{__mkdir_p} %{buildroot}/etc/ucarp %{__mkdir_p} %{buildroot}%{_libexecdir}/ucarp @@ -57,7 +58,7 @@ need for any dedicated extra network link between redundant hosts. %{buildroot}/etc/ucarp/ # Install helper scripts -%{__install} -D -p -m 0700 %{SOURCE4} %{SOURCE5} \ +%{__install} -D -p -m 0700 %{SOURCE4} %{SOURCE5} %{SOURCE7} \ %{buildroot}%{_libexecdir}/ucarp/ @@ -73,24 +74,40 @@ if [ -f /etc/rc.d/init.d/carp ]; then fi %post -/sbin/chkconfig --add ucarp +if [ $1 -eq 1 ] ; then + # Initial installation + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +fi %preun -if [ $1 -eq 0 ]; then - /sbin/service ucarp stop &>/dev/null || : - /sbin/chkconfig --del ucarp +if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable ucarp@.service > /dev/null 2>&1 || : + /bin/systemctl stop ucarp@.service > /dev/null 2>&1 || : fi %postun -if [ $1 -ge 1 ]; then - /sbin/service ucarp condrestart &>/dev/null || : +/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart ucarp@.service >/dev/null 2>&1 || : fi +%triggerun -- ucarp < 1.5.2-4 +# Save the current service runlevel info +# User must manually run systemd-sysv-convert --apply ucarp +# to migrate them to systemd targets +/usr/bin/systemd-sysv-convert --save ucarp >/dev/null 2>&1 ||: + +# Run these because the SysV package being removed won't do them +/sbin/chkconfig --del ucarp >/dev/null 2>&1 || : +/bin/systemctl try-restart ucarp@.service >/dev/null 2>&1 || : + %files -f %{name}.lang %defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog NEWS README -/etc/rc.d/init.d/ucarp +%{_unitdir}/ucarp@.service %attr(0700,root,root) %dir /etc/ucarp/ %config(noreplace) /etc/ucarp/vip-common.conf /etc/ucarp/vip-001.conf.example @@ -98,6 +115,9 @@ fi %{_sbindir}/ucarp %changelog +* Wed Mar 14 2012 Jon Ciesla - 1.5.2-4 +- Migrate to systemd, BZ 800498. + * Sat Jan 14 2012 Fedora Release Engineering - 1.5.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild From e53bbcc55ba7c18ac831c212f6c745ec223119f9 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Wed, 14 Mar 2012 10:53:57 -0500 Subject: [PATCH 02/44] Add unit file. --- ucarp@.service | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 ucarp@.service diff --git a/ucarp@.service b/ucarp@.service new file mode 100644 index 0000000..f5a63f0 --- /dev/null +++ b/ucarp@.service @@ -0,0 +1,11 @@ +[Unit] +Description=Common address redundancy protocol daemon on %I +After=syslog.target network.target + +[Service] +PrivateTmp=true +Type=forking +ExecStart=/usr/libexec/ucarp/ucarp + +[Install] +WantedBy=multi-user.target From a46ac137b6c34c4abd93607177c69b7d39495626 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Fri, 13 Apr 2012 07:16:33 -0500 Subject: [PATCH 03/44] Add hardened build. --- ucarp.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 15c2359..b2c02c6 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,8 @@ +%define _hardened_build 1 Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 4%{?dist} +Release: 5%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -115,6 +116,9 @@ fi %{_sbindir}/ucarp %changelog +* Fri Apr 13 2012 Jon Ciesla - 1.5.2-5 +- Add hardened build. + * Wed Mar 14 2012 Jon Ciesla - 1.5.2-4 - Migrate to systemd, BZ 800498. From 9b61e32be34c5c7e4c8e9124008af8261331a2cf Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 21 Jul 2012 20:16:11 -0500 Subject: [PATCH 04/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index b2c02c6..531f85e 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 5%{?dist} +Release: 6%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -116,6 +116,9 @@ fi %{_sbindir}/ucarp %changelog +* Sun Jul 22 2012 Fedora Release Engineering - 1.5.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + * Fri Apr 13 2012 Jon Ciesla - 1.5.2-5 - Add hardened build. From ef008cc828bbeba1980d42a700b1ffcf35bb26e6 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Thu, 25 Oct 2012 09:28:56 -0500 Subject: [PATCH 05/44] Fix crash. --- ucarp.spec | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 531f85e..379fc37 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 6%{?dist} +Release: 7%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -15,6 +15,7 @@ Source4: vip-up Source5: vip-down #Source6: vip-helper.sh Source7: ucarp +Patch0: ucarp-1.5.2-sighup.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires(post): systemd-units Requires(preun): systemd-units @@ -36,6 +37,7 @@ need for any dedicated extra network link between redundant hosts. %prep %setup -q +%patch0 -p0 %build %configure @@ -116,6 +118,9 @@ fi %{_sbindir}/ucarp %changelog +* Thu Oct 25 2012 Jon Ciesla - 1.5.2-7 +- Patch to fix crash, BZ 693762. + * Sun Jul 22 2012 Fedora Release Engineering - 1.5.2-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild From 35d35131f902d60308821ce1c8800c2956552f55 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Thu, 25 Oct 2012 09:31:00 -0500 Subject: [PATCH 06/44] Add patch. --- ucarp-1.5.2-sighup.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 ucarp-1.5.2-sighup.patch diff --git a/ucarp-1.5.2-sighup.patch b/ucarp-1.5.2-sighup.patch new file mode 100644 index 0000000..8135233 --- /dev/null +++ b/ucarp-1.5.2-sighup.patch @@ -0,0 +1,10 @@ +--- src/carp.c~ 2010-01-31 15:59:12.000000000 -0600 ++++ src/carp.c 2012-10-25 09:25:54.949976635 -0500 +@@ -762,6 +762,7 @@ + + if (shutdown_at_exit != 0) { + (void) signal(SIGINT, sighandler_exit); ++ (void) signal(SIGHUP, sighandler_exit); + (void) signal(SIGQUIT, sighandler_exit); + (void) signal(SIGTERM, sighandler_exit); + } From e1f5a53f2e6fd948c60ef344b3e8abc87da3e7f5 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 14 Feb 2013 20:19:50 -0600 Subject: [PATCH 07/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 379fc37..5882863 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 7%{?dist} +Release: 8%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -118,6 +118,9 @@ fi %{_sbindir}/ucarp %changelog +* Fri Feb 15 2013 Fedora Release Engineering - 1.5.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + * Thu Oct 25 2012 Jon Ciesla - 1.5.2-7 - Patch to fix crash, BZ 693762. From 17028ce88086a0cdd4df906be9510aa904d2e8cc Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 4 Aug 2013 00:19:26 -0500 Subject: [PATCH 08/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 5882863..ee8083b 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 8%{?dist} +Release: 9%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -118,6 +118,9 @@ fi %{_sbindir}/ucarp %changelog +* Sun Aug 04 2013 Fedora Release Engineering - 1.5.2-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + * Fri Feb 15 2013 Fedora Release Engineering - 1.5.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild From 9f67b01cfc85e60687acc36ce731ee32a84f8de5 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Mon, 5 Aug 2013 12:27:44 -0500 Subject: [PATCH 09/44] Fix FTBFS. --- ucarp.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index ee8083b..be76416 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 9%{?dist} +Release: 10%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -23,6 +23,7 @@ Requires(postun): systemd-units BuildRequires: gettext BuildRequires: autoconf, automake, libtool BuildRequires: libpcap-devel +BuildRequires: systemd %description UCARP allows a couple of hosts to share common virtual IP addresses in order @@ -118,6 +119,9 @@ fi %{_sbindir}/ucarp %changelog +* Mon Aug 05 2013 Jon Ciesla - 1.5.2-10 +- Fix FTBFS, BZ 992829. + * Sun Aug 04 2013 Fedora Release Engineering - 1.5.2-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From f6d89addd0372934c547c1bbd4a4b8f97d3a31eb Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 21:28:05 -0500 Subject: [PATCH 10/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index be76416..045e1de 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 10%{?dist} +Release: 11%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -119,6 +119,9 @@ fi %{_sbindir}/ucarp %changelog +* Sun Jun 08 2014 Fedora Release Engineering - 1.5.2-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Mon Aug 05 2013 Jon Ciesla - 1.5.2-10 - Fix FTBFS, BZ 992829. From e79fe0396b660736defa417652739d08be7013a1 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Mon, 18 Aug 2014 06:38:58 +0000 Subject: [PATCH 11/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 045e1de..e9b0178 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 11%{?dist} +Release: 12%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -119,6 +119,9 @@ fi %{_sbindir}/ucarp %changelog +* Mon Aug 18 2014 Fedora Release Engineering - 1.5.2-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sun Jun 08 2014 Fedora Release Engineering - 1.5.2-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From 186d33b8f1638853ef91beaef96c1f73088a8477 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Thu, 21 Aug 2014 11:53:42 -0600 Subject: [PATCH 12/44] Rebuild for rpm bug 1131960 --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index e9b0178..ee4429f 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 12%{?dist} +Release: 13%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -119,6 +119,9 @@ fi %{_sbindir}/ucarp %changelog +* Thu Aug 21 2014 Kevin Fenzi - 1.5.2-13 +- Rebuild for rpm bug 1131960 + * Mon Aug 18 2014 Fedora Release Engineering - 1.5.2-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 31cec7534a160e94c20b99108cc91b7cac2eb30e Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Fri, 19 Jun 2015 01:24:40 +0000 Subject: [PATCH 13/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index ee4429f..2ea69d6 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 13%{?dist} +Release: 14%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -119,6 +119,9 @@ fi %{_sbindir}/ucarp %changelog +* Fri Jun 19 2015 Fedora Release Engineering - 1.5.2-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Thu Aug 21 2014 Kevin Fenzi - 1.5.2-13 - Rebuild for rpm bug 1131960 From b210e49e0520ce2e5b1ab8a090c23508ad19b6f8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 5 Feb 2016 02:13:31 +0000 Subject: [PATCH 14/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 2ea69d6..f6e6d9b 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 14%{?dist} +Release: 15%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -119,6 +119,9 @@ fi %{_sbindir}/ucarp %changelog +* Fri Feb 05 2016 Fedora Release Engineering - 1.5.2-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Fri Jun 19 2015 Fedora Release Engineering - 1.5.2-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 97aa08af629e04b25f44c7f7fb5564800076b924 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 11 Feb 2017 16:35:58 +0000 Subject: [PATCH 15/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index f6e6d9b..207f4da 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 15%{?dist} +Release: 16%{?dist} # See the COPYING file which details everything License: MIT and BSD Group: System Environment/Daemons @@ -119,6 +119,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Feb 11 2017 Fedora Release Engineering - 1.5.2-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Fri Feb 05 2016 Fedora Release Engineering - 1.5.2-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 5c7ce0317540d9c54b8b90fa8157644801766f64 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Tue, 14 Mar 2017 12:52:37 -0500 Subject: [PATCH 16/44] systemd cleanup --- ucarp.spec | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) diff --git a/ucarp.spec b/ucarp.spec index 207f4da..c8a994e 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,10 +2,9 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 16%{?dist} +Release: 17%{?dist} # See the COPYING file which details everything License: MIT and BSD -Group: System Environment/Daemons URL: http://www.ucarp.org/ Source0: http://download.pureftpd.org/pub/ucarp/ucarp-%{version}.tar.bz2 Source1: ucarp@.service @@ -16,10 +15,6 @@ Source5: vip-down #Source6: vip-helper.sh Source7: ucarp Patch0: ucarp-1.5.2-sighup.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -Requires(post): systemd-units -Requires(preun): systemd-units -Requires(postun): systemd-units BuildRequires: gettext BuildRequires: autoconf, automake, libtool BuildRequires: libpcap-devel @@ -78,34 +73,13 @@ if [ -f /etc/rc.d/init.d/carp ]; then fi %post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post ucarp@.service %preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable ucarp@.service > /dev/null 2>&1 || : - /bin/systemctl stop ucarp@.service > /dev/null 2>&1 || : -fi +%systemd_preun ucarp@.service %postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart ucarp@.service >/dev/null 2>&1 || : -fi - -%triggerun -- ucarp < 1.5.2-4 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply ucarp -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save ucarp >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del ucarp >/dev/null 2>&1 || : -/bin/systemctl try-restart ucarp@.service >/dev/null 2>&1 || : +%systemd_postun_with_restart ucarp@.service %files -f %{name}.lang @@ -119,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Tue Mar 14 2017 Jon Ciesla - 1.5.2-17 +- systemd cleanup + * Sat Feb 11 2017 Fedora Release Engineering - 1.5.2-16 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 01909a11dec3b53ec26d9742e889a05824b2479b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 27 Jul 2017 20:51:40 +0000 Subject: [PATCH 17/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index c8a994e..bd938d7 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 17%{?dist} +Release: 18%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Thu Jul 27 2017 Fedora Release Engineering - 1.5.2-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Tue Mar 14 2017 Jon Ciesla - 1.5.2-17 - systemd cleanup From 4907124fd340b18d6ce5f3f4c116f09d5a52ced4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 09:41:32 +0000 Subject: [PATCH 18/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index bd938d7..ae19873 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 18%{?dist} +Release: 19%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 1.5.2-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Thu Jul 27 2017 Fedora Release Engineering - 1.5.2-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 1f9279f88627db33241859f67e2bb7353fa36052 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Tue, 8 Aug 2017 12:07:57 -0500 Subject: [PATCH 19/44] Unit file fix. --- ucarp.spec | 5 ++++- ucarp@.service | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ucarp.spec b/ucarp.spec index ae19873..123ba3e 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 19%{?dist} +Release: 20%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Tue Aug 08 2017 Gwyn Ciesla - 1.5.2-20 +- Correct unit file target. + * Thu Aug 03 2017 Fedora Release Engineering - 1.5.2-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild diff --git a/ucarp@.service b/ucarp@.service index f5a63f0..8097cf7 100644 --- a/ucarp@.service +++ b/ucarp@.service @@ -1,6 +1,6 @@ [Unit] Description=Common address redundancy protocol daemon on %I -After=syslog.target network.target +After=syslog.target network-online.target [Service] PrivateTmp=true From 63773ac56d0b58b7aaa34618a5c83e71f6216b46 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 9 Feb 2018 19:50:47 +0000 Subject: [PATCH 20/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 123ba3e..e4daf0a 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 20%{?dist} +Release: 21%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Fri Feb 09 2018 Fedora Release Engineering - 1.5.2-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Tue Aug 08 2017 Gwyn Ciesla - 1.5.2-20 - Correct unit file target. From 305f99180dddd63fb3e04e016df7539e225ad907 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Wed, 14 Feb 2018 09:13:50 +0100 Subject: [PATCH 21/44] Remove %clean section None of currently supported distributions need that. Last one was EL5 which is EOL for a while. Signed-off-by: Igor Gnatenko --- ucarp.spec | 3 --- 1 file changed, 3 deletions(-) diff --git a/ucarp.spec b/ucarp.spec index e4daf0a..c009716 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -61,9 +61,6 @@ need for any dedicated extra network link between redundant hosts. %{buildroot}%{_libexecdir}/ucarp/ -%clean -%{__rm} -rf %{buildroot} - %pre # Legacy, in case we update from an older package where the service was "carp" From d5dcab08e2356918a59b76d7615d7ea18898f83b Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Tue, 27 Feb 2018 08:23:51 -0600 Subject: [PATCH 22/44] Move from PASSWORD to PASSFILE. --- ucarp | 17 ++++++++++------- ucarp.spec | 9 +++++++-- ucarp@.service | 4 ++-- vip-001.pwd.example | 1 + vip-common.conf | 2 +- 5 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 vip-001.pwd.example diff --git a/ucarp b/ucarp index a9e0631..284de14 100755 --- a/ucarp +++ b/ucarp @@ -7,10 +7,11 @@ . /etc/sysconfig/network # Check that networking is up. -[ ${NETWORKING} = "no" ] && exit 0 +#[ ${NETWORKING} = "no" ] && exit 0 get_files() { - FILES=`find ${CONFDIR} -maxdepth 1 -type f -name 'vip-*.conf' \ + _cfg=$1 + FILES=`find ${CONFDIR} -maxdepth 1 -type f -name "vip-${_cfg}.conf" \ -printf "%f\n" | egrep '^vip-[[:digit:]]+\.conf$' | LC_COLLATE="C" sort` } @@ -20,13 +21,15 @@ CONFDIR=/etc/ucarp UPSCRIPT=/usr/libexec/ucarp/vip-up DOWNSCRIPT=/usr/libexec/ucarp/vip-down +config=$2 + start() { RETVAL=-1 VIP_RETVAL=0 echo -n $"Starting ${prog}: " - get_files + get_files $config if [ -z "${FILES}" ]; then ${LOGGER} "no virtual addresses are configured in ${CONFDIR}" @@ -41,14 +44,14 @@ start() { continue fi - unset PASSWORD BIND_INTERFACE SOURCE_ADDRESS VIP_ADDRESS OPTIONS + #unset PASSWORD BIND_INTERFACE SOURCE_ADDRESS VIP_ADDRESS OPTIONS # Source ucarp settings . ${CONFDIR}/vip-common.conf . ${CONFDIR}/${FILE} TMP_RETVAL=0 - if [ -z "${PASSWORD}" ]; then - ${LOGGER} "no PASSWORD found for ${FILE}, skipped VIP ID ${ID}" + if [ -z "${PASSFILE}" ]; then + ${LOGGER} "no PASSFILE found for ${FILE}, skipped VIP ID ${ID}" TMP_RETVAL=1 fi if [ -z "${BIND_INTERFACE}" ]; then @@ -71,7 +74,7 @@ start() { fi [ ${RETVAL} -eq -1 ] && RETVAL=0 - daemon /usr/sbin/ucarp --daemonize --interface=${BIND_INTERFACE} --pass=${PASSWORD} --srcip=${SOURCE_ADDRESS} --vhid=${ID} --addr=${VIP_ADDRESS} ${OPTIONS} --upscript=$UPSCRIPT --downscript=$DOWNSCRIPT >/dev/null + daemon /usr/sbin/ucarp --daemonize --interface=${BIND_INTERFACE} --passfile=${PASSFILE} --srcip=${SOURCE_ADDRESS} --vhid=${ID} --addr=${VIP_ADDRESS} ${OPTIONS} --upscript=$UPSCRIPT --downscript=$DOWNSCRIPT >/dev/null LAUNCH_RETVAL=$? [ ${LAUNCH_RETVAL} -ne 0 ] && RETVAL=1 done diff --git a/ucarp.spec b/ucarp.spec index c009716..6b7a269 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 21%{?dist} +Release: 22%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -14,6 +14,7 @@ Source4: vip-up Source5: vip-down #Source6: vip-helper.sh Source7: ucarp +Source8: vip-001.pwd.example Patch0: ucarp-1.5.2-sighup.patch BuildRequires: gettext BuildRequires: autoconf, automake, libtool @@ -53,7 +54,7 @@ need for any dedicated extra network link between redundant hosts. %{__mkdir_p} %{buildroot}%{_libexecdir}/ucarp # Install the example config files -%{__install} -D -p -m 0600 %{SOURCE2} %{SOURCE3} \ +%{__install} -D -p -m 0600 %{SOURCE2} %{SOURCE3} %{SOURCE8} \ %{buildroot}/etc/ucarp/ # Install helper scripts @@ -86,10 +87,14 @@ fi %attr(0700,root,root) %dir /etc/ucarp/ %config(noreplace) /etc/ucarp/vip-common.conf /etc/ucarp/vip-001.conf.example +/etc/ucarp/vip-001.pwd.example %config(noreplace) %{_libexecdir}/ucarp/ %{_sbindir}/ucarp %changelog +* Mon Feb 26 2018 Gwyn Ciesla - 1.5.2-22 +- Incorporate systemd tweaks from Hans-Werner Jouy. + * Fri Feb 09 2018 Fedora Release Engineering - 1.5.2-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild diff --git a/ucarp@.service b/ucarp@.service index 8097cf7..e4ef795 100644 --- a/ucarp@.service +++ b/ucarp@.service @@ -1,11 +1,11 @@ [Unit] -Description=Common address redundancy protocol daemon on %I +Description=Common address redundancy protocol daemon, config: vip-%I.conf After=syslog.target network-online.target [Service] PrivateTmp=true Type=forking -ExecStart=/usr/libexec/ucarp/ucarp +ExecStart=/usr/libexec/ucarp/ucarp start %i [Install] WantedBy=multi-user.target diff --git a/vip-001.pwd.example b/vip-001.pwd.example new file mode 100644 index 0000000..00e6690 --- /dev/null +++ b/vip-001.pwd.example @@ -0,0 +1 @@ +love diff --git a/vip-common.conf b/vip-common.conf index 1a858b4..85dae52 100644 --- a/vip-common.conf +++ b/vip-common.conf @@ -1,5 +1,5 @@ # Common VIP settings which can be overridden in individual vip-.conf -PASSWORD="love" +PASSFILE=/etc/ucarp/vip-001.pwd BIND_INTERFACE="eth0" SOURCE_ADDRESS="" From 5a85ed75369d058b46d40f421c83bcf6ed8a5a21 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Tue, 10 Jul 2018 01:40:30 -0500 Subject: [PATCH 23/44] Remove needless use of %defattr --- ucarp.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 6b7a269..edda46b 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -81,7 +81,6 @@ fi %files -f %{name}.lang -%defattr(-,root,root,-) %doc AUTHORS COPYING ChangeLog NEWS README %{_unitdir}/ucarp@.service %attr(0700,root,root) %dir /etc/ucarp/ From 1f0f5d5b4539c5ea64c444dfe38195d0d29120ad Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 14 Jul 2018 08:07:29 +0000 Subject: [PATCH 24/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index edda46b..3126d94 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 22%{?dist} +Release: 23%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -91,6 +91,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jul 14 2018 Fedora Release Engineering - 1.5.2-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Mon Feb 26 2018 Gwyn Ciesla - 1.5.2-22 - Incorporate systemd tweaks from Hans-Werner Jouy. From 5a1034bcdcacaaf0982caf9358ade511bee2ea49 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 3 Feb 2019 10:38:19 +0000 Subject: [PATCH 25/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 3126d94..0fbc95b 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 23%{?dist} +Release: 24%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -91,6 +91,9 @@ fi %{_sbindir}/ucarp %changelog +* Sun Feb 03 2019 Fedora Release Engineering - 1.5.2-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Sat Jul 14 2018 Fedora Release Engineering - 1.5.2-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 776b2f8823a57314091eba365ca028761a7b0cb1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jul 2019 02:17:30 +0000 Subject: [PATCH 26/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 0fbc95b..1ce5300 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 24%{?dist} +Release: 25%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -91,6 +91,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jul 27 2019 Fedora Release Engineering - 1.5.2-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + * Sun Feb 03 2019 Fedora Release Engineering - 1.5.2-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From de9172954165a63410720e0ad70189fad6725075 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 31 Jan 2020 02:24:09 +0000 Subject: [PATCH 27/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 1ce5300..8124a7b 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 25%{?dist} +Release: 26%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -91,6 +91,9 @@ fi %{_sbindir}/ucarp %changelog +* Fri Jan 31 2020 Fedora Release Engineering - 1.5.2-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Sat Jul 27 2019 Fedora Release Engineering - 1.5.2-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild From 175818c8e1f4ba72e78f9331a105db77b69d2789 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Mon, 10 Feb 2020 13:46:07 -0600 Subject: [PATCH 28/44] Fix FTBFS. --- ucarp.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ucarp.spec b/ucarp.spec index 8124a7b..a145205 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 26%{?dist} +Release: 27%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -37,12 +37,12 @@ need for any dedicated extra network link between redundant hosts. %patch0 -p0 %build +export CPPFLAGS="$CPPFLAGS -fcommon" %configure %{__make} %{?_smp_mflags} %install -%{__rm} -rf %{buildroot} %{__make} install DESTDIR=%{buildroot} %find_lang %{name} @@ -81,7 +81,8 @@ fi %files -f %{name}.lang -%doc AUTHORS COPYING ChangeLog NEWS README +%license COPYING +%doc AUTHORS ChangeLog NEWS README %{_unitdir}/ucarp@.service %attr(0700,root,root) %dir /etc/ucarp/ %config(noreplace) /etc/ucarp/vip-common.conf @@ -91,6 +92,9 @@ fi %{_sbindir}/ucarp %changelog +* Mon Feb 10 2020 Gwyn Ciesla - 1.5.2-27 +- Fix FTBFS. + * Fri Jan 31 2020 Fedora Release Engineering - 1.5.2-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From f50886b60c8f08415e70f726c6aeacb6cbaec31d Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 13:08:27 +0000 Subject: [PATCH 29/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index a145205..870f26b 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 27%{?dist} +Release: 28%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -92,6 +92,9 @@ fi %{_sbindir}/ucarp %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 1.5.2-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Mon Feb 10 2020 Gwyn Ciesla - 1.5.2-27 - Fix FTBFS. From cc1a63916fdf5823a608c49846d26d3e59799214 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Sat, 9 Jan 2021 00:16:38 +0000 Subject: [PATCH 30/44] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- ucarp.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ucarp.spec b/ucarp.spec index 870f26b..29c1010 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -16,6 +16,7 @@ Source5: vip-down Source7: ucarp Source8: vip-001.pwd.example Patch0: ucarp-1.5.2-sighup.patch +BuildRequires: make BuildRequires: gettext BuildRequires: autoconf, automake, libtool BuildRequires: libpcap-devel From 3b54f725247464c499e489448309e3d384a34bf2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 22:32:18 +0000 Subject: [PATCH 31/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 29c1010..b9a8768 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 28%{?dist} +Release: 29%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.5.2-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Wed Jul 29 2020 Fedora Release Engineering - 1.5.2-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From ac371a9a0f8e0e91626db61b0bd248dda79e323b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 2 Mar 2021 16:12:07 +0100 Subject: [PATCH 32/44] Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. --- ucarp.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index b9a8768..71ea3c4 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 29%{?dist} +Release: 30%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,10 @@ fi %{_sbindir}/ucarp %changelog +* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 1.5.2-30 +- Rebuilt for updated systemd-rpm-macros + See https://pagure.io/fesco/issue/2583. + * Wed Jan 27 2021 Fedora Release Engineering - 1.5.2-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From 35e9a36e52d4f7fe9b4d649ab029653e6ff25d4b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 23 Jul 2021 19:53:33 +0000 Subject: [PATCH 33/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 71ea3c4..64f7b72 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 30%{?dist} +Release: 31%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Fri Jul 23 2021 Fedora Release Engineering - 1.5.2-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 1.5.2-30 - Rebuilt for updated systemd-rpm-macros See https://pagure.io/fesco/issue/2583. From 9bf991c5715fcc1fa13b6f0224243de07c121a07 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jan 2022 03:22:35 +0000 Subject: [PATCH 34/44] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 64f7b72..6002ad0 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 31%{?dist} +Release: 32%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jan 22 2022 Fedora Release Engineering - 1.5.2-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Fri Jul 23 2021 Fedora Release Engineering - 1.5.2-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 1daec872df9ddc3b7d69b6d7ef9d1630c5508d03 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 23 Jul 2022 11:14:05 +0000 Subject: [PATCH 35/44] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 6002ad0..fa57539 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 32%{?dist} +Release: 33%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jul 23 2022 Fedora Release Engineering - 1.5.2-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Sat Jan 22 2022 Fedora Release Engineering - 1.5.2-32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 67176127f72d7b47096ac03854608403f4ba7767 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 21 Jan 2023 05:38:53 +0000 Subject: [PATCH 36/44] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index fa57539..b6d615f 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 33%{?dist} +Release: 34%{?dist} # See the COPYING file which details everything License: MIT and BSD URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jan 21 2023 Fedora Release Engineering - 1.5.2-34 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Sat Jul 23 2022 Fedora Release Engineering - 1.5.2-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From 3d0685ad49bd31f295fed92756a119c40d0dd8d6 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Tue, 7 Mar 2023 11:38:24 -0600 Subject: [PATCH 37/44] migrated to SPDX license --- ucarp.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ucarp.spec b/ucarp.spec index b6d615f..0ad6162 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,9 +2,9 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 34%{?dist} +Release: 35%{?dist} # See the COPYING file which details everything -License: MIT and BSD +License: ISC AND BSD-2-Clause URL: http://www.ucarp.org/ Source0: http://download.pureftpd.org/pub/ucarp/ucarp-%{version}.tar.bz2 Source1: ucarp@.service @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Tue Mar 07 2023 Gwyn Ciesla - 1.5.2-35 +- migrated to SPDX license + * Sat Jan 21 2023 Fedora Release Engineering - 1.5.2-34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 45c2bbe93c76bc9204c49f17c2b938f8f3fa9451 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 22 Jul 2023 16:57:35 +0000 Subject: [PATCH 38/44] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 0ad6162..81b9191 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 35%{?dist} +Release: 36%{?dist} # See the COPYING file which details everything License: ISC AND BSD-2-Clause URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jul 22 2023 Fedora Release Engineering - 1.5.2-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Tue Mar 07 2023 Gwyn Ciesla - 1.5.2-35 - migrated to SPDX license From 1e6ea6df1ff0e4e27f57ab2f02f146c22ed219cd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 27 Jan 2024 06:56:49 +0000 Subject: [PATCH 39/44] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 81b9191..562d0ef 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 36%{?dist} +Release: 37%{?dist} # See the COPYING file which details everything License: ISC AND BSD-2-Clause URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jan 27 2024 Fedora Release Engineering - 1.5.2-37 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sat Jul 22 2023 Fedora Release Engineering - 1.5.2-36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From c102942de237aac4aaca16d8d80a8fb8b3bdcdb8 Mon Sep 17 00:00:00 2001 From: Software Management Team Date: Thu, 30 May 2024 12:46:49 +0200 Subject: [PATCH 40/44] Eliminate use of obsolete %patchN syntax (#2283636) --- ucarp.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index 562d0ef..a93f114 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -35,7 +35,7 @@ need for any dedicated extra network link between redundant hosts. %prep %setup -q -%patch0 -p0 +%patch -P0 -p0 %build export CPPFLAGS="$CPPFLAGS -fcommon" From a90c26ed6693bfd0526a37bebd021358db5048c8 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 20 Jul 2024 08:06:13 +0000 Subject: [PATCH 41/44] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index a93f114..9a3466c 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -2,7 +2,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 37%{?dist} +Release: 38%{?dist} # See the COPYING file which details everything License: ISC AND BSD-2-Clause URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Sat Jul 20 2024 Fedora Release Engineering - 1.5.2-38 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Sat Jan 27 2024 Fedora Release Engineering - 1.5.2-37 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From a940a0f63cd8f2460815e805bbc9cd0e85ade43c Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Tue, 26 Nov 2024 09:29:58 -0600 Subject: [PATCH 42/44] Require initscripts --- ucarp.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ucarp.spec b/ucarp.spec index 9a3466c..d22124a 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,8 +1,7 @@ -%define _hardened_build 1 Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 38%{?dist} +Release: 39%{?dist} # See the COPYING file which details everything License: ISC AND BSD-2-Clause URL: http://www.ucarp.org/ @@ -21,6 +20,7 @@ BuildRequires: gettext BuildRequires: autoconf, automake, libtool BuildRequires: libpcap-devel BuildRequires: systemd +Requires: initscripts %description UCARP allows a couple of hosts to share common virtual IP addresses in order @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Tue Nov 26 2024 Gwyn Ciesla - 1.5.2-39 +- Require initscripts + * Sat Jul 20 2024 Fedora Release Engineering - 1.5.2-38 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From ddd2056b329069e71dbfaef16352efbee143bdcc Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 19 Jan 2025 13:34:34 +0000 Subject: [PATCH 43/44] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- ucarp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ucarp.spec b/ucarp.spec index d22124a..373b9ae 100644 --- a/ucarp.spec +++ b/ucarp.spec @@ -1,7 +1,7 @@ Summary: Common Address Redundancy Protocol (CARP) for Unix Name: ucarp Version: 1.5.2 -Release: 39%{?dist} +Release: 40%{?dist} # See the COPYING file which details everything License: ISC AND BSD-2-Clause URL: http://www.ucarp.org/ @@ -93,6 +93,9 @@ fi %{_sbindir}/ucarp %changelog +* Sun Jan 19 2025 Fedora Release Engineering - 1.5.2-40 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Tue Nov 26 2024 Gwyn Ciesla - 1.5.2-39 - Require initscripts From 5c633991d89f8a936023b0d7fff2f0350c079f94 Mon Sep 17 00:00:00 2001 From: Gwyn Ciesla Date: Thu, 8 May 2025 09:31:17 -0500 Subject: [PATCH 44/44] Dead upstream, old website NSFW --- .gitignore | 1 - dead.package | 1 + sources | 1 - ucarp | 145 ------------------- ucarp-1.5.2-sighup.patch | 10 -- ucarp.init | 156 --------------------- ucarp.spec | 296 --------------------------------------- ucarp@.service | 11 -- vip-001.conf.example | 10 -- vip-001.pwd.example | 1 - vip-common.conf | 8 -- vip-down | 5 - vip-up | 5 - 13 files changed, 1 insertion(+), 649 deletions(-) delete mode 100644 .gitignore create mode 100644 dead.package delete mode 100644 sources delete mode 100755 ucarp delete mode 100644 ucarp-1.5.2-sighup.patch delete mode 100755 ucarp.init delete mode 100644 ucarp.spec delete mode 100644 ucarp@.service delete mode 100644 vip-001.conf.example delete mode 100644 vip-001.pwd.example delete mode 100644 vip-common.conf delete mode 100755 vip-down delete mode 100755 vip-up diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 23c53b8..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -ucarp-1.5.2.tar.bz2 diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..4f2ec91 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Dead upstream, old website NSFW diff --git a/sources b/sources deleted file mode 100644 index a0b412a..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -723636dbf79fc6abd329a71ec4ddf79d ucarp-1.5.2.tar.bz2 diff --git a/ucarp b/ucarp deleted file mode 100755 index 284de14..0000000 --- a/ucarp +++ /dev/null @@ -1,145 +0,0 @@ -#!/bin/bash - -# Source function library. -. /etc/init.d/functions - -# Source networking configuration. -. /etc/sysconfig/network - -# Check that networking is up. -#[ ${NETWORKING} = "no" ] && exit 0 - -get_files() { - _cfg=$1 - FILES=`find ${CONFDIR} -maxdepth 1 -type f -name "vip-${_cfg}.conf" \ - -printf "%f\n" | egrep '^vip-[[:digit:]]+\.conf$' | LC_COLLATE="C" sort` -} - -prog=$"common address redundancy protocol daemon" -LOGGER="/usr/bin/logger -p daemon.notice -t ucarp" -CONFDIR=/etc/ucarp -UPSCRIPT=/usr/libexec/ucarp/vip-up -DOWNSCRIPT=/usr/libexec/ucarp/vip-down - -config=$2 - -start() { - RETVAL=-1 - VIP_RETVAL=0 - - echo -n $"Starting ${prog}: " - - get_files $config - - if [ -z "${FILES}" ]; then - ${LOGGER} "no virtual addresses are configured in ${CONFDIR}" - failure - RETVAL=1 - else - for FILE in ${FILES}; do - # Check that the file name gives us an ID between 1 and 255 - ID=`echo ${FILE}| sed 's/^vip-\(.*\).conf/\1/'` - if [ ${ID} -lt 1 -o ${ID} -gt 255 ]; then - ${LOGGER} "ID out of range (1-255) for ${FILE}, skipped VIP ID ${ID}" - continue - fi - - #unset PASSWORD BIND_INTERFACE SOURCE_ADDRESS VIP_ADDRESS OPTIONS - # Source ucarp settings - . ${CONFDIR}/vip-common.conf - . ${CONFDIR}/${FILE} - TMP_RETVAL=0 - - if [ -z "${PASSFILE}" ]; then - ${LOGGER} "no PASSFILE found for ${FILE}, skipped VIP ID ${ID}" - TMP_RETVAL=1 - fi - if [ -z "${BIND_INTERFACE}" ]; then - ${LOGGER} "no BIND_INTERFACE found for ${FILE}, skipped VIP ID ${ID}" - TMP_RETVAL=1 - fi - if [ -z "${SOURCE_ADDRESS}" ]; then - ${LOGGER} "no SOURCE_ADDRESS found for ${FILE}, skipped VIP ID ${ID}" - TMP_RETVAL=1 - fi - if [ -z "${VIP_ADDRESS}" ]; then - ${LOGGER} "no VIP_ADDRESS found for ${FILE}, skipped VIP ID ${ID}" - TMP_RETVAL=1 - fi - - # If one of more of the above failed, skip the daemon launch - if [ ${TMP_RETVAL} -ne 0 ]; then - VIP_RETVAL=1 - continue - fi - - [ ${RETVAL} -eq -1 ] && RETVAL=0 - daemon /usr/sbin/ucarp --daemonize --interface=${BIND_INTERFACE} --passfile=${PASSFILE} --srcip=${SOURCE_ADDRESS} --vhid=${ID} --addr=${VIP_ADDRESS} ${OPTIONS} --upscript=$UPSCRIPT --downscript=$DOWNSCRIPT >/dev/null - LAUNCH_RETVAL=$? - [ ${LAUNCH_RETVAL} -ne 0 ] && RETVAL=1 - done - - # failure/success or warning if launch worked with some vip errors - if [ ${RETVAL} -eq 0 -a ${VIP_RETVAL} -eq 0 ]; then - ${LOGGER} "all ucarp configurations were applied successfully" - success - touch /var/lock/subsys/ucarp - elif [ ${RETVAL} -eq 0 -a ${VIP_RETVAL} -eq 1 ]; then - ${LOGGER} "error in one or more of the ucarp configurations" - warning - else - ${LOGGER} "error running one or more of the ucarp daemon instances" - failure - fi - fi - echo -} - -stop() { - echo -n $"Stopping $prog: " - killproc /usr/sbin/ucarp >/dev/null - RETVAL=$? - - # With "--shutdown" in the default OPTIONS, the down script is called - # when ucarp is stopped, so IP addresses are released, no "leftovers". - - # failure/success (no warning, too complicated to handle properly) - if [ ${RETVAL} -eq 1 ]; then - ${LOGGER} "it seems like no ucarp daemon were running" - failure - else - ${LOGGER} "all ucarp daemons stopped and IP addresses unassigned" - success - rm -f /var/lock/subsys/ucarp - fi - echo -} - -# See how we were called. -#case "$1" in -# start) -# start -# ;; -# stop) -# stop -# ;; -# restart) -# stop -# start -# ;; -# condrestart) -# if [ -f /var/lock/subsys/ucarp ]; then -# stop -# start -# fi -# ;; -# status) -# status /usr/sbin/ucarp -# ;; -# *) -# echo $"Usage: $0 {start|stop|restart|condrestart|status}" -# exit 1 -#esac -start -exit $RETVAL - diff --git a/ucarp-1.5.2-sighup.patch b/ucarp-1.5.2-sighup.patch deleted file mode 100644 index 8135233..0000000 --- a/ucarp-1.5.2-sighup.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- src/carp.c~ 2010-01-31 15:59:12.000000000 -0600 -+++ src/carp.c 2012-10-25 09:25:54.949976635 -0500 -@@ -762,6 +762,7 @@ - - if (shutdown_at_exit != 0) { - (void) signal(SIGINT, sighandler_exit); -+ (void) signal(SIGHUP, sighandler_exit); - (void) signal(SIGQUIT, sighandler_exit); - (void) signal(SIGTERM, sighandler_exit); - } diff --git a/ucarp.init b/ucarp.init deleted file mode 100755 index c7f6296..0000000 --- a/ucarp.init +++ /dev/null @@ -1,156 +0,0 @@ -#!/bin/bash -# $Id$ -# -# chkconfig: - 91 09 -# description: Starts and stops the common address redundancy protocol daemon - -### BEGIN INIT INFO -# Provides: lsb-ucarp -# Required-Start: $local_fs $network $remote_fs -# Required-Stop: $local_fs $network $remote_fs -# Default-Start: -# Default-Stop: 0 1 6 -# Short-Description: start and stop ucarp -# Description: Common Address Redundancy Protocol (CARP) for Unix -### END INIT INFO - -# Source function library. -. /etc/init.d/functions - -# Source networking configuration. -. /etc/sysconfig/network - -# Check that networking is up. -[ ${NETWORKING} = "no" ] && exit 0 - -get_files() { - FILES=`find ${CONFDIR} -maxdepth 1 -type f -name 'vip-*.conf' \ - -printf "%f\n" | egrep '^vip-[[:digit:]]+\.conf$' | LC_COLLATE="C" sort` -} - -prog=$"common address redundancy protocol daemon" -LOGGER="/usr/bin/logger -p daemon.notice -t ucarp" -CONFDIR=/etc/ucarp -UPSCRIPT=/usr/libexec/ucarp/vip-up -DOWNSCRIPT=/usr/libexec/ucarp/vip-down - -start() { - RETVAL=-1 - VIP_RETVAL=0 - - echo -n $"Starting ${prog}: " - - get_files - - if [ -z "${FILES}" ]; then - ${LOGGER} "no virtual addresses are configured in ${CONFDIR}" - failure - RETVAL=1 - else - for FILE in ${FILES}; do - # Check that the file name gives us an ID between 1 and 255 - ID=`echo ${FILE}| sed 's/^vip-\(.*\).conf/\1/'` - if [ ${ID} -lt 1 -o ${ID} -gt 255 ]; then - ${LOGGER} "ID out of range (1-255) for ${FILE}, skipped VIP ID ${ID}" - continue - fi - - unset PASSWORD BIND_INTERFACE SOURCE_ADDRESS VIP_ADDRESS OPTIONS - # Source ucarp settings - . ${CONFDIR}/vip-common.conf - . ${CONFDIR}/${FILE} - TMP_RETVAL=0 - - if [ -z "${PASSWORD}" ]; then - ${LOGGER} "no PASSWORD found for ${FILE}, skipped VIP ID ${ID}" - TMP_RETVAL=1 - fi - if [ -z "${BIND_INTERFACE}" ]; then - ${LOGGER} "no BIND_INTERFACE found for ${FILE}, skipped VIP ID ${ID}" - TMP_RETVAL=1 - fi - if [ -z "${SOURCE_ADDRESS}" ]; then - ${LOGGER} "no SOURCE_ADDRESS found for ${FILE}, skipped VIP ID ${ID}" - TMP_RETVAL=1 - fi - if [ -z "${VIP_ADDRESS}" ]; then - ${LOGGER} "no VIP_ADDRESS found for ${FILE}, skipped VIP ID ${ID}" - TMP_RETVAL=1 - fi - - # If one of more of the above failed, skip the daemon launch - if [ ${TMP_RETVAL} -ne 0 ]; then - VIP_RETVAL=1 - continue - fi - - [ ${RETVAL} -eq -1 ] && RETVAL=0 - daemon /usr/sbin/ucarp --daemonize --interface=${BIND_INTERFACE} --pass=${PASSWORD} --srcip=${SOURCE_ADDRESS} --vhid=${ID} --addr=${VIP_ADDRESS} ${OPTIONS} --upscript=$UPSCRIPT --downscript=$DOWNSCRIPT >/dev/null - LAUNCH_RETVAL=$? - [ ${LAUNCH_RETVAL} -ne 0 ] && RETVAL=1 - done - - # failure/success or warning if launch worked with some vip errors - if [ ${RETVAL} -eq 0 -a ${VIP_RETVAL} -eq 0 ]; then - ${LOGGER} "all ucarp configurations were applied successfully" - success - touch /var/lock/subsys/ucarp - elif [ ${RETVAL} -eq 0 -a ${VIP_RETVAL} -eq 1 ]; then - ${LOGGER} "error in one or more of the ucarp configurations" - warning - else - ${LOGGER} "error running one or more of the ucarp daemon instances" - failure - fi - fi - echo -} - -stop() { - echo -n $"Stopping $prog: " - killproc /usr/sbin/ucarp >/dev/null - RETVAL=$? - - # With "--shutdown" in the default OPTIONS, the down script is called - # when ucarp is stopped, so IP addresses are released, no "leftovers". - - # failure/success (no warning, too complicated to handle properly) - if [ ${RETVAL} -eq 1 ]; then - ${LOGGER} "it seems like no ucarp daemon were running" - failure - else - ${LOGGER} "all ucarp daemons stopped and IP addresses unassigned" - success - rm -f /var/lock/subsys/ucarp - fi - echo -} - -# See how we were called. -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - stop - start - ;; - condrestart) - if [ -f /var/lock/subsys/ucarp ]; then - stop - start - fi - ;; - status) - status /usr/sbin/ucarp - ;; - *) - echo $"Usage: $0 {start|stop|restart|condrestart|status}" - exit 1 -esac - -exit $RETVAL - diff --git a/ucarp.spec b/ucarp.spec deleted file mode 100644 index 373b9ae..0000000 --- a/ucarp.spec +++ /dev/null @@ -1,296 +0,0 @@ -Summary: Common Address Redundancy Protocol (CARP) for Unix -Name: ucarp -Version: 1.5.2 -Release: 40%{?dist} -# See the COPYING file which details everything -License: ISC AND BSD-2-Clause -URL: http://www.ucarp.org/ -Source0: http://download.pureftpd.org/pub/ucarp/ucarp-%{version}.tar.bz2 -Source1: ucarp@.service -Source2: vip-001.conf.example -Source3: vip-common.conf -Source4: vip-up -Source5: vip-down -#Source6: vip-helper.sh -Source7: ucarp -Source8: vip-001.pwd.example -Patch0: ucarp-1.5.2-sighup.patch -BuildRequires: make -BuildRequires: gettext -BuildRequires: autoconf, automake, libtool -BuildRequires: libpcap-devel -BuildRequires: systemd -Requires: initscripts - -%description -UCARP allows a couple of hosts to share common virtual IP addresses in order -to provide automatic failover. It is a portable userland implementation of the -secure and patent-free Common Address Redundancy Protocol (CARP, OpenBSD's -alternative to the patents-bloated VRRP). -Strong points of the CARP protocol are: very low overhead, cryptographically -signed messages, interoperability between different operating systems and no -need for any dedicated extra network link between redundant hosts. - - -%prep -%setup -q - -%patch -P0 -p0 - -%build -export CPPFLAGS="$CPPFLAGS -fcommon" -%configure -%{__make} %{?_smp_mflags} - - -%install -%{__make} install DESTDIR=%{buildroot} -%find_lang %{name} - -# Install the unit file -%{__install} -D -p -m 0755 %{SOURCE1} \ - %{buildroot}%{_unitdir}/ucarp@.service - -%{__mkdir_p} %{buildroot}/etc/ucarp -%{__mkdir_p} %{buildroot}%{_libexecdir}/ucarp - -# Install the example config files -%{__install} -D -p -m 0600 %{SOURCE2} %{SOURCE3} %{SOURCE8} \ - %{buildroot}/etc/ucarp/ - -# Install helper scripts -%{__install} -D -p -m 0700 %{SOURCE4} %{SOURCE5} %{SOURCE7} \ - %{buildroot}%{_libexecdir}/ucarp/ - - - -%pre -# Legacy, in case we update from an older package where the service was "carp" -if [ -f /etc/rc.d/init.d/carp ]; then - /sbin/service carp stop &>/dev/null || : - /sbin/chkconfig --del carp -fi - -%post -%systemd_post ucarp@.service - -%preun -%systemd_preun ucarp@.service - -%postun -%systemd_postun_with_restart ucarp@.service - - -%files -f %{name}.lang -%license COPYING -%doc AUTHORS ChangeLog NEWS README -%{_unitdir}/ucarp@.service -%attr(0700,root,root) %dir /etc/ucarp/ -%config(noreplace) /etc/ucarp/vip-common.conf -/etc/ucarp/vip-001.conf.example -/etc/ucarp/vip-001.pwd.example -%config(noreplace) %{_libexecdir}/ucarp/ -%{_sbindir}/ucarp - -%changelog -* Sun Jan 19 2025 Fedora Release Engineering - 1.5.2-40 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Tue Nov 26 2024 Gwyn Ciesla - 1.5.2-39 -- Require initscripts - -* Sat Jul 20 2024 Fedora Release Engineering - 1.5.2-38 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Sat Jan 27 2024 Fedora Release Engineering - 1.5.2-37 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sat Jul 22 2023 Fedora Release Engineering - 1.5.2-36 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Tue Mar 07 2023 Gwyn Ciesla - 1.5.2-35 -- migrated to SPDX license - -* Sat Jan 21 2023 Fedora Release Engineering - 1.5.2-34 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Sat Jul 23 2022 Fedora Release Engineering - 1.5.2-33 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Sat Jan 22 2022 Fedora Release Engineering - 1.5.2-32 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 1.5.2-31 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek - 1.5.2-30 -- Rebuilt for updated systemd-rpm-macros - See https://pagure.io/fesco/issue/2583. - -* Wed Jan 27 2021 Fedora Release Engineering - 1.5.2-29 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jul 29 2020 Fedora Release Engineering - 1.5.2-28 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Mon Feb 10 2020 Gwyn Ciesla - 1.5.2-27 -- Fix FTBFS. - -* Fri Jan 31 2020 Fedora Release Engineering - 1.5.2-26 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Sat Jul 27 2019 Fedora Release Engineering - 1.5.2-25 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sun Feb 03 2019 Fedora Release Engineering - 1.5.2-24 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Sat Jul 14 2018 Fedora Release Engineering - 1.5.2-23 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Mon Feb 26 2018 Gwyn Ciesla - 1.5.2-22 -- Incorporate systemd tweaks from Hans-Werner Jouy. - -* Fri Feb 09 2018 Fedora Release Engineering - 1.5.2-21 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Tue Aug 08 2017 Gwyn Ciesla - 1.5.2-20 -- Correct unit file target. - -* Thu Aug 03 2017 Fedora Release Engineering - 1.5.2-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 1.5.2-18 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Tue Mar 14 2017 Jon Ciesla - 1.5.2-17 -- systemd cleanup - -* Sat Feb 11 2017 Fedora Release Engineering - 1.5.2-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Fri Feb 05 2016 Fedora Release Engineering - 1.5.2-15 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Fri Jun 19 2015 Fedora Release Engineering - 1.5.2-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Thu Aug 21 2014 Kevin Fenzi - 1.5.2-13 -- Rebuild for rpm bug 1131960 - -* Mon Aug 18 2014 Fedora Release Engineering - 1.5.2-12 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sun Jun 08 2014 Fedora Release Engineering - 1.5.2-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Mon Aug 05 2013 Jon Ciesla - 1.5.2-10 -- Fix FTBFS, BZ 992829. - -* Sun Aug 04 2013 Fedora Release Engineering - 1.5.2-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - -* Fri Feb 15 2013 Fedora Release Engineering - 1.5.2-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Thu Oct 25 2012 Jon Ciesla - 1.5.2-7 -- Patch to fix crash, BZ 693762. - -* Sun Jul 22 2012 Fedora Release Engineering - 1.5.2-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Fri Apr 13 2012 Jon Ciesla - 1.5.2-5 -- Add hardened build. - -* Wed Mar 14 2012 Jon Ciesla - 1.5.2-4 -- Migrate to systemd, BZ 800498. - -* Sat Jan 14 2012 Fedora Release Engineering - 1.5.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Mon Feb 07 2011 Fedora Release Engineering - 1.5.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Wed Apr 28 2010 Jon Ciesla - 1.5.2-1 -- New upstream. -- Uses arc4random() if available. -- Avoids adverts that might be twice as what they should be. -- Marked vip-up and vip-down config(noreplace), BZ 586893. - -* Sun Jul 26 2009 Fedora Release Engineering - 1.5.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Jul 08 2009 Jon Ciesla - 1.5.1-1 -- New upstream. -- New option (--nomcast / -M) to use broadcast -- advertisements instead of multicast ones. - -* Mon Apr 13 2009 Jon Ciesla - 1.5-1 -- Update to 1.5 BZ 458767. -- Added LSB header to init script, BZ 247082. -- New upstream should address BZ 427495, 449266, 455394. - -* Wed Feb 25 2009 Fedora Release Engineering - 1.4-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Sun Feb 3 2008 Matthias Saou 1.4-1 -- Update to 1.4. -- Rip out all of the "list" stuff and 255.255.255.255 address hack (#427495). -- Change from INITLOG (now deprecated) to LOGGER in the init script. -- Move helper scripts to /usr/libexec/ucarp/. - -* Thu Aug 23 2007 Matthias Saou 1.2-9 -- Rebuild for new BuildID feature. - -* Sun Aug 5 2007 Matthias Saou 1.2-8 -- Update License field. - -* Fri Feb 2 2007 Matthias Saou 1.2-7 -- Rename service from carp to ucarp, to be more consistent. -- Move /etc/sysconfig/carp to /etc/ucarp since it has become a config directory - of its own. - -* Wed Nov 29 2006 Matthias Saou 1.2-6 -- Rebuild against new libpcap. - -* Mon Nov 13 2006 Matthias Saou 1.2-5 -- Include all improvements from Denis Ovsienko (#200395). - -* Mon Aug 28 2006 Matthias Saou 1.2-4 -- FC6 rebuild. - -* Tue Aug 22 2006 Matthias Saou 1.2-3 -- Update to 1.3 snapshot, which includes the ARP fix, as well as fixes for the - segfaults reported in #200400 and #201596. -- Add autoconf, automake and libtool build reqs for the 1.3 patch. - -* Thu Jul 27 2006 Matthias Saou 1.2-3 -- Fix init script for recent find versions (#200395). - -* Thu Jun 22 2006 Matthias Saou 1.2-2 -- Include ARP patch backported from 1.3 snapshot (#196095). -- Make libpcap build requirement conditional to be able to share spec file. - -* Wed Jun 21 2006 Matthias Saou 1.2-1 -- Update to 1.2. -- BuildRequire libpcap-devel instead of libpcap now that it has been split. - -* Mon Mar 6 2006 Matthias Saou 1.1-5 -- FC5 rebuild. - -* Thu Feb 9 2006 Matthias Saou 1.1-4 -- Rebuild for new gcc/glibc. - -* Thu Nov 17 2005 Matthias Saou 1.1-3 -- Rebuild against new libpcap library. - -* Fri Apr 1 2005 Michael Schwendt - 1.1-2 -- Add %%dir entry for /etc/sysconfig/carp directory. - -* Thu Jan 13 2005 Matthias Saou 1.1-1 -- Update to 1.1. -- Update source location. - -* Fri Jul 9 2004 Matthias Saou 1.0-1 -- Initial RPM release. - diff --git a/ucarp@.service b/ucarp@.service deleted file mode 100644 index e4ef795..0000000 --- a/ucarp@.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=Common address redundancy protocol daemon, config: vip-%I.conf -After=syslog.target network-online.target - -[Service] -PrivateTmp=true -Type=forking -ExecStart=/usr/libexec/ucarp/ucarp start %i - -[Install] -WantedBy=multi-user.target diff --git a/vip-001.conf.example b/vip-001.conf.example deleted file mode 100644 index 0bbc5ba..0000000 --- a/vip-001.conf.example +++ /dev/null @@ -1,10 +0,0 @@ -# Virtual IP configuration file for UCARP -# The number (from 001 to 255) in the name of the file is the identifier - -# In the simple scenario, you want a single virtual IP address from the _same_ -# network to be taken over by one of the routers. -VIP_ADDRESS="10.0.0.254" - -# In more complex scenarios, check the "vip-common" file for values to override -# and how to add options. - diff --git a/vip-001.pwd.example b/vip-001.pwd.example deleted file mode 100644 index 00e6690..0000000 --- a/vip-001.pwd.example +++ /dev/null @@ -1 +0,0 @@ -love diff --git a/vip-common.conf b/vip-common.conf deleted file mode 100644 index 85dae52..0000000 --- a/vip-common.conf +++ /dev/null @@ -1,8 +0,0 @@ -# Common VIP settings which can be overridden in individual vip-.conf -PASSFILE=/etc/ucarp/vip-001.pwd -BIND_INTERFACE="eth0" -SOURCE_ADDRESS="" - -# If you have extra options to add, see "ucarp --help" output -OPTIONS="--shutdown --preempt" - diff --git a/vip-down b/vip-down deleted file mode 100755 index fab9a8f..0000000 --- a/vip-down +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -exec 2>/dev/null - -/sbin/ip address del "$2"/32 dev "$1" - diff --git a/vip-up b/vip-up deleted file mode 100755 index 166729c..0000000 --- a/vip-up +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -exec 2>/dev/null - -/sbin/ip address add "$2"/32 dev "$1" -