Next: Creating a New Package Up: User's Guide to the
Previous: GNUmakefiles and gmake
Subsections
Users at remote sites may want to recreate the Software Release Structure on their own local computer. Given below is a simple recipe for the basic operations to do this. See the man pages and www documentation for more
details.
You must have B A B A R CVS, an AFS client license, gmake, and the appropriate compiler installed on your local computer; you'll need valid SLAC unix and AFS accounts. B A B A R CVS is a slightly modified version of CVS. You can get it from a SLAC AFS directory:
/afs/slac.stanford.edu/public/software/cvs
The current version is cvs-bf1-1.10.8.1.tar.Z. You can also obtain it by anonymous ftp from ftp.slac.stanford.edu in the /software/cvs directory.
If you have AFS up and running, you can just copy (cp) the scripts you need from the SLAC AFS directories, instead of using rcp and the .rhosts file as described below in steps (2) and (3). You should still use
importrel to get the release, to insure that the packages and symbolic links are taken care of properly.
- 1.
- Create a local root directory for the B A B A R software tree at your site, and the dist subdirectory. Then set the BFROOT environment variable to point to your local root.
For example: mkdir /home/babar
mkdir /home/babar/dist
setenv BFROOT /home/babar
The BFROOT variable will be needed by you and all other B A B A R users, so you should put the definition in your log-in script or profile.
- 2.
- If you do not have direct AFS access to SLAC, you can provide password for SSH whenever being asked or set up auto-SSH password scheme, see SSH
- Then set the BFDISTr environment variable to point to your SLAC account and the the SLAC software tree; for example: setenv BFDISTr <you>@shire.slac.stanford.edu:/afs/slac.stanford.edu/g/babar/dist
- 3.
- If you have direct AFS access to SLAC, simply set BFDISTr to the AFS address of SLAC software tree:
setenv BFDISTr /afs/slac.stanford.edu/g/babar/dist
-
4.
- Set your working directory to something convenient (like your home directory) and copy some scripts from SLAC:
rcp $BFDISTr/releases/current/SoftRelTools/SRTstartup.csh .
rcp $BFDISTr/releases/current/SoftRelTools/importrel .
rcp $BFDISTr/releases/current/SoftRelTools/importver .
rcp $BFDISTr/releases/current/SoftRelTools/importarch .
Use 'cp' if you have direct AFS access to SLAC. If rcp is not available, try scp.
[If you are using the korn or bourne shell, get SRTstartup.sh instead of SRTstartup.csh.]
- 5.
- Source the SRTstartup script (this command, too, should be part of your regular log-in):
source SRTstartup.csh [csh or tcsh]
. SRTstartup.sh [sh or ksh]
This will set BFDIST to $BFROOT/dist, and also set $BFARCH based on your architecture, among other things.
- 6.
- Set permissions so you can execute the import commands: chmod 755 importrel, importver, importarch
The importver script is used to import a particular package version, and is invoked (in some cases) by importrel.
- 7.
- To install the full source, libraries and binaries for all supported B A B A R platforms (several gigabytes! See 8, below, for an alternative), say: importrel -p <release_number>
where <release_number> is B A B A R release number you want to import. Note that it must be a number, not ``current'' or ``newest'', as these will only import a
symbolic link. To find out which release is currently ``current'', you can say
ls -l $BFROOT/dist/releases/current
at SLAC. You may also want to consult with the Release Coordinator about which release(s) to import. The -p option is required (it means a ``production'' release, from the SLAC $BFDIST tree).
- 8.
- Importing all the supported architectures is likely to be more than you want. To import only selected architecture(s), do this: importrel -pa <release_number>
importarch -p <release_number> $BFARCH
The first command imports the architecture-independent part of the release; the second imports the architecture specific portion. The SRTstartup script defines $BFARCH for your architecture. If you want to import a different architecture (or a second
one), say:
importarch -p <release_number> <arch>
where <arch> is a supported architecture. To see which architectures are available for a particular release, look in $BFROOT/dist/releases/<release_number>/bin at SLAC.
- 9.
- Finally, cd to your new releases directory and make a symbolic link for current; this is required for SRT scripts to work. You can also create links for test and newest if you want. For example, if you have
imported release 4.3.8, do this: cd $BFROOT/dist/releases
ln -s 4.3.8 current
It is likely that some site-specific configuring will be necessary after you have imported the B A B A R software. A system has been established so this may be done in an orderly way, and
so that it doesn't have to be redone from scratch every time you import a new release. The system involves using the ``SiteConfig'' package and something called BFOVERRIDE. For information on using these, see the B A B
A R SiteConfig and override web page:
/BFROOT/doc/Computing/www/Tools/bfoverride/bfoverride.html
On HP-UX systems, there is another step before the local distribution can be used. The HP-UX release includes a repository containing the code for all the template instantiations required for the release. This repository contains files which refer to
various include files using absolute path names. These have to be modified for your local system, in such a way that the file length does not change (or else the compiler will think the files have been corrupted). There is a script, ConvertHPTemplates,
distributed as part of the SoftRelTools package, to do this. Read the ConvertHPTemplates man page for instructions on using this script.
Next: Creating a New Package Up: User's Guide to the
Previous: GNUmakefiles and gmake
John Bartelt (contact Terry Hung - terryh@slac.stanford.edu for questions)
6/1/2001
|