diff options
-rw-r--r-- | network/ucspi-tcp/README | 11 | ||||
-rw-r--r-- | network/ucspi-tcp/patches/ucspi-tcp-0.88.a_record.patch | 64 | ||||
-rw-r--r-- | network/ucspi-tcp/patches/ucspi-tcp-0.88.errno.patch | 12 | ||||
-rw-r--r-- | network/ucspi-tcp/patches/ucspi-tcp-0.88.nobase.patch | 21 | ||||
-rw-r--r-- | network/ucspi-tcp/slack-desc | 19 | ||||
-rw-r--r-- | network/ucspi-tcp/ucspi-tcp.SlackBuild | 66 | ||||
-rw-r--r-- | network/ucspi-tcp/ucspi-tcp.info | 10 |
7 files changed, 203 insertions, 0 deletions
diff --git a/network/ucspi-tcp/README b/network/ucspi-tcp/README new file mode 100644 index 0000000000..fd31488d97 --- /dev/null +++ b/network/ucspi-tcp/README @@ -0,0 +1,11 @@ +ucspi-tcp (djb's TCP client-server command-line tools) + +ucspi-tcp includes several programs. tcpserver waits for incoming +connections and, for each connection, runs a program of your choice, +it provides useful environment variables, resource limits, and access +control features. tcpclient makes a TCP connection and runs a program of +your choice. It sets up the same environment variables as tcpserver. + +Also included are recordio, a tool that monitors all the input and output +of a server, and several sample clients built on top of tcpclient: who@, +date@, finger@, http@, tcpcat, and mconnect. diff --git a/network/ucspi-tcp/patches/ucspi-tcp-0.88.a_record.patch b/network/ucspi-tcp/patches/ucspi-tcp-0.88.a_record.patch new file mode 100644 index 0000000000..903125eaae --- /dev/null +++ b/network/ucspi-tcp/patches/ucspi-tcp-0.88.a_record.patch @@ -0,0 +1,64 @@ +diff -ruN --exclude conf-* ucspi-tcp-0.88/rblsmtpd.c ucspi-tcp-0.88.fix/rblsmtpd.c +--- ucspi-tcp-0.88/rblsmtpd.c Sat Mar 18 10:18:42 2000 ++++ ucspi-tcp-0.88.fix/rblsmtpd.c Wed Aug 9 16:42:33 2000 +@@ -60,16 +60,54 @@ + + void rbl(char *base) + { ++ int i; ++ char *altreply = 0; + if (decision) return; + if (!stralloc_copy(&tmp,&ip_reverse)) nomem(); ++ i = str_chr(base, ':'); ++ if (base[i]) { ++ base[i] = 0; ++ altreply = base+i+1; ++ } + if (!stralloc_cats(&tmp,base)) nomem(); +- if (dns_txt(&text,&tmp) == -1) { +- flagmustnotbounce = 1; +- if (flagfailclosed) { +- if (!stralloc_copys(&text,"temporary RBL lookup error")) nomem(); +- decision = 2; ++ if (altreply) { ++ if (dns_ip4(&text,&tmp) == -1) { ++ flagmustnotbounce = 1; ++ if (flagfailclosed) { ++ if (!stralloc_copys(&text,"temporary RBL lookup error")) nomem(); ++ decision = 2; ++ } ++ return; ++ } ++ if (text.len) { ++ if(!stralloc_copys(&text, "")) nomem(); ++ while(*altreply) { ++ char *x; ++ i = str_chr(altreply, '%'); ++ if(!stralloc_catb(&text, altreply, i)) nomem(); ++ if(altreply[i] && ++ altreply[i+1]=='I' && ++ altreply[i+2]=='P' && ++ altreply[i+3]=='%') { ++ if(!stralloc_catb(&text, ip_env, str_len(ip_env))) nomem(); ++ altreply+=i+4; ++ } else if(altreply[i]) { ++ if(!stralloc_cats(&text, "%")) nomem(); ++ altreply+=i+1; ++ } else { ++ altreply+=i; ++ } ++ } ++ } ++ } else { ++ if (dns_txt(&text,&tmp) == -1) { ++ flagmustnotbounce = 1; ++ if (flagfailclosed) { ++ if (!stralloc_copys(&text,"temporary RBL lookup error")) nomem(); ++ decision = 2; ++ } ++ return; + } +- return; + } + if (text.len) + if (flagrblbounce) diff --git a/network/ucspi-tcp/patches/ucspi-tcp-0.88.errno.patch b/network/ucspi-tcp/patches/ucspi-tcp-0.88.errno.patch new file mode 100644 index 0000000000..fd93909e49 --- /dev/null +++ b/network/ucspi-tcp/patches/ucspi-tcp-0.88.errno.patch @@ -0,0 +1,12 @@ +diff -u ucspi-tcp-0.88.old/error.h ucspi-tcp-0.88/error.h +--- ucspi-tcp-0.88.old/error.h 2000-03-18 09:18:20.000000000 -0600 ++++ ucspi-tcp-0.88/error.h 2003-01-08 13:39:12.000000000 -0600 +@@ -1,7 +1,7 @@ + #ifndef ERROR_H + #define ERROR_H + +-extern int errno; ++#include <errno.h> + + extern int error_intr; + extern int error_nomem; diff --git a/network/ucspi-tcp/patches/ucspi-tcp-0.88.nobase.patch b/network/ucspi-tcp/patches/ucspi-tcp-0.88.nobase.patch new file mode 100644 index 0000000000..c6649f6b6a --- /dev/null +++ b/network/ucspi-tcp/patches/ucspi-tcp-0.88.nobase.patch @@ -0,0 +1,21 @@ +diff -ur ucspi-tcp-0.88.old/rblsmtpd.c ucspi-tcp-0.88/rblsmtpd.c +--- ucspi-tcp-0.88.old/rblsmtpd.c Sat Mar 18 09:18:42 2000 ++++ ucspi-tcp-0.88/rblsmtpd.c Mon Apr 1 09:26:07 2002 +@@ -22,7 +22,7 @@ + } + void usage(void) + { +- strerr_die1x(100,"rblsmtpd: usage: rblsmtpd [ -b ] [ -R ] [ -t timeout ] [ -r base ] [ -a base ] smtpd [ arg ... ]"); ++ strerr_die1x(100,"rblsmtpd: usage: rblsmtpd -r base [ -b ] [ -R ] [ -t timeout ] [ -r base ] [ -a base ] smtpd [ arg ... ]"); + } + + char *ip_env; +@@ -190,7 +190,7 @@ + argv += optind; + if (!*argv) usage(); + +- if (flagwantdefaultrbl) rbl("rbl.maps.vix.com"); ++ if (flagwantdefaultrbl) usage(); + if (decision >= 2) rblsmtpd(); + + pathexec_run(*argv,argv,envp); diff --git a/network/ucspi-tcp/slack-desc b/network/ucspi-tcp/slack-desc new file mode 100644 index 0000000000..185188f4ce --- /dev/null +++ b/network/ucspi-tcp/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler-----------------------------------------------------| +ucspi-tcp: ucspi-tcp (djb's TCP client-server command-line tools) +ucspi-tcp: +ucspi-tcp: ucspi-tcp includes several programs. tcpserver waits for incoming +ucspi-tcp: connections and, for each connection, runs a program of your +ucspi-tcp: choice, it provides useful environment variables, resource limits, +ucspi-tcp: and access control features. tcpclient makes a TCP connection and +ucspi-tcp: runs a program of your choice. It sets up the same environment +ucspi-tcp: variables as tcpserver. +ucspi-tcp: +ucspi-tcp: Also included are recordio, a tool that monitors all the input +ucspi-tcp: and output of a server, and several sample clients. diff --git a/network/ucspi-tcp/ucspi-tcp.SlackBuild b/network/ucspi-tcp/ucspi-tcp.SlackBuild new file mode 100644 index 0000000000..2da3be4ccc --- /dev/null +++ b/network/ucspi-tcp/ucspi-tcp.SlackBuild @@ -0,0 +1,66 @@ +#!/bin/sh + +# Slackware build script for ucspi-tcp + +# Written by David Miller dave@frop.net +# This script is released into the public domain + +PRGNAM=ucspi-tcp +VERSION=${VERSION:-0.88} +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +find . \ + \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \ + -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ + -exec chmod 644 {} \; + +echo gcc $SLKCFLAGS > conf-cc +echo $PKG/usr > conf-home + +patch -p1 < $CWD/patches/ucspi-tcp-0.88.errno.patch +patch -p1 < $CWD/patches/ucspi-tcp-0.88.nobase.patch +patch -p1 < $CWD/patches/ucspi-tcp-0.88.a_record.patch + +make setup check + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \ + xargs strip --strip-unneeded 2> /dev/null || true +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a CHANGES README TODO $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/network/ucspi-tcp/ucspi-tcp.info b/network/ucspi-tcp/ucspi-tcp.info new file mode 100644 index 0000000000..616011b68c --- /dev/null +++ b/network/ucspi-tcp/ucspi-tcp.info @@ -0,0 +1,10 @@ +PRGNAM="ucspi-tcp" +VERSION="0.88" +HOMEPAGE="http://cr.yp.to/ucspi-tcp.html" +DOWNLOAD="http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz" +MD5SUM="39b619147db54687c4a583a7a94c9163" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="David Miller" +EMAIL="dave@frop.net" +APPROVED="dsomero" |