]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/csup/csup.1
This commit was generated by cvs2svn to compensate for changes in r172677,
[FreeBSD/FreeBSD.git] / contrib / csup / csup.1
1 .\" Copyright 1996-2003 John D. Polstra.
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 .\"
13 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 .\"
24 .\" $Id: cvsup.1,v 1.70 2003/03/04 18:23:46 jdp Exp $
25 .\" $FreeBSD$
26 .\"
27 .Dd February 1, 2006
28 .Os FreeBSD
29 .Dt CSUP 1
30 .Sh NAME
31 .Nm csup
32 .Nd network distribution package for CVS repositories
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl 146ksvzZ
36 .Op Fl A Ar addr
37 .Op Fl b Ar base
38 .Op Fl c Ar collDir
39 .Op Fl d Ar delLimit
40 .Op Fl h Ar host
41 .Op Fl i Ar pattern
42 .Op Fl l Ar lockfile
43 .Op Fl L Ar verbosity
44 .Op Fl p Ar port
45 .Op Fl r Ar maxRetries
46 .Ar supfile
47 .Sh DESCRIPTION
48 .Nm
49 is a software package for updating collections of files across a network.
50 It is a rewrite of the
51 .Nm CVSup
52 software in C.
53 This manual page describes the usage of the
54 .Nm
55 client program.
56 .Pp
57 Unlike more traditional network distribution packages, such as
58 .Nm rdist
59 and
60 .Nm sup ,
61 .Nm
62 has specific optimizations for distributing CVS repositories.
63 .Nm
64 takes advantage of the properties of CVS repositories and the files they
65 contain (in particular, RCS files), enabling it to perform updates much
66 faster than traditional systems.
67 .Pp
68 .Nm
69 is a general-purpose network file updating package.
70 It is extremely fast,
71 even for collections of files which have nothing to do with CVS or
72 RCS.
73 .Sh OPTIONS
74 The client program
75 .Nm
76 requires at least a single argument,
77 .Ar supfile .
78 It names a file describing one or more collections of files to be
79 transferred and/or updated from the server.
80 The
81 .Ar supfile
82 has a format similar to the corresponding file used by
83 .Nm sup .
84 In most cases,
85 .Nm
86 can use existing
87 .Nm sup Ar supfiles .
88 .Pp
89 The following options are supported by
90 .Nm :
91 .Bl -tag -width Fl
92 .It Fl 1
93 Disables automatic retries when transient failures occur.
94 Without this option, a transient failure such as a dropped network
95 connection causes
96 .Nm
97 to retry repeatedly, using randomized exponential backoff to space the
98 retries.
99 This option is equivalent to
100 .Fl r Cm 0 .
101 .It Fl 4
102 Forces
103 .Nm
104 to use IPv4 addresses only.
105 .It Fl 6
106 Forces
107 .Nm
108 to use IPv6 addresses only.
109 .It Fl A Ar addr
110 Specifies a local address to bind to when connecting to the server.
111 The local address might be a hostname or a numeric host address string
112 consisting of a dotted decimal IPv4 address or an IPv6 address.
113 This may be useful on hosts which have multiple IP addresses.
114 .It Fl b Ar base
115 Specifies the base directory under which
116 .Nm
117 will maintain its bookkeeping files, overriding any
118 .Cm base
119 specifications in the
120 .Ar supfile .
121 .It Fl c Ar collDir
122 Specifies the subdirectory of
123 .Ar base
124 where the information about the collections is maintained.
125 The default is
126 .Pa sup .
127 .It Fl d Ar delLimit
128 Specifies the maximum number of files that may be deleted in a
129 single update run.
130 Any attempt to exceed the limit results in a fatal error.
131 This can provide some protection against temporary configuration
132 mistakes on the server.
133 The default limit is infinity.
134 .It Fl h Ar host
135 Specifies the server host to contact, overriding any
136 .Cm host
137 specifications in the
138 .Ar supfile .
139 .It Fl i Ar pattern
140 Causes
141 .Nm
142 to include only files and directories matching
143 .Ar pattern
144 in the update.  If a directory matches the pattern, then the entire
145 subtree rooted at the directory is included.  If this option is
146 specified multiple times, the patterns are combined using the
147 .Ql or
148 operation.  If no
149 .Fl i
150 options are given, the default is to update all files in each
151 collection.
152 .Pp
153 The
154 .Ar pattern
155 is a standard file name pattern.
156 It is interpreted relative to the collection's prefix directory.
157 Slash characters are matched only by explicit slashes in the pattern.
158 Leading periods in file name are not treated specially.
159 .It Fl k
160 Causes
161 .Nm
162 to keep the temporary copies of any incorrectly edited files, in the
163 event of checksum mismatches.
164 This option is for debugging, to help determine why the files were
165 edited incorrectly.
166 Regardless of whether this option is specified, the permanent versions
167 of faulty files are replaced with correct versions obtained by
168 transferring the files in their entirety.
169 Such transfers are called fixups.
170 .It Fl l Ar lockfile
171 Creates and locks the
172 .Ar lockfile
173 while the update is in progress.
174 If
175 .Ar lockfile
176 is already locked,
177 .Nm
178 fails without performing automatic retries.
179 This option is useful when
180 .Nm
181 is executed periodically from
182 .Nm cron .
183 It prevents a job from interfering with an earlier job that is perhaps
184 taking extra long because of network problems.
185 .Pp
186 The process-ID is written to the lock file in text form when the lock
187 is successfully acquired.
188 Upon termination of the update, the lock file is removed.
189 .It Fl L Ar verbosity
190 Sets the verbosity level for output.
191 A level of 0 causes
192 .Nm
193 to be completely silent unless errors occur.
194 A level of 1 (the default) causes each updated file to be listed.
195 A level of 2 provides more detailed information about the updates
196 performed on each file.
197 All messages are directed to the standard output.
198 .It Fl p Ar port
199 Sets the TCP port to which
200 .Nm
201 attempts to connect on the server host.
202 The default port is 5999.
203 .It Fl r Ar maxRetries
204 Limits the number of automatic retries that will be attempted when
205 transient errors such as lost network connections are encountered.
206 By default,
207 .Nm
208 will retry indefinitely until an update is successfully completed.
209 The retries are spaced using randomized exponential backoff.
210 Note that
211 .Fl r Cm 0
212 is equivalent to the
213 .Fl 1
214 option.
215 .It Fl s
216 Suppresses the check of each client file's status against what is
217 recorded in the list file.  Instead, the list file is assumed to be
218 accurate.  This option greatly reduces the amount of disk activity and
219 results in faster updates with less load on the client host.  However
220 it should only be used if client's files are never modified locally in
221 any way.  Mirror sites may find this option beneficial to reduce the
222 disk load on their systems.  For safety, even mirror sites should run
223 .Nm
224 occasionally (perhaps once a day) without the
225 .Fl s
226 option.
227 .Pp
228 Without the
229 .Fl s
230 option,
231 .Nm
232 performs a
233 .Xr stat 2
234 call on each file and verifies that its attributes match those
235 recorded in the list file.  This ensures that any file changes made
236 outside of
237 .Nm
238 are detected and corrected.
239 .Pp
240 If the
241 .Fl s
242 option is used when one or more files have been modified locally, the
243 results are undefined.  Local file damage may remain uncorrected,
244 updates may be missed, or
245 .Nm
246 may abort prematurely.
247 .It Fl v
248 Prints the version number and exits, without contacting the server.
249 .It Fl z
250 Enables compression for all collections, as if the
251 .Cm compress
252 keyword were added to every collection in the
253 .Ar supfile .
254 .It Fl Z
255 Disables compression for all collections, as if the
256 .Cm compress
257 keyword were removed from every collection in the
258 .Ar supfile .
259 .El
260 .Pp
261 The
262 .Ar supfile
263 is a text file which specifies the file collections to be updated.
264 Comments begin with
265 .Ql #
266 and extend to the end of the line.  Lines that are empty except for
267 comments and white space are ignored.  Each remaining line begins
268 with the name of a server-defined collection of files.  Following the
269 collection name on the line are zero or more keywords or keyword=value
270 pairs.
271 .Pp
272 Default settings may be specified in lines whose collection name is
273 .Cm *default .
274 Such defaults will apply to subsequent lines in the
275 .Ar supfile .
276 Multiple
277 .Cm *default
278 lines may be present.
279 New values augment or override any defaults specified earlier in the
280 .Ar supfile .
281 Values specified explicitly for a collection override any default
282 values.
283 .Pp
284 The most commonly used keywords are:
285 .Bl -tag -width Fl
286 .It Cm release= Ns Ar releaseName
287 This specifies the release of the files within a collection.
288 Like collection names, release names are defined by the server
289 configuration files.  Usually there is only one release in each
290 collection, but there may be any number.  Collections which come from
291 a CVS repository often use
292 .Cm release=cvs
293 by convention.  Non-CVS collections conventionally use
294 .Cm release=current .
295 .It Cm base= Ns Ar base
296 This specifies a directory under which
297 .Nm
298 will maintain its bookkeeping files, describing the state of each
299 collection on the client machine.
300 The
301 .Ar base
302 directory must already exist;
303 .Nm
304 will not create it.
305 The default
306 .Ar base
307 directory is
308 .Pa /usr/local/etc/csup .
309 .It Cm prefix= Ns Ar prefix
310 This is the directory under which updated files will be placed.
311 By default, it is the same as
312 .Ar base .
313 If it is not an absolute pathname, it is interpreted relative to
314 .Ar base .
315 The
316 .Ar prefix
317 directory must already exist;
318 .Nm
319 will not create it.
320 .Pp
321 As a special case, if
322 .Ar prefix
323 is a symbolic link pointing to a nonexistent file named
324 .Ql SKIP ,
325 then
326 .Nm
327 will skip the collection.
328 The parameters associated with the collection are still checked for
329 validity, but none of its files will be updated.
330 This feature allows a site to use a standard
331 .Ar supfile
332 on several machines, yet control which collections get updated on a
333 per-machine basis.
334 .It Cm host= Ns Ar hostname
335 This specifies the server machine from which all files will be taken.
336 .Nm
337 requires that all collections in a single run come from the same host.
338 If you wish to update collections from several different hosts, you must
339 run
340 .Nm
341 several times.
342 .It Cm delete
343 The presence of this keyword gives
344 .Nm
345 permission to delete files.
346 If it is missing, no files will be deleted.
347 .Pp
348 The presence of the
349 .Cm delete
350 keyword puts
351 .Nm
352 into so-called
353 .Em exact
354 mode.  In exact mode,
355 .Nm
356 does its best to make the client's files correspond to those on the server.
357 This includes deleting individual deltas and symbolic tags from RCS
358 files, as well as deleting entire files.
359 In exact mode,
360 .Nm
361 verifies every edited file with a checksum, to ensure that the edits
362 have produced a file identical to the master copy on the server.
363 If the checksum test fails for a file, then
364 .Nm
365 falls back upon transferring the entire file.
366 .Pp
367 In general,
368 .Nm
369 deletes only files which are known to the server.
370 Extra files present in the client's tree are left alone, even in exact
371 mode.
372 More precisely,
373 .Nm
374 is willing to delete two classes of files:
375 .Bl -bullet -compact
376 .It
377 Files that were previously created or updated by
378 .Nm
379 itself.
380 .It
381 Checked-out versions of files which are marked as dead on the server.
382 .El
383 .It Cm use-rel-suffix
384 Causes
385 .Nm
386 to append a suffix constructed from the release and tag to the name of
387 each list file that it maintains.
388 See
389 .Sx THE LIST FILE
390 for details.
391 .It Cm compress
392 This enables compression of all data sent across the network.
393 Compression is quite effective, normally eliminating 65% to 75% of the
394 bytes that would otherwise need to be transferred.
395 However, it is costly in terms of CPU time on both the client and the
396 server.
397 On local area networks, compression is generally counter-productive; it
398 actually slows down file updates.
399 On links with speeds of 56K bits/second or less, compression is almost
400 always beneficial.
401 For network links with speeds between these two extremes, let
402 experimentation be your guide.
403 .Pp
404 The
405 .Fl z
406 command line option enables the
407 .Cm compress
408 keyword for all collections, regardless of what is specified in the supfile.
409 Likewise, the
410 .Fl Z
411 command line option disables the
412 .Cm compress
413 option for all collections.
414 .Nm
415 uses a looser checksum for RCS files, which ignores harmless
416 differences in white space.  Different versions of CVS and RCS produce
417 a variety of differences in white space for the same RCS files.  Thus
418 the strict checksum can report spurious mismatches for files which are
419 logically identical.  This can lead to numerous unneeded
420 .Dq fixups ,
421 and thus to slow updates.
422 .It Cm umask= Ns Ar n
423 Causes
424 .Nm
425 to use a umask value of
426 .Ar n
427 (an octal number) when updating the files in the collection.
428 This option is ignored if
429 .Cm preserve
430 is specified.
431 .El
432 .Pp
433 Some additional, more specialized keywords are described below.
434 Unrecognized keywords are silently ignored for backward compatibility
435 with
436 .Nm sup .
437 .Sh CVS MODE
438 .Nm CVSup
439 supports two primary modes of operation.
440 They are called
441 .Em CVS
442 mode and
443 .Em checkout
444 mode.
445 .Nm
446 only supports the checkout mode for now.
447 .Pp
448 In CVS mode, the client receives copies of the actual RCS files making
449 up the master CVS repository.  CVS mode is the default mode of operation.
450 It is appropriate when the user wishes to maintain a full copy of the
451 CVS repository on the client machine.
452 .Pp
453 CVS mode is also appropriate for file collections which are not
454 based upon a CVS repository.  The files are simply transferred
455 verbatim, without interpretation.
456 .Sh CHECKOUT MODE
457 In checkout mode, the client receives specific revisions of files,
458 checked out directly from the server's CVS repository.
459 Checkout mode allows the client to receive any version from the
460 repository, without requiring any extra disk space on the server for
461 storing multiple versions in checked-out form.
462 Checkout mode provides much flexibility beyond that basic functionality,
463 however.
464 The client can specify any CVS symbolic tag, or any date, or both, and
465 .Nm
466 will provide the corresponding checked-out versions of the files in the
467 repository.
468 .Pp
469 Checkout mode is selected on a per-collection basis, by the presence of
470 one or both of the following keywords in the
471 .Ar supfile :
472 .Bl -tag -width Fl
473 .It Cm tag= Ns Ar tagname
474 This specifies a symbolic tag that should be used to select the
475 revisions that are checked out from the CVS repository.
476 The tag may refer to either a branch or a specific revision.
477 It must be symbolic; numeric revision numbers are not supported.
478 .Pp
479 For the FreeBSD source repository, the most commonly used tags will be:
480 .Bl -tag -width RELENG_6
481 .It Li RELENG_6
482 The
483 .Ql stable
484 branch.
485 .It Li \&.
486 The main branch (the
487 .Ql current
488 release).
489 This is the default, if only the
490 .Cm date
491 keyword is given.
492 .El
493 .Sm off
494 .It Xo Cm date=
495 .Op Ar cc
496 .Ar yy.mm.dd.hh.mm.ss
497 .Xc
498 .Sm on
499 This specifies a date that should be used to select the revisions that
500 are checked out from the CVS repository.
501 The client will receive the revisions that were in effect at the
502 specified date and time.
503 .Pp
504 At present, the date format is inflexible.  All 17 or 19 characters must
505 be specified, exactly as shown.
506 For the years 2000 and beyond, specify the century
507 .Ar cc .
508 For earlier years, specify only the last two digits
509 .Ar yy .
510 Dates and times are considered to
511 be GMT.
512 The default date is
513 .Ql \&. ,
514 which means
515 .Dq as late as possible .
516 .El
517 .Pp
518 To enable checkout mode, you must specify at least one of these keywords.
519 If both are missing,
520 .Nm
521 defaults to CVS mode.
522 .Pp
523 If both a branch tag and a date are specified, then the revisions on the
524 given branch, as of the given date, will be checked out.  It is
525 permitted, but not particularly useful, to specify a date with a
526 specific release tag.
527 .Pp
528 In checkout mode, the tag and/or date may be changed between updates.
529 For example, suppose that a collection has been transferred using the
530 specification
531 .Ql tag=. .
532 The user could later change the specification to
533 .Ql tag=RELENG_3 .
534 This would cause
535 .Nm
536 to edit the checked-out files in such a way as to transform them from the
537 .Ql current
538 versions to the
539 .Ql stable
540 versions.
541 In general,
542 .Nm
543 is willing to transform any tag/date combination into any other tag/date
544 combination, by applying the intervening RCS deltas to the existing files.
545 .Pp
546 When transforming a collection of checked-out files from one tag to
547 another, it is important to specify the
548 .Cm list
549 keyword in the
550 .Ar supfile ,
551 to ensure that the same list file is used both before and after the
552 transformation.
553 The list file is described in
554 .Sx THE LIST FILE ,
555 below.
556 .Sh THE LIST FILE
557 For efficiency,
558 .Nm
559 maintains a bookkeeping file for each collection, called the list file.
560 The list file contains information about which files and revisions the client
561 currently possesses.
562 It also contains information used for verifying that the list file
563 is consistent with the actual files in the client's tree.
564 .Pp
565 The list file is not strictly necessary.  If it is deleted, or becomes
566 inconsistent with the actual client files,
567 .Nm
568 falls back upon a less efficient method of identifying the client's
569 files and performing its updates.
570 Depending on
571 .Nm csup Ns No 's
572 mode of operation, the fallback method employs time stamps, checksums, or
573 analysis of RCS files.
574 .Pp
575 Because the list file is not essential,
576 .Nm
577 is able to
578 .Dq adopt
579 an existing file tree acquired by FTP or from a CD-ROM.
580 .Nm
581 identifies the client's versions of the files, updates them as
582 necessary, and creates a list file for future use.
583 Adopting a foreign file tree is not as fast as performing a normal
584 update.
585 It also produces a heavier load on the server.
586 .Pp
587 The list file is stored in a collection-specific directory; see
588 .Sx FILES
589 for details.
590 Its name always begins with
591 .Ql checkouts .
592 If the keyword
593 .Cm use-rel-suffix
594 is specified in the
595 .Ar supfile ,
596 a suffix, formed from the release and tag, is appended to the name.
597 The default suffix can be overridden by specifying an explicit suffix in
598 the
599 .Ar supfile :
600 .Bl -tag -width Fl
601 .It Cm list= Ns Ar suffix
602 This specifies a suffix for the name of the list file.  A leading dot is
603 provided automatically.
604 For example,
605 .Ql list=stable
606 would produce a list file named
607 .Pa checkouts.stable ,
608 regardless of the release, tag, or
609 .Cm use-rel-suffix
610 keyword.
611 .El
612 .Sh REFUSE FILES
613 The user can specify sets of files that he does not wish to receive.
614 The files are specified as file name patterns in so-called
615 .Em refuse
616 files.
617 The patterns are separated by whitespace, and multiple patterns are
618 permitted on each line.
619 Files and directories matching the patterns are neither updated nor
620 deleted; they are simply ignored.
621 .Pp
622 There is currently no provision for comments in refuse files.
623 .Pp
624 The patterns are similar to those of
625 .Xr sh 1 ,
626 except that there is no special treatment for slashes or for
627 filenames that begin with a period.
628 For example, the pattern
629 .Ql *.c
630 will match any file name ending with
631 .Ql \&.c
632 including those in subdirectories, such as
633 .Ql foo/bar/lam.c .
634 All patterns are interpreted relative to the collection's prefix
635 directory.
636 .Pp
637 If the files are coming from a CVS repository, as is usually
638 the case, then they will be RCS files. These have a
639 .Ql \&,v
640 suffix which must be taken into account in the patterns. For
641 example, the FreeBSD documentation files are in a sub-directory of
642 .Ar base
643 called
644 .Ql doc .
645 If
646 .Ql Makefile
647 from that directory is not required then the line
648 .Pp 
649 .Bl -item -compact -offset indent
650 .It 
651 .Pa doc/Makefile
652 .El
653 .Pp
654 will not work because the file on the server is called
655 .Ql Makefile,v.
656 A better solution would be
657 .Pp
658 .Bl -item -compact -offset indent
659 .It
660 .Pa doc/Makefile*
661 .El 
662 .Pp 
663 which will match whether
664 .Ql Makefile
665 is an RCS file or not.
666 .Pp
667 As another example, to receive the FreeBSD documentation files without
668 the Japanese, Russian, and Chinese translations, create a refuse file
669 containing the following lines:
670 .Pp
671 .Bl -item -compact -offset indent
672 .It
673 .Pa doc/ja*
674 .It
675 .Pa doc/ru*
676 .It
677 .Pa doc/zh*
678 .El 
679 .Pp
680 As many as three refuse files are examined for each
681 .Ar supfile
682 line.
683 There can be a global refuse file named
684 .Sm off
685 .Ar base / Ar collDir Pa /refuse
686 .Sm on
687 which applies to all collections and releases.
688 There can be a per-collection refuse file named
689 .Sm off
690 .Xo Ar base / Ar collDir / Ar collection
691 .Pa /refuse
692 .Xc
693 .Sm on
694 which applies to a specific collection.
695 Finally, there can be a per-release and tag refuse file which applies only
696 to a given release/tag combination within a collection.
697 The name of the latter is formed by suffixing the name of the
698 per-collection refuse file in the same manner as described above for the
699 list file.
700 None of the refuse files are required to exist.
701 .Pp
702 .Nm
703 has a built-in default value of
704 .Ar /usr/local/etc/cvsup
705 for
706 .Ar base
707 and
708 .Ar sup
709 for 
710 .Ar collDir
711 but it is possible to override both of these. The value of
712 .Ar base
713 can be changed using the
714 .Fl b
715 option or a
716 .Ar base=pathname
717 entry in the
718 .Ar supfile .
719 (If both are used the 
720 .Fl b
721 option will override the
722 .Ar supfile
723 entry.)  The value of 
724 .Ar collDir
725 can only be changed with the
726 .Fl c
727 option; there is no
728 .Ar supfile
729 command to change it.
730 .Pp
731 As an example, suppose that the
732 .Ar base
733 and
734 .Ar collDir
735 both have their default values, and that the collection and release are
736 .Ql src-all
737 and
738 .Ql cvs ,
739 respectively.
740 Assume further that checkout mode is being used with
741 .Ql tag=RELENG_3 .
742 The three possible refuse files would then be named:
743 .Pp
744 .Bl -item -compact -offset indent
745 .It
746 .Pa /usr/local/etc/cvsup/sup/refuse
747 .It
748 .Pa /usr/local/etc/cvsup/sup/src-all/refuse
749 .It
750 .Pa /usr/local/etc/cvsup/sup/src-all/refuse.cvs:RELENG_3
751 .El
752 .Pp
753 If the
754 .Ar supfile
755 includes the command
756 .Ar base=/foo
757 the refuse files would be:
758 .Pp
759 .Bl -item -compact -offset indent
760 .It
761 .Pa /foo/sup/refuse
762 .It
763 .Pa /foo/sup/src-all/refuse
764 .It
765 .Pa /foo/sup/src-all/refuse.cvs:RELENG_3
766 .El
767 .Pp
768 If
769 .Fl b
770 .Ar /bar
771 is used (even with
772 .Ar base=/foo
773 in the
774 .Ar supfile ) :
775 .Pp
776 .Bl -item -compact -offset indent
777 .It
778 .Pa /bar/sup/refuse                
779 .It
780 .Pa /bar/sup/src-all/refuse                
781 .It
782 .Pa /bar/sup/src-all/refuse.cvs:RELENG_3                
783 .El
784 .Pp
785 and with
786 .Fl c
787 .Ar stool
788 as well:
789 .Pp
790 .Bl -item -compact -offset indent
791 .It
792 .Pa /bar/stool/refuse
793 .It 
794 .Pa /bar/stool/src-all/refuse
795 .It
796 .Pa /bar/stool/src-all/refuse.cvs:RELENG_3
797 .El
798 .Sh csup AND FIREWALLS
799 In its default mode,
800 .Nm
801 will work through any firewall which permits outbound connections to
802 port 5999 of the server host.
803 .Sh USING csup WITH SOCKS
804 .Nm
805 can be used through a SOCKS proxy server with the standard
806 .Nm runsocks
807 command.
808 Your
809 .Nm
810 executable needs to be dynamically-linked with the system
811 libraries for
812 .Nm runsocks
813 to work properly.
814 .Sh USING ssh PORT FORWARDING
815 As an alternative to SOCKS, a user behind a firewall can penetrate it
816 with the TCP port forwarding provided by the Secure Shell package
817 .Nm ssh .
818 The user must have a login account on the
819 .Nm CVSup
820 server host in order to do this.
821 The procedure is as follows:
822 .Bl -enum
823 .It
824 Establish a connection to the server host with
825 .Nm ssh ,
826 like this:
827 .Bd -literal
828 ssh -f -x -L 5999:localhost:5999 serverhost sleep 60
829 .Ed
830 .Pp
831 Replace
832 .Ar serverhost
833 with the hostname of the CVSup server, but type
834 .Ql localhost
835 literally.
836 This sets up the required port forwarding.
837 You must start
838 .Nm
839 before the 60-second
840 .Nm sleep
841 finishes.
842 Once the update has begun,
843 .Nm ssh
844 will keep the forwarded channels open as long as they are needed.
845 .It
846 Run
847 .Nm
848 on the local host, including the arguments
849 .Ql -h localhost
850 on the command line.
851 .El
852 .Sh FILES
853 .Bl -tag -width base/sup/collection/checkouts*xx -compact
854 .It Pa /usr/local/etc/cvsup
855 Default
856 .Ar base
857 directory.
858 .It Pa sup
859 Default
860 .Ar collDir
861 subdirectory.
862 .Sm off
863 .It Xo Ar base / Ar collDir / Ar collection
864 .Pa /checkouts*
865 .Xc
866 .Sm on
867 List files.
868 .El
869 .Sh SEE ALSO
870 .Xr cvs 1 ,
871 .Xr rcsintro 1 ,
872 .Xr ssh 1 .
873 .Pp
874 .Bd -literal
875 http://mu.org/~mux/csup.html
876 .Ed
877 .Sh AUTHORS
878 .An -nosplit
879 .An Maxime Henrion Aq mux@FreeBSD.org
880 is the author of
881 .Nm ,
882 the rewrite of
883 .Nm CVSup
884 in C.
885 .An John Polstra Aq jdp@polstra.com
886 is the author of
887 .Nm CVSup .
888 .Sh LEGALITIES
889 CVSup is a registered trademark of John D. Polstra.
890 .Pp
891 .Nm
892 is released under a 2-clauses BSD license.
893 .Sh BUGS
894 An RCS file is not recognized as such unless its name ends with
895 .Ql \&,v .
896 .Pp
897 Any directory named
898 .Ql Attic
899 is assumed to be a CVS Attic, and is treated specially.