2. Installing CVSup

On a FreeBSD system, installing CVSup is as simple as installing the net/cvsup or net/cvsup-without-gui port. After updating the Ports Collection, just change to the /usr/ports/net/cvsup/ or /usr/ports/net/cvsup-without-gui/ directory and type make all install clean.

On non-FreeBSD systems, your best bet is compiling CVSup from source. Since CVSup is written in the Modula-3 programming language, you will need a Modula-3 compiler. The best choice for a fast and easy CVSup deployment is the Ezm3 - a Modula-3 compiler also provided by John D. Polstra, based on the PM3 compiler.

2.1. Installing the Ezm3 Modula-3 compiler

As mentioned before, Ezm3 is a stripped-down, more portable, easier to install version of the PM3 compiler. To install it, you should do the following:

  1. Obtain the Ezm3 source

    The source is available at the FreeBSD FTP sites, in the /pub/FreeBSD/development/CVSup/ezm3/ directory. There are two files that you will need - a bootstrap version for your OS/platform (in the case of Linux using glibc 6, it is named ezm3-1.0-LINUXLIBC6-boot.tar.bz2) and the Ezm3 source itself, named ezm3-1.0-src.tar.bz2.

    Thus, for a Linux installation you will need two files: ftp://ftp.freebsd.org/pub/FreeBSD/development/CVSup/ezm3/ezm3-1.0-src.tar.bz2 and ftp://ftp.freebsd.org/pub/FreeBSD/development/CVSup/ezm3/ezm3-1.0-LINUXLIBC6-boot.tar.bz2.

  2. Unpack the Ezm3 source

    In a directory of your choice, execute the following two commands:

        % tar -jxf /path/to/ezm3-1.0-src.tar.bz2
    
        % tar -jxf /path/to/ezm3-1.0-LINUXLIBC6-boot.tar.bz2
    

    As a result, an ezm3-1.0/ directory will be created, containing all the necessary files.

  3. Make sure byacc exists

    Ezm3 uses the yacc parser generator as part of its build. However, it requires - or at least presumes - a Berkeley version of yacc, which it invokes under the name byacc. If byacc is available as a package or port for your platform, you should install it prior to building Ezm3. However, most versions of yacc are quite sufficient for the needs of Emz3, so you can safely use your system's native yacc(1); however, you have to make sure that it may be invoked as byacc. This can be accomplished by creating a symbolic link, either in yacc(1)'s native directory, or in any other directory you choose:

        # ln -s /usr/bin/yacc /usr/bin/byacc
    
        # ln -s /usr/bin/yacc $HOME/bin/byacc
    

    Note: If you choose to use the second form, placing the byacc link into another directory, make sure that directory (in the case shown, $HOME/bin/) is in your shell's search path (the PATH environment variable) when you build Ezm3.

  4. Change to the Ezm3 directory

        % cd ezm3-1.0/
    
  5. Configure the Ezm3 build options

    By default, Ezm3 installs into the /usr/local/ directory tree. You can change that by modifying the m3config/src/TARGET file, where TARGET is the name of your platform (LINUXLIBC6 for Linux). Find and modify the INSTALL_ROOT variable to your liking.

    If you have X11 installed on your machine, and you want Ezm3 to provide Modula-3 bindings for the X API, you should check the definition of X11ROOT. It should point to the directory which contains the X11 libraries, and which has a subdirectory named X11.

  6. Build and install Ezm3

    Ezm3 is built and installed in a single step. It is not possible to separate the build from the installation, and the installed files will not work if you move them to another location. To build and install Ezm3, issue the following command

        # make
    

    Note: You may need to acquire root privileges for this.

    Note: Ezm3 requires a GNU version of make(1) for its build. On some platforms, the default make(1) is not a GNU version; still, a GNU make(1) is available in a port or package, usually installed as gmake. Thus, you may need to substitute gmake for make in this step.

At this stage, you should have a working Ezm3 Modula-3 compiler. It should be installed under the directory referenced by the INSTALL_ROOT variable mentioned above - the m3build, m3bundle and m3ship binaries in the bin subdirectory, manual pages in the man/man1 subdirectory, and Modula-3 libraries in the lib/m3 subdirectory. You should now be able to proceed to the actual CVSup build.

2.2. Building and installing CVSup

To install CVSup follow this procedure:

  1. Obtain the CVSup sources

    CVSup is also distributed on the FreeBSD FTP sites, in the /pub/FreeBSD/development/CVSup/snapshots/ directory. As of the time of this writing, the latest CVSup snapshot is at version 16.1f, and it can be obtained from ftp://ftp.FreeBSD.org/pub/FreeBSD/development/CVSup/snapshots/cvsup-snap-16.1f.tar.gz.

  2. Unpack the CVSup source

    In a directory of your choosing, execute the command:

        % tar -zxf /path/to/cvsup-snap-16.1f.tar.gz
    

    As a result, a cvsup-snap-16.1f/ directory will be created, containing all the necessary files.

  3. Change to the CVSup build directory

        % cd cvsup-snap-16.1f/
    
  4. Build CVSup

    Unlike Ezm3, the build and install of CVSup may be done separately. For the build, you will need a GNU version of make(1). To build CVSup, issue the following command:

        % make
    
  5. Install CVSup

    To install CVSup, all you need to do is type:

        # make install
    

    Note: Since the CVSup install stage requires the ability to install files into some system directories, again you might need to acquire root privileges before executing this command.

And this is all! Now, you should have a working installation of CVSup - the cvsup, cvsupd and cvpasswd binaries, as well as the accompanying manual pages.

This, and other documents, can be downloaded from ftp://ftp.FreeBSD-bg.ringlet.net/pub/FreeBSD-bg/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD-bg.ringlet.net>.