diff options
Diffstat (limited to 'source/n/netkit-ntalk')
-rw-r--r-- | source/n/netkit-ntalk/netkit-ntalk-0.11.diff | 64 | ||||
-rw-r--r-- | source/n/netkit-ntalk/netkit-ntalk-0.17.diff | 20 | ||||
-rwxr-xr-x | source/n/netkit-ntalk/netkit-ntalk.SlackBuild | 91 | ||||
-rw-r--r-- | source/n/netkit-ntalk/ntalk-0.17-slackware-alt-talkd.patch | 31 | ||||
-rw-r--r-- | source/n/netkit-ntalk/slack-desc | 19 |
5 files changed, 225 insertions, 0 deletions
diff --git a/source/n/netkit-ntalk/netkit-ntalk-0.11.diff b/source/n/netkit-ntalk/netkit-ntalk-0.11.diff new file mode 100644 index 00000000..936ce5cc --- /dev/null +++ b/source/n/netkit-ntalk/netkit-ntalk-0.11.diff @@ -0,0 +1,64 @@ +--- ./talkd/talkd.c.orig Fri Nov 27 05:40:46 1998 ++++ ./talkd/talkd.c Wed Sep 15 21:30:24 1999 +@@ -67,6 +67,9 @@ + #define TIMEOUT 30 + #define MAXIDLE 120 + ++#if !defined(MAXHOSTNAMELEN) ++#define MAXHOSTNAMELEN 64 ++#endif + char ourhostname[MAXHOSTNAMELEN]; + + static time_t lastmsgtime; +--- ./talkd/print.c.orig Fri Nov 27 01:58:47 1998 ++++ ./talkd/print.c Wed Sep 15 21:30:24 1999 +@@ -51,6 +51,7 @@ + #include <unistd.h> + #include <fcntl.h> + #include <paths.h> ++#include <errno.h> + #include "prot_talkd.h" + #include "proto.h" + +@@ -145,7 +146,7 @@ + tt[sizeof(tt)-1]=0; + + snprintf(buf, sizeof(buf), +- "%s: %s: id %lu, l_user %s, r_user %s, r_tty %s\n", ++ "%s: %s: id %u, l_user %s, r_user %s, r_tty %s\n", + cp, tp, mp->id_num, lu, ru, tt); + write(logfd, buf, strlen(buf)); + } +@@ -185,7 +186,7 @@ + size_t i; + char tmp[4], buf[128]; + if (!badpackets) return; +- snprintf(buf, sizeof(buf), "From: %s [%lu]", ++ snprintf(buf, sizeof(buf), "From: %s [%u]", + inet_ntoa(from->sin_addr), from->sin_addr.s_addr); + write(packfd, buf, strlen(buf)); + for (i=0; i<len; i++) { +--- ./MCONFIG.orig Wed Dec 9 10:52:09 1998 ++++ ./MCONFIG Wed Sep 15 21:30:46 1999 +@@ -30,10 +30,10 @@ + CC=gcc + + # Compiler warnings +-WARNINGS= -Wall -W -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wcast-align ++WARNINGS= -Wall -W -Wpointer-arith -Wbad-function-cast -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline -Wcast-align + + # Compiler flags to use +-CFLAGS= -pipe -O2 $(WARNINGS) ++CFLAGS= -pipe $(RPM_OPT_FLAGS) $(WARNINGS) + + # Link-time flags to use + LDFLAGS= -s +@@ -49,7 +49,7 @@ + + + # Work around GNU libc lossage +-USE_GLIBC=0 ++USE_GLIBC=1 + + + diff --git a/source/n/netkit-ntalk/netkit-ntalk-0.17.diff b/source/n/netkit-ntalk/netkit-ntalk-0.17.diff new file mode 100644 index 00000000..5b6f70a0 --- /dev/null +++ b/source/n/netkit-ntalk/netkit-ntalk-0.17.diff @@ -0,0 +1,20 @@ +--- ./talkd/announce.c.orig Sat Jul 22 08:27:39 2000 ++++ ./talkd/announce.c Sun Feb 25 18:46:08 2001 +@@ -40,6 +40,7 @@ + #include <sys/types.h> + #include <sys/stat.h> + #include <sys/time.h> ++#include <time.h> + #include <sys/wait.h> + #include <sys/socket.h> + #include <errno.h> +--- ./talkd/table.c.orig Sun Feb 25 18:46:23 2001 ++++ ./talkd/table.c Sun Feb 25 18:46:34 2001 +@@ -47,6 +47,7 @@ + */ + #include <sys/param.h> + #include <sys/time.h> ++#include <time.h> + #include <sys/socket.h> + #include <syslog.h> + #include <unistd.h> diff --git a/source/n/netkit-ntalk/netkit-ntalk.SlackBuild b/source/n/netkit-ntalk/netkit-ntalk.SlackBuild new file mode 100755 index 00000000..9bc9937d --- /dev/null +++ b/source/n/netkit-ntalk/netkit-ntalk.SlackBuild @@ -0,0 +1,91 @@ +#!/bin/sh + +# Copyright 2007-2009 Patrick J. Volkerding, Sebeka, MN, USA +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +VERSION=0.17 +ARCH=${ARCH:-x86_64} +BUILD=${BUILD:-3} + +CWD=$(pwd) +TMP=${TMP:-/tmp} +PKG=$TMP/package-netkit-ntalk + +rm -rf $PKG +mkdir -p $TMP $PKG + +cd $TMP +rm -rf netkit-ntalk-$VERSION +tar xzvf $CWD/netkit-ntalk-$VERSION.tar.gz +cd netkit-ntalk-$VERSION +chown -R root:root . +zcat $CWD/netkit-ntalk-0.17.diff.gz | patch -p1 --verbose || exit +zcat $CWD/ntalk-0.17-slackware-alt-talkd.patch.gz | patch -p1 --verbose || exit +./configure --prefix=/usr +make || exit +cd talk +strip talk +mkdir -p $PKG/usr/bin +cat talk > $PKG/usr/bin/talk +chmod 755 $PKG/usr/bin/talk +mkdir -p $PKG/usr/man/man{1,8} +cat talk.1 | gzip -9c > $PKG/usr/man/man1/talk.1.gz +cd ../talkd +strip talkd +mkdir -p $PKG/usr/sbin +cat talkd > $PKG/usr/sbin/in.talkd +chmod 755 $PKG/usr/sbin/in.talkd +cat talkd.8 | gzip -9c > $PKG/usr/man/man8/in.talkd.8.gz +cd .. +mkdir -p $PKG/usr/doc/netkit-ntalk-$VERSION +cp -a README $PKG/usr/doc/netkit-ntalk-$VERSION +chown root:root $PKG/usr/doc/netkit-ntalk-$VERSION/* +chmod 644 $PKG/usr/doc/netkit-ntalk-$VERSION/* + +# Include old version of 'talk', which works better with +# 8-bit character sets: +cd $TMP +rm -rf netkit-ntalk-0.11 +tar xzvf $CWD/netkit-ntalk-0.11.tar.gz +cd netkit-ntalk-0.11 +chown -R root:root . +zcat $CWD/netkit-ntalk-0.11.diff.gz | patch -p0 --backup || exit +./configure --prefix=/usr +make SUB=talk # compiling talkd throws errors +cd talk +strip talk +mkdir -p $PKG/usr/bin +cat talk > $PKG/usr/bin/talk-0.11 +chmod 755 $PKG/usr/bin/talk-0.11 + +( cd $PKG/usr/sbin ; rm -rf in.ntalkd ) +( cd $PKG/usr/sbin ; ln -sf in.talkd in.ntalkd ) +( cd $PKG/usr/bin ; rm -rf ntalk ) +( cd $PKG/usr/bin ; ln -sf talk ntalk ) + +# Finish up the package: +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +# Build the package: +cd $PKG +makepkg -l y -c n $TMP/netkit-ntalk-$VERSION-$ARCH-$BUILD.txz + diff --git a/source/n/netkit-ntalk/ntalk-0.17-slackware-alt-talkd.patch b/source/n/netkit-ntalk/ntalk-0.17-slackware-alt-talkd.patch new file mode 100644 index 00000000..a26c4e6b --- /dev/null +++ b/source/n/netkit-ntalk/ntalk-0.17-slackware-alt-talkd.patch @@ -0,0 +1,31 @@ +--- netkit-ntalk-0.17/talkd/talkd.c.orig 1999-09-29 02:04:15 +0400 ++++ netkit-ntalk-0.17/talkd/talkd.c 2004-09-05 19:20:50 +0400 +@@ -68,6 +68,7 @@ char talkd_rcsid[] = + + #define TIMEOUT 30 + #define MAXIDLE 120 ++#define MINUDPSRCPORT 1024 + + #if !defined(MAXHOSTNAMELEN) + #define MAXHOSTNAMELEN 64 +@@ -167,6 +168,7 @@ do_one_packet(void) + struct sockaddr_in sn; + int cc, i, ok; + socklen_t addrlen; ++ int theirport; + + addrlen = sizeof(sn); + cc = recvfrom(0, inbuf, sizeof(inbuf), 0, +@@ -194,6 +196,12 @@ do_one_packet(void) + return; + } + ++ theirport = ntohs(sn.sin_port); ++ if (theirport < MINUDPSRCPORT) { ++ syslog(LOG_WARNING, "%d: bad port", theirport); ++ return; ++ } ++ + /* + * If we get here we have an address we can reply to, although + * it may not be good for much. If possible, reply to it, because diff --git a/source/n/netkit-ntalk/slack-desc b/source/n/netkit-ntalk/slack-desc new file mode 100644 index 00000000..97b9d8c7 --- /dev/null +++ b/source/n/netkit-ntalk/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------------------------------------------------------| +netkit-ntalk: netkit-ntalk (talk client and talkd daemon) +netkit-ntalk: +netkit-ntalk: talk and talkd are the BSD communication client server system for +netkit-ntalk: the command line. "talk" is the client that asks another user to +netkit-ntalk: respond; and "in.talkd" is the server that notifies a user that +netkit-ntalk: someone else wants to initiate a conversation. +netkit-ntalk: +netkit-ntalk: The talk command appeared in 4.2BSD. +netkit-ntalk: +netkit-ntalk: +netkit-ntalk: |