leafnode 1.8.1; ob Pepin <bob@sendar.prophecy.lu>
This commit is contained in:
parent
79edf96f63
commit
5842ffe502
@ -1,21 +1,20 @@
|
||||
# OpenBSD makefile for: leafnode
|
||||
# Version required: 1.4-7
|
||||
# Date created: 19 Dec 1997
|
||||
# Whom: joey
|
||||
# Version required: 1.8.1
|
||||
# Date created: 13 Jan 1999
|
||||
# Whom: Bob Pepin
|
||||
#
|
||||
# $OpenBSD: Makefile,v 1.2 1998/07/25 06:16:10 marc Exp $
|
||||
# $OpenBSD: Makefile,v 1.3 1999/01/31 01:38:06 marc Exp $
|
||||
#
|
||||
|
||||
DISTNAME= leafnode-1.4-7
|
||||
PKGNAME= leafnode-1.4.7
|
||||
DISTNAME= leafnode-1.8.1
|
||||
CATEGORIES= news
|
||||
|
||||
MAINTAINER= marc@OpenBSD.ORG
|
||||
MAINTAINER= bob@prophecy.lu
|
||||
|
||||
MASTER_SITES= ${MASTER_SITE_SUNSITE}
|
||||
MASTER_SITE_SUBDIR= system/news/readers
|
||||
EXTRACT_SUFX= .src.elf.tar.gz
|
||||
|
||||
NO_PACKAGE= "won't install correctly"
|
||||
MASTER_SITE_SUBDIR= system/news/transport
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
update: install
|
||||
(cd $(WRKSRC) && make update)
|
||||
|
@ -1 +1 @@
|
||||
MD5 (leafnode-1.4-7.src.elf.tar.gz) = db921095821f58e644ac77bd88bfac87
|
||||
MD5 (leafnode-1.8.1.tar.gz) = 97d429c3d4ba49aef035a0a833bacd5c
|
||||
|
@ -1,114 +1,88 @@
|
||||
--- Makefile.orig Sun Mar 1 11:48:31 1998
|
||||
+++ Makefile Fri Jul 24 22:58:37 1998
|
||||
@@ -4,7 +4,7 @@
|
||||
DEBUG = $(RPM_OPT_FLAGS) -O2 -Wall -Wformat -Wstrict-prototypes -Wmissing-prototypes
|
||||
--- Makefile.orig Fri Jan 8 22:27:53 1999
|
||||
+++ Makefile Wed Jan 13 20:14:31 1999
|
||||
@@ -6,7 +6,7 @@
|
||||
CFLAGS = $(DEBUG)
|
||||
LIBS =
|
||||
-PREFIX_USR = /usr
|
||||
+PREFIX_USR = ${PREFIX}
|
||||
LIBS =
|
||||
# LIBS = -lnsl -lsocket # for Solaris 2.6
|
||||
-PREFIX_USR = /usr/local
|
||||
+PREFIX_USR = $(PREFIX)
|
||||
PREFIX_VAR = /var
|
||||
USRDIR = $(PREFIX_USR)/bin
|
||||
BINDIR = $(PREFIX_USR)/sbin
|
||||
MANDIR = $(PREFIX_USR)/man
|
||||
@@ -13,13 +13,18 @@
|
||||
# this is the directory where the news is stored.
|
||||
SPOOLDIR = $(PREFIX_VAR)/spool/news
|
||||
@@ -18,11 +18,13 @@
|
||||
#
|
||||
-# this is the directory where the configuration and group information is
|
||||
-# kept. It should preferably not be on the same partition as spooldir
|
||||
+# ETCDIR is where the program will look for configuration and
|
||||
+# group information, LIBDIR is where an example configuration
|
||||
+# file will be placed.
|
||||
+# They should preferably not be on the same partition as spooldir
|
||||
LIBDIR = $(PREFIX_USR)/lib/leafnode
|
||||
# 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
|
||||
+LIBDIR = $(PREFIX_USR)/lib/leafnode
|
||||
+ETCDIR = /etc/leafnode
|
||||
+
|
||||
#
|
||||
# This is the lock file for fetch. The normal locations for such lock
|
||||
# files are /var/run or /var/lock.
|
||||
-LOCKFILE = "/var/run/news/fetch.lck"
|
||||
+LOCKDIR = ${PREFIX_VAR}/run/news
|
||||
+LOCKFILE = ${LOCKDIR}/fetch.lck
|
||||
-LOCKFILE = "/var/lock/news/fetch.lck"
|
||||
+LOCKDIR = $(PREFIX_VAR)/run/news
|
||||
+LOCKFILE = $(LOCKDIR)/fetch.lck
|
||||
|
||||
all: nntpd fetch texpire checkgroups
|
||||
|
||||
@@ -43,7 +48,7 @@
|
||||
LIBFILES = nntputil.o configutil.o xoverutil.o activutil.o miscutil.o \
|
||||
artutil.o filterutil.o
|
||||
@@ -66,28 +68,24 @@
|
||||
|
||||
config.o: config.c Makefile
|
||||
$(CC) -c -DSPOOLDIR=\"$(SPOOLDIR)\" \
|
||||
- -DLIBDIR=\"$(LIBDIR)\" \
|
||||
+ -DLIBDIR=\"$(ETCDIR)\" \
|
||||
-DBINDIR=\"$(BINDIR)\" \
|
||||
-DLOCKFILE=\"$(LOCKFILE)\" \
|
||||
-DVERSION=\"$(VERSION)\" $<
|
||||
|
||||
@@ -53,23 +58,23 @@
|
||||
cp texpire $(BINDIR)/texpire
|
||||
cp checkgroups $(BINDIR)/checkgroups
|
||||
cp *.8 $(MANDIR)/man8
|
||||
- -mkdir -p /var/run/news
|
||||
- chown news.news /var/run/news
|
||||
+ -mkdir -p ${LOCKDIR}
|
||||
+ chown news.news ${LOCKDIR}
|
||||
chmod 750 $(BINDIR)/{leafnode,fetch,texpire,checkgroups}
|
||||
chown news.news $(BINDIR)/{leafnode,fetch,texpire,checkgroups}
|
||||
|
||||
install: nntpd fetch texpire checkgroups
|
||||
- cp nntpd $(BINDIR)/leafnode
|
||||
- cp fetch $(BINDIR)/fetch
|
||||
- cp texpire $(BINDIR)/texpire
|
||||
- cp checkgroups $(BINDIR)/checkgroups
|
||||
- cp newsq $(BINDIR)/newsq
|
||||
- cp texpire.cron $(BINDIR)/texpire.cron
|
||||
- install -d -o root -g root -m 755 $(MANDIR)/man1
|
||||
- install -d -o root -g root -m 755 $(MANDIR)/man8
|
||||
- install -d -o root -g bin -m 755 $(BINDIR)
|
||||
install -g news -m 750 -o news -s nntpd $(BINDIR)/leafnode
|
||||
install -g news -m 750 -o news -s fetch $(BINDIR)/fetch
|
||||
install -g news -m 750 -o news -s texpire $(BINDIR)/texpire
|
||||
install -g news -m 750 -o news -s checkgroups $(BINDIR)/checkgroups
|
||||
- install -g news -m 750 -o news -s newsq $(USRDIR)/newsq
|
||||
- cp *.8 $(MANDIR)/man8
|
||||
- cp newsq.1 $(MANDIR)/man1
|
||||
- -mkdir -p $(PREFIX_VAR)/run/news
|
||||
- chown news.news $(PREFIX_VAR)/run/news
|
||||
- cp *.1 $(MANDIR)/man1
|
||||
- -mkdir -p `dirname $(LOCKFILE)`
|
||||
- chown news.news `dirname $(LOCKFILE)`
|
||||
- -mkdir -p $(SPOOLDIR) $(LIBDIR)
|
||||
+ ${BSD_INSTALL_PROGRAM} nntpd $(BINDIR)/leafnode
|
||||
+ ${BSD_INSTALL_PROGRAM} fetch $(BINDIR)/fetch
|
||||
+ ${BSD_INSTALL_PROGRAM} texpire $(BINDIR)/texpire
|
||||
+ ${BSD_INSTALL_PROGRAM} checkgroups $(BINDIR)/checkgroups
|
||||
+ ${BSD_INSTALL_PROGRAM} newsq $(BINDIR)/newsq
|
||||
+ ${BSD_INSTALL_PROGRAM} texpire.cron $(BINDIR)/texpire.cron
|
||||
+ ${BSD_INSTALL_MAN} *.8 $(MANDIR)/man8
|
||||
+ ${BSD_INSTALL_MAN} newsq.1 $(MANDIR)/man1
|
||||
+ -mkdir -p $(LOCKDIR)
|
||||
+ chown news.news $(LOCKDIR)
|
||||
+ install -g news -m 750 -o news newsq $(USRDIR)/newsq
|
||||
+ $(BSD_INSTALL_MAN) *.8 $(MANDIR)/man8
|
||||
+ $(BSD_INSTALL_MAN) *.1 $(MANDIR)/man1
|
||||
+ install -d -g news -o news $(LOCKDIR)
|
||||
+ -mkdir -p $(SPOOLDIR) $(LIBDIR) $(ETCDIR)
|
||||
-mkdir -p $(SPOOLDIR)/{message.id,interesting.groups,out.going,failed.postings}
|
||||
-mkdir -p $(SPOOLDIR)/leaf.node
|
||||
-mkdir -p $(SPOOLDIR)/{message.id,interesting.groups,out.going}
|
||||
- -chown news.news $(SPOOLDIR) $(LIBDIR)
|
||||
+ -chown news.news $(SPOOLDIR)
|
||||
-chown news.news $(SPOOLDIR)/leaf.node
|
||||
-chown news.news $(SPOOLDIR)/{message.id,interesting.groups,out.going}
|
||||
cd $(SPOOLDIR)/message.id ; for a in 0 1 2 3 4 5 6 7 8 9 ; do \
|
||||
for b in 0 1 2 3 4 5 6 7 8 9 ; do \
|
||||
@@ -78,12 +83,20 @@
|
||||
@@ -101,10 +99,21 @@
|
||||
$${a}$${b}6 $${a}$${b}7 $${a}$${b}8 \
|
||||
$${a}$${b}9 ; \
|
||||
done ; done
|
||||
- cp config.example $(LIBDIR)/config
|
||||
- chown -R news.news $(LIBDIR) $(SPOOLDIR)
|
||||
- cp config.example $(LIBDIR)
|
||||
+ ${BSD_INSTALL_DATA} README INSTALL config.example $(LIBDIR)
|
||||
+ test -f $(ETCDIR)/config || \
|
||||
+ ${BSD_INSTALL_DATA} config.example $(ETCDIR)/config
|
||||
+ chown -R news.news $(ETCDIR) $(LIBDIR) $(SPOOLDIR)
|
||||
chmod 2750 $(SPOOLDIR)
|
||||
chmod 750 $(BINDIR)/{leafnode,fetch,texpire,checkgroups,newsq,texpire.cron}
|
||||
chown news.news $(BINDIR)/{leafnode,fetch,texpire,checkgroups,newsq,texpire.cron}
|
||||
- @echo edit /etc/inetd.conf to start $(BINDIR)/leafnode
|
||||
+ @echo ""
|
||||
chmod 2755 $(SPOOLDIR)
|
||||
- @echo Edit /etc/inetd.conf to start $(BINDIR)/leafnode and restart inetd
|
||||
- @echo If you update from a leafnode version \< 1.6, do a "make update"
|
||||
+ @echo "*** edit /etc/inetd.conf to start $(BINDIR)/leafnode"
|
||||
+
|
||||
+ @echo "*** Verify $(ETCDIR)/config -- a copy of which is saved"
|
||||
+ @echo "*** as $(LIBDIR)/config.example."
|
||||
+ @echo "*** See $(LIBDIR)/README" and
|
||||
+ @echo "*** $(LIBDIR)/INSTALL for more information"
|
||||
+ @echo "### You may need to add"
|
||||
+ @echo "### \"install -d -g news -o news /var/run/news\""
|
||||
+ @echo "### to /etc/rc.local"
|
||||
+ @echo "*** if you update from a leafnode version < 1.6, do a \"make update\""
|
||||
+ @echo ""
|
||||
|
||||
install-bin:
|
||||
cp linux.bin/nntpd $(BINDIR)/leafnode
|
||||
@@ -94,8 +107,8 @@
|
||||
cp texpire.cron $(BINDIR)/texpire.cron
|
||||
cp *.8 $(MANDIR)/man8
|
||||
cp newsq.1 $(MANDIR)/man1
|
||||
- -mkdir -p $(PREFIX_VAR)/run/news
|
||||
- chown news.news $(PREFIX_VAR)/run/news
|
||||
+ -mkdir -p $(LOCKDIR)
|
||||
+ chown news.news $(LOCKDIR)
|
||||
-mkdir -p $(SPOOLDIR) $(LIBDIR)
|
||||
-mkdir -p $(SPOOLDIR)/{message.id,interesting.groups,out.going,failed.postings}
|
||||
cd $(SPOOLDIR)/message.id ; for a in 0 1 2 3 4 5 6 7 8 9 ; do \
|
||||
uninstall:
|
||||
-rm $(BINDIR)/{fetch,checkgroups,texpire,leafnode}
|
||||
|
@ -1,24 +1,15 @@
|
||||
--- util.c.~1~ Sun Mar 1 09:50:07 1998
|
||||
+++ util.c Fri Jul 24 22:09:07 1998
|
||||
@@ -1172,7 +1172,7 @@
|
||||
supplement = ns;
|
||||
} else {
|
||||
syslog( LOG_ERR,
|
||||
- "impossibility 122", s );
|
||||
+ "impossibility 122" );
|
||||
exit( 2 );
|
||||
}
|
||||
} else {
|
||||
@@ -1686,7 +1686,7 @@
|
||||
--- xoverutil.c.orig Fri Jan 8 22:35:06 1999
|
||||
+++ xoverutil.c Fri Jan 8 22:07:13 1999
|
||||
@@ -528,7 +528,7 @@
|
||||
error, getcwd( s, 1024 ) );
|
||||
|
||||
strcpy( newfile, ".overview.XXXXXX" );
|
||||
- if ( (wfd=open( mktemp(newfile), O_WRONLY|O_CREAT|O_EXCL, 0664 )) ) {
|
||||
+ if ( (wfd=mkstemp(newfile)) != -1 ) {
|
||||
+ if ( (wfd=mkstemp(newfile)) != -1) {
|
||||
struct iovec oooh[UIO_MAXIOV];
|
||||
int vi, vc, va;
|
||||
|
||||
@@ -1739,8 +1739,7 @@
|
||||
@@ -581,8 +581,7 @@
|
||||
.overview file I think */
|
||||
}
|
||||
} else {
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- fetch.c.~1~ Sun Mar 1 09:32:00 1998
|
||||
+++ fetch.c Fri Jul 24 22:18:05 1998
|
||||
@@ -918,8 +918,8 @@
|
||||
--- fetch.c.orig Fri Jan 8 22:34:46 1999
|
||||
+++ fetch.c Fri Jan 8 22:08:02 1999
|
||||
@@ -1226,8 +1226,8 @@
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- checkgroups.c.~1~ Wed Jul 23 11:35:26 1997
|
||||
+++ checkgroups.c Fri Jul 24 22:20:15 1998
|
||||
@@ -72,7 +72,7 @@
|
||||
--- checkgroups.c.orig Fri Jan 8 22:33:30 1999
|
||||
+++ checkgroups.c Fri Jan 8 22:08:22 1999
|
||||
@@ -75,7 +75,7 @@
|
||||
}
|
||||
|
||||
setgid( pw->pw_gid );
|
||||
|
@ -1,15 +1,6 @@
|
||||
--- texpire.c.orig Wed Jul 23 11:35:26 1997
|
||||
+++ texpire.c Fri Jul 24 22:38:02 1998
|
||||
@@ -59,7 +59,7 @@
|
||||
FILE * f;
|
||||
char *l, *group, *stime, *end;
|
||||
unsigned long i;
|
||||
- struct expire_entry *ent, *prev = NULL;
|
||||
+ struct expire_entry *ent = NULL, *prev = NULL;
|
||||
|
||||
sprintf(s, "%s/expireinfo", libdir);
|
||||
if ((f = fopen(s, "r"))) {
|
||||
@@ -493,7 +493,7 @@
|
||||
--- texpire.c.orig Fri Jan 8 22:34:59 1999
|
||||
+++ texpire.c Fri Jan 8 22:09:34 1999
|
||||
@@ -371,7 +371,7 @@
|
||||
}
|
||||
|
||||
setgid( pw->pw_gid );
|
||||
|
24
news/leafnode/patches/patch-af
Normal file
24
news/leafnode/patches/patch-af
Normal file
@ -0,0 +1,24 @@
|
||||
--- update.sh.orig Sun Jan 10 15:34:36 1999
|
||||
+++ update.sh Sun Jan 10 15:31:45 1999
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!/bin/sh
|
||||
# This script updates leafnode installations < 1.6
|
||||
|
||||
if [ $# -ne 2 ]
|
||||
@@ -34,13 +34,13 @@
|
||||
echo Creating new file for main server ...
|
||||
server=`awk '{ if ($1 == "server") printf("%s\n", substr($0,index($0,"=")+1)); }' < ${LIBDIR}/config | tr -d ' '`
|
||||
cd ${SPOOLDIR}/interesting.groups
|
||||
- ls -c1 | xargs -i@@ grep @@\ ${LIBDIR}/groupinfo | \
|
||||
+ find * -exec grep {} ${LIBDIR}/groupinfo \; | \
|
||||
cut -d\ -f 1,4 > ${SPOOLDIR}/leaf.node/$server
|
||||
echo Converting groupinfo file ... your old groupinfo file will be in ${SPOOLDIR}/leaf.node/groupinfo.old
|
||||
awk '{ printf("%s %d %d 0", $1, $2, $3); for (i = 5; i <= NF; i++) printf(" %s", $i); printf("\n"); }' < ${LIBDIR}/groupinfo > ${SPOOLDIR}/leaf.node/groupinfo
|
||||
mv ${LIBDIR}/groupinfo ${SPOOLDIR}/leaf.node/groupinfo.old
|
||||
echo Move other files ...
|
||||
- find ${LIBDIR} -type f -not -name 'config*' -exec mv '{}' ${SPOOLDIR}/leaf.node/ \;
|
||||
+ find ${LIBDIR} -type f \! -name 'config*' -exec mv '{}' ${SPOOLDIR}/leaf.node/ \;
|
||||
chown news.news ${SPOOLDIR}/leaf.node/*
|
||||
chmod 664 ${SPOOLDIR}/leaf.node/*
|
||||
echo Done.
|
@ -1 +1 @@
|
||||
USENET software package designed for small sites
|
||||
Leafnode is a USENET software package designed for small sites.
|
||||
|
17
news/leafnode/pkg/DEINSTALL
Normal file
17
news/leafnode/pkg/DEINSTALL
Normal file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Post-deinstallation cleanup of leafnode
|
||||
|
||||
echo ""
|
||||
echo "** To completely deinstall the leafnode package you need to perform"
|
||||
echo "** these steps as root:"
|
||||
echo "**"
|
||||
echo "** rm -rf /etc/leafnode"
|
||||
echo "** rm -rf /var/spool/news"
|
||||
echo "**"
|
||||
echo "** Also, you should run the command \"vipw\" and remove the news"
|
||||
echo "** pseudo user. Be absolutly sure you want to completely remove"
|
||||
echo "** the package before issuing these commands."
|
||||
echo ""
|
||||
|
||||
exit 0
|
@ -1,6 +1,4 @@
|
||||
Leafnode is a simple NNTP server designed for small sites.
|
||||
|
||||
It "learns" which newsgroups should be downloaded based on what's
|
||||
accessed.
|
||||
|
||||
It expires based on threads rather than articles.
|
||||
|
@ -1,32 +1,16 @@
|
||||
@cwd /usr/local
|
||||
@name leafnode-1.4.7
|
||||
lib/leafnode/config.example
|
||||
@name leafnode-1.8.1
|
||||
bin/newsq
|
||||
lib/leafnode/README
|
||||
lib/leafnode/INSTALL
|
||||
lib/leafnode/config.example
|
||||
man/man1/newsq.1
|
||||
man/man8/fetch.8
|
||||
man/man8/checkgroups.8
|
||||
man/man8/fetch.8
|
||||
man/man8/leafnode.8
|
||||
man/man8/texpire.8
|
||||
sbin/leafnode
|
||||
sbin/fetch
|
||||
sbin/texpire
|
||||
sbin/checkgroups
|
||||
sbin/newsq
|
||||
sbin/texpire.cron
|
||||
@dirrm lib/leafnode
|
||||
@comment Lots of things to do by hand to install
|
||||
@exec echo ""
|
||||
@exec echo "*** edit /etc/inetd.conf to start %D/sbin/leafnode"
|
||||
@exec echo "*** Verify /etc/config -- a copy of which is saved"
|
||||
@exec echo "*** as %D/lib/leafnode/config.example. See"
|
||||
@exec echo "*** %D/lib/leafnode/README and"
|
||||
@exec echo "*** %D/lib/leafnode/INSTALL for more information"
|
||||
@exec echo ""
|
||||
@unexec echo ""
|
||||
@unexec echo "*** To completely remove this package you must issue the"
|
||||
@unexec echo "*** following commands as root. Be sure you want to do this."
|
||||
@unexec echo "*** rm -rf /etc/leafnode"
|
||||
@unexec echo "*** rm -rf /var/run/news"
|
||||
@unexec echo "*** rm -rf /var/spool/news"
|
||||
@unexec echo ""
|
||||
|
Loading…
Reference in New Issue
Block a user