Date: 19 Nov 1998 21:29:10 -0000 From: Tom Hukins <tom@eborcom.com> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: ports/8766: New port: leafnode+ Message-ID: <19981119212910.6819.qmail@eborcom.com>
next in thread | raw e-mail | index | archive | help
>Number: 8766 >Category: ports >Synopsis: New port: leafnode+ >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Nov 19 13:40:00 PST 1998 >Last-Modified: >Originator: Tom Hukins >Organization: eBORcOM >Release: FreeBSD 2.2.7-STABLE i386 >Environment: >Description: This is a new port of leafnode+, a multi-user offline news package for small sites. Leafnode+ contains several bug fixes and improvements to Leafnode, which is already in the ports distribution. >How-To-Repeat: >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # leafnode+ # leafnode+/Makefile # leafnode+/files # leafnode+/files/md5 # leafnode+/patches # leafnode+/patches/patch-aa # leafnode+/patches/patch-ab # leafnode+/pkg # leafnode+/pkg/DESCR # leafnode+/pkg/COMMENT # leafnode+/pkg/PLIST # leafnode+/pkg/PLIST.withdocs # echo c - leafnode+ mkdir -p leafnode+ > /dev/null 2>&1 echo x - leafnode+/Makefile sed 's/^X//' >leafnode+/Makefile << 'END-of-leafnode+/Makefile' X# New ports collection makefile for: leafnode+ X# Version required: 0.9.8a X# Date created: 19 November 1998 X# Whom: Tom Hukins <tom@eborcom.com> X# X# $Id$ X# X XDISTNAME= leafnode+-1.2 XCATEGORIES= news XMASTER_SITES= ftp://ftp.big.or.jp/pub/usr2/jam/leafnode/ X XMAINTAINER= tom@eborcom.com X XMAN8= checkgroups.8 fetch-news.8 leafnode.8 texpire.8 X Xpost-patch: X.for file in FAQ INSTALL README leafnode.8 X @${MV} ${WRKSRC}/${file} ${WRKSRC}/${file}.bak X @${SED} < ${WRKSRC}/${file}.bak > ${WRKSRC}/${file} s+!!PREFIX!!+${PREFIX}+g X.endfor X Xdo-install: X @${MV} ${WRKSRC}/fetch.8 ${WRKSRC}/fetch-news.8 X.for file in leafnode fetch-news texpire checkgroups leaftool X @${INSTALL_PROGRAM} ${WRKSRC}/${file} ${PREFIX}/sbin X.endfor X.for file in checkgroups.8 fetch-news.8 leafnode.8 texpire.8 X @${INSTALL_MAN} ${WRKSRC}/${file} ${PREFIX}/man/man8 X.endfor X.if !defined{NOPORTDOCS} X @${ECHO_MSG} "===> Copying documents to ${PREFIX}/share/doc/leafnode+" X @${MKDIR} ${PREFIX}/share/doc/leafnode+ X.for file in Changes FAQ INSTALL README config.example X @${INSTALL_DATA} ${WRKSRC}/${file} ${PREFIX}/share/doc/leafnode+ X.endfor XPLIST= ${PKGDIR}/PLIST.withdocs X.endif X X.include <bsd.port.mk> END-of-leafnode+/Makefile echo c - leafnode+/files mkdir -p leafnode+/files > /dev/null 2>&1 echo x - leafnode+/files/md5 sed 's/^X//' >leafnode+/files/md5 << 'END-of-leafnode+/files/md5' XMD5 (leafnode+-1.2.tar.gz) = 4b0800a50e40a91ce65295b4291f5e7d END-of-leafnode+/files/md5 echo c - leafnode+/patches mkdir -p leafnode+/patches > /dev/null 2>&1 echo x - leafnode+/patches/patch-aa sed 's/^X//' >leafnode+/patches/patch-aa << 'END-of-leafnode+/patches/patch-aa' X--- Makefile.orig Tue Nov 10 03:50:23 1998 X+++ Makefile Thu Nov 19 19:49:05 1998 X@@ -1,11 +1,8 @@ X # -*- makefile -*- X # $Orig-Id: Makefile,v 1.16 1997/07/20 00:28:31 agulbra Exp $ X-CC = gcc X DEBUG = -g -Wall -Wformat -Wstrict-prototypes -Wmissing-prototypes X-CFLAGS = $(DEBUG) X LIBS = X-BINDIR = /usr/local/sbin X-MANDIR = /usr/local/man X+BINDIR = $(PREFIX)/sbin X VERSION = 1.2 X # X # if you want to use Socks, use following X@@ -27,14 +24,14 @@ X # X # this is the directory where the configuration and group information is X # kept. It should preferably not be on the same partition as spooldir X-LIBDIR = /usr/lib/leafnode X+LIBDIR = $(PREFIX)/lib/leafnode X X-all: nntpd fetch texpire checkgroups leaftool X+all: leafnode fetch-news texpire checkgroups leaftool X X-nntpd: nntpd.o util.o config.o X+leafnode: nntpd.o util.o config.o X $(CC) -g -o $@ nntpd.o util.o config.o $(LIBS) X X-fetch: fetch.o util.o config.o X+fetch-news: fetch.o util.o config.o X $(CC) -o $@ fetch.o util.o config.o $(LIBS) X X texpire: texpire.o util.o config.o X@@ -90,7 +87,6 @@ X $${a}$${b}6 $${a}$${b}7 $${a}$${b}8 \ X $${a}$${b}9 ; \ X done ; done X- cp config.example $(LIBDIR) X chown -R news.news $(LIBDIR)/. $(SPOOLDIR)/. X chmod 2750 $(SPOOLDIR) X @echo edit /etc/inetd.conf to start $(BINDIR)/leafnode END-of-leafnode+/patches/patch-aa echo x - leafnode+/patches/patch-ab sed 's/^X//' >leafnode+/patches/patch-ab << 'END-of-leafnode+/patches/patch-ab' X--- Changes.orig Tue Nov 10 03:50:24 1998 X+++ Changes Thu Nov 19 20:58:17 1998 X@@ -45,14 +45,14 @@ X this option. X - Add "maxold", "maxlines" and "maxgroups" configuration X values to filter some hated news artcles. "maxold" X- specifies the maximum dates of articles fetch should X+ specifies the maximum dates of articles fetch-news should X fetch from the upstream server in each group. "maxlines" X- specifies the maximum number of lines of articles fetch X- should do so. "maxgroups" specifies the maximum number X- of cross-posted news groups of articles fetch should do X- so. See leafnode.8 also. X+ specifies the maximum number of lines of articles fetch-news X+ should get. "maxgroups" specifies the maximum number X+ of cross-posted news groups of articles fetch-news should X+ get. See leafnode.8 also. X - Change to use asynchronous transmission for looking for X- new articles in news groups. It makes fetch faster. X+ new articles in news groups. It makes fetch-news faster. X - Remove a chdirgroup call from getgroups(). I guess it X is a reason of saving an article to wrong news groups. X - Add preconnect and viahost ability to use SSH. X--- FAQ.orig Tue Nov 10 03:50:24 1998 X+++ FAQ Thu Nov 19 20:49:08 1998 X@@ -21,17 +21,17 @@ X 3. How do I configure Leafnode+? X X See the manual pages for information on how to configure Leafnode+. X-Also, see the sample configuration file, "config.example", in the X-Leafnode+ distribution. X+Also, see the sample configuration file, "config.example", in X+!!PREFIX!!/share/doc/leafnode+. X X X 4. How do I upgrade from Leafnode? X X Upgrading is easy - Leafnode+ can be used as a direct replacement for X Leafnode. However, Leafnode+ will write some additional files in the X-LIBDIR defined when compiling Leafnode+, usually /usr/lib/leafnode. X-Therefore, the UID under which Leafnode+ runs, usually root or news, X-needs write access to this directory. X+LIBDIR defined when compiling Leafnode+, !!PREFIX!!/lib/leafnode. X+Therefore, the UID under which Leafnode+ runs, usually news, needs write X+access to this directory. X X X 5. Can I use Leafnode+ with multiple news servers? X@@ -61,7 +61,7 @@ X Most news reader software uses the NEWGROUPS command to learn about X the creation of new groups. The Leafnode+ news server does not X support this command. To check if new groups are available, see the X-"groupinfo" file in your LIBDIR (usually /usr/lib/leafnode). X+"groupinfo" file in your LIBDIR (usually !!PREFIX!!/lib/leafnode). X X X X--- INSTALL.orig Tue Nov 10 03:50:24 1998 X+++ INSTALL Thu Nov 19 21:08:41 1998 X@@ -7,7 +7,8 @@ X X 3. make installall X X-5. Edit $(LIBDIR)/config so server points to your upstream news server X+5. Edit !!PREFIX!!/lib/leafnode/config so the server points to your X+ upstream news server X (generally, your IP provider's). Make sure $NNTPSERVER or X /etc/nntpserver points to your own host so clients will talk to X leafnode rather than try to go to the upstream server. X@@ -15,31 +16,31 @@ X 4. Set up a cron job (as user "news") to run texpire every night or X maybe every week. Here is my crontab line, which runs nightly: X X-0 4 * * * /usr/local/sbin/texpire X+0 4 * * * !!PREFIX!!/sbin/texpire X X I did "crontab -u news -e" as root to edit the crontab file, and X added this line. Substituting "1" for the third "*", thus: X X-0 4 * * 1 /usr/local/sbin/texpire X+0 4 * * 1 !!PREFIX!!/sbin/texpire X X tells cron to run texpire at 4am Monday morning. X X-5. Make sure fetch is run at the appropriate time. If you have a X+5. Make sure fetch-news is run at the appropriate time. If you have a X full-time link, run it out of cron (as "news" again), if not, run X it when your connection to the net is established. If it is run as X- root, it will change user to "news". I use PPP, and run fetch from X- /etc/ppp/ip-up. X+ root, it will change user to "news". X X-6. Edit /etc/inetd.conf so $(BINDIR)/leafnode is executed for incoming X- NNTP connections. HUP inetd. Here is my inetd.conf line: X+6. Edit /etc/inetd.conf so !!PREFIX!!/sbin/leafnode is executed for X+ incoming NNTP connections. HUP inetd. Here is my inetd.conf line: X X-nntp stream tcp nowait news /usr/local/sbin/leafnode X+nntp stream tcp nowait news !!PREFIX!!/sbin/leafnode X X This starts leafnode for all connections on the nntp port. X X-7. Run fetch, then read news using an NNTP client (with $NNTPSERVER or X- /etc/nntpserver pointing to your own host), then run fetch again. X- The second run of fetch should pick up all the groups you read. X+7. Run fetch-news, then read news using an NNTP client (with $NNTPSERVER X+ or /etc/nntpserver pointing to your own host), then run fetch-news X+ again. The second run of fetch-news should pick up all the groups you X+ read. X X Arnt Gulbrandsen <agulbra@troll.no> X Modified by Kazushi (Jam) Marukawa <jam@pobox.com> X--- README.orig Tue Nov 10 03:50:24 1998 X+++ README Thu Nov 19 21:07:08 1998 X@@ -8,7 +8,7 @@ X - Leafnode is the NNTP server. It talks to the normal news clients, X and stores readership data. X X- - Fetch is the NNTP news-gatherer. It looks at the readership data X+ - Fetch-news is the NNTP news-gatherer. It looks at the readership data X Leafnode stores, and selects what groups to pull news from. X X - Texpire is responsible for deleting old and uninteresting news. It X@@ -16,8 +16,8 @@ X X Only groups that someone has been reading in the past week are fetched X from the upstream NNTP server. When someone stops reading a group, X-fetch will stop reading that group a week later, and when someone X-starts reading a group, fetch will grab all the articles it can in X+fetch-news will stop reading that group a week later, and when someone X+starts reading a group, fetch-news will grab all the articles it can in X that group the next time it runs. X X Here are Leafnode's distinguishing features: X@@ -52,8 +52,8 @@ X information file, and any more long-lived supporting files that may be X added in the future. X X-The binaries directory, /usr/local/sbin by default, contains the three X-executable programs, texpire, fetch and leafnode. X+The binaries directory, !!PREFIX!!/sbin, contains the three X+executable programs, texpire, fetch-news and leafnode. X X X TIPS & TRICKS! X--- fetch.8.orig Tue Nov 10 03:50:24 1998 X+++ fetch.8 Thu Nov 19 21:01:21 1998 X@@ -10,10 +10,10 @@ X .\" X .\" hilit19 is stupid: " X .SH NAME X-fetch \- fetch news via NNTP X+fetch-news \- fetch news via NNTP X X .SH SYNOPSIS X-.B fetch [-v] [-x number] [-n] [-s [suck-file]] X+.B fetch-news [-v] [-x number] [-n] [-s [suck-file]] X X .SH DESCRIPTION X .B Leafnode X@@ -26,7 +26,7 @@ X is intended to self-repair after problems, and to require no X manual maintenance. X .PP X-.B Fetch X+.B Fetch-news X is the program which submits and retrieves new articles to or from the X upstream NNTP server. X X@@ -46,9 +46,9 @@ X .TP X .I -n X Write server's information file after fetching from each group, X-rather than updating it when fetch has finished with that server. X+rather than updating it when fetch-news has finished with that server. X It helps you if you are using unstable connection and get problems X-of sudden disconnection. But probably current fetch doesn't need X+of sudden disconnection. But probably current fetch-news doesn't need X this option because codes are changed to check sudden disconnection. X .TP X .I "-s [suck-file]" X@@ -58,11 +58,11 @@ X See X .BR leafnode (8) X for the list of files affected, and for information on configuring X-.B fetch. X+.B fetch-news. X X .SH ALGORITHM X Here is a brief description of what X-.B fetch X+.B fetch-news X does. X .PP X First, after connecting to the upstream NNTP server, X@@ -81,18 +81,18 @@ X (this step is most often optimized away). X .PP X Third, X-.B fetch X+.B fetch-news X iterates over the list of newsgroups, performing a GROUP, an XOVER X and a number of ARTICLE commands for each group which has X been read during the past week. X X .SH NOTES X-.B Fetch X+.B Fetch-news X does not use NEWNEWS or XHDR. NEWNEWS is not used because it is X often very expensive, XHDR is not used because its X implementation of some nntpds is slower than XOVER. X-.B Fetch X-use XOVER. XOVER is used because to get informations in the X+.B Fetch-news X+uses XOVER. XOVER is used because to get informations in the X article headers which are used to filter news articles. X .PP X After some experiments, I decided that it was better to fetch all the X@@ -102,27 +102,27 @@ X is not intended to be all things to all men, and I have sacrificed the X ability to read news from several upstream servers. X .PP X-.B Fetch X+.B Fetch-news X happens to support local groups, even though the rest of X .B leafnode X doesn't. X .PP X The only way to control what newsgroups are accessible to local users X is to control what the upstream server lets X-.B fetch X+.B fetch-news X read, and that will not keep out all crossposts (endemic in e.g. the X alt.sex groups). If your site is big enough that you need to control X newsgroup access, consider using a news server which is designed for a X big site. X .PP X-.B Fetch X+.B Fetch-news X sets its real and effective uid to "news", because almost all of the X problems I have had with X .B leafnode X are due to files which aren't writable for user news. X X .SH BUGS X-.B Fetch X+.B Fetch-news X ignores the "Also-Cancel" headers. This needs to be X fixed, or news.answers will suffer. X .PP X--- leafnode.8.orig Tue Nov 10 03:50:24 1998 X+++ leafnode.8 Thu Nov 19 20:56:15 1998 X@@ -74,18 +74,18 @@ X .I must X be writable by user "news". X .PP X-.I /usr/lib/leafnode/groupinfo X+.I !!PREFIX!!/lib/leafnode/groupinfo X contains the information about each USENET group. In case of harm, it X is rebuilt by X-.BR fetch (8). X+.BR fetch-news (8). X .PP X-.I /usr/lib/leafnode/news-server-name X+.I !!PREFIX!!/lib/leafnode/news-server-name X contains the information about each USENET group on each news server. X In case of harm, it X is rebuilt by X-.BR fetch (8). X+.BR fetch-news (8). X .PP X-.I /usr/lib/leafnode/config X+.I !!PREFIX!!/lib/leafnode/config X contains the configuration parameters for X .B leafnode. X See CONFIGURATION below. X@@ -106,12 +106,12 @@ X .PP X .I /var/spool/news/out.going X contains local postings that X-.BR fetch (8) X+.BR fetch-news (8) X is to pass to the upstream NNTP server. X .PP X .I /var/spool/news/failed.postings X contains local postings that the upstream server rejected. X-.BR fetch (8) X+.BR fetch-news (8) X will create files in this directory, but none of the X .B leafnode X programs will delete anything in it. X@@ -130,7 +130,7 @@ X will touch the the relevant file when a LISTGROUP, XOVER, XHDR, STAT, X HEAD, BODY or ARTICLE command is issued immediately after a GROUP X command is issued, and X-.BR fetch (8) X+.BR fetch-news (8) X will retrieve all new articles in all groups whose files have been X either X .IP X@@ -147,7 +147,7 @@ X X .SH CONFIGURATION X All configuration is done using the file X-.I /usr/lib/leafnode/config. X+.I !!PREFIX!!/lib/leafnode/config. X There is no GUI configuration tool yet. X .PP X The file is in the common UNIX format: One line per argument, white X@@ -197,31 +197,31 @@ X .in -5 X .PP X "server" is used by X-.BR fetch (8) X+.BR fetch-news (8) X to select what NNTP server to retrieve news from. You can X specify several servers. And you can add and decrease servers. X But at least one "server" is required. X .PP X "port" is used by X-.BR fetch (8) X+.BR fetch-news (8) X to choose a port number to connect to the NNTP server. X .PP X "username" and "password" are used by X-.BR fetch (8) X+.BR fetch-news (8) X to choose a user name and password to be authorized a X NNTP connection by the NNTP server. X .PP X "newsgroups" entries are used by X-.BR fetch (8) X+.BR fetch-news (8) X to choose news groups which are feeded by the NNTP server. X .PP X "viahost" is used by X-.BR fetch (8) X+.BR fetch-news (8) X to choose a host to connect to the NNTP server. It is useful X to use ssh forwading ability. X .PP X "preconnect" is executed by X-.BR fetch (8) X+.BR fetch-news (8) X before making a connection to the NNTP server. It is used X for using ssh forwading ability. Note: you shouldn't break X a line in the string. You have to write as same as what you X@@ -238,7 +238,7 @@ X This parameter is mandatory. X .PP X "maxfetch" specifies the maximum number of articles X-.BR fetch (8) X+.BR fetch-news (8) X should fetch from the upstream server in each group. This limits the X size of the backlog a reader of a group will see when first X subscribing. By default there is no limit, so a new reader will see X@@ -251,26 +251,26 @@ X initialfetch=3000 #again, don't use much space X .PP X "initialfetch" specifies the maximum number of articles X-.BR fetch (8) X+.BR fetch-news (8) X should fetch from the upstream server in each group at the first X connection to the server. By default there is no limit, so a X new reader will see all of the available postings. X .PP X "maxold" specifies the maximum dates of articles X-.BR fetch (8) X+.BR fetch-news (8) X should fetch from the upstream server in each group. X By default there is 10 days limit, so a new reader will X see only new postings. X .PP X "maxlines" specifies the maximum number of lines of articles X-.BR fetch (8) X+.BR fetch-news (8) X should fetch from the upstream server in each group. X By default there is no limit, so a new reader will X see all of the available postings. X .PP X "maxgroups" specifies the maximum number of cross-posted X news groups of articles X-.BR fetch (8) X+.BR fetch-news (8) X should fetch from the upstream server in each group. X By default there is no limit, so a new reader will X see all of the available postings. X@@ -302,7 +302,7 @@ X .TP X .B IHAVE X Known but rejected. See X-.BR fetch (8). X+.BR fetch-news (8). X .TP X .B LAST X Moves the article pointer back by 1. X@@ -331,7 +331,7 @@ X .B POST X Post a new article. Only scant syntax checking is performed. The X article is sent to the upstream NNTP server by X-.BR fetch (8). X+.BR fetch-news (8). X .TP X .B QUIT X Quit reading news. X@@ -376,7 +376,7 @@ X .SH SEE ALSO X .BR tcpd (8), X .BR hosts.allow (5), X-.BR fetch (8), X+.BR fetch-news (8), X .BR texpire (8), X .BR checkgroups (8), X .B "RFC 977" X--- texpire.8.orig Tue Nov 10 03:50:24 1998 X+++ texpire.8 Thu Nov 19 20:54:48 1998 X@@ -67,5 +67,5 @@ X .BR tcpd (8), X .BR hosts.allow (5), X .BR leafnode (8), X-.BR fetch (8), X+.BR fetch-news (8), X .B "RFC 977" END-of-leafnode+/patches/patch-ab echo c - leafnode+/pkg mkdir -p leafnode+/pkg > /dev/null 2>&1 echo x - leafnode+/pkg/DESCR sed 's/^X//' >leafnode+/pkg/DESCR << 'END-of-leafnode+/pkg/DESCR' XLeafnode+ is a simple NNTP server designed for small sites, derived from Xthe Leafnode package. X XLeafnode+ only downloads those newsgroups which have been recently Xaccessed by users, reducing the amount of bandwidth required Xconsiderably. X XLeafnode+ contains several enhancements from the original Leafnode. X XFor more information, see http://www.io.com/~kazushi/freeware/leafnode+.html END-of-leafnode+/pkg/DESCR echo x - leafnode+/pkg/COMMENT sed 's/^X//' >leafnode+/pkg/COMMENT << 'END-of-leafnode+/pkg/COMMENT' XLeafnode+ is a multi-user offline news package for small sites. END-of-leafnode+/pkg/COMMENT echo x - leafnode+/pkg/PLIST sed 's/^X//' >leafnode+/pkg/PLIST << 'END-of-leafnode+/pkg/PLIST' Xsbin/leafnode Xsbin/fetch-news Xsbin/texpire Xsbin/checkgroups Xsbin/leaftool END-of-leafnode+/pkg/PLIST echo x - leafnode+/pkg/PLIST.withdocs sed 's/^X//' >leafnode+/pkg/PLIST.withdocs << 'END-of-leafnode+/pkg/PLIST.withdocs' Xsbin/leafnode Xsbin/fetch-news Xsbin/texpire Xsbin/checkgroups Xsbin/leaftool Xshare/doc/leafnode+/Changes Xshare/doc/leafnode+/FAQ Xshare/doc/leafnode+/INSTALL Xshare/doc/leafnode+/README Xshare/doc/leafnode+/config.example X@dirrm share/doc/leafnode+ END-of-leafnode+/pkg/PLIST.withdocs exit >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19981119212910.6819.qmail>