summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-cluster/keepalived/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-cluster/keepalived/files')
-rw-r--r--sys-cluster/keepalived/files/conf-keepalived7
-rw-r--r--sys-cluster/keepalived/files/init-keepalived44
-rw-r--r--sys-cluster/keepalived/files/keepalived-1.1.20-do-not-need-kernel-sources.patch110
-rw-r--r--sys-cluster/keepalived/files/keepalived-1.2.2-bind-afunspec.patch13
-rw-r--r--sys-cluster/keepalived/files/keepalived-1.2.2-fix-ipv4-addr-compare.patch23
-rw-r--r--sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-backup-daemon.patch51
-rw-r--r--sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-ipv6.patch33
-rw-r--r--sys-cluster/keepalived/files/keepalived.confd7
-rw-r--r--sys-cluster/keepalived/files/keepalived.init34
9 files changed, 322 insertions, 0 deletions
diff --git a/sys-cluster/keepalived/files/conf-keepalived b/sys-cluster/keepalived/files/conf-keepalived
new file mode 100644
index 000000000000..b8e4d6592f0b
--- /dev/null
+++ b/sys-cluster/keepalived/files/conf-keepalived
@@ -0,0 +1,7 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Keepalived options
+# Increase logging:
+#opts="-D"
diff --git a/sys-cluster/keepalived/files/init-keepalived b/sys-cluster/keepalived/files/init-keepalived
new file mode 100644
index 000000000000..5f3053358d5d
--- /dev/null
+++ b/sys-cluster/keepalived/files/init-keepalived
@@ -0,0 +1,44 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+opts="reload"
+
+depend() {
+ use logger
+ # The interfaces do not actually need to exist to start, it handles them gracefully.
+ use net
+}
+
+extra_commands="checkconfig"
+
+PIDFILE=/var/run/keepalived.pid
+
+checkconfig() {
+ # keepalived has a config check command, but it does not work while the daemon is running!
+ if [ ! -e /etc/keepalived/keepalived.conf ] ; then
+ eerror "You need an /etc/keepalived/keepalived.conf file to run keepalived"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting Keepalived"
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --exec /usr/sbin/keepalived -- $opts
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Keepalived"
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading keepalived.conf"
+ start-stop-daemon --pidfile $PIDFILE --signal HUP
+ eend $?
+}
diff --git a/sys-cluster/keepalived/files/keepalived-1.1.20-do-not-need-kernel-sources.patch b/sys-cluster/keepalived/files/keepalived-1.1.20-do-not-need-kernel-sources.patch
new file mode 100644
index 000000000000..e56cc635907b
--- /dev/null
+++ b/sys-cluster/keepalived/files/keepalived-1.1.20-do-not-need-kernel-sources.patch
@@ -0,0 +1,110 @@
+diff -urN keepalived-1.1.20-orig/configure.in keepalived-1.1.20/configure.in
+--- keepalived-1.1.20-orig/configure.in 2009-11-05 18:23:04.000000000 +0100
++++ keepalived-1.1.20/configure.in 2010-05-31 11:42:05.000000000 +0200
+@@ -51,103 +51,18 @@
+ AC_CHECK_LIB(popt, poptGetContext,,AC_MSG_ERROR([Popt libraries is required]))
+
+ dnl ----[ Kernel version check ]----
+-CPPFLAGS="$CPPFLAGS -I$kernelinc"
+-AC_MSG_CHECKING([for kernel version])
+-AC_TRY_RUN([
+- #include <stdlib.h>
+- #include <stdio.h>
+- #include <linux/version.h>
+- #if !defined(UTS_RELEASE) && !defined(LINUX_VERSION_CODE)
+- #include <linux/utsrelease.h>
+- #endif
+- int main (void) {
+- FILE *fp = fopen ("linuxinfo", "w");
+- if (!fp) return 1;
+- #if defined(UTS_RELEASE)
+- fprintf (fp, "%s\n", UTS_RELEASE);
+- #elif defined(LINUX_VERSION_CODE)
+- fprintf (fp, "%d.%d.%d\n", LINUX_VERSION_CODE >> 16, (LINUX_VERSION_CODE >> 8) & 0xFF, LINUX_VERSION_CODE & 0xFF);
+- #else
+- fprintf (fp, "0.0.0\n"); /* Let's fail gently */
+- #endif
+- fclose (fp);
+- return 0;
+- }
+- ], [
+- LINUX_MAJOR=`cat linuxinfo | cut -d'.' -f1`
+- LINUX_MINOR=`cat linuxinfo | cut -d'.' -f2`
+- LINUX_PATCH=`cat linuxinfo | cut -d'.' -f3`
+- ], [
+- LINUX_MAJOR="0"
+- LINUX_MINOR="0"
+- LINUX_PATCH="0"
+- ], [
+- LINUX_MAJOR="0"
+- LINUX_MINOR="0"
+- LINUX_PATCH="0"
+- ])
+- rm -f linuxinfo
+-
+- if test "$kernelversion" = "2.4"; then
+- KERN="_KRNL_2_4_"
+- AC_MSG_RESULT([2.4])
+- elif test "$kernelversion" = "2.6"; then
+- KERN="_KRNL_2_6_"
+- AC_MSG_RESULT([2.6])
+- else
+- AC_MSG_RESULT([$LINUX_MAJOR.$LINUX_MINOR.$LINUX_PATCH])
+- if test "$LINUX_MINOR" = "6"; then
+- KERN="_KRNL_2_6_"
+- elif test "$LINUX_MINOR" = "4"; then
+- KERN="_KRNL_2_4_"
+- else
+- KERN="_KRNL_2_6_"
+- fi
+- if test "$LINUX_MAJOR" = "0" -a "$LINUX_MINOR" = "0" -a "$LINUX_PATCH" = "0"; then
+- AC_MSG_WARN([Cannot determine Linux Kernel version.])
+- fi
+- fi
+-
++KERN="_KRNL_2_6_"
+ AC_SUBST(KERN)
+
+ dnl ----[ Checks for LVS and VRRP support ]----
+-IPVS_SUPPORT="_WITHOUT_LVS_"
+-if test "$enable_lvs" != "no"; then
+- AC_CHECK_HEADER([net/ip_vs.h],
+- [IPVS_SUPPORT="_WITH_LVS_"],
+- [
+- IPVS_SUPPORT="_WITHOUT_LVS_"
+- AC_MSG_WARN([keepalived will be built without LVS support.])
+- ])
+-fi
++IPVS_SUPPORT="_WITH_LVS_"
+
+ if test "$IPVS_SUPPORT" = "_WITHOUT_LVS_" -a "$enable_vrrp" = "no"; then
+ AC_MSG_ERROR([keepalived MUST be compiled at least with LVS or VRRP framework])
+ fi
+
+ dnl ----[ IPVS syncd support probe ]---
+-IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_"
+-if test "$IPVS_SUPPORT" = "_WITH_LVS_"; then
+- AC_MSG_CHECKING([for IPVS syncd support])
+- if test "$KERN" = "_KRNL_2_6_"; then
+- IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
+- elif test "_KRNL_2_4_"; then
+- IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
+- else
+- IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_"
+- fi
+-
+- if test "${IPVS_SUPPORT}" = "_WITHOUT_LVS_" -o "$enable_lvs_syncd" = "no"; then
+- IPVS_SYNCD="_WITHOUT_IPVS_SYNCD_"
+- fi
+-
+- if test "$IPVS_SYNCD" = "_HAVE_IPVS_SYNCD_"; then
+- AC_MSG_RESULT([yes])
+- else
+- AC_MSG_RESULT([no])
+- fi
+-fi
+-
++IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
+ AC_SUBST(IPVS_SYNCD)
+
+ dnl ----[ Checks for kernel netlink support ]----
diff --git a/sys-cluster/keepalived/files/keepalived-1.2.2-bind-afunspec.patch b/sys-cluster/keepalived/files/keepalived-1.2.2-bind-afunspec.patch
new file mode 100644
index 000000000000..1f365d26e517
--- /dev/null
+++ b/sys-cluster/keepalived/files/keepalived-1.2.2-bind-afunspec.patch
@@ -0,0 +1,13 @@
+diff --git a/keepalived/core/layer4.c b/keepalived/core/layer4.c
+index 5725500..5b33417 100644
+--- a/keepalived/core/layer4.c
++++ b/keepalived/core/layer4.c
+@@ -43,7 +43,7 @@ tcp_bind_connect(int fd, struct sockaddr_storage *addr, struct sockaddr_storage
+ fcntl(fd, F_SETFL, val | O_NONBLOCK);
+
+ /* Bind socket */
+- if (bind_addr) {
++ if (bind_addr && ((struct sockaddr *) bind_addr)->sa_family != AF_UNSPEC) {
+ addrlen = sizeof(*bind_addr);
+ if (bind(fd, (struct sockaddr *) bind_addr, addrlen) != 0)
+ return connect_error; \ No newline at end of file
diff --git a/sys-cluster/keepalived/files/keepalived-1.2.2-fix-ipv4-addr-compare.patch b/sys-cluster/keepalived/files/keepalived-1.2.2-fix-ipv4-addr-compare.patch
new file mode 100644
index 000000000000..692f042218fc
--- /dev/null
+++ b/sys-cluster/keepalived/files/keepalived-1.2.2-fix-ipv4-addr-compare.patch
@@ -0,0 +1,23 @@
+From bc49a46989c98eb6ee72a379b18b77e87ed624fa Mon Sep 17 00:00:00 2001
+From: Vincent Bernat <bernat@luffy.cx>
+Date: Wed, 07 Dec 2011 09:17:55 +0000
+Subject: Fix IPv4 address comparison routine.
+
+Two different IPv4 addresses were returned to be equal while this was
+not the case. Thanks to Ronie Gilberto Henrich for spotting this bug.
+---
+diff --git a/keepalived/include/check_data.h b/keepalived/include/check_data.h
+index 50a4757..e3ff458 100644
+--- a/keepalived/include/check_data.h
++++ b/keepalived/include/check_data.h
+@@ -163,7 +163,7 @@ static inline int sockstorage_equal(const struct sockaddr_storage *s1,
+ struct sockaddr_in *a1 = (struct sockaddr_in *) s1;
+ struct sockaddr_in *a2 = (struct sockaddr_in *) s2;
+
+- if ((a1->sin_addr.s_addr == a1->sin_addr.s_addr) &&
++ if ((a1->sin_addr.s_addr == a2->sin_addr.s_addr) &&
+ (a1->sin_port == a2->sin_port))
+ return 1;
+ }
+--
+cgit v0.8.3.4
diff --git a/sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-backup-daemon.patch b/sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-backup-daemon.patch
new file mode 100644
index 000000000000..9898122e4d25
--- /dev/null
+++ b/sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-backup-daemon.patch
@@ -0,0 +1,51 @@
+From 8c34d5a0d4c763db9b8f1e54be0c6c3ded6c54e0 Mon Sep 17 00:00:00 2001
+From: Alexander Holler <alexander.holler@1und1.de>
+Date: Mon, 9 Jan 2012 13:16:55 +0100
+Subject: [PATCH] libipvs: Fix reporting of the state of the backup-daemon.
+
+ipvsadm -l --daemon didn't report a running ipvs-backup-daemon
+(if no master-daemon was run).
+
+It seems there was some misunderstanding of
+how the daemons got reported (without using netlink). The state of
+the backup-daemon is always reported (by the kernel) in the second
+element of type ip_vs_daemon_user which is returned by the kernel
+through IP_VS_SO_GET_DAEMON or IPVS_CMD_GET_DAEMON.
+---
+ keepalived/libipvs-2.6/libipvs.c | 11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/keepalived/libipvs-2.6/libipvs.c b/keepalived/libipvs-2.6/libipvs.c
+index ea5e851..6bee837 100644
+--- a/keepalived/libipvs-2.6/libipvs.c
++++ b/keepalived/libipvs-2.6/libipvs.c
+@@ -1003,12 +1003,9 @@ static int ipvs_daemon_parse_cb(struct nl_msg *msg, void *arg)
+ struct nlattr *attrs[IPVS_CMD_ATTR_MAX + 1];
+ struct nlattr *daemon_attrs[IPVS_DAEMON_ATTR_MAX + 1];
+ ipvs_daemon_t *u = (ipvs_daemon_t *)arg;
++ __u32 state;
+ int i = 0;
+
+- /* We may get two daemons. If we've already got one, this is the second */
+- if (u[0].state)
+- i = 1;
+-
+ if (genlmsg_parse(nlh, 0, attrs, IPVS_CMD_ATTR_MAX, ipvs_cmd_policy) != 0)
+ return -1;
+
+@@ -1021,7 +1018,11 @@ static int ipvs_daemon_parse_cb(struct nl_msg *msg, void *arg)
+ daemon_attrs[IPVS_DAEMON_ATTR_SYNC_ID]))
+ return -1;
+
+- u[i].state = nla_get_u32(daemon_attrs[IPVS_DAEMON_ATTR_STATE]);
++ state = nla_get_u32(daemon_attrs[IPVS_DAEMON_ATTR_STATE]);
++ /* The second element is used for the state of the backup daemon. */
++ if (state == IP_VS_STATE_BACKUP)
++ i = 1;
++ u[i].state = state;
+ strncpy(u[i].mcast_ifn,
+ nla_get_string(daemon_attrs[IPVS_DAEMON_ATTR_MCAST_IFN]),
+ IP_VS_IFNAME_MAXLEN);
+--
+1.7.6.5
+
diff --git a/sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-ipv6.patch b/sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-ipv6.patch
new file mode 100644
index 000000000000..f9435b026242
--- /dev/null
+++ b/sys-cluster/keepalived/files/keepalived-1.2.2-libipvs-fix-ipv6.patch
@@ -0,0 +1,33 @@
+From cf8ff745812b7fe00d509fb50592348b6f60b433 Mon Sep 17 00:00:00 2001
+From: Alexander Holler <alexander.holler@1und1.de>
+Date: Mon, 9 Jan 2012 12:58:12 +0100
+Subject: [PATCH] libipvs: Fix initialization of netlink (needed for IPv6)
+ when the module ip_vs wasn't loaded.
+
+The following happened when keepalived was started before the module for IPVS was loaded:
+
+ipvs_init() failed => netlink got disabled.
+modprobe_ipvs()
+ipvs_init() => netlink was not tested again => no netlink => no IPv6
+
+Fixed through testing netlink always in ipvs_init().
+---
+ keepalived/libipvs-2.6/libipvs.c | 2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/keepalived/libipvs-2.6/libipvs.c b/keepalived/libipvs-2.6/libipvs.c
+index 2c75118..ea5e851 100644
+--- a/keepalived/libipvs-2.6/libipvs.c
++++ b/keepalived/libipvs-2.6/libipvs.c
+@@ -114,6 +114,8 @@ int ipvs_init(void)
+ ipvs_func = ipvs_init;
+
+ #ifdef LIBIPVS_USE_NL
++ try_nl = 1;
++
+ if (ipvs_nl_send_message(NULL, NULL, NULL) == 0) {
+ return ipvs_getinfo();
+ }
+--
+1.7.6.5
+
diff --git a/sys-cluster/keepalived/files/keepalived.confd b/sys-cluster/keepalived/files/keepalived.confd
new file mode 100644
index 000000000000..93b0092dfb87
--- /dev/null
+++ b/sys-cluster/keepalived/files/keepalived.confd
@@ -0,0 +1,7 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+# Keepalived options
+# Increase logging:
+#KEEPALIVED_OPTS="-D"
diff --git a/sys-cluster/keepalived/files/keepalived.init b/sys-cluster/keepalived/files/keepalived.init
new file mode 100644
index 000000000000..9bafc01fe38b
--- /dev/null
+++ b/sys-cluster/keepalived/files/keepalived.init
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ use logger
+ # The interfaces do not actually need to exist to start, it handles them gracefully.
+ use net
+}
+
+command="/usr/sbin/keepalived"
+command_args="${KEEPALIVED_OPTS}"
+pidfile="/var/run/keepalived.pid"
+
+extra_commands="checkconfig reload"
+
+checkconfig() {
+ # keepalived has a config check command, but it does not work while the daemon is running!
+ if [ ! -e /etc/keepalived/keepalived.conf ] ; then
+ eerror "You need an /etc/keepalived/keepalived.conf file to run keepalived"
+ return 1
+ fi
+}
+
+start_pre() {
+ checkconfig || return 1
+}
+
+reload() {
+ ebegin "Reloading keepalived.conf"
+ start-stop-daemon --pidfile $pidfile --signal HUP
+ eend $?
+}