summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2007-04-28 07:24:35 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2007-04-28 07:24:35 +0000
commit6835f670d0f3c25249eb903ac5799bf0c1729f25 (patch)
treefcdd194e42871a1167b690d6bd8bd6be41484579 /sys-cluster
parentre-add manifest (diff)
downloadhistorical-6835f670d0f3c25249eb903ac5799bf0c1729f25.tar.gz
historical-6835f670d0f3c25249eb903ac5799bf0c1729f25.tar.bz2
historical-6835f670d0f3c25249eb903ac5799bf0c1729f25.zip
Do a large cleanup of the keepalived ebuild, so that it will build without kernel sources present, and fix other things that could never have worked in the first place, like the init.d pointing to where the binary wasn't.
Package-Manager: portage-2.1.2.4
Diffstat (limited to 'sys-cluster')
-rw-r--r--sys-cluster/keepalived/ChangeLog12
-rw-r--r--sys-cluster/keepalived/Manifest23
-rw-r--r--sys-cluster/keepalived/files/digest-keepalived-1.1.13-r13
-rw-r--r--sys-cluster/keepalived/files/keepalived-1.1.13-do-not-need-kernel-sources.patch142
-rw-r--r--sys-cluster/keepalived/files/keepalived-1.1.13-linux-2.6.21-ip_vs.h262
-rw-r--r--sys-cluster/keepalived/keepalived-1.1.13-r1.ebuild82
6 files changed, 519 insertions, 5 deletions
diff --git a/sys-cluster/keepalived/ChangeLog b/sys-cluster/keepalived/ChangeLog
index 5b4e2277ffad..d3dbc30767a5 100644
--- a/sys-cluster/keepalived/ChangeLog
+++ b/sys-cluster/keepalived/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for sys-cluster/keepalived
# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/keepalived/ChangeLog,v 1.39 2007/04/26 06:41:56 dberkholz Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/keepalived/ChangeLog,v 1.40 2007/04/28 07:24:35 robbat2 Exp $
+
+*keepalived-1.1.13-r1 (28 Apr 2007)
+
+ 28 Apr 2007; Robin H. Johnson <robbat2@gentoo.org>
+ +files/keepalived-1.1.13-do-not-need-kernel-sources.patch,
+ +files/keepalived-1.1.13-linux-2.6.21-ip_vs.h,
+ +keepalived-1.1.13-r1.ebuild:
+ Do a large cleanup of the keepalived ebuild, so that it will build without
+ kernel sources present, and fix other things that could never have worked in
+ the first place, like the init.d pointing to where the binary wasn't.
26 Apr 2007; Donnie Berkholz <dberkholz@gentoo.org>; metadata.xml:
Update for cluster herd split to hp-cluster and ha-cluster.
diff --git a/sys-cluster/keepalived/Manifest b/sys-cluster/keepalived/Manifest
index 355b2b9f3ae5..11202a3de362 100644
--- a/sys-cluster/keepalived/Manifest
+++ b/sys-cluster/keepalived/Manifest
@@ -2,6 +2,14 @@ AUX init-keepalived 746 RMD160 5f6074fc828f5df6a6582bf3545b9aebbe57184c SHA1 915
MD5 eb44784c8591fa108fa55b5cacd29745 files/init-keepalived 746
RMD160 5f6074fc828f5df6a6582bf3545b9aebbe57184c files/init-keepalived 746
SHA256 80a10ea83aea97b573274abf4f92906cbace9645ebf16fb4aa7e559f66278f94 files/init-keepalived 746
+AUX keepalived-1.1.13-do-not-need-kernel-sources.patch 4226 RMD160 e42b1c1e713fa0e98947e69d9721d365586ab02f SHA1 01616ee6bbdc0ea1d5fa3b0aed13209e0d883357 SHA256 d63ee9a8e1b6eff05539ed08cf37bc07b3d485c7a6af33f2e494de97a22a8d00
+MD5 a4f0940ae2c660966536b8596111f341 files/keepalived-1.1.13-do-not-need-kernel-sources.patch 4226
+RMD160 e42b1c1e713fa0e98947e69d9721d365586ab02f files/keepalived-1.1.13-do-not-need-kernel-sources.patch 4226
+SHA256 d63ee9a8e1b6eff05539ed08cf37bc07b3d485c7a6af33f2e494de97a22a8d00 files/keepalived-1.1.13-do-not-need-kernel-sources.patch 4226
+AUX keepalived-1.1.13-linux-2.6.21-ip_vs.h 7549 RMD160 e6407ca157a3d7bcc810841b6f5937cd7d477b0e SHA1 42386dd7a767704d0af9987578185d3fc8ccfd30 SHA256 67cb638f17e1189aedc0f464622744867549c91d637d38cdfd8d824aae841aea
+MD5 e4b20e54d2c3db3297a6304aad0d908f files/keepalived-1.1.13-linux-2.6.21-ip_vs.h 7549
+RMD160 e6407ca157a3d7bcc810841b6f5937cd7d477b0e files/keepalived-1.1.13-linux-2.6.21-ip_vs.h 7549
+SHA256 67cb638f17e1189aedc0f464622744867549c91d637d38cdfd8d824aae841aea files/keepalived-1.1.13-linux-2.6.21-ip_vs.h 7549
DIST keepalived-1.1.11.tar.gz 214924 RMD160 744a6b004c85619feb8052052fb746c81b314861 SHA1 1421377e517cd50fe079a3cefc52315eb7e6e3e2 SHA256 f33220c911b2e4830a47520054551d06e3dab2f1679f9b0d2be198813cfea219
DIST keepalived-1.1.12.tar.gz 215811 RMD160 b42383b9ad71cd9bad511c8269a8bdd0774ae7dd SHA1 6ce5760d348fd1100fe89ad7a06d964ba1574cbb SHA256 ece1092af12c978ffd64d8795d4acaf5c329796f2a6678231f3a9c91f3dc9718
DIST keepalived-1.1.13.tar.gz 222220 RMD160 63f0ee6d767eb90f8b8e0621e59ed3365a5b5d4d SHA1 360df575c12e6d700068766f731b14d35746d45e SHA256 2545bd681580a97f9c5c9bbe6fe2f8a91988d0c5f063bba048148b52ccde2568
@@ -13,14 +21,18 @@ EBUILD keepalived-1.1.12.ebuild 1478 RMD160 c6c6b85df167b3e6818561ada7abeebf4833
MD5 706b1343d47d5999c3b72f3347775f0d keepalived-1.1.12.ebuild 1478
RMD160 c6c6b85df167b3e6818561ada7abeebf48333882 keepalived-1.1.12.ebuild 1478
SHA256 bc3b5466027d04377774cf4f04a2054ca8e54085884f346c5826eeb66cb29dab keepalived-1.1.12.ebuild 1478
+EBUILD keepalived-1.1.13-r1.ebuild 2382 RMD160 35a025ebd26f88f6c977e7016d65b27e8ce305c1 SHA1 ae91d028df447f6898749a9a5cb233deaddd62f7 SHA256 a8421bff345e54f7d14241b3bc13077ab704590fc9af8c8cec7d34739b7c836e
+MD5 71daf719e553ea083bae7579fd200781 keepalived-1.1.13-r1.ebuild 2382
+RMD160 35a025ebd26f88f6c977e7016d65b27e8ce305c1 keepalived-1.1.13-r1.ebuild 2382
+SHA256 a8421bff345e54f7d14241b3bc13077ab704590fc9af8c8cec7d34739b7c836e keepalived-1.1.13-r1.ebuild 2382
EBUILD keepalived-1.1.13.ebuild 1482 RMD160 ef7ed69322c93af57fe2cfcfaf1547f54de17265 SHA1 45eb530cb1382d328f9c203b95c295369a01cadc SHA256 0d6a25f09e86d5a59a6dc4c3ac5d57f4c4812b37d37a44484cd342eea73bd9c3
MD5 000bc2e2bddf187b8947675563266643 keepalived-1.1.13.ebuild 1482
RMD160 ef7ed69322c93af57fe2cfcfaf1547f54de17265 keepalived-1.1.13.ebuild 1482
SHA256 0d6a25f09e86d5a59a6dc4c3ac5d57f4c4812b37d37a44484cd342eea73bd9c3 keepalived-1.1.13.ebuild 1482
-MISC ChangeLog 5956 RMD160 c052430a0e9ade96c7898e179ae70c3381361e0e SHA1 84fb69c37c2ef810636d179621dc6d9f77e4ff4f SHA256 2ef1ce96e3115912a400075d7c9fd9bb13ba046be053fee2809448e455edefcd
-MD5 8cf5eb931d22222988018a13a5a71e80 ChangeLog 5956
-RMD160 c052430a0e9ade96c7898e179ae70c3381361e0e ChangeLog 5956
-SHA256 2ef1ce96e3115912a400075d7c9fd9bb13ba046be053fee2809448e455edefcd ChangeLog 5956
+MISC ChangeLog 6415 RMD160 98f9f244aabe3bf73e1977b408c1aeea20698a00 SHA1 f2dc9e54dc2ab89e41ba46567f18dc34e193fa6b SHA256 0b4cec7a2cb290500d8b15990de983c36071f04fc94990dc616bb77ccccd14ae
+MD5 38c72a1f1cb91ff8ca45ba9593db10a6 ChangeLog 6415
+RMD160 98f9f244aabe3bf73e1977b408c1aeea20698a00 ChangeLog 6415
+SHA256 0b4cec7a2cb290500d8b15990de983c36071f04fc94990dc616bb77ccccd14ae ChangeLog 6415
MISC metadata.xml 353 RMD160 bb97ddf008d2b8ec626960d0ef5509963d055993 SHA1 32027c725e0627c88081228eb9b09e1fa001c42c SHA256 4336bfedf26cb9bfbaf200475b8d1d598f972d12e52a50744eb034ece4cf3042
MD5 31db27806ba9d5a1d0d3ddea439f2c16 metadata.xml 353
RMD160 bb97ddf008d2b8ec626960d0ef5509963d055993 metadata.xml 353
@@ -34,3 +46,6 @@ SHA256 655d8f3ed365feed4951820aead1f9e732296bdf68e555f0f3db9d37309005fc files/di
MD5 d08c874395ceec732df8e5d5f639c53e files/digest-keepalived-1.1.13 253
RMD160 bc7d65dcb12abdae82da753bc78edfe6b996a428 files/digest-keepalived-1.1.13 253
SHA256 fa5e8c459c8860192c3256a48a447b649a46dae17c5d29682a849ee1fc500cab files/digest-keepalived-1.1.13 253
+MD5 d08c874395ceec732df8e5d5f639c53e files/digest-keepalived-1.1.13-r1 253
+RMD160 bc7d65dcb12abdae82da753bc78edfe6b996a428 files/digest-keepalived-1.1.13-r1 253
+SHA256 fa5e8c459c8860192c3256a48a447b649a46dae17c5d29682a849ee1fc500cab files/digest-keepalived-1.1.13-r1 253
diff --git a/sys-cluster/keepalived/files/digest-keepalived-1.1.13-r1 b/sys-cluster/keepalived/files/digest-keepalived-1.1.13-r1
new file mode 100644
index 000000000000..899c89d04da3
--- /dev/null
+++ b/sys-cluster/keepalived/files/digest-keepalived-1.1.13-r1
@@ -0,0 +1,3 @@
+MD5 578bdb8e3ff4cca50fc877893bad658c keepalived-1.1.13.tar.gz 222220
+RMD160 63f0ee6d767eb90f8b8e0621e59ed3365a5b5d4d keepalived-1.1.13.tar.gz 222220
+SHA256 2545bd681580a97f9c5c9bbe6fe2f8a91988d0c5f063bba048148b52ccde2568 keepalived-1.1.13.tar.gz 222220
diff --git a/sys-cluster/keepalived/files/keepalived-1.1.13-do-not-need-kernel-sources.patch b/sys-cluster/keepalived/files/keepalived-1.1.13-do-not-need-kernel-sources.patch
new file mode 100644
index 000000000000..2ea18265ad60
--- /dev/null
+++ b/sys-cluster/keepalived/files/keepalived-1.1.13-do-not-need-kernel-sources.patch
@@ -0,0 +1,142 @@
+diff -Nuar keepalived-1.1.13.orig/configure.in keepalived-1.1.13/configure.in
+--- keepalived-1.1.13.orig/configure.in 2006-10-10 02:19:38.000000000 -0700
++++ keepalived-1.1.13/configure.in 2007-04-27 23:18:22.463502718 -0700
+@@ -48,103 +48,14 @@
+ 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)
+- #include <linux/utsrelease.h>
+- #endif
+- int main (void) {
+- FILE *fp = fopen ("linuxinfo", "w");
+- if (!fp) return 1;
+- fprintf (fp, "%s\n", UTS_RELEASE);
+- 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
+- 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_2_"
+- fi
+- if test "$LINUX_MAJOR" = "0" -a "$LINUX_MINOR" = "0" -a "$LINUX_PATCH" = "0"; then
+- AC_MSG_WARN([Cannot determine Linux Kernel version.])
+- fi
+-
+-AC_CHECK_FILE($kernelpath/net/core/link_watch.c, [
+- LINKWATCH_SUPPORT="_WITH_LINKWATCH_"
+- ], [
+- LINKWATCH_SUPPORT="_WITHOUT_LINKWATCH_"
+- ])
+
++KERN="_KRNL_2_6_"
++LINKWATCH_SUPPORT="_WITH_LINKWATCH_"
+ AC_SUBST(LINKWATCH_SUPPORT)
+ 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_"
+- IPVS_MAJOR="0"
+- IPVS_MINOR="0"
+- IPVS_PATCH="0"
+- AC_MSG_WARN([keepalived will be built without LVS support.])
+- ])
+-fi
+-
+-if test "$IPVS_SUPPORT" = "_WITH_LVS_"; then
+- AC_MSG_CHECKING([for IPVS version])
+- AC_TRY_RUN([
+- #include <stdlib.h>
+- #include <stdio.h>
+- #include <net/ip_vs.h>
+- int main (void) {
+- FILE *fp = fopen ("ipvsinfo", "w");
+- if (!fp) return 1;
+- fprintf (fp, "%d\n%d\n%d\n", NVERSION(IP_VS_VERSION_CODE));
+- fclose (fp);
+- return 0;
+- }
+- ], [
+- IPVS_MAJOR=`head -n 1 ipvsinfo | tail -n 1`
+- IPVS_MINOR=`head -n 2 ipvsinfo | tail -n 1`
+- IPVS_PATCH=`head -n 3 ipvsinfo | tail -n 1`
+- ], [
+- IPVS_MAJOR="0"
+- IPVS_MINOR="0"
+- IPVS_PATCH="0"
+- ], [
+- IPVS_MAJOR="0"
+- IPVS_MINOR="0"
+- IPVS_PATCH="0"
+- ])
+- rm -f ipvsinfo
+- AC_MSG_RESULT([$IPVS_MAJOR.$IPVS_MINOR.$IPVS_PATCH])
+- if test "$IPVS_MAJOR" = "0" -a "$IPVS_MINOR" = "0" -a "$IPVS_PATCH" = "0"; then
+- AC_MSG_WARN([Cannot determine IPVS version.])
+- fi
+-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])
+@@ -153,30 +64,7 @@
+ dnl ----[ IPVS syncd support probe ]---
+ dnl Sync daemon is supported since IPVS 0.9.2 for kernel 2.4
+
+-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 "$IPVS_MAJOR" -ge 1 -a "$KERN" = "_KRNL_2_4_"; then
+- IPVS_SYNCD="_HAVE_IPVS_SYNCD_"
+- elif test "$IPVS_MINOR" -ge 9 -a "$IPVS_PATCH" -ge 2 -a "$KERN" = "_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.1.13-linux-2.6.21-ip_vs.h b/sys-cluster/keepalived/files/keepalived-1.1.13-linux-2.6.21-ip_vs.h
new file mode 100644
index 000000000000..57a9c71fdd5d
--- /dev/null
+++ b/sys-cluster/keepalived/files/keepalived-1.1.13-linux-2.6.21-ip_vs.h
@@ -0,0 +1,262 @@
+/* This file is copied from the Linux kernel sources, as of 2.6.21.
+ * The IP_VS_VERSION_CODE has not changed in a very long time :-).
+ * The __KERNEL__ portion has been removed for size.
+ * Robin H. Johnson <robbat2@gentoo.org>
+ * 27 April 2007
+ */
+/*
+ * IP Virtual Server
+ * data structure and functionality definitions
+ */
+
+#ifndef _IP_VS_H
+#define _IP_VS_H
+
+#include <asm/types.h> /* For __uXX types */
+#include <linux/types.h> /* For __beXX types in userland */
+
+#define IP_VS_VERSION_CODE 0x010201
+#define NVERSION(version) \
+ (version >> 16) & 0xFF, \
+ (version >> 8) & 0xFF, \
+ version & 0xFF
+
+/*
+ * Virtual Service Flags
+ */
+#define IP_VS_SVC_F_PERSISTENT 0x0001 /* persistent port */
+#define IP_VS_SVC_F_HASHED 0x0002 /* hashed entry */
+
+/*
+ * Destination Server Flags
+ */
+#define IP_VS_DEST_F_AVAILABLE 0x0001 /* server is available */
+#define IP_VS_DEST_F_OVERLOAD 0x0002 /* server is overloaded */
+
+/*
+ * IPVS sync daemon states
+ */
+#define IP_VS_STATE_NONE 0x0000 /* daemon is stopped */
+#define IP_VS_STATE_MASTER 0x0001 /* started as master */
+#define IP_VS_STATE_BACKUP 0x0002 /* started as backup */
+
+/*
+ * IPVS socket options
+ */
+#define IP_VS_BASE_CTL (64+1024+64) /* base */
+
+#define IP_VS_SO_SET_NONE IP_VS_BASE_CTL /* just peek */
+#define IP_VS_SO_SET_INSERT (IP_VS_BASE_CTL+1)
+#define IP_VS_SO_SET_ADD (IP_VS_BASE_CTL+2)
+#define IP_VS_SO_SET_EDIT (IP_VS_BASE_CTL+3)
+#define IP_VS_SO_SET_DEL (IP_VS_BASE_CTL+4)
+#define IP_VS_SO_SET_FLUSH (IP_VS_BASE_CTL+5)
+#define IP_VS_SO_SET_LIST (IP_VS_BASE_CTL+6)
+#define IP_VS_SO_SET_ADDDEST (IP_VS_BASE_CTL+7)
+#define IP_VS_SO_SET_DELDEST (IP_VS_BASE_CTL+8)
+#define IP_VS_SO_SET_EDITDEST (IP_VS_BASE_CTL+9)
+#define IP_VS_SO_SET_TIMEOUT (IP_VS_BASE_CTL+10)
+#define IP_VS_SO_SET_STARTDAEMON (IP_VS_BASE_CTL+11)
+#define IP_VS_SO_SET_STOPDAEMON (IP_VS_BASE_CTL+12)
+#define IP_VS_SO_SET_RESTORE (IP_VS_BASE_CTL+13)
+#define IP_VS_SO_SET_SAVE (IP_VS_BASE_CTL+14)
+#define IP_VS_SO_SET_ZERO (IP_VS_BASE_CTL+15)
+#define IP_VS_SO_SET_MAX IP_VS_SO_SET_ZERO
+
+#define IP_VS_SO_GET_VERSION IP_VS_BASE_CTL
+#define IP_VS_SO_GET_INFO (IP_VS_BASE_CTL+1)
+#define IP_VS_SO_GET_SERVICES (IP_VS_BASE_CTL+2)
+#define IP_VS_SO_GET_SERVICE (IP_VS_BASE_CTL+3)
+#define IP_VS_SO_GET_DESTS (IP_VS_BASE_CTL+4)
+#define IP_VS_SO_GET_DEST (IP_VS_BASE_CTL+5) /* not used now */
+#define IP_VS_SO_GET_TIMEOUT (IP_VS_BASE_CTL+6)
+#define IP_VS_SO_GET_DAEMON (IP_VS_BASE_CTL+7)
+#define IP_VS_SO_GET_MAX IP_VS_SO_GET_DAEMON
+
+
+/*
+ * IPVS Connection Flags
+ */
+#define IP_VS_CONN_F_FWD_MASK 0x0007 /* mask for the fwd methods */
+#define IP_VS_CONN_F_MASQ 0x0000 /* masquerading/NAT */
+#define IP_VS_CONN_F_LOCALNODE 0x0001 /* local node */
+#define IP_VS_CONN_F_TUNNEL 0x0002 /* tunneling */
+#define IP_VS_CONN_F_DROUTE 0x0003 /* direct routing */
+#define IP_VS_CONN_F_BYPASS 0x0004 /* cache bypass */
+#define IP_VS_CONN_F_SYNC 0x0020 /* entry created by sync */
+#define IP_VS_CONN_F_HASHED 0x0040 /* hashed entry */
+#define IP_VS_CONN_F_NOOUTPUT 0x0080 /* no output packets */
+#define IP_VS_CONN_F_INACTIVE 0x0100 /* not established */
+#define IP_VS_CONN_F_OUT_SEQ 0x0200 /* must do output seq adjust */
+#define IP_VS_CONN_F_IN_SEQ 0x0400 /* must do input seq adjust */
+#define IP_VS_CONN_F_SEQ_MASK 0x0600 /* in/out sequence mask */
+#define IP_VS_CONN_F_NO_CPORT 0x0800 /* no client port set yet */
+#define IP_VS_CONN_F_TEMPLATE 0x1000 /* template, not connection */
+
+/* Move it to better place one day, for now keep it unique */
+#define NFC_IPVS_PROPERTY 0x10000
+
+#define IP_VS_SCHEDNAME_MAXLEN 16
+#define IP_VS_IFNAME_MAXLEN 16
+
+
+/*
+ * The struct ip_vs_service_user and struct ip_vs_dest_user are
+ * used to set IPVS rules through setsockopt.
+ */
+struct ip_vs_service_user {
+ /* virtual service addresses */
+ u_int16_t protocol;
+ __be32 addr; /* virtual ip address */
+ __be16 port;
+ u_int32_t fwmark; /* firwall mark of service */
+
+ /* virtual service options */
+ char sched_name[IP_VS_SCHEDNAME_MAXLEN];
+ unsigned flags; /* virtual service flags */
+ unsigned timeout; /* persistent timeout in sec */
+ __be32 netmask; /* persistent netmask */
+};
+
+
+struct ip_vs_dest_user {
+ /* destination server address */
+ __be32 addr;
+ __be16 port;
+
+ /* real server options */
+ unsigned conn_flags; /* connection flags */
+ int weight; /* destination weight */
+
+ /* thresholds for active connections */
+ u_int32_t u_threshold; /* upper threshold */
+ u_int32_t l_threshold; /* lower threshold */
+};
+
+
+/*
+ * IPVS statistics object (for user space)
+ */
+struct ip_vs_stats_user
+{
+ __u32 conns; /* connections scheduled */
+ __u32 inpkts; /* incoming packets */
+ __u32 outpkts; /* outgoing packets */
+ __u64 inbytes; /* incoming bytes */
+ __u64 outbytes; /* outgoing bytes */
+
+ __u32 cps; /* current connection rate */
+ __u32 inpps; /* current in packet rate */
+ __u32 outpps; /* current out packet rate */
+ __u32 inbps; /* current in byte rate */
+ __u32 outbps; /* current out byte rate */
+};
+
+
+/* The argument to IP_VS_SO_GET_INFO */
+struct ip_vs_getinfo {
+ /* version number */
+ unsigned int version;
+
+ /* size of connection hash table */
+ unsigned int size;
+
+ /* number of virtual services */
+ unsigned int num_services;
+};
+
+
+/* The argument to IP_VS_SO_GET_SERVICE */
+struct ip_vs_service_entry {
+ /* which service: user fills in these */
+ u_int16_t protocol;
+ __be32 addr; /* virtual address */
+ __be16 port;
+ u_int32_t fwmark; /* firwall mark of service */
+
+ /* service options */
+ char sched_name[IP_VS_SCHEDNAME_MAXLEN];
+ unsigned flags; /* virtual service flags */
+ unsigned timeout; /* persistent timeout */
+ __be32 netmask; /* persistent netmask */
+
+ /* number of real servers */
+ unsigned int num_dests;
+
+ /* statistics */
+ struct ip_vs_stats_user stats;
+};
+
+
+struct ip_vs_dest_entry {
+ __be32 addr; /* destination address */
+ __be16 port;
+ unsigned conn_flags; /* connection flags */
+ int weight; /* destination weight */
+
+ u_int32_t u_threshold; /* upper threshold */
+ u_int32_t l_threshold; /* lower threshold */
+
+ u_int32_t activeconns; /* active connections */
+ u_int32_t inactconns; /* inactive connections */
+ u_int32_t persistconns; /* persistent connections */
+
+ /* statistics */
+ struct ip_vs_stats_user stats;
+};
+
+
+/* The argument to IP_VS_SO_GET_DESTS */
+struct ip_vs_get_dests {
+ /* which service: user fills in these */
+ u_int16_t protocol;
+ __be32 addr; /* virtual address */
+ __be16 port;
+ u_int32_t fwmark; /* firwall mark of service */
+
+ /* number of real servers */
+ unsigned int num_dests;
+
+ /* the real servers */
+ struct ip_vs_dest_entry entrytable[0];
+};
+
+
+/* The argument to IP_VS_SO_GET_SERVICES */
+struct ip_vs_get_services {
+ /* number of virtual services */
+ unsigned int num_services;
+
+ /* service table */
+ struct ip_vs_service_entry entrytable[0];
+};
+
+
+/* The argument to IP_VS_SO_GET_TIMEOUT */
+struct ip_vs_timeout_user {
+ int tcp_timeout;
+ int tcp_fin_timeout;
+ int udp_timeout;
+};
+
+
+/* The argument to IP_VS_SO_GET_DAEMON */
+struct ip_vs_daemon_user {
+ /* sync daemon state (master/backup) */
+ int state;
+
+ /* multicast interface name */
+ char mcast_ifn[IP_VS_IFNAME_MAXLEN];
+
+ /* SyncID we belong to */
+ int syncid;
+};
+
+
+#ifdef __KERNEL__
+/* This portion of the code removed for size.
+ * Robin H. Johnson <robbat2@gentoo.org>
+ * 27 April 2007 */
+#endif /* __KERNEL__ */
+
+#endif /* _IP_VS_H */
diff --git a/sys-cluster/keepalived/keepalived-1.1.13-r1.ebuild b/sys-cluster/keepalived/keepalived-1.1.13-r1.ebuild
new file mode 100644
index 000000000000..2374e06bdfb9
--- /dev/null
+++ b/sys-cluster/keepalived/keepalived-1.1.13-r1.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/keepalived/keepalived-1.1.13-r1.ebuild,v 1.1 2007/04/28 07:24:35 robbat2 Exp $
+
+inherit flag-o-matic autotools
+
+DESCRIPTION="add a strong & robust keepalive facility to the Linux Virtual Server project"
+HOMEPAGE="http://www.keepalived.org/"
+SRC_URI="http://www.keepalived.org/software/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="debug profile"
+
+RDEPEND="dev-libs/popt
+ sys-apps/iproute2
+ dev-libs/openssl"
+DEPEND="${RDEPEND}
+ =sys-kernel/linux-headers-2.6*"
+
+src_unpack() {
+ unpack ${A}
+
+ # This patch allows us to avoid needing kernel sources for the configure phase
+ EPATCH_OPTS="-p1 -d${S}" epatch \
+ ${FILESDIR}/${PN}-1.1.13-do-not-need-kernel-sources.patch
+ cd ${S}
+ eautoreconf
+
+ # Prepare a suitable copy of the IPVS headers
+ # So that we don't need kernel sources at all!
+ mkdir -p ${S}/include/net || die "Failed to prepare ipvs header directory"
+ cp -f ${FILESDIR}/${PN}-1.1.13-linux-2.6.21-ip_vs.h \
+ ${S}/include/net/ip_vs.h || die "Failed to add ipvs header"
+
+ # Ensure that keepalived can find the header that we are injecting
+ append-flags -I${S}/include
+}
+
+src_compile() {
+ local myconf
+
+ myconf="--enable-vrrp"
+
+ # This is not an error
+ # The upstream makefile adds man/
+ myconf="${myconf} --mandir=/usr/share"
+
+ use debug && myconf="${myconf} --enable-debug"
+
+ # disable -fomit-frame-pointer for profiling
+ if use profile; then
+ filter-flags -fomit-frame-pointer
+ myconf="${myconf} --enable-profile"
+ fi
+
+ econf ${myconf} STRIP=/bin/true || die "configure failed"
+ emake || die "emake failed (myconf=${myconf})"
+}
+
+src_install() {
+ # Not parallel safe
+ emake -j1 install DESTDIR="${D}" || die "emake install failed"
+
+ newinitd ${FILESDIR}/init-keepalived keepalived
+
+ dodoc doc/keepalived.conf.SYNOPSIS
+ dodoc README CONTRIBUTORS INSTALL VERSION ChangeLog AUTHOR TODO
+
+ docinto genhash
+ dodoc genhash/README genhash/AUTHOR genhash/ChangeLog genhash/VERSION
+ # This was badly named by upstream, it's more HOWTO than anything else.
+ newdoc INSTALL INSTALL+HOWTO
+
+ # Security risk to bundle SSL certs
+ rm -f ${D}/etc/keepalived/samples/*.pem
+}
+
+pkg_postinst() {
+ elog "For internal debug support, compile with USE=debug via package.use"
+}