Epics@GSI Webhome

EPICS installations at GSI - Base installation


1 Preface

1.1 Scripts: #!/bin/bash


Up-to-now
All tools rely on bash shell scripting.


1.2 some global environment variables during installation

During installation those environment variables are used to define a common setup environment

ALL_EPICS_TOP_DIR
top directory which holds different EPICS versions and whose bin directory is included in $PATH (e.g. ~epics, /usr/local/pub)
EPICS_DOWNLOAD_DIR
directory where you store your downloads
EPICS_HOME
directory where your current installation should be (installed)
EPICS_VERSION
version to be installed

therefore do the export here:
# Global installation settings

echo -n <All Epics Top Directory>: && read ALL_EPICS_TOP_DIR && export ALL_EPICS_TOP_DIR
echo -n <EPICS Home Directory>: && read EPICS_HOME && export EPICS_HOME
echo -n <Download Directory>: && read EPICS_DOWNLOAD_DIR && export EPICS_DOWNLOAD_DIR
echo -n <EPICS Version>: && read EPICS_VERSION && export EPICS_VERSION



2 General Preparations

Following the corresponding https://epics.anl.gov/base/R3-15/5-docs/README.html (local copy) section Building EPICS base (Unix and Win32) provided in the download area, which is titled Installation Instruction, do the following:


2.1 Checks

  • Check the supported compilers
  • Check the software requirements
*Software requirements of version 3.15.5*

GNU make
You must use GNU make, gnumake, for any EPICS builds. Set your path so that a gnumake version 3.81 or later is available.
gcc
You must have gcc version 3.4.2 or later.
Perl
You must have perl version 5.8 or later installed. The configure files do not specify the perl full pathname. You need the perl executable in your search path.


2.2 Create Directory and Download Sources


2.2.1 Preface - GSI: Facing different versions flavors of OS, architectures and compilers


Since releases and versions are evolving and to be able to follow this trend, the normal user logged in to Linux system at GSI can rely on having the following environment variables available:
  • GSI_OS_FLAVOR
  • GSI_OS_VERSION
  • GSI_COMPILER_CC

