🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #79677

Re: Some thoughts on times

#79677
From: John F. Morse
Date: Wed, 19 Nov 2008 02:37
189 lines
8022 bytes
Ray Banana wrote:
> Thus spake "John F. Morse" <xanadu.bbs@example.invalid>
>  
>   
>> I tried to work on your suggestions from the bottom up, since the
>> innreport command must have worked back in February of this year, but
>> now appears to be broken.
>> Now I cannot get innreport to run -- period. Actually, top shows it
>> running for a few seconds, but it does nothing except disappearing
>> from top, and I have to ^C to regain control on that BASH terminal. No
>> HTML file(s) are to be found.
>> I checked /etc/news/innreport.conf and it looks good to me. Also,
>> /etc/news/inn.conf has pathhttp: /var/log/news correctly. So I tried
>> the following:
>> news@news7:/usr/lib/news/bin$ innreport -f /etc/news
>> WARNING: can't make graphs as required.
>>         Install GD.pm or disable this option.
>> Can't find/load .pm : syntax error at (eval 3) line 1, at EOF
>> news@news7:/usr/lib/news/bin$ time innreport -f /etc/news -nog
>> Can't find/load .pm : syntax error at (eval 3) line 1, at EOF
>>     
>
> That's what I get, too, if I call innreport this way.
>
> Actually, innreport expects the full path *and* file name for it's
> config file after -f :
>
> /usr/lib/news/bin/innreport -f /etc/news/innreport.conf
>
> plus the names of the log files:
>
> /usr/lib/news/bin/innreport -f /etc/news/innreport.conf \
>                             /var/log/news/news.notice   \
>                             /var/log/news/news
>
> hth


Yes, Ray, it helps, and thanks. But it also opened a few other cans of 
worms.... ;-)

I had tried the full -f pathname with the file before posting the 
earlier message, but it still failed.

The following fails:

news@news7:/var/log/news$ sudo /usr/lib/news/bin/innreport -f 
/etc/news/innreport.conf

