Subject: C News Frequently Asked Questions (FAQs)
References: <software_b_faq_770454615@nominil.lonesome.com>
Date: Wed, 1 Jun 1994 07:10:34 GMT
Supersedes: <software_b_cnews_768035415@nominil.lonesome.com>
Summary: Answers to frequently asked questions about C News (periodic posting)
X-Posting-Frequency: every 4 weeks

Version: 1.08 (March 1994)
Last-Modified: Fri Mar  4 17:38:12 EST 1994

This posting provides answers to frequently asked questions (FAQs) encountered
in using, installing, maintaining, and interfacing to the C News software
package.

A companion posting, "news.software.b Frequently Asked Questions (FAQs)"
<software_b_faq_770454615@nominil.lonesome.com>, complements
this one by covering general topics that frequently recur on this group.
Yet another posting, "News.software.b: Introduction to news.software.b"
<software_b_intro_770454615@nominil.lonesome.com>, serves as an
introduction to the group.

All these articles are repeated periodically for the benefit of new readers.

----------------------------------------------------------------------

Subject: Table of contents.

    Subject: What is C News?
    Subject: What is the current release status of C News?  Where can I get it?
    Subject: When will the next release of C News be?  What will change?
    Subject: What do I do if I am having trouble with C News?
    Subject: Isn't installing C News troublesome?
    Subject: I'm trying to compile C News under SCO and I ...
    Subject: I'm trying to compile C News under SCO XENIX and I get ...
    Subject: I have problems with expiration: "no slash in article path".
    Subject: I have problems with "unbatcher out of sync."
    Subject: What happens if, due to an error, expire can't delete an article?
    Subject: Can different parts of C News run on different machines?
    Subject: Can you speed up expire by unlinking files in the background?
    Subject: I have trouble compiling the libbig library.
    Subject: I'm having trouble with the checkgroups message in C News.
    Subject: Whenever I post, the Message-ID: header comes out as MessageID:.
    Subject: Mkhistory runs for a really long time.
    Subject: How can I clean up unused subdirectories in my news spool?
    Subject: How can I get C News to update the third field of the active file?
    Subject: Why is the Lines: header missing?  How can I fix this?
    Subject: C News isn't forwarding articles with Distribution: world.
    Subject: Why does C News drop non-conforming articles?
    Subject: Is there documentation to aid converting from B News to C News?
    Subject: Is there documentation about the theory behind C News?
    Subject: When should I upgrade my current release of C News?
    Subject: Contributions to C News FAQ.

------------------------------

Subject: What is C News?

Geoff Collyer:
C News is a fast, robust, simple, reliable, communications-neutral news
transport; a reimplementation of the transport and storage subsystems of
the news software -- basically, everything except news readers.  The
Cleanup Release will include a new NNTP transfer-only implementation.

Also, "C News" is two words.  Please.

------------------------------

Subject: What is the current release status of C News?  Where can I get it?

Henry Spencer:
The current C News distribution can currently always be retrieved by
anonymous ftp from ftp.cs.toronto.edu in file pub/c-news/c-news.Z (a shell
archive) or pub/c-news/c-news.tar.Z (a tar archive).  FTP during our peak
hours (12h00-17h00 Eastern) is not encouraged.

The current C News release date is 20-Feb-1993.  It is referred to as the
"Performance Release."  From the README.new file:

   This is the 20 Feb 1993 Performance Release of C News, a minor update
   to the 2 May 1992 P.R. that just fixes some installation problems and
   a couple of annoying bugs.  Everything that was in the "known.problems"
   file on UUNET as of 17 Feb 1993 has been fixed, in particular, as well
   as a couple of things that were noticed after those fixes went out.

(It is also available on UUNET as ~/news/cnews/c-news.Z or c-news.tar.Z.
See also the files ~/news/cnews/README and ~/news/cnews/known.problems;
known.problems reports installation problems and bugs that have been
discovered in the current version.  It also includes fixes to those
problems.)

[Formerly, a complete set of patches could also be found on ftp.cs.toronto.edu
in the directory pub/c-news/patches; however, the Performance Release was a
*new* *release* , not just an update to earlier ones -- there are no patches
to bring an earlier release up to date with it, you have to get the whole
release.  Major reorganizations, initiated in the Performance Release and to
be completed in the forthcoming Cleanup Release (see below), make release of
patches against earlier versions impractical.]

------------------------------

Subject: When will the next release of C News be?  What will change?

The next release, to be known as the Cleanup Release, is still in alpha
testing.  As a great deal of rewriting, speed enhancements, and new
features have been added, the alpha cycle has been quite long.  Patience
is still called for, however.

