SL4 x86 64 WNs

From T2B Wiki
Revision as of 12:29, 26 August 2015 by Maintenance script (talk | contribs) (Created page with " === SL4 x86_64 on WNs === ==== Setup ==== Setup a sufficient compatible environment for the nodes. Using the packages from GRIF is ok. ==== CMS soft ==== ==== XCMSI ====...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

SL4 x86_64 on WNs

Setup

Setup a sufficient compatible environment for the nodes. Using the packages from GRIF is ok.

CMS soft

XCMSI

  • set VO_CMS_SW_DIR if not done already!!
  • don't source init.sh from the apt installation! it works with normal rpm.
  • export SCRAM_ARCH=slc3_ia32_gcc323
    • i only needed to add a compat-glibc package
  • modify cmsarch.pl: add
 $arch{"Scientific Linux CERN SLC release 4.3 (Beryllium)"} =
   [ "slc3_ia32_gcc323", "" , "" ];
  • generate the default cmsset_default.sh files.
 rm -f cmsset_default.sh cmsset_default.csh
 ./cmsi.pl -c default -a slc3_ia32_gcc323 -f cmsset_default.sh;./cmsi.pl -c default -a slc3_ia32_gcc323 -f cmsset_default.csh
  • cmsi will install it's own scram version and this will use it's own perl libraries to run, BUT it makes use of the default @INC to construct a path for the included perl modules. Although it generates the necessay links to the architectures (i386-linux-thread-multi <= x86_64-linux-thread-multi), but ofcourse it doesn't symlink the default lib to lib64 path. fix this before anything is installed with (it's probably not needed for V0_20_0 and V1_0_0)
 for i in V1_0_2 V1_0_1 V1_0_0 V0_20_0
 do
   dirr=$VO_CMS_SW_DIR/Releases/SCRAM/$i/Installation/TT2
   mkdir -p $dirr/lib
   cd $dirr
   ln -s lib lib64
   cd -
 done
  • first installation
  ./cmsi.pl -a slc3_ia32_gcc323 -f cmsset_default.sh -d ORCA_8_7_5
  • updating/adding installation
 ./cmsi.pl -a slc3_ia32_gcc323 -f cmsset_default.sh -u -d CMSSW_0_6_1
  • to manually install another scram version, from XCMSI/RPMS
 rpm -Uhv  --dbpath /swmgrs/cmss/rpmdb --prefix /swmgrs/cmss SCRAM_V1_0_2-shared-4.i386.rpm SCRAM_V0_20_0-shared-4.i386.rpm

aptinstaller: SL3 prep procedure

Nothing actually prevents one to install a complete SL3 distro on the CMS path. Given the huge size of the cms software, nobody will notice.

  • set VO_CMS_SW_DIR
  • get the follwoing rpms from sl3 (examples from slc305)
  apt-0.5.15cnc6-8.SL.cern.i386.rpm
  popt-1.8.2-21_nonptl.i386.rpm
  rpm-4.2.3-21_nonptl.i386.rpm 
  rpm-build-4.2.3-21_nonptl.i386.rpm
  rpmdb-SL-305-0.20050601.i386.rpm
  rpm-libs-4.2.3-21_nonptl.i386.rpm
  curl-7.10.6-6.rhel3.i386.rpm
    • the curl rpm is needed because i couldn't find the needed compat version for curl.so.2 (symlink might have fixed that, but this is way more powerful.)
  • make new directory
  mkdir -p $VO_CMS_SW_DIR/sl3/var/lib/rpm
  • install rpm rpmdb
  rpm --define "_rpmlock_path $VO_CMS_SW_DIR/sl3/var/lib/rpm/lock" --root $VO_CMS_SW_DIR/sl3 --dbpath $VO_CMS_SW_DIR/sl3/var/lib/rpm/ --relocate /=$VO_CMS_SW_DIR/sl3 -Uvh --nodeps
    • if you keep having SElinux trouble (errors with lsetfilecon message), try with --nocontexts switch
  • install other rpms with same command
    • ignore errors like
  /sbin/ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
  error: %post(apt-0.5.15cnc6-8.SL.cern.i386) scriptlet failed, exit status 1
  • copy the following files:
  cp $VO_CMS_SW_DIR/sl3/usr/lib/rpm/macros ~/.rpmmacros
  cp $VO_CMS_SW_DIR/sl3/usr/lib/rpm/rpmpopt-4.2.3 ~/.popt
  • create an init.sh script file (maybe later cat >> ~/.bashrc??)
  #!/bin/sh
  if [ -z $VO_CMS_SW_DIR ]
  then
    echo "VO_CMS_SW_DIR not set. Exiting..."
    exit 1
  fi
  if [ -z $LD_LIBRARY_PATH ];
  then
    export LD_LIBRARY_PATH=$VO_CMS_SW_DIR/sl3/usr/lib
  else
    export LD_LIBRARY_PATH=$VO_CMS_SW_DIR/sl3/usr/lib:$LD_LIBRARY_PATH
  fi
  export PATH=$VO_CMS_SW_DIR/sl3/bin:$VO_CMS_SW_DIR/sl3/usr/bin:$PATH
  export SCRAM_ARCH=slc3_ia32_gcc323
  export BUILD_ARCH=slc3_ia32_gcc323
  • source init.sh

