From: crash@ckctpa.UUCP (Frank "Crash" Edwards)
Subject: Re: Cnews?  Help!
Date: Sun, 27 Sep 1992 01:29:41 GMT
Reply-To: crash%ckctpa@tct.com (Frank "Crash" Edwards)
Organization: Edwards & Edwards Consulting

bobl@bobsbox.rent.com (Bob Lindabury - SysAdmin) writes:
>Well, I've setup CNews on my system and I seem to be in hell!

I take full credit (and full blame) for things that don't work in my
port of CNews for AmigaDOS.  Before I start answering some of the
questions that were posted, I'd like to point out that further
changes/enhancements have pretty much come to a standstill since I've
gotten Amiga Unix 2.1 up and running.  I just very rarely use AmigaDOS
anymore (I'm a Unix freak -- what can I say? :-)

>I have setup in.coming and out.going directories in NewsArts: (UUNEWS:)
>and have also setup directories for each site that receives batches
>inside of the out.going directory.

Good.

>RNews seems to run fine after news is transfered into my system. It then
>produces *.z files in the in.coming directory which are processed fine
>by the unbatch.e script.  However, this script doesn't seem to work with
>uncompressed items.  The *.z files are uncompressed and then posted to
>the appropriate directories, the sys file is read and appropriate togo
>files are created in the newsarts:out.going/[system] directories.

Yes.  I presume you got the Fred Fish distribution which had incorrect
filenames in the UnBatch.#? script(s).  Unshar the one below and see
if it is the same as what you're using -- it's the latest one I've
got.  (I've heard of people finding bugs in the scripts, telling me
that they've fixed them, and then I never receive a copy.  How am I
supposed to distribute fixed versions [for bugs I haven't seen] when I
don't get a copy.  I've stopped trying.)

>However, relaynews doesn't seem to update the .next files in the
>NewsArts: (UUNEWS:) directories.  Is this the way it is suppose to work?
>GRn doesn't recognize the new articles because the .next files are not
>updated.  How can I fix this?

Yes.

I don't know what GRn expects to see in the .next file, so I can't
tell you what to fix.  Perhaps the author of GRn would consider using
the files provided with the stock (Unix) CNews as an option?  [The
"active" file keeps track of new articles; and "history" contains
information on what has been expired and what hasn't.]

Otherwise, find out what the .next files should have and execute
another script after you do UNBATCHing which fixes those files.

>Also, anything posted locally doesn't get posted.  It gets queued into
>NewsArts:incoming as an uncompressed article and unbatch doesn't
>recognize it.  How can I get articles posted to queue out?

You point out after this that the batching scripts fail.  The blame
here is 100% mine as I did not fully test these.  I had two (count'em
-- TWO) beta testers, one who supplied the ARexx scripts you mention.
Unfortunately the other individual didn't have the batching problem --
he was a leaf site.  (Perhaps this will encourage people to become
beta testers -- the software won't improve without someone to run it
and point out problems.)

I have seen postings from people claiming they've fixed the batching
scripts (quite a few people said my 2.04 scripts wouldn't run on their
1.3 systems -- sorry).  Of course, *I've* never gotten a copy of
these, nor even any word that they're available for anon ftp.  So I'm
afraid I can't send you replacements.

Concerning the manually created batch_#?.z files:  yes, you must
provide the transport interface.  CNews _is not_ a transport, it's a
message handling package.  UUCP is a transport agent.  I would suggest
either adding a line to DoBatch.e to queue up the transfers at the end
of the batching or run a separate program to do it after DoBatch
finishes.

>PLEASE.  Any help would be appreciated as I feed quite a few other sites
>and normal AmigaUUCP 1.16 just is a bit too slow and incomplete to do
>the forwarding I need to do.  Thanks in advance.

At the time I ported CNews, there were _no_ news facilities for
Amigas.  I ran it on a dual floppy 1MB A500 for almost a year
(development being on that same machine).  It is much faster, but it
has the Unix method of doing things.  This sometimes makes it
difficult to understand why a process is implemented the way it is and
usually it's a "big system" approach that would have been hard to
convert or just not worth the trouble.  Take INEWS for example.  On
Unix machines, INEWS is the front-end for user programs to post an
article (Pnews calls INEWS).  It's one _huge_ shell script.  It wasn't
worth my time to port it, so I included the ability to post directly
into my news reader.  That makes it tougher to change the method, but
it very much simplified the overall scheme.

>Oh..please email me with any information.

Alright; I'm emailing a copy of this as well.

>---------- UULIB:CONFIG (partial)
>Unbatch      Newsbin:unbatch.e
>CUnbatch     Newsbin:unbatch.e
>RNews        NewsBin:rnews
>
>This allows for CNews's RNews to be called instead of AmigaUUCP's.  I
>threw in the unbatch and cunbatch for the hell of it..is it needed?

I don't believe so, but I've never used Dillon's UUCP; I had a hacked
version of UUPC with lots of other features I wanted at the time.

>Then my CNews sys file...my site is bobsbox..my feed site is rutgers:
>
>---------- SYS

The SYS file looks okay.

>These are the Dobatch.e and Dobatch.e2 files that came with Cnews..
>
>---------- DOBATCH.E
    .
    .
    .
>Well, the above didn't work at all so I changed it to:

>----------
>path add NewsBin:batch
>
>list newsarts:out.going/#? lformat "DoBatch.e2 %s" to T:List[$$]
>sort T:List[$$] to T:Exec[$$]
>Execute T:Exec[$$]
>
>Delete quiet T:List[$$] T:Exec[$$]
>
>echo "Now queue up the files in NewsArts:Out.Going/* that end in `.Z'"
>echo "Ex. `search from newsarts:out.going file #?.Z all'"
>echo "(see your transport medium documentation for details)"
>echo ""
>echo "Following is a list of files that failed to batch properly:"
>search from newsarts:out.going file togo.failed all
>echo "End of List."
>----------
>
>The above seems to work.  I get a T:List[] file and then a sorted
>T:Exec[] file which then gets executed.

That's correct.

>The following batching script fails miserably.  I had to change the
>"batcher" command line to remove the -p (prefix) option as I kept
>getting some sort of error about prefix specified twice.  Also, if there
>isn't any "togo" file in the system's directory, the script seems to
>just quit when it should return back and try to process the next
>system's togo file. Here's the Dobatch.e2 script...

Hmmm; does it do that under 2.0 or 1.3?  I don't recall having a
problem with DoBatch.e2 causing DoBatch.e to quit prematurely.  But
again, I think I must've munged DoBatch.e and DoBatch.e2 while trying
to create diffs using RCS.  That's the only reason I can think of why
both scripts should be as back-dated as they were.

>---------- DOBATCH.E2
>.key SYS
>.bra [
>.ket ]
>
>cd NewsArts:Out.Going/[SYS]
>if not exists togo
>        quit 5
>endif
>
>if exists T:Batch.[SYS]
>        echo "Batcher already running for [SYS]"
>        quit 5
>endif
>
>date >T:Batch.[SYS]

That little bit of locking against multiple processes running really
isn't enough, but if you want to try to code it in SHELL language,
please send me a copy when you have it working.

>delete quiet togo.last
>rename togo togo.last   ; move `togo' in case relaynews creates more...
>
>echo "News batched for `[SYS]' is in NewsArts:Out.Going/[SYS]/batch_#?.Z"
>batcher -s 100000 -f togo.last ; -S [SYS]; (system name for batchparms)
>if val $RC eq 0
>        list batch_#? lformat "acomp %s" to temp
>        sort temp exec.compress
>        execute exec.compress
>        delete exec.compress temp quiet
>else
>        echo "Hmmm.  Something in `batcher' didn't work!"
>        date >>togo.failed
>        join togo.last to togo.failed
>        rm togo.last
>fi
>
>----------
>
>Ok..fi..what the heck is fi??  If val $RC eq 0????  Is this value of

Oops.  Unix-ism.  And 2.0-ism.  Combined. :-(  This is the third of the
three (known) problems in the batching scripts.

>return code?  When the script gets here it creates uncompressed batches
>and then tells me it can't batch from togo.last..ARGH!  So, nothing gets
>compressed.  I did the code in the if statement manually and it creates
>the compressed batch file ok but then how does it get queued to go out??

Read the comments inside the ECHO statements at the end of DoBatch.e
and see my comments above.

>The following is a sample togo file:
>
>---------- togo
>NewsArts:comp/ai/philosophy/243 1354
>NewsArts:alt/cyberpunk/3554 834
>NewsArts:alt/cyberpunk/3555 3033
>----------

Yep, looks okay.

>There also seemed to be a problem with this as batcher gave me errors
>finding the articles as follows:
>
>NewsArts:NewsArts:alt/cyberpunk/3577 not found
>
>Where is it getting the additional "NewsArts:" from?  I deleted
>NewsArts: out of a togo file and batched it manually and it worked fine
>as far as batching goes.

Hmmm.  Sounds like BATCHER is expecting relative pathnames and
RELAYNEWS is generating absolute pathnames.  There's a flag in the SYS
file or on the RELAYNEWS command line that says what it should do.  I
don't recall at the moment.  Perhaps the best fix, however, would be
to modify batcher.c so that it only adds "NewsArts:" if there's not a
colon already on the line...

>--
> Bob Lindabury
>InterNet: bobl@bobsbox.rent.com                | Raven Enterprises
>    UUCP: ...rutgers!bobsbox!bobl              | 25 Raven Avenue
>  BitNet: bobl%bobsbox.rent.com@pucc           | Piscataway, NJ 08854
>  Home #: +1 908/560-7353                      | +1 908/271-8878

Sorry for the hassles.  After I sent CNews to Fred Fish for inclusion
in the library, I contacted C= about being a developer.  Then I
bought an A3000 and started beta testing Amiga Unix, and I've worked
on CNews very little since then.  But I suppose it's just as well,
since I never hear about anyone using it (except for the 3 or 4 people
who sent me shareware donations and to whom I apologize about neglecting
support when I jumped into Amiga Unix).  There was little or no reason
to continue working on it since I wasn't using it and no one else was
either.

Now, if you want patches to use an Archive Viper under Amix, or to
allow a two-button mouse to pretend to be a three-button mouse, or if
you wanna try out my Amix commands for reading an AmigaDOS hard disk
and storing the files under Amix, then contact me.  But I don't use
AmigaDOS much anymore.
-- 
Frank "Crash" Edwards            King Marine Electronics, Inc.
Home: 813/786-3675               Work: 813/530-3411
    Having trouble sleeping?  Try lying on the end of the bed.  With
    luck you'll drop off.
	    -- Mark Twain
Xref: sparky alt.sys.amiga.uucp:2328 comp.sys.amiga.misc:14693