🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
22 messages
22 total messages Started by Julien ÉLIE Wed, 06 Jul 2011 21:06
Call for inncheck testing (INN 2.5.0 and above)
#84170
Author: Julien ÉLIE
Date: Wed, 06 Jul 2011 21:06
40 lines
2321 bytes
Hi all,

This message is intended to INN 2.5.0+ users.

Florian Schlichting has contributed with a new improved inncheck script 
which checks the syntax of:
  * incoming.conf
  * innfeed.conf
  * readers.conf
  * storage.conf

We need real-world testing so as to be aware of possible false positive 
warnings and fix them before shipping this new version with INN 2.5.3.

If you run INN 2.5.0 or later, could you please report issues with a run 
of inncheck on your system?

It only requires these four steps.  No need to install or update 
anything else.

1 - download
http://inn.eyrie.org/svn/trunk/scripts/inncheck.in

2 - change the second line of inncheck.in to match what is currently 
present in your installed inncheck script.  It is something like:
use lib '/usr/lib/perl'; use INN::Config;

3 - run, as the news user:
perl inncheck.in -pedantic

4 - have a look at the output, and please report any false positive 
warning you see.

Thanks beforehand,

-- 
Julien ÉLIE

« Le cercle est le plus long chemin d'un point au même point. »
   (Tom Stoppard, _Every Good Boy Deserves Favour_)
Re: Call for inncheck testing (INN 2.5.0 and above)
#84172
Author: D. Stussy
Date: Thu, 07 Jul 2011 06:17
86 lines
4688 bytes
"Julien ÉLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message
news:iv2io4$56g$1@news.trigofacile.com...
> Hi all,
>
> This message is intended to INN 2.5.0+ users.
>
> Florian Schlichting has contributed with a new improved inncheck script
> which checks the syntax of:
>   * incoming.conf
>   * innfeed.conf
>   * readers.conf
>   * storage.conf
>
> We need real-world testing so as to be aware of possible false positive
> warnings and fix them before shipping this new version with INN 2.5.3.
>
> If you run INN 2.5.0 or later, could you please report issues with a run
> of inncheck on your system?
>
> It only requires these four steps.  No need to install or update
> anything else.
>
> 1 - download
> http://inn.eyrie.org/svn/trunk/scripts/inncheck.in
>
> 2 - change the second line of inncheck.in to match what is currently
> present in your installed inncheck script.  It is something like:
> use lib '/usr/lib/perl'; use INN::Config;
>
> 3 - run, as the news user:
> perl inncheck.in -pedantic
>
> 4 - have a look at the output, and please report any false positive
> warning you see.
>
> Thanks beforehand,

1)  FAIL:  IPv6 address detection with PROPERLY capitalized hexidecimal.
  (I protested the RFC which recently changed this to "lowercase" digits
only.)
2)  Readers.conf:  require_ssl not recognized yet still in manual page as
valid.
3)  Readers.conf:  addinjectionpostinghost not recognized yet introduced in
INN 2.6.0.
4)  Expire.ctl:  Are we checking inn.conf "groupbaseexpiry" first?
  I define one line using each format (4-field and 5 field) so I don't have
to worry
about which setting I used in inn.conf since lines of the incorrect format
are ignored
notwithstanding the warning not to do this in the manual page.
5)  Innfeed.conf:  backlog-limit-highwater is OPTIONAL, not required, per
man page.

