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/ipvsadm
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/ipvsadm')
-rw-r--r--sys-cluster/ipvsadm/Manifest4
-rw-r--r--sys-cluster/ipvsadm/files/ipvsadm-1.26-buildsystem.patch113
-rw-r--r--sys-cluster/ipvsadm/files/ipvsadm-1.26-stack_smashing.patch32
-rw-r--r--sys-cluster/ipvsadm/files/ipvsadm-1.27-buildsystem.patch117
-rw-r--r--sys-cluster/ipvsadm/files/ipvsadm-1.27-fix-daemon-state.patch56
-rw-r--r--sys-cluster/ipvsadm/files/ipvsadm-init37
-rw-r--r--sys-cluster/ipvsadm/ipvsadm-1.21-r1.ebuild50
-rw-r--r--sys-cluster/ipvsadm/ipvsadm-1.24.ebuild53
-rw-r--r--sys-cluster/ipvsadm/ipvsadm-1.26-r2.ebuild65
-rw-r--r--sys-cluster/ipvsadm/ipvsadm-1.27-r1.ebuild67
-rw-r--r--sys-cluster/ipvsadm/ipvsadm-1.27.ebuild67
-rw-r--r--sys-cluster/ipvsadm/metadata.xml9
12 files changed, 670 insertions, 0 deletions
diff --git a/sys-cluster/ipvsadm/Manifest b/sys-cluster/ipvsadm/Manifest
new file mode 100644
index 000000000000..e91a81bd9b73
--- /dev/null
+++ b/sys-cluster/ipvsadm/Manifest
@@ -0,0 +1,4 @@
+DIST ipvsadm-1.21-11.tar.gz 34030 SHA256 7b85020f84d4648166bce480d747d82ac5c9113f9a222e3de7eb92b7af0598fa
+DIST ipvsadm-1.24.tar.gz 32007 SHA256 773cbada48061e3afafaeaa2800d5382b8ff638b2c929293c14a793112a0642a
+DIST ipvsadm-1.26.tar.gz 41700 SHA256 6d6c46fecb1c532a892616b4445c73b71730e8790d5630f60269fd9cbee0eb2d SHA512 873e23a6bdaabc153b00f1ede3853c947e8c8cfb4e18364d55197c74f26cc883ca469e074a90f377fbfd5e73e0cd6c1fe414c9f7a5c28b0d4431af58056eced4 WHIRLPOOL 5f62ad434c7da3359adbfae1cdde230769f19f0c82a190d7ef6fc8ba340d5e761875a778ad9a1dd7162d385b8ebda89c589b7179d53d495c79e82056e46bce9a
+DIST ipvsadm-1.27.tar.xz 38196 SHA256 d360fb4dcf591e0a8a918831e2c02b1dc03e3c17ee1e60d0d70de9455238b3f8 SHA512 cf982b7981674c91d1b7516de7b55cf378b306ce4a53e13976b8eeb8610015c4fa4aa9d251bc4d329db8e05c1862863160af2d3c63b76263f290087cffdf1b80 WHIRLPOOL fbb69043813ccba929bb044c9d7854b67e8d656ae08209f17e21d3d237ea4690cd8ea7a1e2806ce6b07f847eb9796e93649c7f5231d2356e8519696b5a504b73
diff --git a/sys-cluster/ipvsadm/files/ipvsadm-1.26-buildsystem.patch b/sys-cluster/ipvsadm/files/ipvsadm-1.26-buildsystem.patch
new file mode 100644
index 000000000000..ba8e9450eb35
--- /dev/null
+++ b/sys-cluster/ipvsadm/files/ipvsadm-1.26-buildsystem.patch
@@ -0,0 +1,113 @@
+--- a/Makefile
++++ b/Makefile
+@@ -43,14 +43,13 @@
+ INIT = $(BUILD_ROOT)/etc/rc.d/init.d
+ MKDIR = mkdir
+ INSTALL = install
+-STATIC_LIBS = libipvs/libipvs.a
+
+ ifeq "${ARCH}" "sparc64"
+- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
++ CFLAGS := -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
+ else
+- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g
++ CFLAGS := -g
+ endif
+-
++OPTFLAGS += -Wall -Wunused -Wstrict-prototypes
+
+ #####################################
+ # No servicable parts below this line
+@@ -94,10 +93,12 @@
+ all: libs ipvsadm
+
+ libs:
+- make -C libipvs
++ $(MAKE) -C libipvs
++
++$(OBJS): libs
+
+-ipvsadm: $(OBJS) $(STATIC_LIBS)
+- $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
++ipvsadm: $(OBJS)
++ $(CC) $(LDFLAGS) $(OPTFLAGS) $(CFLAGS) -o $@ $^ -Llibipvs -lipvs $(LIBS)
+
+-install: all
++install:
+ if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi
+@@ -108,15 +109,13 @@
+ $(INSTALL) -m 0644 ipvsadm.8 $(MAN)
+ $(INSTALL) -m 0644 ipvsadm-save.8 $(MAN)
+ $(INSTALL) -m 0644 ipvsadm-restore.8 $(MAN)
+- [ -d $(INIT) ] || $(MKDIR) -p $(INIT)
+- $(INSTALL) -m 0755 ipvsadm.sh $(INIT)/ipvsadm
+
+ clean:
+ rm -f ipvsadm $(NAME).spec $(NAME)-$(VERSION).tar.gz
+ rm -rf debian/tmp
+ find . -name '*.[ao]' -o -name "*~" -o -name "*.orig" \
+ -o -name "*.rej" -o -name core | xargs rm -f
+- make -C libipvs clean
++ $(MAKE) -C libipvs clean
+
+ distclean: clean
+
+@@ -149,4 +148,4 @@
+ dpkg-buildpackage
+
+ %.o: %.c
+- $(CC) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
++ $(CC) $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
+--- a/libipvs/Makefile
++++ b/libipvs/Makefile
+@@ -1,32 +1,39 @@
+ # Makefile for libipvs
+
+ CC = gcc
+-CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC
++OPTFLAGS = -Wall -Wunused -Wstrict-prototypes
+ ifneq (0,$(HAVE_NL))
+-CFLAGS += -DLIBIPVS_USE_NL
++DEFINES += -DLIBIPVS_USE_NL
+ endif
+
+ INCLUDE += $(shell if [ -f ../../ip_vs.h ]; then \
+ echo "-I../../."; fi;)
+-DEFINES = $(shell if [ ! -f ../../ip_vs.h ]; then \
++DEFINES += $(shell if [ ! -f ../../ip_vs.h ]; then \
+ echo "-DHAVE_NET_IP_VS_H"; fi;)
+
+ .PHONY = all clean install dist distclean rpm rpms
+-STATIC_LIB = libipvs.a
+-SHARED_LIB = libipvs.so
+
+-all: $(STATIC_LIB) $(SHARED_LIB)
++TARGETS = libipvs.so
+
+-$(STATIC_LIB): libipvs.o ip_vs_nl_policy.o
++ifeq (1,$(STATIC_LIB))
++TARGETS += libipvs.a
++endif
++
++all: $(TARGETS)
++
++libipvs.a: libipvs.o ip_vs_nl_policy.o
+ ar rv $@ $^
+
+-$(SHARED_LIB): libipvs.o ip_vs_nl_policy.o
+- $(CC) -shared -Wl,-soname,$@ -o $@ $^
++libipvs.so: libipvs.lo ip_vs_nl_policy.lo
++ $(CC) $(LDFLAGS) -shared -Wl,-soname,$@ -o $@ $^
++
++%.lo: %.c
++ $(CC) -fPIC $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
+
+ %.o: %.c
+- $(CC) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
++ $(CC) $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
+
+ clean:
+- rm -f *.[ao] *~ *.orig *.rej core *.so
++ rm -f *.[ao] *~ *.orig *.rej core *.so *.lo
+
+ distclean: clean
diff --git a/sys-cluster/ipvsadm/files/ipvsadm-1.26-stack_smashing.patch b/sys-cluster/ipvsadm/files/ipvsadm-1.26-stack_smashing.patch
new file mode 100644
index 000000000000..d36b0bf8abe4
--- /dev/null
+++ b/sys-cluster/ipvsadm/files/ipvsadm-1.26-stack_smashing.patch
@@ -0,0 +1,32 @@
+From 81529af388c0f0f4e4b169b7bcb285ef5e798f41 Mon Sep 17 00:00:00 2001
+From: Christian Ruppert <idl0r@gentoo.org>
+Date: Sat, 8 Oct 2011 02:05:37 +0200
+Subject: [PATCH] Fix stack smashing because of a typo
+
+IPVS_CMD_ATTR_MAX was the size of __IPVS_SVC_ATTR_MAX before, which has a
+different size and thus it caused trouble. The right enum to use is
+__IPVS_CMD_ATTR_MAX.
+
+Reported-by: Deniss Gaplevsky <slim@inbox.lv>
+X-Gentoo-Bug: 371903
+X-Gentoo-Bug-URL: https://bugs.gentoo.org/371903
+---
+ libipvs/ip_vs.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/libipvs/ip_vs.h b/libipvs/ip_vs.h
+index 9726a17..5e1d544 100644
+--- a/libipvs/ip_vs.h
++++ b/libipvs/ip_vs.h
+@@ -413,7 +413,7 @@ enum {
+ __IPVS_CMD_ATTR_MAX,
+ };
+
+-#define IPVS_CMD_ATTR_MAX (__IPVS_SVC_ATTR_MAX - 1)
++#define IPVS_CMD_ATTR_MAX (__IPVS_CMD_ATTR_MAX - 1)
+
+ /*
+ * Attributes used to describe a service
+--
+1.7.3.4
+
diff --git a/sys-cluster/ipvsadm/files/ipvsadm-1.27-buildsystem.patch b/sys-cluster/ipvsadm/files/ipvsadm-1.27-buildsystem.patch
new file mode 100644
index 000000000000..54d2e55c1519
--- /dev/null
+++ b/sys-cluster/ipvsadm/files/ipvsadm-1.27-buildsystem.patch
@@ -0,0 +1,117 @@
+diff -Nuar -Nuar --exclude '*.orig' --exclude '*.rej' ipvsadm-1.27.orig/libipvs/Makefile ipvsadm-1.27/libipvs/Makefile
+--- ipvsadm-1.27.orig/libipvs/Makefile 2013-09-06 01:37:27.000000000 -0700
++++ ipvsadm-1.27/libipvs/Makefile 2013-11-01 23:45:21.633636401 -0700
+@@ -1,9 +1,9 @@
+ # Makefile for libipvs
+
+ CC = gcc
+-CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -fPIC
++#OPTFLAGS = -Wall -Wunused -Wstrict-prototypes
+ ifneq (0,$(HAVE_NL))
+-CFLAGS += -DLIBIPVS_USE_NL
++DEFINES += -DLIBIPVS_USE_NL
+ CFLAGS += $(shell \
+ if which pkg-config > /dev/null 2>&1; then \
+ if pkg-config --cflags libnl-3.0 2> /dev/null; then :; \
+@@ -15,7 +15,7 @@
+
+ INCLUDE += $(shell if [ -f ../../ip_vs.h ]; then \
+ echo "-I../../."; fi;)
+-DEFINES = $(shell if [ ! -f ../../ip_vs.h ]; then \
++DEFINES += $(shell if [ ! -f ../../ip_vs.h ]; then \
+ echo "-DHAVE_NET_IP_VS_H"; fi;)
+ DEFINES += $(shell if which pkg-config > /dev/null 2>&1; then \
+ if pkg-config --exists libnl-3.0; then :; \
+@@ -24,21 +24,31 @@
+ then echo "-DFALLBACK_LIBNL1"; fi; fi)
+
+ .PHONY = all clean install dist distclean rpm rpms
++
+ STATIC_LIB = libipvs.a
+ SHARED_LIB = libipvs.so
+
+-all: $(STATIC_LIB) $(SHARED_LIB)
++TARGETS = $(SHARED_LIB)
++ifeq (1,$(STATIC))
++TARGETS += $(STATIC_LIB)
++endif
++all: $(TARGETS)
++
++SOURCES = libipvs.c ip_vs_nl_policy.c
+
+-$(STATIC_LIB): libipvs.o ip_vs_nl_policy.o
++$(STATIC_LIB): $(SOURCES:%.c=%.o)
+ ar rv $@ $^
+
+-$(SHARED_LIB): libipvs.o ip_vs_nl_policy.o
+- $(CC) -shared -Wl,-soname,$@ -o $@ $^
++$(SHARED_LIB): $(SOURCES:%.c=%.lo)
++ $(CC) $(LDFLAGS) -shared -Wl,-soname,$@ -o $@ $^
++
++%.lo: %.c
++ $(CC) -fPIC $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
+
+ %.o: %.c
+- $(CC) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
++ $(CC) $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
+
+ clean:
+- rm -f *.[ao] *~ *.orig *.rej core *.so
++ rm -f *.[ao] *~ *.orig *.rej core *.so *.lo
+
+ distclean: clean
+diff -Nuar -Nuar --exclude '*.orig' --exclude '*.rej' ipvsadm-1.27.orig/Makefile ipvsadm-1.27/Makefile
+--- ipvsadm-1.27.orig/Makefile 2013-11-01 23:49:36.523225124 -0700
++++ ipvsadm-1.27/Makefile 2013-11-01 23:49:09.478738760 -0700
+@@ -43,14 +43,13 @@
+ INIT = $(BUILD_ROOT)/etc/rc.d/init.d
+ MKDIR = mkdir
+ INSTALL = install
+-STATIC_LIBS = libipvs/libipvs.a
+
+ ifeq "${ARCH}" "sparc64"
+- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
++ CFLAGS := -g -m64 -pipe -mcpu=ultrasparc -mcmodel=medlow
+ else
+- CFLAGS = -Wall -Wunused -Wstrict-prototypes -g
++ CFLAGS := -g
+ endif
+-
++OPTFLAGS += -Wall -Wunused -Wstrict-prototypes
+
+ #####################################
+ # No servicable parts below this line
+@@ -84,12 +83,14 @@
+ all: libs ipvsadm
+
+ libs:
+- make -C libipvs
++ $(MAKE) -C libipvs CFLAGS="$(CFLAGS)" STATIC="$(STATIC)" OPTFLAGS="$(OPTFLAGS)"
++
++$(OBJS): libs
+
+-ipvsadm: $(OBJS) $(STATIC_LIBS)
+- $(CC) $(CFLAGS) -o $@ $^ $(LIBS)
++ipvsadm: $(OBJS)
++ $(CC) $(LDFLAGS) $(OPTFLAGS) $(CFLAGS) -o $@ $^ -Llibipvs -lipvs $(LIBS)
+
+-install: all
++install: all
+ if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi
+ $(INSTALL) -m 0755 ipvsadm $(SBIN)
+ $(INSTALL) -m 0755 ipvsadm-save $(SBIN)
+@@ -106,7 +107,7 @@
+ rm -rf debian/tmp
+ find . -name '*.[ao]' -o -name "*~" -o -name "*.orig" \
+ -o -name "*.rej" -o -name core | xargs rm -f
+- make -C libipvs clean
++ $(MAKE) -C libipvs clean
+
+ distclean: clean
+
+@@ -139,4 +140,4 @@
+ dpkg-buildpackage
+
+ %.o: %.c
+- $(CC) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
++ $(CC) $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
diff --git a/sys-cluster/ipvsadm/files/ipvsadm-1.27-fix-daemon-state.patch b/sys-cluster/ipvsadm/files/ipvsadm-1.27-fix-daemon-state.patch
new file mode 100644
index 000000000000..e3e5ebec72c6
--- /dev/null
+++ b/sys-cluster/ipvsadm/files/ipvsadm-1.27-fix-daemon-state.patch
@@ -0,0 +1,56 @@
+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.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+---
+ libipvs/libipvs.c | 11 ++++++-----
+ 1 files changed, 6 insertions(+), 5 deletions(-)
+
+Note: patch adjusted slightly to apply against ipvsadm (was spun for keepalived) - robbat2
+
+diff --git a/libipvs/libipvs.c b/libipvs/libipvs.c
+index ea5e851..6bee837 100644
+--- a/libipvs/libipvs.c
++++ b/libipvs/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/ipvsadm/files/ipvsadm-init b/sys-cluster/ipvsadm/files/ipvsadm-init
new file mode 100644
index 000000000000..a365524039a4
--- /dev/null
+++ b/sys-cluster/ipvsadm/files/ipvsadm-init
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_commands="save"
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f /var/lib/ipvsadm/rules-save ] ; then
+ eerror "Not starting ipvsadm. First create some rules then run"
+ eerror "/etc/init.d/ipvsadm save"
+ return 1
+ fi
+}
+
+start() {
+ ebegin "Starting ipvsadm"
+ einfo "Clearing previous rules"
+ ipvsadm -C
+ ipvsadm-restore < /var/lib/ipvsadm/rules-save
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ipvsadm"
+ eend $?
+}
+
+save() {
+ ebegin "Saving ipvsadm state"
+ ipvsadm-save > /var/lib/ipvsadm/rules-save
+ eend $?
+}
diff --git a/sys-cluster/ipvsadm/ipvsadm-1.21-r1.ebuild b/sys-cluster/ipvsadm/ipvsadm-1.21-r1.ebuild
new file mode 100644
index 000000000000..c5be3b2388eb
--- /dev/null
+++ b/sys-cluster/ipvsadm/ipvsadm-1.21-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit linux-info
+
+PATCHLEVEL="11"
+MY_PV="${PV}-${PATCHLEVEL}"
+MY_P="${PN}-${MY_PV}"
+
+DESCRIPTION="utility to administer the IP virtual server services"
+HOMEPAGE="http://linuxvirtualserver.org"
+LICENSE="GPL-2"
+DEPEND=">=sys-libs/ncurses-5.2"
+
+SRC_URI="http://www.linuxvirtualserver.org/software/kernel-2.4/${MY_P}.tar.gz"
+
+SLOT="0"
+KEYWORDS="~ppc ~ppc64 x86"
+IUSE=""
+
+S="${WORKDIR}/${MY_P}"
+
+pkg_setup() {
+ if kernel_is -ge 2 6; then
+ eerror "${P} does not support 2.6 kernels, please try newer versions"
+ die "wrong kernel version"
+ fi
+}
+
+src_compile() {
+ emake || die "error compiling source"
+}
+
+src_install() {
+ into /
+ dosbin ipvsadm ipvsadm-save ipvsadm-restore || die
+
+ doman ipvsadm.8 ipvsadm-save.8 ipvsadm-restore.8
+
+ newinitd "${FILESDIR}"/ipvsadm-init ipvsadm || die
+ keepdir /var/lib/ipvsadm
+
+ dolib.a libipvs/libipvs.a || die
+
+ insinto /usr/include/ipvs
+ newins libipvs/libipvs.h ipvs.h || die
+
+ einfo "You will need a kernel that has ipvs patches to use LVS"
+}
diff --git a/sys-cluster/ipvsadm/ipvsadm-1.24.ebuild b/sys-cluster/ipvsadm/ipvsadm-1.24.ebuild
new file mode 100644
index 000000000000..6cd5698cece3
--- /dev/null
+++ b/sys-cluster/ipvsadm/ipvsadm-1.24.ebuild
@@ -0,0 +1,53 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit linux-info toolchain-funcs
+
+DESCRIPTION="utility to administer the IP virtual server services offered by the Linux kernel"
+HOMEPAGE="http://linuxvirtualserver.org/"
+SRC_URI="http://www.linuxvirtualserver.org/software/kernel-2.5/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ia64 ~ppc64 s390 sparc x86"
+IUSE=""
+
+RDEPEND=">=sys-libs/ncurses-5.2"
+DEPEND="${RDEPEND}"
+
+pkg_setup() {
+ if kernel_is 2 4; then
+ eerror "${P} supports only 2.6 kernels, please try ${PN}-1.21 for 2.4 kernels"
+ die "wrong kernel version"
+ fi
+}
+
+src_compile() {
+ emake \
+ -j1 \
+ INCLUDE="-I${KV_DIR}/include -I.. -I." \
+ CFLAGS="${CFLAGS}" \
+ CC="$(tc-getCC)" \
+ || die "error compiling source"
+}
+
+src_install() {
+ into /
+ dosbin ipvsadm ipvsadm-save ipvsadm-restore || die
+
+ doman ipvsadm.8 ipvsadm-save.8 ipvsadm-restore.8 || die
+
+ newinitd "${FILESDIR}"/ipvsadm-init ipvsadm
+ keepdir /var/lib/ipvsadm
+
+ dolib.a libipvs/libipvs.a || die
+
+ insinto /usr/include/ipvs
+ newins libipvs/libipvs.h ipvs.h || die
+}
+
+pkg_postinst() {
+ einfo "You will need a kernel that has ipvs patches to use LVS."
+ einfo "This version is specifically for 2.6 kernels."
+}
diff --git a/sys-cluster/ipvsadm/ipvsadm-1.26-r2.ebuild b/sys-cluster/ipvsadm/ipvsadm-1.26-r2.ebuild
new file mode 100644
index 000000000000..0a12957158b6
--- /dev/null
+++ b/sys-cluster/ipvsadm/ipvsadm-1.26-r2.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils linux-info toolchain-funcs
+
+DESCRIPTION="utility to administer the IP virtual server services"
+HOMEPAGE="http://linuxvirtualserver.org/"
+SRC_URI="http://www.linuxvirtualserver.org/software/kernel-2.6/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ia64 ppc ppc64 s390 sparc x86"
+IUSE="static-libs"
+
+RDEPEND=">=sys-libs/ncurses-5.2
+ dev-libs/libnl:1.1
+ >=dev-libs/popt-1.16"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_pretend() {
+ if kernel_is 2 4; then
+ eerror "${P} supports only 2.6 series and later kernels, please try ${PN}-1.21 for 2.4 kernels"
+ die "wrong kernel version"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-buildsystem.patch
+ epatch "${FILESDIR}/${P}-stack_smashing.patch" # bug 371903
+ use static-libs && export STATIC=1
+}
+
+src_compile() {
+ emake -e \
+ INCLUDE="-I.. -I." \
+ CC="$(tc-getCC)" \
+ HAVE_NL=1 \
+ STATIC_LIB=${STATIC} \
+ POPT_LIB="$(pkg-config --libs popt)"
+}
+
+src_install() {
+ into /
+ dosbin ipvsadm ipvsadm-save ipvsadm-restore
+
+ into /usr
+ doman ipvsadm.8 ipvsadm-save.8 ipvsadm-restore.8
+
+ newinitd "${FILESDIR}"/ipvsadm-init ipvsadm
+ keepdir /var/lib/ipvsadm
+
+ use static-libs && dolib.a libipvs/libipvs.a
+ dolib.so libipvs/libipvs.so
+
+ insinto /usr/include/ipvs
+ newins libipvs/libipvs.h ipvs.h
+}
+
+pkg_postinst() {
+ einfo "You will need a kernel that has ipvs patches to use LVS."
+}
diff --git a/sys-cluster/ipvsadm/ipvsadm-1.27-r1.ebuild b/sys-cluster/ipvsadm/ipvsadm-1.27-r1.ebuild
new file mode 100644
index 000000000000..3ff6de56459a
--- /dev/null
+++ b/sys-cluster/ipvsadm/ipvsadm-1.27-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils linux-info toolchain-funcs
+
+DESCRIPTION="utility to administer the IP virtual server services"
+HOMEPAGE="http://linuxvirtualserver.org/"
+SRC_URI="https://kernel.org/pub/linux/utils/kernel/ipvsadm/ipvsadm-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="static-libs"
+
+RDEPEND=">=sys-libs/ncurses-5.2
+ dev-libs/libnl
+ >=dev-libs/popt-1.16"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_pretend() {
+ if kernel_is 2 4; then
+ eerror "${P} supports only 2.6 series and later kernels, please try ${PN}-1.21 for 2.4 kernels"
+ die "wrong kernel version"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.27-buildsystem.patch
+ # Merged upstream in 1.27
+ #epatch "${FILESDIR}"/${PN}-1.26-stack_smashing.patch # bug 371903
+ epatch "${FILESDIR}"/${PN}-1.27-fix-daemon-state.patch
+ use static-libs && export STATIC=1
+}
+
+src_compile() {
+ emake -e \
+ INCLUDE="-I.. -I." \
+ CC="$(tc-getCC)" \
+ HAVE_NL=1 \
+ STATIC=${STATIC} \
+ POPT_LIB="$(pkg-config --libs popt)"
+}
+
+src_install() {
+ into /
+ dosbin ipvsadm ipvsadm-save ipvsadm-restore
+
+ into /usr
+ doman ipvsadm.8 ipvsadm-save.8 ipvsadm-restore.8
+
+ newinitd "${FILESDIR}"/ipvsadm-init ipvsadm
+ keepdir /var/lib/ipvsadm
+
+ use static-libs && dolib.a libipvs/libipvs.a
+ dolib.so libipvs/libipvs.so
+
+ insinto /usr/include/ipvs
+ newins libipvs/libipvs.h ipvs.h
+}
+
+pkg_postinst() {
+ einfo "You will need a kernel that has ipvs patches to use LVS."
+}
diff --git a/sys-cluster/ipvsadm/ipvsadm-1.27.ebuild b/sys-cluster/ipvsadm/ipvsadm-1.27.ebuild
new file mode 100644
index 000000000000..5718b3b52f3f
--- /dev/null
+++ b/sys-cluster/ipvsadm/ipvsadm-1.27.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+inherit eutils linux-info toolchain-funcs
+
+DESCRIPTION="utility to administer the IP virtual server services"
+HOMEPAGE="http://linuxvirtualserver.org/"
+SRC_URI="https://kernel.org/pub/linux/utils/kernel/ipvsadm/ipvsadm-${PV}.tar.xz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ia64 ~ppc ~ppc64 ~s390 ~sparc ~x86"
+IUSE="static-libs"
+
+RDEPEND=">=sys-libs/ncurses-5.2
+ dev-libs/libnl
+ >=dev-libs/popt-1.16"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_pretend() {
+ if kernel_is 2 4; then
+ eerror "${P} supports only 2.6 series and later kernels, please try ${PN}-1.21 for 2.4 kernels"
+ die "wrong kernel version"
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.27-buildsystem.patch
+ # Merged upstream in 1.27
+ #epatch "${FILESDIR}"/${PN}-1.26-stack_smashing.patch # bug 371903
+
+ use static-libs && export STATIC=1
+}
+
+src_compile() {
+ emake -e \
+ INCLUDE="-I.. -I." \
+ CC="$(tc-getCC)" \
+ HAVE_NL=1 \
+ STATIC=${STATIC} \
+ POPT_LIB="$(pkg-config --libs popt)"
+}
+
+src_install() {
+ into /
+ dosbin ipvsadm ipvsadm-save ipvsadm-restore
+
+ into /usr
+ doman ipvsadm.8 ipvsadm-save.8 ipvsadm-restore.8
+
+ newinitd "${FILESDIR}"/ipvsadm-init ipvsadm
+ keepdir /var/lib/ipvsadm
+
+ use static-libs && dolib.a libipvs/libipvs.a
+ dolib.so libipvs/libipvs.so
+
+ insinto /usr/include/ipvs
+ newins libipvs/libipvs.h ipvs.h
+}
+
+pkg_postinst() {
+ einfo "You will need a kernel that has ipvs patches to use LVS."
+}
diff --git a/sys-cluster/ipvsadm/metadata.xml b/sys-cluster/ipvsadm/metadata.xml
new file mode 100644
index 000000000000..c59d5f8c5323
--- /dev/null
+++ b/sys-cluster/ipvsadm/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cluster</herd>
+
+ <longdescription>
+ Administration tools for linux virtual server clusters
+ </longdescription>
+</pkgmetadata>