πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #84240

Re: Call for inncheck testing (INN 2.5.0 and above)

#84240
From: Florian Schlichting
Date: Mon, 08 Aug 2011 12:40
76 lines
3990 bytes
On 2011-07-10, Michael Grimm wrote:
> Julien Γ‰LIE <iulius@nom-de-mon-site.com.invalid> wrote:
>
>>> JFTR: | /usr/local/news/etc/innfeed.conf:0: file missing
>>>
>>> Ok, I don't have any innfeed.conf in ../etc at all. And, all my
>>> innfeed-xy.conf referenced in newsfeeds are checked perfectly well,
>>> good.

I'm sorry I lost track of this issue - thanks to Julien for reminding me!

>> It is an interesting remark.  Would it mean that a way to bypass the
>> check of certain files would be useful to have in inncheck?
>>
>> Suggestions: inncheck -a innfeed.conf= with an empty value, to specify
>> that no innfeed.conf check should be done.
>>
>>    inncheck -a innfeed.conf=innfeed-1.conf innfeed.conf=innfeed-2.conf
>>    to check the two files.

I agree that it might occasionally be useful to exclude certain files
from checking, and setting innfeed.conf= with an empty value is a
straight-forward way to do that. Due to the way inncheck computes which
files to check, it is less straight-forward to have it check two
different instances of the same configuration file in one invocation.

So with the following patch, I suggest to run:

    inncheck -a innfeed.conf=
    inncheck innfeed.conf=innfeed-1.conf
    inncheck innfeed.conf=innfeed-2.conf



[PATCH] inncheck: allow to skip the check for certain files

--- a/doc/pod/inncheck.pod
+++ b/doc/pod/inncheck.pod
@@ -23,6 +23,9 @@ causes only the F<incoming.conf> file to be checked.  Using
 C<incoming.conf=/tmp/incoming.conf> on the command line will cause
 B<inncheck> to only verify the F<incoming.conf> file, and it will perform
 the checks on the F</tmp/incoming.conf> file instead of the default one.
+Setting a file path to an empty value like C<incoming.conf=> will skip
+the check for that file (this only makes sense with B<-a>, or no files
+will be checked at all).
 
 Valid values for I<file> are:
 
@@ -118,9 +121,10 @@ F</var/tmp/newsfeeds.testing>, do:
     inncheck newsfeeds=/var/tmp/newsfeeds.testing
 
 To have B<inncheck> check all the files as it normally does, but to specify
-a different location for the F<newsfeeds> file, do:
+a different location for the F<newsfeeds> file and ommit checking of the
+F<innfeed.conf> file, do:
 
-    inncheck -a newsfeeds=/var/tmp/newsfeeds.testing
+    inncheck -a newsfeeds=/var/tmp/newsfeeds.testing innfeed.conf=
 
 =head1 BUGS
 
diff --git a/scripts/inncheck.in b/scripts/inncheck.in
index cc73e01..e8ee6b3 100644
--- a/scripts/inncheck.in
+++ b/scripts/inncheck.in
@@ -1230,6 +1230,7 @@ $pfx = $fix ? '# ' : '';
 
 action: foreach my $workfile ( @todo ) {
     $file = $paths{$workfile};
+    next action unless $file; # skip if set to empty value by user
     if ( ! -f $file ) {
        eprint "$file:0: file missing\n";
        next action;


Florian
Technical Details
Message-ID: <9aa3qbF9d2U1@mid.uni-berlin.de>
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.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!fu-berlin.de!uni-berlin.de!not-for-mail
References: <iv2io4$56g$1@news.trigofacile.com> <iv7ooo$v9$1@de-l.enfer-du-nord.net> <ivaa5g$198$1@news.trigofacile.com> <ivd3ui$jij$1@de-l.enfer-du-nord.net>

Show Full Headers
Complete Article Headers
Message-ID: <9aa3qbF9d2U1@mid.uni-berlin.de>
Subject: Re: Call for inncheck testing (INN 2.5.0 and above)
Date: Mon, 08 Aug 2011 12:40:43 +0000
From: Florian Schlichting <Florian.Schlichting@fu-berlin.de>
References: <iv2io4$56g$1@news.trigofacile.com> <iv7ooo$v9$1@de-l.enfer-du-nord.net> <ivaa5g$198$1@news.trigofacile.com> <ivd3ui$jij$1@de-l.enfer-du-nord.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.ams3.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!feeder.news-service.com!fu-berlin.de!uni-berlin.de!not-for-mail
Newsgroups: news.software.nntp
Organization: Freie Universitaet Berlin
Lines: 76
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
X-Trace: news.uni-berlin.de
 GzOLxHjqES5VZKIvk8Q2vAutnvYi+px6cvroHPUFjKabCUl2XtXbhj
User-Agent: slrn/pre1.0.0-18 (Linux)
X-Original-Bytes: 3647