/var/lib/news/etc/expire.ctl:2: malformed line.
/var/lib/news/etc/expire.ctl:3: malformed line.
/var/lib/news/etc/innfeed.conf:25: not a valid IPv6 address / "any /
"none": '2001:470:D:4::1:4'
/var/lib/news/etc/innfeed.conf: required key backlog-limit-highwater not
defined in global scope.
/var/lib/news/etc/innfeed.conf: required key backlog-feed-first not defined
in global scope.
/var/lib/news/etc/innfeed.conf: required key initial-sleep not defined in
global scope.
/var/lib/news/etc/innfeed.conf: required key force-ipv4 not defined in
global scope.
/var/lib/news/etc/readers.conf:2: not a valid option name: require_ssl
/var/lib/news/etc/readers.conf:2: option true must be immediately followed
by a colon
/var/lib/news/etc/readers.conf:2: not a valid option name: true
/var/lib/news/etc/readers.conf:10: not a valid option name: require_ssl
/var/lib/news/etc/readers.conf:10: option true must be immediately followed
by a colon
/var/lib/news/etc/readers.conf:10: not a valid option name: true
/var/lib/news/etc/readers.conf:19: not a valid option name: require_ssl
/var/lib/news/etc/readers.conf:19: option true must be immediately followed
by a colon
/var/lib/news/etc/readers.conf:19: not a valid option name: true
/var/lib/news/etc/readers.conf:32: not a valid list of hostnames or
netblocks: '2001:470:D:4/64,2607:F350:1::/64'
/var/lib/news/etc/readers.conf:92: not a valid option name:
addinjectionpostinghost
/var/lib/news/etc/readers.conf:92: option false must be immediately
followed by a colon
/var/lib/news/etc/readers.conf:92: not a valid option name: false

Re: Call for inncheck testing (INN 2.5.0 and above)
#84173
Author: Dennis Davis
Date: Thu, 07 Jul 2011 09:04
26 lines
1641 bytes
In the referenced article, =?ISO-8859-1?Q?Julien_=C9LIE?= <iulius@nom-de-mon-site.com.invalid> writes:
>Hi all,
>
>This message is intended to INN 2.5.0+ users.
>
>Florian Schlichting has contributed with a new improved inncheck script 
>which checks the syntax of:
>  * incoming.conf
>  * innfeed.conf
>  * readers.conf
>  * storage.conf

...

>4 - have a look at the output, and please report any false positive 
>warning you see.

The script reports:

/opt/inn/etc/innfeed.conf: required key initial-sleep not defined in global scope.

Can't find "initial-sleep" in the sample innfeed.conf or described in
the manual page (INN 2.5.2).  Is this new for INN 2.5.3?
-- 
Dennis Davis, BUCS, University of Bath, Bath, BA2 7AY, UK
D.H.Davis@bath.ac.uk
Re: Call for inncheck testing (INN 2.5.0 and above)
#84174
Author: Julien ÉLIE
Date: Thu, 07 Jul 2011 11:28
37 lines
2264 bytes
Hi Dennis,

Thanks for having tested.
(Also thanks to Dieter — we are currently investigating your reported 
issues.)


> The script reports:
>
> /opt/inn/etc/innfeed.conf: required key initial-sleep not defined in global scope.

It is a false positive (not a required key; it is optional).


> Can't find "initial-sleep" in the sample innfeed.conf or described in
> the manual page (INN 2.5.2).  Is this new for INN 2.5.3?

It is an undocumented feature, already present in INN 2.5.2 (and the 2.4 
branch, and probably also before).

     http://www.eyrie.org/~eagle/software/inn/docs/news.html

Last point in the section about INN 2.5.3:

     In particular, the debug-shrinking, fast-exit and initial-sleep
     keys in innfeed.conf are now documented.


Here is the documentation:

     http://www.eyrie.org/~eagle/software/inn/docs/innfeed.conf.html

-- 
Julien ÉLIE

« Le cercle est le plus long chemin d'un point au même point. »
   (Tom Stoppard, _Every Good Boy Deserves Favour_)
Re: Call for inncheck testing (INN 2.5.0 and above)
#84176
Author: D. Stussy
Date: Thu, 07 Jul 2011 20:42
14 lines
1924 bytes
"Julien ÉLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message
news:97ljjbFgbbU1@mid.individual.net...
> Thanks for having tested.
> (Also thanks to Dieter — we are currently investigating your reported
> issues.)

