summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Johanson <latexer@gentoo.org>2003-05-28 18:36:48 +0000
committerPeter Johanson <latexer@gentoo.org>2003-05-28 18:36:48 +0000
commitd114d7b8d2d9bf0f5c49a711f7197ff57db22d4c (patch)
treeed2a774340703694388216e53b188909211e78ef /net-misc
parentInitial import. bug#9020 (diff)
downloadgentoo-2-d114d7b8d2d9bf0f5c49a711f7197ff57db22d4c.tar.gz
gentoo-2-d114d7b8d2d9bf0f5c49a711f7197ff57db22d4c.tar.bz2
gentoo-2-d114d7b8d2d9bf0f5c49a711f7197ff57db22d4c.zip
Initial import. bug#9020
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/freenet6/ChangeLog10
-rw-r--r--net-misc/freenet6/Manifest3
-rw-r--r--net-misc/freenet6/files/digest-freenet6-0.9.71
-rw-r--r--net-misc/freenet6/files/freenet6-0.9.2.diff149
-rw-r--r--net-misc/freenet6/files/tspc.conf53
-rw-r--r--net-misc/freenet6/files/tspc.rc15
-rw-r--r--net-misc/freenet6/freenet6-0.9.7.ebuild51
7 files changed, 281 insertions, 1 deletions
diff --git a/net-misc/freenet6/ChangeLog b/net-misc/freenet6/ChangeLog
new file mode 100644
index 000000000000..6ef1c41629d8
--- /dev/null
+++ b/net-misc/freenet6/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for net-misc/freenet6
+# Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/freenet6/ChangeLog,v 1.1 2003/05/28 18:36:41 latexer Exp $
+
+*freenet6-0.9.7 (28 May 2003)
+
+ 28 May 2003; Peter Johanson <latexer@gentoo.org> freenet6-0.9.7.ebuild,
+ files/freenet6-0.9.2.diff, files/tspc.conf, files/tspc.rc:
+ Initial import. bug#9020
+
diff --git a/net-misc/freenet6/Manifest b/net-misc/freenet6/Manifest
index 8038f641b48b..26ae8213e229 100644
--- a/net-misc/freenet6/Manifest
+++ b/net-misc/freenet6/Manifest
@@ -1,4 +1,5 @@
-MD5 fa1df03acfa1cbe7fb0951923b84215d freenet6-0.9.7.ebuild 945
+MD5 3a0f435415eebe3b1ac01bf100f759e9 ChangeLog 411
+MD5 7475ffc3241518c0a62cf513a2ea5012 freenet6-0.9.7.ebuild 1313
MD5 7b3923fbb5cdc1bee32e08037ff62d08 files/freenet6-0.9.2.diff 4538
MD5 b9d2127ddd9f73a468979e10bba5e06b files/digest-freenet6-0.9.7 63
MD5 c3987cc58f033790cf60642d69481b93 files/tspc.rc 171
diff --git a/net-misc/freenet6/files/digest-freenet6-0.9.7 b/net-misc/freenet6/files/digest-freenet6-0.9.7
new file mode 100644
index 000000000000..67a9228197e1
--- /dev/null
+++ b/net-misc/freenet6/files/digest-freenet6-0.9.7
@@ -0,0 +1 @@
+MD5 0489d5d893089c5b8a19c3b47718dab7 freenet6-0.9.7.tgz 336929
diff --git a/net-misc/freenet6/files/freenet6-0.9.2.diff b/net-misc/freenet6/files/freenet6-0.9.2.diff
new file mode 100644
index 000000000000..1a50827467cb
--- /dev/null
+++ b/net-misc/freenet6/files/freenet6-0.9.2.diff
@@ -0,0 +1,149 @@
+--- freenet6-0.9.6.orig/src/auth.c
++++ freenet6-0.9.6/src/auth.c
+@@ -34,6 +34,7 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <stdarg.h>
++#include <time.h>
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+@@ -128,26 +129,26 @@
+ int len;
+
+ flags = 0;
+- *Token=*Value=NULL;
++ *Token=*Value='\0';
+ for(s=e=String+11; *e; e++) {
+- if(*e== ' ' || *e == '\r' || *e == '\n' || *e==NULL) {
++ if(*e== ' ' || *e == '\r' || *e == '\n' || *e=='\0') {
+ if(s!=e) {
+- if(*Token && (*Value==NULL)) {
++ if(*Token && (*Value=='\0')) {
+ len = (int)((char *)e-(char *)s);
+ memcpy(Value, s, len);
+- Value[len] = NULL;
++ Value[len] = '\0';
+ }
+ if(*Token && *Value) {
+ flags += SetCapability(Token,Value);
+- *Value = *Token = NULL;
++ *Value = *Token = '\0';
+ }
+ }
+ s = ++e;
+ }
+- if((*e=='=' || *e== ' ' || *e == '\r' || *e == '\n' || *e==NULL) && (e != s)) {
++ if((*e=='=' || *e== ' ' || *e == '\r' || *e == '\n' || *e=='\0') && (e != s)) {
+ len = (int)((char *)e-(char *)s);
+ memcpy(Token, s, len);
+- Token[len] = NULL;
++ Token[len] = '\0';
+ s = ++e;
+ }
+ }
+@@ -239,32 +240,32 @@
+ c->algorithm = "";
+ c->charset = "";
+ c->rspauth = "";
+- *Token=*Value=NULL;
++ *Token=*Value='\0';
+ for(s=e=String; ; e++) {
+- if(*e== ',' || *e == '\r' || *e == '\n' || *e==NULL) {
++ if(*e== ',' || *e == '\r' || *e == '\n' || *e=='\0') {
+ if(s!=e) {
+- if(*Token && (*Value==NULL)) {
++ if(*Token && (*Value=='\0')) {
+ len = (int)((char *)e-(char *)s);
+ /* Chop the quotes */
+ if((*s == '"') && len) { s++; len--; }
+ if((s[len-1] == '"') && len) len--;
+
+ if(len) memcpy(Value, s, len);
+- Value[len] = NULL;
++ Value[len] = '\0';
+ }
+ if(*Token && *Value) {
+ InsertInChallegeStruct(c, Token,Value);
+- *Value = *Token = NULL;
++ *Value = *Token = '\0';
+ }
+ }
+- if(*e == NULL) break;
++ if(*e == '\0') break;
+ s = ++e;
+ }
+- if((*e=='=' || *e== ',' || *e == '\r' || *e == '\n' || *e==NULL) && (*Token == NULL) && (e != s)) {
++ if((*e=='=' || *e== ',' || *e == '\r' || *e == '\n' || *e=='\0') && (*Token == '\0') && (e != s)) {
+ len = (int)((char *)e-(char *)s);
+ memcpy(Token, s, len);
+- Token[len] = NULL;
+- if(*e == NULL) break;
++ Token[len] = '\0';
++ if(*e == '\0') break;
+ s = ++e;
+ }
+ }
+--- freenet6-0.9.6.orig/src/tspc.c
++++ freenet6-0.9.6/src/tspc.c
+@@ -55,8 +55,8 @@
+
+ #define Identification "tspc - Tunnel Server Protocol Client\n"
+
+-char *FileName = "tspc.conf";
+-char *LogFile = "tspc.log";
++char *FileName = "/etc/freenet6/tspc.conf";
++char *LogFile = "/var/log/tspc.log";
+ char *ScriptDir = NULL;
+ char *LogFileName = NULL;
+ tConf Conf;
+@@ -77,10 +77,10 @@
+ */
+ # define ScriptExtension "bat"
+ #else
+- char *TspHomeDir = "/usr/local/etc/tsp";
++ char *TspHomeDir = "/etc/freenet6";
+ char DirSeparator = '/';
+ int RootUid = 0;
+-# define ScriptInterpretor "/bin/sh "
++# define ScriptInterpretor ""
+ # define ScriptExtension "sh"
+ #endif
+
+@@ -269,10 +269,10 @@
+ if(Value) {
+ for(;*Value; Value++) {
+ if(strchr(AllowedChars, *Value) == NULL)
+- return NULL;
++ return 0;
+ }
+ } else {
+- return NULL;
++ return 0;
+ }
+ return 1;
+ }
+@@ -427,15 +427,21 @@
+ if(IsPresent(Conf->dns_server)) {
+ char *Server;
+ char *dns = strdup(Conf->dns_server);
++ int result;
++ struct addrinfo *contact;
+ if (eq(Conf->host_type, "host")) {
+ Display(1,ELError, "VerifyConfig", "DNS delegation is not support for host_type=host");
+ status = 1;
+ }
+ for(Server = strtok(dns, ":");Server; Server = strtok(NULL, ":")) {
+- if(gethostbyname(Server) == NULL) {
+- Display(1,ELError, "VerifyConfig", "DNS server name %s is not resolving.", Server);
++ if( result=getaddrinfo(Server, "domain", 0, &contact)) {
++ Display(1,ELError, "VerifyConfig",
++ "DNS server name %s is not resolving.", Server);
+ status = 1;
+ }
++ else {
++ freeaddrinfo(contact);
++ }
+ }
+ free(dns);
+ }
diff --git a/net-misc/freenet6/files/tspc.conf b/net-misc/freenet6/files/tspc.conf
new file mode 100644
index 000000000000..13df8e013b3d
--- /dev/null
+++ b/net-misc/freenet6/files/tspc.conf
@@ -0,0 +1,53 @@
+#-----------------------------------------------------------------------------
+# tspc.conf
+#-----------------------------------------------------------------------------
+
+#
+# tsp client version
+#
+tsp_version=1.0.1
+tsp_dir=/etc/freenet6
+
+#
+# auth_method=any|supported mechanism
+# if any is specified, the first mechanism that is supported by both the
+# server and the client will be picked. The order of precedence is the
+# mechnism list shown by the output of -h. supprted mechanism is one of
+# the token shown by th output of -h (case sensitive).
+auth_method=any
+
+#
+# client_v4=auto|1.1.1.1 (valid ip address)
+# if auto is specified, if_source or -s cmd line option must be specified.
+client_v4=auto
+
+# userid=anonymous
+# the userid can be anonymous or any alphanumeric value that is dns legal.
+userid=anonymous
+
+# passwd=
+# The passwd must be empty if userid is anonymous or an alphanumeric string
+# if userid is not anonymous.
+passwd=
+
+# template=target
+# template tells which configuration script needs to be run for interface
+# setup.
+# Normally you only need to put your osname in the value.
+# You can also use "checktunnel" if you only want the tunnel info print out.
+#template=checktunnel
+template=linux
+
+# server=FQDN
+# Freenet6 server address
+server=tsps1.freenet6.net
+
+# retry_delay=time
+# retry tells the client to retry connection after time (seconds) in case of
+# failure (0 = no retry)
+retry_delay=0
+
+if_tunnel=sit1
+
+# end of tspc.conf
+#-----------------------------------------------------------------------------
diff --git a/net-misc/freenet6/files/tspc.rc b/net-misc/freenet6/files/tspc.rc
new file mode 100644
index 000000000000..4e6f8698d781
--- /dev/null
+++ b/net-misc/freenet6/files/tspc.rc
@@ -0,0 +1,15 @@
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting Freenet6 IPv6 Client"
+ tspc
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Freenet6 IPv6 Client"
+ kill `pidof tspc`
+ eend $?
+}
diff --git a/net-misc/freenet6/freenet6-0.9.7.ebuild b/net-misc/freenet6/freenet6-0.9.7.ebuild
new file mode 100644
index 000000000000..2ad8f1c33638
--- /dev/null
+++ b/net-misc/freenet6/freenet6-0.9.7.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/freenet6/freenet6-0.9.7.ebuild,v 1.1 2003/05/28 18:36:41 latexer Exp $
+
+DESCRIPTION="Client to configure an IPv6 tunnel to freenet6"
+HOMEPAGE="http://www.freenet6.net/"
+SRC_URI="mirror://gentoo/${P}.tgz"
+
+LICENSE="VPL-1.0"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc ~alpha"
+DEPEND=""
+
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+ patch -p1 < ${FILESDIR}/freenet6-0.9.2.diff || die "Failed to patch"
+
+ mv -f src/Makefile ${T}
+ sed "s:gcc -g -I\$(INC) -Wall:${CC} -I\$(INC) ${CFLAGS}:" \
+ ${T}/Makefile > src/Makefile
+}
+
+src_compile() {
+ emake all target=linux || die "Build Failed"
+}
+
+src_install() {
+ dosbin bin/tspc
+
+ insopts -m 600
+ insinto /etc/freenet6
+ doins ${FILESDIR}/tspc.conf
+ exeinto /etc/freenet6/template
+ doexe template/{linux,checktunnel}.sh
+
+ dodoc CONTRIB.txt LEGAL LEGAL.html README
+ doman man/{man5/tspc.conf.5,man8/tspc.8}
+
+ exeinto /etc/init.d
+ newexe ${FILESDIR}/tspc.rc tspc
+}
+
+pkg_postinst() {
+ einfo "The freenet6 ebuild installs an init script named 'tspc'"
+ einfo "to coincide with the name of the client binary installed"
+ einfo "To add support for a freenet6 connection at startup, do"
+ einfo ""
+ einfo "# rc-update add tspc default"
+}