The major changes, as announced by Geoff and Henry at the Winter USENIX
News BOF, are as follows:

 -- There will be no patches from earlier releases; the source tree
    changes too much.

 -- NOV will be integrated.  (It seems that NOV is quickly becoming the
    accepted standard in popular reader and transport implementations).

 -- Expiration has been speeded up.

 -- Most of the build process has been moved into the Makefiles.  The
    doit.* scripts are obsolete.

 -- The "what kind of Unix"(TM somebody) question is gone, replaced by
    better questions about what routines are available.

 -- The newgroup and rmgroup auto-handlers are better; they allow
    permissions to be controlled by person X group.  (Note that as
    my notes recall, Henry claims these are designed more to protect
    against accidents, than any attempt at authentication).

 -- delgroup now removes the spool directory as well -- but only
    *after* the articles expire.

 -- All trouble reporting goes through one shell file, for easier
    customization.

 -- C News will install out-of-the-box on BSD/386 release 1.1.

 -- Newsrun and the locking schemes are more sophisticated.

 -- gzip support for batch compression is included.

 -- contrib/ contains a transport-only NNTP implementation (*not* the
    "reference" implementation).  This is designed to be useful for
    transport, but not reading and posting, news.

 -- Timezone handling changes.  Signed numeric timezones and military
    timezones will be accepted; some *currently* accepted dates which
    aren't RFC-compliant will no longer be accepted.

 -- batchparms can include parameters to compress.

 -- The middle field of the history file gets a third subfield: the size
    of the article.

 -- The documentation will lag behind, as usual, unless volunteer(s)
    step up to the plate.

------------------------------

Subject: What do I do if I am having trouble with C News?

