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