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 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>F.3.Getting The Source Via CVSup</title>
<link rel="stylesheet" href="stylesheet.css" type="text/css">
<link rev="made" href="pgsql-docs@postgresql.org">
<meta name="generator" content="DocBook XSL Stylesheets V1.70.0">
<link rel="start" href="index.html" title="PostgreSQL 8.1.4 Documentation">
<link rel="up" href="cvs.html" title="AppendixF.The CVS Repository">
<link rel="prev" href="cvs-tree.html" title="F.2.CVS Tree Organization">
<link rel="next" href="docguide.html" title="AppendixG.Documentation">
<link rel="copyright" href="ln-legalnotice.html" title="Legal Notice">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="sect1" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="cvsup"></a>F.3.Getting The Source Via <span class="productname">CVSup</span></h2></div></div></div>
<p> An alternative to using anonymous CVS for retrieving
the <span class="productname">PostgreSQL</span> source tree
is <span class="productname">CVSup</span>.
<span class="productname">CVSup</span> was developed by
John Polstra (<code class="email"><<a href="mailto:jdp@polstra.com">jdp@polstra.com</a>></code>) to
distribute CVS repositories and other file trees for the
<a href="http://www.freebsd.org" target="_top">FreeBSD project</a>.
</p>
<p> A major advantage to using
<span class="productname">CVSup</span> is that it can reliably
replicate the <span class="emphasis"><em>entire</em></span> CVS repository on your local system,
allowing fast local access to cvs operations such as <code class="option">log</code>
and <code class="option">diff</code>. Other advantages include fast synchronization to
the <span class="productname">PostgreSQL</span> server due to an efficient
streaming transfer protocol which only sends the changes since the last update.
</p>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id899222"></a>F.3.1.Preparing A <span class="productname">CVSup</span> Client System</h3></div></div></div>
<p> Two directory areas are required for <span class="productname">CVSup</span>
to do its job: a local <span class="productname">CVS</span> repository
(or simply a directory area if you are fetching a snapshot rather
than a repository; see below)
and a local <span class="productname">CVSup</span> bookkeeping
area. These can coexist in the same directory tree.
</p>
<p> Decide where you want to keep your local copy of the
<span class="productname">CVS</span> repository. On one of our systems we
recently set up a repository in <code class="filename">/home/cvs/</code>,
but had formerly kept it under a
<span class="productname">PostgreSQL</span> development tree in
<code class="filename">/opt/postgres/cvs/</code>. If you intend to keep your
repository in <code class="filename">/home/cvs/</code>, then put
</p>
<pre class="programlisting">setenv CVSROOT /home/cvs</pre>
<p>
in your <code class="filename">.cshrc</code> file, or a similar line in
your <code class="filename">.bashrc</code> or
<code class="filename">.profile</code> file, depending on your shell.
</p>
<p> The <span class="application">cvs</span> repository area must be initialized.
Once <code class="envar">CVSROOT</code> is set, then this can be done with a
single command:
</p>
<pre class="programlisting">cvs init</pre>
<p>
after which you should see at least a directory named
<code class="filename">CVSROOT</code> when listing the
<code class="envar">CVSROOT</code> directory:
</p>
<pre class="programlisting">$ ls $CVSROOT
CVSROOT/</pre>
<p>
</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id899367"></a>F.3.2.Running a <span class="productname">CVSup</span> Client</h3></div></div></div>
<p> Verify that
<span class="application">cvsup</span> is in your path; on most systems
you can do this by typing
</p>
<pre class="programlisting">which cvsup</pre>
<p>
Then, simply run
<span class="application">cvsup</span> using:
</p>
<pre class="programlisting">cvsup -L 2 <em class="replaceable"><code>postgres.cvsup</code></em></pre>
<p>
where <code class="option">-L 2</code> enables some status messages so you
can monitor the progress of the update,
and <em class="replaceable"><code>postgres.cvsup</code></em> is
the path and name you have given to your
<span class="productname">CVSup</span> configuration file.
</p>
<p> Here is a <span class="productname">CVSup</span> configuration file
modified for a specific installation, and which maintains a full
local <span class="productname">CVS</span> repository:
</p>
<pre class="programlisting"># This file represents the standard CVSup distribution file
# for the <span class="productname">PostgreSQL</span> ORDBMS project
# Modified by lockhart@fourpalms.org 1997-08-28
# - Point to my local snapshot source tree
# - Pull the full CVS repository, not just the latest snapshot
#
# Defaults that apply to all the collections
*default host=cvsup.postgresql.org
*default compress
*default release=cvs
*default delete use-rel-suffix
# enable the following line to get the latest snapshot
#*default tag=.
# enable the following line to get whatever was specified above or by default
# at the date specified below
#*default date=97.08.29.00.00.00
# base directory where CVSup will store its 'bookmarks' file(s)
# will create subdirectory sup/
#*default base=/opt/postgres # /usr/local/pgsql
*default base=/home/cvs
# prefix directory where CVSup will store the actual distribution(s)
*default prefix=/home/cvs
# complete distribution, including all below
pgsql
# individual distributions vs 'the whole thing'
# pgsql-doc
# pgsql-perl5
# pgsql-src</pre>
<p>
</p>
<p> If you specify <code class="option">repository</code> instead of <code class="option">pgsql</code>
in the above setup, you will get a complete copy of the entire
repository at cvsup.postgresql.org, including its
<code class="filename">CVSROOT</code> directory. If you do that, you will
probably want to exclude those files in that directory that you
want to modify locally, using a refuse file. For example, for the
above setup you might put this in
<code class="filename">/home/cvs/sup/repository/refuse</code>:
</p>
<pre class="programlisting">CVSROOT/config*
CVSROOT/commitinfo*
CVSROOT/loginfo*</pre>
<p>
See the <span class="productname">CVSup</span> manual pages for how to use refuse files.
</p>
<p> The following is a suggested <span class="productname">CVSup</span> config file from
the <span class="productname">PostgreSQL</span>
<a href="ftp://ftp.postgresql.org/pub/CVSup/README.cvsup" target="_top"> ftp site</a>
which will fetch the current snapshot only:
</p>
<pre class="programlisting"># This file represents the standard CVSup distribution file
# for the <span class="productname">PostgreSQL</span> ORDBMS project
#
# Defaults that apply to all the collections
*default host=cvsup.postgresql.org
*default compress
*default release=cvs
*default delete use-rel-suffix
*default tag=.
# base directory where CVSup will store its 'bookmarks' file(s)
*default base=<em class="replaceable"><code>/usr/local/pgsql</code></em>
# prefix directory where CVSup will store the actual distribution(s)
*default prefix=<em class="replaceable"><code>/usr/local/pgsql</code></em>
# complete distribution, including all below
pgsql
# individual distributions vs 'the whole thing'
# pgsql-doc
# pgsql-perl5
# pgsql-src</pre>
<p>
</p>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id899616"></a>F.3.3.Installing <span class="productname">CVSup</span></h3></div></div></div>
<p> <span class="productname">CVSup</span> is available as source, pre-built
binaries, or Linux RPMs. It is far easier to use a binary than to
build from source, primarily because the very capable, but
voluminous, Modula-3 compiler is required for the build.
</p>
<div class="procedure">
<a name="id899637"></a><p class="title"><b><span class="productname">CVSup</span> Installation from Binaries</b></p>
<p> You can use pre-built binaries
if you have a platform for which binaries
are posted on the <span class="productname">PostgreSQL</span>
<a href="ftp://ftp.postgresql.org/pub" target="_top"> ftp site</a>
or if you are running FreeBSD, for which
<span class="productname">CVSup</span> is available as a port.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p> <span class="productname">CVSup</span> was originally developed as a
tool for distributing the <span class="productname">FreeBSD</span>
source tree. It is available as a “<span class="quote">port</span>”, and for those running
FreeBSD, if this is not sufficient to tell how to obtain and
install it then please contribute a procedure here.
</p>
</div>
<p>
</p>
<p> At the time of writing, binaries are available for
Alpha/Tru64, ix86/xBSD,
HPPA/HP-UX 10.20, MIPS/IRIX,
ix86/linux-libc5, ix86/linux-glibc,
Sparc/Solaris, and Sparc/SunOS.
</p>
<ol type="1">
<li>
<p> Retrieve the binary tar file for
<span class="application">cvsup</span>
(<span class="application">cvsupd</span> is not required
to be a client) appropriate for your platform.
</p>
<ol type="a">
<li><p> If you are running FreeBSD, install the <span class="productname">CVSup</span> port.
</p></li>
<li><p> If you have another platform, check for and download the appropriate binary from
the <span class="productname">PostgreSQL</span>
<a href="ftp://ftp.postgresql.org/pub" target="_top"> ftp site</a>.
</p></li>
</ol>
</li>
<li>
<p> Check the tar file to verify the contents and directory
structure, if any. For the linux tar file at least, the static binary
and man page is included without any directory packaging.
</p>
<ol type="a">
<li>
<p> If the binary is in the top level of the tar file, then simply
unpack the tar file into your target directory:
</p>
<pre class="programlisting">cd /usr/local/bin
tar zxvf /usr/local/src/cvsup-16.0-linux-i386.tar.gz
mv cvsup.1 ../doc/man/man1/</pre>
<p>
</p>
</li>
<li><p> If there is a directory structure in the tar file, then unpack
the tar file within /usr/local/src and move the binaries into
the appropriate location as above.
</p></li>
</ol>
</li>
<li>
<p> Ensure that the new binaries are in your path.
</p>
<pre class="programlisting">$ rehash
$ which cvsup
$ set path=(<em class="replaceable"><code>path to cvsup</code></em> $path)
$ which cvsup
/usr/local/bin/cvsup</pre>
<p>
</p>
</li>
</ol>
</div>
</div>
<div class="sect2" lang="en">
<div class="titlepage"><div><div><h3 class="title">
<a name="id899823"></a>F.3.4.Installation from Sources</h3></div></div></div>
<p> Installing <span class="productname">CVSup</span> from sources is not
entirely trivial, primarily because most systems will need to
install a Modula-3 compiler first.
This compiler is available as Linux <span class="productname">RPM</span>,
FreeBSD package, or source code.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p> A clean-source installation of Modula-3 takes roughly 200MB of disk space,
which shrinks to roughly 50MB of space when the sources are removed.</p>
</div>
<p>
</p>
<div class="procedure">
<a name="id899854"></a><p class="title"><b>Linux installation</b></p>
<ol type="1">
<li>
<p> Install Modula-3.
</p>
<ol type="a">
<li>
<p> Pick up the <span class="productname">Modula-3</span>
distribution from <a href="http://m3.polymtl.ca/m3" target="_top"> Polytechnique Montral</a>
who are actively maintaining the code base originally developed by
the <a href="http://www.research.digital.com/SRC/modula-3/html/home.html" target="_top"> DEC Systems Research Center</a>.
The <span class="productname">PM3</span> <span class="productname">RPM</span> distribution is roughly
30MB compressed. At the time of writing, the 1.1.10-1 release
installed cleanly on RH-5.2, whereas the 1.1.11-1 release is
apparently built for another release (RH-6.0?) and does not run on RH-5.2.
</p>
<div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Tip</h3>
<p> This particular rpm packaging has
<span class="emphasis"><em>many</em></span> <span class="productname">RPM</span> files,
so you will likely want to place them into a separate
directory.
</p>
</div>
<p>
</p>
</li>
<li>
<p> Install the Modula-3 rpms:
</p>
<pre class="programlisting"># rpm -Uvh pm3*.rpm</pre>
<p>
</p>
</li>
</ol>
</li>
<li>
<p> Unpack the cvsup distribution:
</p>
<pre class="programlisting"># cd /usr/local/src
# tar zxf cvsup-16.0.tar.gz</pre>
<p>
</p>
</li>
<li>
<p> Build the cvsup distribution, suppressing the GUI interface
feature to avoid requiring X11 libraries:
</p>
<pre class="programlisting"># make M3FLAGS="-DNOGUI"</pre>
<p>
and if you want to build a static binary to move to systems
that may not have Modula-3 installed, try:
</p>
<pre class="programlisting"># make M3FLAGS="-DNOGUI -DSTATIC"</pre>
<p>
</p>
</li>
<li>
<p> Install the built binary:
</p>
<pre class="programlisting"># make M3FLAGS="-DNOGUI -DSTATIC" install</pre>
<p>
</p>
</li>
</ol>
</div>
</div>
</div></body>
</html>
|