This document describes specific issues with building cvs projects (not with using cvs commands). Examples in this context are cvs behind a firewall with
blocked cvs ports, building difficult applications like Enlightentment E17 and so on.
The shell prompt is indicated with $, prefixed by a general hostname. The foonix™ convention for shell prompts is bash $, zsh $ and etc, which implies A bash shell prompt on any host. Following the same pattern, zsh $ is A zsh shell prompt on any host and so on. In some circumstances, the names blockedhost and openhost are used in place of the shell name. These refer to Any host behind a firewall and Any host outside of a firewall, respectively. Other prompt indicates are typically App > which indicate the prompt for the application named App. Examples are SQL> and mutella >, which are, respectively, the prompt for Interactive SQL and for Mutella.
▨ Note: A command on a host inside the firewall is indicated with blockedhost $. Conversely, openhost $ indicates a host outside the firewall.
The cvs repository for log4j is held at jakarta.apache.org and is accessed via the csv port which is 2401 by default. If the route to this host is
blocked over that port then portforwarding can be setup using ssh as follows:
1. set up an ssh tunnel on the local side of blockedhost to listen at 2401 and forward them to the remote side of the ssh tunnel.
2. set up an ssh tunnel on forward requests received on 2401 of openhost to 2401 of the apache cvs server.
3. login to the apache cvs server (passwd is required and is: annoncvs)
4. checkout the log4j module.
▨ Assumption #1: The blockedhost does not have cvs access via 2401.
▨ Assumption #2: The openhost has cvs access via 2401.
blockedhost $ ssh -L 2401:localhost:2401 foo@openhost openhost $ ssh -L 2401:cvs.apache.org:2401 foo@localhost
blockedhost $ cvs -d :pserver:anoncvs@localhost:/home/cvspublic login Logging in to :pserver:anoncvs@localhost:2401/home/cvspublic CVS password: <enter the passwd here "anoncvs">
blockedhost $ cvs -d :pserver:anoncvs@localhost:/home/cvspublic checkout jakarta-log4j
Building Enlightment from cvs by access the cvs host from behind a firewall which has port 2401 blocked follows much the same pattern as described for building Log4j (see #1, above). The cvs(1) repository for Enlightenment is at cvs.sourceforge.net
blockedhost $ ssh -L 2401:localhost:2401 user@openhost openhost $ ssh -L 2401:cvs.sourceforge.net:2401 user@localhost blockedhost # cvs -d:pserver:anonymous@localhost:/cvsroot/enlightenment login blockedhost $ cvs -z3 -d:pserver:anonymous@localhost:/cvsroot/enlightenment co somemodule
L2FProd's cvs repository for SkinLF is at cvs.dev.java.net and browseable cvs servlet, can be used to browse the source. This is accessible via secure http and requires a SourceCast java.dev.net login. The general idea is to port forward 2401 on openhost to cvs.dev.java.net:2401.
▨ Note: The cvs login for SkinLF does not require a passwd (unlike log4j, which uses anoncvs)
blockedhost $ ssh -L 2401:localhost:2401 user@openhost openhost $ ssh -L 2401:cvs.dev.java.net:2401 user@openhost blockedhost $ cvs -d :pserver:guest@localhost:/cvs login blockedhost $ cvs -d :pserver:guest@localhost:/cvs checkout skinlf
The ID module is within the sandbox of the jakarta commons. The ID Project provides a bunch of utilities for generating various id like sequential numbers, UUIDs, one-up numbers and so on. The UUID provides for 100-nano second interval IDs. The project is avaiable as svn and can be accessed via anonymous [[cvs[[ from:
bash$ cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic checkout jakarta-commons-sandbox/id
Subversion (svn) provides an extended SCCS environment to cvs. Amongst other things, svn provides atomic commits. The subversion client (the svn(1) binary) operates in pretty much the same was as cvs. To checkout source from a Subversion repository, use the checkout (or the co abbreviation) command:
bash $ svn co svn://svn.exactcode.de/t2/trunk/package/themes/noia-icons-gnome
Subversion supports a variety of protocols. The above uses subversions own svn prototol, which uses port 3690. Another option is to access the repository using http (port 80):
bash $ svn co http://svn.foo.com/some/module
The gaim multiprotcol IM client, now called Pelican, is hosted at cvs.sourceforge.net and so the process for accessing the source code via cvs from a host behind a firewall follows the same pattern as for log4j, see #1 and Enlightment, see #2.
The first step requires port forwarding the cvs port from the blockedhost end. Clearly, access to a machine that has the cvs port 2401 open for outbound TCP connections is required.
blocked $ ssh -L 2401:localhost:2401 user@open
open $ rm ~/.ssh/known_hosts # or remove any "localhost" entries
open $ ssh -L 2401:cvs.sourceforge.net:2401 foo@localhost
The Gaim cvs project has no passwd, so press the enter key when asked for one during the login step, below
blocked $ cvs -d ':pserver:anonymous@localhost:/cvsroot/gaim' login blocked $ cvs -z3 -d ':pserver:anonymous@localhost:/cvsroot/gaim' checkout gaim
This grabs the gaim source from cvs by routing the cvs requests to the localhost port 2401, which is fowarded to the "open" host. The source is
checked out (in via the "cvs -z3" command) into directory called "gaim", located in the current directory.
The gaim source uses autogen and configure and requires that autogen.sh be run:
blockedhost $ cd ./gaim blockedhost $ ./autogen.sh blockedhost $ ./configure blockedhost $ make blockedhost # make install
To upate the gaim source, setup the port forwarding as described in #6.A, then change to the gaIM source directory (which is ~/cvs/gaim in the example of #6.A) and issue a cvs client update command:
blocked $ cvs update -d blocked $ gmake blocked $ gmake install
The vim editor is available via cvs from cvs.sourceforge.net. The following steps are for accessing vim source via cvs (from behind a firewall) #7.A, configuring vim options (#7.B) and compiling and installing vim (#7.C).
There are several ways to do this. Choose one of the methods listed in #7.A.1, #7.A.1 or #7.A.3, below.
7.A.1. Via an open 2401 cvs port
This option is really only useful if the cvs port (2401) is accessible, i.e., open, from the host doing the checkout. If not, then an ssh tunnel can be created from an openhost to the vim cvs server and then from the blockedhost to the openhost, as per #7.A.2, below
▨ Tip: The checkout command can be replaced with update to perform delta updates of any previously checked out source.
openhost $ cvs -z3 -d:pserver:anonymous@cvs.sf.net:/cvsroot/vim checkout vim
If the host doing the cvs checkout is behind a firewall with the cvs port 2401 blocked, then an ssh tunnel between the blockedhost and the openhost can be created, with the openhost cvs port forwarded off to the cvs server. To setup the port-forwarded ssh tunnel over standard cvs port 2401:
blockedhost $ ssh -L 2401:localhost:2401 user@openhost openhost $ ssh -L 2401:cvs.sf.net:2401 user@openhost
Then, checkout the source using the cvs checkout command (abbreviated form co),
▨ Tip: Replace checkout with update to perform delta checkout.
blocked $ cvs -z3 -d:pserver:anonymous@localhost:/cvsroot/vim checkout vim
7.A.3. via http port
Accessing cvs via http is a very useful method for accessing cvs source from behind a firewall. It is by far the easiest option and is the recommended appropach for accessing any source via cvs. Use this method if the csv server permits it. Clearly, accessing cvs source via http avoids the issue with port 2401 being blocked by a firewall. The http port 80 should typically be open for communcation in both directions (inbound and outbound TCP) and so any potentially firewalling issues are neatly circumvented.
To checkout the vim source via http, issue a cvs checkout command. The vim source is available via http from the sourceforge cvs pserver via anonymous cvs:
blocked $ cvs -z3 -d:pserver:anonymous@cvs-pserver.sf.net:80/cvsroot/vim checkout vim
▨ Tip: replace checkout with update to perform delta checkout
7.B. Configure vim options
The vim configure(1) script sets several standard options, however multi-byte, keymap and language map options are not enabled by default. Options to enable are specified as arguments to configure.
Several useful options to enable given below. Providing an argument of big for the --with-features option ensures that the +keymap and +langmap features are compiled in to the vim binary. These particular features are required for rendering and entering characters in non ISO-8859-1 (Latin1) languages like Polish, Russian, Hebrew &c.
There are several ways to configure vim options but the simplest methods are to use either configure(1) command line arguments (see #7.B.1) or by setting values in Makefile variables (see #7.B.2). Personally, the configure option is by far the easiet.
All vim features can be set by passing cmdline arguments to the vim configure script. Like all configure scripts, these arguments take the form --enable-XXX, --with-YYY and so on. The most common featuresets include the unicode options for +keymap and +langmap, which marked for inclusion by passing big as the argument to the --with-features configure option. Scripting-language integration (perl, python, ruby &c.) and coding IDE integration (netbeans and the like) are also useful.
bash $ ./configure \ --enable-netbeans \ --enable-perlinterp \ --enable-pythoninterp \ --enable-tclinterp \ --with-tclsh \ --enable-rubyinterp \ --enable-cscope \ --with-compiledby=foonix \ --with-modified-by=foonix \ --enable-multibyte \ --with-features=big
The same features as set in #7.B.1 can be achieved using the Makefile variable CONF_ARGS. Edit the vim Makefile, which is located in the src directory, which is created by the vim checkount (see #7.A and sub-options). Locate and alter CONF_ARGS, setting its value as follows:
CONF_ARGS = \ --enable-netbeans \ --enable-perlinterp --enable-pythoninterp \ --enable-tclinterp \ --with-tclsh \ --enable-rubyinterp \ --enable-cscope \ --with-compiledby=foonix \ --with-modified-by=foonix \ --enable-multibyte \ --with-features=big
After setting the CONF_ARGS, update the vim build-time configuration files by running make config. This ensures the the feature sets listed in the CONF_ARGS are make available to the build-time environment:
bash $ make config
The compilation and installation is fairly standard. By default, vim is installed to /usr/local. This can be changed either by setting the Makefile prefix variable and running make config (see #7.B.2 for this pattern). Like setting the feature sets, the install location can be specified using the configure(1) cmdline. To specify that vim should be installed to /usr/bin and system-wide configuration should be installed to /etc, pass --prefix=/usr and --sysconfdir=/etc as cmdline options to the vim configure script.
Once the configure and build environment have been correctly set, compile the vim source and install the compiled binary and system-level vim configuration using make(1), as follows:
bash $ make bash # make install
Stuart Moorfoot © 12 August 2003 foo@bund.com.au