ports/140685: [maintainer update] net/gateway6 upgrade

Michael Scholz mike at fth-devel.net
Wed Nov 18 23:50:01 UTC 2009


>Number:         140685
>Category:       ports
>Synopsis:       [maintainer update] net/gateway6 upgrade
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 18 23:50:01 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Michael Scholz
>Release:        FreeBSD 9.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD pumpkin.fth-devel.net 9.0-CURRENT FreeBSD 9.0-CURRENT #0: Wed Nov 11 16:13:58 CET 2009 root at pumpkin.fth-devel.net:/usr/obj/usr/src/sys/PUMPKIN i386

>Description:
Upgrade port net/gateway6 from 5.0 to 6.0

Files deleted:

net/gateway6/files/patch-Mk.mk-freebsd.mk
net/gateway6/files/patch-platform.freebsd.tsp_local.c
net/gateway6/files/patch-src.lib.config.c
net/gateway6/files/patch5-template.freebsd.sh

File added:

net/gateway6/files/patch-tspc-advanced.Makfile


>How-To-Repeat:

>Fix:
See patch

--- gateway6 begins here ---
diff -ruN gateway6.bak/Makefile gateway6/Makefile
--- gateway6.bak/Makefile	2009-07-10 20:03:46.000000000 +0200
+++ gateway6/Makefile	2009-11-18 23:37:29.000000000 +0100
@@ -6,65 +6,64 @@
 #
 
 PORTNAME=	gateway6
-PORTVERSION=	5.0
-PORTREVISION=	2
+PORTVERSION=	6.0
 CATEGORIES=	net ipv6
-MASTER_SITES=	http://www.go6.net/4105/file.asp?file_id=142&foo=/
-MASTER_SITES+=	http://fth.sourceforge.net/freenet6/
-MASTER_SITES+=	http://fth.host56.com/freenet6/
-DISTNAME=	gw6c-5_0-RELEASE-src
+MASTER_SITES=	http://go6.net/4105/file.asp?file_id=166&foo=/
+MASTER_SITES+=	http://go6.net/4105/file.asp?file_id=166&
+DISTNAME=	gw6c-6_0-RELEASE-src
 
 MAINTAINER=	mike at fth-devel.net
 COMMENT=	Gateway6 Tunnel Setup Protocol Client - Free IPv6 tunnel
 
 USE_RC_SUBR=	gateway6.sh
-WRKSRC=		${WRKDIR}/tspc-advanced
+WRKSRC=		${WRKDIR}/gw6c-6_0_1
+ETCDIR=		${PREFIX}/etc
 
 MAN8=		gw6c.8
 MAN5=		gw6c.conf.5
+GW6C_DATA=	\
+		CLIENT-LICENSE.TXT \
+		INSTALL \
+		README \
+		HEX_DC_0005_Gateway6_Client_Guide.pdf \
+		HEX_DC_0007_Gateway6_Client_Release_Notes.pdf
 
 PKGMESSAGE=	${WRKDIR}/pkg-message
 SUB_FILES=	gateway6.sh pkg-message
 
-.include <bsd.port.pre.mk>
-
-EXTRA_PATCHES=	${FILESDIR}/patch5-template.freebsd.sh
-
+USE_GMAKE=	yes
+USE_PERL5_BUILD=yes
+MAKE_JOBS_UNSAFE=yes
 MAKE_ARGS=	target=freebsd installdir=${PREFIX}
-GW6C_DATA=	CLIENT-LICENSE.TXT GUI-LICENSE.TXT INSTALL README
 
-do-install:
-	@${MKDIR} ${EXAMPLESDIR}
-	@${MKDIR} ${DATADIR}
-	@${INSTALL_PROGRAM} ${WRKSRC}/bin/gw6c ${PREFIX}/bin/gw6c
-	@${INSTALL_MAN} ${WRKSRC}/man/man8/gw6c.8 ${MAN8PREFIX}/man/man8
-	@${INSTALL_MAN} ${WRKSRC}/man/man5/gw6c.conf.5 ${MAN5PREFIX}/man/man5
-	@${INSTALL_SCRIPT} ${WRKSRC}/template/checktunnel.sh ${DATADIR}
-	@${INSTALL_SCRIPT} ${WRKSRC}/template/freebsd.sh ${DATADIR}
-	@${INSTALL_DATA} ${WRKSRC}/bin/gw6c.conf.sample ${PREFIX}/etc
-	@${INSTALL_DATA} ${WRKDIR}/HEX_DC_0005_Gateway6_Client_Guide.pdf ${DATADIR}
-	@${INSTALL_DATA} ${WRKDIR}/HEX_DC_0007_Gateway6_Client_Release_Notes.pdf ${DATADIR}
+.include <bsd.port.pre.mk>
 
