Difference between revisions of "Online release"

From GlueXWiki
Jump to: navigation, search
m
m
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
=How To Make an Online Release with SCONS=
+
=How To Make an Online Release=
  
  
'''Introduction'''
+
Official online releases must be made from the hdsys account.  You can also make a release in your own area.  Note that by the word "release" I do NOT refer to tagged releases in an SVN repository, rather to online code distributions to an installation or release directory:
  
Official online releases must be made from the hdsys account.  You can make a release in your own area by following the instructions below, with some obvious modifications.
 
  
Eventually much of this will be automated.
+
1. For official releases log into the hdsys account on the Hall D online computing cluster and cd to the release area.  If you don't know how to do this then you should not be making official releases!  If you are just making a private release then log into your own account and cd to wherever you want to make the release.
  
  
 +
2. Get a copy of the release script:
  
1. Log into the hdsys account on the Hall D online computing cluster.  If you don't know how to do this then you should not be making official releases!
+
  $ svn cat https://halldsvn.jlab.org/repos/trunk/online/packages/buildScripts/scripts/build_online_release > build_online_release
 
+
 
+
2. Go to the official release area, create a new release directory structure:
+
 
+
$ cd /gluex/builds
+
$ mkdir theRelease
+
 
+
$ cd theRelease
+
$ mkdir packages
+
 
+
$ cd packages
+
 
+
 
+
3. Check out the buildScripts package and create top-level SConstruct file:
+
 
+
  $ svn co https://halldsvn.jlab.org/repos/trunk/online/packages/buildScripts
+
$ cp buildScripts/scripts/SConstruct_for_package_dir SConstruct
+
 
+
 
+
4. Check out other packages:
+
 
+
$ svn co https://halldsvn.jlab.org/repos/trunk/online/packages/somePackage
+
... check out more packages if desired ...
+
 
   
 
   
$ ls
+
(See help text below)
somePackage/ buildSCripts/  SConstruct
+
  
  
5.  Set PATH to point to gcc 4.8.0 (or whatever compiler you want) and set LD_LIBRARY_PATH accordingly:
+
3.  Set PATH to point to gcc 4.8.0 (or whatever compiler you want) and set LD_LIBRARY_PATH accordingly (eventually this will be automated):
  
 
  $ setenv PATH /apps/gcc/4.8.0/bin:"$PATH"
 
  $ setenv PATH /apps/gcc/4.8.0/bin:"$PATH"
Line 45: Line 21:
  
  
6.  Set PYTHON and PERL paths to point to build scripts previously checked out (later these scripts will be released into another area, but for now use the versions just checked out):
+
4.  Set environment variables needed for the build (eventually this will be automated):
  
  $ setenv PYTHONPATH /gluex/builds/theRelease/packages/buildScripts/scripts
+
  $ setenv CMSGROOT      /gluex/coda_install_dir/Linux-x86_64
  $ setenv PERL5LIB /gluex/builds/theRelease/packages/buildScripts/scripts
+
$ setenv EVIOROOT      /gluex/coda_install_dir/Linux-x86_64
 +
  $ setenv ETROOT        /gluex/coda_install_dir/Linux-x86_64
 +
$ setenv CODAOBJECTROOT /gluex/coda_install_dir/Linux-x86_64
  
  
7Set package environment variables needed for the build (note that eventually a system script will take care of this step):
+
5Create new release in current working directory, check out all packages, build and install everything
  
  $ setenv CMSGROOT /gluex/coda_install_dir/Linux-x86_64
+
  $ build_online_release myRelease --checkout
(set others as needed, e.g. for EVIO, ET, CODAOBJECT, etc)
+
  
  
8.  Build and install everything (except Java, see below):
 
  
$ scons
+
Script usage and options:
$ scons install INSTALL_DIR=/gluex/builds/theRelease
+
  
 
+
$ build_online_release -h
9Currently Java code must be built separately, until this is fixed do the following:
+
 
+
Usage:
  $ scons java
+
  build_online_release [options] someReleaseDirectory
  $ scons install java INSTALL_DIR=/gluex/builds/theRelease
+
 +
Builds/installs software in an existing online release directory someReleaseDirectoryOptionally can check out
 +
all online software packages from SVN into a new directory structure, or can  update an existing directory structure
 +
