1*33078560Skamil$NetBSD: cvs.1,v 1.7 2017/05/09 23:26:49 kamil Exp $ 2*33078560Skamil 393051456SatatatThe cvs.conf portal configuration file maps the NetBSD anoncvs 493051456Satatatrespository into the local file system. This means you can cat(1) 593051456Satatator cp(1) copies of any arbitrary file or revision from the cvs 693051456Satatatserver using a local path. Start off like this: 793051456Satatat 893051456Satatat # mkdir /p 993051456Satatat # mount -t portal `pwd`/cvs.conf /p 1093051456Satatat # 1193051456Satatat 1293051456SatatatThe next step is to set up the authentication. The NetBSD anoncvs 1393051456Satatatserver uses ssh for authentication, so all you need to do is 1493051456Satatat 15b75abedaSsalo # ssh anoncvs@anoncvs.NetBSD.org 1693051456Satatat 1793051456Satatatand answer 'yes' when it asks you if you want to accept the key. 1893051456SatatatNow the NetBSD source tree is close at hand. 1993051456Satatat 2093051456SatatatFirst, some caveats. File name completion and globbing don't work, 2193051456Satatatand diff has difficulties with this since it stat()s the file names 2293051456Satatatit's given and gets back more or less meaningless information for 23149865a4Satatatnames under a portal file system. 2493051456Satatat 2593051456SatatatHere's a list of things I've done with this: 2693051456Satatat 2793051456Satatat1) diff one of my files (eg, /etc/security) against the repository 2893051456Satatat 2993051456Satatat % grep NetBSD: /etc/security 3093051456Satatat # $NetBSD: security,v 1.52 ... 31703c0341Spooka % diff -u -< /p/netbsd/src/etc/security,1.52 /etc/security 3293051456Satatat [ diffs elided ] 3393051456Satatat % 3493051456Satatat 3593051456SatatatNotice the use of the - file given to diff and the input redirection 3693051456Satatatso that it will read from stdin instead of opening the file itself. 3793051456SatatatThis gets around the stat() problem. 3893051456Satatat 3993051456Satatat2) Check out some (or all) versions of a file: 4093051456Satatat 4193051456Satatat % grep NetBSD: /etc/security 4293051456Satatat # $NetBSD: security,v 1.52 ... 4393051456Satatat % foreach i (`jot 10 43`) 44703c0341Spooka > cp /p/netbsd/src/etc/security,1.$i /tmp 4593051456Satatat > end 4693051456Satatat % 4793051456Satatat 4893051456SatatatPresto! Versions 1.43 through 1.52 (jot(1) prints 10 numbers 4993051456Satatatstarting at 43) of /etc/security are copied into your /tmp directory 5093051456Satatatso that you can do arbitrary diffs between any version you like. 5193051456SatatatYou can use tags instead of revision numbers if you like. 5293051456Satatat 5393051456Satatat3) Instant upgrades. Since cvs always defaults to the head of the 5493051456Satatattrunk, you can do this: 5593051456Satatat 56703c0341Spooka # cp /p/netbsd/src/etc/security /etc/security 5793051456Satatat # 5893051456Satatat 5993051456Satatatto upgrade to the latest and greatest version any time you like, 6093051456Satatator you can do this: 6193051456Satatat 6293051456Satatat # uname -r 6393051456Satatat 1.5.2 64703c0341Spooka # cp /p/netbsd/src/etc/security,netbsd-1-5-PATCH002 /etc/security 6593051456Satatat # 6693051456Satatat 6793051456Satatatto get rid of any changes you might have made to /etc/security that 6893051456Satatatyou no longer want. 6993051456Satatat 70*33078560SkamilNote that there's some support for the OpenBSD anoncvs. 71*33078560SkamilYou might also choose to use different servers entirely. 72