+post-install:
 .for f in ${GW6C_DATA}
-	@${INSTALL_DATA} ${WRKSRC}/$f ${DATADIR}
+	@${INSTALL_DATA} ${WRKSRC}/${f} ${DATADIR}
 .endfor
-
-post-install:
-	@if [ ! -f ${PREFIX}/etc/gw6c.conf ]; then \
-		${CP} -p ${PREFIX}/etc/gw6c.conf.sample ${PREFIX}/etc/gw6c.conf ; \
-	fi
 	@${CAT} ${PKGMESSAGE}
 
 post-patch:
 	@${REINPLACE_CMD} \
-		-e "s|/installdir/bin|${PREFIX}/etc|g" \
-		${WRKSRC}/man/man8/gw6c.8
+		-e "s|/usr/local/etc/gw6|${PREFIX}|g" \
+		-e "s|gw6c.conf|${ETCDIR}/gw6c.conf|g" \
+		${WRKSRC}/tspc-advanced/platform/freebsd/tsp_local.c
+	@${REINPLACE_CMD} \
+		-e 's|"template"|"share/gateway6"|g' \
+		${WRKSRC}/tspc-advanced/src/lib/config.c
+	@${REINPLACE_CMD} \
+		-e "s|gifconfig=/usr/sbin/gifconfig|gifconfig=/sbin/ifconfig|g" \
+		${WRKSRC}/tspc-advanced/template/freebsd.sh
+	@${REINPLACE_CMD} \
+		-e "s|/installdir/bin|${ETCDIR}|g" \
+		${WRKSRC}/tspc-advanced/man/man8/gw6c.8
 
 	@${REINPLACE_CMD} \
 		-e "s|/usr/local/gw6c|${PREFIX}|g" \
-		-e "s|/install/dir/bin/gw6c.conf.sample|${EXAMPLESDIR}/gw6c.conf.sample|g" \
-		-e "s|/install/dir/bin/gw6c.conf|${PREFIX}/etc/gw6c.conf|g" \
+		-e "s|/install/dir/bin/gw6c.conf.sample|${ETCDIR}/gw6c.conf.sample|g" \
+		-e "s|/install/dir/bin/gw6c.conf|${ETCDIR}/gw6c.conf|g" \
 		-e "s|template=linux|template=freebsd|g" \
-		${WRKSRC}/man/man5/gw6c.conf.5
+		${WRKSRC}/tspc-advanced/man/man5/gw6c.conf.5
 
 .include <bsd.port.post.mk>
diff -ruN gateway6.bak/distinfo gateway6/distinfo
--- gateway6.bak/distinfo	2007-09-08 01:29:56.000000000 +0200
+++ gateway6/distinfo	2009-11-18 21:39:36.000000000 +0100
@@ -1,3 +1,3 @@
-MD5 (gw6c-5_0-RELEASE-src.tar.gz) = 5dda7941133a199adf3453d105cecf5d
-SHA256 (gw6c-5_0-RELEASE-src.tar.gz) = 431e59a6590f0826f1cb34a6319bd69d024ca89e36f8578a2befe039a489e894
-SIZE (gw6c-5_0-RELEASE-src.tar.gz) = 2441593
+MD5 (gw6c-6_0-RELEASE-src.tar.gz) = 0851184a08605e0a2b7395899e55c433
+SHA256 (gw6c-6_0-RELEASE-src.tar.gz) = e6b345f11398026c8be17e0c26fc22632a6a1053bbf18b5303e514cf44b52c4a
+SIZE (gw6c-6_0-RELEASE-src.tar.gz) = 2873856
diff -ruN gateway6.bak/files/gateway6.sh.in gateway6/files/gateway6.sh.in
--- gateway6.bak/files/gateway6.sh.in	2009-07-16 18:46:52.000000000 +0200
+++ gateway6/files/gateway6.sh.in	2009-11-18 23:39:42.000000000 +0100
@@ -17,6 +17,8 @@
 #                         Set it to YES to enable gateway6.
 # gateway6_flags (flags): Set to "" by default.
 #
+# See gw6c(8) for gateway6_flags
+#
 
 . %%RC_SUBR%%
 
