cvs.1 revision 1.6 1 1.1 atatat The cvs.conf portal configuration file maps the NetBSD anoncvs
2 1.1 atatat respository into the local file system. This means you can cat(1)
3 1.1 atatat or cp(1) copies of any arbitrary file or revision from the cvs
4 1.1 atatat server using a local path. Start off like this:
5 1.1 atatat
6 1.1 atatat # mkdir /p
7 1.1 atatat # mount -t portal `pwd`/cvs.conf /p
8 1.3 wiz #
9 1.1 atatat
10 1.1 atatat The next step is to set up the authentication. The NetBSD anoncvs
11 1.1 atatat server uses ssh for authentication, so all you need to do is
12 1.1 atatat
13 1.5 salo # ssh anoncvs (a] anoncvs.NetBSD.org
14 1.1 atatat
15 1.1 atatat and answer 'yes' when it asks you if you want to accept the key.
16 1.1 atatat Now the NetBSD source tree is close at hand.
17 1.1 atatat
18 1.1 atatat First, some caveats. File name completion and globbing don't work,
19 1.1 atatat and diff has difficulties with this since it stat()s the file names
20 1.1 atatat it's given and gets back more or less meaningless information for
21 1.2 atatat names under a portal file system.
22 1.1 atatat
23 1.1 atatat Here's a list of things I've done with this:
24 1.1 atatat
25 1.1 atatat 1) diff one of my files (eg, /etc/security) against the repository
26 1.1 atatat
27 1.1 atatat % grep NetBSD: /etc/security
28 1.1 atatat # $NetBSD: security,v 1.52 ...
29 1.6 pooka % diff -u -< /p/netbsd/src/etc/security,1.52 /etc/security
30 1.1 atatat [ diffs elided ]
31 1.3 wiz %
32 1.1 atatat
33 1.1 atatat Notice the use of the - file given to diff and the input redirection
34 1.1 atatat so that it will read from stdin instead of opening the file itself.
35 1.1 atatat This gets around the stat() problem.
36 1.1 atatat
37 1.1 atatat 2) Check out some (or all) versions of a file:
38 1.1 atatat
39 1.1 atatat % grep NetBSD: /etc/security
40 1.1 atatat # $NetBSD: security,v 1.52 ...
41 1.1 atatat % foreach i (`jot 10 43`)
42 1.6 pooka > cp /p/netbsd/src/etc/security,1.$i /tmp
43 1.1 atatat > end
44 1.3 wiz %
45 1.1 atatat
46 1.1 atatat Presto! Versions 1.43 through 1.52 (jot(1) prints 10 numbers
47 1.1 atatat starting at 43) of /etc/security are copied into your /tmp directory
48 1.1 atatat so that you can do arbitrary diffs between any version you like.
49 1.1 atatat You can use tags instead of revision numbers if you like.
50 1.1 atatat
51 1.1 atatat 3) Instant upgrades. Since cvs always defaults to the head of the
52 1.1 atatat trunk, you can do this:
53 1.1 atatat
54 1.6 pooka # cp /p/netbsd/src/etc/security /etc/security
55 1.3 wiz #
56 1.1 atatat
57 1.1 atatat to upgrade to the latest and greatest version any time you like,
58 1.1 atatat or you can do this:
59 1.1 atatat
60 1.1 atatat # uname -r
61 1.1 atatat 1.5.2
62 1.6 pooka # cp /p/netbsd/src/etc/security,netbsd-1-5-PATCH002 /etc/security
63 1.3 wiz #
64 1.1 atatat
65 1.1 atatat to get rid of any changes you might have made to /etc/security that
66 1.1 atatat you no longer want.
67 1.1 atatat
68 1.1 atatat Note that there's some support for the FreeBSD and OpenBSD anoncvs
69 1.1 atatat service in there as well, but those might be tricky. The FreeBSD
70 1.1 atatat anoncvs server only offers pserver access, so you'll need to manually
71 1.1 atatat do a cvs login to make that work. The OpenBSD server seems to move
72 1.1 atatat around a fair amount, so the CVSROOT value for it will need to be
73 1.1 atatat updated if that happens again. You might also choose to use
74 1.1 atatat different servers entirely.
75