Version Management

From GlueXWiki
Jump to: navigation, search

Note: this page is superceded by GlueX Note 2793, "A Version Management System for GlueX," available on the DocDB and on the web (HTML).

Getting Started

For a build of the software from scratch, follow the instructions here.

If you already have an installation of the software (i. e., you followed the instructions linked above), but want to add new versions of hdds and/or sim-recon to the tree, follow these steps:

  1. Prepare a version of version.xml with the versions of your choice. You will find an example to start with in the top directory ($GLUEX_TOP) of your existing build. Let's call this new file /path/to/my/version_new.xml
  2. Prepare a new environment setup file that uses the new version file. An example would be a file called /path/to/my/ which contains
    export GLUEX_TOP=/path/to/my/gluex_top
    export BUILD_SCRIPTS=$GLUEX_TOP/build_scripts
    source $BUILD_SCRIPTS/ /path/to/my/version_new.xml
  3. Set up the environment:
    source /path/to/my/
  4. Go to the top directory of the gluex build and do the build
    cd $GLUEX_TOP
    make -f $BUILD_SCRIPTS/Makefile_all hdds_build sim-recon_build
  5. Save your set-up file. You can use it to set-up the environment when you want to use the build you just created.

Use Cases

  • build a build
  • use a build

Example XML File

<package name="jana" version="0.7.2"/>
<package name="sim-recon" version="2014-09-23"/>
<package name="hdds" version="3.0"/>
<package name="cernlib" version="2005" word_length="64-bit"/>
<package name="xerces-c" version="3.1.1"/>
<package name="clhep" version=""/>
<package name="geant4" version="9.4"/>
<package name="root" version="5.34.00"/>
<package name="ccdb" version="1.03"/>

generate environment variables

  • version variables
  • home variables (assumes directory structure)
  • C-shell and Bourne shell
  • build_scripts makefiles key off version
  • gluex_install assumes same directory structure
  • gluex_env (in build scripts) keys off home directories

Example Environment Settings

setenv GLUEX_TOP /usr/local/gluex
setenv JANA_VERSION 0.7.2
setenv JANA_HOME /usr/local/gluex/jana/jana_0.7.2/
setenv SIM_RECON_VERSION 2014-09-23
setenv HALLD_HOME /usr/local/gluex/sim-recon/sim-recon-2014-09-23
setenv HDDS_VERSION 3.0
setenv HDDS_HOME /usr/local/gluex/hdds/hdds-3.0
setenv CERN /usr/local/gluex/cernlib
setenv CERN_LEVEL 2005
setenv XERCES_C_VERSION 3.1.1
setenv XERCESCROOT /usr/local/gluex/xerces-c/xerces-c-3.1.1
setenv CLHEP /usr/local/gluex/clhep/
setenv ROOT_VERSION 5.34.00
setenv ROOTSYS /usr/local/gluex/root/root_5.34.00
setenv CCDB_VERSION 1.03
setenv CCDB_HOME /usr/local/gluex/ccdb/ccdb_1.03

consistency checking

Is version of jana used consistent with ccdb chosen?

  • not a problem with original build effort
  • can be a problem when using for set-up at using software or developing software

customization for use

  • if not using the same directory structure?
  • version-system home area definitions can be over-ridden explicitly
  • subsequent gluex\_env will respect those

getting and using the system

Incorporated as part of build_scripts