aboutsummaryrefslogtreecommitdiff
path: root/news
diff options
context:
space:
mode:
authorChris Piazza <cpiazza@FreeBSD.org>2000-01-12 05:51:25 +0000
committerChris Piazza <cpiazza@FreeBSD.org>2000-01-12 05:51:25 +0000
commit050486602a06b76cd707185b8c908bad3bfdcf9f (patch)
tree46e0bc2e8ceec84a206ecc0a95e55ac0d810f370 /news
parent62ba44547e273757953b1892c3b962a85cf0528f (diff)
downloadports-050486602a06b76cd707185b8c908bad3bfdcf9f.tar.gz
ports-050486602a06b76cd707185b8c908bad3bfdcf9f.zip
Notes
Diffstat (limited to 'news')
-rw-r--r--news/nntp/Makefile21
-rw-r--r--news/nntp/distinfo3
-rw-r--r--news/nntp/files/patch-af22
-rw-r--r--news/nntp/files/patch-ag386
-rw-r--r--news/nntp/pkg-plist2
5 files changed, 427 insertions, 7 deletions
diff --git a/news/nntp/Makefile b/news/nntp/Makefile
index 0cd37cff6ed3..a1d986745882 100644
--- a/news/nntp/Makefile
+++ b/news/nntp/Makefile
@@ -6,21 +6,25 @@
# $FreeBSD$
#
-DISTNAME= nntp-t5
-PKGNAME= nntp-1.5.11.5
+DISTNAME= nntp.1.5.12.2
+PKGNAME= nntp-1.5.12.2
CATEGORIES= news
-MASTER_SITES= ftp://ftp.abs.net/unix/ \
- ftp://ftp.ww.net/pub/unix/news/nntp/
+MASTER_SITES= ftp://ftp.academ.com/pub/nntp/server/
+
+PATCH_SITES= ftp://ftp.lan-ks.de/pub/c-news/ \
+ ftp://ftp.dinoex.org/pub/c-news/
+PATCHFILES= nntp-patch-y2k
MAINTAINER= adam@veda.is
BUILD_DEPENDS= ${LOCALBASE}/lib/libcnews.a:${PORTSDIR}/news/cnews
+NO_WRKSUBDIR= yes
MAN1= nntpxmit.1
-MAN8= nntpd.8c mkgrdates.8c
+MAN8= nntpd.8c acttimes.8c
PLIST= ${WRKDIR}/.PLIST.sed
-MODIFY= conf.h xfer/Makefile xmit/Makefile
+MODIFY= conf.h Makefile
NEWSBIN?= ${PREFIX}/news/cnewsbin
NEWSCTL?= ${PREFIX}/news/lib
@@ -40,10 +44,15 @@ pre-configure:
-e "s=/var/news/over.view=${NEWSOV}=" \
-e "s=/var/news=${NEWSARTS}=" \
-e "s=/usr/local/bin=${PREFIX}/bin=" \
+ -e "s=/usr/local/sbin=${PREFIX}/sbin=" \
+ -e "s=/usr/local/man=${PREFIX}/man=" \
${WRKSRC}/${i}.sed >${WRKSRC}/${i}
.endfor
@${SED} \
-e "s=news/cnewsbin=${NEWSBIN:S=${PREFIX}/==}=" \
${PKGDIR}/PLIST >${PLIST}
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/overview.fmt ${NEWSCTL}/overview.fmt
+
.include <bsd.port.mk>
diff --git a/news/nntp/distinfo b/news/nntp/distinfo
index 96f56ef20268..46cf6bcfa9fa 100644
--- a/news/nntp/distinfo
+++ b/news/nntp/distinfo
@@ -1 +1,2 @@
-MD5 (nntp-t5.tar.gz) = eb5a033e21b5443640b4161f4b39f0a7
+MD5 (nntp.1.5.12.2.tar.gz) = 85f344ee760462719e4fa80e364a8098
+MD5 (nntp-patch-y2k) = ec2d3fc974559b3f6f8f4a4bfc8dcb44
diff --git a/news/nntp/files/patch-af b/news/nntp/files/patch-af
new file mode 100644
index 000000000000..9f3931371879
--- /dev/null
+++ b/news/nntp/files/patch-af
@@ -0,0 +1,22 @@
+--- xmit/nntpxmit.c.orig Sun Jan 9 10:36:02 2000
++++ xmit/nntpxmit.c Sun Jan 9 10:37:50 2000
+@@ -448,7 +448,7 @@
+ /* Hmph. The file didn't exist. */
+ error = sendcmd(".");
+ } else {
+- error = !sendfile(fp);
++ error = !my_sendfile(fp);
+ /* Leave this open in case we need to requeue it. */
+ }
+ if (error) {
+--- xmit/remote.c.orig Tue Jan 9 08:28:03 1996
++++ xmit/remote.c Sun Jan 9 10:37:03 2000
+@@ -403,7 +403,7 @@
+ ** with appropriate RFC822 filtering (e.g. CRLF line termination,
+ ** and dot escaping). Return FALSE if something went wrong.
+ */
+-sendfile(fp)
++my_sendfile(fp)
+ FILE *fp;
+ {
+ register int c;
diff --git a/news/nntp/files/patch-ag b/news/nntp/files/patch-ag
new file mode 100644
index 000000000000..e725316ad233
--- /dev/null
+++ b/news/nntp/files/patch-ag
@@ -0,0 +1,386 @@
+--- xfer/Makefile.orig Thu Nov 17 19:15:22 1994
++++ xfer/Makefile Sun Jan 9 10:21:54 2000
+@@ -28,7 +28,8 @@
+ nntpxfer.o: nntpxfer.c ../conf.h ../server/fakesyslog.h
+
+ install: nntpxfer
+- cp nntpxfer ${BINDIR}
++ cp nntpxfer ${BINDIR}/nntpxfer
++ chmod 755 ${BINDIR}/nntpxfer
+
+ clean:
+ -rm -f *.o nntpxfer make*.out *.BAK *.CKP *~
+--- Makefile.orig Tue Jan 9 08:30:24 1996
++++ Makefile Sun Jan 9 09:35:59 2000
+@@ -4,7 +4,7 @@
+ # The program that knows how to deal with makefiles. [Uncomment if needed.]
+ # MAKE=make
+ # set CFLAGS to be -Ipath/to/special/includes if needed
+-CFLAGS= -O
++CFLAGS= -O -I/usr/local/include
+ #Uncomment the following for Solaris (and similiar SVR4 systems)
+ #NETLIBS = -lsocket -lnsl
+ #Uncomment the following if the previous one does not work
+@@ -13,6 +13,7 @@
+ #DBLIBS = -ldbz
+ #DBLIBS = /usr/local/lib/dbz.o #/usr/local/lib/dbzdbm.o
+ #DBLIBS = -ldbm
++DBLIBS = /usr/local/lib/libcnews.a -lcrypt -lutil
+ # add the resolver library if needed
+ #RESLIB = -lresolv
+ # add the kmem library if needed
+@@ -21,9 +21,9 @@
+ #Uncomment the following for Solaris (and similiar SVR4 systems)
+ #KVMLIB = -lelf
+ # Where nntpd is going to live
+-ETCDIR = /etc
++ETCDIR = /usr/local/sbin
+ # Where nntpxmit and nntpxfer is going to live
+-BINDIR = /usr/local/bin
++BINDIR = /usr/local/news/cnewsbin
+ # Where manual pages live
+ MANDIR = /usr/local/man
+ #
+--- server/common.h.orig Thu Nov 17 19:15:18 1994
++++ server/common.h Sun Jan 9 09:30:03 2000
+@@ -161,7 +161,11 @@
+ void debugup(), debugdown();
+ #endif
+ #ifdef SETPROCTITLE
++#ifdef HAVE_PROCTITLE
++#include <libutil.h>
++#else
+ void setproctitle();
++#endif
+ #endif
+
+ extern char spooldir[];
+--- conf.h.orig Sun Jan 9 09:30:02 2000
++++ conf.h Sun Jan 9 10:02:19 2000
+@@ -8,10 +8,12 @@
+ */
+
+
+-#undef ALONE /* True if we're running without inetd */
++#define ALONE /* True if we're running without inetd */
+
+ #ifdef ALONE
+-#undef FASTFORK /* True if we don't want to read active file on start*/
++#define FASTFORK /* True if we don't want to read active file on start*/
++#define NEWS_GID 8
++#define NEWS_UID 8
+ #endif
+
+ #define LOAD 5 /* Loadav above which server refuses connections */
+@@ -40,23 +42,23 @@
+ #undef TLI /* Define this if you want to use TLI instead of */
+ /* sockets */
+
+-#define NDBM /* Use new-style (4.3) ndbm(3x) libraries */
++#undef NDBM /* Use new-style (4.3) ndbm(3x) libraries */
+
+ #undef DBM /* True if we want to use the old dbm(3x) libraries */
+ /* IF YOU DEFINE THIS, change CFLAGS in makefile to */
+ /* be -ldbm */
+
+-#undef DBZ /* True if we want to use dbz libraries */
++#define DBZ /* True if we want to use dbz libraries */
+ /* IF YOU DEFINE THIS, change CFLAGS in makefile to */
+ /* be /usr/lib/dbz.o and install dbz.h */
+
+ #undef USGHIST /* Use USG style history file (no DBM) */
+ /* IF YOU DO NOT DEFINE NDBM or DBM, this is DEFAULT!*/
+
+-#undef CNEWS /* define this if you are running C News */
+-#undef CNEWS_CLEARTEXT /* define this if you have a modern C News that handles
++#define CNEWS /* define this if you are running C News */
++#define CNEWS_CLEARTEXT /* define this if you have a modern C News that handles
+ input files ending in ".t" as cleartext */
+-#undef BATCHED_INPUT /* define if you want to support C News style
++#define BATCHED_INPUT /* define if you want to support C News style
+ batched input (not supported by B-NEWS) */
+ #undef MSGID /* define this if you want to run msgidd to keep
+ track of recent msgids via daemon */
+@@ -70,7 +72,7 @@
+ /* typedefs for u_long */
+ #define VOIDSIG /* Newfangled signal() returns void, old returns int */
+
+-#undef MMAP /* if your OS supports mmap() */
++#define MMAP /* if your OS supports mmap() */
+
+ #undef DIRENT /* If you have <dirent.h> define this */
+
+@@ -89,7 +91,8 @@
+ /*#define MINFILES MINFREE/4*/
+ /* NNTP will not allow an XFER if there is less */
+ /* than this many inodes on the SPOOLDIR filesystem */
+-#undef SETPROCTITLE /* if you want status visable via ps */
++#define SETPROCTITLE /* if you want status visable via ps */
++#define HAVE_PROCTITLE /* if the OS has setproctitle() */
+
+ #undef IHAVE_DEBUG /* Copious debugging output from ihave */
+
+@@ -110,7 +113,7 @@
+ * if you are running BNEWS. At least, not yet. :-)
+ */
+
+-/* #define UMASK 022 */
++#define UMASK 022
+
+ /*
+ * If you have the syslog library routine, define SYSLOG to
+@@ -177,13 +180,13 @@
+ #define XOVER /* xover -- Return .overview data */
+ #define OVER_XREFS /* overview files have xref data in them */
+ #define OVER_XREF_PREFIX /* the xref field (if present) includes xref: */
+-#define OVER_FMT_FILE "/usr/lib/news/overview.fmt"
++#define OVER_FMT_FILE "/usr/local/news/lib/overview.fmt"
+
+ /* Leave this undefined to indicate that overview files go in the spool
+ * directory. However, if you want a separate hierarchy of overview
+ * files, define it here.
+ */
+-/*#define OVERVIEW_DIR "/usr/spool/overviews" /* base directory */
++#define OVERVIEW_DIR "/var/news/over.view" /* base directory */
+
+ #define XROVER /* xrover -- Return reference overview data */
+
+@@ -191,10 +194,10 @@
+ * spool directory. However, if you want a separate hierarchy of rover
+ * files, define it here.
+ */
+-/*#define ROVER_DIR "/usr/spool/overviews" /* base directory */
++/*define ROVER_DIR "/var/news/r.over" /* base directory */
+
+ #undef XINDEX /* Optional support for tin's index files */
+-#define XINDEX_DIR "/usr/spool/news/.index"
++#define XINDEX_DIR "/var/news/.index"
+
+ /* XTHREAD defines: if XTHREAD is defined, THREAD_DIR controls where the
+ * thread files will be read from.
+@@ -244,27 +247,27 @@
+ /*
+ * This file is where access information is stored
+ */
+-#define ACCESS_FILE "/usr/lib/news/nntp_access"
++#define ACCESS_FILE "/usr/local/news/lib/nntp_access"
+
+ /*
+ * The file where the newgroup creation times are kept. If you don't
+ * have C News or INN, you can run acttimes (see the support directory)
+ * to maintain an active.times file.
+ */
+-#define ACTIVE_TIMES_FILE "/usr/lib/news/active.times"
++#define ACTIVE_TIMES_FILE "/usr/local/news/lib/active.times"
+
+ /*
+ * Some commonly used programs and files.
+ */
+
+-#define ACTIVE_FILE "/usr/lib/news/active"
+-#define DISTRIBUTIONS_FILE "/usr/lib/news/distributions"
+-#define SUBSCRIPTIONS_FILE "/usr/lib/news/subscriptions"
+-#define NEWSGROUPS_FILE "/usr/lib/news/newsgroups"
+-#define HISTORY_FILE "/usr/lib/news/history"
+-#define SPOOLDIR "/usr/spool/news"
+-#define INEWS "/usr/lib/news/inews"
+-#define RNEWS "/usr/bin/rnews" /* Link to inews? */
++#define ACTIVE_FILE "/usr/local/news/lib/active"
++#define DISTRIBUTIONS_FILE "/usr/local/news/lib/distributions"
++#define SUBSCRIPTIONS_FILE "/usr/local/news/lib/subscriptions"
++#define NEWSGROUPS_FILE "/usr/local/news/lib/newsgroups"
++#define HISTORY_FILE "/usr/local/news/lib/history"
++#define SPOOLDIR "/var/news"
++#define INEWS "/usr/local/news/lib/inews"
++#define RNEWS "/usr/local/bin/rnews" /* Link to inews? */
+
+ /*
+ * Support for C News style batching
+@@ -277,15 +280,15 @@
+ #else
+ #define TOOBIG 300000L /* batch > TOOBIG bytes, kick rnews */
+ #define TOOMANY 1024 /* batch > TOOMANY articles, kick rnews */
+-#define NEWSRUN "/usr/lib/newsbin/input/newsrun"
++#define NEWSRUN "/usr/local/news/cnewsbin/input/newsrun"
+ #endif
+ #define TOOOLD (5*60) /* batch > TOOOLD seconds old, kick rnews */
+ #define COPYSIZE 8192 /* bytes to copy at one time */
+ #define MAXDIGITS 25 /* lg(maxlongint) + epsilon */
+ #define MAXSTR 1024
+-#define INDIR "/usr/spool/news/in.coming"
++#define INDIR "/var/news/in.coming"
+ /* You may wish to delete the pathname from the front of BATCH_FILE */
+-#define BATCH_FILE "/usr/spool/news/in.coming/nntp.XXXXXX"
++#define BATCH_FILE "/var/news/in.coming/nntp.XXXXXX"
+
+ /************************************************************************/
+ /* We don't recommend that you make changes in anything after this line */
+--- doc/config.sh.orig Tue Nov 1 06:36:57 1994
++++ doc/config.sh Sun Jan 9 09:30:03 2000
+@@ -11,11 +11,11 @@
+ # (modify these lines to suit your system)
+ #
+ # the location of inetd on your system (usually /etc/inetd)
+-MINETD=/etc/inetd
++MINETD=/usr/sbin/inetd
+ # the location of the inetd configuration file (usually /etc/inetd.conf)
+ MINETDCONFIG=/etc/inetd.conf
+ # the location of nntpd following installation (usually /etc/nntpd)
+-MNNTPD=/etc/nntpd
++MNNTPD=/usr/local/sbin/nntpd
+ # the location of the hosts file (usually /etc/hosts)
+ MHOSTFILE=/etc/hosts
+ # the location of the services file (usually /etc/services)
+@@ -23,12 +23,12 @@
+ # the location of the networks file (usually /etc/networks)
+ MNETWORKFILE=/etc/networks
+ # The location of the news spool directory (usually /usr/spool/news)
+-MNEWSSPOOL=/usr/spool/news
++MNEWSSPOOL=/var/news
+ # The location of the news library directory (usually /usr/lib/news)
+-MNEWSLIB=/usr/lib/news
++MNEWSLIB=/usr/local/news/lib
+ # The location of the file containing the name of the nntp server machine
+ # (usually /usr/local/lib/rn/server)
+-MSERVERFILE=/usr/local/lib/rn/server
++MSERVERFILE=/usr/local/etc/nntpserver
+ # The location of rn's local library (usually /usr/local/lib/rn)
+ MRNLIB=/usr/local/lib/rn
+ #
+--- server/main.c.orig Thu Nov 17 19:15:19 1994
++++ server/main.c Sun Jan 9 09:30:03 2000
+@@ -35,8 +35,10 @@
+ #endif
+
+ #ifdef SETPROCTITLE
++#ifndef HAVE_PROCTITLE
+ char **Argv = NULL; /* pointer to argument vector */
+ char *LastArgv = NULL; /* end of argv */
++#endif
+ #endif /* SETPROCTITLE */
+
+ int
+@@ -81,6 +83,22 @@
+
+ #ifndef EXCELAN
+ sockt = get_socket(); /* should be fd 4 or 5 */
++ if ( getuid() == 0 ) { /* Running as root */
++
++ if (setgid((gid_t) NEWS_GID) == -1) {
++#ifdef SYSLOG
++ syslog(LOG_ERR, "setgid: %m");
++#endif
++ exit(1);
++ }
++
++ if (setuid((uid_t) NEWS_UID) == -1) {
++#ifdef SYSLOG
++ syslog(LOG_ERR, "setuid: %m");
++#endif
++ exit(1);
++ }
++ }
+ #ifdef USG
+ (void) signal(SIGCLD, SIG_IGN);
+ #else /* !USG */
+@@ -101,6 +119,7 @@
+ #endif /* EXCELAN */
+
+ #ifdef SETPROCTITLE
++#ifndef HAVE_PROCTITLE
+ /*
+ * Save start and extent of argv for setproctitle.
+ */
+@@ -113,6 +132,7 @@
+ envp++;
+ LastArgv = envp[-1] + strlen(envp[-1]);
+ #endif /*SDD*/
++#endif
+ #endif /* SETPROCTITLE */
+ #if defined(LOAD) && defined(SETPROCTITLE)
+ /* If LOAD and SETPROCTITLE, display load before first accept() */
+@@ -243,6 +263,7 @@
+ }
+ #endif /* LOAD */
+ #ifdef SETPROCTITLE
++#ifndef HAVE_PROCTITLE
+ /*
+ * Save start and extent of argv for setproctitle.
+ */
+@@ -255,6 +276,7 @@
+ envp++;
+ LastArgv = envp[-1] + strlen(envp[-1]);
+ #endif /*SDD*/
++#endif
+ #endif /* SETPROCTITLE */
+
+ #ifdef USG
+@@ -271,6 +293,7 @@
+ * stolen from sendmail
+ */
+ #ifdef SETPROCTITLE
++#ifndef HAVE_PROCTITLE
+ #if defined(sun) || defined(hpux)
+ /*VARARGS*/
+ void
+@@ -330,4 +353,5 @@
+ *p++ = ' ';
+ }
+ #endif /* hpux */
++#endif
+ #endif /* SETPROCTITLE */
+--- xfer/nntpxfer.c.orig Tue Jan 9 08:28:03 1996
++++ xfer/nntpxfer.c Sun Jan 9 09:30:03 2000
+@@ -60,6 +60,9 @@
+ #include <sys/time.h>
+ #endif
+
++#ifdef BSD_44
++#define _ANSI_SOURCE
++#endif
+ #include <stdio.h>
+ #include <errno.h>
+ #include <ctype.h>
+--- xmit/nntpxmit.c.orig Sat Dec 3 23:37:58 1994
++++ xmit/nntpxmit.c Sun Jan 9 10:13:10 2000
+@@ -64,6 +64,9 @@
+ */
+
+ #include "../conf.h"
++#ifdef BSD_44
++#define _ANSI_SOURCE
++#endif
+ #include <stdio.h>
+ #include <errno.h>
+ #include <ctype.h>
+--- xmit/nntpxmit.h.orig Thu Nov 3 04:51:34 1994
++++ xmit/nntpxmit.h Sun Jan 9 09:30:04 2000
+@@ -7,6 +7,7 @@
+ */
+
+ #ifdef MMAP
++#include <sys/types.h>
+ #include <sys/mman.h>
+ #include <sys/stat.h>
+ #endif
+--- xmit/shlock.c.orig Tue Nov 1 06:54:32 1994
++++ xmit/shlock.c Sun Jan 9 09:30:04 2000
+@@ -28,7 +28,6 @@
+ ** Erik E. Fair <fair@apple.com>, November 12, 1989
+ */
+
+-#include <stdio.h>
+ #include <sys/types.h>
+ #include <fcntl.h> /* Needed on hpux */
+ #include <sys/file.h>
+@@ -36,6 +35,10 @@
+ #ifdef NNTPSRC
+ #include "../conf.h"
+ #endif
++#ifdef BSD_44
++#define _ANSI_SOURCE
++#endif
++#include <stdio.h>
+
+ #define LOCK_SET 0
+ #define LOCK_FAIL 1
diff --git a/news/nntp/pkg-plist b/news/nntp/pkg-plist
index 714e2a61f1d7..7722f05752e4 100644
--- a/news/nntp/pkg-plist
+++ b/news/nntp/pkg-plist
@@ -1,5 +1,7 @@
sbin/nntpd
+news/cnewsbin/acttimes
news/cnewsbin/nntpxmit
news/cnewsbin/nntpxfer
@comment just in case anyone wants it
news/cnewsbin/shlock
+news/lib/overview.fmt