F.3. ͨ�� CVSup��ȡԴ����

ʹ������ CVS ���� PostgreSQL Դ��������һ�������� CVSup�� CVSup ���� John Polstra �����ģ�����Ϊ FreeBSD ��Ŀ �ַ�CVS �ֿ�������ļ�����

ʹ�� CVSup ����Ҫ�ŵ��������Կɿ�������ı��ػ����ϸ��� ���� CVS �ֿ⣬������ٵı���ʹ��cvs ������ ��log �� diff�� �����ŵ������ PostgreSQL �������Ŀ���ͬ������Ϊ��ʹ��һ�ָ�Ч��������Э�飬 ��Э��ֻ���������£����������޸ġ�

F.3.1. ׼��һ�� CVSup �ͻ���ϵͳ

���������ҪΪ CVSup ׼������Ŀ¼����һ������ CVS �ֿ⣨���߾���һ��Ŀ¼���� �� �����ֻ��ץȡһ�����ն����������ֿ⣻ �����ģ� ��һ������ CVSup �������� ��Щ����������ͬһ��Ŀ¼�����湲�档

ȷ���㽫���ĸ�Ŀ¼���氲����� CVS �ֿ�ı��ؿ����������ǵ�һ��ϵͳ�У� ��������� /home/cvs/ �����˲ֿ⣬ ������ǰ���ǰ������� /opt/postgres/cvs/ ���һ�� PostgreSQL �������Ŀ¼��� ����������IJֿ���� /home/cvs/����ô��

setenv CVSROOT /home/cvs
    

�ŵ���� .cshrc �ļ��� ���߸������õ� shell �����Ƶ��зŵ���� .bashrc �� .profile �ļ��

cvs �ֿ�������뱻��ʼ����һ�������� CVSROOT����ô��ʼ�����Լ򵥵��������������ɣ�

$ cvs init
    

֮�����о� CVSROOT Ŀ¼ʱ���������ܿ���һ����Ϊ CVSROOT ��Ŀ¼��

$ ls $CVSROOT
CVSROOT/
    

F.3.2. ����CVSup�ͻ���

��֤ʵ cvsup �����·��� �ڴ����ϵͳ������Լ������������ʵ��Щ

which cvsup
    

Ȼ��ֻ��Ҫ�������������� cvsup��

$ cvsup -L 2 postgres.cvsup
    

����� -L 2 ����һЩ״̬��Ϣ�� ������Ϳ��Լ�ظ��µĽ�չ���̣��� postgres.cvsup ���㸳����� CVSup �����ļ���·�������ơ�

������һ��Ϊ�ض���װ�޸Ĺ���CVSup �����ļ�����ά����һ�������ı��� CVS �ֿ⣺

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

   

������IJ������������� repository��������pgsql�� ��ô��ͻ�õ� cvsup.postgresql.org �����һ�������IJֿ⿽���� ������ CVSROOT Ŀ¼�������ô��������ܻ�ϣ���ų���ЩĿ¼�е�ijЩ�ļ��� �Ա��������ص��޸ģ�������ʹ��һ�� refuse �ļ������磬������������ã�������� /home/cvs/sup/repository/refuse �����������Щ�У�

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

�ο� CVSup ���ֲ�ҳ��ȡ���ʹ�þܾ���refuse���ļ�����Ϣ��

������� PostgreSQLftp վ�� ����� CVSup �����ļ��� ����ֻ��ץȡĿǰ���汾���Ŀ��գ�

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

    

F.3.3. ��װ CVSup

CVSup ������Դ�������ʽ���������˵Ķ�������ʽ������ Linux RPM ����ʽ��á� ʹ�ö����Ƶ���ʽҪԶ�ȴ�Դ������������Ҫ���׵ö࣬ ��Ҫ����Ϊ������Ҫ��Ч�����Ӵ�� Modula-3 ��������

�Ӷ����ư���װCVSup

�����ӵ��һ���� PostgreSQL ftp վ�� ����������ƽ̨���������������� FreeBSD�� ��Ϳ���ʹ���������˵Ķ�������ʽ����ʱ�� CVSup ����һ������ֲ���˵���ʽ��õġ�

