386BSD 0.1 development
[unix-history] / usr / othersrc / share / doc / usd / 11.notes / 3.2
CommitLineData
cadc73ad
WJ
1.\" Copyright (c) 1980 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\" 3. All advertising materials mentioning features or use of this software
13.\" must display the following acknowledgement:
14.\" This product includes software developed by the University of
15.\" California, Berkeley and its contributors.
16.\" 4. Neither the name of the University nor the names of its contributors
17.\" may be used to endorse or promote products derived from this software
18.\" without specific prior written permission.
19.\"
20.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30.\" SUCH DAMAGE.
31.\"
32.\" @(#)3.2 6.2 (Berkeley) 4/17/91
33.\"
34.ls 1
35.se "Initial Installation & Parameters"
36
37 Installation of the notesfile system requires
38the following:
39
40.bx
41.ix
42A working familiarity with version 7 UNIX (or later)
43(and UUCP for intersystem transfers).
44.ix
45The notesfile distribution tape. (The distribution is already in /usr/src/new/notes,
46the user-contributed software area, in 4.3BSD).
47.ix
48A signon for the notesfile owner.
49This signon should be in its own group. The notes
50package runs set-gid; mixing the notes group with other
51groups is not recommended.
52.ix
53An ``anonymous'' signon.
54This signon should be an unused user-id.
55The notesfile system prohibits this user-id from reading and
56writing notes.
57.ix
58The ability to write into the directories where the notesfile
59binaries and data base are to live.
60.ex
61
62 Appendix A (``Notesfile Installation Checklist'') is a helpful
63guide for installing the notesfile system.
64The distribution is made from a VAX running 4.2 Bsd.
65In most cases there are only a few files that need to be
66modified:
67``src/parms.h'',
68``src/Makefile'',
69and
70``src/newsgate.h'' (if you are interfacing to USENET).
71
72 First: read in the
73distribution tape.
74The tape is a TAR format tape.
75This will read in several directories worth of data.
76The ``src'' directory contains all source code for the notesfile
77system and the internal help files.
78The ``doc'' directory contains an nroff source for the user manual and
79the macros that were used to generate it.
80The ``man'' directory contains the nroff sources
81for the
82notesfile manual pages.
83The ``Samples'' directory is a collection of various system files from our
84machine;
85they are included to provide examples in setting the matching files on
86your system.
87
88 After the tape has been read in, select the appropriate parameters.
89
90.ss "Selecting Appropriate Constants"
91
92 Before compiling the notesfile system,
93it must be configured to match your system.
94The location of spooling directories and command directories,
95the UNIX kernel,
96and
97policies on ``non-standard'' software
98may require changes in the default configuration.
99
100 Configuring the notesfile system is accomplished through
101modifying two files, both in the ``src'' directory of
102the distribution.
103The ``parms.h'' file contains information on values for
104the default archival time,
105UNIX kernel type,
106and
107the behavior of the notesfile system such as whether
108to keep core images when the notesfile system detects an
109internal error.
110The ``Makefile'' file contains definitions
111of the spooling and command directories,
112the notesfile ``owner'',
113and
114the ``anonymous'' user.
115
116 The distribution is configured for a UNIX 4.2 BSD system.
117The most frequently changed values,
118after the kernel definition,
119are the notesfile ``owner'' and the location of spooling
120and command directories.
121
122 Appendix A (``Notesfile Installation Checklist'')
123details each of the options in ``parms.h'' and ``Makefile''.
124It describes the meaning of the option and the effects of
125changing the value.
126The recommended method for choosing an appropriate configuration
127is to sit at a terminal with the checklist and mark each option
128as it is selected or rejected.
129
130.ss "Compiling the Notesfile System"
131
132 After all the appropriate parameters are set up, the next step is
133to generate the notesfile system.
134First, the requisite directories and files
135in /usr/bin (or wherever) should be manufactured.
136This procedure should be run exactly once and will probably have to be run
137by the superuser.
138To make these files type:
139
140.nf
141 make base
142.fi
143
144The next phase should be run while signed in as the notesfile ``owner''.
145Type:
146
147.nf
148 make boot
149.fi
150
151 If all goes well, this should end with a message to the effect
152that the notesfile system has been installed
153(approximately 17 minutes on a VAX-11/780)
154If anything goes wrong, perusal of the terminal dialogue should
155point out the offending steps.
156The most likely cause of errors will be a missing directory.
157
158 To replace the notesfile software
159any time after these two steps have been run, type:
160
161.nf
162 make install
163.fi
164
165 If at some time you are must change some of the internal constants
166of the notesfile package (such as string lengths and blocking factors),
167all the existing notesfiles on your system will be incompatible with the
168new instantiation of the program.
169The ``nfdump'' and ``nfload'' programs are useful for converting
170the data base from one format to another.
171The ``nfdump'' program should be compiled with the old configuration
172and the ``nfload'' program should be compiled with the new configuration.
173Documentation on these programs can be found in the appendices.
174
175.ss "User Subroutines"
176
177 The notesfile package contains several routines available
178to users in general.
179The nfabort routine generates a core image, places it in a specified
180place, logs the fact in a notesfile, and terminates.
181The nfcomment routine allows users to log text in a notesfile.
182These routines are useful for debugging information, and communication
183between program developers and users.
184Users can load these routines by specifying `-lnfcom' on
185the `cc' or `ld' command lines.
186
187 The normal installation procedure (``make install'') will
188compile the nfcomment routine and place it in the library directory.
189As distributed, the file is placed in the ``/usr/local/lib'' directory.
190To change this, modify the definition of ``LIBDIR'' in `Makefile'.
191
192.se "Installing the Man(1) Documentation"
193
194 Install the man(1) pages for the notesfile with the following
195commands.
196They are best done as super-user.
197
198.nf
199.ne 2
200 cd man
201 make install
202.fi
203
204The nroff sources for the documentation will be installed in the
205directory /usr/man in subdirectories man1, man3, and man8.
206
207.se "Interfacing to News(I)"
208
209 The notesfile system interfaces to the news(I)
210system.
211The newsinput program parses articles from the news system
212and inserts them in the appropriate notesfiles.
213The newsoutput program moves notes from the notesfile system
214to the news system.
215Neither program will move text between the two systems if the notesfile
216is not enabled for networking (see section 3.1.5).
217Newsoutput will not retransmit articles inserted by newsinput.
218Sites sharing notesfiles can all run both newsinput and newsoutput.
219
220 Appendix B contains instructions on how to interface
221a notesfile system to a news system.
222Configurations for isolated notesfiles sites, notesfile subnetworks,
223mapping between notesfile and newsgroup names,
224and a checklist for the gateway installation are included.
225
226 Since the notes system stores the
227entire text of a single notesfile
228in a single file, a notesfile system uses less space than the
229same scale news system.
230The notesfile system is generally more space-efficient
231than B news.
232
233.se "Housekeeping"
234
235 Notesfiles has a number of utilities to manage its
236data base.
237A number of shell scripts are included with the distribution
238which invoke the archival programs and trim logging files
239which otherwise grow without bounds.
240These shell scripts are included in the ``Samples'' subdirectory
241of the notesfile distribution and
242can be invoked automatically through cron(8).
243
244.ss "Cleaning up Disk Space"
245
246 When a note or response is deleted, a hole is left in that notesfile.
247This makes for quick deletion but tends to leave some disk space wasted.
248The compress option on the director page is one way that this space is
249reclaimed.
250The nfarchive program (see section 3.7.2) also returns unused space.
251Have cron run the nfarchive program weekly to automate
252space reclamation.
253
254.ss "Automatic Removal of Notes"
255
256 The nfarchive program archives notes untouched for more than
257a specified number of days.
258Archived notes and their responses are stored in
259an ``archive'' notesfile.
260``Archive'' notesfiles are typically found in the directory
261/usr/spool/oldnotes; this may vary between installations.
262The archives can be accessed automatically using the ``N'' command
263from the index, note and response displays or
264by explicitly naming the notesfile
265(notes /usr/spool/oldnotes/mynotes).
266The notes are deleted after they have been archived.
267After the archival, a compression of the notesfile is performed to
268recover the space formerly occupied by the archived notes.
269Nfarchive assumes that all months have 30 days and all years have 12 months.
270The format of the nfarchive command line is:
271
272 nfarchive [-d] [-m+ or -m-] [-#] [-w#] [-f file] topic
273
274 The -d option specifies that no archiving is to take place;
275the notes eligible are to be deleted.
276
277 The -m option specifies whether to check the director message
278status before archiving notes.
279Use ``-m+'' to archive notes which meet the age requirement and have
280the director message on.
281The ``-m-'' option archives notes of sufficient age with the director
282message turned off.
283If this option is omitted, notes are archived on the basis of age only.
284
285 The -# option specifies the age of eligible notes. The
286increment is days.
287The default is determined by the value of ARCHTIME in `parms.h' and
288is distributed as fourteen days.
289Each notesfile can specify a (possibly) different expiration
290threshold.
291Normally the notesfile will specify `default' and nfarchive
292uses the time specified on its command line.
293Ages specified in a notesfile override the times given on the
294nfarchive command line.
295
296 The -w# parameter specifies the working set size to
297use for notesfiles which do not specify a working set size.
298This determines a minimum number of notes to remain in a notesfile.
299If unspecified, the default working set size is 0.
300This value can be changed through the WORKSETSIZE variable
301in ``parms.h''.
302
303 Working sets and expiration thresholds work together
304in the following manner.
305Nfarchive first determines a maximum number of notes to delete.
306This is calculated from the number of notes in the notesfile
307(total notes minus ``holes'' caused by deletions)
308and the working set size.
309The archival program proceeds through the notesfile deleting
310notes older than the expiration threshold until it runs
311out of notes or the maximum number of notes has been deleted.
312
313 The -f option specifies a file containing a list of notesfiles
314to be archived.
315Multiple -f parameters are permitted and can be intermixed with
316`topic' parameters.
317Notesfile name pattern matching is performed on both `topic' parameters
318and the entries in a file specified by the -f option.
319
320 Mapping between an active notesfile and its archive is
321listed in the file ``.utilities/net.aliases/Archive-into''.
322This file contains pairs of ABSOLUTE notesfile names
323(``/usr/spool/notes/mynotes'' instead of ``mynotes'').
324The first entry specifies the active notesfile;
325the second entry specifies the archive notesfile.
326Notesfiles not appearing in the archive mapping file will
327be placed in ``/usr/spool/oldnotes'' with the same
328final component as the active notesfile.
329Conflicts are possible.
330If unmapped, the notesfiles ``/usr/spool/notes/mynotes'' and
331``/some/other/place/mynotes'' will be archived into
332the same archive ``/usr/spool/oldnotes/mynotes''.
333
334.ss "Cleaning Sequencer Files"
335
336 A tool to remove sequencer entries for deleted users will be
337included in future releases of the notesfile package.
338This tool will traverse the sequencer directory removing files
339belonging to users whose signons no longer exist.
340The process can be made automatic by including an entry in the cron table.
341
342 A second sequencer related utility will traverse
343the sequencer directory
344and remove entries for deleted notesfiles.
345A similar user program will be provided to permit users to remove
346their sequencer entries for notesfiles that they no longer peruse.
347
348.ss "Additions to System Boot"
349
350 Since the notesfile system maintains several lock files to
351ensure mutual exclusion of each notesfile, a line similar to the following
352should be added to the /etc/rc or /etc/rc.local file:
353
354 rm -f /usr/spool/notes/.locks/*
355
356 Make sure `/usr/spool/notes' matches the MSTDIR parameter in the
357Makefile.
358This line will remove any locks left if the system has
359crashed.