From 7bb2e5afdfa0c0b0d5eb30851ede0a3ec932ec33 Mon Sep 17 00:00:00 2001 From: clement Date: Sat, 11 Jun 2005 16:52:40 +0000 Subject: - Add ipvs 0.4.0 for FreeBSD This is a port of IPVS (aka LVS) on FreeBSD. IPVS is a highly scalable and highly available server built on a cluster of real servers, with the load balancer. The architecture of the server cluster is fully transparent to end users, and the users interact as if it were a single high-performance virtual server. http://dragon.linux-vs.org/~dragonfly/htm/lvs_freebsd.htm --- net/ipvs/Makefile | 55 ++++++++++++++++++++++++++++++ net/ipvs/distinfo | 2 ++ net/ipvs/files/Makefile | 5 +++ net/ipvs/files/patch-ipvs_ipvsadm_Makefile | 43 +++++++++++++++++++++++ net/ipvs/pkg-descr | 7 ++++ net/ipvs/pkg-plist | 5 +++ 6 files changed, 117 insertions(+) create mode 100644 net/ipvs/Makefile create mode 100644 net/ipvs/distinfo create mode 100644 net/ipvs/files/Makefile create mode 100644 net/ipvs/files/patch-ipvs_ipvsadm_Makefile create mode 100644 net/ipvs/pkg-descr create mode 100644 net/ipvs/pkg-plist (limited to 'net/ipvs') diff --git a/net/ipvs/Makefile b/net/ipvs/Makefile new file mode 100644 index 0000000..515e12d --- /dev/null +++ b/net/ipvs/Makefile @@ -0,0 +1,55 @@ +# New ports collection makefile for: ipvs +# Date created: Jun 11 2005 +# Whom: clement@FreeBSD.org +# +# $FreeBSD$ +# + +PORTNAME= ipvs +PORTVERSION= 0.4.0 +CATEGORIES= net +MASTER_SITES= http://dragon.linux-vs.org/~dragonfly/software/ +DISTNAME= ipvs_freebsd-${PORTVERSION} + +MAINTAINER= clement@FreeBSD.org +COMMENT= FreeBSD port of Linux Virtual Server + +WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} +SRCDIR?= /usr/src + +MAN8= ipvsadm.8 ipvsadm-restore.8 ipvsadm-save.8 +MAKE_ENV+= MKDIR="${MKDIR}" KMODDIR="/boot/modules" + +.include + +ONLY_FOR_ARCHS= i386 + +.if ${OSVERSION} == 503001 +FREEBSD_VERSION= 5.3 +.elif (${OSVERSION} == 504000 || defined(TRY_STABLE)) && !defined(PACKAGE_BUILDING) +FREEBSD_VERSION= 5.4 +.else +IGNORE= : You need a patched 5.3-RELEASE of 5.4-RELEASE src tree in ${SRCDIR} +.endif + +patch-system: extract + @${FIND} ${WRKSRC}/patch/${FREEBSD_VERSION}-RELEASE -type f \ + -name "*.patch" -exec ${PATCH} -p0 -d ${SRCDIR} -i {} \; + +pre-everything:: + @${ECHO_CMD} "LVS on FreeBSD works only with 5.3-RELEASE and 5.4-RELEASE." + @${ECHO_CMD} "However it may work on 5-STABLE. If you are running FreeBSD 5.4-STABLE, define" + @${ECHO_CMD} "TRY_STABLE and check if patches apply correctly to your src tree" + @${ECHO_CMD} "To build ipvs, I strongly encourage you to follow these instructions" + @${ECHO_CMD} " 1. checkout supported src tree" + @${ECHO_CMD} " 2. run \"make patch-system\"" + @${ECHO_CMD} " 3. configure and build your kernel. (you need support of NetFilter" + @${ECHO_CMD} " sockopt, add \"options NF_SOCKOPT\")" + @${ECHO_CMD} " 4. Install your freshly compiled kernel" + @${ECHO_CMD} " 5. install the port" + @${ECHO_CMD} " 6. reboot your system" + +post-patch: + @${INSTALL_DATA} ${FILESDIR}/Makefile ${WRKSRC} + +.include diff --git a/net/ipvs/distinfo b/net/ipvs/distinfo new file mode 100644 index 0000000..7a35401 --- /dev/null +++ b/net/ipvs/distinfo @@ -0,0 +1,2 @@ +MD5 (ipvs_freebsd-0.4.0.tar.gz) = e5038cf9a4d138e6f5737aa63c2ba130 +SIZE (ipvs_freebsd-0.4.0.tar.gz) = 150473 diff --git a/net/ipvs/files/Makefile b/net/ipvs/files/Makefile new file mode 100644 index 0000000..79ebc30 --- /dev/null +++ b/net/ipvs/files/Makefile @@ -0,0 +1,5 @@ +# $FreeBSD$ + +SUBDIR= ipvs ipvs/ipvsadm + +.include diff --git a/net/ipvs/files/patch-ipvs_ipvsadm_Makefile b/net/ipvs/files/patch-ipvs_ipvsadm_Makefile new file mode 100644 index 0000000..ef3a353 --- /dev/null +++ b/net/ipvs/files/patch-ipvs_ipvsadm_Makefile @@ -0,0 +1,43 @@ +--- ipvs/ipvsadm/Makefile.orig Fri May 27 14:10:19 2005 ++++ ipvs/ipvsadm/Makefile Sat Jun 11 12:40:27 2005 +@@ -4,16 +4,13 @@ + SCHEDULERS = "rr|wrr|lc|wlc|lblc|lblcr|dh|sh|sed|nq" + PROGROOT = $(shell basename 'pwd') + +-CC = gcc +-CFLAGS = -Wall -Wunused -Wstrict-prototypes -g -O2 ++CFLAGS?= -Wall -Wunused -Wstrict-prototypes + OBJS = ipvsadm.o dynamic_array.o config_stream.o libipvs.o + +-SBIN = $(BUILD_ROOT)/sbin +-MANDIR = usr/share/man +-MAN = $(BUILD_ROOT)/$(MANDIR)/man8 ++SBIN = ${PREFIX}/sbin ++MANDIR = ${MANPREFIX}/man ++MAN = $(MANDIR)/man8 + INIT = $(BUILD_ROOT)/etc/rc.d/init.d +-MKDIR = mkdir +-INSTALL = install + + .PHONY = all clean install dist distclean + +@@ -25,17 +22,14 @@ + libipvs.o: libipvs/libipvs.c + + install: ipvsadm +- if [ ! -d $(SBIN) ]; then $(MKDIR) -p $(SBIN); fi ++ if [ ! -d $(SBIN) ]; then $(MKDIR) $(SBIN); fi + $(INSTALL) -m 0755 -s ipvsadm $(SBIN) + $(INSTALL) -m 0755 ipvsadm-save $(SBIN) + $(INSTALL) -m 0755 ipvsadm-restore $(SBIN) +- [ -d $(MAN) ] || $(MKDIR) -p $(MAN) ++ [ -d $(MAN) ] || $(MKDIR) $(MAN) + $(INSTALL) -m 0644 ipvsadm.8 $(MAN) + $(INSTALL) -m 0644 ipvsadm-save.8 $(MAN) + $(INSTALL) -m 0644 ipvsadm-restore.8 $(MAN) +- if [ -d $(INIT) ]; then \ +- $(INSTALL) -m 0755 ipvsadm.sh $(INIT)/ipvsadm; \ +- fi + + clean: + rm -f ipvsadm $(NAME).spec $(NAME)-$(VERSION).tar.gz diff --git a/net/ipvs/pkg-descr b/net/ipvs/pkg-descr new file mode 100644 index 0000000..b706b33 --- /dev/null +++ b/net/ipvs/pkg-descr @@ -0,0 +1,7 @@ +This is a port of IPVS (aka LVS) on FreeBSD. IPVS is a highly scalable +and highly available server built on a cluster of real servers, with the +load balancer. The architecture of the server cluster is fully +transparent to end users, and the users interact as if it were a single +high-performance virtual server. + +WWW: http://dragon.linux-vs.org/~dragonfly/htm/lvs_freebsd.htm diff --git a/net/ipvs/pkg-plist b/net/ipvs/pkg-plist new file mode 100644 index 0000000..7d54148 --- /dev/null +++ b/net/ipvs/pkg-plist @@ -0,0 +1,5 @@ +sbin/ipvsadm +sbin/ipvsadm-restore +sbin/ipvsadm-save +@cwd /boot/modules +ipvs.ko -- cgit v1.1