First, consult the manual pages and descriptions in doc/trouble.  (If you
don't have doc/trouble, you either have an ancient version of C News and
should upgrade, or someone installed a partial distribution).  If you can't
find an answer there, see if there is a fix or workaround in the file called
"known.problems".  If this still fails to answer your question, try the
"Implementor's Notebook" files in doc/* (start with the README).  *Only* if
oftware.b.
Its creators *sometimes* are able to take the time to answer questions.

The creators also accept bug fixes and trouble reports at
c-news@zoo.toronto.edu [NOT cnews@zoo.toronto.edu as a previous revision
of this FAQ claimed! -- Mark]

------------------------------

Subject: Isn't installing C News troublesome?

Mark Moraes:
The C News of today is not the same thing as C News alpha, or C News
of a few patchdates ago. The improvement over the last couple of years
is significant, and the original package was pretty tidy in the first
place.  (alpha and pre-alpha were much more challenging to install).

Tom Limoncelli:
Do be sure that when you get C news, you don't forget the file
"known.problems".  It reports installation problems and bugs that have
been discovered in the current version.  It also includes fixes for
those problems.

------------------------------

Subject: I'm trying to compile C News under SCO and I ...

Chorus:
... need to delete the -O flag from your compilation commands.

------------------------------

Subject: I'm trying to compile C News under SCO XENIX and I get ...

>        cc -O -I../include  batcher.o  ../libcnews.a  -o batcher
>../libcnews.a(str3save.c) : error: _str3save : symbol defined more than once
> pos: b79d Record type: 91
>*** Error code 2

Henry Spencer:
Known makefile bug, fixed in the more recent copies of the Performance
Release (see ftp.cs.toronto.edu, for example).

------------------------------

Subject: I have problems with expiration: "no slash in article path".

Henry Spencer:
This means "garbled history file".  The only simple fix, at present,
is to use mkhistory to rebuild the history file from the articles
in the news spool.

------------------------------

Subject: I have problems with "unbatcher out of sync."

Henry Spencer:
This typically means that your in.coming/bad directory either doesn't
exist or has the wrong owner/permissions, so the attempt to move the file
into bad is failing (it's awkward to detect this, although doing
something about the situation is on my to-do list).

------------------------------

Subject: What happens if, due to an error, expire can't delete an article?

Henry Spencer:
Expire probably should be more careful about dealing with errors other
than "missing file" ... fixes are in the works.

------------------------------

Subject: Can different parts of C News run on different machines?

Henry Spencer:
We strongly, repeat strongly, recommend that relaynews and expire should
always, repeat always, be run on the machine that owns the disks.  Network
file systems do too many flaky things.

------------------------------

Subject: Can you speed up expire by unlinking files in the background?

Henry Spencer:
I've repeatedly considered such a two-phase expire over the years.  The
trouble is that error handling tends to fall down the crack between the
two phases.  What happens if you crash in the middle of expire?  What
happens if some of the articles *can't* be removed?  What happens if some
of them are supposed to be archived, and you run out of space for it?
In all of these cases, you want the history-file processing to reflect
the status of the file operations.

Rich Salz:
I sent patches to Henry or Geoff that added a "-z" flag to the C News
expire so that, like INN, it just wrote the list of files to unlink rather
than actually unlinking them.  It's a BIG win to be able to remove the
articles off-line, and I hope the patch gets incorporated soon.

------------------------------

Subject: I have trouble compiling the libbig library.

Henry Spencer:
If it's because of multiple declarations of system routines in include/
libc.h, just rip the offending declarations out of libc.h.  It really has
no business trying to declare the system routines; this is essentially a
debugging aid that slipped into the release by mistake.  It has been at
least partially fixed in the most recently updated version we put out.

------------------------------

Subject: Whenever I post, the Message-ID: header comes out as MessageID:.

Henry Spencer:
You haven't got the latest release of C News.  You've got one before the
Performance Release, or some combination (which can result if you drop
the new release in on top of the old one rather than cleaning out the
directories first).  This bug was fixed in later releases.

Delete inject/stripinvis and rebuild.
David C Lawrence:
If you have already built it, delete the file, run mkstripinvis in
the source tree's inject subdir, then copy stripinvis to $NEWSBIN/inject.

------------------------------

Subject: Mkhistory runs for a really long time.

Henry Spencer:
The problem here is that mkhistory's invocation of dbz needs to be smarter;
just plain "dbz" doesn't scale up well to high volume.  This has been on
my to-do list for some time; I didn't expect it to become a critical issue
for real users quite so soon.

The workaround is to give dbz an option along the lines of `-p 700000' to
indicate how big a database it should expect, so it can size its hash
tables accordingly.  If you've got a reasonably modern mkhistory,
"mkhistory -s 1" should arrange this automatically.  (This should
probably become the default.)

Documentation on dbz is in the dbz source subdirectory.

------------------------------

Subject: How can I clean up unused subdirectories in my news spool?

Someone (sorry I've lost the attribution) asked:
We've got a bunch of directories in our news spool for groups that no
longer (or never?) existed, like /news/alt/music/pop/will/eat/itself.
These may be either the result of groups being rmgrouped, or maybe groups
that were added in C news with the "x" flag.  Is there any quick and dirty
way of cleaning out these directories without doing it by hand?

Tom Limoncelli replied:
C News and INN operate as follows:

Deleting a group just removes the line from the active file.  The articles
are still listed in the history file, and should expire as they normally
would have.  (Though, INN's expire will warn you that it is expiring articles
from a group that no longer exists).  When all the articles are gone, the
directory will remain there, empty.  An empty directory takes up minimal space.

Now and then someone posts a script to delete empty directories.  The
challenge is to do a "find -depth" so the subdirectories get deleted
before the parents are checked for emptiness.

However, *now* a simple script will not work, due to the existence
of .threads and .nnx .nnd and (whatever tin creates) files.

"find /var/spool/news/. -type f -mtime +30 -print | xargs rm" will
certainly zap things, but might also delete any archives or other files
you store on that disk.

Rich Salz added:
INN never removes a spool directory automatically.
Change the "rmgroup" script to remove any index files after it does the
ctlinnd rmgroup command and the various "simple scripts" will work.

------------------------------

Subject: How can I get C News to update the third field of the active file?
  
Mark Moraes:
Compile and install expire/updatemin.  Then, wherever you run doexpire
(usually from cron), run updatemin after that.  Many newsreaders will find
this useful.  (I usually run doexpire from another local script called
runexpire that does a df, then runs expire, then runs updatemin, then
nnadmin =EYW and backact (for nn) ).
  
(updatemin may need -DBERKDIR when compiling if your system has the older
BSD sys/dir.h predecessor to dirent.  It should work fine as it stands on
most modern Un*xes.)
  
There's an older and much slower upact script that does the same thing, but
it's only advisable if you have a really fast machine or a small active file
(e.g. a hundred or so newsgroups.)
  
Be warned that articles with long expire times or floods of cancels (as in
clari.*) and emergency sysadmin intervention (rm newsgroup/* :-) can cause
large "holes" in the numbering space, so it isn't safe to assume that one
can calculate the number of articles accurately from the third field.
Programs should be prepared to scan the directory and check for themselves.

------------------------------

ws.

Henry Spencer:
For a long time, C News's checkgroups handler was broken, partly because
there was no clear specification of the syntax and semantics of the
checkgroups message.  The current C News release contains a completely
redone checkgroups handler that is believed to be correct.

------------------------------

Subject: Why is the Lines: header missing?  How can I fix this?

Mark Brader:
The Lines: header is optional according to the applicable RFC, so the
authors of C News didn't *have* to provide it.  They feel that the count
of lines in the body of an article is not the most useful way to measure
its size, and that if you disagree, then you should arrange for your
newsreader to count the number of lines in each article each time you
read it.

The Lines: header can be generated for articles posted at your site;
look in inject/pnews (or, if what you have is older than the Performance
Release (early 1992), inject/inews) for the comment "# sop to msb, just
uncomment to use", and uncomment the next few lines.  However, since C
News does not rewrite header lines, no way is provided to get a Lines:
header added to incoming articles.  These will have a Lines: header only
if they were created with one initially, or if they passed through a site
running software such as B News that does add it.

------------------------------

Subject: C News isn't forwarding articles with Distribution: world.

Tom Limoncelli (but amended by Christoph Badura and others):
A long time ago there was news software [B News] that handled "Distribution:
world" as a special case.  Ever since then, everyone has (incorrectly)
assumed that this is still so.  It is not.  "world" is just another
distribution like "nj" and "usa".  Some very smart people say it is a
useless distribution since leaving out the "Distribution:" header means
"no restrictions".

Therefore when you specify a list of distributions in your sys file, don't
forget to include "world", or people posting on your machine that include
"Distribution: world" will not have their posts distributed.

To clarify, INN, but not C News, allows you to specify which Distributions
you will _accept_ in your ME line.  C News allows you to specify this field,
but ignores it; only your neighbor's sys file entry for _your_ system
determines which distributions you will receive.

------------------------------

Subject: Why does C News drop non-conforming articles?

See the companion posting, "news.software.b Frequently Asked Questions
(FAQs)", for a fuller discussion on this.

------------------------------

Subject: Is there documentation to aid converting from B News to C News?

Geoff Collyer:
See doc/b-to-c in the current C News distribution.

------------------------------

Subject: Is there documentation about the theory behind C News?

Tom Limoncelli:
The paper "News Need Not Be Slow" by Geoff Collyer and Henry Spencer is
located at utoronto and many other locations, [including UUNET, as
/networking/news/cnews/doc/usenix87.doc.Z.]

The paper goes into technical details about what exactly was done
to make C news so fast.

                          ABSTRACT

          C news is a re-write, from  scratch,  of  the
     `transport layer' of the Usenet software.  C rnews
     runs at over 19 times the  speed  of  B  rnews;  C
     expire runs in minutes rather than the hours taken
     by B expire.  These performance improvements  were
     (mostly)  quite  simple  and  straightforward, and
     they exemplify general principles  of  performance
     tuning.

------------------------------

Subject: When should I upgrade my current release of C News?

If you're running something before the Performance Release, you should
probably upgrade to it as soon as possible, as any number of bugs have
been fixed.  If you're running the Performance Release, you should probably
wait until the Cleanup Release is out and has any initial rough edges
knocked off of it.

In terms of _functionally_ being compatible with earlier versions, _all_
new versions are; however, as Henry has stated in response to

> Must everyone chnage to the lastest C news at the stroke of
> midnight on Oct. 30, 1994, by proclamation of Henry Spencer?

Henry:

> Life would be a lot simpler if I could issue such a proclamation...

------------------------------

Subject: Contributions to the C News FAQ.

Thanks to the following for contributions, additions, corrections, and updates:

    Christoph Badura <bad@flatlin.ka.sub.org>
    Mark Brader <msb@sq.com>
    Geoff Collyer <geoff@world.std.com>
    A. Bryan Curnutt <uhura1!bryan@cs.utexas.edu>
    Bill Davidson <billd@billd.cray.com>
    Ken Kutz <kutz@andy.bgsu.edu>
    David C Lawrence <tale@uunet.UU.NET>
    Tom Limoncelli <tal@warren.mentorg.com>
    Mark Moraes <moraes@deshaw.com>
    Rich Salz <rsalz@rodan.UU.NET>
    Henry Spencer <henry@zoo.toronto.edu>

This posting, like much of Usenet, is maintained on a purely volunteer
basis.  I welcome reactions, additions, and corrections via email at
linimon@nominil.lonesome.com.
-- 
Mark Linimon / Lonesome Dove Computing Services / linimon@lonesome.com
         "He pulled out his fiddle and he rosined up his bow,
          and he played a little tune called the New Cut Road."
