summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2006-08-26 05:21:20 +0000
committerAlec Warner <antarus@gentoo.org>2006-08-26 05:21:20 +0000
commit0d5f24586b048cf6093badbe37853ca8a0509565 (patch)
treeee6be95dc9b8f73be37cd270875afeec71320660 /net-misc/freenet6
parentVersion bump. (diff)
downloadgentoo-2-0d5f24586b048cf6093badbe37853ca8a0509565.tar.gz
gentoo-2-0d5f24586b048cf6093badbe37853ca8a0509565.tar.bz2
gentoo-2-0d5f24586b048cf6093badbe37853ca8a0509565.zip
Fix manifest and Files/
(Portage version: 1445-svn)
Diffstat (limited to 'net-misc/freenet6')
-rw-r--r--net-misc/freenet6/Manifest36
-rw-r--r--net-misc/freenet6/files/digest-freenet6-0.9.71
-rw-r--r--net-misc/freenet6/files/digest-freenet6-1.0.03
-rw-r--r--net-misc/freenet6/files/freenet6-0.9.2.diff149
-rw-r--r--net-misc/freenet6/files/gentoo.sh166
-rw-r--r--net-misc/freenet6/files/tspc.conf53
-rw-r--r--net-misc/freenet6/files/tspc.rc15
7 files changed, 423 insertions, 0 deletions
diff --git a/net-misc/freenet6/Manifest b/net-misc/freenet6/Manifest
new file mode 100644
index 000000000000..7eca0027a65d
--- /dev/null
+++ b/net-misc/freenet6/Manifest
@@ -0,0 +1,36 @@
+AUX freenet6-0.9.2.diff 4538 RMD160 f5595193494d515689010d054a45e22258f04e3e SHA1 90209dccccdf1c0d210408b1f2c8ca2fd23e89b7 SHA256 ec293f618f01a20d3b5c67fd74b7999c64affef691d8509127552ab1a9d245ae
+MD5 7b3923fbb5cdc1bee32e08037ff62d08 files/freenet6-0.9.2.diff 4538
+RMD160 f5595193494d515689010d054a45e22258f04e3e files/freenet6-0.9.2.diff 4538
+SHA256 ec293f618f01a20d3b5c67fd74b7999c64affef691d8509127552ab1a9d245ae files/freenet6-0.9.2.diff 4538
+AUX gentoo.sh 4568 RMD160 73a809912914a3ae2801ca950721b95a1b97da86 SHA1 f7c35ec479fea7781655ff4594472ad9be789cce SHA256 27368bd036888d455abb9ea89ccf3ccced009892d8304691c6201f1346f46f86
+MD5 edc450e3ee1fd520d5e2936ca0f0c949 files/gentoo.sh 4568
+RMD160 73a809912914a3ae2801ca950721b95a1b97da86 files/gentoo.sh 4568
+SHA256 27368bd036888d455abb9ea89ccf3ccced009892d8304691c6201f1346f46f86 files/gentoo.sh 4568
+AUX tspc.conf 1532 RMD160 c1604761601d7de0e21bb718584b32e7f886faad SHA1 3527452214e9b76d89e274991802f6da64956e55 SHA256 0df8380228ee81a3cb429efe08b21382362a94949ad8a36faa46e3116b7c1a38
+MD5 d251ee1fb05deddaa9a7a5b273ded283 files/tspc.conf 1532
+RMD160 c1604761601d7de0e21bb718584b32e7f886faad files/tspc.conf 1532
+SHA256 0df8380228ee81a3cb429efe08b21382362a94949ad8a36faa46e3116b7c1a38 files/tspc.conf 1532
+AUX tspc.rc 171 RMD160 7dc7a60cb5fe3681b006ec4f49d41d3d849bca02 SHA1 100044d089b2aa3656df964bfb83bce40980c472 SHA256 9890fb3253fc5300e3fb7c63ece3bc81f4df8759cf414af67cc44c743c2467d4
+MD5 c3987cc58f033790cf60642d69481b93 files/tspc.rc 171
+RMD160 7dc7a60cb5fe3681b006ec4f49d41d3d849bca02 files/tspc.rc 171
+SHA256 9890fb3253fc5300e3fb7c63ece3bc81f4df8759cf414af67cc44c743c2467d4 files/tspc.rc 171
+DIST freenet6-0.9.7.tgz 336929
+DIST freenet6-1.0.0.tgz 330953 RMD160 28c7cceaaea5ffe4b740d09f7dbd4aed5abac69d SHA1 b85b6334e3fd5c3278d82fa8a325582a57c24bd3 SHA256 0d834b55538eff2abc569aa5c7831f24525bea56354727d0f6d5933d0e5f1116
+EBUILD freenet6-0.9.7.ebuild 1318 RMD160 98e66b7e7ce512386e6e07eee38346ab98f3efc8 SHA1 c2f39e247668e1649029dbb3413057fac51ac251 SHA256 aca90b785f888b4776078653ae2618e6f7e5782f8e2e49a831caef340ceed312
+MD5 6403f80fe57c32316c95dc344d86d2c5 freenet6-0.9.7.ebuild 1318
+RMD160 98e66b7e7ce512386e6e07eee38346ab98f3efc8 freenet6-0.9.7.ebuild 1318
+SHA256 aca90b785f888b4776078653ae2618e6f7e5782f8e2e49a831caef340ceed312 freenet6-0.9.7.ebuild 1318
+EBUILD freenet6-1.0.0.ebuild 1304 RMD160 3231cc0b3dca8860f66b5e9f4874397ff6223af6 SHA1 952f2f4cf2f59354ed64120c0bee3ec367ab51c5 SHA256 4714119b4c743799d107c983dc7e754109b6c53c043cb114dd455a293e8cf3c2
+MD5 91ed27fa5aeb1087bd030ec45bd4c5e1 freenet6-1.0.0.ebuild 1304
+RMD160 3231cc0b3dca8860f66b5e9f4874397ff6223af6 freenet6-1.0.0.ebuild 1304
+SHA256 4714119b4c743799d107c983dc7e754109b6c53c043cb114dd455a293e8cf3c2 freenet6-1.0.0.ebuild 1304
+MISC ChangeLog 417 RMD160 85fd688de9093672ffe695c2623aed70a973d795 SHA1 4e56b3820f1c60bf75bbdce1335ff0069adbfa4e SHA256 34f8f72216bc8ff2facd3780d9859b89ecb94b175c86cfa1746e4e0abd4daf70
+MD5 c82b40a32955c1888142dbc908d061e8 ChangeLog 417
+RMD160 85fd688de9093672ffe695c2623aed70a973d795 ChangeLog 417
+SHA256 34f8f72216bc8ff2facd3780d9859b89ecb94b175c86cfa1746e4e0abd4daf70 ChangeLog 417
+MD5 b9d2127ddd9f73a468979e10bba5e06b files/digest-freenet6-0.9.7 63
+RMD160 239749df88a66a58c822a987cb822d45820ee535 files/digest-freenet6-0.9.7 63
+SHA256 7e5d00d46d5d32538d8b6b687bae1ccab3e2efe828435458cd8ae6d56ac92744 files/digest-freenet6-0.9.7 63
+MD5 cb720233d965392b57e29e90e0ca48ce files/digest-freenet6-1.0.0 235
+RMD160 fd997b79c7cff4e98c7349221a65ac8e9d640024 files/digest-freenet6-1.0.0 235
+SHA256 66295a2f3adc16dec752df43490e1be3b5bf94a259e6ec114afa8cd56a8e312c files/digest-freenet6-1.0.0 235
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/digest-freenet6-1.0.0 b/net-misc/freenet6/files/digest-freenet6-1.0.0
new file mode 100644
index 000000000000..ac5d872da253
--- /dev/null
+++ b/net-misc/freenet6/files/digest-freenet6-1.0.0
@@ -0,0 +1,3 @@
+MD5 a2b4edb1d52b874587533b4cf40de1ba freenet6-1.0.0.tgz 330953
+RMD160 28c7cceaaea5ffe4b740d09f7dbd4aed5abac69d freenet6-1.0.0.tgz 330953
+SHA256 0d834b55538eff2abc569aa5c7831f24525bea56354727d0f6d5933d0e5f1116 freenet6-1.0.0.tgz 330953
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/gentoo.sh b/net-misc/freenet6/files/gentoo.sh
new file mode 100644
index 000000000000..3a8b2f2518d1
--- /dev/null
+++ b/net-misc/freenet6/files/gentoo.sh
@@ -0,0 +1,166 @@
+#!/bin/sh
+
+LANGUAGE=C
+
+if [ -z $TSP_VERBOSE ]; then
+ TSP_VERBOSE=0
+fi
+
+KillProcess()
+{
+ if [ ! -z $TSP_VERBOSE ]; then
+ if [ $TSP_VERBOSE -ge 2 ]; then
+ echo killing $*
+ fi
+ fi
+ PID=`ps axww | grep $1 | grep -v grep | awk '{ print $1;}'`
+ echo $PID
+ if [ ! -z $PID ]; then
+ kill $PID
+ fi
+}
+
+Display()
+{
+ if [ -z $TSP_VERBOSE ]; then
+ return;
+ fi
+ if [ $TSP_VERBOSE -lt $1 ]; then
+ return;
+ fi
+ shift
+ echo "$*"
+}
+
+Exec()
+{
+ if [ ! -z $TSP_VERBOSE ]; then
+ if [ $TSP_VERBOSE -ge 2 ]; then
+ echo $*
+ fi
+ fi
+ $* # Execute command
+ if [ $? -ne 0 ]; then
+ echo "Error while executing $1"
+ echo " Command: $*"
+ exit 1
+ fi
+}
+
+ExecNoCheck()
+{
+ if [ ! -z $TSP_VERBOSE ]; then
+ if [ $TSP_VERBOSE -ge 2 ]; then
+ echo $*
+ fi
+ fi
+ $* # Execute command
+}
+
+# Program localization
+
+Display 1 "--- Start of configuration script. ---"
+Display 1 "Script: " `basename $0`
+
+ifconfig=/sbin/ifconfig
+route=/sbin/route
+ipconfig=/sbin/ip
+rtadvd=/usr/sbin/radvd
+sysctl=/sbin/sysctl
+rtadvdconfigfilename=radvd.conf
+rtadvdconfigfile=/etc/radvd/$rtadvdconfigfilename
+
+if [ -z $TSP_HOME_DIR ]; then
+ echo "TSP_HOME_DIR variable not specified!;"
+ exit 1
+fi
+
+if [ ! -d $TSP_HOME_DIR ]; then
+ echo "Error : directory $TSP_HOME_DIR does not exist"
+ exit 1
+fi
+#
+
+if [ -z $TSP_HOST_TYPE ]; then
+ echo Error: TSP_HOST_TYPE not defined.
+ exit 1
+fi
+
+#change to upper case
+TSP_HOST_TYPE=`echo $TSP_HOST_TYPE | tr a-z A-Z`
+
+if [ X"${TSP_HOST_TYPE}" = X"HOST" ] || [ X"${TSP_HOST_TYPE}" = X"ROUTER" ]; then
+ #
+ # Configured tunnel config (IPv6)
+
+ Display 1 "$TSP_TUNNEL_INTERFACE setup"
+ Display 1 "Setting up link to $TSP_SERVER_ADDRESS_IPV4"
+ if [ -x $ipconfig ]; then
+ Exec $ipconfig tunnel add $TSP_TUNNEL_INTERFACE mode sit ttl 64 remote $TSP_SERVER_ADDRESS_IPV4
+ else
+ Exec $ifconfig $TSP_TUNNEL_INTERFACE tunnel ::$TSP_SERVER_ADDRESS_IPV4
+ fi
+
+ Exec $ifconfig $TSP_TUNNEL_INTERFACE up
+
+ PREF=`echo $TSP_CLIENT_ADDRESS_IPV6 | sed "s/:0*/:/g" |cut -d : -f1-2`
+ OLDADDR=`$ifconfig $TSP_TUNNEL_INTERFACE | grep "inet6.* $PREF" | sed -e "s/^.*inet6 addr: //" -e "s/ Scope.*\$//"`
+ if [ ! -z $OLDADDR ]; then
+ Display 1 "Removing old IPv6 address $OLDADDR"
+ Exec $ifconfig $TSP_TUNNEL_INTERFACE inet6 del $OLDADDR
+ fi
+ Display 1 "This host is: $TSP_CLIENT_ADDRESS_IPV6/$TSP_TUNNEL_PREFIXLEN"
+ Exec $ifconfig $TSP_TUNNEL_INTERFACE add $TSP_CLIENT_ADDRESS_IPV6/$TSP_TUNNEL_PREFIXLEN
+
+ #
+ # Default route
+ Display 1 "Adding default route"
+ ExecNoCheck $route -A inet6 del ::/0 2>/dev/null # delete old default route
+ Exec $route -A inet6 add ::/0 dev $TSP_TUNNEL_INTERFACE
+ Exec $route -A inet6 add 2000::/3 dev $TSP_TUNNEL_INTERFACE
+fi
+
+# Router configuration if required
+if [ X"${TSP_HOST_TYPE}" = X"ROUTER" ]; then
+ Display 1 "Router configuration"
+ Display 1 "Kernel setup"
+ #Better way on linux to avoid loop with the remaining /48?
+ $route -A inet6 add $TSP_PREFIX::/$TSP_PREFIXLEN dev $TSP_HOME_INTERFACE 2>/dev/null
+ Exec $sysctl -w net.ipv6.conf.all.forwarding=1 # ipv6_forwarding enabled
+ Display 1 "Adding prefix to $TSP_HOME_INTERFACE"
+ OLDADDR=`$ifconfig $TSP_HOME_INTERFACE | grep "inet6.* $PREF" | sed -e "s/^.*inet6 addr: //" -e "s/ Scope.*\$//"`
+ if [ ! -z $OLDADDR ]; then
+ Display 1 "Removing old IPv6 address $OLDADDR"
+ Exec $ifconfig $TSP_HOME_INTERFACE inet6 del $OLDADDR
+ fi
+ Exec $ifconfig $TSP_HOME_INTERFACE add $TSP_PREFIX:1::1/64
+ # Router advertisement configuration
+ Display 1 "Create new $rtadvdconfigfile"
+ echo "##### radvd.conf made by TSP ####" > "$rtadvdconfigfile"
+ echo "interface $TSP_HOME_INTERFACE" >> "$rtadvdconfigfile"
+ echo "{" >> "$rtadvdconfigfile"
+ echo " AdvSendAdvert on;" >> "$rtadvdconfigfile"
+ echo " prefix $TSP_PREFIX:0001::/64" >> "$rtadvdconfigfile"
+ echo " {" >> "$rtadvdconfigfile"
+ echo " AdvOnLink on;" >> "$rtadvdconfigfile"
+ echo " AdvAutonomous on;" >> "$rtadvdconfigfile"
+ echo " AdvRouterAddr on;" >> "$rtadvdconfigfile"
+ echo " };" >> "$rtadvdconfigfile"
+ echo "};" >> "$rtadvdconfigfile"
+ echo "" >> "$rtadvdconfigfile"
+ if [ -f /var/run/radvd/radvd.pid ]; then
+ /etc/init.d/radvd stop
+ fi
+ if [ -f $rtadvdconfigfile ]; then
+ /etc/init.d/radvd start
+ else
+ echo "Error : file $rtadvdconfigfile not found"
+ exit 1
+ fi
+fi
+
+Display 1 "--- End of configuration script. ---"
+
+exit 0
+
+#---------------------------------------------------------------------
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 $?
+}