1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
<!-- $NetBSD: getting.xml,v 1.6 2005/11/20 10:02:31 rillig Exp $ -->
<chapter id="getting">
<title>Where to get pkgsrc and how to keep it up-to-date</title>
<para>There are three ways to get pkgsrc. Either as a tar file, via SUP, or
via CVS. All three ways are described here.</para>
<sect1 id="as-tar-file">
<title>As tar file</title>
<para>To get pkgsrc going, you need to get the pkgsrc.tar.gz file
from <ulink
url="ftp://ftp.NetBSD.org/pub/NetBSD/NetBSD-current/tar_files/pkgsrc.tar.gz">ftp.NetBSD.org</ulink>
and unpack it into <filename>/usr/pkgsrc</filename>.</para>
</sect1>
<sect1 id="via-sup">
<title>Via SUP</title>
<para>As an alternative to the tar file, you can get pkgsrc via
the Software Update Protocol, SUP. To do so, make sure your
supfile has a line</para>
<programlisting>
release=pkgsrc
</programlisting>
<para>in it, see the examples in
<filename>/usr/share/examples/supfiles</filename>, and that the
<filename>/usr/pkgsrc</filename> directory exists. Then, simply run
<command>sup -v <replaceable>/path/to/your/supfile</replaceable></command>.</para>
</sect1>
<sect1 id="via-cvs">
<title>Via CVS</title>
<para>To get pkgsrc via CVS, make sure you have <quote>cvs</quote> installed.
To do an initial (full) checkout of pkgsrc, do the following steps:</para>
<screen>&cprompt; <userinput>setenv CVSROOT anoncvs@anoncvs.NetBSD.org:/cvsroot</userinput>
&cprompt; <userinput>setenv CVS_RSH ssh</userinput>
&cprompt; <userinput>cd /usr</userinput>
&cprompt; <userinput>cvs checkout -P pkgsrc</userinput></screen>
<para>This will create the <filename>pkgsrc</filename> directory in your
<filename>/usr</filename>, and all the package source will be stored
under <filename>/usr/pkgsrc</filename>. To update pkgsrc
after the initial checkout, make sure you have
<varname>CVS_RSH</varname> set as above, then do:</para>
<screen>&cprompt; <userinput>cd /usr/pkgsrc</userinput>
&cprompt; <userinput>cvs -q update -dP</userinput></screen>
<para>Please also note that it is possible to have multiple copies of the
pkgsrc hierarchy in use at any one time - all work is done relatively
within the pkgsrc tree.</para>
</sect1>
<sect1 id="uptodate-cvs">
<title>Keeping pkgsrc up-to-date via CVS</title>
<para>If your copy of pkgsrc contains a lot of
<filename>CVS</filename> directories, you can update it using the
&man.cvs.1; program. First, <command>cd</command> to the top level
directory of pkgsrc. Then run <command>cvs -q update
-dP</command>, and you're done.</para>
<para>If that doesn't work and the file
<filename>CVS/Root</filename> contains the string
<quote>:pserver:</quote>, you have to run <command>cvs
login</command> once to get known to the NetBSD CVS server. The
<command>cvs</command> utility will then ask you for a password.
Just enter <quote>anoncvs</quote>. Then try again to update.</para>
</sect1>
</chapter>
|