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