diff -ruN gateway6.bak/files/patch-Mk.mk-freebsd.mk gateway6/files/patch-Mk.mk-freebsd.mk
--- gateway6.bak/files/patch-Mk.mk-freebsd.mk	2007-09-08 01:29:56.000000000 +0200
+++ gateway6/files/patch-Mk.mk-freebsd.mk	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
---- Mk/mk-freebsd.mk.orig	2006-09-23 01:06:20.000000000 +0200
-+++ Mk/mk-freebsd.mk	2007-07-12 17:58:04.000000000 +0200
-@@ -16,7 +16,7 @@
- install_bin=$(installdir)/bin
- install_etc=$(installdir)/etc
- install_lib=$(installdir)/lib
--install_template=$(installdir)/template
-+install_template=$(installdir)/share/gateway6
- install_man=$(installdir)/man
- subdirs=src/net src/lib src/tsp src/xml platform/unix-common platform/freebsd template conf man
- ifname=gif0
diff -ruN gateway6.bak/files/patch-platform.freebsd.tsp_local.c gateway6/files/patch-platform.freebsd.tsp_local.c
--- gateway6.bak/files/patch-platform.freebsd.tsp_local.c	2007-09-08 01:29:56.000000000 +0200
+++ gateway6/files/patch-platform.freebsd.tsp_local.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,36 +0,0 @@
---- platform/freebsd/tsp_local.c.orig	2007-04-25 21:31:31.000000000 +0200
-+++ platform/freebsd/tsp_local.c	2007-07-12 18:38:01.000000000 +0200
-@@ -53,11 +53,11 @@
- #include "tsp_tun.h"   /* freebsd's tun */
- 
- 
--char *FileName  = "gw6c.conf";
-+char *FileName  = "/usr/local/etc/gw6c.conf";
- char *ScriptInterpretor = "/bin/sh";
- char *ScriptExtension = "sh";
- char *ScriptDir = NULL;
--char *TspHomeDir = "/usr/local/etc/gw6";
-+char *TspHomeDir = "/usr/local";
- char DirSeparator = '/';
- 
- int RootUid = 0;
-@@ -77,17 +77,12 @@
- void
- tspSetEnv(char *Variable, char *Value, int Flag)
- {
--	char *buf;
- 	if(Value) {
--		int size=(strlen(Variable) + strlen(Value) + 2);
--		if((buf=malloc(size)) == NULL) {
-+	       if(setenv(Variable, Value, Flag) == -1) {
- 			Display(LOG_LEVEL_3, ELError, "SetEnv", HEX_STR_NOT_ENOUGH_MEM);
- 			return;
- 		}
--		snprintf(buf, size, "%s=%s", Variable, Value);
--		putenv(buf);
--		Display(LOG_LEVEL_3, ELNotice, "tspSetEnv", "%s", buf);
--		free(buf);
-+	        Display(LOG_LEVEL_3, ELNotice, "tspSetEnv", "%s=%s", Variable, Value);
- 	}
- }
- 
diff -ruN gateway6.bak/files/patch-src.lib.config.c gateway6/files/patch-src.lib.config.c
--- gateway6.bak/files/patch-src.lib.config.c	2007-09-08 01:29:56.000000000 +0200
+++ gateway6/files/patch-src.lib.config.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
---- src/lib/config.c.orig	2007-05-07 20:55:25.000000000 +0200
-+++ src/lib/config.c	2007-07-12 00:10:55.000000000 +0200
-@@ -274,7 +274,7 @@
-   int status = NO_ERROR;
-   struct in_addr addr;
-   struct in6_addr addr6;
--  const char* cszTemplDir = "template";
-+  const char* cszTemplDir = "share/gateway6";
- 
-   // Hard-coded parameters. Not configurable anymore.
-   pConf->syslog = FALSE;
diff -ruN gateway6.bak/files/patch-tspc-advanced.Makfile gateway6/files/patch-tspc-advanced.Makfile
--- gateway6.bak/files/patch-tspc-advanced.Makfile	1970-01-01 01:00:00.000000000 +0100
+++ gateway6/files/patch-tspc-advanced.Makfile	2009-11-18 21:59:43.000000000 +0100
@@ -0,0 +1,33 @@
+--- tspc-advanced/Makefile.orig	2009-05-19 18:51:11.000000000 +0200
++++ tspc-advanced/Makefile	2009-11-18 21:57:54.000000000 +0100
+@@ -46,11 +46,12 @@
+ SUPPORTED_PLATFORMS=linux netbsd freebsd openbsd darwin sunos dongle6
+ 
+ INSTALL_DIR   :=$(installdir)
+ INSTALL_BIN   :=$(INSTALL_DIR)/bin
+ INSTALL_MAN   :=$(INSTALL_DIR)/man
+-INSTALL_TEMPL :=$(INSTALL_DIR)/template
++INSTALL_TEMPL :=$(INSTALL_DIR)/share/gateway6
++INSTALL_ETC   :=$(INSTALL_DIR)/etc
+ 
+ 
+ SUBDIRS=$(PWD)/src/lib \
+ 	$(PWD)/src/net \
+ 	$(PWD)/src/tsp \
+@@ -172,13 +173,13 @@
+ 	@for dir in ${SUBDIRS}; do \
+ 	    $(MAKE) -C $$dir install || exit 1; \
+ 	done
+ 
+ 	@cp $(TARGET) $(INSTALL_BIN)
+-	@cp $(BIN_DIR)/gw6c.conf.sample $(INSTALL_BIN)
+-	@[ -f $(INSTALL_BIN)/gw6c.conf ] || { \
+-	    cp $(INSTALL_BIN)/gw6c.conf.sample $(INSTALL_BIN)/gw6c.conf; \
++	@cp $(BIN_DIR)/gw6c.conf.sample $(INSTALL_ETC)
++	@[ -f $(INSTALL_ETC)/gw6c.conf ] || { \
++	    cp $(INSTALL_ETC)/gw6c.conf.sample $(INSTALL_ETC)/gw6c.conf; \
+ 	}
+ 
+ 
+ # This makefile target will clean the build tree of the Gateway6 Client.
+ #
diff -ruN gateway6.bak/files/patch5-template.freebsd.sh gateway6/files/patch5-template.freebsd.sh
--- gateway6.bak/files/patch5-template.freebsd.sh	2007-09-08 01:29:56.000000000 +0200
+++ gateway6/files/patch5-template.freebsd.sh	1970-01-01 01:00:00.000000000 +0100
@@ -1,11 +0,0 @@
---- template/freebsd.sh.orig	2005-10-25 20:38:02.000000000 +0200
-+++ template/freebsd.sh	2007-07-11 23:33:20.000000000 +0200
-@@ -76,7 +76,7 @@
- Display 1 '--- Start of configuration script. ---'
- Display 1 "Script: " `basename $0`
- 
--gifconfig=/usr/sbin/gifconfig
-+gifconfig=/sbin/ifconfig
- ifconfig=/sbin/ifconfig
- route=/sbin/route
- rtadvd=/usr/sbin/rtadvd
diff -ruN gateway6.bak/files/pkg-message.in gateway6/files/pkg-message.in
--- gateway6.bak/files/pkg-message.in	2007-09-08 01:29:56.000000000 +0200
+++ gateway6/files/pkg-message.in	2009-11-18 23:41:04.000000000 +0100
@@ -2,11 +2,9 @@
 
 - Check the values of %%PREFIX%%/etc/gw6c.conf. If you have registered at
   the website, fill in your userid and password there.
+- Add 'gateway6_enable="YES"' to your /etc/rc.conf to make it start
+  automatically.
 - Run '%%PREFIX%%/etc/rc.d/gateway6 start' to start the tunnel.
 - Try to ping a IPv6 host, for example: ping6 www.jp.freebsd.org
 
-Net/gateway6 supports rc.subr.
-Please add 'gateway6_enable="YES"' to your /etc/rc.conf to make it
-start autoamtically at startup.
-
-WWW: http://www.go6.net/
+WWW: http://www.gogo6.net/
diff -ruN gateway6.bak/pkg-descr gateway6/pkg-descr
--- gateway6.bak/pkg-descr	2007-09-08 01:29:56.000000000 +0200
+++ gateway6/pkg-descr	2009-11-18 17:58:09.000000000 +0100
@@ -20,4 +20,4 @@
 as has been shown by the community contributions for many operating 
 systems.
 
-WWW: http://www.go6.net/
+WWW: http://gogonet.gogo6.com/page/freenet6-services
diff -ruN gateway6.bak/pkg-plist gateway6/pkg-plist
--- gateway6.bak/pkg-plist	2007-09-08 01:29:56.000000000 +0200
+++ gateway6/pkg-plist	2009-11-18 21:51:38.000000000 +0100
@@ -3,12 +3,9 @@
 etc/gw6c.conf.sample
 @exec if [ ! -f %D/etc/gw6c.conf ] ; then cp -p %D/%F %B/gw6c.conf; fi
 %%DATADIR%%/CLIENT-LICENSE.TXT
-%%DATADIR%%/GUI-LICENSE.TXT
-%%DATADIR%%/HEX_DC_0005_Gateway6_Client_Guide.pdf
-%%DATADIR%%/HEX_DC_0007_Gateway6_Client_Release_Notes.pdf
 %%DATADIR%%/INSTALL
 %%DATADIR%%/README
-%%DATADIR%%/checktunnel.sh
+%%DATADIR%%/HEX_DC_0005_Gateway6_Client_Guide.pdf
+%%DATADIR%%/HEX_DC_0007_Gateway6_Client_Release_Notes.pdf
 %%DATADIR%%/freebsd.sh
 @dirrm %%DATADIR%%
- at dirrm %%EXAMPLESDIR%%
--- gateway6 ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list