Commit | Line | Data |
---|---|---|
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 | |
38 | the following: | |
39 | ||
40 | .bx | |
41 | .ix | |
42 | A working familiarity with version 7 UNIX (or later) | |
43 | (and UUCP for intersystem transfers). | |
44 | .ix | |
45 | The notesfile distribution tape. (The distribution is already in /usr/src/new/notes, | |
46 | the user-contributed software area, in 4.3BSD). | |
47 | .ix | |
48 | A signon for the notesfile owner. | |
49 | This signon should be in its own group. The notes | |
50 | package runs set-gid; mixing the notes group with other | |
51 | groups is not recommended. | |
52 | .ix | |
53 | An ``anonymous'' signon. | |
54 | This signon should be an unused user-id. | |
55 | The notesfile system prohibits this user-id from reading and | |
56 | writing notes. | |
57 | .ix | |
58 | The ability to write into the directories where the notesfile | |
59 | binaries and data base are to live. | |
60 | .ex | |
61 | ||
62 | Appendix A (``Notesfile Installation Checklist'') is a helpful | |
63 | guide for installing the notesfile system. | |
64 | The distribution is made from a VAX running 4.2 Bsd. | |
65 | In most cases there are only a few files that need to be | |
66 | modified: | |
67 | ``src/parms.h'', | |
68 | ``src/Makefile'', | |
69 | and | |
70 | ``src/newsgate.h'' (if you are interfacing to USENET). | |
71 | ||
72 | First: read in the | |
73 | distribution tape. | |
74 | The tape is a TAR format tape. | |
75 | This will read in several directories worth of data. | |
76 | The ``src'' directory contains all source code for the notesfile | |
77 | system and the internal help files. | |
78 | The ``doc'' directory contains an nroff source for the user manual and | |
79 | the macros that were used to generate it. | |
80 | The ``man'' directory contains the nroff sources | |
81 | for the | |
82 | notesfile manual pages. | |
83 | The ``Samples'' directory is a collection of various system files from our | |
84 | machine; | |
85 | they are included to provide examples in setting the matching files on | |
86 | your 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, | |
93 | it must be configured to match your system. | |
94 | The location of spooling directories and command directories, | |
95 | the UNIX kernel, | |
96 | and | |
97 | policies on ``non-standard'' software | |
98 | may require changes in the default configuration. | |
99 | ||
100 | Configuring the notesfile system is accomplished through | |
101 | modifying two files, both in the ``src'' directory of | |
102 | the distribution. | |
103 | The ``parms.h'' file contains information on values for | |
104 | the default archival time, | |
105 | UNIX kernel type, | |
106 | and | |
107 | the behavior of the notesfile system such as whether | |
108 | to keep core images when the notesfile system detects an | |
109 | internal error. | |
110 | The ``Makefile'' file contains definitions | |
111 | of the spooling and command directories, | |
112 | the notesfile ``owner'', | |
113 | and | |
114 | the ``anonymous'' user. | |
115 | ||
116 | The distribution is configured for a UNIX 4.2 BSD system. | |
117 | The most frequently changed values, | |
118 | after the kernel definition, | |
119 | are the notesfile ``owner'' and the location of spooling | |
120 | and command directories. | |
121 | ||
122 | Appendix A (``Notesfile Installation Checklist'') | |
123 | details each of the options in ``parms.h'' and ``Makefile''. | |
124 | It describes the meaning of the option and the effects of | |
125 | changing the value. | |
126 | The recommended method for choosing an appropriate configuration | |
127 | is to sit at a terminal with the checklist and mark each option | |
128 | as 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 | |
133 | to generate the notesfile system. | |
134 | First, the requisite directories and files | |
135 | in /usr/bin (or wherever) should be manufactured. | |
136 | This procedure should be run exactly once and will probably have to be run | |
137 | by the superuser. | |
138 | To make these files type: | |
139 | ||
140 | .nf | |
141 | make base | |
142 | .fi | |
143 | ||
144 | The next phase should be run while signed in as the notesfile ``owner''. | |
145 | Type: | |
146 | ||
147 | .nf | |
148 | make boot | |
149 | .fi | |
150 | ||
151 | If all goes well, this should end with a message to the effect | |
152 | that the notesfile system has been installed | |
153 | (approximately 17 minutes on a VAX-11/780) | |
154 | If anything goes wrong, perusal of the terminal dialogue should | |
155 | point out the offending steps. | |
156 | The most likely cause of errors will be a missing directory. | |
157 | ||
158 | To replace the notesfile software | |
159 | any 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 | |
166 | of the notesfile package (such as string lengths and blocking factors), | |
167 | all the existing notesfiles on your system will be incompatible with the | |
168 | new instantiation of the program. | |
169 | The ``nfdump'' and ``nfload'' programs are useful for converting | |
170 | the data base from one format to another. | |
171 | The ``nfdump'' program should be compiled with the old configuration | |
172 | and the ``nfload'' program should be compiled with the new configuration. | |
173 | Documentation on these programs can be found in the appendices. | |
174 | ||
175 | .ss "User Subroutines" | |
176 | ||
177 | The notesfile package contains several routines available | |
178 | to users in general. | |
179 | The nfabort routine generates a core image, places it in a specified | |
180 | place, logs the fact in a notesfile, and terminates. | |
181 | The nfcomment routine allows users to log text in a notesfile. | |
182 | These routines are useful for debugging information, and communication | |
183 | between program developers and users. | |
184 | Users can load these routines by specifying `-lnfcom' on | |
185 | the `cc' or `ld' command lines. | |
186 | ||
187 | The normal installation procedure (``make install'') will | |
188 | compile the nfcomment routine and place it in the library directory. | |
189 | As distributed, the file is placed in the ``/usr/local/lib'' directory. | |
190 | To 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 | |
195 | commands. | |
196 | They are best done as super-user. | |
197 | ||
198 | .nf | |
199 | .ne 2 | |
200 | cd man | |
201 | make install | |
202 | .fi | |
203 | ||
204 | The nroff sources for the documentation will be installed in the | |
205 | directory /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) | |
210 | system. | |
211 | The newsinput program parses articles from the news system | |
212 | and inserts them in the appropriate notesfiles. | |
213 | The newsoutput program moves notes from the notesfile system | |
214 | to the news system. | |
215 | Neither program will move text between the two systems if the notesfile | |
216 | is not enabled for networking (see section 3.1.5). | |
217 | Newsoutput will not retransmit articles inserted by newsinput. | |
218 | Sites sharing notesfiles can all run both newsinput and newsoutput. | |
219 | ||
220 | Appendix B contains instructions on how to interface | |
221 | a notesfile system to a news system. | |
222 | Configurations for isolated notesfiles sites, notesfile subnetworks, | |
223 | mapping between notesfile and newsgroup names, | |
224 | and a checklist for the gateway installation are included. | |
225 | ||
226 | Since the notes system stores the | |
227 | entire text of a single notesfile | |
228 | in a single file, a notesfile system uses less space than the | |
229 | same scale news system. | |
230 | The notesfile system is generally more space-efficient | |
231 | than B news. | |
232 | ||
233 | .se "Housekeeping" | |
234 | ||
235 | Notesfiles has a number of utilities to manage its | |
236 | data base. | |
237 | A number of shell scripts are included with the distribution | |
238 | which invoke the archival programs and trim logging files | |
239 | which otherwise grow without bounds. | |
240 | These shell scripts are included in the ``Samples'' subdirectory | |
241 | of the notesfile distribution and | |
242 | can 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. | |
247 | This makes for quick deletion but tends to leave some disk space wasted. | |
248 | The compress option on the director page is one way that this space is | |
249 | reclaimed. | |
250 | The nfarchive program (see section 3.7.2) also returns unused space. | |
251 | Have cron run the nfarchive program weekly to automate | |
252 | space reclamation. | |
253 | ||
254 | .ss "Automatic Removal of Notes" | |
255 | ||
256 | The nfarchive program archives notes untouched for more than | |
257 | a specified number of days. | |
258 | Archived notes and their responses are stored in | |
259 | an ``archive'' notesfile. | |
260 | ``Archive'' notesfiles are typically found in the directory | |
261 | /usr/spool/oldnotes; this may vary between installations. | |
262 | The archives can be accessed automatically using the ``N'' command | |
263 | from the index, note and response displays or | |
264 | by explicitly naming the notesfile | |
265 | (notes /usr/spool/oldnotes/mynotes). | |
266 | The notes are deleted after they have been archived. | |
267 | After the archival, a compression of the notesfile is performed to | |
268 | recover the space formerly occupied by the archived notes. | |
269 | Nfarchive assumes that all months have 30 days and all years have 12 months. | |
270 | The 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; | |
275 | the notes eligible are to be deleted. | |
276 | ||
277 | The -m option specifies whether to check the director message | |
278 | status before archiving notes. | |
279 | Use ``-m+'' to archive notes which meet the age requirement and have | |
280 | the director message on. | |
281 | The ``-m-'' option archives notes of sufficient age with the director | |
282 | message turned off. | |
283 | If this option is omitted, notes are archived on the basis of age only. | |
284 | ||
285 | The -# option specifies the age of eligible notes. The | |
286 | increment is days. | |
287 | The default is determined by the value of ARCHTIME in `parms.h' and | |
288 | is distributed as fourteen days. | |
289 | Each notesfile can specify a (possibly) different expiration | |
290 | threshold. | |
291 | Normally the notesfile will specify `default' and nfarchive | |
292 | uses the time specified on its command line. | |
293 | Ages specified in a notesfile override the times given on the | |
294 | nfarchive command line. | |
295 | ||
296 | The -w# parameter specifies the working set size to | |
297 | use for notesfiles which do not specify a working set size. | |
298 | This determines a minimum number of notes to remain in a notesfile. | |
299 | If unspecified, the default working set size is 0. | |
300 | This value can be changed through the WORKSETSIZE variable | |
301 | in ``parms.h''. | |
302 | ||
303 | Working sets and expiration thresholds work together | |
304 | in the following manner. | |
305 | Nfarchive first determines a maximum number of notes to delete. | |
306 | This is calculated from the number of notes in the notesfile | |
307 | (total notes minus ``holes'' caused by deletions) | |
308 | and the working set size. | |
309 | The archival program proceeds through the notesfile deleting | |
310 | notes older than the expiration threshold until it runs | |
311 | out of notes or the maximum number of notes has been deleted. | |
312 | ||
313 | The -f option specifies a file containing a list of notesfiles | |
314 | to be archived. | |
315 | Multiple -f parameters are permitted and can be intermixed with | |
316 | `topic' parameters. | |
317 | Notesfile name pattern matching is performed on both `topic' parameters | |
318 | and the entries in a file specified by the -f option. | |
319 | ||
320 | Mapping between an active notesfile and its archive is | |
321 | listed in the file ``.utilities/net.aliases/Archive-into''. | |
322 | This file contains pairs of ABSOLUTE notesfile names | |
323 | (``/usr/spool/notes/mynotes'' instead of ``mynotes''). | |
324 | The first entry specifies the active notesfile; | |
325 | the second entry specifies the archive notesfile. | |
326 | Notesfiles not appearing in the archive mapping file will | |
327 | be placed in ``/usr/spool/oldnotes'' with the same | |
328 | final component as the active notesfile. | |
329 | Conflicts are possible. | |
330 | If unmapped, the notesfiles ``/usr/spool/notes/mynotes'' and | |
331 | ``/some/other/place/mynotes'' will be archived into | |
332 | the 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 | |
337 | included in future releases of the notesfile package. | |
338 | This tool will traverse the sequencer directory removing files | |
339 | belonging to users whose signons no longer exist. | |
340 | The process can be made automatic by including an entry in the cron table. | |
341 | ||
342 | A second sequencer related utility will traverse | |
343 | the sequencer directory | |
344 | and remove entries for deleted notesfiles. | |
345 | A similar user program will be provided to permit users to remove | |
346 | their 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 | |
351 | ensure mutual exclusion of each notesfile, a line similar to the following | |
352 | should 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 | |
357 | Makefile. | |
358 | This line will remove any locks left if the system has | |
359 | crashed. |