For the IPv6 issue, the regex used has only lowercase alpha-hex digits.

50+ years of computer science history says that hexidecimal digits include
ONLY CAPITAL A-F.  In fact, early assemblers (1960's-1980's) would error
upon seeing a lowercase digit.  Except for the recent RFC (5782? maybe),
all prior examples of IPv6 had uppercase digits.

Re: Call for inncheck testing (INN 2.5.0 and above)
#84175
Author: Florian Schlichting
Date: Thu, 07 Jul 2011 20:49
59 lines
3345 bytes
Hi,

On 2011-07-07, D. Stussy wrote:
> 1)  FAIL:  IPv6 address detection with PROPERLY capitalized hexidecimal.
>   (I protested the RFC which recently changed this to "lowercase" digits
> only.)

I don't really have an opinion on this one. Since uppercase letters work
as well as lowercase ones, we could be permissive. Then again there is
the RFC, and who are we to know better? inncheck is really just
advisory, any admin could amend the regex or ignore that particular
warning. 

RFC 5952 section 4 / 4.3 says that all characters in an IPv6 address
MUST be textually represented in lowercase and advises that humans
should do so, too. At the same time, all implementations must be able to
accept both lowercase and uppercase.

> 2)  Readers.conf:  require_ssl not recognized yet still in manual page as
> valid.

that's a false positive (typo in inncheck)

> 3)  Readers.conf:  addinjectionpostinghost not recognized yet introduced in
> INN 2.6.0.

correct, needs to be added

> 4)  Expire.ctl:  Are we checking inn.conf "groupbaseexpiry" first?
>   I define one line using each format (4-field and 5 field) so I don't have
> to worry
> about which setting I used in inn.conf since lines of the incorrect format
> are ignored
> notwithstanding the warning not to do this in the manual page.

yes, the value of groupbaseexpiry is checked, so if you define both
formats, one of them will always be "wrong" according to inncheck

> 5)  Innfeed.conf:  backlog-limit-highwater is OPTIONAL, not required, per
> man page.

I'll have to look into which keys in innfeed.conf really need to be
required, and then the manpage could also be more clear about this, too.
Ideally, all options would have sensible defaults, such that a small
site can operate with an empty / all-lines-commented-out innfeed.conf.

> /var/lib/news/etc/readers.conf:10: not a valid option name: require_ssl
> /var/lib/news/etc/readers.conf:10: option true must be immediately followed
> by a colon
> /var/lib/news/etc/readers.conf:10: not a valid option name: true

BTW, do people think that the second and third line are ugly and
misleading? I just thought of a small fix that would suppress further
error messages until the parser is back in sync, at the danger of hiding
two consecutive errors until the first one gets fixed...

THANKS for testing!

Florian
Re: Call for inncheck testing (INN 2.5.0 and above)
#84177
Author: Jeffrey M. Vinocur
Date: Fri, 08 Jul 2011 03:34
20 lines
1876 bytes
In article <iv2io4$56g$1@news.trigofacile.com>,
Julien ÉLIE  <iulius@nom-de-mon-site.com.invalid> wrote:
>
>If you run INN 2.5.0 or later, could you please report issues with a run 
>of inncheck on your system?

I also have IPv6 addresses with capital letters in them.  Could
we at least make the warning message be specific for this
particular error?  I am not averse to changing it but would have
had no idea what the issue was without seeing the prior posts.

