An alternative to using anonymous CVS for retrieving the Postgres source tree is CVSup. CVSup was developed by John Polstra to distribute CVS repositories and other file trees for the FreeBSD project.
Postgres �Υ������ĥ���äƤ��뤿 ���ƿ̾ CVS ��������ˡ�Ȥ��� CVSup ������ޤ���CVSup �ϡ� FreeBSD �ץ��������� �ˤ����ơ�CVS ��ݥ��ȥ�䤽��¾�Υե�����ĥ�����ۤ��뤿��ˡ� John Polstra �ˤ�� �Ƴ�ȯ����ޤ�����
A major advantage to using CVSup is that it can reliably replicate the entire CVS repository on your local system, allowing fast local access to cvs operations such as log and diff . Other advantages include fast synchronization to the Postgres server due to an efficient streaming transfer protocol which only sends the changes since the last update.
CVSup ��Ȥ���ʥ��åȤϡ����ʤ��� �������륷���ƥ��� CVS ��ݥ��ȥ� ���� �� ʣ����������Ƥ����Τǡ����� �� diff �Ȥ��ä� cvs ����������ǹ�®�˹Ԥ���褦�ˤʤ�� �������ȤǤ���
Two directory areas are required for CVSup to do it's job: a local CVS repository (or simply a directory area if you are fetching a snapshot rather than a repository; see below) and a local CVSup bookkeeping area. These can coexist in the same directory tree.
CVSup ��ư�����ˤϣ��ĤΥǥ��쥯�ȥ� �ΰ褬ɬ�פǤ����Ĥޤ��������� CVS ��ݥ��ȥ�ʤ⤷���ϡ���ݥ��ȥ�ǤϤʤ����ʥåץ���åȤ������ ��ʤ�ñ�ʤ�ǥ��쥯�ȥ��ΰ衣��ҡˤȥ�������� CVSup ��ȥ��ꥢ�Ǥ���������Ʊ��Υǥ��쥯�ȥ�� ���Ƕ�¸�����뤳�Ȥ��ǽ�Ǥ���
Decide where you want to keep your local copy of the CVS repository. On one of our systems we recently set up a repository in /home/cvs/, but had formerly kept it under a Postgres development tree in /opt/postgres/cvs/. If you intend to keep your repository in /home/cvs/, then put
CVS ��ݥ��ȥ�Υ������륳�ԡ���ɤ� ���֤������ޤ�����ã�Υ����ƥ�Τ����Σ��ĤǤϡ��Ƕ� /home/cvs/ �Ȥ����Ȥ����˥�ݥ��ȥ�����ꤷ�ޤ������� ������ /opt/postgres/cvs/ �ˤ��� Postgres �γ�ȯ�ĥ���۲����֤��Ƥ� �ޤ�������ݥ��ȥ�� /home/cvs/ ���֤��Ƥ� ���ˤϡ�.cshrc �ե������
setenv CVSROOT /home/cvs
in your .cshrc file, or a similar line in
your .bashrc or
.profile file, depending on your shell.
�ȽƤ�������Ʊ���褦�ʤ��Ȥ��ʤ����ȤäƤ��륷����˱���
�� .bashrc �Ȥ� .profile
�Ȥ������ե�����˽Ƥ����ޤ���
The cvs repository area must be initialized. Once CVSROOT is set, then this can be done with a single command:
cvs �Υ�ݥ��ȥ��ΰ�ϡ���������Ƥ� ��ɬ�פ�����ޤ������ä���Ķ��ѿ� CVSROOT ������ �Ȥ����ȡ�ñ��˰ʲ��Υ��ޥ�ɤǽ�����Ǥ��ޤ���
$ cvs init
after which you should see at least a directory named
CVSROOT when listing the
CVSROOT directory:
���θ塢�Ķ��ѿ� CVSROOT ���ؤ��Ƥ���ǥ��쥯�ȥ�
�Υꥹ�Ȥ��äƤߤ�ȡ����ʤ��Ȥ� CVSROOT
�Ȥ���̾���Υǥ��쥯�ȥ꤬����Ϥ��Ǥ���
$ ls $CVSROOT
CVSROOT/
Verify that cvsup is in your path; on most systems you can do this by typing
�ޤ� cvsup ���ѥ��˴ޤޤ�Ƥ��뤫�ɤ� �����ǧ���ޤ����ۤȤ�ɤΥ����ƥ�ǤϤ��Τ褦�˥����פ��ޤ���
which cvsup
Then, simply run
cvsup using:
���θ塢ñ��cvsup ��ư���ޤ���
$ cvsup -L 2 postgres.cvsup
where -L 2 enables some status messages so you
can monitor the progress of the update,
and postgres.cvsup is
the path and name you have given to your
CVSup configuration file.
-L 2 �Ǥ����Ĥ��Υ��ơ�������å�������ͭ���ˤ�
�ꡢ��������ͻҤ뤳�Ȥ��Ǥ��ޤ����ޤ�
postgres.cvsup �ϡ�
�ºݤˤϤ��ʤ��� CVSup ������ե�����
�ˤĤ����ѥ�̾����ꤷ�ޤ���
Here is a CVSup configuration file modified for a specific installation, and which maintains a full local CVS repository:
����Υ����ƥ��Ѥ�Ĵ�����줿CVSup ������ե������ʲ��˼����ޤ�������ϡ������������Τ� CVS ��ݥ��ȥ���ݼ餹�뤿��Τ�ΤǤ���
# This file represents the standard CVSup distribution file # for the PostgreSQL ORDBMS project # Modified by [email protected] 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=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 points to 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 points to 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
# ���Υե������ PostgreSQL ORDBMS �ץ��������ȤΤ�����Ѱդ��줿�� # ɸ��� CVSup �Υǥ����ȥ�ӥ塼�����ե�����Ǥ��� # Modified by [email protected] 1997-08-28 # - Point to my local snapshot source tree # - Pull the full CVS repository, not just the latest snapshot # # ����ʪ���٤Ƥ�Ŭ�Ѥ����ǥե������ *default host=postgresql.org *default compress *default release=cvs *default delete use-rel-suffix # ���ιԤ�ͭ���ˤ���ȡ��ǿ��Υ��ʥåץ���åȤ�������ޤ� #*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 # CVSup �����Ρ֥֥å��ޡ����ץե�������Ǽ������֤��ݥ��� # ���Υ١����ǥ��쥯�ȥꡣ���֥ǥ��쥯�ȥ� sup/ ������ޤ��� #*default base=/opt/postgres # /usr/local/pgsql *default base=/home/cvs # CVSup ���ºݤ�����ʪ���Ǽ���뤿��ξ������ˤĤ��� # �ǥ��쥯�ȥ�̾�� *default prefix=/home/cvs # �ʲ��Τ��٤Ƥ�ޤࡢ����ʪ���� pgsql # ������ʪ���Ρפ��Ф��롢�ġ�������ʪ # pgsql-doc # pgsql-perl5 # pgsql-src
The following is a suggested CVSup config file from the Postgres ftp site which will fetch the current snapshot only:
Postgres �� ftp ������ ����ǿ��Υ��ʥåץ���åȤ����� ���Ф������ CVSup ����ե������ �ʲ��˼����ޤ��� -
# This file represents the standard CVSup distribution file
# for the PostgreSQL ORDBMS project
#
# Defaults that apply to all the collections
*default host=postgresql.org
*default compress
*default release=cvs
*default delete use-rel-suffix
*default tag=.
# base directory points to where CVSup will store its 'bookmarks' file(s)
*default base=/usr/local/pgsql
# prefix directory points to where CVSup will store the actual distribution(s)
*default prefix=/usr/local/pgsql
# complete distribution, including all below
pgsql
# individual distributions vs 'the whole thing'
# pgsql-doc
# pgsql-perl5
# pgsql-src
# ���Υե�����ϡ�PostgreSQL ORDBMS �ץ��������Ȥ˴ؤ���ɸ���
# CVSup ���ۥե�������������ޤ���
# ���������Τ��٤Ƥ�Ŭ�Ѥ����ǥե����
*default host=postgresql.org
*default compress
*default release=cvs
*default delete use-rel-suffix
*default tag=.
# CVSup �����Ρ֥֥å��ޡ����ץե�������Ǽ���뤿��ξ���
# �١����Ȥʤ�ǥ��쥯�ȥ�
*default base=/usr/local/pgsql
# CVSup ���ºݤ�����ʪ���Ǽ���뤿��ξ������ˤĤ�����
# �ǥ��쥯�ȥ�̾
*default prefix=/usr/local/pgsql
# �ʲ��Τ��٤Ƥ�ޤࡢ����ʪ����
pgsql
# ������ʪ���Ρפ��Ф��롢�ġ�������ʪ
# pgsql-doc
# pgsql-perl5
# pgsql-src
CVSup 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.
CVSup �ϥ�����������ѥ���ѤߥХ��� �ꡢ����� Linux RPM �Ȥ��������ǽ�Ǥ����Х��ʥ��Ȥ��ۤ����� �������饳��ѥ��뤹�����Ϥ뤫�˴�ñ�Ǥ�������ϥ���ѥ���� �ˡ����˹ⵡǽ�ʡ���������¿�ʥС�������ߤ��� Modula-3 ����ѥ��餬ɬ�פȤʤ뤫��Ǥ���
CVSup ��Х��ʥ꤫�饤�ȡ��뤹��
You can use pre-built binaries if you have a platform for which binaries are posted on the Postgres ftp site, or if you are running FreeBSD, for which CVSup is available as a port.
���Ȥ��Υץ�åȥե������ѤΥХ��ʥ꤬ Postgres �� ftp ������ ���֤��Ƥ�����䡢 CVSup�� ports �Ȥ����Ѱդ���Ƥ��� FreeBSD �Ȥ��ξ��ϡ������˥���ѥ��뤵�줿�Х��ʥ����� ���뤳�Ȥ��Ǥ��ޤ���
Note: CVSup was originally developed as a tool for distributing the FreeBSD source tree. It is available as a "port", and for those running FreeBSD, if this is not sufficient to tell how to obtain and install it then please contribute a procedure here. �����ޤ�������������ޤ����ޤ���פʤȤ����ǤϤʤ��ΤǤ�����
CVSup �Ϥ�Ȥ�� FreeBSD �Υ������ĥ�����ۤ��뤿��Υġ���Ȥ��Ƴ�ȯ�� �줿��Τǡ�FreeBSD �Ȥ������Ǥ���� "port" �Ȥ������������ ���ޤ����⤷�������ǽҤ٤Ƥ������Ƥ����Ǥ�����䥤�ȡ��뤹�� �Τ˾����Խ�ʬ�Ȼפ������ϡ������Dz����Ƥ������������ ������ޤ���
At the time of writing, binaries are available for Alpha/Tru64, ix86/xBSD, HPPA/HPUX-10.20, MIPS/irix, ix86/linux-libc5, ix86/linux-glibc, Sparc/Solaris, and Sparc/SunOS.
���ε����μ�ɮ�����������ǽ�ʥХ��ʥ꤬�Ѱդ���Ƥ���ץ�åȥ� ������ˤϡ�Alpha/Tru64, ix86/xBSD, HPPA/HPUX-10.20, MIPS/irix, ix86/linux-libc5, ix86/linux-glibc, Sparc/Solaris, Sparc/SunOS ������ޤ���
Retrieve the binary tar file for cvsup (cvsupd is not required to be a client) appropriate for your platform. ��you(your machine) �� to be a client �ʤΤ��ʡ� cvsupd �ϥ��饤�����¦�ˤ�ɬ�פʤ��äƤ��Ȥ����������
���ʤ��Υץ�åȥե�����˹�ä� cvsup ��cvsupd �ϡʥ����ФǤ��Τǡ˥��饤�� ��Ȥˤʤ�������פǤ��˥Х��ʥ�� tar �ե���������ꤷ�Ƥ���������
If you are running FreeBSD, install the CVSup port.
FreeBSD �Ȥ��ξ��� CVSup port �ȡ��뤷�Ƥ���������
If you have another platform, check for and download the appropriate binary from the Postgres ftp site.
FreeBSD �ʳ��Υץ�åȥե�����Ȥ��ξ��ϡ� Postgres �� ftp ������ ����Ŭ�ڤʥХ��ʥ������� �����ɤ��Ƥ���������
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.
tar �ե����������å����ơ��������Ƥȥǥ��쥯�ȥ깽¤�ʤ⤷���� �Сˤ��ǧ���Ƥ������������ʤ��Ȥ� Linux �Ѥ� tar �ե�����ˤϡ� �����ƥ��å��ʤ˥���줿�˥Х��ʥ�� man �ڡ��������ǥ��쥯 �ȥ�ʬ�����뤳�Ȥʤ����äƤ��ޤ���
If the binary is in the top level of the tar file, then simply unpack the tar file into your target directory:
�Х��ʥ꤬ tar �ե�����Υȥåץǥ��쥯�ȥ�����äƤ���С�ñ�� ����ʤ��Υ��ȡ�����ǥ��쥯�ȥ��Ÿ�����Ƥ������Ǥ��� �ޤ���
$ cd /usr/local/bin
$ tar zxvf /usr/local/src/cvsup-16.0-linux-i386.tar.gz
$ mv cvsup.1 ../doc/man/man1/
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.
tar �ե��������Ȥ��ǥ��쥯�ȥ깽¤�ˤʤäƤ�����ϡ�/usr/local/src �۲���Ÿ�����ơ����θ�Х��ʥ��Ŭ�ڤʾ��˰�ư���Ƥ���������
Ensure that the new binaries are in your path.
�������Х��ʥ꤬�����ʤ��Υѥ���ȿ�Ǥ���Ƥ��뤳�Ȥ��ǧ���� �����ޤ���
$ rehash
$ which cvsup
$ set path=(path to cvsup $path)
$ which cvsup
/usr/local/bin/cvsup
Installing CVSup 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 RPM, FreeBSD package, or source code.
CVSup �������饤�ȡ��뤹�뤳 �Ȥϡ�����ʤ˴�ñ�ʤ��ȤǤϤ���ޤ����μ����ͳ�ϡ��ۤȤ�� �Υ����ƥ�ǤϤޤ� Modula-3 ����ѥ���ȡ��뤹��ɬ�פ��� �뤫��Ǥ������Υ���ѥ����Linux RPM, FreeBSD package ����ӥ����������ɤȤ�������Ƥ��ޤ���
Note: 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.
Modula-3 ��ޤä���Υ��������饤�ȡ��뤹��ˤ� 200MB ���٤� �ǥ������ΰ��ɬ�פȤ��ޤ����ʥ��ȡ����ˡ˥������������� ���ޤ��� 50MB �ۤ�����Ǥ��ޤ���
Linux �ǤΥ��ȡ���
Install Modula-3.
Modula-3 �ȡ��뤷�ޤ���
Pick up the Modula-3 distribution from Polytechnique Montr��l, who are actively maintaining the code base ��ʸ�������ʥե�졩�� originally developed by the DEC Systems Research Center. The "PM3" RPM 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.
Polytechnique Montreal, ���� Modula-3 ������ʪ���äƤ��ޤ��� ����������Ū�˥����ɥ١������ݼ餷�Ƥ���Ȥ����Ǥ��������ꥸ�ʥ� ��the DEC Systems Research Center �dz�ȯ����ޤ����� "PM3" RPM �ϰ��̸���� 30MB ����ޤ�����ɮ�����Ǥ� 1.1.10-1 ������ RH-5.2 ��Ǥޤ� ��˥��ȡ��뤵��Ƥ��ޤ���1.1.11-1 �����餫���̤Υ��� (RH-6.0?) �ǥӥ�ɤ���Ƥ���褦�ǡ�RH-5.2 �Ǥ�ư���ޤ���
Tip: This particular rpm packaging has many RPM files, so you will likely want to place them into a separate directory.
��������� rpm �ѥå������ˤ� ��������� RPM �ե����뤬����Τǡ��̡��Υǥ��� ���ȥ�����줿���ʤ뤳�ȤǤ��礦��
Install the Modula-3 rpms:
Modula-3 rpm �ȡ��뤷�ޤ���
# rpm -Uvh pm3*.rpm
Unpack the cvsup distribution:
cvsup ������ʪ��Ÿ�����ޤ���
# cd /usr/local/src
# tar zxf cvsup-16.0.tar.gz
Build the cvsup distribution, suppressing the GUI interface feature to avoid requiring X11 libraries:
cvsup ������ʪ��ӥ�ɤ��ޤ���X11 �Υ饤�֥����ᤵ���ʤ��褦 �ˤ��뤿�ᡢGUI �����ե�������ǽ��Ȥ�ʤ��褦�˻ؼ����ޤ���
# make M3FLAGS="-DNOGUI"
and if you want to build a static binary to move to systems
which may not have Modula-3 installed, try:
�ޤ���Modula-3 �����ȡ��뤵��Ƥ��ʤ������ƥ������뤿���
�����ƥ��å��Х��ʥ�ǥӥ�ɤ�������С��ʲ��Τ褦�ˤ��ޤ���
# make M3FLAGS="-DNOGUI -DSTATIC"
Install the built binary:
�ӥ�ɤ��줿�Х��ʥ�ȡ��뤷�ޤ���
# make M3FLAGS="-DNOGUI -DSTATIC" install