ע��: CVSup �������Ϊһ�����ڷַ� FreeBSD Դ�����Ĺ��߿����ġ� ������Щ���� FreeBSD ������˵�������Ե��� "port"����ֲ����ȡ�� �����Щ����������˵����λ�ȡ�Ͱ�װ�������⣬ ��ô��Ϊ���������ﹱ��һ�����̡�

��д����Щ��ʱ�򣬿��Ի������ƽ̨�Ķ����� Alpha/Tru64��ix86/xBSD�� HPPA/HP-UX10.20��MIPS/irix�� ix86/linux-libc5��ix86/linux-glibc�� Sparc/Solaris��and Sparc/SunOS��

  1. �����ʺ����ƽ̨�� cvsup �����ͻ��˲���Ҫcvsupd�� �������ļ���

    1. ������� FreeBSD����װCVSup ��ֲ��

    2. �����ʹ������ƽ̨���� PostgreSQL ftp վ�� �ҳ��������ʺ���Ķ������ļ���

  2. �����Ҫ�����tar �ļ��Ժ�ʵ���ݺ�Ŀ¼�ṹ�� ���ٶ��� linux �� tar �ļ����ԣ� ��̬�����ƺ� �ֲ�ҳ�Dz������κ�Ŀ¼����Ϣ�ġ�

    1. ����������� tar �ļ��Ķ��㣬��ôֻ��Ҫ�����ǽ�������Ŀ��Ŀ¼���棺

      $ cd /usr/local/bin
      $ tar zxvf /usr/local/src/cvsup-16.0-linux-i386.tar.gz
      $ mv cvsup.1 ../doc/man/man1/
              

    2. ��� tar �ļ�������һ��Ŀ¼�ṹ�� ��ô�� tar �ļ������ /usr/local/src � Ȼ��Ѷ������ƶ��������Ӧ�ĺ���·���

  3. ȷ���µĶ����������·���

    $ rehash
    $ which cvsup
    $ set path=(path to cvsup $path)
    $ which cvsup
    /usr/local/bin/cvsup
          

F.3.4. ��Դ���밲װ

��Դ���밲װ CVSup �������練�ƣ� ��Ҫ����Ϊ�����ϵͳ����Ҫ�Ȱ�װһ�� Modula-3 �������� ���������������Linux RPM�� FreeBSD �İ�����Դ�������ʽ��á�

ע��: һ�� Modula-3 �ľ����밲װ��Լ��Ҫ 200MB ���̿ռ䣬 ����Դ����ɾ�����Լֻ�� 50MB��

Linux ��װ

  1. ��װ Modula-3��

    1. �� Polytechnique Montral ��ȡ Modula-3 ���������ǻ��ڻ�����ά���Ż��� DEC ϵͳ�о����� �Ĵ��롣 PM3 RPM �汾ѹ�����Լ 30MB�� ������д����ʱ��1.1.10-1 ���� RH-5.2 �ϸɾ�����İ�װ���ˣ� ��1.1.11-1 �汾��Ȼ��Ϊ����һ���汾��RH-6.0���������ģ� �޷��� RH-5.2 �����С�

      ��ʾ: ��Щ rpm ������� RPM �ļ��� �������ܻ�Ը������Ƿ��ڶ�����һ��Ŀ¼�

    2. ��װ Modula-3 rpm��

      # rpm -Uvh pm3*.rpm
              

  2. ��� cvsup �汾��

    # cd /usr/local/src
    # tar zxf cvsup-16.0.tar.gz
          

  3. ���� cvsup �ķ����棬��ֹ GUI �����Ա���Ҫ�� X11 �⣺

    # make M3FLAGS="-DNOGUI"
          

    �����������һ����̬�Ķ������Ա���װ��һ��û�а�װ Modula-3 ��ϵͳ���ã�

    # make M3FLAGS="-DNOGUI -DSTATIC"
          

  4. ��װ�������˵Ķ����ƣ�

    # make M3FLAGS="-DNOGUI -DSTATIC" install