This commit is contained in:
joey 1997-12-20 02:03:08 +00:00
parent 3e83d12c8e
commit 5219695068
10 changed files with 174 additions and 0 deletions

22
news/leafnode/Makefile Normal file
View File

@ -0,0 +1,22 @@
# OpenBSD makefile for: leafnode
# Version required: 1.0.2
# Date created: 19 Dec 1997
# Whom: joey
#
# $OpenBSD: Makefile,v 1.1.1.1 1997/12/20 02:03:08 joey Exp $
#
DISTNAME= leafnode-1.0.2
CATEGORIES= news
MASTER_SITES= ${MASTER_SITE_SUNSITE}
MASTER_SITE_SUBDIR= system/news/readers
EXTRACT_SUFX= .src.elf.tgz
MAINTAINER= joey@OpenBSD.ORG
MAN8= fetch.8 leafnode.8 texpire.8
post-install:
strip ${PREFIX}/sbin/fetch ${PREFIX}/sbin/leafnode ${PREFIX}/sbin/texpire
.include <bsd.port.mk>

1
news/leafnode/files/md5 Normal file
View File

@ -0,0 +1 @@
MD5 (leafnode-1.0.2.src.elf.tgz) = 525afc4a4b99962de82dbf9cc8148cf9

View File

@ -0,0 +1,12 @@
*** fetch.c.orig Fri Jul 4 10:32:32 1997
--- fetch.c Fri Jul 4 10:32:39 1997
***************
*** 14,20 ****
#include <ctype.h>
#include <dirent.h>
#include <fcntl.h>
- #include <malloc.h>
#include <netdb.h>
#include <netinet/in.h>
#include <pwd.h>
--- 14,19 ----

View File

@ -0,0 +1,33 @@
*** util.c.orig Fri Jul 4 10:29:40 1997
--- util.c Fri Jul 4 10:32:43 1997
***************
*** 16,22 ****
#include <ctype.h>
#include <errno.h>
#include <limits.h>
- #include <malloc.h>
#include <netdb.h>
#include <setjmp.h>
#include <signal.h>
--- 16,21 ----
***************
*** 485,491 ****
strcpy(s, libdir);
strcat(s, "/groupinfo");
- fd = open( s, O_RDONLY );
if ( stat( s, &st ) ) {
syslog( LOG_ERR, "can't stat %s: %m", s );
return;
--- 484,489 ----
***************
*** 494,499 ****
--- 492,499 ----
if ( (fd=open( s, O_RDONLY))<0 ||
(read( fd, stuff, st.st_size ) < st.st_size) ) {
syslog( LOG_ERR, "can't open/read %s: %m", s );
+ if (fd >= 0)
+ close( fd );
return;
} else {
close( fd );

View File

@ -0,0 +1,69 @@
*** Makefile.orig Tue May 27 09:50:36 1997
--- Makefile Fri Jul 4 10:50:49 1997
***************
*** 4,11 ****
DEBUG = -O2 -m486 -fno-strength-reduce -Wall -Wformat -Wstrict-prototypes -Wmissing-prototypes
CFLAGS = $(DEBUG)
LIBS =
! BINDIR = /usr/sbin
! MANDIR = /usr/man
VERSION = 1.0.2
#
# this is the directory where the news is stored.
--- 4,11 ----
DEBUG = -O2 -m486 -fno-strength-reduce -Wall -Wformat -Wstrict-prototypes -Wmissing-prototypes
CFLAGS = $(DEBUG)
LIBS =
! BINDIR = $(PREFIX)/sbin
! MANDIR = $(PREFIX)/man
VERSION = 1.0.2
#
# this is the directory where the news is stored.
***************
*** 13,19 ****
#
# this is the directory where the configuration and group information is
# kept. It should preferably not be on the same partition as spooldir
! LIBDIR = /usr/lib/leafnode
all: nntpd fetch texpire
--- 13,19 ----
#
# this is the directory where the configuration and group information is
# kept. It should preferably not be on the same partition as spooldir
! LIBDIR = $(PREFIX)/lib/leafnode
all: nntpd fetch texpire
***************
*** 41,54 ****
cp texpire $(BINDIR)
cp *.8 $(MANDIR)/man8
-mkdir -p $(SPOOLDIR) $(LIBDIR)
! -mkdir -p $(SPOOLDIR)/{message.id,interesting.groups,out.going}
@echo This is actually quite fast, for _small_ servers.
! mkdir -p /var/spool/news/message.id/{0,1,2,3,4,5,6,7,8,9}{0,12,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}
! cp config.example /usr/lib/leafnode/config
chown -R news.news $(LIBDIR) $(SPOOLDIR)
chmod 2750 $(SPOOLDIR)
! chmod 750 $(BINDIR)/{leafnode,fetch,texpire}
! chown news.news $(BINDIR)/{leafnode,fetch,texpire}
@echo edit /etc/inetd.conf to start $(BINDIR)/leafnode
dist:
--- 41,54 ----
cp texpire $(BINDIR)
cp *.8 $(MANDIR)/man8
-mkdir -p $(SPOOLDIR) $(LIBDIR)
! -csh -c 'mkdir -p $(SPOOLDIR)/{message.id,interesting.groups,out.going}'
@echo This is actually quite fast, for _small_ servers.
! csh -c 'mkdir -p /var/spool/news/message.id/{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}{0,1,2,3,4,5,6,7,8,9}'
! cp config.example $(LIBDIR)/config.example
chown -R news.news $(LIBDIR) $(SPOOLDIR)
chmod 2750 $(SPOOLDIR)
! csh -c 'chmod 750 $(BINDIR)/{leafnode,fetch,texpire}'
! csh -c 'chown news.news $(BINDIR)/{leafnode,fetch,texpire}'
@echo edit /etc/inetd.conf to start $(BINDIR)/leafnode
dist:

View File

@ -0,0 +1,11 @@
--- util.c.orig Tue Oct 29 20:26:36 1996
+++ util.c Fri Dec 19 16:52:20 1997
@@ -1331,7 +1331,7 @@
error, getcwd( s, 1024 ) );
strcpy( newfile, ".overview.XXXXXX" );
- if ( (wfd=open( mktemp(newfile), O_WRONLY|O_CREAT|O_EXCL, 0664 )) ) {
+ if ( (wfd=open( mkstemp(newfile), O_WRONLY|O_CREAT|O_EXCL, 0664 )) ) {
struct iovec oooh[UIO_MAXIOV];
int vi, vc, va;

View File

@ -0,0 +1,11 @@
--- fetch.c.orig Sun Oct 27 19:34:06 1996
+++ fetch.c Fri Dec 19 16:42:23 1997
@@ -645,7 +645,7 @@
struct newsgroup * g;
strcpy( newfile, ".supplement.XXXXX" );
- o = fopen( mktemp( newfile ), "w" );
+ o = fopen( mkstemp( newfile ), "w" );
sprintf( s, "%s/interesting.groups",
spooldir );

View File

@ -0,0 +1 @@
Leafnode is a USENET software package designed for small sites.

7
news/leafnode/pkg/DESCR Normal file
View File

@ -0,0 +1,7 @@
Leafnode v1.0.2 is a simple NNTP server designed for small sites.
It does NOT have NOV support.
It "learns" which newsgroups should be downloaded based on what's
accessed.
It expires based on threads rather than articles.

7
news/leafnode/pkg/PLIST Normal file
View File

@ -0,0 +1,7 @@
lib/leafnode/config.example
man/man8/fetch.8
man/man8/leafnode.8
man/man8/texpire.8
sbin/fetch
sbin/leafnode
sbin/texpire