Difference between revisions of "Version Management"

From GlueXWiki
Jump to: navigation, search
(Getting Started)
Line 3: Line 3:
 
==Getting Started==
 
==Getting Started==
  
For a build of the software from scratch, follow the instructions here.
+
For a build of the software from scratch, follow the instructions [[Scripts for Installing GlueX Software|here]].
  
If you already have an installation of the software, but want to add new versions of hdds and/or sim-recon to the tree, follow these x steps.
+
If you already have an installation of the software (<i>i.&nbsp;e.</i>, you followed the instructions), 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 file /path/to/my/version_new.xml
+
# 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. An example would be a file called /path/to/my/setup_new.sh which contains
+
# Prepare a new environment setup file that uses the new version file. An example would be a file called /path/to/my/setup_new.sh which contains
  
export GLUEX_TOP=/path/to/my/gluex_top
+
export GLUEX_TOP=/path/to/my/gluex_top
export BUILD_SCRIPTS=$GLUEX_TOP/build_scripts
+
export BUILD_SCRIPTS=$GLUEX_TOP/build_scripts
source $BUILD_SCRIPTS/gluex_env_version.sh /path/to/my/version_new.xml
+
source $BUILD_SCRIPTS/gluex_env_version.sh /path/to/my/version_new.xml
  
2) go to the top directory of the gluex build ($GLUEX_TOP) and do the build
+
# Go to the top directory of the gluex build and do the build
  
cd $GLUEX_TOP
+
source /path/to/my/setup_new.sh
source /path/to/my/setup.sh
+
cd $GLUEX_TOP
make -f $BUILD_SCRIPTS/Makefile_all hdds_build sim-recon_build
+
make -f $BUILD_SCRIPTS/Makefile_all hdds_build sim-recon_build
 
+
3) Save your set-up file. You can use it to set-up the environment when you want to use the build you just created.
+
  
 +
# 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==
 
==Use Cases==

Revision as of 19:28, 26 June 2015

A system for managing versions of GlueX Software.

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), 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/setup_new.sh which contains
export GLUEX_TOP=/path/to/my/gluex_top
export BUILD_SCRIPTS=$GLUEX_TOP/build_scripts
source $BUILD_SCRIPTS/gluex_env_version.sh /path/to/my/version_new.xml
  1. Go to the top directory of the gluex build and do the build
source /path/to/my/setup_new.sh
cd $GLUEX_TOP
make -f $BUILD_SCRIPTS/Makefile_all hdds_build sim-recon_build
  1. 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

\begin{verbatim}
<gversions>
<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="2.0.4.5"/>
<package name="geant4" version="9.4"/>
<package name="root" version="5.34.00"/>
<package name="ccdb" version="1.03"/>
</gversions>

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 CERNLIB_VERSION 2005
setenv CERN /usr/local/gluex/cernlib
setenv CERN_LEVEL 2005
setenv CERNLIB_WORD_LENGTH 64-bit
setenv XERCES_C_VERSION 3.1.1
setenv XERCESCROOT /usr/local/gluex/xerces-c/xerces-c-3.1.1
setenv CLHEP_VERSION 2.0.4.5
setenv CLHEP /usr/local/gluex/clhep/2.0.4.5
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