🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #83039

Re: Moving and adding cycbuff's (inn 2.5)

#83039
From: Julien ÉLIE
Date: Sat, 08 May 2010 11:12
104 lines
5295 bytes
Hi John,

> 1a. Using the following cycbuff.conf syntax:
>
> metacycbuff:slowtext:sltxt01,sltxt02,sltxt03,sltxt04,\
> sltxt05,sltxt06,sltxt07,sltxt08,sltxt09,sltxt10,sltxt11,\
> sltxt12,sltxt13,sltxt14,sltxt15,sltxt16,sltxt17,sltxt18,\
> sltxt19,sltxt20:SEQUENTIAL
>
> news@n102:~$ cnfsheadconf -c vyfst02
> Unknown config line "sltxt05,sltxt06,sltxt07,sltxt08,sltxt09,sltxt10,sltxt11,\" in 
> CycBuff Conffile /etc/news/cycbuff.conf ...
> Unknown config line "sltxt12,sltxt13,sltxt14,sltxt15,sltxt16,sltxt17,sltxt18,\" in 
> CycBuff Conffile /etc/news/cycbuff.conf ...
> Unknown config line "sltxt19,sltxt20:SEQUENTIAL" in CycBuff Conffile 
> /etc/news/cycbuff.conf ...
> Buffer vyfst02, len: 256.00 Mbytes, used: 224.00 Mbytes (87.5%)   0 cycles
>  Meta veryfast, order: 2, current: TRUE, blocksize: 4096
>  Newest: 2010-05-02 20:30:42,    0 days,  0:03:41 ago
>
> It appears the backslash line continuation is not allowed, but cycbuff.conf(8) 
> states: "Long lines can be continued on the next line by ending the line with a 
> backslash ("\")."
>
> 1b. I edited cycbuff.conf syntax to put all the cycbufs on one line:
> That seems to have fixed the "\" problem.
> So is there a bug, or is the documentation in error?

That's a bug in cnfsheadconf.  Now fixed.  Thanks!
The parser used by innd is not the same as the parser used by other
independent scripts like cnfsheadconf.


Index: cnfsheadconf.in
===================================================================
--- cnfsheadconf.in     (révision 9040)
+++ cnfsheadconf.in     (copie de travail)
@@ -116,8 +116,17 @@
     return 0 unless open (CONFFILE, $conffile);

     while(<CONFFILE>) {
-       $_ =~ s/^\s*(.*?)\s*$/$1/;
-       # \x23 below is #.  Emacs perl-mode gets confused by the "comment"
+        $_ =~ s/^\s*(.*?)\s*$/$1/;
+
+        # Read continuation lines.
+        while(/\\$/) {
+            chop;
+            chop($next = <CONFFILE>);
+            $next =~ s/^\s*(.*?)\s*$/$1/;
+            $_ .= $next;
+        }
+
+       # \x23 below is #.  Emacs perl-mode gets confused by the "comment".
        next if($_ =~ /^\s*$/ || $_ =~ /^\x23/);
        next if($_ =~ /^cycbuffupdate:/ || $_ =~ /^refreshinterval:/);




> Buffer sltxt10, len: 2048.00 Mbytes, used: 0.08 Mbytes ( 0.0%)   1 cycles
> Argument "000000000000000a" isn't numeric in printf at 
> /usr/lib/news/bin/cnfsheadconf line 287, <STOR> line 82.
>  Meta slowtext, order: 0, current: FALSE, blocksize: 4096
>  Newest: 2010-04-03 17:45:45,   29 days,  3:11:09 ago
>
> It appears it doesn't understand hex. Shall we wait a little and see what happens 
> when "16" (decimal) is used? ;-)

That won't change anything.  It would parse "16" as though it was a decimal
whereas in fact it would be 0x16 = 16+6 = 22.

Anyway, that's a bug.  Thanks for having spotted it!
Now fixed.

Patch here:
    http://inn.eyrie.org/trac/changeset/9055/trunk



Here is an example of use:

% ./cnfsheadconf -c AUTRE2 -w
 Buffer AUTRE2, len: 1536.00 Mbytes, used: 1534.37 Mbytes (99.9%)   0 cycles
  Meta AUTRE, order: 12, current: TRUE, blocksize: 512
  Newest: 2010-05-08 12:16:19,    0 days,  0:44:04 ago

Buffer [AUTRE2] => AUTRE2
Path [/home/news/spool/cycbuffs/autrecnfs2] => /home/news/spool/cycbuffs/autrecnfs2
Length [1610612736 (0000000060000000)] => 1610612736
Free [1608906240 (000000005fe5f600)] => 1608906240
Meta [AUTRE] => AUTRE
Order [12 (000000000000000c)] => 12
Currentbuff [TRUE] => TRUE


Just tested.  It works fine.
And Etian can also use it to move his cyclic buffers :)

-- 
Julien ÉLIE

« I don't worry about terrorism.  I was married for two years. » (Sam Kinison)
Technical Details
Message-ID: <hs3gva$641$1@news.trigofacile.com>
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.ams.giganews.com!nntp.giganews.com!weretis.net!feeder1.news.weretis.net!news.trigofacile.com!.POSTED.aaubervilliers-151-1-18-59.w83-114.abo.wanadoo.fr!not-for-mail
References: <9799e$4bddcc08$bda4895b$11751@news.anarqy.com> <hrko8d$bm1$1@news.trigofacile.com> <bbb46$4bdde672$bda4895b$19062@news.anarqy.com> <hrkp6e$crv$1@news.trigofacile.com> <hrkqpg$nlm$2@n102.xanadu-bbs.net> <hrkrno$fkn$1@news.trigofacile.com> <hrle54$tce$1@n102.xanadu-bbs.net>

Show Full Headers
Complete Article Headers
Message-ID: <hs3gva$641$1@news.trigofacile.com>
Subject: Re: Moving and adding cycbuff's (inn 2.5)
Date: Sat, 8 May 2010 13:12:45 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <9799e$4bddcc08$bda4895b$11751@news.anarqy.com> <hrko8d$bm1$1@news.trigofacile.com> <bbb46$4bdde672$bda4895b$19062@news.anarqy.com> <hrkp6e$crv$1@news.trigofacile.com> <hrkqpg$nlm$2@n102.xanadu-bbs.net> <hrkrno$fkn$1@news.trigofacile.com> <hrle54$tce$1@n102.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.ams.giganews.com!nntp.giganews.com!weretis.net!feeder1.news.weretis.net!news.trigofacile.com!.POSTED.aaubervilliers-151-1-18-59.w83-114.abo.wanadoo.fr!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 104
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
 reply-type=response
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 8 May 2010 11:12:42 +0000 (UTC)
Injection-Info: news.trigofacile.com;
 posting-host="aaubervilliers-151-1-18-59.w83-114.abo.wanadoo.fr:83.114.137.59";
 logging-data="6273"; mail-complaints-to="abuse@trigofacile.com"
In-Reply-To: <hrle54$tce$1@n102.xanadu-bbs.net>
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6002.18005
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6002.18005