summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2013-11-02 06:40:02 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2013-11-02 06:40:02 +0000
commitbc385efdd617bf9d4000bab63566ea6315aa0577 (patch)
tree3d15139f238329071450a85789869159fb5c5f92 /sys-cluster/ipvsadm
parentThe Debian patchset has a great tool (checkarray) to run a regular check of a... (diff)
downloadgentoo-2-bc385efdd617bf9d4000bab63566ea6315aa0577.tar.gz
gentoo-2-bc385efdd617bf9d4000bab63566ea6315aa0577.tar.bz2
gentoo-2-bc385efdd617bf9d4000bab63566ea6315aa0577.zip
New release. Upstream has moved to kernel.org; update the build system fixes to apply.
(Portage version: 2.2.7/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'sys-cluster/ipvsadm')
-rw-r--r--sys-cluster/ipvsadm/ChangeLog12
-rw-r--r--sys-cluster/ipvsadm/files/ipvsadm-1.27-buildsystem.patch125
-rw-r--r--sys-cluster/ipvsadm/ipvsadm-1.27.ebuild67
3 files changed, 201 insertions, 3 deletions
diff --git a/sys-cluster/ipvsadm/ChangeLog b/sys-cluster/ipvsadm/ChangeLog
index 919fd837759d..540391912822 100644
--- a/sys-cluster/ipvsadm/ChangeLog
+++ b/sys-cluster/ipvsadm/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-cluster/ipvsadm
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-cluster/ipvsadm/ChangeLog,v 1.58 2012/05/04 07:20:31 jdhore Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/ipvsadm/ChangeLog,v 1.59 2013/11/02 06:40:02 robbat2 Exp $
+
+*ipvsadm-1.27 (02 Nov 2013)
+
+ 02 Nov 2013; Robin H. Johnson <robbat2@gentoo.org>
+ +files/ipvsadm-1.27-buildsystem.patch, +ipvsadm-1.27.ebuild:
+ New release. Upstream has moved to kernel.org; update the build system fixes
+ to apply.
04 May 2012; Jeff Horelick <jdhore@gentoo.org> ipvsadm-1.26-r2.ebuild:
dev-util/pkgconfig -> virtual/pkgconfig
@@ -206,4 +213,3 @@
24 Feb 2003; Zach Welch <zwelch@gentoo.org> ipvsadm-1.21.ebuild files/digest-ipvsadm-1.21 :
New ebuild from bug 15706; Brett Simpson <simpsonb@impmail.dnsalias.com>
-
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..50a50f2e00a7
--- /dev/null
+++ b/sys-cluster/ipvsadm/files/ipvsadm-1.27-buildsystem.patch
@@ -0,0 +1,125 @@
+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:31:14.359495884 -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-09-06 01:37:27.000000000 -0700
++++ ipvsadm-1.27/Makefile 2013-11-01 23:31:44.259015958 -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
++
++$(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
+ $(INSTALL) -m 0755 ipvsadm $(SBIN)
+ $(INSTALL) -m 0755 ipvsadm-save $(SBIN)
+@@ -98,15 +99,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
+
+@@ -139,4 +138,4 @@
+ dpkg-buildpackage
+
+ %.o: %.c
+- $(CC) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
++ $(CC) $(OPTFLAGS) $(CFLAGS) $(INCLUDE) $(DEFINES) -c -o $@ $<
diff --git a/sys-cluster/ipvsadm/ipvsadm-1.27.ebuild b/sys-cluster/ipvsadm/ipvsadm-1.27.ebuild
new file mode 100644
index 000000000000..e4a024aacfee
--- /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
+# $Header: /var/cvsroot/gentoo-x86/sys-cluster/ipvsadm/ipvsadm-1.27.ebuild,v 1.1 2013/11/02 06:40:02 robbat2 Exp $
+
+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."
+}