H.4. CVSupを使ったソースの入手

PostgreSQLソースツリーを匿名CVS以外で入手するもうひとつの方法として CVSupがあります。CVSupはJohn Polstra()によりFreeBSDプロジェクト向けに、CVSリポジトリとその他のファイルツリーを配布するために開発されました。

H.4.1. CVSupクライアントシステムの準備

CVSupを作動させるには2つのディレクトリが必要です。1つはローカルのCVSリポジトリ(またはリポジトリではなく、スナップショットを取り込むための場所。下記を参照)、2つ目はローカルでのCVSupの情報を書き留める場所です。これらは同じディレクトリツリーに共存させることも可能です。

CVSリポジトリのコピーをどこに置くかを決めなければなりません。最近我々の1つのシステム上に/home/cvs/リポジトリを設置しました。しかし、以前は/opt/postgres/cvs/PostgreSQL開発ツリーの下に設置していました。リポジトリを/home/cvs/に置いておきたいならば、

setenv CVSROOT /home/cvs

.cshrcファイルに追加するか、同じ内容を.bashrcファイルもしくは.profileファイルに書き込んでください(設定してあるシェルによって内容を追加するファイルは変わります)。

cvsリポジトリの場所は初期化されなければいけません。CVSROOTがいったん設定されれば、下記のコマンドのみで初期化が行われます。

$ cvs init

その後、以下のようにしてCVSROOTディレクトリを表示させると、少なくともCVSROOTという名のディレクトリがあるはずです。

$ ls $CVSROOT
CVSROOT/

H.4.2. CVSupクライアントの起動

パスにcvsupが含まれていることを確認してください。 ほとんどのシステムでは下記のコマンドにより確認できます。

which cvsup

そして次のようにcvsupを実行します。

$ cvsup -L 2 postgres.cvsup

-L 2オプションはアップデートなどを実行した時に実行状況が確認できるようにメッセージを表示させます。 またpostgres.cvsupCVSupの設定ファイルで与えたパスと名前です。

以下に、ある特定のインストール用に変更したCVSupの設定ファイルを示します。 これは、完全なローカルCVSリポジトリを維持します。

# This file represents the standard CVSup distribution file
# for the PostgreSQL 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

上記のセットアップでpgsqlの代わりにrepositoryを指定すると、CVSROOTディレクトリを含むcvsup.postgresql.orgで全リポジトリの完全なコピーが入手できます。もしこの指定を行った場合は、禁止ファイルを使用して(ローカルで修正したい)CVSROOTディレクトリ内のファイル群を排他したくなるでしょう。例えば、上記のセットアップでは以下を/home/cvs/sup/repository/refuseに記述します。

CVSROOT/config*
CVSROOT/commitinfo*
CVSROOT/loginfo*

禁止ファイルの使用方法についてはCVSupのマニュアルページを参照してください。

下記は、PostgreSQLftpサイトにあるお勧めのCVSup用設定ファイルで、現時点のスナップショットのみを取得します。

# This file represents the standard CVSup distribution file
# for the PostgreSQL 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=/usr/local/pgsql

# prefix directory 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

アダルトレンタルサーバー