to the latest SVN version.  SVN version can be the default or a tagged version.
 +
 
 +
 +
Examples:
 +
 +
To check out online software into a new directory structure newRelease:
 +
    build_online_release newRelease --checkout
 +
 +
To update and rebuild an existing release:
 +
    build_online_release oldRelease --update
 +
 +
To just rebuild an existing release:
 +
  build_online_release oldRelease
 +
 +
Note: the default SVN repository is:  https://halldsvn.jlab.org/repos/trunk/online/packages
 +
      the default tags repository is: https://halldsvn.jlab.org/repos/tags/online/packages
 +
 +
   
 +
  Options:
 +
  -h, --help            show this help message and exit
 +
 +
  Operation Options:
 +
    --checkout          Check out code before build/install
 +
    --update            Update existing code before build/install
 +
    --noBuild          Do not build anything
 +
    --noCPP            Do not build C/C++
 +
    --noJava            Do not build Java
 +
    --noInstall        Do not install
 +
    --force            Ignore errors in options
 +
 +
  Repository Options:
 +
    --repo=REPO        SVN repository URL
 +
    --tagsRepo=TAGSREPO
 +
                        SVN repository URL for tagged versions
 +
    --tagName=TAGNAME  Tag name of tagged version
 +
 +
Note...does not modify the SVN repository in any way, in particular it does NOT create tagged
 +
versions in SVN.

Latest revision as of 14:56, 24 May 2013

How To Make an Online Release

Official online releases must be made from the hdsys account. You can also make a release in your own area. Note that by the word "release" I do NOT refer to tagged releases in an SVN repository, rather to online code distributions to an installation or release directory:


1. For official releases log into the hdsys account on the Hall D online computing cluster and cd to the release area. If you don't know how to do this then you should not be making official releases! If you are just making a private release then log into your own account and cd to wherever you want to make the release.


2. Get a copy of the release script:

$ svn cat https://halldsvn.jlab.org/repos/trunk/online/packages/buildScripts/scripts/build_online_release > build_online_release

(See help text below)


3. Set PATH to point to gcc 4.8.0 (or whatever compiler you want) and set LD_LIBRARY_PATH accordingly (eventually this will be automated):

$ setenv PATH /apps/gcc/4.8.0/bin:"$PATH"
$ setenv LD_LIBRARY_PATH /apps/gcc/4.8.0/lib64:/apps/gcc/4.8.0/lib:"$LD_LIBRARY_PATH"


4. Set environment variables needed for the build (eventually this will be automated):

$ setenv CMSGROOT       /gluex/coda_install_dir/Linux-x86_64
$ setenv EVIOROOT       /gluex/coda_install_dir/Linux-x86_64
$ setenv ETROOT         /gluex/coda_install_dir/Linux-x86_64
$ setenv CODAOBJECTROOT /gluex/coda_install_dir/Linux-x86_64


5. Create new release in current working directory, check out all packages, build and install everything

$ build_online_release myRelease --checkout


Script usage and options:

$ build_online_release -h

Usage: 
 build_online_release [options] someReleaseDirectory

Builds/installs software in an existing online release directory someReleaseDirectory.  Optionally can check out 
all online software packages from SVN into a new directory structure, or can  update an existing directory structure
to the latest SVN version.  SVN version can be the default or a tagged version.
 

Examples:

To check out online software into a new directory structure newRelease:
   build_online_release newRelease --checkout

To update and rebuild an existing release:
   build_online_release oldRelease --update

To just rebuild an existing release:
  build_online_release oldRelease

Note: the default SVN repository is:   https://halldsvn.jlab.org/repos/trunk/online/packages
     the default tags repository is:  https://halldsvn.jlab.org/repos/tags/online/packages


Options:
 -h, --help            show this help message and exit

 Operation Options:
   --checkout          Check out code before build/install
   --update            Update existing code before build/install
   --noBuild           Do not build anything
   --noCPP             Do not build C/C++
   --noJava            Do not build Java
   --noInstall         Do not install
   --force             Ignore errors in options

 Repository Options:
   --repo=REPO         SVN repository URL
   --tagsRepo=TAGSREPO
                       SVN repository URL for tagged versions
   --tagName=TAGNAME   Tag name of tagged version

Note...does not modify the SVN repository in any way, in particular it does NOT create tagged
versions in SVN.