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