BOREALIS UTILITY SCRIPTS
The CVS scripts can be used to checkout Borealis or Nmstl and check in changes. The scripts are simple to use and provide error checking you might not perform when using raw CVS commands. You can also use raw CVS commands along with the scripts without conflict.
Manually check out Borealis and copy of the scripts to an installation directory. The Unix scripts are in: borealis/utility/unix/
At Brown the latest scripts are already installed for you in: //cs/dfs/pro/borealis/utility/unix/
You may want to change some of the default paths encoded in the scripts. The locations are preconfigured for installations at Brown. Files containing site specific paths are:
borealis_root.csh borealis_root.sh build.borealis.sh
You can also override default settings by setting environment variables in your login script.
CVSROOT - The directory containing the Borealis CVS repository. The default is to use a site-specific setting. Change this to work with a different repository. CVS_SANDBOX - The directory where Borealis sources will be checked out. The default uses the HOME environment variable. Change this to keep local sources in a different directory. CVS_COMMAND - The command used to invoke CVS. The default is "cvs". Change this to use a different executable. TMP - A directory for temporary files. The default value is: /tmp
Run the cvs.borealis.csh or cvs.borealis.sh script from your login script to declare CVSROOT for the Borealis project and aliases to run the utility scripts. CVS_RSH will also be set to "ssh". This tells CVS that the remote shell is ssh.
<<< begin .cshrc >>> source <install>/cvs_borealis.csh <install> <<< end .cshrc >>>
<<< begin .bashrc >>> source <install>/cvs_borealis.sh <install> <<< end .bashrc >>>
The CVS repository for Borealis is at Brow. Developers at other sites need to enter their password for every CVS command. You can avoid re-entering your password by using cvs-agent.
Get a working copy of the Borealis source code. The code will be put in the ${CVS_SANDBOX}/borealis/ directory. Any prior copy will be removed.
> checkout # Get a fresh Borealis sandbox. > checkout nmstl # Get a fresh Nmstl sandbox.
Make your changes, test them, and check them in.
> checkin [-m "Message"] [-b | <File> ] ... -m "Message" Optional log message (must be the first argument). If no -m argument, an editor will open up for you to enter a log message. -b Add any new files as binaries. You only need to specify this when adding new binary files. If you are you are checking in any combination of binary and source files and not adding them you do not need to specify -b. File Relative file path of select files to check in. Wildcards may be used. If no file arguments, check in new and changed source files in the working directory. Recognized extentions are: h c cc am java sh csh
The checkin utility (checkin.change.sh) performs collision and sanity checks for you. If recent changes have been committed that are newer than the copies in your sandbox then no files will be commited to the repository. You'll be prompted before adding any new files to the repository.
Here are some extra CVS commands you might find handy.
> cvs update -d <new_directory> # Bring a new directory into your sandbox. > cvs log <file> # List log messages for a file. # Create a new directory and file. > cvs add -m "add directory" <directory> > cvs add -m "add file" <file> > cvs commit -m "commit file" <file> # Delete a file > cvs delete <file> > cvs commit -m "gone" <file> > cvs export -D NOW borealis # Snapshot without administative directories. > tar cvf borealis.tar borealis # Make a tar ball. > gzip borealis.tar # Compress it into: borealis.tar.gz > cvs checkout -D yesterday borealis # Get previous versions of borealis. > cvs checkout -D "<#> hour ago" > cvs checkout -D "<month>/<day>/<year>"
The Borealis Build script compiles Borealis and optionally compiles Nmstl, the Borealis tools, the test area or demos. It is a self-contained file and can be used independently from the Borealis CVS scripts.
If any Makefile.ac or configure.ac file is changed you must run the build script again to regenrate the Makefile's used by the make program. These files can change for a lot of reasons and you may not be aware they have changed. If you are having trouble with make, rerun the build script.
The Borealis Build script needs to know the installation directories for several required packages. The default locations are set up for the installation at Brown. You can override the defaults with command arguments or by setting the following variables to the installation directory paths. The build script source file (build.borealis.sh) contains detailed documentation to setup and run the build script.
INSTALL_NMSTL INSTALL_BDB INSTALL_ANTLR INSTALL_MYSQL INSTALL_XERCESC
To exclude MySql and Berkeley-Db components from the build, do not define the INSTALL_MYSQL and INSTALL_BDB variables respectively.
The CVS_SANDBOX variable can be used to specify where you have checked out the source code. By default CVS_SANDBOX is set to the value of the HOME variable.
To build Borealis you must first check out Borealis. If Nmstl is not installed and you are building it as well, check out Nsmtl, too.
# Checkout Borealis. > checkout # Checkoput Nmstl if you want to build it locally. > checkout nmstl # Build Borealis and optionally build Nmstl. > build.borealis.sh # Optionally build Nmstl, build Borealis unless already built, and build the test area. > build.borealis.sh -test
You can suppress compilation and only run the configure step to regenerate the Makefiles by using the -configure option.
# Configure Borealis and optionally configure Nmstl. > build.borealis.sh -configure # Optionally configure Nmstl and Borealis then configure the test area. > build.borealis.sh -configure -test
You can optionally build user defined boxes with the -udb option.
> build.borealis.sh -udb
Before you checkin any changes you can verify they work in several build configurations with the validate.build.sh script. Before running this script Borealis and Nmstl must be checked out in your sandbox. You may also want to set the environment variables as described in the build.borealis.sh script. If not set they will be assigned default values.
> validate.build.sh