]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - contrib/csup/csup.1
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.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 .Pp
446 In CVS mode, the client receives copies of the actual RCS files making
447 up the master CVS repository.  CVS mode is the default mode of operation.
448 It is appropriate when the user wishes to maintain a full copy of the
449 CVS repository on the client machine.
450 .Pp
451 CVS mode is also appropriate for file collections which are not
452 based upon a CVS repository.  The files are simply transferred
453 verbatim, without interpretation.
454 .Sh CHECKOUT MODE
455 In checkout mode, the client receives specific revisions of files,
456 checked out directly from the server's CVS repository.
457 Checkout mode allows the client to receive any version from the
458 repository, without requiring any extra disk space on the server for
459 storing multiple versions in checked-out form.
460 Checkout mode provides much flexibility beyond that basic functionality,
461 however.
462 The client can specify any CVS symbolic tag, or any date, or both, and
463 .Nm
464 will provide the corresponding checked-out versions of the files in the
465 repository.
466 .Pp
467 Checkout mode is selected on a per-collection basis, by the presence of
468 one or both of the following keywords in the
469 .Ar supfile :
470 .Bl -tag -width Fl
471 .It Cm tag= Ns Ar tagname
472 This specifies a symbolic tag that should be used to select the
473 revisions that are checked out from the CVS repository.
474 The tag may refer to either a branch or a specific revision.
475 It must be symbolic; numeric revision numbers are not supported.
476 .Pp
477 For the FreeBSD source repository, the most commonly used tags will be:
478 .Bl -tag -width RELENG_6
479 .It Li RELENG_6
480 The
481 .Ql stable
482 branch.
483 .It Li \&.
484 The main branch (the
485 .Ql current
486 release).
487 This is the default, if only the
488 .Cm date
489 keyword is given.
490 .El
491 .Sm off
492 .It Xo Cm date=
493 .Op Ar cc
494 .Ar yy.mm.dd.hh.mm.ss
495 .Xc
496 .Sm on
497 This specifies a date that should be used to select the revisions that
498 are checked out from the CVS repository.
499 The client will receive the revisions that were in effect at the
500 specified date and time.
501 .Pp
502 At present, the date format is inflexible.  All 17 or 19 characters must
503 be specified, exactly as shown.
504 For the years 2000 and beyond, specify the century
505 .Ar cc .
506 For earlier years, specify only the last two digits
507 .Ar yy .
508 Dates and times are considered to
509 be GMT.
510 The default date is
511 .Ql \&. ,
512 which means
513 .Dq as late as possible .
514 .El
515 .Pp
516 To enable checkout mode, you must specify at least one of these keywords.
517 If both are missing,
518 .Nm
519 defaults to CVS mode.
520 .Pp
521 If both a branch tag and a date are specified, then the revisions on the
522 given branch, as of the given date, will be checked out.  It is
523 permitted, but not particularly useful, to specify a date with a
524 specific release tag.
525 .Pp
526 In checkout mode, the tag and/or date may be changed between updates.
527 For example, suppose that a collection has been transferred using the
528 specification
529 .Ql tag=. .
530 The user could later change the specification to
531 .Ql tag=RELENG_3 .
532 This would cause
533 .Nm
534 to edit the checked-out files in such a way as to transform them from the
535 .Ql current
536 versions to the
537 .Ql stable
538 versions.
539 In general,
540 .Nm
541 is willing to transform any tag/date combination into any other tag/date
542 combination, by applying the intervening RCS deltas to the existing files.
543 .Pp
544 When transforming a collection of checked-out files from one tag to
545 another, it is important to specify the
546 .Cm list
547 keyword in the
548 .Ar supfile ,
549 to ensure that the same list file is used both before and after the
550 transformation.
551 The list file is described in
552 .Sx THE LIST FILE ,
553 below.
554 .Sh THE LIST FILE
555 For efficiency,
556 .Nm
557 maintains a bookkeeping file for each collection, called the list file.
558 The list file contains information about which files and revisions the client
559 currently possesses.
560 It also contains information used for verifying that the list file
561 is consistent with the actual files in the client's tree.
562 .Pp
563 The list file is not strictly necessary.  If it is deleted, or becomes
564 inconsistent with the actual client files,
565 .Nm
566 falls back upon a less efficient method of identifying the client's
567 files and performing its updates.
568 Depending on
569 .Nm csup Ns No 's
570 mode of operation, the fallback method employs time stamps, checksums, or
571 analysis of RCS files.
572 .Pp
573 Because the list file is not essential,
574 .Nm
575 is able to
576 .Dq adopt
577 an existing file tree acquired by FTP or from a CD-ROM.
578 .Nm
579 identifies the client's versions of the files, updates them as
580 necessary, and creates a list file for future use.
581 Adopting a foreign file tree is not as fast as performing a normal
582 update.
583 It also produces a heavier load on the server.
584 .Pp
585 The list file is stored in a collection-specific directory; see
586 .Sx FILES
587 for details.
588 Its name always begins with
589 .Ql checkouts .
590 If the keyword
591 .Cm use-rel-suffix
592 is specified in the
593 .Ar supfile ,
594 a suffix, formed from the release and tag, is appended to the name.
595 The default suffix can be overridden by specifying an explicit suffix in
596 the
597 .Ar supfile :
598 .Bl -tag -width Fl
599 .It Cm list= Ns Ar suffix
600 This specifies a suffix for the name of the list file.  A leading dot is
601 provided automatically.
602 For example,
603 .Ql list=stable
604 would produce a list file named
605 .Pa checkouts.stable ,
606 regardless of the release, tag, or
607 .Cm use-rel-suffix
608 keyword.
609 .El
610 .Sh REFUSE FILES
611 The user can specify sets of files that he does not wish to receive.
612 The files are specified as file name patterns in so-called
613 .Em refuse
614 files.
615 The patterns are separated by whitespace, and multiple patterns are
616 permitted on each line.
617 Files and directories matching the patterns are neither updated nor
618 deleted; they are simply ignored.
619 .Pp
620 There is currently no provision for comments in refuse files.
621 .Pp
622 The patterns are similar to those of
623 .Xr sh 1 ,
624 except that there is no special treatment for slashes or for
625 filenames that begin with a period.
626 For example, the pattern
627 .Ql *.c
628 will match any file name ending with
629 .Ql \&.c
630 including those in subdirectories, such as
631 .Ql foo/bar/lam.c .
632 All patterns are interpreted relative to the collection's prefix
633 directory.
634 .Pp
635 If the files are coming from a CVS repository, as is usually
636 the case, then they will be RCS files. These have a
637 .Ql \&,v
638 suffix which must be taken into account in the patterns. For
639 example, the FreeBSD documentation files are in a sub-directory of
640 .Ar base
641 called
642 .Ql doc .
643 If
644 .Ql Makefile
645 from that directory is not required then the line
646 .Pp 
647 .Bl -item -compact -offset indent
648 .It 
649 .Pa doc/Makefile
650 .El
651 .Pp
652 will not work because the file on the server is called
653 .Ql Makefile,v.
654 A better solution would be
655 .Pp
656 .Bl -item -compact -offset indent
657 .It
658 .Pa doc/Makefile*
659 .El 
660 .Pp 
661 which will match whether
662 .Ql Makefile
663 is an RCS file or not.
664 .Pp
665 As another example, to receive the FreeBSD documentation files without
666 the Japanese, Russian, and Chinese translations, create a refuse file
667 containing the following lines:
668 .Pp
669 .Bl -item -compact -offset indent
670 .It
671 .Pa doc/ja*
672 .It
673 .Pa doc/ru*
674 .It
675 .Pa doc/zh*
676 .El 
677 .Pp
678 As many as three refuse files are examined for each
679 .Ar supfile
680 line.
681 There can be a global refuse file named
682 .Sm off
683 .Ar base / Ar collDir Pa /refuse
684 .Sm on
685 which applies to all collections and releases.
686 There can be a per-collection refuse file named
687 .Sm off
688 .Xo Ar base / Ar collDir / Ar collection
689 .Pa /refuse
690 .Xc
691 .Sm on
692 which applies to a specific collection.
693 Finally, there can be a per-release and tag refuse file which applies only
694 to a given release/tag combination within a collection.
695 The name of the latter is formed by suffixing the name of the
696 per-collection refuse file in the same manner as described above for the
697 list file.
698 None of the refuse files are required to exist.
699 .Pp
700 .Nm
701 has a built-in default value of
702 .Ar /usr/local/etc/cvsup
703 for
704 .Ar base
705 and
706 .Ar sup
707 for 
708 .Ar collDir
709 but it is possible to override both of these. The value of
710 .Ar base
711 can be changed using the
712 .Fl b
713 option or a
714 .Ar base=pathname
715 entry in the
716 .Ar supfile .
717 (If both are used the 
718 .Fl b
719 option will override the
720 .Ar supfile
721 entry.)  The value of 
722 .Ar collDir
723 can only be changed with the
724 .Fl c
725 option; there is no
726 .Ar supfile
727 command to change it.
728 .Pp
729 As an example, suppose that the
730 .Ar base
731 and
732 .Ar collDir
733 both have their default values, and that the collection and release are
734 .Ql src-all
735 and
736 .Ql cvs ,
737 respectively.
738 Assume further that checkout mode is being used with
739 .Ql tag=RELENG_3 .
740 The three possible refuse files would then be named:
741 .Pp
742 .Bl -item -compact -offset indent
743 .It
744 .Pa /usr/local/etc/cvsup/sup/refuse
745 .It
746 .Pa /usr/local/etc/cvsup/sup/src-all/refuse
747 .It
748 .Pa /usr/local/etc/cvsup/sup/src-all/refuse.cvs:RELENG_3
749 .El
750 .Pp
751 If the
752 .Ar supfile
753 includes the command
754 .Ar base=/foo
755 the refuse files would be:
756 .Pp
757 .Bl -item -compact -offset indent
758 .It
759 .Pa /foo/sup/refuse
760 .It
761 .Pa /foo/sup/src-all/refuse
762 .It
763 .Pa /foo/sup/src-all/refuse.cvs:RELENG_3
764 .El
765 .Pp
766 If
767 .Fl b
768 .Ar /bar
769 is used (even with
770 .Ar base=/foo
771 in the
772 .Ar supfile ) :
773 .Pp
774 .Bl -item -compact -offset indent
775 .It
776 .Pa /bar/sup/refuse                
777 .It
778 .Pa /bar/sup/src-all/refuse                
779 .It
780 .Pa /bar/sup/src-all/refuse.cvs:RELENG_3                
781 .El
782 .Pp
783 and with
784 .Fl c
785 .Ar stool
786 as well:
787 .Pp
788 .Bl -item -compact -offset indent
789 .It
790 .Pa /bar/stool/refuse
791 .It 
792 .Pa /bar/stool/src-all/refuse
793 .It
794 .Pa /bar/stool/src-all/refuse.cvs:RELENG_3
795 .El
796 .Sh csup AND FIREWALLS
797 In its default mode,
798 .Nm
799 will work through any firewall which permits outbound connections to
800 port 5999 of the server host.
801 .Sh USING csup WITH SOCKS
802 .Nm
803 can be used through a SOCKS proxy server with the standard
804 .Nm runsocks
805 command.
806 Your
807 .Nm
808 executable needs to be dynamically-linked with the system
809 libraries for
810 .Nm runsocks
811 to work properly.
812 .Sh USING ssh PORT FORWARDING
813 As an alternative to SOCKS, a user behind a firewall can penetrate it
814 with the TCP port forwarding provided by the Secure Shell package
815 .Nm ssh .
816 The user must have a login account on the
817 .Nm CVSup
818 server host in order to do this.
819 The procedure is as follows:
820 .Bl -enum
821 .It
822 Establish a connection to the server host with
823 .Nm ssh ,
824 like this:
825 .Bd -literal
826 ssh -f -x -L 5999:localhost:5999 serverhost sleep 60
827 .Ed
828 .Pp
829 Replace
830 .Ar serverhost
831 with the hostname of the CVSup server, but type
832 .Ql localhost
833 literally.
834 This sets up the required port forwarding.
835 You must start
836 .Nm
837 before the 60-second
838 .Nm sleep
839 finishes.
840 Once the update has begun,
841 .Nm ssh
842 will keep the forwarded channels open as long as they are needed.
843 .It
844 Run
845 .Nm
846 on the local host, including the arguments
847 .Ql -h localhost
848 on the command line.
849 .El
850 .Sh FILES
851 .Bl -tag -width base/sup/collection/checkouts*xx -compact
852 .It Pa /usr/local/etc/cvsup
853 Default
854 .Ar base
855 directory.
856 .It Pa sup
857 Default
858 .Ar collDir
859 subdirectory.
860 .Sm off
861 .It Xo Ar base / Ar collDir / Ar collection
862 .Pa /checkouts*
863 .Xc
864 .Sm on
865 List files.
866 .El
867 .Sh SEE ALSO
868 .Xr cvs 1 ,
869 .Xr rcsintro 1 ,
870 .Xr ssh 1 .
871 .Pp
872 .Bd -literal
873 http://mu.org/~mux/csup.html
874 .Ed
875 .Sh AUTHORS
876 .An -nosplit
877 .An Maxime Henrion Aq mux@FreeBSD.org
878 is the author of
879 .Nm ,
880 the rewrite of
881 .Nm CVSup
882 in C.
883 .An John Polstra Aq jdp@polstra.com
884 is the author of
885 .Nm CVSup .
886 .Sh LEGALITIES
887 CVSup is a registered trademark of John D. Polstra.
888 .Pp
889 .Nm
890 is released under a 2-clauses BSD license.
891 .Sh BUGS
892 An RCS file is not recognized as such unless its name ends with
893 .Ql \&,v .
894 .Pp
895 Any directory named
896 .Ql Attic
897 is assumed to be a CVS Attic, and is treated specially.