|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /proc/self/root/usr/share/doc/postgresql-8.1.9/html/ |
Upload File : |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML
><HEAD
><TITLE
>Getting The Source Via CVSup</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
REV="MADE"
HREF="mailto:pgsql-docs@postgresql.org"><LINK
REL="HOME"
TITLE="PostgreSQL 8.1.9 Documentation"
HREF="index.html"><LINK
REL="UP"
TITLE="The CVS Repository"
HREF="cvs.html"><LINK
REL="PREVIOUS"
TITLE="CVS Tree Organization"
HREF="cvs-tree.html"><LINK
REL="NEXT"
TITLE="Documentation"
HREF="docguide.html"><LINK
REL="STYLESHEET"
TYPE="text/css"
HREF="stylesheet.css"><META
HTTP-EQUIV="Content-Type"
CONTENT="text/html; charset=ISO-8859-1"><META
NAME="creation"
CONTENT="2007-04-20T04:40:08"></HEAD
><BODY
CLASS="SECT1"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="5"
ALIGN="center"
VALIGN="bottom"
>PostgreSQL 8.1.9 Documentation</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="cvs-tree.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="top"
><A
HREF="cvs.html"
>Fast Backward</A
></TD
><TD
WIDTH="60%"
ALIGN="center"
VALIGN="bottom"
>Appendix F. The <SPAN
CLASS="PRODUCTNAME"
>CVS</SPAN
> Repository</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
HREF="cvs.html"
>Fast Forward</A
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="top"
><A
HREF="docguide.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="CVSUP"
>F.3. Getting The Source Via <SPAN
CLASS="PRODUCTNAME"
>CVSup</SPAN
></A
></H1
><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"
><I
CLASS="EMPHASIS"
>entire</I
></SPAN
> CVS repository on your local system,
allowing fast local access to cvs operations such as <TT
CLASS="OPTION"
>log</TT
>
and <TT
CLASS="OPTION"
>diff</TT
>. 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"
><H2
CLASS="SECT2"
><A
NAME="AEN81526"
>F.3.1. Preparing A <SPAN
CLASS="PRODUCTNAME"
>CVSup</SPAN
> Client System</A
></H2
><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 <TT
CLASS="FILENAME"
>/home/cvs/</TT
>,
but had formerly kept it under a
<SPAN
CLASS="PRODUCTNAME"
>PostgreSQL</SPAN
> development tree in
<TT
CLASS="FILENAME"
>/opt/postgres/cvs/</TT
>. If you intend to keep your
repository in <TT
CLASS="FILENAME"
>/home/cvs/</TT
>, then put
</P><PRE
CLASS="PROGRAMLISTING"
>setenv CVSROOT /home/cvs</PRE
><P>
in your <TT
CLASS="FILENAME"
>.cshrc</TT
> file, or a similar line in
your <TT
CLASS="FILENAME"
>.bashrc</TT
> or
<TT
CLASS="FILENAME"
>.profile</TT
> file, depending on your shell.
</P
><P
> The <SPAN
CLASS="APPLICATION"
>cvs</SPAN
> repository area must be initialized.
Once <TT
CLASS="ENVAR"
>CVSROOT</TT
> 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
<TT
CLASS="FILENAME"
>CVSROOT</TT
> when listing the
<TT
CLASS="ENVAR"
>CVSROOT</TT
> directory:
</P><PRE
CLASS="PROGRAMLISTING"
>$ ls $CVSROOT
CVSROOT/</PRE
><P>
</P
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN81550"
>F.3.2. Running a <SPAN
CLASS="PRODUCTNAME"
>CVSup</SPAN
> Client</A
></H2
><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 <TT
CLASS="REPLACEABLE"
><I
>postgres.cvsup</I
></TT
></PRE
><P>
where <TT
CLASS="OPTION"
>-L 2</TT
> enables some status messages so you
can monitor the progress of the update,
and <TT
CLASS="REPLACEABLE"
><I
>postgres.cvsup</I
></TT
> 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 <TT
CLASS="OPTION"
>repository</TT
> instead of <TT
CLASS="OPTION"
>pgsql</TT
>
in the above setup, you will get a complete copy of the entire
repository at cvsup.postgresql.org, including its
<TT
CLASS="FILENAME"
>CVSROOT</TT
> 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
<TT
CLASS="FILENAME"
>/home/cvs/sup/repository/refuse</TT
>:
</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=<TT
CLASS="REPLACEABLE"
><I
>/usr/local/pgsql</I
></TT
>
# prefix directory where CVSup will store the actual distribution(s)
*default prefix=<TT
CLASS="REPLACEABLE"
><I
>/usr/local/pgsql</I
></TT
>
# 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"
><H2
CLASS="SECT2"
><A
NAME="AEN81582"
>F.3.3. Installing <SPAN
CLASS="PRODUCTNAME"
>CVSup</SPAN
></A
></H2
><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"
><P
><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"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>Note: </B
> <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
></BLOCKQUOTE
></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
CLASS="STEP"
><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
CLASS="SUBSTEPS"
TYPE="a"
><LI
CLASS="STEP"
><P
> If you are running FreeBSD, install the <SPAN
CLASS="PRODUCTNAME"
>CVSup</SPAN
> port.
</P
></LI
><LI
CLASS="STEP"
><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
CLASS="STEP"
><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
CLASS="SUBSTEPS"
TYPE="a"
><LI
CLASS="STEP"
><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
CLASS="STEP"
><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
CLASS="STEP"
><P
> Ensure that the new binaries are in your path.
</P><PRE
CLASS="PROGRAMLISTING"
>$ rehash
$ which cvsup
$ set path=(<TT
CLASS="REPLACEABLE"
><I
>path to cvsup</I
></TT
> $path)
$ which cvsup
/usr/local/bin/cvsup</PRE
><P>
</P
></LI
></OL
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="AEN81624"
>F.3.4. Installation from Sources</A
></H2
><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"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>Note: </B
> 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
></BLOCKQUOTE
></DIV
><P>
</P
><DIV
CLASS="PROCEDURE"
><P
><B
>Linux installation</B
></P
><OL
TYPE="1"
><LI
CLASS="STEP"
><P
> Install Modula-3.
</P
><OL
CLASS="SUBSTEPS"
TYPE="a"
><LI
CLASS="STEP"
><P
> Pick up the <SPAN
CLASS="PRODUCTNAME"
>Modula-3</SPAN
>
distribution from <A
HREF="http://m3.polymtl.ca/m3"
TARGET="_top"
> Polytechnique Montréal</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.
<DIV
CLASS="TIP"
><BLOCKQUOTE
CLASS="TIP"
><P
><B
>Tip: </B
> This particular rpm packaging has
<SPAN
CLASS="emphasis"
><I
CLASS="EMPHASIS"
>many</I
></SPAN
> <SPAN
CLASS="PRODUCTNAME"
>RPM</SPAN
> files,
so you will likely want to place them into a separate
directory.
</P
></BLOCKQUOTE
></DIV
>
</P
></LI
><LI
CLASS="STEP"
><P
> Install the Modula-3 rpms:
</P><PRE
CLASS="PROGRAMLISTING"
># rpm -Uvh pm3*.rpm</PRE
><P>
</P
></LI
></OL
></LI
><LI
CLASS="STEP"
><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
CLASS="STEP"
><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
CLASS="STEP"
><P
> Install the built binary:
</P><PRE
CLASS="PROGRAMLISTING"
># make M3FLAGS="-DNOGUI -DSTATIC" install</PRE
><P>
</P
></LI
></OL
></DIV
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="cvs-tree.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="docguide.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><SPAN
CLASS="PRODUCTNAME"
>CVS</SPAN
> Tree Organization</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="cvs.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Documentation</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>