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