Based on this the installations of epics can be found in directories based on the following scheme:
  • ${GSI_OS_FLAVOR:?undefined}$(echo ${GSI_OS_VERSION?undefined}| sed -e 's/\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/g'/$(uname -m)/${GSI_COMPILER_CC:?undefined}

At the moment /u/epics/ holds all EPICS versions without considering this scheme, but will be in future:
  • /u/epics/EPICS/${GSI_OS_FLAVOR:?undefined}$(echo ${GSI_OS_VERSION?undefined}| sed -e 's/\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/g'/$(uname -m)/${GSI_COMPILER_CC:?undefined}/EPICS-X.YY.ZZ

...and a little bit later:
  • /usr/local/pub/${GSI_OS_FLAVOR:?undefined}$(echo ${GSI_OS_VERSION?undefined}| sed -e 's/\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/g'/$(uname -m)/${GSI_COMPILER_CC:?undefined}/EPICS-X.YY.ZZ

By using the epics script ( see below) every user is directed to the corresponding set of versions.


2.2.1.1 Directory Setup

Here you can find a sketch of how the directories are related with each other

  • Nomenclature
  file
  link to a file
  directory
  link to a directory

  • /usr/local/bin
    • contains (soft) links to <GSI's EPICS Installation Top Directory>/bin/
      • where at the moment:
        • <GSI's EPICS Installation Top Directory> is =~epics/EPICS =
      • but will be:
        • /usr/local/pub
    • linked files
      • epics

  • <GSI's EPICS Installation Top Directory>
  <GSI's EPICS Installation Top Directory>
  bin/
  epics
  epicslogin.sh
  fcn_addtopath.bash
  uniqpaths
  EPICS-<Version A.BB.CC>[_<optional Suffix>] (old structure, supported until new structure has established)
  ...
  EPICS-<Version X.YY.ZZ> (old structure, supported until new structure has established)
  EPICS
  ${GSI_OS_FLAVOR}${GSI_OS_VERSION}/$(uname -m)/${GSI_COMPILER_CC}
  (same sub structure as for EPICS directory in the local installation, see below)

  • <All local EPICS top directory>
  <All local EPICS top directory>
  .profile / .bashrc
  ( could contain settings for EPICS_LOCAL_... settings for epics script:
  EPICS_LOCAL_HOME_DIR=EPICS/${GSI_OS_FLAVOR}$(echo ${GSI_OS_VERSION?undefined}| sed -e 's/\(.\..\)\../\1/g')/$(uname -m)/${GSI_COMPILER_CC} )
  bin
  (should be included in the lookup path PATH)
  epics
  (recommended to be a (soft) link to <GSI's EPICS Installation Top Directory>/bin)
  epicslogin.sh
  (recommended to be a (soft) link to <GSI's EPICS Installation Top Directory>/bin)
  fcn_addtopath.bash
  (recommended to be a (soft) link to <GSI's EPICS Installation Top Directory>/bin)
  uniqpaths
  (recommended to be a (soft) link to <GSI's EPICS Installation Top Directory>/bin)
  programs
  pro/dev (optionally)
  ${GSI_OS_FLAVOR}${GSI_OS_VERSION}/$(uname -m)/${GSI_COMPILER_CC}
  bin
  (should be included in the lookup path PATH)
  lib
  (if necessary should be included in the lookup e.g. path LD_LIBRARY_PATH)
  include
  <Installation directory 1> (e.g. axis, missing libraries, tweaks)
  ...
  <Installation directory N>
  EPICS
  ${GSI_OS_FLAVOR}$(echo ${GSI_OS_VERSION?undefined}| sed -e 's/\(.\..\)\../\1/g')/$(uname -m)/${GSI_COMPILER_CC}
  EPICS-<Version A.BB.CC>[_<optional Suffix>][_dev]
  (w/  suffix: _dev: development versions, place for first installation of new/changed code, may not be working)
  (w/o suffix: _dev: production versions, only changed, if changes work in _dev)
  ...
  EPICS-<Version X.YY.ZZ>
  myepicslogin.sh
  (This setup file myepicslogin.sh is the only recommended place to change/tweak/modify settings for this local installation)
  <other setup files> (optional: called by myepicslogin.sh)
  epicslogin.sh
  (recommended to be a (soft) link to <All local EPICS top directory>/bin)
  fcn_addtopath.bash
  (recommended to be a (soft) link to <All local EPICS top directory>/bin)
  uniqpaths
  (recommended to be a (soft) link to <All local EPICS top directory>/bin)
  base ((soft) link auf base-<Version X.YY.ZZ>
  base-<Version X.YY.ZZ>
  configure
  RELEASE : EPICS_BASE=$(EPICS_HOME)/base
  CONFIG_SITE : =CROSS_COMPILE_TARGET_ARCH ... ==
  startup
  Site.profile
  Site.profile.org.base.<DDYYMM>
  extensions
  (in case of problems, probably (soft) links to other ${GSI_COMPILER_CC} version directory)
  configure (q.v. "base")
  src
  Makefile (master Makefile, edited during installation)
  <Installation directory 1>
  ...
  <Installation directory N>
  modules
  (in case of problems, probably (soft) links to other ${GSI_COMPILER_CC} version directory)
  __bus__/...
  configure (q.v. "base")
  ...
  __soft__/...
  configure (q.v. "base")



2.2.2 Download EPICS base

Version 3.15.5 (as of 2016-12-13) %DOWNLOADFROM% https://epics.anl.gov/wiki/index.php/How_to_check_out_EPICS_Base_with_Bazaar

  1. %CREATE_EPICSMYHOME_EXPORTPART1%s
    • EPICS_VERSION (assuming 3.15.5 to be set)
    • EPICS_HOME %CREATE_EPICSMYHOME_EXPORTPART2%
      $> export EPICS_VERSION=3.15.5
      $> export EPICS_HOME=<EPICS Home Directory>
  2. Then create home directory, if not yet existing:
    $> mkdir -p ${EPICS_HOME:?undefined}
  3. Depending whether (Bazaar - bzr) is available two alternatives open up:
    • Bazaar
      1. %DOWNLOADOF% Base (version as of 2016-12-13 is 3.15.5)
        %DOWNLOADFROM% https://epics.anl.gov/wiki/index.php/How_to_check_out_EPICS_Base_with_Bazaar using Bazaar %DOWNLOADTO% EPICS_HOME
        $> cd $EPICS_HOME &&
        which bzr >/dev/null 2>&1 && bzr checkout --lightweight -r tag:R${%EPICSBASE_VERSION_NAME:?undefined}% lp:epics-base/3.15 base-3.15.5 "
    • tar ball
      1. First export the environment variable EPICS_DOWNLOAD_DIR containing the path to the download directory:
        $> [ -z "$EPICS_DOWNLOAD_DIR" ] && export EPICS_DOWNLOAD_DIR=<Download Directory>
        Then create download directory, if not yet existing:
        $> mkdir -p ${EPICS_DOWNLOAD_DIR}/Base/${EPICS_VERSION}
      2. %DOWNLOADOF% Base (version as of 2016-12-13 is 3.15.5) %DOWNLOADFROM% https://epics.anl.gov/download/base %DOWNLOADTO% ${EPICS_DOWNLOAD_DIR}/Base/${EPICS_VERSION}
        $> cd ${EPICS_DOWNLOAD_DIR}/Base/${EPICS_VERSION} &&
        wget -N -nv https://epics.anl.gov/download/base/baseR3.15.5.tar.gz
      3. Untar and unpack the file to $EPICS_HOME
        $> cd $EPICS_HOME && tar -zxvf ${EPICS_DOWNLOAD_DIR}/Base/${EPICS_VERSION}/baseR3.15.5.tar.gz
  4. Set the correct group (if you are a member of it): epicsadm , also set the correct access rights:
    cd $EPICS_HOME &&
    groups | grep -q -w epicsadm && chgrp -R epicsadm $EPICS_HOME &&
    find $EPICS_HOME -user $(id -n -u) -exec chmod ug+rw {} \;
  5. To make future settings easier:
    $> cd $EPICS_HOME && ln -s -b base-* base

2.2.3 Download patches EPICS base

Starting from the page https://epics.anl.gov/base/R3-15/5-docs/KnownProblems.html for each version may list several patches to be applied.

2.2.4 Compact - Directories & Download of Base Sources

# Global installation settings

echo -n <All Epics Top Directory>: && read ALL_EPICS_TOP_DIR && export ALL_EPICS_TOP_DIR
echo -n <EPICS Home Directory>: && read EPICS_HOME && export EPICS_HOME
echo -n <Download Directory>: && read EPICS_DOWNLOAD_DIR && export EPICS_DOWNLOAD_DIR
echo -n <EPICS Version>: && read EPICS_VERSION && export EPICS_VERSION

download_epicsBase()
{
mkdir -p $EPICS_HOME &&
cd $EPICS_HOME &&
which bzr >/dev/null 2>&1 && bzr checkout --lightweight -r tag:R${%EPICSBASE_VERSION_NAME%}% lp:epics-base/3.15 base-3.15.5"

if[ $? -ne 0 ];
then
mkdir -p ${EPICS_DOWNLOAD_DIR}/Base/${EPICS_VERSION} &&
cd ${EPICS_DOWNLOAD_DIR}/Base/${EPICS_VERSION} &&
wget -N -nv https://epics.anl.gov/download/base/baseR3.15.5.tar.gz
&&
cd $EPICS_HOME && tar -zxvf ${EPICS_DOWNLOAD_DIR}/Base/${EPICS_VERSION}/baseR3.15.5.tar.gz
fi &&
cd $EPICS_HOME &&
groups | grep -q -w epicsadm && chgrp -R epicsadm $EPICS_HOME &&
find $EPICS_HOME -user $(id -n -u) -exec chmod ug+rw {} \;
&&
cd $EPICS_HOME && ln -s -b base-* base
}


download_epicsBase


2.3 Setting environment variables

There are at least two major possiblities:


2.3.1 epics set of scripts


2.3.1.1 epics

The epics script is a global script (used at GSI) to set the EPICS settings.

It relies on having ((symbolic) links to) myepicslogin.sh and epicslogin.sh in the EPICS versions home directories (installation, see below).
Usually it is only installed once for all EPICS distributions and is told (by default values, environment variables, options) where to look for the installations.
By just typing/sourcing epics (which is at GSI included in the default path) practical all settings are done.
$> . epics

For more details use the help option: -h
$> . epics -h


2.3.1.1.1 Usage: epics script

epics has to be sourced as is, i.e. called with a leading dot
$> . epics -h
gives all information on options:
epics [Options] [version]
   sets environment variables for EPICS
  
   * changes to corresponding EPICS HOME directory:
       [<HOME>/<PREFIX><VERSION>, default: /u/epics/EPICS-3.14.9]
   * and calls the (local) login script for this version
     * relies on having a (local) login script ( default: ./myepicslogin.sh ) 
       in the home directory of the corresponding EPICS installation
   * optionally might execute (source) scripts before and after the call to the login script
     * defaults:
        * before script: [ not set ]
        * after  script: [ not set ]

   arguments: 
       version: EPICS version (default: "3.14.9")

   options:
      -h : prints this Help
      -l : list all available versions in home directory /u/epics
      -s : stay at $EPICS_HOME directory
      -q : quiet no output, but error messages
      -v : verbose mode
      -d : debug mode, just echo no action
      -H argument : home directory of several EPICS versions
                    (default: "/u/epics")
      -P argument : version prefix for PREFIXversion
                    (default: "EPICS-")
      -L argument : login script looked for in $EPICS_HOME
                    (default: "./myepicslogin.sh")
      -B argument : script to be sourced before calling login script
                    (default: "[ not set ]")
      -A argument : script to be sourced after calling login script
                    (default: "[ not set ]")

   LOCAL environment variables:
     
      EPICS_LOCAL_HOME:
        the default home directory of the several EPICS versions can be modified
        by setting the environment variable 
        EPICS_LOCAL_HOME [at the moment not set]

      EPICS_LOCAL_DIR_PREFIX:
      the default search prefix for directories in /u/epics can be modified
        by setting the environment variable 
        EPICS_LOCAL_DIR_PREFIX [at the moment not set]

      EPICS_LOCAL_LOGIN_SCRIPT:
      the default call to the (local) login script
        in the epics installation directories can be modified
        by setting the environment variable 
        EPICS_LOCAL_LOGIN_SCRIPT [at the moment not set]

      EPICS_LOCAL_DEFAULT_VERSION:
      the EPICS version can be modified
        by setting the environment variable 
        EPICS_LOCAL_DEFAULT_VERSION [at the moment not set]

      EPICS_LOCAL_SCRIPT_BEFORE_LOGIN:
      the local script default for a script sourced befored login can be modified
        by setting the environment variable 
        EPICS_LOCAL_SCRIPT_BEFORE_LOGIN [at the moment not set]

      EPICS_LOCAL_SCRIPT_AFTER_LOGIN:
      the local script default for a script sourced after login can be modified
        by setting the environment variable 
        EPICS_LOCAL_SCRIPT_AFTER_LOGIN [at the moment not set]

   you have to call this script with a leading '. ', i.e. source it
--> i.e.: '. epics'

   


2.3.1.1.2 epics invocation scheme

The setup script epics relies on other scripts in the EPICS versions home directories. Here you can see how those files are invoked:
  • Typically most of those files are just links to other places, except for myepicslogin.sh.
    Based on the basic setup (see below) an adminstrator can add / modify / tweak at this recommended place.

  . epics [ -Options ] [ <version> ]
  general login script, able to call several EPICS installations
   
  1. optional: <before script>
  source <before script>
  (set by environment variable: EPICS_LOCAL_BEFORE_SCRIPT, or overwritten by option -B <Path><bash script> )
   
  2. <loginScript> "myepicslogin.sh"
  source <loginScript>
  local, i.e. to the single EPICS installation, login script
  default :
  "<epicsHome>/<epicsDirPrefix><version>/myepicslogin.sh"
  overwritten by environment variable:
  EPICS_LOCAL_LOGIN_SCRIPT
  overwritten by option :
  -L <Path><bash script>
   
  2.1. optional <other local pre scripts> within <loginScript>:
  source <other local pre scripts>
   
  2.2. epicslogin.sh :
  source <epicsHome>/<epicsDirPrefix><version>/epicslogin.sh
  epicslogin.sh :
  usually a (soft) link to $ALL_EPICS_TOP_DIR/bin
  or to ${GSI_EPICS_INSTALLATIONS_TOP_DIR}/bin
   
  2.2.1 source <epicsHome>/<epicsDirPrefix><version>/epicslogin.sh
  in case it has been extended/changed to be wrapper this is a symbolic link to
  $EPICS_HOME/base-<version>/startup/Site.profile.wrapper calling itself:
   
  2.2.1.1 source $EPICS_HOME/base-<version>/startup/Site.profile.pre
  most of the local default definitions before calling the former, but modified Site.profile
   
  2.2.1.2 source $EPICS_HOME/base-<version>/startup/Site.profile.main
  former Site.profile modified to be able to be more verbose
   
  2.2.1.3 source $EPICS_HOME/base-<version>/startup/Site.profile.post
  post jobs after calling Site.profile.main
   
  2.3. optional: source <other local scripts, e.g. setting of PATHs, init of cross-compilers>
   
  3. optional: source <after script>
  (set by environment variable: EPICS_LOCAL_AFTER_SCRIPT, or overwritten by option -A <Path><bash script> )

  • Variables:
    • <epicsHome>
      • default: ~epics/EPICS ==
                  (to become ==/usr/local/pub/${GSI_OS_FLAVOR:?undefined}$(echo ${GSI_OS_VERSION?undefined}| sed -e 's/\([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/g'/$(uname -m)/${GSI_COMPILER_CC:?undefined}
        )
      • override by environment variable: EPICS_LOCAL_HOME
      • overwritten by option: -H <Path>
    • <epicsDirPrefix>
      • default: "EPICS-"
      • override by environment variable: EPICS_LOCAL_DIR_PREFIX
      • overwritten by option: -P <Prefix>
    • <version>
      • default: 3.14.9
      • override by environment variable: EPICS_LOCAL_DEFAULT_VERSION
      • overwritten by argument: <Version>
    • <loginScript>
      • default: "./myepicslogin.sh"
      • override by environment variable: EPICS_LOCAL_LOGIN_SCRIPT
      • overwritten by option -L <Path><bash script>
    • <beforeScript>
      • default: [ not set ]
      • override by environment variable: EPICS_LOCAL_BEFORE_SCRIPT
      • overwritten by option -B <Path><bash script>
    • <afterScript>
      • default: [ not set ]
      • override by environment variable: EPICS_LOCAL_AFTER_SCRIPT
      • overwritten by option -A <Path><bash script>


2.3.1.1.2.1 To install the epics script...
  • Only needed on non GSI cluster systems.

  1. Set ALL_EPICS_TOP_DIR to the top home directory of all epics installations (e.g. ~epics/EPICS)
    $> export ALL_EPICS_TOP_DIR=<All Epics Top Directory>
  2. If not yet existing create a bin directory ${ALL_EPICS_TOP_DIR}/bin
    [ -d ${ALL_EPICS_TOP_DIR:?"undefined"} ] && mkdir -p ${ALL_EPICS_TOP_DIR}/bin
  3. Change to the directory $ALL_EPICS_TOP_DIR/bin and download (or check available links for) at least the epics script.
    mkdir -p ${EPICS_DOWNLOAD_DIR:?"undefined"}/bin &&
    cd $EPICS_DOWNLOAD_DIR/bin &&
    wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epics &&
    cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
    cp -i $EPICS_DOWNLOAD_DIR/bin/epics ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
  4. make epics script available
    • As superuser root you could create a soft link from /usr/local/bin to your epics script.
      #> [ "$(id -u root)" - eq 0 ] && ln -s -b $ALL_EPICS_TOP_DIR/bin/epics /usr/local/bin
    • or add $ALL_EPICS_TOP_DIR/bin to the PATH variable.
      [ -d ${ALL_EPICS_TOP_DIR:?"undefined"}/bin ] && export PATH=ALL_EPICS_TOP_DIR}/bin:${PATH}

2.3.1.1.2.2 Compact - Epics Script Installation
install_epicsScript()
{
[ -d ${ALL_EPICS_TOP_DIR:?"undefined"} ] && mkdir -p ${ALL_EPICS_TOP_DIR}/bin &&
mkdir -p ${EPICS_DOWNLOAD_DIR:?"undefined"}/bin &&
cd $EPICS_DOWNLOAD_DIR/bin &&
wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epics &&
cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cp -i $EPICS_DOWNLOAD_DIR/bin/epics ${ALL_EPICS_TOP_DIR:?"undefined"}/bin && :
&&
if [   "$(id -u)" -eq 0  ];
then
ln -s -b $ALL_EPICS_TOP_DIR/bin/epics /usr/local/bin
else
[ -d ${ALL_EPICS_TOP_DIR:?'undefined'}/bin ] && export PATH=ALL_EPICS_TOP_DIR}/bin:${PATH}
fi

if[ $? -ne 0 ];
then
Warning: Can't find named section epics script - 5 in topic Epics.EpicsInstallationsAtGsiBase
fi
}

install_epicsScript


2.3.1.2 epicslogin.sh (fcn_addtopath.bash, uniqpaths, Site.profile set)

The recommended way is to use epicslogin.sh (bash script).
  • epicslogin.sh
    which itself sources the script from <EPICS Base Directory>/startup/Site.profile
    • uses those helper scripts to be put in a <Fcn Helper Bin Directory>
      (e.g. to the directory ${ALL_EPICS_TOP_DIR:-~epics}/bin)


2.3.1.2.1 Usage: epicslogin.sh

epicslogin.sh has to be sourced as is, i.e. called with a leading dot
$> . ./epicslogin.sh
The option ' -h ' or anything else gives a help with all information on options and syntax:
$> ./epicslogin.sh -h
   epicslogin.sh [Options] [version]
   -- sets environment variables for EPICS
   -- calls the Site Profile: set via "-P" or default: "${baseDir}/startup/Site.profile"
   --
   -- version: EPICS version
   --          (default: "3.14.10")
   -- options:
   ----- -v : verbose mode
   ----- -h : prints this help
   ----- -H argument : sets $EPICS_HOME to argument
   -----               (default: "${homeofuser}/EPICS")
   ----- -B argument : sets $EPICS_BASE to argument or
   -----               if argument is a relative path it extends to $EPICS_HOME/argument
   -----               (default: "base-${epicsversion}")
   ----- -P argument : sets Site Profile to be sourced to argument
   -----               (default: "${baseDir}/startup/Site.profile"
   -----                where $basedir behaves like EPICS_BASE
   -----                as described for option "-B")
   ----- -A argument : sets path to necessary helper script "fcn_addtopath.bash":
   -----               (default: "/u/epics/bin/fcn_addtopath.bash")
   -----
   ----- if MY_EPICS_BASE (="") is externally set as base directory:
   -----    case "option -B not used":
   -----                       EPICS_BASE set to MY_EPICS_BASE
   -----    case "option -B used:
   -----                       MY_EPICS_BASE set to EPICS_BASE
   -----
   ----- version: version of EPICS
   -----          (used in the path <epicshome>/base-version)
   -----
   -- you have to call this script with a leading '. '
   --> i.e.: '. epicslogin.sh'
   
thus, e.g.
. ./epicslogin.sh -v -H <EPICS Home Directory> -B <EPICS Base Directory> -A <EPICS Home Directory> <EPICS Version>
gives
   sourcing <EPICS Home Directory>/EPICS-<EPICS Version>/base-<EPICS Version>/startup/Site.profile
   EPICS_HOME               set to <EPICS Home Directory>/EPICS-<EPICS Version>
   EPICS_BASE               set to <EPICS Home Directory>/EPICS-<EPICS Version>/base-<EPICS Version>
   EPICS_EXTENSIONS         set to <EPICS Home Directory>/EPICS-<EPICS Version>/extensions
   EPICS_MODULES            set to <EPICS Home Directory>/EPICS-<EPICS Version>/modules
   PSPRINTER                set to lp
   EPICS_DISPLAY_PATH       set to <EPICS Home Directory>/EPICS-<EPICS Version>/extensions/medm/adl
   ORBITSCREENHOME          set to <EPICS Home Directory>/EPICS-<EPICS Version>/extensions
   EPICS_AR_PORT            set to 7002
   added <EPICS Home Directory>/EPICS-<EPICS Version>/extensions/javalib behind CLASSPATH
   EPICS_SNCSEQ_HOME        set to <EPICS Home Directory>/EPICS-<EPICS Version>/modules/seq
   EPICS_HOST_ARCH          set to linux-x86
   added <EPICS Home Directory>/EPICS-<EPICS Version>/extensions/bin/linux-x86 in front of PATH
   added /u/epics/bin:<EPICS Home Directory>/EPICS-<EPICS Version>/base-<EPICS Version>/bin/linux-x86 in front of PATH
   EPICS_CA_ADDR_LIST       set to <hostname>
   EPICS_CA_AUTO_ADDR_LIST  set to NO
   --> Created for each variable EPICS_* a copy EPICS_*_COPY
       to be used in CONFIGURE scripts where EPICS_ variables might be overwritten 


2.3.1.2.1.1 To install epicslogin.sh (fcn_addtopath.bash, uniqpaths) ...
  • Only needed on non GSI cluster systems.

  1. Set ALL_EPICS_TOP_DIR to the top home directory of all epics installations (e.g. ~epics/EPICS)
    $> export ALL_EPICS_TOP_DIR=<All Epics Top Directory>
  2. If not yet existing create a bin directory ${ALL_EPICS_TOP_DIR}/bin
    [ -d ${ALL_EPICS_TOP_DIR:?"undefined"} ] && mkdir -p -p ${ALL_EPICS_TOP_DIR}/bin || die "something just went wrong"
  3. Change to the directory $ALL_EPICS_TOP_DIR/bin and download (or check available links for) at least the epics script.
    mkdir -p ${EPICS_DOWNLOAD_DIR:?"undefined"}/bin &&
    cd $EPICS_DOWNLOAD_DIR/bin &&
    wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epicslogin.sh &&
    cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
    cp -i $EPICS_DOWNLOAD_DIR/bin/epicslogin.sh ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
    cd $EPICS_DOWNLOAD_DIR/bin &&
    wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/fcn_addtopath.bash &&
    cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
    cp -i $EPICS_DOWNLOAD_DIR/bin/fcn_addtopath.bash ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
    cd $EPICS_DOWNLOAD_DIR/bin &&
    wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/uniqpaths &&
    cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
    cp -i $EPICS_DOWNLOAD_DIR/bin/uniqpaths ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&

2.3.1.2.2 Site.profile set of files
  • Only needed on non GSI cluster systems.
  • ... and optionally those set of file to <EPICS Base Directory>/startupproviding more verbosity.
    • Site.profile.wrapper, wrapper script calling (modified) Site.profile script now named Site.profile.main, before Site.profile.pre and after Site.profile.post
    • Site.profile.pre, most of additional settings done here
    • Site.profile.post, cleaning up, if neccessary
    • modify.Site.profile.pl.txt: file to modify/extend Site.profile for additional verbosity and path check
    • Strategy:
      1. backup orignal Site.profile
        • if already existing
          1. replace current by original
          2. backup original with new date to follow-up last changes
      2. download files, cosmetic renaming
      3. rename Site.profile to Site.profile.main
      4. apply perl script to Site.profile.main
      5. soft link Site.profile.wrapper to Site.profile

2.3.1.2.2.1 To install Site.profile


2.3.1.2.3 Mandatory soft links - (epicslogin.sh, fcn_addtopath.bash, uniqpaths)
Finally you need to set soft links for the scripts in your <EPICS Home Directory>:
cd $EPICS_HOME &&
[ - f ${ALL_EPICS_TOP_DIR?:"undefined"}/epicslogin.sh ] && ln -s -b $ALL_EPICS_TOP_DIR/bin/epicslogin.sh . || echo "epicslogin.sh" not available 1>&2
[ - f ${ALL_EPICS_TOP_DIR?:"undefined"}/fcn_addToPath.bash ] && ln -s -b $ALL_EPICS_TOP_DIR/bin/fcn_addToPath.bash . || echo "fcn_addToPath.bash" not available 1>&2
[ - f ${ALL_EPICS_TOP_DIR?:"undefined"}/uniqpaths ] && ln -s -b $ALL_EPICS_TOP_DIR/bin/uniqpaths . || echo "uniqpaths" not available 1>&2


2.3.1.2.4 Compact - epicslogin.sh (fcn_addtopath.bash, uniqpaths, Site.profile set)

install_epicsloginSh()
{
[ -d ${ALL_EPICS_TOP_DIR:?"undefined"} ] && mkdir -p -p ${ALL_EPICS_TOP_DIR}/bin || die "something just went wrong" &&
mkdir -p ${EPICS_DOWNLOAD_DIR:?"undefined"}/bin &&
cd $EPICS_DOWNLOAD_DIR/bin &&
wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epicslogin.sh &&
cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cp -i $EPICS_DOWNLOAD_DIR/bin/epicslogin.sh ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cd $EPICS_DOWNLOAD_DIR/bin &&
wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/fcn_addtopath.bash &&
cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cp -i $EPICS_DOWNLOAD_DIR/bin/fcn_addtopath.bash ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cd $EPICS_DOWNLOAD_DIR/bin &&
wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/uniqpaths &&
cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cp -i $EPICS_DOWNLOAD_DIR/bin/uniqpaths ${ALL_EPICS_TOP_DIR:?"undefined"}/bin && :
}

install_SiteProfile()
{
mkdir -p ${EPICS_DOWNLOAD_DIR:?"undefined"}/Base/startup &&
cd $EPICS_DOWNLOAD_DIR/Base/startup &&
wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/modify.Site.profile.7z &&
cd ${EPICS_HOME:?"undefined"}/base/startup &&
{ [ -f unix.sh -a ! -f Site.profile ] && cp unix.sh unix.sh.org$(date +%d%m%y) && mv unix.sh Site.profile && ln -s unix.sh Site.profile; : ; } &&
[ -f Site.profile ] && { ls | grep -q Site.profile.org && mv $(ls -tr1 Site.profile.org.* | head -n 1 | xargs) Site.profile; :; } &&
cp Site.profile Site.profile.org$(date +%d%m%y) &&
7z x $EPICS_DOWNLOAD_DIR/Base/startup/modify.Site.profile.7z &&
mv Site.profile Site.profile.main &&
perl -pi modify.Site.profile.pl Site.profile.main &&
ln -s -b -s -b Site.profile.wrapper Site.profile && :

}

install_MandatorySoftLinks()
{
cd ${EPICS_HOME:?"undefined"} &&
[ -f ${ALL_EPICS_TOP_DIR?:"undefined"}/bin/epicslogin.sh ] && ln -s -b $ALL_EPICS_TOP_DIR/bin/epicslogin.sh . || echo "epicslogin.sh" not available 1>&2
[ -f ${ALL_EPICS_TOP_DIR?:"undefined"}/bin/fcn_addtopath.bash ] && ln -s -b $ALL_EPICS_TOP_DIR/bin/fcn_addtopath.bash . || echo "fcn_addtopath.bash" not available 1>&2
[ -f ${ALL_EPICS_TOP_DIR?:"undefined"}/bin/uniqpaths ] && ln -s -b $ALL_EPICS_TOP_DIR/bin/uniqpaths . || echo "uniqpaths" not available 1>&2
}


install_epicsloginSh && install_SiteProfile && install_MandatorySoftLinks


2.3.1.3 myepicslogin.sh

To simplify it is recommended to create this short script in the <EPICS Home Directory> containing all settings, e.g. myepicslogin.sh and modify it for your needs:
    #!/bin/bash
    myepicslogin_scriptname=myepicslogin.sh
    #set -x -v #uncomment for debugging

    # make sure script is sourced
    if [ ${0##*/} = $myepicslogin_scriptname ]
    then 
      echo script \`${myepicslogin_scriptname}\' has to be sourced, i.e. called with a leading \`. $myepicslogin_scriptname\'
      exit -1
    fi

    unset myepicslogin_scriptname

    . ./epicslogin.sh -v -H <EPICS Home Directory> -B <EPICS Base Directory> -A <Fcn Helper Bin Directory>/fcn_addtobath.bash
   

2.3.1.3.1 To install myepicslogin.sh
Direct Download:
$> cd $EPICS_HOME && wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/myepicslogin.sh
Replace command line by your own
cd $EPICS_HOME &&
perl -pi -e 's/^.*epicslogin\.sh -v.*$//g' myepicslogin.sh &&
cd $EPICS_HOME &&
echo -n -e "myepics_home=$EPICS_HOME \n" >> myepicslogin.sh&&
echo -n -e " . \$myepics_home/epicslogin.sh -v -H \$myepics_home -B \$myepics_home/base -A \$myepics_home/fcn_addtopath.bash $(basename $EPICS_HOME) \$* \n\n" >> myepicslogin.sh &&
echo -n -e "unset myepics_home \n" >> myepicslogin.sh&&
cd $EPICS_HOME && . ./myepicslogin.sh



2.3.2 by hand

At least EPICS_HOST_ARCH has to be defined, which can be done via:
$> echo -n "Enter <Your Host's Architecture>: " && read EPICS_HOST_ARCH && export EPICS_HOST_ARCH
where <Your Host's Architecture> can be determined via the script Arch (sh script) or EpicsHostArch.pl (perl script) in the directory <EPICS Base Directory>/startup
so that you could also write:
$> export EPICS_HOST_ARCH=$(EpicsHostArch)
Note in addition the other variables mentionend in the README fimale's section Set environment variables.

2.3.3 Compact - environment

install_epicsScript()
{
[ -d ${ALL_EPICS_TOP_DIR:?"undefined"} ] && mkdir -p ${ALL_EPICS_TOP_DIR}/bin &&
mkdir -p ${EPICS_DOWNLOAD_DIR:?"undefined"}/bin &&
cd $EPICS_DOWNLOAD_DIR/bin &&
wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epics &&
cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cp -i $EPICS_DOWNLOAD_DIR/bin/epics ${ALL_EPICS_TOP_DIR:?"undefined"}/bin && :
&&
if [   "$(id -u)" -eq 0  ];
then
ln -s -b $ALL_EPICS_TOP_DIR/bin/epics /usr/local/bin
else
[ -d ${ALL_EPICS_TOP_DIR:?'undefined'}/bin ] && export PATH=ALL_EPICS_TOP_DIR}/bin:${PATH}
fi
}


install_epicsloginSh()
{
[ -d ${ALL_EPICS_TOP_DIR:?"undefined"} ] && mkdir -p -p ${ALL_EPICS_TOP_DIR}/bin || die "something just went wrong" &&
mkdir -p ${EPICS_DOWNLOAD_DIR:?"undefined"}/bin &&
cd $EPICS_DOWNLOAD_DIR/bin &&
wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epicslogin.sh &&
cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cp -i $EPICS_DOWNLOAD_DIR/bin/epicslogin.sh ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cd $EPICS_DOWNLOAD_DIR/bin &&
wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/fcn_addtopath.bash &&
cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cp -i $EPICS_DOWNLOAD_DIR/bin/fcn_addtopath.bash ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cd $EPICS_DOWNLOAD_DIR/bin &&
wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/uniqpaths &&
cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cp -i $EPICS_DOWNLOAD_DIR/bin/uniqpaths ${ALL_EPICS_TOP_DIR:?"undefined"}/bin && :
}

install_SiteProfile()
{
mkdir -p ${EPICS_DOWNLOAD_DIR:?"undefined"}/Base/startup &&
cd $EPICS_DOWNLOAD_DIR/Base/startup &&
wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/modify.Site.profile.7z &&
cd ${EPICS_HOME:?"undefined"}/base/startup &&
{ [ -f unix.sh -a ! -f Site.profile ] && cp unix.sh unix.sh.org$(date +%d%m%y) && mv unix.sh Site.profile && ln -s unix.sh Site.profile; : ; } &&
[ -f Site.profile ] && { ls | grep -q Site.profile.org && mv $(ls -tr1 Site.profile.org.* | head -n 1 | xargs) Site.profile; :; } &&
cp Site.profile Site.profile.org$(date +%d%m%y) &&
7z x $EPICS_DOWNLOAD_DIR/Base/startup/modify.Site.profile.7z &&
mv Site.profile Site.profile.main &&
perl -pi modify.Site.profile.pl Site.profile.main &&
ln -s -b -s -b Site.profile.wrapper Site.profile && :

}

install_MandatorySoftLinks()
{
cd ${EPICS_HOME:?"undefined"} &&
[ -f ${ALL_EPICS_TOP_DIR?:"undefined"}/bin/epicslogin.sh ] && ln -s -b $ALL_EPICS_TOP_DIR/bin/epicslogin.sh . || echo "epicslogin.sh" not available 1>&2
[ -f ${ALL_EPICS_TOP_DIR?:"undefined"}/bin/fcn_addtopath.bash ] && ln -s -b $ALL_EPICS_TOP_DIR/bin/fcn_addtopath.bash . || echo "fcn_addtopath.bash" not available 1>&2
[ -f ${ALL_EPICS_TOP_DIR?:"undefined"}/bin/uniqpaths ] && ln -s -b $ALL_EPICS_TOP_DIR/bin/uniqpaths . || echo "uniqpaths" not available 1>&2
}

install_myepicslogins.sh()
{
cd $EPICS_HOME && wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/myepicslogin.sh &&
cd $EPICS_HOME &&
perl -pi -e 's/^.*epicslogin\.sh -v.*$//g' myepicslogin.sh &&
cd $EPICS_HOME &&
echo -n -e "myepics_home=$EPICS_HOME \n" >> myepicslogin.sh&&
echo -n -e " . \$myepics_home/epicslogin.sh -v -H \$myepics_home -B \$myepics_home/base -A \$myepics_home/fcn_addtopath.bash $(basename $EPICS_HOME) \$([ -f \$myepics_home/base/startup/unix.sh ] && echo -P \$myepics_home/base/startup/unix.sh) \$* \n\n" >> myepicslogin.sh &&
echo -n -e "unset myepics_home \n" >> myepicslogin.sh&&
cd $EPICS_HOME && . ./myepicslogin.sh
}

install_epicsScript && install_epicsloginSh && install_SiteProfile && install_MandatorySoftLinks && install_myepicslogins.sh

2.3.4 additional variables PVT (see Site.profile)


The following private variables ("PVTs") can be set and are if existent included in the search paths by the script Site.profile:
  • # Allow private versions of extensions with or without a bin subdirectory
    • EPICS_EXTENSIONS_PVT
      • optionally requires existing: ${EPICS_EXTENSIONS_PVT}/bin/${EPICS_HOST_ARCH}
  • # Allow private versions of base
    • EPICS_BASE_PVT
      • requieres existing: ${EPICS_BASE_PVT}/bin/${EPICS_HOST_ARCH} Via those variables private/local versions can be supported


2.4 Compiler settings

If you are using different compilers, CC and CCC have to be modified in the corresponding ${EPICS_BASE}/configure/os directories.
This is triggered by setting EPICS_GCC_VERSION_GSI.
  1. Set EPICS_VERSION (assuming 3.15.5 to be set)
    export EPICS_VERSION=3.15.5
  2. %CREATE_EPICSMYHOME_EXPORTPART1% EPICS_HOME %CREATE_EPICSMYHOME_EXPORTPART2%
    $> echo -n "Enter <EPICS Home Directory>: " && read EPICS_HOME && export EPICS_HOME
    (e.g. ${ALL_EPICS_TOP_DIR:?undefined}/<GSI EPICS OS DIR TREE>/EPICS-<Version> (e.g. EPICS-3.15.5))
  3. $> cd EPICS_HOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD)
  4. Set GSI-Site specific gcc settings:
    $> [ ! -z ${EPICS_GCC_VERSION_GSI} ] &&
    echo 'CC=$(GNU_BIN)/gcc-'${EPICS_GCC_VERSION_GSI} >> ${EPICS_BASE}/configure/os/CONFIG_SITE.${EPICS_HOST_ARCH}.${EPICS_HOST_ARCH}
    $> [ ! -z ${EPICS_GCC_VERSION_GSI} ] &&
    echo 'CCC=$(GNU_BIN)/g++-'${EPICS_GCC_VERSION_GSI} >> ${EPICS_BASE}/configure/os/CONFIG_SITE.${EPICS_HOST_ARCH}.${EPICS_HOST_ARCH}



3 Additional Configuration settings


4 Compile

Setting up the environment
$> cd $EPICS_HOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD)
Following the instruction the README file, but using GSI make (which is GNU make) type: (+ multicore parallel build)
$> cd $EPICS_BASE && make distclean && make - j 8
Finally to add new paths to PATH etc.
$> cd $EPICS_HOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD)

4.1 Obstacles


4.2 Compact - Compile

make_epics()
{
cd $EPICS_HOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD) &&
cd $EPICS_BASE && make distclean && make -j 8 &&
cd $EPICS_HOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD)
}

make_epics



5 All Compact

download_epicsBase()
{
mkdir -p $EPICS_HOME &&
cd $EPICS_HOME &&
which bzr >/dev/null 2>&1 && bzr checkout --lightweight -r tag:R${%EPICSBASE_VERSION_NAME%}% lp:epics-base/3.15 base-3.15.5"

if[ $? -ne 0 ];
then
mkdir -p ${EPICS_DOWNLOAD_DIR}/Base/${EPICS_VERSION} &&
cd ${EPICS_DOWNLOAD_DIR}/Base/${EPICS_VERSION} &&
wget -N -nv https://epics.anl.gov/download/base/baseR3.15.5.tar.gz
&&
cd $EPICS_HOME && tar -zxvf ${EPICS_DOWNLOAD_DIR}/Base/${EPICS_VERSION}/baseR3.15.5.tar.gz
fi &&
cd $EPICS_HOME &&
groups | grep -q -w epicsadm && chgrp -R epicsadm $EPICS_HOME &&
find $EPICS_HOME -user $(id -n -u) -exec chmod ug+rw {} \;
&&
cd $EPICS_HOME && ln -s -b base-* base
}


install_epicsScript()
{
[ -d ${ALL_EPICS_TOP_DIR:?"undefined"} ] && mkdir -p ${ALL_EPICS_TOP_DIR}/bin &&
mkdir -p ${EPICS_DOWNLOAD_DIR:?"undefined"}/bin &&
cd $EPICS_DOWNLOAD_DIR/bin &&
wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epics &&
cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cp -i $EPICS_DOWNLOAD_DIR/bin/epics ${ALL_EPICS_TOP_DIR:?"undefined"}/bin && :
&&
if [   "$(id -u)" -eq 0  ];
then
ln -s -b $ALL_EPICS_TOP_DIR/bin/epics /usr/local/bin
else
[ -d ${ALL_EPICS_TOP_DIR:?'undefined'}/bin ] && export PATH=ALL_EPICS_TOP_DIR}/bin:${PATH}
fi
}


install_epicsloginSh()
{
[ -d ${ALL_EPICS_TOP_DIR:?"undefined"} ] && mkdir -p -p ${ALL_EPICS_TOP_DIR}/bin || die "something just went wrong" &&
mkdir -p ${EPICS_DOWNLOAD_DIR:?"undefined"}/bin &&
cd $EPICS_DOWNLOAD_DIR/bin &&
wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/epicslogin.sh &&
cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cp -i $EPICS_DOWNLOAD_DIR/bin/epicslogin.sh ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cd $EPICS_DOWNLOAD_DIR/bin &&
wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/fcn_addtopath.bash &&
cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cp -i $EPICS_DOWNLOAD_DIR/bin/fcn_addtopath.bash ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cd $EPICS_DOWNLOAD_DIR/bin &&
wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/uniqpaths &&
cd ${ALL_EPICS_TOP_DIR:?"undefined"}/bin &&
cp -i $EPICS_DOWNLOAD_DIR/bin/uniqpaths ${ALL_EPICS_TOP_DIR:?"undefined"}/bin && :
}

install_SiteProfile()
{
mkdir -p ${EPICS_DOWNLOAD_DIR:?"undefined"}/Base/startup &&
cd $EPICS_DOWNLOAD_DIR/Base/startup &&
wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/modify.Site.profile.7z &&
cd ${EPICS_HOME:?"undefined"}/base/startup &&
{ [ -f unix.sh -a ! -f Site.profile ] && cp unix.sh unix.sh.org$(date +%d%m%y) && mv unix.sh Site.profile && ln -s unix.sh Site.profile; : ; } &&
[ -f Site.profile ] && { ls | grep -q Site.profile.org && mv $(ls -tr1 Site.profile.org.* | head -n 1 | xargs) Site.profile; :; } &&
cp Site.profile Site.profile.org$(date +%d%m%y) &&
7z x $EPICS_DOWNLOAD_DIR/Base/startup/modify.Site.profile.7z &&
mv Site.profile Site.profile.main &&
perl -pi modify.Site.profile.pl Site.profile.main &&
ln -s -b -s -b Site.profile.wrapper Site.profile && :

}

install_MandatorySoftLinks()
{
cd ${EPICS_HOME:?"undefined"} &&
[ -f ${ALL_EPICS_TOP_DIR?:"undefined"}/bin/epicslogin.sh ] && ln -s -b $ALL_EPICS_TOP_DIR/bin/epicslogin.sh . || echo "epicslogin.sh" not available 1>&2
[ -f ${ALL_EPICS_TOP_DIR?:"undefined"}/bin/fcn_addtopath.bash ] && ln -s -b $ALL_EPICS_TOP_DIR/bin/fcn_addtopath.bash . || echo "fcn_addtopath.bash" not available 1>&2
[ -f ${ALL_EPICS_TOP_DIR?:"undefined"}/bin/uniqpaths ] && ln -s -b $ALL_EPICS_TOP_DIR/bin/uniqpaths . || echo "uniqpaths" not available 1>&2
}

install_myepicslogins.sh()
{
cd $EPICS_HOME && wget -N -nv --no-check-certificate https://wiki.gsi.de/foswiki/pub/Epics/EpicsInstallationsAtGsiBase/myepicslogin.sh &&
cd $EPICS_HOME &&
perl -pi -e 's/^.*epicslogin\.sh -v.*$//g' myepicslogin.sh &&
cd $EPICS_HOME &&
echo -n -e "myepics_home=$EPICS_HOME \n" >> myepicslogin.sh&&
echo -n -e " . \$myepics_home/epicslogin.sh -v -H \$myepics_home -B \$myepics_home/base -A \$myepics_home/fcn_addtopath.bash $(basename $EPICS_HOME) \$([ -f \$myepics_home/base/startup/unix.sh ] && echo -P \$myepics_home/base/startup/unix.sh) \$* \n\n" >> myepicslogin.sh &&
echo -n -e "unset myepics_home \n" >> myepicslogin.sh&&
cd $EPICS_HOME && . ./myepicslogin.sh
}


make_epics()
{
cd $EPICS_HOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD) &&
cd $EPICS_BASE && make distclean && make -j 8 &&
cd $EPICS_HOME && . epics -H $(dirname $PWD) -P "" $(basename $PWD)
}


download_epicsBase && install_epicsScript && install_epicsloginSh && install_SiteProfile && install_MandatorySoftLinks && install_myepicslogins.sh && make_epics


-- PeterZumbruch - 22 Apr 2014
Topic attachments
I Attachment Action Size Date Who Comment
README.htmlhtml README.html manage 23.8 K 2014-04-22 - 16:36 PeterZumbruch README for EPICS build 3.14.12
Site.profile.postpost Site.profile.post manage 0.2 K 2012-10-12 - 15:29 PeterZumbruch Site.profle.post file to be sourced after Site.profile, for more verbosity
Site.profile.prepre Site.profile.pre manage 2.4 K 2012-10-15 - 15:51 PeterZumbruch Site.profle.pre file to be sourced before Site.profile, for more verbosity
Site.profile.wrapperwrapper Site.profile.wrapper manage 0.5 K 2012-10-12 - 15:30 PeterZumbruch Site.profle.wrapper file sourcing Site.profile.pre Site.profile.main, Site.profile.post, for more verbosity
die.shsh die.sh manage 0.3 K 2013-08-23 - 14:43 PeterZumbruch die.sh script
epicsEXT epics manage 9.1 K 2013-08-09 - 14:18 PeterZumbruch epics (GSI) global login script
epicslogin.shsh epicslogin.sh manage 7.8 K 2013-08-09 - 14:18 PeterZumbruch local bash script for setting epics environments, sourcing Site.profile and fcn_addtopath.bash
fcn_addtopath.bashbash fcn_addtopath.bash manage 4.4 K 2013-08-09 - 14:41 PeterZumbruch helper script sourced by epicslogin.sh
modify.Site.profile.pl.txttxt modify.Site.profile.pl.txt manage 0.7 K 2013-08-13 - 08:45 PeterZumbruch file to modify/extend Site.profile for additional verbosity and path check
modify.Site.profile.shsh modify.Site.profile.sh manage 1.2 K 2014-04-15 - 12:42 PeterZumbruch Script to modify/wrap Site.profile in base/startup
myepicslogin.shsh myepicslogin.sh manage 0.4 K 2013-08-08 - 13:52 PeterZumbruch bash script for setting epics environments, sourcing Site.profile and fcn_addtopath.bash
setupCrisCrossCompiler.shsh setupCrisCrossCompiler.sh manage 1.2 K 2012-10-19 - 11:51 PeterZumbruch cris cross compiler call setup script
uniqpathsEXT uniqpaths manage 0.5 K 2008-11-06 - 18:23 PeterZumbruch perl script needed by fcn_addtopath.bash and Site.profile
Edit | Attach | Print version |  PDF | History: r126 | r111 < r110 < r109 < r108 | Backlinks | View wiki text | Edit WikiText | More topic actions...
Topic revision: r110 - 2014-12-04, PeterZumbruch
 
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback
Imprint (in German)
Privacy Policy (in German)