Article View: news.software.nntp
Article #30678alternative overchan (traditional only, NOT for uniover)
From: fluffy
Date: Sat, 22 Aug 1998 00:00
Date: Sat, 22 Aug 1998 00:00
124 lines
4821 bytes
4821 bytes
I was trying to figure out what the heck is wrong with the INN 2.x
overchan, whether it was being given bad data by INN or mangling it at
input time.
INN is sending a good feed, it looks like it's definitely overchan
that's broken.
I fed 25,000 articles to my main test set-up with INN's overchan, and
got the usual NOV corruption and "line too long" errors when there were
long headers in the stream (choice examples can generally be found in
those lovely alt.fan.karl-malden.nose cascades, with their huge
references, xrefs and subjects).
I in turn fed those articles to a second test installation, which is
running the following program in overchan's place. No trouble, nice
clean NOV.
{ FWIW, futzing with buffer sizes hasn't helped much. I get fewer
errors and corrupted lines, but they still happen. Maybe it would be
happier getting its input with fgets() or something instead of QIO, at
least for an O feed. :/ }
Since the test program is functionally equivalent to overchan (if
you're not using unified overview, that is), I figured I might as well
post it. It seems to do a good job of keeping up.
Just like overchan, don't run more than one copy of this at once
because it doesn't waste time locking files. And of course, don't try
to run both this and an overchan! feed together.
I ran this for a couple months before converting it to INN, so there
shouldn't be much in the way of surprises.
-----cut here-----
#! /usr/bin/perl
###########################################################################
# novmake - populate the NOV database
# C+ News, Jun 1998
# adapted for INN Aug 1998
#
# Place this in your newsbin directory, give read and execute
# permission to your news account.
#
# Make a newsfeeds entry like this, changing the path to reflect your
# site:
#
# novmake:*:Tc,WO:/news/test/bin/novmake
#
# If you want to throw an S in there, give it a nice hefty value.
###########################################################################
## *** Change the following to be correct for your site. *** ##
require "/news/test/lib/innshellvars.pl";
require 5.004;
my $lastctl = 0;
my (@headers, @paths, $novname, $i, $j, @filename,
$path, $xrefpos, $xreffull);
($xrefpos, $xreffull) = GetXrefPos();
die("no Xref in overview.fmt, stopped") if (!$xrefpos);
die("can't change to NOV dir, stopped") unless chdir $inn::overviewdir;
$novname = $inn::overviewname;
if (!$novname) { $novname = ".overview" }
# Loop through the NOV stream.
while (<STDIN>) {
chomp;
@headers = split (/\t/, $_);
if ($xrefpos) {
@paths = split(/\s/, $headers[$xrefpos]);
for ($i=$xreffull; $i < scalar @paths; $i++) {
@filename = split(/[:.]/, $paths[$i]);
# build the path from the group name
# and make any missing directories
$path = ".";
for ($j=0; $j < ((scalar @filename) - 1); $j++) {
$path .= "\/$filename[$j]";
if (! -e $path){
mkdir($path, 509) if (! -e $path); # 509 = 0775 octal
}
}
# append the record to .overview
open NOVOUT, ">>$path/$novname";
print NOVOUT ($_,"\n");
#close NOVOUT;
}
}
}
# Find out which field (if any) in overview.fmt is Xref:
# and whether it's the "full" (with Xref: keyword) kind.
sub GetXrefPos {
my @fields;
my @xref = (0,1);
my $pos = 0;
open OVFMT,"$inn::newsetc/overview.fmt";
OVLINE: while(<OVFMT>) {
chomp;
if (/^(\s+)?#/) {
next OVLINE;
}
elsif (/^Xref:full$/) {
@xref = ($pos,2);
}
elsif (/^Xref:/) {
@xref = ($pos,1);
}
$pos++;
}
return @xref;
}
--
gx47 Ynci31K1H TniV OsPs5n94LX6N0 lY9qV1MbE8 jAvU03Wjw9 4cRjTWr0q3H4E
XG0VFy8O3A x6rt6skF31 8kG8g2qW2 KP97p7T7fCUr 14N74Xiuwy9cIHH lo5QWj P7D3y
Iw3v1PWc4 0s550KWNU N8i3M9ubO2Y 5Jgr6O7etdueS 2lpn3 BUEXU37c60Bu 94k369
359x2U 8Ud7ZlY wchXv cZK7u8N720PP6s oeaL2RnsA67hsv 7j2W80JaZQ0MqZ5
Technical Details
Message-ID:
<6rm89s$7jj$1@fluffy.meow.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <6rm89s$7jj$1@fluffy.meow.org> Subject: alternative overchan (traditional only, NOT for uniover) Date: Sat, 22 Aug 1998 00:00:00 +0000 From: fluffy@meow.org Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 383612889 X-Complaints-To: mom X-Trace: fluffy.meow.org 903783548 7796 127.0.0.1 (22 Aug 1998 10:59:08 GMT) Organization: zrbj NNTP-Posting-Date: 22 Aug 1998 10:59:08 GMT Newsgroups: news.software.nntp