diff options
author | is <is@pkgsrc.org> | 2011-06-01 11:21:00 +0000 |
---|---|---|
committer | is <is@pkgsrc.org> | 2011-06-01 11:21:00 +0000 |
commit | 17952b85f93dac626e7741cd71eb1ead0a265b31 (patch) | |
tree | b0a282faff9019b45a75f4e1479b515640738ce3 | |
parent | 4eb48a870d61c74fa352b712c9e011b7cf16305c (diff) | |
download | pkgsrc-17952b85f93dac626e7741cd71eb1ead0a265b31.tar.gz |
Update to sendfile-2.1b.
Most visible change is multiprotocol support.
-rw-r--r-- | net/sendfile/MESSAGE | 7 | ||||
-rw-r--r-- | net/sendfile/Makefile | 12 | ||||
-rw-r--r-- | net/sendfile/PLIST | 3 | ||||
-rw-r--r-- | net/sendfile/distinfo | 16 | ||||
-rw-r--r-- | net/sendfile/patches/patch-aa | 79 | ||||
-rw-r--r-- | net/sendfile/patches/patch-ab | 13 | ||||
-rw-r--r-- | net/sendfile/patches/patch-ac | 164 | ||||
-rw-r--r-- | net/sendfile/patches/patch-ae | 13 | ||||
-rw-r--r-- | net/sendfile/patches/patch-af | 47 | ||||
-rw-r--r-- | net/sendfile/patches/patch-ag | 25 |
10 files changed, 279 insertions, 100 deletions
diff --git a/net/sendfile/MESSAGE b/net/sendfile/MESSAGE index ec7deb62590..9269e918eba 100644 --- a/net/sendfile/MESSAGE +++ b/net/sendfile/MESSAGE @@ -4,11 +4,12 @@ To complete installation, you must saft 487/tcp # simple asynchronous file transfer - add to /etc/inetd.conf: - saft stream tcp nowait root ${LOCALBASE}/sbin/sendfiled sendfiled + saft stream tcp6 nowait root ${LOCALBASE}/sbin/sendfiled sendfiled + saft stream tcp nowait root ${LOCALBASE}/sbin/sendfiled sendfiled - If you want to use the outgoing spooling feature, then add to your system bootup file (/etc/rc.local or /etc/rc.d/rc.local): - ${LOCALBASE}/sbin/sendfiled -Q + ${PREFIX}/sbin/sendfiled -Q - Users should add to their .login or .profile: - ${LOCALBASE}/bin/check_sendfile + ${PREFIX}/bin/check_sendfile diff --git a/net/sendfile/Makefile b/net/sendfile/Makefile index 93051383e87..3a5c87bf58e 100644 --- a/net/sendfile/Makefile +++ b/net/sendfile/Makefile @@ -1,23 +1,19 @@ -# $NetBSD: Makefile,v 1.29 2011/05/27 13:13:35 is Exp $ +# $NetBSD: Makefile,v 1.30 2011/06/01 11:21:01 is Exp $ # -DISTNAME= sendfile-20010216 -PKGNAME= sendfile-2.1.0.2 -PKGREVISION= 2 +DISTNAME= sendfile-2.1b CATEGORIES= net -MASTER_SITES= ftp://ftp.belwue.de/pub/unix/sendfile/current/ -# http://fex.rus.uni-stuttgart.de/download/ +MASTER_SITES= http://fex.rus.uni-stuttgart.de/download/ MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://fex.rus.uni-stuttgart.de/saft/sendfile.html COMMENT= Implementation of the Simple asynchronous file transfer protocol LICENSE= gnu-gpl-v2 -WRKSRC= ${WRKDIR}/sendfile-2.1a +#WRKSRC= ${WRKDIR}/sendfile-2.1b PKG_DESTDIR_SUPPORT= user-destdir -PKG_SYSCONFSUBDIR= sendfile EGDIR= ${PREFIX}/share/examples/sendfile CONF_FILES= ${EGDIR}/sendfile.cf ${PKG_SYSCONFDIR}/sendfile.cf CONF_FILES+= ${EGDIR}/sendfile.deny ${PKG_SYSCONFDIR}/sendfile.deny diff --git a/net/sendfile/PLIST b/net/sendfile/PLIST index a5d63a8c069..0af3a5793e4 100644 --- a/net/sendfile/PLIST +++ b/net/sendfile/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.3 2009/06/14 18:09:42 joerg Exp $ +@comment $NetBSD: PLIST,v 1.4 2011/06/01 11:21:01 is Exp $ bin/sf_cleanup bin/sfdconf bin/sfconf @@ -6,7 +6,6 @@ bin/check_sendfile bin/utf7encode bin/wlock bin/fetchfile -bin/ewl bin/receive bin/sendmsg bin/sendfile diff --git a/net/sendfile/distinfo b/net/sendfile/distinfo index 4fb3943216d..7da6002fb2d 100644 --- a/net/sendfile/distinfo +++ b/net/sendfile/distinfo @@ -1,9 +1,11 @@ -$NetBSD: distinfo,v 1.11 2011/05/27 13:13:35 is Exp $ +$NetBSD: distinfo,v 1.12 2011/06/01 11:21:01 is Exp $ -SHA1 (sendfile-20010216.tar.gz) = cdf6ff67bdc11709209c5f93ac94d380fa1abac3 -RMD160 (sendfile-20010216.tar.gz) = 3e1f9648875b1844d391b86b733c8d04318c4d90 -Size (sendfile-20010216.tar.gz) = 292130 bytes -SHA1 (patch-aa) = 3b61185e0d0a4e792945cdfc1ec1e318b77869c5 -SHA1 (patch-ab) = c74cf201573068d8e1afa8e285831181d1be789e -SHA1 (patch-ac) = d2c70f4a40066d83650efe32d0e16574b01f472d +SHA1 (sendfile-2.1b.tar.gz) = cd0ee8eb2865c3320529b45812f96805c357bc35 +RMD160 (sendfile-2.1b.tar.gz) = 2095f4252db0f15f358e969460d61f29d90e8fad +Size (sendfile-2.1b.tar.gz) = 335621 bytes +SHA1 (patch-aa) = 3071fcbc26705b2f382d373913fa804aac0b35ab +SHA1 (patch-ac) = d6830d56fa5a610d376cf847f0a4d54ed15d2056 SHA1 (patch-ad) = ec9cf6dd79b6856c196058cb3117f2b140fffa31 +SHA1 (patch-ae) = 19847558b6b1bae8ce6d7ba37cb217ccd6fe896e +SHA1 (patch-af) = f04e5bb9956e34b2b0ae1f1ba72addfffdd1ff78 +SHA1 (patch-ag) = d43da0ec208923ca825567b82197b8dcba97a94e diff --git a/net/sendfile/patches/patch-aa b/net/sendfile/patches/patch-aa index 1df13948c6c..fa74f6dbd00 100644 --- a/net/sendfile/patches/patch-aa +++ b/net/sendfile/patches/patch-aa @@ -1,6 +1,6 @@ -$NetBSD: patch-aa,v 1.6 2011/03/20 12:13:44 obache Exp $ +$NetBSD: patch-aa,v 1.7 2011/06/01 11:21:01 is Exp $ ---- makeconfig.orig 1999-08-26 18:53:32.000000000 +0000 +--- makeconfig.orig 2006-06-07 13:57:47.000000000 +0000 +++ makeconfig @@ -9,17 +9,13 @@ # $HOME/.develenv @@ -17,35 +17,54 @@ $NetBSD: patch-aa,v 1.6 2011/03/20 12:13:44 obache Exp $ -MANDIR=/usr/local/man -CONFIG=/usr/local/etc -SERVERDIR=/usr/local/sbin -+BINDIR=@PREFIX@/bin -+MANDIR=@PREFIX@/man -+CONFIG=@PKG_SYSCONFBASEDIR@ -+EGDIR=@PREFIX@/share/examples/sendfile -+SERVERDIR=@PREFIX@/sbin - INETDCONF=/etc/inetd.conf ++BINDIR=${LOCALBASE}/bin ++MANDIR=${LOCALBASE}/man ++CONFIG=${LOCALBASE}/etc ++EGDIR=${LOCALBASE}/share/examples/sendfile ++SERVERDIR=${LOCALBASE}/sbin + INETDCONF=/etc/inetd.conf # xinetd will be automaticly recognized SERVICES=/etc/services -@@ -99,7 +95,7 @@ case "$SYSTEM" in +@@ -89,17 +85,22 @@ SYSTEM=`./config.guess` + case "$SYSTEM" in + *linux*) SYSTEM=LINUX;; + *sunos4*) SYSTEM=SOLARIS1 ++ SENDMAIL=/usr/lib/sendmail + if [ -f /lib/lib44bsd.a -o -f /usr/lib/lib44bsd.a ]; then + LIBS="-l44bsd" + fi;; +- *solaris2*) SYSTEM=SOLARIS2;; +- *hp-ux*) SYSTEM=HPUX;; +- *aix*) SYSTEM=AIX;; ++ *solaris2*) SYSTEM=SOLARIS2 ++ SENDMAIL=/usr/lib/sendmail;; ++ *hp-ux*) SYSTEM=HPUX ++ SENDMAIL=/usr/lib/sendmail;; ++ *aix*) SYSTEM=AIX ++ SENDMAIL=/usr/lib/sendmail;; + *irix*) SYSTEM=IRIX;; *next*) SYSTEM=NEXT;; - *convex*) SYSTEM=CONVEXOS;; +- *convex*) SYSTEM=CONVEXOS;; ++ *convex*) SYSTEM=CONVEXOS ++ SENDMAIL=/usr/lib/sendmail;; *osf*) SYSTEM=OSF1;; - *bsd*) SYSTEM=BSD;; + *bsd*|*dragonfly*) SYSTEM=BSD;; + *darwin*) SYSTEM=DARWIN;; *) SYSTEM=UNKNOWN;; # *) SYSTEM=`uname -a | tr '[a-z]' '[A-Z]'` - # case "$SYSTEM" in -@@ -110,6 +106,10 @@ case "$SYSTEM" in +@@ -111,6 +112,10 @@ case "$SYSTEM" in # esac;; esac +case "$SYSTEM" in -+BSD) CFLAGS="$CFLAGS -DHAVE_STRERROR=1" ;; ++BSD) CFLAGS="$CFLAGS -DHAVE_STRERROR=1 -DHAVE_GETOPT_H=1" ;; +esac + cd ../src echo now in `pwd` -@@ -133,6 +133,7 @@ cat <<EOD>globals.h +@@ -134,6 +139,7 @@ cat <<EOD>globals.h #define MANDIR "$MANDIR" #define SERVERDIR "$SERVERDIR" @@ -53,3 +72,35 @@ $NetBSD: patch-aa,v 1.6 2011/03/20 12:13:44 obache Exp $ #define CONFIG "$CONFIG/sendfile.cf" #define ALIASES "$CONFIG/sendfile.aliases" #define ALLOW "$CONFIG/sendfile.allow" +@@ -151,7 +157,7 @@ cat <<EOD>globals.h + #define PGP "${PGP:-pgp}" + #define RECODE "${RECODE:-recode}" + #define METAMAIL "${METAMAIL:-metamail}" +-#define SENDMAIL "${SENDMAIL:-/usr/lib/sendmail}" ++#define SENDMAIL "${SENDMAIL:-/usr/sbin/sendmail}" + #define FIFODIR "${FIFODIR:-/tmp/sfm}" + + #define DBF "/var/log/sendfiled.dbg" +@@ -170,7 +176,7 @@ cat <<EOD>globals.h + #undef DEBUG /* more debugging output */ + #undef ALT_MESSAGES /* alternative user message format */ + #undef RESPECT_MAIL_ALIASES /* look for elm aliases, too */ +-#undef ENABLE_MULTIPROTOCOL /* ipv6 support for Linux */ ++#define ENABLE_MULTIPROTOCOL /* ipv6 support for Linux */ + + #ifdef ENABLE_MULTIPROTOCOL + #define SERVICE "saft" /* service entry for saft */ +@@ -204,6 +210,13 @@ cat <<EOD>>config.h + #endif + #ifndef _POSIX_SOURCE + #define _POSIX_SOURCE ++ #define _POSIX_C_SOURCE 200112L /* snprintf */ ++ #endif ++ #ifndef _XOPEN_SOURCE ++ #define _XOPEN_SOURCE /* strdup */ ++ #endif ++ #ifndef _NETBSD_SOURCE ++ #define _NETBSD_SOURCE /* struct timezone */ + #endif + #ifndef __USE_BSD + #define __USE_BSD diff --git a/net/sendfile/patches/patch-ab b/net/sendfile/patches/patch-ab deleted file mode 100644 index 62fcf64011f..00000000000 --- a/net/sendfile/patches/patch-ab +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-ab,v 1.4 2001/02/26 11:34:55 wiz Exp $ - ---- src/io.c.orig Fri Feb 16 14:53:43 2001 -+++ src/io.c -@@ -389,7 +389,7 @@ - - /* delete file */ - if (unlink(dire->d_name) < 0) { -- snprintf(MAXS(tmp),"cannot remove %s/%s",tmpdir); -+ snprintf(MAXS(tmp),"cannot remove %s/%s",tmpdir,dire->d_name); - message("",'X',tmp); - } - diff --git a/net/sendfile/patches/patch-ac b/net/sendfile/patches/patch-ac index 23eb24a20c9..252255b58c3 100644 --- a/net/sendfile/patches/patch-ac +++ b/net/sendfile/patches/patch-ac @@ -1,8 +1,8 @@ -$NetBSD: patch-ac,v 1.5 2011/05/27 13:13:35 is Exp $ +$NetBSD: patch-ac,v 1.6 2011/06/01 11:21:01 is Exp $ ---- develop/install.orig 1999-12-07 10:40:11.000000000 +0100 +--- develop/install.orig 2005-06-06 20:39:29.000000000 +0000 +++ develop/install -@@ -58,12 +58,12 @@ mkdir_recursive() { +@@ -59,12 +59,12 @@ mkdir_recursive() { } make_dirs() { @@ -15,13 +15,13 @@ $NetBSD: patch-ac,v 1.5 2011/05/27 13:13:35 is Exp $ + mkdir_recursive $D$BINDIR + mkdir_recursive $D$MANDIR/man1 + mkdir_recursive $D$SERVERDIR -+ mkdir_recursive $D`dirname $DENY` -+ mkdir_recursive $D`dirname $CONFIG` ++ mkdir_recursive $D$EGDIR ++ mkdir_recursive $D$EGDIR + mkdir $D/$MANDIR/man$manmisc $D/$MANDIR/man$manadmin 2>/dev/null } make_man() { -@@ -71,7 +71,7 @@ make_man() { +@@ -72,7 +72,7 @@ make_man() { s:/usr/local/etc/sendfile.deny:$DENY: s:/usr/local/etc/sendfile.cf:$CONFIG: s:/var/spool/sendfile:$SPOOL: @@ -30,7 +30,7 @@ $NetBSD: patch-ac,v 1.5 2011/05/27 13:13:35 is Exp $ } install_man() { -@@ -81,8 +81,8 @@ install_man() { +@@ -82,8 +82,8 @@ install_man() { make_man fetchfile 1 1 make_man fetchfile 7 $manmisc make_man sendfiled 8 $manadmin @@ -41,7 +41,7 @@ $NetBSD: patch-ac,v 1.5 2011/05/27 13:13:35 is Exp $ } SYSTEM=$1 -@@ -93,18 +93,11 @@ if [ "$SYSTEM" = "" ]; then +@@ -94,18 +94,11 @@ if [ "$SYSTEM" = "" ]; then exit fi @@ -61,7 +61,7 @@ $NetBSD: patch-ac,v 1.5 2011/05/27 13:13:35 is Exp $ /define CONFIG/ {print "CONFIG="$2} /define DENY/ {print "DENY="$2} /define ALLOW/ {print "ALLOW="$2} -@@ -113,6 +106,8 @@ eval `awk -F\" '/define BINDIR/ {prin +@@ -114,6 +107,8 @@ eval `awk -F\" '/define BINDIR/ {prin /define OUTLOG/ {print "OUTLOG="$2} ' src/globals.h` @@ -70,30 +70,31 @@ $NetBSD: patch-ac,v 1.5 2011/05/27 13:13:35 is Exp $ if [ "$BINDIR" = "" ]; then BINDIR=/usr/local/bin; fi if [ "$MANDIR" = "" ]; then MANDIR=/usr/local/man; fi if [ "$SERVERDIR" = "" ]; then SERVERDIR=/usr/local/sbin; fi -@@ -126,53 +121,29 @@ if [ "$OUTLOG" = "" ]; then OUTLOG=$SPOO - if [ "$INETDCONF" = "" ]; then INETDCONF=/etc/inetd.conf; fi - if [ "$SERVICES" = "" ]; then SERVICES=/etc/services; fi +@@ -131,54 +126,28 @@ if [ -f /etc/xinetd.conf -a -d /etc/xine + INETDCONF=/etc/xinetd.d/sendfile + fi -+CONFIG=$EGDIR/sendfile.cf -+DENY=$EGDIR/sendfile.deny ++CONFIG=$PKG_SYSCONFDIR/sendfile.cf ++DENY=$PKG_SYSCONFDIR/sendfile.deny + case "$SYSTEM" in - *BSD*) manmisc=7; manadmin=8;; - *) manmisc=5; manadmin=1m;; +- *BSD*) manmisc=7; manadmin=8;; +- *) manmisc=5; manadmin=1m;; ++ *) manmisc=7; manadmin=8;; esac -# purge old logfiles (bug from sendfile revision < 19980310) --(cd $SPOOL && rm -f */.sendfile*.log) +-rm -f $SPOOL*/.sendfile*.log - if [ "$2" = "reinstall" ] ; then umask 022 cd src || exit 1 make_dirs -- cp sendfile sendmsg receive utf7encode fetchfile wlock ewl $BINDIR/ +- cp sendfile sendmsg receive utf7encode fetchfile wlock $BINDIR/ - [ -x $SERVERDIR/sendfiled ] && mv $SERVERDIR/sendfiled $SERVERDIR/sendfiled.old && rm -f $SERVERDIR/sendfiled.old - cp sendfiled $SERVERDIR -+ cp sendfile sendmsg receive utf7encode fetchfile wlock ewl $D$BINDIR/ -+ [ -x $D$SERVERDIR/sendfiled ] && mv $D$SERVERDIR/sendfiled $D$SERVERDIR/sendfiled.old && rm -f $SERVERDIR/sendfiled.old ++ cp sendfile sendmsg receive utf7encode fetchfile wlock $D$BINDIR/ ++ [ -x $D$SERVERDIR/sendfiled ] && mv $D$SERVERDIR/sendfiled $D$SERVERDIR/sendfiled.old && rm -f $D$SERVERDIR/sendfiled.old + cp sendfiled $D$SERVERDIR cd ../etc - cp sfconf sfdconf $BINDIR/ @@ -128,10 +129,11 @@ $NetBSD: patch-ac,v 1.5 2011/05/27 13:13:35 is Exp $ - echo - exit -fi - +- umask 022 -@@ -183,7 +154,7 @@ echo "installing the clients in $BINDIR" + echo "checking for directories" +@@ -188,7 +157,7 @@ echo "installing the clients in $BINDIR" cd etc || exit 1 sed "s:/usr/local/etc/sendfile.cf:$CONFIG: s:/var/spool/sendfile:$SPOOL:" sf_cleanup \ @@ -140,7 +142,7 @@ $NetBSD: patch-ac,v 1.5 2011/05/27 13:13:35 is Exp $ sed "s:SPOOL=/var/spool/sendfile:SPOOL=$SPOOL: s:INLOG=/var/spool/sendfile/LOG/in:INLOG=$INLOG: s:OUTLOG=/var/spool/sendfile/LOG/in:OUTLOG=$OUTLOG: -@@ -193,13 +164,13 @@ sed "s:SPOOL=/var/spool/sendfile:SPOOL=$ +@@ -198,13 +167,13 @@ sed "s:SPOOL=/var/spool/sendfile:SPOOL=$ s:ALLOW=/usr/local/etc/sendfile.allow:ALLOW=$ALLOW: " sfdconf \ | awk '{if ($0 != "CONFIG") print $0; else system("cat sendfile.cf")}' \ @@ -151,49 +153,62 @@ $NetBSD: patch-ac,v 1.5 2011/05/27 13:13:35 is Exp $ +sed "s:/var/spool/sendfile:$SPOOL:" sfconf >$D$BINDIR/sfconf +sed "s:receive :$BINDIR/receive :" check_sendfile >$D$BINDIR/check_sendfile cd ../src || exit 1 --cp sendfile sendmsg receive utf7encode fetchfile wlock ewl $BINDIR/ -+cp sendfile sendmsg receive utf7encode fetchfile wlock ewl $D$BINDIR/ +-cp sendfile sendmsg receive utf7encode fetchfile wlock $BINDIR/ ++cp sendfile sendmsg receive utf7encode fetchfile wlock $D$BINDIR/ cd .. -(cd $BINDIR +(cd $D$BINDIR ln -s utf7encode utf7decode 2>/dev/null ln -s sendfile sf 2>/dev/null ln -s sendmsg sm 2>/dev/null -@@ -220,8 +191,8 @@ if [ "$SENDFILED" != "$SERVERDIR/sendfil - echo " there is $SERVERDIR/sendfiled in makeconfig! Check it!" - fi +@@ -216,153 +185,37 @@ echo "installing the man-pages in $MANDI + install_man + echo "installing the sendfile-daemon in $SERVERDIR" -[ -x $SERVERDIR/sendfiled ] && mv $SERVERDIR/sendfiled $SERVERDIR/sendfiled.old && rm -f $SERVERDIR/sendfiled.old -cp src/sendfiled $SERVERDIR || exit 1 +[ -x $D$SERVERDIR/sendfiled ] && mv $D$SERVERDIR/sendfiled $D$SERVERDIR/sendfiled.old && rm -f $D$SERVERDIR/sendfiled.old +cp src/sendfiled $D$SERVERDIR || exit 1 - NOSENDFILE=`dirname $DENY 2>/dev/null`/nosendfile +-NOSENDFILE=`dirname $DENY 2>/dev/null`/nosendfile ++NOSENDFILE=$D`dirname $DENY 2>/dev/null`/nosendfile if [ -f $NOSENDFILE ]; then -@@ -233,16 +204,16 @@ if [ -f $NOSENDFILE ]; then - mv $NOSENDFILE $DENY +- if grep ^allow-only $NOSENDFILE >/dev/null; then +- echo "Information: $NOSENDFILE is now $ALLOW (autoconverted)" +- grep -v ^allow-only $NOSENDFILE > $ALLOW ++ if grep ^allow-only $D$NOSENDFILE >/dev/null; then ++ echo "Information: $D$NOSENDFILE is now $ALLOW (autoconverted)" ++ grep -v ^allow-only $D$NOSENDFILE > $D$ALLOW + else + echo "Information: $NOSENDFILE is now $DENY (autoconverted)" +- mv $NOSENDFILE $DENY ++ mv $NOSENDFILE $D$DENY fi fi -if [ ! -f $DENY -a ! -f $ALLOW ]; then -+if [ ! -f $D$DENY -a ! -f $D$ALLOW ]; then - echo "installing the sendfile deny file as $DENY" +- echo "installing the sendfile deny file as $DENY" - cp etc/sendfile.deny $DENY - chmod 644 $DENY -+ cp etc/sendfile.deny $D$DENY -+ chmod 644 $D$DENY ++if [ ! -f $D$EGDIR/sendfile.allow -a ! -f $D$EGDIR/sendfile.deny ]; then ++ echo "installing the sendfile deny file into $D/$EGDIR" ++ cp etc/sendfile.deny $D$EGDIR ++ chmod 644 $D$EGDIR/sendfile.deny fi -if [ ! -f $CONFIG ]; then -+if [ ! -f $D$CONFIG ]; then - echo "installing the global sendfile config file as $CONFIG" +- echo "installing the global sendfile config file as $CONFIG" - cp etc/sendfile.cf $CONFIG - chmod 644 $CONFIG -+ cp etc/sendfile.cf $D$CONFIG -+ chmod 644 $D$CONFIG ++if [ ! -f $D$EGDIR ]; then ++ echo "installing the global sendfile config file as $D$EGDIR/sendfile.cf" ++ cp etc/sendfile.cf $D$EGDIR ++ chmod 644 $D$EGDIR/sendfile.cf else - if [ "`diff etc/sendfile.cf $CONFIG`" ]; then - echo "Warning: `pwd`/etc/sendfile.cf differs from $CONFIG !" -@@ -250,100 +221,6 @@ else +- if [ "`diff etc/sendfile.cf $CONFIG`" ]; then +- echo "Warning: `pwd`/etc/sendfile.cf differs from $CONFIG !" ++ if [ "`diff etc/sendfile.cf $D$EGDIR`" ]; then ++ echo "Warning: `pwd`/etc/sendfile.cf differs from $D$EGDIR !" + echo "Please take a look what has been changed!" fi fi @@ -218,17 +233,40 @@ $NetBSD: patch-ac,v 1.5 2011/05/27 13:13:35 is Exp $ - fi -fi - --if [ "$SENDFILED" = "" ]; then -- if [ -f /usr/sbin/tcpd ]; then -- SFD="/usr/sbin/tcpd $SERVERDIR/sendfiled" -- else -- SFD="$SERVERDIR/sendfiled sendfiled" -- fi -- RESTART=true -- echo "configuring $INETDCONF" -- echo "#" >>$INETDCONF -- echo "# simple asynchronous file transfer" >>$INETDCONF -- echo "saft stream tcp nowait root $SFD" >>$INETDCONF +-case "$INETDCONF" in +- *xinetd*) +- if [ -f $INETDCONF ]; then +- echo $INETDCONF does already exist -skipping +- else +- echo installing $INETDCONF +- sed "s:/usr/local/sbin/sendfiled:$SERVERDIR/sendfiled:" etc/xinetd >$INETDCONF +- RESTART=true +- fi +- SENDFILED=`awk '/[ \t]*server[ \t]*=/ { print $3 }' $INETDCONF` +- ;; +- *) +- SENDFILED=`awk '/^saft/ { sfd=$6; +- if (index($7,"/sendfiled")>0) sfd=$7; +- if (substr(sfd,1,1)=="?") sfd=substr(sfd,2); +- print sfd; }' $INETDCONF` +- if [ "$SENDFILED" = "" ]; then +- if [ -f /usr/sbin/tcpd ]; then +- SFD="/usr/sbin/tcpd $SERVERDIR/sendfiled" +- else +- SFD="$SERVERDIR/sendfiled sendfiled" +- fi +- RESTART=true +- echo "configuring $INETDCONF" +- echo "#" >>$INETDCONF +- echo "# simple asynchronous file transfer" >>$INETDCONF +- echo "saft stream tcp nowait root $SFD" >>$INETDCONF +- fi +- ;; +-esac +- +-if [ "$SENDFILED" != "$SERVERDIR/sendfiled" -a "$SENDFILED" != "" ]; then +- echo "WARNING: you have specified $SENDFILED in $INETDCONF, but" +- echo " there is $SERVERDIR/sendfiled in makeconfig! Check it!" -fi - -if [ -f /etc/inetd.sec ]; then @@ -291,6 +329,26 @@ $NetBSD: patch-ac,v 1.5 2011/05/27 13:13:35 is Exp $ -EOD -fi - ++ echo echo "You may want to add the following line to your system bootup script:" echo " $SERVERDIR/sendfiled -Q" +@@ -370,18 +223,3 @@ echo "This will start an outgoing spooli + echo "which processes any old files in the outgoing spool." + echo + +-if [ "$RESTART" = true ]; then +- if [ -f /etc/init.d/xinetd ]; then +- echo reloading xinetd: +- if fgrep reload\) /etc/init.d/xinetd >/dev/null; then +- /etc/init.d/xinetd reload +- else +- /etc/init.d/xinetd stop +- /etc/init.d/xinetd start +- fi +- else +- echo +- echo "please restart now your inetd ( or simply reboot :-) )" +- echo +- fi +-fi diff --git a/net/sendfile/patches/patch-ae b/net/sendfile/patches/patch-ae new file mode 100644 index 00000000000..6c5ac2018a2 --- /dev/null +++ b/net/sendfile/patches/patch-ae @@ -0,0 +1,13 @@ +$NetBSD: patch-ae,v 1.1 2011/06/01 11:21:01 is Exp $ + +--- src/net.c.orig 2011-05-30 16:21:42.000000000 +0200 ++++ src/net.c +@@ -393,7 +393,7 @@ int open_connection(char *adr, char* ser + result = getaddrinfo(hostname, service, &hints, &addressInfo); + free(hostptr); + +- if (result < 0) return (-3); ++ if (result != 0) return (-3); + + for (aiptr = addressInfo; aiptr != NULL; aiptr = aiptr->ai_next) + { diff --git a/net/sendfile/patches/patch-af b/net/sendfile/patches/patch-af new file mode 100644 index 00000000000..351a18a19b8 --- /dev/null +++ b/net/sendfile/patches/patch-af @@ -0,0 +1,47 @@ +$NetBSD: patch-af,v 1.1 2011/06/01 11:21:01 is Exp $ + +--- src/peername.c.orig 2005-06-06 23:14:16.000000000 +0200 ++++ src/peername.c +@@ -65,7 +65,7 @@ + #ifndef ENABLE_MULTIPROTOCOL + + char *peername(int fd) { +- size_t len; ++ socklen_t len; + struct sockaddr addr; + struct in_addr *iaddr; + struct hostent *hptr; +@@ -109,7 +109,7 @@ char *defaultName = "UNKNOWN_HOST"; + + + char *peername(int fd) { +- size_t len; ++ socklen_t len; + char addrbuf[1024]; + struct sockaddr *addr; + char service[1024]; +@@ -125,11 +125,13 @@ char *peername(int fd) { + * is less than sizeof(struct sockadd_in6) + */ + +- if ((getpeername(fd,&addrbuf,&len)) < 0) return(defaultName); ++ if ((getpeername(fd,(struct sockaddr *)&addrbuf,&len)) < 0) { ++ return(defaultName); ++ } + addr = (struct sockaddr*)addrbuf; + + if (getnameinfo(addr, len, peerHostName, 1023, +- service, 1023, 0) < 0) { ++ service, 1023, 0) != 0) { + return defaultName; + } + +@@ -171,7 +173,7 @@ char *peername(int fd) { + } + + if (getnameinfo(addr, len, peerHostName, 1023, +- service, 1023, NI_NUMERICHOST) < 0) { ++ service, 1023, NI_NUMERICHOST) != 0) { + return defaultName; + } else { + return strdup(peerHostName); diff --git a/net/sendfile/patches/patch-ag b/net/sendfile/patches/patch-ag new file mode 100644 index 00000000000..769cfb4dc72 --- /dev/null +++ b/net/sendfile/patches/patch-ag @@ -0,0 +1,25 @@ +$NetBSD: patch-ag,v 1.1 2011/06/01 11:21:01 is Exp $ + +--- src/address.c.orig 2005-06-06 21:14:16.000000000 +0000 ++++ src/address.c +@@ -688,7 +688,8 @@ int saft_connect(const char *type, + if (strcasecmp(service, SERVICE) == 0 || strcmp(service, PORT_STRING) == 0) { + snprintf(MAXS(ahost),"saft.%s",host); + if (client) { +- if(gethostbyname2(ahost, addressFamily)){ ++ sockfd=open_connection(host,service); ++ if(sockfd >= 0){ + if (!quiet) { + printf("try sending to %s@%s ? ",recipient,ahost); + fgetl(answer,stdin); +@@ -703,7 +704,9 @@ int saft_connect(const char *type, + snprintf(MAXS(tmp),"opening connection to %s@%s",recipient,host); + if (quiet<2) message(prg,'I',tmp); + } +- sockfd=open_connection(host,service); ++ } else { ++ close(sockfd); ++ sockfd = -3; + } + } + |