Now, adding the log files caused the innreport to be displayed in the 
terminal (I'm using ssh remotely).

news@news7:~$ /usr/lib/news/bin/innreport -f /etc/news/innreport.conf 
/var/log/news/news.notice /var/log/news/news

Daily Usenet report from Nov 18 00:00:04 to Nov 18 19:26:27

and so forth....

That is odd though because the man page shows the log files are optional:

innreport(8)

SYNOPSIS
       innreport -f innreport.conf [ -[no]options ] [ logfiles ]

However there still is no new html file in the /var/log/news directory, 
nor in /var/www/News/stats (which I manually created earlier today).

Then the /usr/lib/news/bin/innreport script disagrees, and has the 
logfile as mandatory:

Usage: innreport -f config_file [-[no]options] logfile [logfile2 [...]]

It seems innreport(8) needs updating. (This is on Sarge -- other distros 
may have a corrected innreport(8) man page.)

It is incorrect here: http://linux.die.net/man/8/innreport

So I searched to see if the html report file went elsewhere:

news@news7:~$ sudo updatedb
Password:
news@news7:~$ locate news-notice.2008.
/var/log/news/news-notice.2008.02.11-00.00.03.html
/var/log/news/news-notice.2008.02.12-00.00.03.html

Nothing new.

Then I added the -html option:

/usr/lib/news/bin/innreport -html -f /etc/news/innreport.conf \
                /var/log/news/news.notice \
                /var/log/news/news

Now I find the new HTML file in /var/log/news.

news@news7:/var/log/news$ sudo updatedb
news@news7:/var/log/news$ locate news-notice.2008.
/var/log/news/news-notice.2008.02.11-00.00.03.html
/var/log/news/news-notice.2008.02.12-00.00.03.html
/var/log/news/news-notice.2008.11.18-00.00.04.html

However, that is the incorrect syntax per the man page (-html option 
above is in wrong location). I tried it as shown and it also worked:

/usr/lib/news/bin/innreport -f /etc/news/innreport.conf \
                -html /var/log/news/news.notice \
                /var/log/news/news

The -html option shouldn't be required; it is the default:

news@news7:~$ innreport -h
Usage: innreport -f innreport.conf [-[no]options]
  where options are:
    -h (or -help)       this help page
    -v                  display the version number of INNreport
    -config             print INNreport configuration information
    -html               HTML output [default]
    -g                  want graphs [default]
    -graph              an alias for option -g

Additionally the /usr/lib/news/bin/innreport script contains these entries:

## Do you want to create a Web page. Pick DO or DONT.
my $HTML = "DO";

## Do you want the graphs (need $HTML too). Pick DO or DONT.
my $GRAPH = "DO";

## Directory for the Web pages (used only if the previous line is active)
my $HTML_dir = "$inn::pathhttp";

## Directory for the pictures (need HTML support) in the file space
my $IMG_dir = "$HTML_dir/pics";

## Directory for the pictures (need HTML support) in the Web space
## (can be relative or global)
my $IMG_pth = "pics";

## Do you want to archive HTML results (& pics) [ will add a date in each
## name ]. Pick DO or DONT.
my $ARCHIVE = "DO";

## index page will be called:
my $index = "index.html";

## How many report files to keep (0 = all) (need $ARCHIVE).
my $CYCLE = 0;

And so forth.

But then /etc/news/innreport.conf disagrees, showing html and graph as 
false (unwanted):

##########################################################
# Configuration file for innreport (3.*).
#
# Sample file for INN.
# Tested with INN 2.3, 2.1, 1.7.2 and 1.5.1.
#
# (c) 1997, 1998, 1999 by Fabien Tassin <fta@sofaraway.org>
# version 3.0.2
##########################################################

# Default parameters
section default {
        libpath         "/usr/lib/news";
        logpath         "/var/log/news";
        unknown         true;        # want unknown entries.
        max_unknown     50;          # max unknown entries to display.
        casesensitive   true;
        module          "innreport_inn";  # ${libpath}/${module}.pm
        unwanted_log    "unwanted.log";   # ${logpath}/${unwanted_log}
        text            true;
        html            false;
        graph           false;        # need 'html'


Now the question is: Can these discrepancies be corrected so they all 
agree and say the same thing?


-- 
John 

No Microsoft, Apple, AT&T, Intel, Novell, Trend Micro, nor Ford products were used in the preparation or transmission of this message.

The EULA sounds like it was written by a team of lawyers who want to tell me what I can't do. The GPL sounds like it was written by a human being, who wants me to know what I can do.
Technical Details
Message-ID: <gfvu51$bv4$1@optima7.xanadu-bbs.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.k-dsl.de!news.eternal-september.org!news.motzarella.org!motzarella.org!optima7.xanadu-bbs.net!not-for-mail
References: <gfpide$p3n$1@optima7.xanadu-bbs.net> <80od0flhog.fsf@banana.shacknet.nu> <gfpm2s$puk$1@optima7.xanadu-bbs.net> <gfpobr$j4s$1@news.trigofacile.com> <gfpus9$s41$1@optima7.xanadu-bbs.net> <gfq31v$4m1$1@news.trigofacile.com> <gfuv39$42i$1@optima7.xanadu-bbs.net> <80skpo524w.fsf@banana.shacknet.nu>

Show Full Headers
Complete Article Headers
Message-ID: <gfvu51$bv4$1@optima7.xanadu-bbs.net>
Subject: Re: Some thoughts on times
Date: Tue, 18 Nov 2008 20:37:16 -0600
From: "John F. Morse" <xanadu.bbs@example.invalid>
References: <gfpide$p3n$1@optima7.xanadu-bbs.net> <80od0flhog.fsf@banana.shacknet.nu> <gfpm2s$puk$1@optima7.xanadu-bbs.net> <gfpobr$j4s$1@news.trigofacile.com> <gfpus9$s41$1@optima7.xanadu-bbs.net> <gfq31v$4m1$1@news.trigofacile.com> <gfuv39$42i$1@optima7.xanadu-bbs.net> <80skpo524w.fsf@banana.shacknet.nu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!news.k-dsl.de!news.eternal-september.org!news.motzarella.org!motzarella.org!optima7.xanadu-bbs.net!not-for-mail
Newsgroups: news.software.nntp
Organization: Xanadu BBS
Lines: 189
Reply-To: dont.bother
NNTP-Posting-Host: wintergreen18.xanadu-bbs.net
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: optima7.xanadu-bbs.net 1227062241 12260 192.168.89.180 (19 Nov 2008
X-Complaints-To: newsmaster@xanadu-bbs.net
NNTP-Posting-Date: Wed, 19 Nov 2008 02:37:21 +0000 (UTC)
User-Agent: Thunderbird 1.5.0.14ubu (X11/20080925)
In-Reply-To: <80skpo524w.fsf@banana.shacknet.nu>