Difference between revisions of "Online release"

From GlueXWiki
Jump to: navigation, search
m
m
 
(15 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.
 
  
* Log into the hdsys account.
+
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.
  
  
* Go to the official release area, create a new release directory structure:
+
2. Get a copy of the release script:
  
  $ cd /gluex/builds
+
  $ svn cat https://halldsvn.jlab.org/repos/trunk/online/packages/buildScripts/scripts/build_online_release > build_online_release
$ mkdir theRelease
+
 
   
 
   
$ cd theRelease
+
(See help text below)
$ mkdir packages
+
+
$ cd packages
+
 
+
 
+
* 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
+
 
+
 
+
* Check out other packages:
+
 
+
$ svn co https://halldsvn.jlab.org/repos/trunk/online/packages/somePackage
+
... check out more packages if desired ...
+
 
+
$ ls
+
somePackage/ buildSCripts/  SConstruct
+
  
  
* Set path to point to gcc 4.8.0 (or whatever compiler you want):
+
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"
 
 
* Set LD_LIBRARY_PATH for this compiler:
 
 
 
  $ setenv LD_LIBRARY_PATH /apps/gcc/4.8.0/lib64:/apps/gcc/4.8.0/lib:"$LD_LIBRARY_PATH"
 
  $ setenv LD_LIBRARY_PATH /apps/gcc/4.8.0/lib64:/apps/gcc/4.8.0/lib:"$LD_LIBRARY_PATH"
  
  
* Set PYTHON path to point to build scripts previously checked out (later these scripts will be released into another area, but for now assume they don't exist):
+
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 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
  
  
* Set PERL path to point to build scripts, also will be released later:
+
5. Create new release in current working directory, check out all packages, build and install everything
  
  $ setenv PERL5LIB /gluex/builds/theRelease/packages/buildScripts/scripts
+
  $ build_online_release myRelease --checkout
  
  
*  Set environment variables needed for the build (note that eventually a system script will take care of this step):
 
  
$ setenv CMSG /gluex/coda_install-dir/Linux-x86_64
+
Script usage and options:
(set others as needed, e.g. for EVIO, ET, CODAOBJECT, etc)
+
  
 
+
$ build_online_release -h
* Build and install everything:
+
   
 
+
Usage:
  $ scons
+
  build_online_release [options] someReleaseDirectory
  $ scons install INSTALL_DIR=/gluex/builds/theRelease
+
 
+
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
* Currently Java code must be build separately, until this is fixed:
+
to the latest SVN version.  SVN version can be the default or a tagged version.
 
+
 
  $ scons java
+
$ scons install INSTALL_DIR=/gluex/builds/theRelease
+
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.