There is much output (I support the suggestion to quiet the
triplicate errors) about incoming.conf patterns: that span
multiple lines, within double quotes, whether or not I use
backslashes at the end of each continued line.


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Call for inncheck testing (INN 2.5.0 and above)
#84179
Author: D. Stussy
Date: Fri, 08 Jul 2011 18:45
89 lines
4899 bytes
"Florian Schlichting" <Florian.Schlichting@fu-berlin.de> wrote in message
news:97mkfkF9dgU1@mid.uni-berlin.de...
> Hi,
>
> On 2011-07-07, D. Stussy wrote:
> > 1)  FAIL:  IPv6 address detection with PROPERLY capitalized
hexidecimal.
> >   (I protested the RFC which recently changed this to "lowercase"
digits
> > only.)
>
> I don't really have an opinion on this one. Since uppercase letters work
> as well as lowercase ones, we could be permissive. Then again there is
> the RFC, and who are we to know better? inncheck is really just
> advisory, any admin could amend the regex or ignore that particular
> warning.
>
> RFC 5952 section 4 / 4.3 says that all characters in an IPv6 address
> MUST be textually represented in lowercase and advises that humans
> should do so, too. At the same time, all implementations must be able to
> accept both lowercase and uppercase.

...Which is the statement that defies the historical representation.  Prior
to this, all RFCs regarding IPv6 addresses used uppercase digits, and for
hexidecimal in general, uppercase only since the late 1950s.  (In some
cases, the ABNF for the earlier RFCs does have "[0-9A-Fa-f]", but all
examples were uppercase only.)

As [some] RFCs are technically proposed standards, I did file comments
opposing this.  I feel that this is one place where an RFC severely erred.

> > 2)  Readers.conf:  require_ssl not recognized yet still in manual page
as
> > valid.
>
> that's a false positive (typo in inncheck)
>
> > 3)  Readers.conf:  addinjectionpostinghost not recognized yet
introduced in
> > INN 2.6.0.
>
> correct, needs to be added
>
> > 4)  Expire.ctl:  Are we checking inn.conf "groupbaseexpiry" first?
> >   I define one line using each format (4-field and 5 field) so I don't
have
> > to worry
> > about which setting I used in inn.conf since lines of the incorrect
format
> > are ignored
> > notwithstanding the warning not to do this in the manual page.
>
> yes, the value of groupbaseexpiry is checked, so if you define both
> formats, one of them will always be "wrong" according to inncheck

Noted, but it did mark BOTH of them as wrong.  Technically, only one of the
two lines should be incorrect.  However, expire itself doesn't care and
ignores the incorrect lines.

> > 5)  Innfeed.conf:  backlog-limit-highwater is OPTIONAL, not required,
per
> > man page.
>
> I'll have to look into which keys in innfeed.conf really need to be
> required, and then the manpage could also be more clear about this, too.
> Ideally, all options would have sensible defaults, such that a small
> site can operate with an empty / all-lines-commented-out innfeed.conf.
>
> > /var/lib/news/etc/readers.conf:10: not a valid option name: require_ssl
> > /var/lib/news/etc/readers.conf:10: option true must be immediately
followed
> > by a colon
> > /var/lib/news/etc/readers.conf:10: not a valid option name: true
>
> BTW, do people think that the second and third line are ugly and
> misleading? I just thought of a small fix that would suppress further
> error messages until the parser is back in sync, at the danger of hiding
> two consecutive errors until the first one gets fixed...

That does appear a bit confusing.  Once an error is detected on a line, the
program should determine whether further errors will be meaningful.  With
"option name" errors, I suggest that the rest of the line remain unparsed
as we don't know what should be there.

> THANKS for testing!

You're welcome.

Re: Call for inncheck testing (INN 2.5.0 and above)
#84180
Author: Michael Grimm
Date: Fri, 08 Jul 2011 20:19
16 lines
1624 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> wrote:

> 4 - have a look at the output, and please report any false positive
> warning you see.

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.

Regards,
Michael
-- 
to let
Re: Call for inncheck testing (INN 2.5.0 and above)
#84182
Author: Florian Schlichting
Date: Sat, 09 Jul 2011 00:20
33 lines
2700 bytes
On 2011-07-08, Jeffrey M. Vinocur wrote:
> I also have IPv6 addresses with capital letters in them.  Could
> we at least make the warning message be specific for this
> particular error?  I am not averse to changing it but would have
> had no idea what the issue was without seeing the prior posts.