aptinstaller

  • set VO_CMS_SW_DIR if not done already!!
  • download aptinstaller.sh here (yes, it's modified) aptinstaller.sh
  • run ./aptinstaller.sh setup -arch slc3_ia32_gcc323
  • eval $VO_CMS_SW_DIR/aptinstaller.sh config -path $VO_CMS_SW_DIR (or with -csh)
  • apt-get update
  • apt-get install ...
  • all cms users now need to have their environment prepared by the init.sh script.
    • well, certainly the SCRAM_ARCH part. as long as the curl.so.2 is never called by one of the jobs, it'll be all ok.


SL4.4 x86_64 pre

Use correct apt version without chaningin system rpm Nothing actually prevents one to install a complete SL4 distro on the CMS path. Given the huge size of the cms software, nobody will notice.

  • set VO_CMS_SW_DIR
export VO_CMS_SW_DIR=$PWD
  • get the following rpms from sl4 (examples from sl4.4)
apt-0.5.15lorg3.2-1.el4.rf.x86_64.rpm
curl-7.12.1-8.rhel4.x86_64.rpm
libidn-0.5.6-1.x86_64.rpm
popt-1.9.1-18_nonptl.x86_64.rpm
rpm-4.3.3-18_nonptl.x86_64.rpm
rpm-build-4.3.3-18_nonptl.x86_64.rpm
rpmdb-SL-44-0.20061019.x86_64.rpm
rpm-libs-4.3.3-18_nonptl.x86_64.rpm
xorg-x11-Mesa-libGLU-6.8.2-1.EL.13.37.2.x86_64.rpm
  • and possibly also (but for this one the alias 'which' should be modified as it is hardcoding the path)
which-2.16-4.x86_64.rpm
  • make new directory
  mkdir -p $VO_CMS_SW_DIR/sl4/var/lib/rpm
  • first install rpm rpmdb
  rpm --define "_rpmlock_path $VO_CMS_SW_DIR/sl4/var/lib/rpm/lock" --root $VO_CMS_SW_DIR/sl4 --dbpath $VO_CMS_SW_DIR/sl4/var/lib/rpm/ --relocate /=$VO_CMS_SW_DIR/sl4 -Uvh --nodeps
    • if you keep having SElinux trouble (errors with lsetfilecon message), try with --nocontexts switch
  • install other rpms with same command
    • ignore errors like
  /sbin/ldconfig: Can't create temporary cache file /etc/ld.so.cache~: Permission denied
  error: %post(apt-0.5.15lorg3.2-1.el4.rf.x86_64) scriptlet failed, exit status 1
  • create an init.sh script file (maybe later cat >> ~/.bashrc??)
  #!/bin/sh
  if [ -z $VO_CMS_SW_DIR ]
  then
    echo "VO_CMS_SW_DIR not set. Exiting..."
    exit 1
  fi
  if [ -z $LD_LIBRARY_PATH ];
  then
    export LD_LIBRARY_PATH=$VO_CMS_SW_DIR/sl4/usr/lib64
  else
    export LD_LIBRARY_PATH=$VO_CMS_SW_DIR/sl4/usr/lib64:$LD_LIBRARY_PATH
  fi
  export PATH=$VO_CMS_SW_DIR/sl4/bin:$VO_CMS_SW_DIR/sl4/usr/bin:$PATH
  export SCRAM_ARCH=slc4_ia32_gcc345
  export BUILD_ARCH=slc4_ia32_gcc345
  • source init.sh
  • modify the default aptinstaller.sh
    • use the following patch
--- aptinstaller.sh     2007-02-06 18:16:53.000000000 +0100
+++ aptinstaller-sl4.sh 2007-05-04 17:21:52.000000000 +0200
@@ -150,7 +150,7 @@

   // Locations of binaries
       Bin {
-             methods "/usr/@LIBDIR_NAME@/apt/methods/";
+             methods "@ROOTDIR@/sl4/usr/@LIBDIR_NAME@/apt/methods/";
              gzip "/bin/gzip";
              dpkg "/usr/bin/dpkg";
              dpkg-source "/usr/bin/dpkg-source";
@@ -207,7 +207,7 @@
     seed="glibc glibc-32bit coreutils bash tcsh zsh pdksh perl tcl tk perl-Tk
           readline openssl ncurses XFree86-libs
           e2fsprogs krb5-libs freetype fontconfig XFree86-Mesa-libGLU XFree86-Mesa-libGL
-          xorg-x11-deprecated-libs xorg-x11-libs xorg-x11-Mesa-libGLU xorg-x11-Mesa-libGL compat-libstdc++-33 fglrx_6_8_0 libidn"
+          xorg-x11-deprecated-libs xorg-x11-libs xorg-x11-Mesa-libGLU xorg-x11-Mesa-libGL compat-libstdc++-33 fglrx_6_8_0 libidn curl"

     if [ "$unsupportedDistribution" != "false" ]
     then
@@ -288,6 +288,12 @@
            rpm -q $p --list | grep '\.so' | sed 's!^.*/Provides: !'
            rpm -q $p --list | grep '/bin/' | sed 's!^Provides: !'
          done
+          for q in $seed; do
+            p="--dbpath $rootdir/sl4/var/lib/rpm/ --root $rootdir/sl4 $q"
+            rpm -q $p --provides | grep -v "not installed" | sed 's!<*=.*!!; s!^Provides: !'
+            rpm -q $p --list | grep '\.so' | sed 's!^.*/Provides: !'
+            rpm -q $p --list | grep '/bin/' | sed 's!^Provides: !'
+          done
       fi
       echo; echo "%description"; echo "Seeds RPM repository from the base system."
       echo; echo "%prep"; echo "%build"; echo "%install"; echo "%files";
@@ -398,11 +404,13 @@
 generateAptConfiguration $arch
 (echo "rpm http://$server $serverDir/$arch $groups"; \
  echo "rpm-src http://$server $serverDir/$arch $groups"; ) > $architecture/etc/apt/sources.list
-relocateVariables $arch
+#relocateVariables $arch

 rm -rf $rootdir/$rpmdb
 mkdir -p $rootdir/$rpmdb
 rpm --define "_rpmlock_path $rpmlock" --dbpath $rootdir/$rpmdb --initdb
+relocateVariables $arch
+rpm --define "_rpmlock_path $rpmlock" --dbpath $rootdir/$rpmdb --rebuilddb

 seed

  • run aptinstaller.sh with setup and config option
  $VO_CMS_SW_DIR/aptinstaller.sh setup -path $VO_CMS_SW_DIR -arch slc4_ia32_gcc345 
  eval <tt>$VO_CMS_SW_DIR/aptinstaller.sh config -arch slc4_ia32_gcc345 -path  $VO_CMS_SW_DIR -sh</tt> 
export VO_CMS_SW_DIR=$PWD
source $VO_CMS_SW_DIR/cmsset_default.sh
scramv1 list
    • you should see the list of installed software


Template:TracNotice