home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume19 / cnews2 / part01 next >
Text File  |  1989-06-29  |  46KB  |  1,194 lines

  1. Subject:  v19i078:  Cnews production release, Part01/19
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rsalz@uunet.UU.NET
  5.  
  6. Submitted-by: utzoo!henry
  7. Posting-number: Volume 19, Issue 78
  8. Archive-name: cnews2/part01
  9.  
  10. [  This is a rewrite of the transport and expire portions of the Usenet
  11.    software.  It was designed to be fast and flexible.  --r$  ]
  12.  
  13. : ---CUT HERE---
  14. mkdir doc
  15. mkdir conf
  16. mkdir notebook
  17. mkdir batch
  18. mkdir contrib
  19. mkdir contrib/nntpmail
  20. mkdir contrib/nntpmail/post_via_mail
  21. mkdir contrib/nntpmail/mailing_lists
  22. mkdir contrib/nntpmail/mailing_lists/appendfile
  23. mkdir contrib/nntpmail/nntp_support
  24. mkdir contrib/nntpmail/mail_to_group
  25. mkdir contrib/rn.mod
  26. mkdir expire
  27. mkdir h
  28. mkdir hfake
  29. mkdir input
  30. mkdir libbig
  31. mkdir libbsd42
  32. mkdir libc
  33. mkdir libcnews
  34. mkdir libfake
  35. mkdir libsmall
  36. mkdir libstdio
  37. mkdir libusg
  38. mkdir libv7
  39. mkdir libv8
  40. mkdir man
  41. mkdir misc
  42. mkdir nntpdiffs
  43. mkdir nntpdiffs/diff
  44. mkdir nntpdiffs/src
  45. mkdir nntpdiffs/src.allnew
  46. mkdir relay
  47. mkdir relay/regress
  48. mkdir relay/regress/out
  49. mkdir relay/regress/out/test
  50. mkdir relay/regress/out/test/a
  51. mkdir relay/regress/out/test/b
  52. mkdir relay/regress/out/test/c
  53. mkdir relay/regress/out/control
  54. mkdir relay/regress/master
  55. mkdir relay/ads
  56. mkdir relay/anews
  57. mkdir relay/ctl
  58. mkdir relay/aux
  59. mkdir relay/altctl
  60. mkdir relay/sh
  61. mkdir rna
  62. mkdir rna/lib
  63. echo 'COPYRIGHT':
  64. sed 's/^X//' >'COPYRIGHT' <<'!'
  65. X/*
  66. X * Copyright (c) University of Toronto 1985, 1986, 1987, 1988, 1989.
  67. X * All rights reserved.
  68. X * Written mostly by Geoffrey Collyer and Henry Spencer.
  69. X * This software is not subject to any license of the American Telephone
  70. X * and Telegraph Company or of the Regents of the University of California.
  71. X *
  72. X * Permission is granted to anyone to use this software for any purpose on
  73. X * any computer system, and to alter it and redistribute it freely, subject
  74. X * to the following restrictions:
  75. X *
  76. X * 1. The authors are not responsible for the consequences of use of this
  77. X *    software, no matter how awful, even if they arise from flaws in it.
  78. X *
  79. X * 2. The origin of this software must not be misrepresented, either by
  80. X *    explicit claim or by omission.  Since few users ever read sources,
  81. X *    credits must appear in the documentation.
  82. X *
  83. X * 3. Altered versions must be plainly marked as such, and must not be
  84. X *    misrepresented as being the original software.  Since few users
  85. X *    ever read sources, credits must appear in the documentation.
  86. X *
  87. X * 4. This notice may not be removed or altered.
  88. X */
  89. !
  90. echo 'PATCHDATES':
  91. sed 's/^X//' >'PATCHDATES' <<'!'
  92. X23-Jun-1989
  93. !
  94. echo 'README':
  95. sed 's/^X//' >'README' <<'!'
  96. XThis is C News, superseding assorted preliminary releases.  9 June 1989
  97. X
  98. XC News is a reimplementation of the transport and storage subsystems of the
  99. Xnews software -- basically, everything except news readers.  We supply a
  100. Xsimple news reader (written by Michael Rourke, included by permission,
  101. Xslightly modified [so bugs are probably our fault]) as a replacement for
  102. XB-News readnews suited to use by occasional users.  For regular news users,
  103. Xthere are several more sophisticated readers widely available, and all should
  104. Xwork with C News.  We use Larry Wall's "rn" ourselves; we have not included
  105. Xit because this distribution is already rather big.
  106. X
  107. XC News's major advantage over B News is that it is much faster.  Timings
  108. Xquite a while ago gave C News a speed advantage of roughly a factor of 25
  109. Xin processing incoming batches.  This has probably improved a bit since.
  110. XC News is now, on good machines with good C libraries, mostly system-call
  111. Xbound.  Use of system calls has been optimized with some care, so it's
  112. Xunlikely that further big speed improvements can be made at user level
  113. Xwithout sacrificing backward compatibility.  See our paper in the Winter '87
  114. XUsenix proceedings for some discussion of how the speed was achieved.
  115. X
  116. XC News also wins over B News on simplicity and robustness.  We provide
  117. X(in our opinion) everything that's necessary, and avoid the frills that
  118. Xrun up the complexity and decrease reliability.  We have not attempted to
  119. Xprovide every feature anyone can think of, and have no plans to do so
  120. Xin future either.  (This is one reason why we've stayed out of the news-
  121. Xreader business, which generally has a bad case of feature-of-the-week
  122. Xsyndrome.)
  123. X
  124. XC News's files are fully compatible with those of B News for any program
  125. Xthat does not read log files and does not inspect the middle field of the
  126. Xhistory file closely.  (The one major program that does is "nntp"; we include
  127. Xdiffs for NNTP 1.5 which handle our middle-field format, interface it to
  128. Xour input subsystem, and generally make it quite a bit faster than the
  129. Xoriginal.)  C News complies fully with RFC 1036 (nee RFC 850), the official
  130. Xdefinition of news interchange format.
  131. X
  132. XC News is, by intent and *we think* in practice, compatible with B News
  133. Xat the level of most interfaces to the normal user, which basically means
  134. Xthe semantics and options of "inews".  It is *not* compatible on the
  135. Xsystem-administration level, although we think most of the changes are
  136. Ximprovements or worthwhile simplifications.  The "postnews" that we supply
  137. Xis not compatible with that of B News; it is purely interactive, as news
  138. Xthat is already formatted can simply be fed to "inews -h".
  139. X
  140. XFor those who now run one of our ancient pre-alpha versions, many things
  141. Xhave changed, and in particular the four-field history file format is gone.
  142. XC News has also changed quite a bit since the alpha release that went out
  143. Xon Usenet some time ago.
  144. X
  145. XFor our beta testers, build and the Makefiles have changed quite a bit but
  146. Xthe software itself needed only fairly trivial fixes.
  147. X
  148. XWe know of three things that could still use work in this release:
  149. X
  150. X    1. The documentation could use work, especially for naive customers.
  151. X    As it stands, it pretty much assumes a general knowledge of news
  152. X    software.
  153. X
  154. X    2. There are a great number of small improvements that could
  155. X    be made to the installation process, especially to permit still more
  156. X    customization via the "build" program.
  157. X
  158. X    3. The fgetmfs function (in the libc directory) assumes that fgets
  159. X    does not alter the buffer beyond the end of the string.  We are not
  160. X    sure how portable this is, although it works on all our beta-test
  161. X    systems, and may revise fgetmfs someday.
  162. X
  163. XThe active file format is the 4-field one that B news introduced midway
  164. Xthrough 2.10, with minor additions: an `x' in the 4th field means
  165. X``discard articles in this newsgroup'', and `=group' in the 4th field
  166. Xmeans ``file articles for this newsgroup under `group' instead''.
  167. X
  168. XThe history file format is like B with one exception:  the second field,
  169. Xwhich few programs ever look at, now consists of two subfields separated
  170. Xby a tilde (~).  The first is the arrival date as a decimal number, the
  171. Xsecond is the expiry date (if any) as a human-readable date (as emitted by
  172. Xrnews) or a decimal number (after expire has gotten its hands on it once).
  173. XExpire is tolerant of human-readable dates in both those places, but other
  174. Xthings may not be.  The best way to get the history file into the new
  175. Xformat is to rebuild it completely (this is RELATIVELY quick).
  176. X
  177. XThe sys file format is like a late-model B news with two extensions.
  178. XFirst, the second field (groups and distributions) may optionally be
  179. Xsplit into two subfields (newsgroups and distributions, respectively)
  180. Xwith a slash. This permits solutions to various tricky problems that can
  181. Xarise in odd situations if it is impossible to tell what's a newsgroup
  182. Xname and what's a distribution.  Second, there is a new flag in the
  183. Xthird field:  f is like F except that its output has the size
  184. Xinformation that the C batcher wants for accurate limiting of batch
  185. Xsize.
  186. X
  187. XThe way the news articles themselves are stored is totally unchanged; we
  188. Xhave been unable to think of any changes that are worth the trouble.
  189. X
  190. XThere are some new control files in /usr/lib/news, to control the smarter
  191. Xexpire and batcher.  (Old C News sites, note some format changes.)
  192. X
  193. XFile organization:  the one change is that programs are now kept mostly
  194. Xin /usr/lib/newsbin, with /usr/lib/news reserved for control files etc.
  195. X
  196. XB News sites note:  /bin/rnews is now a front end for the input spooler.
  197. XThe real news-filing program is called relaynews and is not in /bin.
  198. X
  199. XC News is meant to run adequately on a 16-bit machine, although this has
  200. Xnot been tested thoroughly since utzoo became a Sun.
  201. X
  202. XMost (by intent all) of the programs understand seven key environment
  203. Xvariables: NEWSARTS specifies location of articles (default
  204. X/usr/spool/news), NEWSCTL specifies location of control files (default
  205. X/usr/lib/news), NEWSBIN gives location of programs (default
  206. X/usr/lib/newsbin), NEWSUMASK gives the umask to be used in creating
  207. Xfiles (default 002), NEWSPATH gives the path used to find "normal" programs
  208. X(default /bin:/usr/bin), NEWSMASTER is the address to which problem
  209. Xreports should be mailed (default usenet), and NEWSCONFIG is the full
  210. Xpathname of a little file that shell programs can use to pick up local
  211. Xdefault settings for all these things (the equivalent for the C programs
  212. Xis in the C News library) (default /usr/lib/news/bin/config).  The
  213. Xenvironment variables override the defaults for testing and for operation
  214. Xin funny situations.  Note that one or two things (e.g. relaynews), as
  215. Xdistributed, will insist on renouncing setuid privileges if invoked with
  216. Xthese overrides.
  217. X
  218. XBe warned that the nntp stuff in nntpdiffs, and the simple news reader in
  219. Xrna, have not been gone over very well to make sure that they use the
  220. Xstandard configuration mechanisms.  Hardwired pathnames may be present there,
  221. Xand in general the stuff there is not well fitted into our automatic-install
  222. Xmachinery.
  223. X
  224. XSee ROADMAP for a run-down on what's where in the distribution.  See
  225. Xdoc/install for how to install it.  Conf/build is the interactive setup
  226. Xprogram that does most of the work, or rather, sets up shell files which,
  227. Xwhen run, do most of the work.  Even if your system is odd enough that
  228. Xyou don't want to run the shell files conf/build generates -- doit.bin and
  229. Xfriends -- as is, you are most strongly advised to run conf/build and use
  230. Xthe resulting shell files as guides, rather than trying to "wing it"
  231. Xyourself.  Getting the library built correctly is *NOT* trivial, because
  232. Xwe try to cater to all 57000 different variants of Unix and there are a lot
  233. Xof decisions that have to be made.  This is why we supply a 31KB shell
  234. Xprogram to generate the configure+compile+install instructions, rather than
  235. Xjust sending a complete pre-cooked recipe embodied in a Makefile:  there are
  236. Xtoo many variables affecting how it should be done.
  237. X
  238. XC News has been tested pretty thoroughly.  We're also thoroughly sick of
  239. Xit and make no promises that there will ever be another release.  We may,
  240. Xrepeat *may*, provide updates via some appropriate newsgroup (currently
  241. Xthe best choice is "news.software.b", although there is some sentiment for
  242. Xfolding all the subgroups there into just "news.software"; we oppose
  243. Xcreation of "news.software.c" because we don't think there will be enough
  244. Xtraffic to justify a whole newsgroup).
  245. X
  246. XIf you've found a problem, we definitely do want to hear about it.  But,
  247. Xwe *do not* want to see 2000 lines of diff listing!  What we want to see
  248. Xis a concise human-readable description of what the problem is and how, 
  249. Xif at all, you solved it.  If we want the diff listing, we will ask.
  250. XSimilarly, we are interested in hearing about changes and improvements,
  251. Xbut want to see terse descriptions first.
  252. X
  253. XIf you want us to consider changes/fixes/etc, send them to us, don't just
  254. Xpost them to the net.  We don't necessarily read all possibly-relevant
  255. Xgroups.  Only postings from us are officially part of C News.
  256. X
  257. XTo send comments, complaints, problem reports, etc., do *not* mail to
  258. XGeoff or Henry personally, but to:
  259. X
  260. X    c-news@utstat.toronto.edu
  261. Xaka    c-news@utstat.utoronto.ca
  262. Xaka    utzoo!utstat!c-news
  263. X
  264. XUtstat.toronto.edu is directly on the Internet but does not have a lot of
  265. XUUCP connections.  However, it does talk to utzoo.  Utzoo connects to half
  266. Xthe known universe (well, not quite, but try via allegra, att, attcan,
  267. Xattunix, decvax, dptcdc, floyd, hoptoad, kitty, linus, mnetor, pyramid,
  268. Xsuncan, utai, utgpu, watmath, or yunexus).
  269. X
  270. X                    Geoff Collyer
  271. X                    Henry Spencer
  272. !
  273. echo 'ROADMAP':
  274. sed 's/^X//' >'ROADMAP' <<'!'
  275. Xbatch    Output batcher.  It should work with B News, but not as well --
  276. X    it really wants to be told sizes of articles as well as names.
  277. Xconf    Configuration stuff, including the "build" shell program that
  278. X    does most of the work of installing C News.
  279. Xcontrib    Software from other contributors, possibly useful but not really
  280. X    an official part of C News.
  281. Xdoc    User documentation, including "install" which discusses how to
  282. X    install C News.
  283. Xexpire    Expire and friends, including history rebuilding and active-file
  284. X    updating (neither of which is done by expire in C News).  Ought
  285. X    to work with B News.  Fast, and permits control of expiry time
  286. X    and such on a per-group basis.
  287. Xh    Header files for include (see below).
  288. Xhfake    Header files that your system ought to have but possibly doesn't,
  289. X    for include (see below).
  290. Xinclude    Actually not in distribution -- "build" constructs this from h and
  291. X    hfake as required.
  292. Xinput    Input spooler and processing.  Includes the "rnews" that goes in
  293. X    /bin or wherever.
  294. Xlibsmall
  295. Xlibbig    Libraries for a couple of key functions that care whether they
  296. X    have a large address space to work with.
  297. Xlibbsd42
  298. Xlibusg
  299. Xlibv7
  300. Xlibv8    Libraries for details that are Unix-variety-specific.
  301. Xlibc    Stuff that ought to be in your C library but probably isn't.
  302. Xlibcnews    General C News library functions.
  303. Xlibfake    Stuff that might be in your C library, but might not be.
  304. Xlibstdio    Fast re-implementations of some crucial stdio functions.
  305. X    These are compatible with most Bell-derived stdios, and quite a
  306. X    bit faster than most of the pre-System-V ones (which includes
  307. X    those of many 4BSD variants).
  308. Xman    Manual pages.
  309. Xmisc    Miscellaneous internal utilities and maintenance programs.
  310. Xnntpdiffs    Amendments to NNTP version 1.5, for Internet users, to work
  311. X    with C News history-file format and to be a good deal faster.
  312. Xnotebook    The C News Implementor's Notebook -- pieces of documentation
  313. X    aimed more at gurus than novices.
  314. Xrelay    Relaynews and friends.  The heart of C News -- actual reception
  315. X    and filing of articles.
  316. Xrna    A simple version of readnews (by Michael Rourke at UNSW) for
  317. X    naive news users.
  318. !
  319. echo 'doc/install':
  320. sed 's/^X//' >'doc/install' <<'!'
  321. X.de Fn
  322. X\\&\\$1\\fB\\$2\\fP\\$3
  323. X..
  324. X.TL
  325. XInstalling ``C News'' Network News Software
  326. X.AU
  327. XGeoff Collyer
  328. X.AI
  329. XDepartment of Statistics
  330. XUniversity of Toronto
  331. X.AB
  332. XThis document describes the flow
  333. Xof network news within and between machines,
  334. Xwhat each component of C news does,
  335. Xand
  336. Xhow to install C news.
  337. X.AE
  338. X.SH
  339. XIntroduction
  340. X.PP
  341. XNetwork news
  342. X(or
  343. X.I netnews
  344. Xfor short)
  345. Xconsists of a collection of messages formatted similarly to
  346. XARPAnet mail
  347. X(see ARPA Internet RFC 1036 for details),
  348. Xwidely spread.
  349. XThe logical network,
  350. Ximposed on top of various real networks,
  351. Xformed by the set of all interconnected sites
  352. Xexchanging network news is called ``Usenet''
  353. Xand was formed in 1979,
  354. Xradiating out from Duke University.
  355. XNetnews is propagated
  356. Xbetween cooperating machines
  357. Xby a flooding algorithm,
  358. Xwith some loop prevention heuristics:
  359. Xeach machine sends its neighbours news that the
  360. Xneighbours have (probably) not yet seen.
  361. X.PP
  362. XFlow of netnews between machines
  363. Xmay be achieved by use of any network
  364. Xwhich can transmit an arbitrary stream of
  365. X(at least 7-bit)
  366. XASCII code, unmodified.
  367. XIf a network cannot transmit ASCII intact
  368. X(e.g. BITNET),
  369. Xit is possible to encode netnews
  370. Xbefore transmission across the network
  371. Xand
  372. Xdecode it upon reception from the network.
  373. XSince one cannot be certain that
  374. Xone's network neighbours will be up and
  375. Xreachable at all times,
  376. Xoutgoing netnews must be queued,
  377. Xat least in the case of network trouble.
  378. XTo date,
  379. Xat least
  380. Xthese networks,
  381. Xprotocols and media
  382. Xhave been used to transmit netnews correctly:
  383. XUUCP,
  384. XRS232,
  385. XNNTP,
  386. XEthernet\(rg,
  387. Xthe ARPA Internet,
  388. XDatakit\(rg,
  389. XACSnet,
  390. Xmagnetic tape,
  391. XSMTP,
  392. Xand
  393. XBITNET,
  394. Xthough at least the last two require some form of encapsulation
  395. Xto avoid corruption of articles;
  396. XSMTP because some common implementations get the newline-CRLF
  397. Xmappings wrong,
  398. Xthus throwing off byte counts in batches,
  399. Xand
  400. XBITNET because of its Procrustean chopping,
  401. Xexpanding,
  402. Xmapping,
  403. Xbashing
  404. Xand
  405. Xsmashing
  406. Xof all data sent through it
  407. X(sending lines of 80 or fewer characters of
  408. Xletters of either case and digits and plus and minus
  409. Xappears to be safe).
  410. X.PP
  411. XNetnews arrives via some network,
  412. Xwhich causes a command to be executed upon arrival
  413. X(e.g.
  414. X.I rnews ).
  415. X.I rnews
  416. Xtypically spools the inbound netnews for later processing.
  417. XEventually
  418. X(often within the hour
  419. Xor at the end of the business day),
  420. Xthe input queue is run
  421. Xand the netnews is stored locally,
  422. Xtypically under
  423. X.I /usr/spool/news ,
  424. Xand queued for transmission to netnews neighbours.
  425. XOnce stored on disk,
  426. Xnetnews may be read by any of a collection of unprivileged news readers,
  427. Xincluding
  428. X.I cat (1).
  429. X.I Expire
  430. Xis run typically each night
  431. Xto remove old netnews from disk.
  432. X.PP
  433. XC News was originally written to provide a
  434. Xmuch faster and smaller,
  435. Xmore robust,
  436. Xreliable
  437. Xand
  438. Xcorrect
  439. Ximplementation of netnews software than B 2.11 news.
  440. XWe believe that C News is also
  441. Xfaster,
  442. Xsmaller
  443. Xand
  444. Xmore robust
  445. Xthan B 3.0 news.
  446. XB 3.0 news has many more features;
  447. Xtake that as you will.
  448. X.SH
  449. XC News Components.
  450. X.PP
  451. X.I Rnews
  452. Xinvokes
  453. Xthe input subsystem,
  454. Xwhich
  455. Xspools incoming netnews in its original form,
  456. Xas received,
  457. Xtypically in compressed batches.
  458. XPeriodically,
  459. Xthe input queue should be run
  460. Xby invoking
  461. X.I newsrun ,
  462. Xthus uncompressing any compressed input
  463. Xand feeding it to
  464. X.I relaynews .
  465. X.PP
  466. X.I Relaynews
  467. Xfiles incoming netnews as articles on disk
  468. Xand
  469. Xinitiates spooled transmission to other machines,
  470. Xoften by simply writing the names of the disk files
  471. Xcontaining the articles on the ends of `batch' files of file names.
  472. XQuite a bit of policy from RFC 1036 is embedded in
  473. X.I relaynews .
  474. X.I inews
  475. Xis a complex front-end for
  476. X.I relaynews
  477. Xwhich implements much of the per-site policy on news posting.
  478. X.I inews
  479. Xis a fairly-slow shell script which is adequately fast for most sites,
  480. Xbut it will need to be replaced by something more streamlined
  481. Xfor sites which gateway mailing lists into netnews,
  482. Xfor example.
  483. X.PP
  484. XThe output
  485. X.I batcher
  486. Xreads lists of file names
  487. Xand
  488. Xgenerates news batches
  489. X(see RFC 1036 or
  490. X.I news (5)
  491. Xfor the format)
  492. Xof prescribed sizes
  493. Xand queues the batches
  494. Xfor transmission to other sites.
  495. XThe batcher is run asynchronously with
  496. X.I relaynews ,
  497. Xtypically once an hour
  498. Xoutside of business hours.
  499. X.PP
  500. X.I Expire
  501. Xis generally run once per night
  502. Xto remove from disk news articles older than a few days.
  503. X.I Expire
  504. Xcan use different expiry criterion for different newsgroups
  505. Xand can archive articles instead of removing them.
  506. X.I Expire
  507. Xalso runs asynchronously
  508. Xwith
  509. X.I relaynews .
  510. X.PP
  511. XThere are many news readers.
  512. XC News
  513. Xcomes with a limited news reader
  514. X(\c
  515. X.I readnews
  516. Xby Michael Rourke)
  517. Xsufficient to replace
  518. Xlong-winded
  519. X.I /etc/motd s
  520. Xbut you will want a heavy-duty news reader
  521. Xif you plan to read more than local news groups.
  522. XWe recommend
  523. X.I rn
  524. Xby Larry Wall,
  525. Xavailable from
  526. Xyour netnews neighbours
  527. Xor
  528. Xyour nearby
  529. X.B comp.sources.unix
  530. Xarchive site.
  531. XThere are others:
  532. X.I vn
  533. Xand
  534. X.I vnews
  535. Xare two.
  536. X.SH
  537. XPreparation for Installation
  538. X.PP
  539. XNetnews consumes a lot of disk space
  540. Xand
  541. Xoften a lot of transmission time.
  542. XHere are some relevant measurements regarding a full netnews feed
  543. Xas of the time of writing
  544. X(January 1989),
  545. Xtaken from
  546. X.I news.lists :
  547. Xa day's netnews is about 3Mb and 1,400 articles
  548. Xin 450 newsgroups.
  549. XYears ago,
  550. Xsites often kept 14 days of netnews on disk,
  551. Xbut now many sites keep news for 3 to 5 days,
  552. Xthus allowing for the occasional long weekend.
  553. XThus a full news feed expired after 4 days will consume
  554. Xabout 12Mb.
  555. XSome people feel that news volume is doubling roughly every 16 months.
  556. XIf this is true,
  557. Xwe can expect volume to increase by a factor of 10
  558. Xin about 4 years
  559. Xto 30Mb per day or 115Mb for 4 days.
  560. XIt is thus wise planning to set aside a lot of disk space for netnews.
  561. XThere are two ways to cope with ever-increasing volumes of netnews:
  562. Xrefuse to accept more newsgroups,
  563. Xor
  564. Xexpire news after shorter intervals on disk.
  565. XA current full feed takes just over 7 hours to transmit at 1200 baud,
  566. Xso for dial-up connections
  567. Xone clearly wants the fastest modems one can afford.
  568. X.PP
  569. XClearly,
  570. Xtransmitting a full news feed is a non-trivial commitment of resources,
  571. Xso you may have some difficulty in finding a site willing to supply one.
  572. XSuch a site may in turn expect you to feed yet other sites.
  573. XYou will need to agree with your prospective netnews neighbour(s)
  574. Xupon transfer media,
  575. Xprotocols
  576. Xand
  577. Xnetworks.
  578. X.PP
  579. XBefore proceeding to install C News, you should read this document through
  580. Xto the end, probably read the companion document
  581. X\fIThe Interface Between C News And The Outside World\fR,
  582. Xand possibly read selected items in the
  583. X\fIC News Implementor's Notebook\fR and the manual pages.
  584. X.PP
  585. XYou will need to
  586. Xassign a user id and group id to netnews
  587. X(often new ids called ``news'');
  588. Xinitialise these directories:
  589. XNEWSCTL
  590. X(typically
  591. X.B /usr/lib/news ),
  592. XNEWSBIN
  593. X(\c
  594. X.B /usr/lib/newsbin ),
  595. Xand
  596. XNEWSARTS
  597. X(\c
  598. X.B /usr/spool/news );
  599. Xand
  600. Xinstall each subsystem.
  601. XNEWSCTL and NEWSARTS
  602. Xare logically one subtree,
  603. Xdefining a news data base,
  604. Xbut are split for backward compatibility with
  605. Xolder news software,
  606. Xparticularly old news readers.
  607. XNEWSBIN
  608. Xcontains programs and shell scripts
  609. Xwhich might be common amongst machines sharing
  610. Xa common architecture
  611. X(e.g. Sun 3's);
  612. X.Fn NEWSCTL /bin
  613. Xmay override these.
  614. XThe goal is to install the subsystems,
  615. Xintegrate them into a working news system,
  616. Xand
  617. Xconfigure the news system to communicate with other news systems.
  618. X.PP
  619. XThere are a few key files that must exist before any serious
  620. Xattempt may be made to operate the news software.
  621. X.Fn NEWSCTL /active
  622. Xis the list of newsgroups that this site knows
  623. X(is willing to accept or individually reject),
  624. Xand must be owned by the
  625. XNEWS
  626. Xuserid
  627. X(the userid that owns
  628. X.Fn NEWSBIN /relay/relaynews ,
  629. Xtypically
  630. X.I news ).
  631. XYou will probably want to get your initial
  632. X.Fn "" active
  633. Xfile from your upstream feed
  634. Xand edit it to suit the set of groups you wish to receive.
  635. XBe sure to make the second field more than five digits wide,
  636. Xby adding leading zeroes
  637. X(ten digits is a conservative width).
  638. X.Fn NEWSCTL /sys
  639. Xdefines the newsgroups that this site is willing to accept
  640. Xand describes how they are to be forwarded to its neighbours.
  641. X.Fn NEWSCTL /server
  642. Xcontains the hostname of your file server,
  643. Xif you have multiple machines sharing news
  644. Xvia a network file system.
  645. X.Fn NEWSCTL /whoami
  646. Xsimilarly contains the name by which a cluster of machines
  647. Xsharing news is to be known for purposes of news.
  648. X.Fn NEWSCTL /mailname
  649. Xis optional and contains the full
  650. X(possibly dotted)
  651. Xname by which your cluster is known for purposes
  652. Xof mail.
  653. X.Fn NEWSCTL /organisation
  654. X(or
  655. X.Fn NEWSCTL /organization
  656. Xif you insist)
  657. Xcontains the name of your organisation,
  658. Xwhich will be copied into the
  659. X.B Organization:
  660. Xheader of articles posted locally,
  661. Xby default.
  662. X.Fn NEWSCTL /mailpaths
  663. Xdefines mail routes to machines which contain aliases
  664. Xfor postings to moderated newsgroups.
  665. X.Fn NEWSCTL /log ,
  666. X.Fn NEWSCTL /errlog ,
  667. X.Fn NEWSCTL /history ,
  668. X.Fn NEWSCTL /history.dir ,
  669. Xand
  670. X.Fn NEWSCTL /history.pag
  671. Xmust exist and be owned by the
  672. XNEWS
  673. Xuserid.
  674. XTentative versions of all these files are built by the installation
  675. Xprocedures, but it is quite likely that you'll have to edit some of them.
  676. X.SH
  677. XC News Installation
  678. X.PP
  679. XProceed to the
  680. X.Fn \& conf
  681. Xdirectory of the distribution.
  682. XThere is a major shell file here, named
  683. X.Fn \& build ,
  684. Xthat will interrogate
  685. Xyou at length and construct shell files to do the real work.
  686. XYou may need to do
  687. X``chmod\ +x\ build'' before running it, to make it executable.
  688. X.PP
  689. XYou will probably need your system's manuals on hand to answer
  690. X.Fn \& build 's
  691. Xquestions.
  692. XAnother terminal (or another window, on a bitmap display) would also be
  693. Xuseful.
  694. XYou'd best be prepared to take notes, also, as
  695. X.Fn \& build
  696. Xwill occasionally suggest that something be checked when you're done.
  697. X.PP
  698. X.Fn \& Build
  699. Xitself does not alter any files or perform any installation
  700. Xchores:  all it does is create shell files in the
  701. X.Fn \& conf
  702. Xdirectory.
  703. XIf you already know something about news software, or are merely
  704. Xsuspicious that
  705. X.Fn \& build
  706. Xhasn't done everything right, you should
  707. Xprobably read the shell files before running them.
  708. XThere are four of them:
  709. X.Fn \& doit.root ,
  710. X.Fn \& doit.bin ,
  711. X.Fn \& doit.news ,
  712. Xand
  713. X.Fn \& again.root .
  714. X.PP
  715. X.Fn \& Doit.root
  716. Xsets up the major directories for news, and sets their
  717. Xownerships correctly.
  718. XIt typically will have to be run as \fIroot\fR to have adequate permissions
  719. Xfor all of this.
  720. XIt is brief.
  721. X.PP
  722. X.Fn \& Doit.bin
  723. Xdoes most of the work of building and installing the programs.
  724. XIt should be run as the user who owns the distribution directories and will
  725. Xown the executable programs under NEWSBIN.
  726. X.PP
  727. X.Fn \& Doit.news
  728. Xdoes some other small chores and installs control files.
  729. XIf any of the control files already exist, it will complain and refuse
  730. Xto overwrite them, as a safety precaution.
  731. XIt should be run as the owner of the news files.
  732. XSince many of the files it is installing are built by
  733. X.Fn \& doit.bin ,
  734. Xthat should be run first.
  735. X.PP
  736. XFinally,
  737. X.Fn \& again.root
  738. Xtends to ownership and permission changes on
  739. Xa few programs that need to run set-userid.
  740. XIt requires the ability to change ownerships and to set permissions on
  741. Xthe files afterwards, which usually means running it as \fIroot\fR.
  742. XIt too is brief.
  743. X.PP
  744. XThere are undoubtedly strange systems out there that
  745. X.Fn \& build
  746. Xand friends are not smart enough to cope with.
  747. XIn such cases it will be necessary to edit the shell files before running
  748. Xthem, or to use them as guides and do the work by hand.
  749. XIn particular, systems that require strange options in
  750. X.Fn \& Makefile s
  751. Xwill need to have those inserted by hand.
  752. X.PP
  753. XIf you want to test pieces of C News without installing them, some
  754. X(not all) of the subsystems have a ``make\ r'' feature that runs a
  755. Xregression test.
  756. XNote:  almost all of these require that
  757. X.Fn NEWSCTL /bin/config ,
  758. Xor its local equivalent, be in place already so that shell files
  759. Xcan find out what PATH (etc.) they should be using.
  760. X.PP
  761. XNote that it is easy to build a test news system which is completely
  762. Xindependent of other existing news systems on the same machine,
  763. Xor
  764. Xto build one which shares its
  765. X.Fn NEWSBIN ""
  766. Xwith another C news system,
  767. Xor shares input of articles
  768. X(e.g. running an old B news system
  769. Xand a new C news system off the same stream of input
  770. Xuntil you are confident that your new C news system is operating
  771. Xto your satisfaction).
  772. XSee
  773. X.I subst (1)
  774. Xfor the mechanism which permits quickly changing
  775. Xall the places that know the location of
  776. X.Fn NEWSCTL /bin/config.
  777. XAfter that,
  778. Xedit this news system's
  779. X.Fn NEWSCTL /bin/config
  780. Xand things should be set up for separate existence.
  781. X.SH
  782. XFirst News
  783. X.PP
  784. XWhen you arrange to get a news feed from your neighbor, you should also
  785. Xask him to send you the current set of articles in the newsgroup
  786. X\fBnews.announce.newusers\fR.
  787. XSeveral of these are very important reading for people who are new to the net.
  788. X.SH
  789. XUnusual Systems
  790. X.PP
  791. XWe believe that C News runs fine on 16-bit machines, but it hasn't been
  792. Xtested very thoroughly on them lately.
  793. XIt will not perform quite as well with the more limited space.
  794. X.PP
  795. XMachines with very old compilers can be a headache.
  796. XThere are some hooks in
  797. X.Fn \& h/news.h
  798. Xfor doing without ``void'' and ``unsigned long'',
  799. Xtwo particular problem areas, but they have to be arranged manually;
  800. X.Fn \& build
  801. Xdoes not know about them.
  802. X.PP
  803. XSome very old systems cannot do \fIsetuid(geteuid())\fR, which makes it
  804. Ximpossible for a daemon to make directories and get the ownership right.
  805. XWe provide a small program,
  806. X.Fn \& setnewsids ,
  807. Xto run setuid-root.
  808. X.Fn \& Relaynews
  809. Xknows about it and invokes it if \fIsetuid(geteuid())\fR fails;
  810. Xit then sets permissions correctly and re-invokes
  811. X.Fn \& relaynews .
  812. XThe code is short enough to be read and understood in full, so that the
  813. Xsuspicious system administrator can be sure that this setuid-root program
  814. Xis not going to do something awful.
  815. !
  816. echo 'doc/README':
  817. sed 's/^X//' >'doc/README' <<'!'
  818. XThis is user documentation.  See ../notebook for implementor's notes.
  819. X
  820. XEverything here is set up to use the -ms macros.  No complex formatting
  821. Xis attempted, and only the three standard fonts (R, I, B) are used.
  822. X
  823. Xinstall        somewhat sketchy how-to-install document
  824. Xinstall.out    nroffed version of install
  825. Xinterface    technical summary of how C News works and its interface to
  826. X        the rest of the system
  827. !
  828. echo 'doc/interface':
  829. sed 's/^X//' >'doc/interface' <<'!'
  830. X.DA "9 June 1989"
  831. X.TL
  832. XThe Interface Between C News And The Outside World
  833. X.AU
  834. XHenry Spencer
  835. X.AI
  836. XDept. of Zoology
  837. XUniversity of Toronto
  838. X.SH
  839. XIntro and Generalities
  840. X.PP
  841. XC News relates to the ``outside world'',
  842. Xthe system it is installed on, in a number of ways.
  843. XThis document attempts to enumerate them and explain what goes on.
  844. X.PP
  845. XIn general, C News attempts to rely only on ``common basic Unix'',
  846. Xand in particular it is not particularly BSD-specific or System-V-specific.
  847. XSpecifically,
  848. Xit makes no use of ornate locking mechanisms, silly interprocess-communication
  849. Xschemes, peculiar networking primitives,
  850. Xextensions to C, or other annoyances.
  851. X.SH
  852. XDirectories And Userids
  853. X.PP
  854. XMost of the components of C News live in \fI/usr/lib/newsbin\fR,
  855. Xwith control files in \fI/usr/lib/news\fR and spooling areas
  856. X(for current news, inbound traffic, and outbound traffic) in
  857. X\fI/usr/spool/news\fR.
  858. XSee the document
  859. X\fIDirectory Layout and PATH in C News\fR
  860. Xfor elaboration on the structure,
  861. X\fIFiles in /usr/lib/news (aka NEWSCTL)\fR for a summary of control files,
  862. Xand
  863. X\fIConfiguration Mechanisms in C News\fR
  864. Xfor how to change the locations of the directories.
  865. X.PP
  866. XThere is an extensive subdirectory structure under \fI/usr/lib/newsbin\fR,
  867. Xwith only a few heavily-used utilities in the top-level directory.
  868. XIn the following,
  869. Xprograms not explicitly described as going elsewhere are all under there
  870. Xsomewhere.
  871. X.PP
  872. XC News's spool areas and major control files need to be owned by a
  873. Xspecific userid, normally \fInews\fR.
  874. X(We believe that nothing except some of the Makefiles knows this name.)
  875. XWe suggest that this userid should not own anything else on the system.
  876. XThe programs in \fI/usr/lib/newsbin\fR can be
  877. Xowned by \fIbin\fR (or anyone else) except for those that need to be setuid.
  878. X(On our systems the non-setuid ones are owned by \fIbin\fR.)
  879. X.SH
  880. XUnix Utilities
  881. X.PP
  882. XC News requires a fairly complete Unix or equivalent.
  883. X(We take no position on whether 4BSD, or System V, is Unix or not;
  884. Xour private opinion is that neither truly deserves the name any more,
  885. Xalthough we occasionally change our minds about which is less deserving.)
  886. X(Note also that ``Unix'' is used here as an abbreviation for
  887. X\fBThe UNIX Operating System\fR\(rg,
  888. Xa registered trademark of AT&T;
  889. Xwe acquired our bad habits and incorrect capitalization from
  890. XUnix [sic] documentation supplied by the Bell System in the mid-1970s.)
  891. X.PP
  892. XIn particular, C News relies heavily on shell files.
  893. X``Shell'' here means, of course, the standard shell, written by
  894. XSteve Bourne.
  895. XIf your \fI/bin/sh\fR is not a Bourne shell or \fIvery\fR good imitation,
  896. Xyou're in trouble.
  897. XNote, in particular, that some old versions of the Korn shell differ from
  898. Xthe Bourne shell in some important details of quoting behavior, and
  899. Xwe \fIknow\fR this causes problems with C News.
  900. XYou need a standard shell.
  901. X.PP
  902. XTo the best of our ability, all our shell files begin with ``#!\ /bin/sh''.
  903. XIf your shell misinterprets this as a request to run the C shell, you're
  904. Xin trouble.
  905. XIf your shell doesn't know about ``#'' comments at all, you're in trouble.
  906. XWe hope that no modern shell makes either of these mistakes.
  907. X.PP
  908. XWe believe that none of our stuff relies on relatively modern shell features
  909. Xlike shell functions or \fIgetopts\fR (as distinct from \fIgetopt\fR).
  910. XIf \fItest\fR and \fIecho\fR are not built-in commands in your shell,
  911. Xefficiency will suffer
  912. Xbut everything should still run.
  913. XIt's possible that a few obscure things will break if your shell does not
  914. Xsupport ``['' as a synonym for \fItest\fR, although we try to avoid this usage.
  915. X.PP
  916. XWithin the shell files, C News makes heavy use of a wide variety of Unix
  917. Xutilities, notably \fIsed\fR and \fIawk\fR.
  918. XAny \fIawk\fR should do; in particular, nothing needs the ``new \fIawk\fR''
  919. X(we don't run it yet).
  920. XAlthough we have tried to avoid it, it is possible that some things depend
  921. Xon \fIawk\fR recognizing ``\et'' inside strings, which very old \fIawk\fRs
  922. Xdidn't.
  923. X.PP
  924. XIf your Unix does not put all standard Unix programs in
  925. Xthe standard directories\(em\fI/bin\fR and
  926. X\fI/usr/bin\fR\(emyou will need to modify C News's default PATH to include
  927. Xwhatever bizarre directories are involved.
  928. XSee the \fIConfiguration Mechanisms\fR document for details.
  929. XIn particular, for some insane reason, 4BSD relocated a few standard
  930. Xutilities like \fIwc\fR to \fI/usr/ucb\fR, which causes trouble
  931. X(and not just to C News!).
  932. XWe simply put some links in \fI/usr/bin\fR to fix this on our systems,
  933. Xand this is what we recommend you do, but if you can't, you'll have to
  934. Xchange the PATH.
  935. X.PP
  936. XSeveral parts of C News rely on being able to send mail to an administrative
  937. Xaccount (the name of which can be chosen; see \fIConfiguration Mechanisms\fR).
  938. XThe assumption is that a message, without any RFC822 headers, can be piped
  939. Xinto \fI/bin/mail\fR (or whatever \fImail\fR is first in the PATH)
  940. Xinvoked with a single argument which is the addressee,
  941. Xand be delivered to the addressee's mailbox intact, possibly embellished
  942. Xwith headers.
  943. XThat is, with news's standard PATH, if
  944. X.DS
  945. Xecho hi there Joe | mail joe
  946. X.DE
  947. Xdoes not result in the message ``hi there Joe'' arriving in the mailbox
  948. X``joe'', you're going to have to fake it.
  949. XSee \fIDirectory Layout\fR for insight on where to put a fake \fImail\fR
  950. Xso that C News components will use it rather than \fI/bin/mail\fR.
  951. X.PP
  952. XSimilarly, several parts of C News rely on being able to invoke \fIhostname\fR
  953. Xwithout arguments, and have it return a single word which is the name of the
  954. XCPU the code is running on.
  955. XAgain, you'll have to fake it if you don't have \fIhostname\fR
  956. Xor if it outputs something strange.
  957. X.PP
  958. XInput reception and output batching both want to use the \fIcompress\fR
  959. Xdata-compression program.
  960. X\fICompress\fR has been published on Usenet and is shipped with many Unix
  961. Xsystems these days, but if you don't have it, we recommend that you get
  962. Xit from your neighbors or the \fIcomp.sources.unix\fR archives.
  963. XIt is possible to configure C News so that it doesn't use \fIcompress\fR
  964. Xto compress news being transmitted, but you don't want to.
  965. X\fICompress\fR is good and it is fast.
  966. X.SH
  967. XLibraries
  968. X.PP
  969. XC News is mostly self-contained as far as libraries go.
  970. XIt does need some things that are not yet universal, like a full set
  971. Xof string functions (e.g. \fIstrtok\fR);
  972. Xwe provide reasonably portable versions of these for places that lack them.
  973. X.PP
  974. XOne thing that C News needs, because it is both useful
  975. Xand a user-visible part of B News,
  976. Xis the \fIdbm\fR library.
  977. XAT&T has stupidly omitted it from System V.
  978. XWe include an emulation or two that are claimed to work reasonably well.
  979. XIf your system doesn't have a real \fIdbm\fR, however, our recommendation
  980. Xis that you harass your supplier about it.
  981. X.SH
  982. XNetworking
  983. X.PP
  984. X(We're talking here about networking in the sense of NFS and all those fun
  985. Xthings, not \fIuucp\fR or TCP/IP.)
  986. XC News is designed to run on systems which consist of a conglomeration of
  987. Xmachines on a local network, with only one of them acting as news server.
  988. XBe warned, though, that if you're doing this, you need to have \fIrsh\fR
  989. Xor some reasonably equivalent way of executing a program on another CPU.
  990. XIf you've only got one machine,
  991. Xjust make sure you \fIdon't\fR have a \fI/usr/lib/news/server\fR file and
  992. Xforget the whole issue.
  993. X.SH
  994. XHighly System-Specific Things
  995. X.PP
  996. XThere are two small utilities within C News that are inevitably highly
  997. Xsystem-specific and have a high probability of needing changes to match
  998. Xyour system.
  999. XBoth normally live in \fI/usr/lib/newsbin\fR proper.
  1000. X.PP
  1001. X\fISpacefor\fR is invoked by various components of C News to find out
  1002. Xhow much disk space is available.
  1003. XThe space margins in it are ones we find reasonable, but you may need
  1004. Xto adjust them.
  1005. XOn an old System V system in particular (one where \fIdf\fR can't be applied
  1006. Xto any directory name, but needs to be given a name in \fI/dev\fR), you
  1007. Xwill also probably need to modify the locations to be \fIdf\fRed.
  1008. XYou will also need to fix \fIspacefor\fR if your system's \fIdf\fR yields
  1009. Xresults in some strange format or in some strange units.
  1010. XWe believe that we get it right for stock 4BSD,
  1011. Xmany (but probably not all) System Vs, modern Irix, and real Unix (Version 7).
  1012. XBeware introducing major inefficiencies:
  1013. X\fIspacefor\fR is called a lot.
  1014. X(Our current one could stand to be faster, in fact.)
  1015. XBeware, also, that \fIspacefor\fR is not intended to permit routine operation
  1016. Xusing filesystems that are on the brink of being full;
  1017. Xthe limits it imposes are only approximate, and no attempt has been made
  1018. Xto tune its clients to exploit every last available block.
  1019. X.PP
  1020. X\fIQueuelen\fR is invoked by the batcher to determine how long the current
  1021. X\fIuucp\fR queues are, so it can judge whether it should suspend batching
  1022. Xof output to a given site.
  1023. XThere is too much diversity in \fIuucp\fRs for us to try to do this for all
  1024. Xpossible versions.
  1025. XWe think we get it right for the two most common flavors
  1026. X(HDB, aka BNU, and old subdirectory versions).
  1027. XOur versions measure queue length in batches, not bytes,
  1028. Xbut it would not be hard to change this:
  1029. X\fIqueuelen\fR, the \fIbatchparms\fR control file, and the \fIsendbatches\fR
  1030. Xhow-many-batches-should-I-try-to-add logic need to agree on the units of
  1031. Xmeasurement, but (we think) nothing else cares.
  1032. X.PP
  1033. XIt is just possible that you might have to modify \fInewshostname\fR,
  1034. Xwhich also lives in \fI/usr/lib/newsbin\fR itself.
  1035. X\fINewshostname\fR delivers the name which should be applied to the
  1036. Xwhole system (not just the particular CPU) for news purposes.
  1037. XIt tries to be fairly clever about different ways of getting the name,
  1038. Xand in particular will take it out of \fI/usr/lib/news/whoami\fR if
  1039. Xthat file exists, but if you're doing something odd on a strange system,
  1040. Xchanges may be needed.
  1041. X.SH
  1042. XInput
  1043. X.PP
  1044. XInput from the net via \fIuucp\fR (or equivalent) shows up as batches of
  1045. Xnews to be fed to \fIrnews\fR or its obsolete synonym \fIcunbatch\fR.
  1046. XThese two programs normally live in \fI/bin\fR, although nothing in the
  1047. Xcode knows about this and they can go elsewhere (one of our systems does this).
  1048. XBoth are simple front ends that invoke \fIinput/newsspool\fR to store the
  1049. Xbatch, while taking precautions to report trouble and not to overflow disks.
  1050. XNeither \fIrnews\fR nor \fIcunbatch\fR needs to be setuid.
  1051. X.PP
  1052. XInput via NNTP over the Internet (or equivalent) uses rather different
  1053. Xmachinery but ends up creating a saved batch in much the same way as
  1054. X\fIinput/newsspool\fR does.
  1055. X.PP
  1056. X\fIInput/newsspool\fR is a small C program that saves a batch,
  1057. Xwriting into a file in \fI/usr/spool/news/in.coming\fR.
  1058. XIt must be able to create files there, and \fIinput/newsrun\fR (see below)
  1059. Xneeds to be able to read them and delete them.
  1060. XThis gets a little tricky because \fInewsspool\fR will usually be
  1061. Xrun by \fIuuxqt\fR as userid \fIuucp\fR (or something like that),
  1062. Xnot as \fInews\fR, which \fInewsrun\fR needs to run as.
  1063. XThe recommended solution is to have
  1064. X\fInewsspool\fR owned by \fInews\fR and setuid.
  1065. XAn alternative is to give the \fIin.coming\fR directory
  1066. Xthe userid of \fInews\fR and the groupid of \fIuucp\fR, or vice versa,
  1067. Xand set permissions so that either can access it.
  1068. XOne of our systems ran that way for a while.
  1069. X.PP
  1070. XTo actually process incoming news, \fIinput/newsrun\fR gets invoked
  1071. Xto decompress the spooled batches and
  1072. Xfeed them to \fIrelay/relaynews\fR (see below).
  1073. XThere is an option for \fInewsspool\fR to invoke
  1074. X\fInewsrun\fR when a batch is spooled,
  1075. Xbut a (usually)
  1076. Xpreferable method is to have \fIcron\fR invoke \fInewsrun\fR once an hour.
  1077. X\fINewsrun\fR does its own locking to prevent multiple occurrences running
  1078. Xsimultaneously.
  1079. XThere is a related program, \fIinput/newsrunning\fR, that can be used
  1080. Xto set or clear a flag that stops \fInewsrun\fR;
  1081. Xthis may be a useful tactic if \fInewsrun\fR should not run at
  1082. Xcertain times.
  1083. XBoth \fInewsrun\fR and \fInewsrunning\fR must be run as \fInews\fR.
  1084. X.PP
  1085. XWhen a user posts news, he (or his news reader) does it by feeding the
  1086. Xarticle to \fI/bin/inews\fR.
  1087. XIn C News, \fIinews\fR is a complex shell file that attends to preliminaries
  1088. Xand then invokes \fIrelay/relaynews\fR.
  1089. X\fIInews\fR does not need to be setuid (indeed, we make no use of setuid
  1090. Xshell files at all, since they are grossly insecure).
  1091. X\fIRelaynews\fR is the heart of C News, the program that actually pulls
  1092. Xbatches apart and places articles into the database.
  1093. XIf users are to be able to post news, \fIrelaynews\fR should be owned
  1094. Xby \fInews\fR and setuid.
  1095. X.SH
  1096. XNews Readers
  1097. X.PP
  1098. XC News is fully compatible with B News to any news-reader program that
  1099. Xdoes not inspect the middle field of \fI/usr/lib/news/history\fR too closely.
  1100. XStandard B News news readers work fine.
  1101. XWe supply a simple news reader
  1102. X(written by, and included with permission of, Michael Rourke)
  1103. Xas a naive-user replacement for the B News
  1104. X\fIreadnews\fR.
  1105. XMore complex programs are preferable for serious news enthusiasts.
  1106. XWe recommend Larry Wall's \fIrn\fR
  1107. X(which we use, unmodified),
  1108. Xbut there are others.
  1109. X.SH
  1110. XOutput
  1111. X.PP
  1112. X\fIRelay/relaynews\fR normally queues up news for transmission to other
  1113. Xsystems by appending article names and sizes to batch files
  1114. Xin subdirectories under \fI/usr/spool/news/out.going\fR.
  1115. XThese are then processed by \fIbatch/sendbatches\fR, which should be run
  1116. Xregularly, as \fInews\fR, by \fIcron\fR.
  1117. X\fISendbatches\fR can be configured to use a variety of transmission
  1118. Xmechanisms, the usual being \fIuux\fR.
  1119. X.SH
  1120. XExpiry And Related
  1121. X.PP
  1122. XNews articles are removed, possibly with archiving to an archive area,
  1123. Xby the expiry subsystem.
  1124. X\fIExpire/doexpire\fR should be invoked now and then,
  1125. Xas \fInews\fR, by \fIcron\fR.
  1126. XWe suggest nightly.
  1127. X\fIDoexpire\fR actually invokes \fIexpire/expire\fR to do the dirty work.
  1128. X.PP
  1129. XC News \fIexpire\fR does not have an option to rebuild the
  1130. X\fI/usr/lib/news/history\fR file from scratch,
  1131. Xsince that has nothing to do with expiry.
  1132. XTo rebuild \fIhistory\fR,
  1133. Xe.g. if it has been destroyed,
  1134. Xuse \fIexpire/mkhistory\fR.
  1135. X.PP
  1136. XSome news readers need to have the third field of \fI/usr/lib/news/active\fR
  1137. Xupdated occasionally to show the lowest article number still present in each
  1138. Xnewsgroup.
  1139. XFrankly, we think such news readers simply need to be fixed.
  1140. XC News \fIexpire\fR does not do this updating.
  1141. XFor those who use such news readers, however, \fIexpire/upact\fR will do
  1142. Xsuch an update.
  1143. XIt should be run as \fInews\fR.
  1144. X.PP
  1145. X\fIRelay/relaynews\fR
  1146. Xdoes not implement the ``Supersedes:'' header, which we loathe
  1147. Xas a crude solution to the wrong problem.
  1148. XAlas, the network-map distribution in
  1149. X\fIcomp.mail.maps\fR relies heavily on it.
  1150. XOur preferred approach is to process map articles as they arrive and
  1151. Xthen expire them normally (using \fIexpire\fR's expiry-date-override
  1152. Xfeatures to insist that they expire promptly).
  1153. XHowever, for those who don't do this, and don't want to have megabytes
  1154. Xof obsolete map data piling up,
  1155. X\fIexpire/superkludge\fR will remove superseded files in specified
  1156. Xnewsgroups.
  1157. XIt should be run as \fInews\fR by \fIcron\fR, perhaps nightly.
  1158. X.SH
  1159. XReboots and Administration
  1160. X.PP
  1161. XIf the system crashes, things like locks must be cleaned out if C News
  1162. Xis to function properly after reboot.
  1163. X\fI/etc/rc\fR, or equivalent, should run \fImaint/newsboot\fR during reboot,
  1164. Xas \fInews\fR.
  1165. X.PP
  1166. XCertain log files can grow without bounds if not renamed/removed now and
  1167. Xthen.
  1168. XWe recommend running \fImaint/newsdaily\fR once a day.
  1169. XIt tends to logs, keeping a generation or two for use in trouble tracking,
  1170. Xand also sends mail to the news administrator in the event that something
  1171. Xfunny has happened.
  1172. X.PP
  1173. XIn general, C News does not attempt to break locks,
  1174. Xon the philosophy that a stale lock may mean something is badly wrong.
  1175. X(See
  1176. X\fILocking in C News\fR for details on locking methods.)
  1177. XThe various programs will either give up, to return later, or wait
  1178. Xpatiently for the lock to go away.
  1179. XIf one doesn't keep an eye on things, a problem of some kind can hang up
  1180. Xthe news system for quite a while.
  1181. XRunning \fImaint/newswatch\fR once in a while\(emwe recommend a few times
  1182. Xa day\(emwill alert administrators to signs of trouble.
  1183. XExcept on grossly slow systems, C News locks should never hang around for
  1184. Xany great length of time.
  1185. !
  1186. echo 'doc/Makefile':
  1187. sed 's/^X//' >'doc/Makefile' <<'!'
  1188. Xinstall.out:    install
  1189. X    nroff -Tdumb -ms install >$@
  1190. !
  1191. echo done
  1192.  
  1193.  
  1194.