inncheck in SVN now accepts uppercase letters in IPv6 addresses; the RFC
actually says they must be accepted everywhere, it's just when
outputting those addresses lowercase letters should be used.

> There is much output (I support the suggestion to quiet the
> triplicate errors) about incoming.conf patterns: that span
> multiple lines, within double quotes, whether or not I use
> backslashes at the end of each continued line.

Julien also committed the patch to quieten triplicate errors.

Regarding patterns that span multiple lines: I decided not to support
strings spanning several lines, with or without backslashes, in
inncheck. The reason is that the different parsers deal with them in
different ways; it's next to impossible to support every quirk, and then
there are distant plans to standardize on a common config parser for all
of INN with yet a little different syntax, so I felt inncheck should
settle on the least common denominator ("if inncheck says it's correct,
it is correct, and it will be correct in the future").

Case in point: the future parser described in config-syntax says strings
can (only) be continued on multiple lines by means of a backslash; the
incoming.conf parser in innd/rc.c does not know about trailing
backslashes, but will happily continue over newlines and other
delimiters until a matching double-quote is found (or 32K exceeded).

Florian
Re: Call for inncheck testing (INN 2.5.0 and above)
#84185
Author: Julien ÉLIE
Date: Sat, 09 Jul 2011 19:28
31 lines
2297 bytes
Hi Michael,

>> 4 - have a look at the output, and please report any false positive
>> warning you see.
>
> 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.

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.

Of course, it would work with any number of files, and with other kind 
of files that inncheck recognize.

-- 
Julien ÉLIE

« Pour Rome, la direction importe peu, car tous les chemins y
   mènent. » (Astérix)
Re: Call for inncheck testing (INN 2.5.0 and above)
#84187
Author: Michael Grimm
Date: Sun, 10 Jul 2011 21:01
30 lines
2365 bytes
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.
>
> 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.
>
> Of course, it would work with any number of files, and with other kind
> of files that inncheck recognize.

Hmm, that might be usefull for those with "odd" configurations like
myself, but, the overwhelming majority wont't need it. That majority
will have a single innfeed.conf in ../etc, only.

Well, if it won't be a big deal to implement, do it. Else, omit it ;-)

Regards,
Michael
-- 
to let
Re: Call for inncheck testing (INN 2.5.0 and above)
#84195
Author: Julien ÉLIE
Date: Wed, 13 Jul 2011 07:55
15 lines
1752 bytes
Hi Dieter,

> 1)  FAIL:  IPv6 address detection with PROPERLY capitalized hexidecimal.
>    (I protested the RFC which recently changed this to "lowercase" digits
> only.)

I see that you reported an erratum on RFC 5952.  It will be rejected by 
the working group, according to the following discussion:
     http://www.ietf.org/mail-archive/web/ipv6/current/msg13134.html
     http://www.ietf.org/mail-archive/web/ipv6/current/msg13136.html

-- 
Julien ÉLIE

« Mens sana in corpore sano. » (Juvénal)
Re: Call for inncheck testing (INN 2.5.0 and above)
#84197
Author: Julien ÉLIE
Date: Wed, 13 Jul 2011 07:59
21 lines
2057 bytes
Hi Dieter,

>>> 4) Expire.ctl: Are we checking inn.conf "groupbaseexpiry" first?
>>> I define one line using each format (4-field and 5 field) so I
>>> don't have to worry about which setting I used in inn.conf since
>>> lines of the incorrect format are ignored notwithstanding the
>>> warning not to do this in the manual page.
>>
>> yes, the value of groupbaseexpiry is checked, so if you define both
>> formats, one of them will always be "wrong" according to inncheck
>
> Noted, but it did mark BOTH of them as wrong. Technically, only one
> of the two lines should be incorrect.

