diff --git a/.gitattributes b/.gitattributes index 88146a02fa11ec15896cdd63de8826f9528edce4..4a5a3b97908c6525e321c889b1e108f6ddc7a59a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4629,6 +4629,9 @@ SubSystems/Online_Cobalt/install/install_qpid.sh eol=lf SubSystems/Online_Cobalt/install/lofarsys/bash_profile -text SubSystems/Online_Cobalt/install/lofarsys/bashrc -text SubSystems/Online_Cobalt/install/postinstall.sh eol=lf +SubSystems/Online_Cobalt/install/postinstall_lofarbuild.sh eol=lf +SubSystems/Online_Cobalt/install/postinstall_lofarsys.sh eol=lf +SubSystems/Online_Cobalt/install/postinstall_root.sh eol=lf SubSystems/Online_Cobalt/install/postinstall_root_final.sh eol=lf SubSystems/Online_Cobalt/test/Beamformer/tCoherentStokes_3sec_2st_3sb.output/Beam_0.float.raw -text SubSystems/Online_Cobalt/test/Beamformer/tComplexVoltages_3sec_2st_3sb.output/Beam_0.float.raw -text diff --git a/SubSystems/Online_Cobalt/install/install_casacore.sh b/SubSystems/Online_Cobalt/install/install_casacore.sh index cda0f9c3e4592c6a3387441112b14ed474f64e1c..a134085916c2bc20057b17e684ca19c6831b1c12 100755 --- a/SubSystems/Online_Cobalt/install/install_casacore.sh +++ b/SubSystems/Online_Cobalt/install/install_casacore.sh @@ -8,7 +8,9 @@ # Note: if a new version is used, update: # lofarsys/bashrc (to use the new version in $PATH) # /CMake/variants/variants.cbm001 (to compile against the new version) -CASACORE_SOURCE="ftp://ftp.atnf.csiro.au/pub/software/casacore/casacore-1.7.0.tar.bz2" + +#CASACORE_SOURCE="ftp://ftp.atnf.csiro.au/pub/software/casacore/casacore-1.7.0.tar.bz2" +CASACORE_SOURCE="https://github.com/casacore/casacore/archive/v2.0.1.tar.gz" function strip_extensions { # strip all extensions that are non-numeric @@ -24,21 +26,21 @@ echo "Configuring casacore..." CASACOREDIR=`mktemp -d` pushd $CASACOREDIR >/dev/null -CASACOREVERSION=`basename "$CASACORE_SOURCE" | strip_extensions` -echo " Version is $CASACOREVERSION" - echo " Downloading..." -wget -q -N --tries=3 $CASACORE_SOURCE +wget -q -N --tries=3 "$CASACORE_SOURCE" +echo " Analyzing..." +CASACORE_VERSION=`tar tf "$CASACORE_SOURCE" | head -n 1 | cut -d/ -f1` +echo " Version is $CASACORE_VERSION" echo " Extracting..." tar xf `basename $CASACORE_SOURCE` -cd $CASACOREVERSION +cd $CASACORE_VERSION echo " Configuring..." mkdir build cd build # Note that the -DDATA_DIR option does not fully override the measures tables search paths. # In fact, some of ., ./data, $HOME/aips++/data, $HOME/data, $HOME/casacore/data are still searched first. -cmake .. -DCMAKE_INSTALL_PREFIX=/opt/$CASACOREVERSION \ +cmake .. -DCMAKE_INSTALL_PREFIX=/opt/$CASACORE_VERSION \ -DUSE_HDF5=ON -DUSE_FFTW3=ON -DFFTW3_DISABLE_THREADS=OFF \ -DUSE_THREADS=ON -DUSE_OPENMP=ON \ -DDATA_DIR=/localhome/lofar/IERS/current/data > cmake.log @@ -50,10 +52,10 @@ echo " Installing..." make -j 8 install > make_install.log echo " Validating measures tables..." -/localhome/lofar/$CASACOREVERSION/bin/findmeastable >/dev/null +/localhome/lofar/$CASACORE_VERSION/bin/findmeastable >/dev/null echo " Creating softlink /opt/casacore..." -ln -sfT /opt/$CASACOREVERSION /opt/casacore +ln -sfT /opt/$CASACORE_VERSION /opt/casacore echo " Cleaning up..." popd >/dev/null diff --git a/SubSystems/Online_Cobalt/install/postinstall_lofarbuild.sh b/SubSystems/Online_Cobalt/install/postinstall_lofarbuild.sh new file mode 100755 index 0000000000000000000000000000000000000000..68fbd30c8a199228284111b8e9ec58422ceee88a --- /dev/null +++ b/SubSystems/Online_Cobalt/install/postinstall_lofarbuild.sh @@ -0,0 +1,7 @@ +#!/bin/bash -eu + +./install_IERS.sh +./install_DAL.sh +./install_casacore.sh +./install_qpid.sh + diff --git a/SubSystems/Online_Cobalt/install/postinstall_lofarsys.sh b/SubSystems/Online_Cobalt/install/postinstall_lofarsys.sh new file mode 100755 index 0000000000000000000000000000000000000000..6231324df9ef1b2fdc7c6c4bb0487b957577aeaa --- /dev/null +++ b/SubSystems/Online_Cobalt/install/postinstall_lofarsys.sh @@ -0,0 +1,30 @@ +#!/bin/bash -eu + +# ******************************************** +# Populate ~/.ssh directory +# +# We draw a copy from /globalhome/lofarsystem +# to stay in sync with the rest of LOFAR. +# ******************************************** +echo "Configuring ssh..." +cp -a /globalhome/lofarsystem/.ssh ~ + +echo " Testing..." +ssh localhost true >/dev/null + +# ******************************************** +# Install bash initialisation scripts +# ******************************************** +echo "Configuring bash..." +cp lofarsys/bashrc ~/.bashrc +cp lofarsys/bash_profile ~/.bash_profile + +echo " Validating login..." +ssh localhost true + +# ******************************************** +# Create directories for LOFAR's +# temporary files +# ******************************************** +echo "Configuring /opt/lofar/var..." +mkdir -p ~/lofar/var/{log,run} diff --git a/SubSystems/Online_Cobalt/install/postinstall_root.sh b/SubSystems/Online_Cobalt/install/postinstall_root.sh new file mode 100755 index 0000000000000000000000000000000000000000..c18f0a6ef2969a574f15e55313630107ed60f247 --- /dev/null +++ b/SubSystems/Online_Cobalt/install/postinstall_root.sh @@ -0,0 +1,24 @@ +#!/bin/bash -eu + +echo "Giving /opt to lofarbuild..." +chown lofarbuild.lofarbuild /opt + +# +# Casacore +# +echo "Removing system-supplied /opt/casacore..." +rm -rf /opt/casacore + +# +# QPID +# +echo "Creating /data symlink..." +ln -sfT /localhome /data + +echo "Creating qpid datadir..." +mkdir -p /localhome/qpid +chown qpid.qpid /localhome/qpid + +echo "Installing /etc/init.d/qpidd..." +cp init.d-qpidd.sh /etc/init.d/qpidd +update-rc.d qpidd defaults 95 15