Is the problem still here with the latest version?
     http://inn.eyrie.org/svn/trunk/scripts/inncheck.in

-- 
Julien ÉLIE

« Mens sana in corpore sano. » (Juvénal)
Re: Call for inncheck testing (INN 2.5.0 and above)
#84199
Author: D. Stussy
Date: Wed, 13 Jul 2011 23:57
20 lines
2038 bytes
"Julien ÉLIE" <iulius@nom-de-mon-site.com.invalid> wrote in message
news:9851bcF4j3U1@mid.individual.net...
> > 1)  FAIL:  IPv6 address detection with PROPERLY capitalized
hexidecimal.
> >    (I protested the RFC which recently changed this to "lowercase"
digits
> > only.)
>
> I see that you reported an erratum on RFC 5952.  It will be rejected by
> the working group, according to the following discussion:
>      http://www.ietf.org/mail-archive/web/ipv6/current/msg13134.html
>      http://www.ietf.org/mail-archive/web/ipv6/current/msg13136.html


I am aware of that.  I have made them aware that I still oppose the
proposed change and that such should NOT become part of the Internet
standard.  The people who proposed this, in my professional opinion, are
incompetent.

Re: Call for inncheck testing (INN 2.5.0 and above)
#84200
Author: Jeffrey M. Vinocur
Date: Thu, 14 Jul 2011 01:24
22 lines
2063 bytes
In article <97pl66Fo8dU1@mid.uni-berlin.de>,
Florian Schlichting  <Florian.Schlichting@fu-berlin.de> wrote:
>
>Regarding patterns that span multiple lines: I decided not to support
>strings spanning several lines, with or without backslashes, in
>inncheck. The reason is that the different parsers deal with them in
>different ways; it's next to impossible to support every quirk, and then
>there are distant plans to standardize on a common config parser for all
>of INN with yet a little different syntax, so I felt inncheck should
>settle on the least common denominator ("if inncheck says it's correct,
>it is correct, and it will be correct in the future").

Fair enough.

How about revising the warning message for unmatched
double-quotes to note that inncheck may be producing a false
positive?


-- 
Jeffrey M. Vinocur
jeff@litech.org
Re: Call for inncheck testing (INN 2.5.0 and above)
#84201
Author: Julien ÉLIE
Date: Thu, 14 Jul 2011 09:38
16 lines
1995 bytes
Hi Dieter,

> I am aware of that.  I have made them aware that I still oppose the
> proposed change and that such should NOT become part of the Internet
> standard.

(off-topic)
I suggest you subscribe to the annoucements of the RFCs that are in Last 
Call state.  You could then read those you are interested in and make 
comments at appropriate time (before their release).

-- 
Julien ÉLIE

« Le sel de l'existence est essentiellement dans le poivre qu'on y
   met. » (Alphonse Allais)
Re: Call for inncheck testing (INN 2.5.0 and above)
#84240
Author: 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
Re: Call for inncheck testing (INN 2.5.0 and above)
#84239
Author: Florian Schlichting
Date: Mon, 08 Aug 2011 13:21
65 lines
3934 bytes
On 2011-07-14, Jeffrey M. Vinocur wrote:
> Florian Schlichting  <Florian.Schlichting@fu-berlin.de> wrote:
>>
>>Regarding patterns that span multiple lines: I decided not to support
>>strings spanning several lines, with or without backslashes, in
>>inncheck. The reason is that the different parsers deal with them in
>>different ways; it's next to impossible to support every quirk, and then
>>there are distant plans to standardize on a common config parser for all
>>of INN with yet a little different syntax, so I felt inncheck should
>>settle on the least common denominator ("if inncheck says it's correct,
>>it is correct, and it will be correct in the future").
>
> Fair enough.
>
> How about revising the warning message for unmatched
> double-quotes to note that inncheck may be producing a false
> positive?

I feel a bit at a loss on how to put this concisely but clearly.
Currently, inncheck complains like this:

/server/devel/server/etc/innfeed.conf:110: malformed line (runaway quote / empty pair of quotes?)

Would it be better (or way too verbose) to do it like this:

/server/devel/server/etc/innfeed.conf:110: possibly malformed line (runaway quote / empty pair of quotes? This might be ok for a value spanning multiple lines!)

Or should we rather leave the message as-is and put a note in the BUGS
section of the inncheck manpages?

Note that in cases where an option value spans more than two lines, i.e.
there is at least one line that doesn't even contain a single
double-quote, there will also be an error messages about an invalid option
name as well as one about a missing colon... So I think I tend to the
latter "solution" until INN one day transitions to the new config syntax
format:


--- a/doc/pod/inncheck.pod
+++ b/doc/pod/inncheck.pod
@@ -132,6 +132,11 @@ If the B<-f> and B<--perm> options are used together, along with B<-a> or
 some I<file> or I<file>B<=>I<path> arguments that refer to a file with
 a syntax problem, then the output will no longer be valid input for a shell.
 
+B<inncheck> currently does not correctly understand option values spanning
+multiple lines. If you get error messages about runaway quotes, you either have
+to ignore them and check the correctness of the relevant lines yourself, or
+merge the value into a single line.
+
 =head1 HISTORY
 
 Written by Brendan Kehoe <brendan@cygnus.com> and Rich Salz
--- a/scripts/inncheck.in
+++ b/scripts/inncheck.in
@@ -148,7 +148,7 @@ get_config_word
                     if (!@res);
 
                 if (!@res) {
-                    eprint "$file:$line: malformed line (runaway quote / empty pair of quotes?)\n";
+                    eprint "$file:$line: possibly malformed line (runaway quote / empty pair of quotes?)\n";
                     last;
                 }
 

Florian
Re: Call for inncheck testing (INN 2.5.0 and above)
#84256
Author: Julien ÉLIE
Date: Wed, 10 Aug 2011 19:09
20 lines
2242 bytes
Hi Florian,

> Would it be better (or way too verbose) to do it like this:
>
> /server/devel/server/etc/innfeed.conf:110: possibly malformed line (runaway quote / empty pair of quotes?)
>
> Or should we rather leave the message as-is and put a note in the BUGS
> section of the inncheck manpages?
[...]
> So I think I tend to the latter "solution" until INN one day
> transitions to the new config syntax format:

I believe we could take the two solutions.  One for they who are running 
inncheck and wonder what is going on; and one for they who are reading 
the documentation.  I like the "*possibly* malformed line" message.

-- 
Julien ÉLIE

« Sitis licita, etiam potio licita. »
Re: Call for inncheck testing (INN 2.5.0 and above)
#84257
Author: Julien ÉLIE
Date: Wed, 10 Aug 2011 19:17
28 lines
2359 bytes
Hi Florian,

> 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.

That's perfect!


> 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

I think that it is reasonable for people who have such configurations.
I hope it suits Michael's needs.

Thanks again, Florian.

-- 
Julien ÉLIE

« Sitis licita, etiam potio licita. »
Re: Call for inncheck testing (INN 2.5.0 and above)
#84259
Author: Michael Grimm
Date: Wed, 10 Aug 2011 20:10
38 lines
2747 bytes
Florian Schlichting <Florian.Schlichting@fu-berlin.de> wrote:
> 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

>>> 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

I can confirm that your patch is working perfectly well:

|news> ./inncheck.patched --pedantic -a innfeed.conf=
|news>

|news> ./inncheck.patched -pedantic -a innfeed.conf=/usr/local/news/etc/innfeed/innfeed-xy.conf
|news> /usr/local/news/etc/innfeed/innfeed-xy.conf:0: mode 644, should be between 400 and 660

Ups, fixed that ;-)

Thanks and with kind regards,
Michael
-- 
to let
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads