diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..421b73d21e27d4cc110146bba11f56e59f865c06 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +build/* +*.tgz diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..3fad1e79ed3ba36b8a8af7b29b192062def0bf5c --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,12 @@ +--- +variables: + KOJI_TAG: 'cern' + BUILD_6: 'True' + BUILD_7: 'True' + BUILD_8: 'True' + DIST_7: '.el7.cern' + DIST_8: '.el8.cern' + +# DO NOT MODIFY THIS +include: 'https://gitlab.cern.ch/linuxsupport/rpmci/raw/master/rpm-ci.yml' +# DO NOT MODIFY THIS diff --git a/.rpmlint b/.rpmlint new file mode 100644 index 0000000000000000000000000000000000000000..9e30292e3aa3769b55358560bbecb645be42800c --- /dev/null +++ b/.rpmlint @@ -0,0 +1,6 @@ +addFilter("E: specfile-error warning: bogus date") +addFilter("E: executable-sourced-script") +addFilter("E: sourced-script-with-shebang") +addFilter("E: zero-length") +addFilter("E: standard-dir-owned-by-package") +addFilter("E: script-without-shebang") diff --git a/Makefile b/Makefile index e8fab987c7e85e6690ee118bf53ea28476567d69..af2decdc61cc086aa8c7b1683a7e3f84a4a8fd8c 100644 --- a/Makefile +++ b/Makefile @@ -1,42 +1,18 @@ -include VERSION +SPECFILE = $(shell find -maxdepth 1 -type f -name *.spec) +SPECFILE_NAME = $(shell awk '$$1 == "Name:" { print $$2 }' $(SPECFILE) ) +SPECFILE_VERSION = $(shell awk '$$1 == "Version:" { print $$2 }' $(SPECFILE) ) +SPECFILE_RELEASE = $(shell awk '$$1 == "Release:" { print $$2 }' $(SPECFILE) ) +TARFILE = $(SPECFILE_NAME)-$(SPECFILE_VERSION).tgz +DIST ?= $(shell rpm --eval %{dist}) -ifeq ($(PREFIX), $(EMPTY)) -PREFIX=/usr/sbin -endif - -default: - @echo "targets: tar srpm brpm rpm clean distclean rpmclean clobber" - -stamp-tar: - rm -rf $(PACKAGE)-$(VERSION) - mkdir $(PACKAGE)-$(VERSION) - cp -rv src/* $(PACKAGE)-$(VERSION)/ - find $(PACKAGE)-$(VERSION)/ -name .svn -print0 | xargs -0 rm -rf - tar --exclude .svn -czf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION) - rm -rf $(PACKAGE)-$(VERSION) - touch stamp-tar - -tar: stamp-tar - -brpm: tar - make -C rpm brpm - -srpm: tar - make -C rpm srpm - -rpm: tar - make -C rpm rpm +sources: + tar -zcvf $(TARFILE) --exclude-vcs --transform 's,^src,$(SPECFILE_NAME)-$(SPECFILE_VERSION)/,' src/* clean: - @echo "clean happens here" - -distclean: clean - rm -f $(PACKAGE)-$(VERSION).tar.gz - rm -f stamp-* + rm -rf build/ $(TARFILE) -rpmclean: - make -C rpm distclean +rpm: sources + rpmbuild -bb --define 'dist $(DIST)' --define "_topdir $(PWD)/build" --define '_sourcedir $(PWD)' $(SPECFILE) -clobber: distclean rpmclean - -.PHONY: default clean rpmclean stamp-tar +srpm: sources + rpmbuild -bs --define 'dist $(DIST)' --define "_topdir $(PWD)/build" --define '_sourcedir $(PWD)' $(SPECFILE) diff --git a/README b/README index a1e89d54d170818e453a8cc2f928f3803e1707b6..8c15b4e3270f19cc65f7d2b9876b8467f4ce9ffe 100644 --- a/README +++ b/README @@ -5,3 +5,4 @@ Note: on Oct 21, 2011 the Linux Certification Committee agreed to the proposal to drastically simplify the Hepix script. This is implemented in version 4.0. +This repository has been moved to rpmci for package building. diff --git a/VERSION b/VERSION deleted file mode 100644 index a3de50c1a20ed4c3b2533cad6604cf87cbae1e1a..0000000000000000000000000000000000000000 --- a/VERSION +++ /dev/null @@ -1,4 +0,0 @@ -PACKAGE=hepix -EMAIL=Linux.Support@cern.ch -VERSION=4.0.13 -RELEASE=1 diff --git a/rpm/hepix.spec b/hepix.spec similarity index 84% rename from rpm/hepix.spec rename to hepix.spec index 7d2f0fb1844d520374ba95e200227c08ab3b9a8f..40de55af120cde93a50da76ed8951e0cb8e0e44f 100644 --- a/rpm/hepix.spec +++ b/hepix.spec @@ -2,14 +2,14 @@ %define debug_package %{nil} Summary: HEPiX login scripts -Name: @PACKAGE@ -Version: @VERSION@ -Release: @RELEASE@%{?dist} +Name: hepix +Version: 4.9.8 +Release: 0%{?dist} BuildArch: noarch -Source: %{name}-%{version}.tar.gz +Source: %{name}-%{version}.tgz Group: CERN/Utilities BuildRoot: %{_tmppath}/%{name}-%{version}-root -Packager: @EMAIL@ +Packager: Linux.Support@cern.ch Vendor: CERN License: GPL @@ -41,8 +41,33 @@ rm -rf ${RPM_BUILD_ROOT} %doc doc/README doc/ChangeLog doc/NEWS doc/TODO %changelog +* Tue Sep 10 2019 Jan Iven - 4.9.8 +- ALICE/z2 non-interactive 'csh' fix from S.Traylen + +* Wed May 29 2019 Jan Iven - 4.9.7 +- ATLAS/zp changes for in-container filesystem access + +* Thu Apr 25 2019 Jan Iven - 4.9.6 +- DELPHI/xx now uses only CVMFS + +* Wed Apr 3 2019 Jan Iven - 4.9.5 +- add group scripts for 'z5' + +* Tue Oct 2 2018 Jan Iven - 4.9.4-0 +- fix HPX_WANTS_AFS for tcsh; remove periodic AFS token checks; interactive shells no longer source AFS unless specified + +* Thu Jun 14 2018 Jan Iven - 4.9.2-0 +- fix CVMFS location for 'wj' + +* Wed May 23 2018 Jan Iven - 4.9.1-0 +- remove support for 'obsolete space-separated entries' in USERPATH GROUPPATH +- add a first round of group scripts to the RPM: si t3 v5 va vv vy wj xv xx z2 zh zp + +* Mon Nov 27 2017 Cristian Contescu - 4.0.14-1 +- Add hook to allow sourcing of computing group scripts from /etc/hepix/{c,}sh/GROUP + * Fri Jul 27 2012 Thomas Oulevey - 4.0.13-1.slc6 -- Change low sapce message warning +- Change low space message warning - Tue Mar 27 2012 Jan van Eldik - 4.0.13-0.slc6 - eliminate internal variable $HPX_SYSTEM_HOME diff --git a/rpm/Makefile b/rpm/Makefile deleted file mode 100644 index 45215c97cc37b8975a7911b0dd4170ccbeb18072..0000000000000000000000000000000000000000 --- a/rpm/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -include ../VERSION - -BUILDDIR=build -DEFAULT_KEY=$(shell awk '/^default-key/ { print $$2 }' $(HOME)/.gnupg/options) -DISTTAG ?= $(shell lsb_release -r | sed -nr 's/^[^[:space:]]+[[:space:]]+([0-9]+)\.([0-9]+)$$/.slc\1/p' ) - - -ifneq ($(DISTTAG), .el7.cern) -ifneq ($(DISTTAG), .slc6) -ifneq ($(DISTTAG), .slc5) -ifneq ($(DISTTAG), .slc4) -$(error Only SLC4/SLC5/SLC6 builds are supported.) -endif -endif -endif -endif - -TARBALL=../$(PACKAGE)-$(VERSION).tar.gz - -default: rpm - -rpmprep: - mkdir -p $(BUILDDIR) - mkdir -p $(BUILDDIR)/BUILD - mkdir -p $(BUILDDIR)/RPMS - mkdir -p $(BUILDDIR)/SRPMS - mkdir -p $(BUILDDIR)/SOURCES - mkdir -p $(BUILDDIR)/SPECS - cp $(PACKAGE).spec $(BUILDDIR)/SPECS/ - sed -i 's/@PACKAGE@/$(PACKAGE)/g' $(BUILDDIR)/SPECS/$(PACKAGE).spec - sed -i 's/@VERSION@/$(VERSION)/g' $(BUILDDIR)/SPECS/$(PACKAGE).spec - sed -i 's/@RELEASE@/$(RELEASE)/g' $(BUILDDIR)/SPECS/$(PACKAGE).spec - sed -i 's/@EMAIL@/$(EMAIL)/g' $(BUILDDIR)/SPECS/$(PACKAGE).spec - -$(TARBALL): - make -C .. tar - -tarprep: $(TARBALL) rpmprep - cp $(TARBALL) $(BUILDDIR)/SOURCES - -stamp-srpm: tarprep $(TARBALL) - cd $(BUILDDIR); rpmbuild -bs --define "_topdir $(CURDIR)/$(BUILDDIR)" --define "dist $(DISTTAG)" SPECS/$(PACKAGE).spec - cp $(BUILDDIR)/SRPMS/*.rpm . - touch stamp-srpm - -srpm: stamp-srpm - -stamp-brpm: tarprep $(TARBALL) - cd $(BUILDDIR); rpmbuild -bb --define "_topdir $(CURDIR)/$(BUILDDIR)" --define "dist $(DISTTAG)" SPECS/$(PACKAGE).spec - cp $(BUILDDIR)/RPMS/*/*.rpm . - touch stamp-brpm - -brpm: stamp-brpm - -stamp-rpm: srpm brpm - touch stamp-rpm - -rpm: stamp-rpm - -stamp-rpmsign: rpm - if [ -n "$(DEFAULT_KEY)" ]; then rpm --define "__signature gpg" --define "_gpg_name $(DEFAULT_KEY)" --addsign $(PACKAGE)*.rpm ; touch stamp-rpmsign; fi - -rpmsign: stamp-rpmsign - -clean: - rm -rf $(BUILDDIR) - rm -f stamp-* - -distclean: clean - rm -f *.rpm diff --git a/src/etc/hepix/csh/CORE/periodic.csh b/src/etc/hepix/csh/CORE/periodic.csh deleted file mode 100755 index 4c42ef668a2e70b10e2bf6d764db31d0dec3734b..0000000000000000000000000000000000000000 --- a/src/etc/hepix/csh/CORE/periodic.csh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/csh - -if ( ! $?HPX_INIT ) then - source /etc/hepix/init.csh -endif - -set _HPX_TKLIFE=`$HPXB_ALIFETIME` -if ( $_HPX_TKLIFE == 0 ) then - hpx_echo ">>>>> AFS token expired! <<<<<" -else if ( $_HPX_TKLIFE < 3600 ) then - set _HPX_TKLIFE=`/usr/bin/expr $_HPX_TKLIFE / 60` - hpx_echo ">>>>> AFS token is going to expire in $_HPX_TKLIFE minutes <<<<<" -endif -unset _HPX_TKLIFE - -# End of file. diff --git a/src/etc/hepix/csh/GROUP/si/group_rc.csh b/src/etc/hepix/csh/GROUP/si/group_rc.csh new file mode 100644 index 0000000000000000000000000000000000000000..b8672b3af8b7825ae5b08e3a80b1b7844989372b --- /dev/null +++ b/src/etc/hepix/csh/GROUP/si/group_rc.csh @@ -0,0 +1,33 @@ +# https://its.cern.ch/jira/browse/NOAFS-491 +# +# SL/AP Group `sys.conf.csh' Environment --- BAT :-) +# +setenv AP_PROJECT_DIR /afs/cern.ch/project/slap +# +# SL/AP Group Path +# +setenv PATH "$AP_PROJECT_DIR/bin:$AP_PROJECT_DIR/scripts:$PATH" +# +if (! $?AP_GROUP_CONF) then + # + # SL/AP Manual Path + # + if ( $?MANPATH ) then + setenv MANPATH $AP_PROJECT_DIR/man:$MANPATH + else + setenv MANPATH $AP_PROJECT_DIR/man + endif + # + if ( ! $?TEXMFS ) setenv TEXMFS "{$AP_PROJECT_DIR/share/texmf,"'\!\!$TEXMF}' + # + setenv AP_GROUP_CONF true +endif +# +# SL/AP HTTPd Server Root Directory +# +setenv AP_WWW_HOME_DIR $AP_PROJECT_DIR/etc/httpd +setenv AP_HARVEST_HOME $AP_PROJECT_DIR/etc/harvest +# +# LHC project directory +# +setenv LHC_DIR /afs/cern.ch/eng/lhc diff --git a/src/etc/hepix/csh/GROUP/t3/group_rc.csh b/src/etc/hepix/csh/GROUP/t3/group_rc.csh new file mode 100644 index 0000000000000000000000000000000000000000..1006183ae1e4acae2b9df168af6a56a5d5decd63 --- /dev/null +++ b/src/etc/hepix/csh/GROUP/t3/group_rc.csh @@ -0,0 +1,6 @@ +# https://its.cern.ch/jira/browse/NOAFS-492 +# environment for "t3" group +setenv PATH "/afs/cern.ch/group/t3/scripts:/afs/cern.ch/project/parc/bin:$PATH" +setenv LD_LIBRARY_PATH /afs/cern.ch/group/t3/lib +setenv TEXINPUTS .:/afs/cern.ch/project/theory/tools/TeX/prosper//: +setenv WWW_HOME "http://wwwth.cern.ch" diff --git a/src/etc/hepix/csh/GROUP/va/group_rc.csh b/src/etc/hepix/csh/GROUP/va/group_rc.csh new file mode 100644 index 0000000000000000000000000000000000000000..bc3114c659f4e1a599e75c61e56b99760f98f75d --- /dev/null +++ b/src/etc/hepix/csh/GROUP/va/group_rc.csh @@ -0,0 +1,16 @@ +# https://its.cern.ch/jira/browse/NOAFS-495 +## shell settings for "va" (AMS) + +setenv OS "Linux" +setenv LD_LIBRARY_PATH "/afs/cern.ch/ams/local2/opt/xrootd-gcc64-41/lib64" +if( -e /opt/intel/Compiler/11.0/069/ ) then + setenv PATH "/opt/intel/Compiler/11.0/069/bin/ia32:${PATH}" + setenv LD_LIBRARY_PATH "/opt/intel/Compiler/11.0/069/lib:${LD_LIBRARY_PATH}" +endif + +setenv STAGE_HOST castorpublic +setenv STAGE_SVCCLASS amsuser +setenv CASTOR_INSTANCE castorpublic + +limit memoryuse 2000000 +limit vmemoryuse 3000000 diff --git a/src/etc/hepix/csh/GROUP/vl/group_rc.csh b/src/etc/hepix/csh/GROUP/vl/group_rc.csh new file mode 100644 index 0000000000000000000000000000000000000000..448ae3aeaaef1e91a09a1e8e095d27af6ae37033 --- /dev/null +++ b/src/etc/hepix/csh/GROUP/vl/group_rc.csh @@ -0,0 +1,10 @@ +# NA48 / 'vl' shell variables +# https://its.cern.ch/jira/browse/NOAFS-496 +# based on /afs/cern.ch/group/vl/group_env.csh + +setenv STAGE_HOST castorpublic +setenv STAGE_SVCCLASS na62 + +setenv CDBHOME /afs/cern.ch/user/c/cdbase/public/CDBHOME +setenv CDSERV /afs/cern.ch/na48/offline/hepdb +setenv DBINCDIR /afs/cern.ch/na48/offline2/cdbase/code/inc diff --git a/src/etc/hepix/csh/GROUP/vv/group_rc.csh b/src/etc/hepix/csh/GROUP/vv/group_rc.csh new file mode 100644 index 0000000000000000000000000000000000000000..bdc2373d4ccc224ceaa6890b63cd61c75793069e --- /dev/null +++ b/src/etc/hepix/csh/GROUP/vv/group_rc.csh @@ -0,0 +1,63 @@ +# https://its.cern.ch/jira/browse/NOAFS-498 +# +# from /afs/cern.ch/group/vv/group_sys.conf.csh +setenv ARCHITECTURE UNKNOWN + +# from /afs/cern.ch/group/vv/group_env.csh +# Cern paths check +if (!($?CERN))then + setenv CERN /cern + setenv CERN_LEVEL pro + setenv CERN_ROOT $CERN/pro +endif +# cern paths not set up by default +setenv CERN_LIB $CERN_ROOT/lib +setenv CERN_CAR /cern/old/src/car +setenv CERN_BIN $CERN_ROOT/bin + +# CPLEAR environment +setenv INSTITUTE CERN +setenv CPLEAR /afs/cern.ch/cplear/offline +setenv CP_BIN $CPLEAR/bin +setenv CP_TEST $CPLEAR/test +setenv CP_DEV $CPLEAR/dev +setenv CP_NEW $CPLEAR/pro +setenv CP_PRO $CPLEAR/pro +setenv CP_OLD $CPLEAR/old +# +setenv CPLEVEL $CP_PRO + +setenv CP_LIB $CPLEVEL/lib +setenv CP_CAR $CPLEVEL/car +setenv CP_LIS $CPLEVEL/car +setenv CP_FCA $CPLEVEL/fca +setenv CP_DAT $CPLEVEL/dat +setenv CP_ANA $CPLEAR/ana +setenv CP_MGR $CPLEAR/mgr + + + +# Initialize FATMEN +setenv FMCPLEAR /fatmen/fmcplear +setenv FATGRP cplear +setenv FATPATH $CPLEAR/kumacs + +# from /afs/cern.ch/group/vv/group_termset.csh +setenv INITCPLEAR_term yes + +setenv VV_GROUP_DIR /afs/cern.ch/group/vv +# from /afs/cern.ch/group/vv/group_aliases.csh +alias cplevel "source $VV_GROUP_DIR/scripts/cplevel" +alias cpfort "$VV_GROUP_DIR/scripts/cpfort" +alias cpstagein "$VV_GROUP_DIR/scripts/cpstagein" +alias cpstageout "$VV_GROUP_DIR/scripts/cpstageout" +alias evdisplay "$VV_GROUP_DIR/evdisplay/evdisplay" +alias fassoc "$VV_GROUP_DIR/scripts/fassoc" +alias fort "$VV_GROUP_DIR/scripts/fort" +alias gocp "$VV_GROUP_DIR/gocp/gocp" +alias fatrun "/afs/cern.ch/cplear/offline/fatrun/fatrun.pl" + +# from /afs/cern.ch/group/vv/group_login.csh +cplevel pro + +# old scripts set 'path' directly but used whitespace as separator. Not working, dropped. diff --git a/src/etc/hepix/csh/GROUP/vy/group_rc.csh b/src/etc/hepix/csh/GROUP/vy/group_rc.csh new file mode 100644 index 0000000000000000000000000000000000000000..7a719fddeb004538262096d73b1b4ed246fe3e17 --- /dev/null +++ b/src/etc/hepix/csh/GROUP/vy/group_rc.csh @@ -0,0 +1,4 @@ +## https://its.cern.ch/jira/browse/NOAFS-499 +## COMPASS = NA58 +setenv STAGE_HOST castorpublic +setenv STAGE_SVCCLASS compassuser diff --git a/src/etc/hepix/csh/GROUP/wj/group_rc.csh b/src/etc/hepix/csh/GROUP/wj/group_rc.csh new file mode 100644 index 0000000000000000000000000000000000000000..603b29287c797ba619c6a35605b2c8c11d009b8c --- /dev/null +++ b/src/etc/hepix/csh/GROUP/wj/group_rc.csh @@ -0,0 +1,8 @@ +# https://its.cern.ch/jira/browse/NOAFS-500 +# settings for "wj" (NA61/SHINE) + +if ( -d /cvmfs/na61.cern.ch ) then + hpx_source /cvmfs/na61.cern.ch/etc/env.csh +else + set HPX_WANTS_AFS="true" +endif diff --git a/src/etc/hepix/csh/GROUP/ws/group_rc.csh b/src/etc/hepix/csh/GROUP/ws/group_rc.csh new file mode 100644 index 0000000000000000000000000000000000000000..1004174600d3757815b3a676d83c244002769560 --- /dev/null +++ b/src/etc/hepix/csh/GROUP/ws/group_rc.csh @@ -0,0 +1,87 @@ +# group settings for 'ws' (OPAL) +# https://its.cern.ch/jira/browse/NOAFS-501 +# based on /afs/cern.ch/group/ws/group_env.csh + +setenv OPAL /afs/cern.ch/opal ##Define the top of the OPAL project tree +setenv OPAL_ROOT $OPAL/offline ##Define the top of the OPAL code tree +setenv OPAL_WWW $OPAL/www ##Define the top of the OPAL WWW tree +setenv OPAL_GEN $OPAL/offline/generator ##Define the top of the + ##OPAL generator tree +setenv otop $OPAL/offline ##Define the top of the OPAL code tree +setenv odoc $OPAL/www/doc ##Define the top of the OPAL documentation +setenv opal $OPAL ##Define the top of the OPAL project tree +setenv OPAL_GR $OPAL/offline/grope ## the grope directory + +setenv CERN_ROOT /cern/pro + +## Define CERN global variables (wrong as of SLC5, does anybody care?????) +setenv libver "pro" +setenv gksver "pro" +setenv cern /cern +setenv cern_root $cern/$libver +setenv kernlib $cern_root/lib/libkernlib.a +setenv packlib $cern_root/lib/libpacklib.a +setenv mathlib $cern_root/lib/libmathlib.a +setenv graflib $cern_root/lib/libgraflib.a +setenv graflibX11 $cern_root/lib/libgrafX11.a + +## Generate OPAL symbols +setenv version_opal pro +if ( -f $otop/utl/oversion.$version_opal.csh ) then + hpx_source $otop/utl/oversion.$version_opal.csh +else + echo "Warning: oversion.$version_opal.csh does not exist!" +endif + +setenv OPAL_P_CAR $otop/links/pro +setenv OPAL_P_CRA $otop/links/pro +setenv OPAL_P_LIB $otop/links/pro +setenv OPAL_D_CAR $otop/links/dev +setenv OPAL_D_CRA $otop/links/dev +setenv OPAL_D_LIB $otop/links/dev + +setenv OPAL_P_DB $otop/db + +setenv CERN_P_CAR /cern/pro/src/car +setenv CERN_P_LIB /cern/pro/lib + +setenv FMOPAL $OPAL/fatmen/fmopal + +# set the hardware variable, needed for some scripts (ytofort, fort, link, ...) +setenv HARDWARE `$otop/scripts/hardware` +# +if ( $HARDWARE == "i386slc3" ) then + set OpalBinTag = '/i386slc3' +else if ( $HARDWARE == "i386slc5" ) then + set OpalBinTag = '/i386slc5' +else if ( $HARDWARE == "amd64slc5" ) then + set OpalBinTag = '/amd64slc5' +else if ( $HARDWARE == "i386slc6" || $HARDWARE == "amd64slc6" ) then + set OpalBinTag = '/i386slc6' + setenv PATH "${PATH}:/cern/pro/bin" +else if ( $HARDWARE == "i386cc7" || $HARDWARE == "amd64cc7" ) then + set OpalBinTag = '/i386cc7' + setenv PATH "${PATH}:/cern/pro/bin" +else + set OpalBinTag = '' +endif + + +setenv PATH "${otop}${OpalBinTag}/mgr:$otop/scripts:$otop/bin:$PATH" + +setenv propath ". $HOME/car $HOME/cra ${HOME}${OpalBinTag}/lib ${HOME}${OpalBinTag}/src $otop/rope/pro/car $otop/rope/pro/cra $otop/rope/pro${OpalBinTag}/lib $otop/gopal/pro/car $otop/gopal/pro/cra $otop/gopal/pro${OpalBinTag}/lib $otop/geant/pro/car $otop/geant/pro/cra $otop/geant/pro${OpalBinTag}/lib " + +setenv devpath ". $HOME/dev/car $HOME/dev/cra $HOME/dev${OpalBinTag}/lib $HOME/dev${OpalBinTag}/src $otop/rope/dev/car $otop/rope/dev/cra $otop/rope/dev${OpalBinTag}/lib $otop/gopal/dev/car $otop/gopal/dev/cra $otop/gopal/dev${OpalBinTag}/lib $otop/geant/dev/car $otop/geant/dev/cra $otop/geant/dev${OpalBinTag}/lib $propath" + +setenv oldpath ". $HOME/car $HOME/cra ${HOME}${OpalBinTag}/lib $otop/rope/old/car $otop/rope/old/cra $otop/rope/old${OpalBinTag}/lib $otop/gopal/old/car $otop/gopal/old/cra $otop/gopal/old${OpalBinTag}/lib $otop/geant/old/car $otop/geant/old/cra $otop/geant/old${OpalBinTag}/lib " + +# +setenv allrope "rope dc cv cj jc cz ct cx ce id lm tb pb eb pe ee em hb hp mb me mm fd od ou tr oc dd px su op si cs dx ll cu" +setenv dstrope "rope dc px ou tr oc od cx su ll cu" + +# Set opalnews enviroment variables +# +setenv OPALINFO_CONFIG $OPAL_ROOT/xoinfo/.opalinfo_config +setenv OPALINFO_LOCAL_CONFIG $OPAL_ROOT/xoinfo/.opalinfo_local_config +setenv OPALINFO_HELP $OPAL_ROOT/xoinfo/help +setenv OPALINFO_PSVIEWER "gv" diff --git a/src/etc/hepix/csh/GROUP/xh/group_rc.csh b/src/etc/hepix/csh/GROUP/xh/group_rc.csh new file mode 100644 index 0000000000000000000000000000000000000000..1eae8b7a8aa63d7cc3e08e964b948192e40de533 --- /dev/null +++ b/src/etc/hepix/csh/GROUP/xh/group_rc.csh @@ -0,0 +1,3 @@ +# CSH init script for 'xh' (NOMAD) +# https://its.cern.ch/jira/browse/NOAFS-502 +hpx_source /afs/cern.ch/nomad/new/scripts/nomad_environment.csh diff --git a/src/etc/hepix/csh/GROUP/xu/group_rc.csh b/src/etc/hepix/csh/GROUP/xu/group_rc.csh new file mode 100644 index 0000000000000000000000000000000000000000..bc583ba503d0d7b05cb636959039203eef3020b6 --- /dev/null +++ b/src/etc/hepix/csh/GROUP/xu/group_rc.csh @@ -0,0 +1,93 @@ +# group settings for 'xu' (ALEPH) +# https://its.cern.ch/jira/browse/NOAFS-504 + +setenv ALEPH_ROOT /afs/cern.ch/aleph + +setenv OSYS Linux + +setenv WWW_HOME http://alephwww.cern.ch/ + +setenv ALEPH $ALEPH_ROOT/$OSYS + +setenv MASTER reference +setenv REFERENCE ${ALEPH_ROOT}/reference +setenv SHARED ${ALEPH_ROOT}/shared + +setenv PATH "${ALEPH}/bin:${SHARED}/script:$PATH" + +setenv TAPESCONF $SHARED/etc/tapes.conf + +setenv CVSROOT $REFERENCE/cvsmaster +setenv CVSIGNORE 'HPUX9 HPUX10 IRIX5 IRIX6 OSF1 fort.1 garbage spy *.i' + +setenv ALROOT $REFERENCE/cvs +setenv ALINC $ALROOT/inc + +setenv ADBSCONS $ALEPH/dbase/adbscons.daf +setenv ADBSTEST $ALEPH/dbase/adbstest.daf +setenv ADBS8990 $ALEPH/dbase/adbs8990.daf + +setenv ALEDIR /afs/cern.ch/aleph/shared/edirlink +setenv ALDOC $REFERENCE/doc +setenv ALBOOK $REFERENCE/book +setenv PHYINC $REFERENCE/phy + +setenv BANKALFMT $REFERENCE/dbase/bankal.fmt +setenv GENATTR $REFERENCE/dbase/genattr.ddl +setenv BOSKEY $REFERENCE/dbase/boskey.ddl + +setenv DBASBANK $REFERENCE/phy/dbas.bank +setenv BEAMPOSITION $REFERENCE/phy/beam.position + +setenv ALPHACARDS $REFERENCE/phy/alpha.cards +setenv GALEPHCARDS $REFERENCE/gal/galeph.cards +setenv JULIACARDS $REFERENCE/jul/julia.cards +setenv KINGALCARDS $REFERENCE/kin/kingal.cards +setenv KINAGAINCARDS $REFERENCE/kin/kinagain.cards +setenv LOOKCARDS $REFERENCE/gen/look.cards + +setenv RUNCARTSLIST $ALBOOK/runcarts.list + +setenv SCWORK /aleph/scwork +setenv SCWEEK /aleph/scweek + +setenv ALSTOUT aldataout +setenv DPMSIZE 200 +setenv DPMUSER aleph +setenv STAGELABEL sl +setenv STAGEFSEQ 1 +setenv STAGERECFM F +setenv STAGELRECL 32040 +setenv STAGEBLKSIZ 32040 +setenv STAGECLEAN $SHARED/script/stage-clean-sh +setenv RETRYCOUNT 10 +setenv ALDATA $SHARED/data +setenv ALSTAGE $SHARED/data +if ( $?SERVICE) then + setenv DPMLINKDIR $SHARED/data +endif + +setenv CCOPT "-w -c -DALEPH_C -I${ALINC}" + +setenv VENDOR Linux +setenv CPPOPT "-DUNIX -DALEPH_LINUX -I${ALINC}" +setenv FCOPT "-c -O -fno-automatic -fdollar-ok -fno-backslash $CPPOPT" +setenv FC g77 +setenv CCOPT " -c -O -DALEPH_C -I${ALINC}" + +setenv ALPOPT "${FCOPT} -I${SHARED}/src/alpha/inc" + +setenv GINTER "galeph.F asieve.F agtpch.F gaxeph.F" + +setenv GUSER "-Wl,-u,qnext_,-u,gntube_,-u,grndm_,-u,gstmed_,-u,gufld_,-u,guhadr_,-u,guphad_,-u,gusear_,-u,gustep_,-u,gutrak_,-u,gdray_,-u,gpghei_" +setenv JMUID "-Wl,-u,ftrack_,-u,hmfind_,-u,mpredg_,-u,mpredm_,-u,muass_" +setenv UNDEF "-Wl,-u,aboldr_,-u,babend_,-u,dafrds_" + + +setenv ALPVER `egrep -i alphaver $ALEPH/phy/alpha.version | awk '{print $3}'` +setenv GALVER `egrep -i galver $ALEPH/gal/galeph.version | awk '{print $3}'` +setenv JULVER `egrep -i julver $ALEPH/jul/julia.version | awk '{print $3}'` + +setenv BEW /wg/wwtf/bew +setenv WWTF /wg/wwtf/wwtf +setenv STF /wg/stf/stf diff --git a/src/etc/hepix/csh/GROUP/xv/group_rc.csh b/src/etc/hepix/csh/GROUP/xv/group_rc.csh new file mode 120000 index 0000000000000000000000000000000000000000..8d6338d30de0c0533c097479cbb4e1c96ddd15e5 --- /dev/null +++ b/src/etc/hepix/csh/GROUP/xv/group_rc.csh @@ -0,0 +1 @@ +../va/group_rc.csh \ No newline at end of file diff --git a/src/etc/hepix/csh/GROUP/xx/group_rc.csh b/src/etc/hepix/csh/GROUP/xx/group_rc.csh new file mode 100644 index 0000000000000000000000000000000000000000..9cc596298021e181b76d227ccf9bbcfa80cc7194 --- /dev/null +++ b/src/etc/hepix/csh/GROUP/xx/group_rc.csh @@ -0,0 +1,4 @@ +# DELPHI environment +## https://its.cern.ch/jira/browse/NOAFS-506 + +hpx_source "/cvmfs/delphi.cern.ch/setup.csh" diff --git a/src/etc/hepix/csh/GROUP/z2/group_rc.csh b/src/etc/hepix/csh/GROUP/z2/group_rc.csh new file mode 100644 index 0000000000000000000000000000000000000000..da7f082da68dbe9ba858660b2141b6ed51294bd8 --- /dev/null +++ b/src/etc/hepix/csh/GROUP/z2/group_rc.csh @@ -0,0 +1,29 @@ +# z2 / ALICE shell settings +## https://its.cern.ch/jira/browse/NOAFS-507 +## based on /afs/cern.ch/alice/offline/etc/login.csh + +# Load ALICE's environment from CernVM-FS (C-Shell) +hpx_source /cvmfs/alice.cern.ch/etc/login.csh + +# CASTOR environment +setenv STAGE_HOST castoralice +setenv STAGE_SVCCLASS t0alice + +# Latest AliPhysics and fastjet versions +setenv LatestAliPhysics `alienv q | grep AliPhysics::vAN- | sort -n | tail -n1` +setenv LatestFastjet `alienv q | grep fastjet:: | sort -n | tail -n1` + +# Do not print any output if shell is non-interactive (i.e. scp) +tty -q >& /dev/null +if ( $? == 0 ) then + setenv ac0 "\033[m" + setenv ac1 "${ac0}\033[1m" + setenv ac2 "${ac0}\033[36m" + setenv ac3 "${ac0}\033[35m" + echo "${ac1}Welcome my dear ALICE user! To use ALICE software from CVMFS:${ac0}" + echo "${ac3} *${ac1} List all packages --> ${ac2}alienv q${ac0}" + echo "${ac3} *${ac1} List AliPhysics packages --> ${ac2}alienv q | grep -i ${ac3}aliphysics${ac0}" + echo "${ac3} *${ac1} Enable a specific package --> ${ac2}alienv enter ${ac3}${LatestAliPhysics}${ac0}" + echo "${ac3} *${ac1} Enable multiple packages --> ${ac2}alienv enter ${ac3}${LatestAliPhysics}${ac2},${ac3}${LatestFastjet}${ac0}" + unsetenv ac0 ac1 ac2 ac3 LatestAliPhysics LatestFastjet +endif diff --git a/src/etc/hepix/csh/GROUP/z5/group_rc.csh b/src/etc/hepix/csh/GROUP/z5/group_rc.csh new file mode 100644 index 0000000000000000000000000000000000000000..5d3c8b0b9a1c212e501e2e99cbd7e5bb2c8ac91a --- /dev/null +++ b/src/etc/hepix/csh/GROUP/z5/group_rc.csh @@ -0,0 +1,3 @@ +# https://its.cern.ch/jira/browse/NOAFS-508 +# z5 / LHCb settings +hpx_source /cvmfs/lhcb.cern.ch/lib/etc/cern_profile.csh diff --git a/src/etc/hepix/csh/GROUP/zh/group_rc.csh b/src/etc/hepix/csh/GROUP/zh/group_rc.csh new file mode 100644 index 0000000000000000000000000000000000000000..a22a0084a526354f004e663a375fb4b8931a3aed --- /dev/null +++ b/src/etc/hepix/csh/GROUP/zh/group_rc.csh @@ -0,0 +1,19 @@ +# CMS-specifics +## https://its.cern.ch/jira/browse/NOAFS-510 +## /afs/cern.ch/group/zh/group_env.csh + +# This is host dependent. If CvmFS is installed, use it, otherwise fall +# back on AFS (e.g. on a desktop/laptop w/o CvmFS). +if ( -d /cvmfs/cms.cern.ch ) then + setenv CMS_PATH /cvmfs/cms.cern.ch +else + setenv CMS_PATH /afs/cern.ch/cms +endif + +# CMS wide settings for latex styles +setenv TEXINPUTS :$CMS_PATH/latex/styles + +# setup for castor +setenv STAGE_HOST castorcms + +hpx_source $CMS_PATH/cmsset_default.csh diff --git a/src/etc/hepix/csh/GROUP/zp/group_rc.csh b/src/etc/hepix/csh/GROUP/zp/group_rc.csh new file mode 100644 index 0000000000000000000000000000000000000000..720c2ea5e5dcc63c859ff878c1fc360fe0e284d5 --- /dev/null +++ b/src/etc/hepix/csh/GROUP/zp/group_rc.csh @@ -0,0 +1,16 @@ +# https://its.cern.ch/jira/browse/NOAFS-511 +# zp / ATLAS settings, based on /afs/cern.ch/group/zp/group_env.csh + +setenv PATH "/afs/cern.ch/atlas/scripts:$PATH" + +setenv SITE_NAME CERN-PROD + +setenv FRONTIER_SERVER '(serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)' + +setenv STAGE_HOST castoratlas +setenv STAGE_SVCCLASS default + +if( -d /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase ) then + setenv ATLAS_LOCAL_ROOT_BASE /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase + alias setupATLAS 'source ${ATLAS_LOCAL_ROOT_BASE}/user/atlasLocalSetup.csh' +endif diff --git a/src/etc/hepix/csh/HEP/csh.cshrc b/src/etc/hepix/csh/HEP/csh.cshrc index dae74758cfc4ec61788192a308417dbe4c8487b0..5ab2861bc3827a97ca9fe93db3870531dc56eb87 100755 --- a/src/etc/hepix/csh/HEP/csh.cshrc +++ b/src/etc/hepix/csh/HEP/csh.cshrc @@ -23,6 +23,15 @@ alias hpx_path_append_unless_present "source $HPX_HOME_CORE/hpx_path_append_unle umask $HPX_UMASK +# Sanitize and set site-wide environment variables. + +set HPX_INITIALE=`echo $USER | /usr/bin/cut -c1` +setenv CASTOR_HOME /castor/cern.ch/user/$HPX_INITIALE/$USER +unset HPX_INITIALE + +# $EDITOR is used by SVN, crontab, etc +setenv EDITOR "/bin/nano -w" + # Determine HEP group name. set HPX_PREF_GROUP=$HPX_USER_HOME/preferred-group if ( -r $HPX_PREF_GROUP) then @@ -32,20 +41,44 @@ else endif unset HPX_PREF_GROUP -# Determine HEP group directory. Defaults to AFS. if ( -d /afs/cern.ch/group/$HPX_HEPGROUP ) then - setenv GROUP_DIR /afs/cern.ch/group/$HPX_HEPGROUP + setenv GROUP_DIR /afs/cern.ch/group/$HPX_HEPGROUP endif -unset HPX_HEPGROUP -# Sanitize and set site-wide environment variables. +# Decide whether a group script is packaged (overriding any afs/group scripts) and source it; +# then return, unless that script decides otherwise +if ( "$HPX_WANTS_AFS" != "true" ) then + if ( -r "$HPX_HOME_GROUP/$HPX_HEPGROUP/group_rc.csh" ) then + hpx_source "$HPX_HOME_GROUP/$HPX_HEPGROUP/group_rc.csh" + + # the group script can also ask to go into AFS + if ( "$HPX_WANTS_AFS" != "true" ) then + # $HOME/scripts was used by ~15% of users.. + if ( -d $HOME/scripts ) then + setenv PATH "$HOME/scripts:$PATH" + endif + + # do not source anything else + exit + endif + if ( $HPX_VERBOSE >= 10 ) then + hpx_echo "N: Group script requests fall-through to legacy AFS scripts" + endif + else + if ( $HPX_VERBOSE >= 10 ) then + hpx_echo "N: No local group script found in $HPX_HOME_GROUP/$HPX_HEPGROUP" + endif + endif +else + if ( $HPX_VERBOSE >= 10 ) then + hpx_echo "N: User config requests legacy AFS scripts" + endif +endif -set HPX_INITIALE=`echo $USER | /usr/bin/cut -c1` -setenv CASTOR_HOME /castor/cern.ch/user/$HPX_INITIALE/$USER -unset HPX_INITIALE +## Continue here only if there's no packaged group script, or if the user specifically wants to run the afs/group scripts +## in particular PATH manipulation needs to be done in the packaged script -# $EDITOR is used by SVN, crontab, etc -setenv EDITOR "/bin/nano -w" +unset HPX_HEPGROUP # NOTE(fuji): These are normally in the local namespace, but AFS # group script maintainers tend to `setenv' these variables and @@ -53,30 +86,14 @@ setenv EDITOR "/bin/nano -w" # ($GROUPPATH) time which namespace to access. See also ROOTPATH # assignments. # CT197070 Matthias Schröder + if ( $?GROUP_DIR ) then setenv GROUPPATH $GROUP_DIR/bin -endif -if ( $?GROUP_DIR ) then hpx_source $GROUP_DIR/group_sys.conf.csh hpx_source $GROUP_DIR/group_env.csh endif -if ( $?GROUPPATH ) then - echo "$GROUPPATH" | /bin/grep ' ' >/dev/null - if ( $status == 0 ) then - hpx_debug "GROUPPATH contains obsolete space separator, use colons." - setenv GROUPPATH `echo "$GROUPPATH" | /bin/sed 's/ /:/g'` - endif -endif -if ( $?USERPATH ) then - echo "$USERPATH" | /bin/grep ' ' >/dev/null - if ( $status == 0 ) then - hpx_debug "USERPATH contains obsolete space separator, use colons." - setenv USERPATH `echo "$USERPATH" | /bin/sed 's/ /:/g'` - endif -endif - if ( $?GROUPPATH ) then setenv USERPATH ${GROUPPATH}:${HOME}/scripts else @@ -109,21 +126,9 @@ unset _HPX_PATH_SAVE # STEP 2. Emulate what hpx_path_append_unique() does in sh(1)-derivatives. # NOTE(fuji): Let's try with our shiny pathtools implementation. foreach HPX_DIR ($hpx_path) -## set c=1 -## set found=0 -## while ( ! $found && $c <= $#path ) -## if ( $HPX_DIR == "$path[$c]" ) then -## set found=1 -## endif -## @ c++ -## end -## if ( ! found ) then -## set path=($path $HPX_DIR) -## endif + eval `hpx_path_append_unless_present "$HPX_DIR"` end -## unset c -## unset found # STEP 3. Release outer level temporary variables, we're done. unset HPX_DIR @@ -133,7 +138,7 @@ unset HPX_PATH unset USERPATH unset GROUPPATH -set _HPX_SHELL=`/bin/echo ${SHELL} | /usr/bin/cut -f3 -d/` +set _HPX_SHELL=${SHELL:t} hpx_source $HPX_HOME_HEP/${_HPX_SHELL}rc unset _HPX_SHELL diff --git a/src/etc/hepix/csh/HEP/csh.login b/src/etc/hepix/csh/HEP/csh.login index c8f5223ccd54a1bd8d0255525a75789f167af78e..56ced247bfc25bb0a458b1f7aa91064e4631d5ff 100755 --- a/src/etc/hepix/csh/HEP/csh.login +++ b/src/etc/hepix/csh/HEP/csh.login @@ -75,7 +75,7 @@ if ( ! $?TMPDIR ) then endif unset HPX_TMPDIR -if ( $?GROUP_DIR ) then +if ( "$HPX_WANTS_AFS" == "true" && $?GROUP_DIR ) then hpx_source $GROUP_DIR/group_csh.login hpx_source $GROUP_DIR/group_login.csh hpx_source $GROUP_DIR/group_termset.csh diff --git a/src/etc/hepix/csh/HEP/csh.logout b/src/etc/hepix/csh/HEP/csh.logout deleted file mode 100755 index 39a1797df2f9e52a7dbfe51d28af888e6b6880f2..0000000000000000000000000000000000000000 --- a/src/etc/hepix/csh/HEP/csh.logout +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/csh - -if ( $?_HPX_SEEN_HEP_CSH_LOGOUT ) then - exit -endif -set _HPX_SEEN_HEP_CSH_LOGOUT=1 - -if ( ! $?HPX_INIT ) then - source /etc/hepix/init.csh -endif - -if ( $?GROUP_DIR ) then - hpx_source $GROUP_DIR/group_csh.logout -endif - -# End of file. diff --git a/src/etc/hepix/csh/HEP/cshrc b/src/etc/hepix/csh/HEP/cshrc index 8eb46c6d710e925f00d608b22e4d41713622c84e..e94ab2a10d5fea2896ecc356048e0f00df1d0b64 100755 --- a/src/etc/hepix/csh/HEP/cshrc +++ b/src/etc/hepix/csh/HEP/cshrc @@ -9,7 +9,7 @@ if ( ! $?HPX_INIT ) then source /etc/hepix/init.csh endif -if ( $?GROUP_DIR ) then +if ( "$HPX_WANTS_AFS" == "true" && $?GROUP_DIR ) then hpx_source $GROUP_DIR/group_cshrc hpx_source $GROUP_DIR/group_cshrc.rc endif diff --git a/src/etc/hepix/csh/HEP/tcshrc b/src/etc/hepix/csh/HEP/tcshrc index 43d22dceab04d89d5f23db34ab9e5aea3b29adc0..3fb579cecf6f708a7d0c777666558377f825caaf 100755 --- a/src/etc/hepix/csh/HEP/tcshrc +++ b/src/etc/hepix/csh/HEP/tcshrc @@ -9,14 +9,7 @@ if ( ! $?HPX_INIT ) then source /etc/hepix/init.csh endif -set HPXB_ALIFETIME=/usr/bin/alifetime - -if ( "x$HPX_AFS_HOME" != x && -x $HPXB_ALIFETIME ) then - set tperiod=50 - alias periodic "$SHELL $HPX_HOME_CORE/periodic.csh" -endif - -if ( $?GROUP_DIR ) then +if ( "$HPX_WANTS_AFS" == "true" && $?GROUP_DIR ) then hpx_source $GROUP_DIR/group_tcshrc endif diff --git a/src/etc/hepix/init.csh b/src/etc/hepix/init.csh index eb3bf3113d907e763cc2d57a2f3f7dec29a01bf5..21e64e7571f5f151fe7151c3cbc1cb5f080e2997 100755 --- a/src/etc/hepix/init.csh +++ b/src/etc/hepix/init.csh @@ -13,6 +13,7 @@ set HPX_UMASK=0022 set HPX_HOME=/etc/hepix/csh # Legacy code was in /usr/local/lib/hepix/. set HPX_HOME_CORE=$HPX_HOME/CORE set HPX_HOME_HEP=$HPX_HOME/HEP +set HPX_HOME_GROUP=$HPX_HOME/GROUP # Determine user HEPiX home directory. if ( $?HOME ) then @@ -53,7 +54,17 @@ echo $HOME | /bin/grep '^\/afs\/' > /dev/null if ( $status == 0 ) then set HPX_AFS_HOME=YES endif - + +# Determine if we specifically want AFS for the group level scripts. +if ( "x$?HPX_USER_HOME" != x) then + if ( -r $HPX_USER_HOME/wants-afs ) then + set HPX_WANTS_AFS=`/bin/cat $HPX_USER_HOME/wants-afs` + else + set HPX_WANTS_AFS="undef" + endif +endif + + # This is a Hack(tm), but a smart one nevertheless. We are emulating shell # functions (that are missing in csh(1) and derivatives) by using alias and # script combinations. diff --git a/src/etc/hepix/init.sh b/src/etc/hepix/init.sh index 574b6751e312718273985feee180d690947140c1..99aba52229dc0c3b0c7695bf19961e15844acdb2 100755 --- a/src/etc/hepix/init.sh +++ b/src/etc/hepix/init.sh @@ -11,6 +11,7 @@ HPX_UMASK=0022 HPX_HOME=/etc/hepix/sh # Legacy code was in /usr/local/lib/hepix/. HPX_HOME_CORE=$HPX_HOME/CORE HPX_HOME_HEP=$HPX_HOME/HEP +HPX_HOME_GROUP=$HPX_HOME/GROUP # Determine user HEPiX home directory. [ -n "$HOME" -a -d "$HOME/.hepix" ] \ @@ -35,6 +36,13 @@ fi # Determine if user's $HOME is on AFS. echo $HOME | /bin/grep '^\/afs\/' > /dev/null && HPX_AFS_HOME=YES +# Determine if we specifically want AFS for the group level scripts. +if [ -n "$HPX_USER_HOME" -a -r "$HPX_USER_HOME/wants-afs" ];then + HPX_WANTS_AFS=$(/bin/cat $HPX_USER_HOME/wants-afs) +else + HPX_WANTS_AFS="undef" +fi + # Determine whether HEPiX is to be run. hpx_is_hepix () { [ "$HPX_HEPIX" = OFF ] && return 1 diff --git a/src/etc/hepix/sh/GROUP/si/group_rc.sh b/src/etc/hepix/sh/GROUP/si/group_rc.sh new file mode 100644 index 0000000000000000000000000000000000000000..6e711a8f82360a31703c61f236e9e16df096c362 --- /dev/null +++ b/src/etc/hepix/sh/GROUP/si/group_rc.sh @@ -0,0 +1,35 @@ +# https://its.cern.ch/jira/browse/NOAFS-491 +# +# SL/AP Group `sys.conf.sh' Environment --- BAT :-) +# +AP_PROJECT_DIR=/afs/cern.ch/project/slap; export AP_PROJECT_DIR +# +# SL/AP Group Path +# +PATH="$AP_PROJECT_DIR/bin:$AP_PROJECT_DIR/scripts:$PATH"; export PATH +# +if [ -z "$AP_GROUP_CONF" ] ;then + # + # SL/AP Manual Path + # + if [ -n "$MANPATH" ] ;then + MANPATH=$AP_PROJECT_DIR/man:$MANPATH; export MANPATH + else + MANPATH=$AP_PROJECT_DIR/man; export MANPATH + fi + # + if [ -z "$TEXMFS" ]; then + TEXMFS="{$AP_PROJECT_DIR/share/texmf,"'!!$TEXMF}' ; export TEXMFS + fi + # + AP_GROUP_CONF=true; export AP_GROUP_CONF +fi +# +# SL/AP HTTPd Server Root Directory +# +AP_WWW_HOME_DIR=$AP_PROJECT_DIR/etc/httpd; export AP_WWW_HOME_DIR +AP_HARVEST_HOME=$AP_PROJECT_DIR/etc/harvest; export AP_HARVEST_HOME +# +# LHC project directory +# +LHC_DIR=/afs/cern.ch/eng/lhc; export LHC_DIR diff --git a/src/etc/hepix/sh/GROUP/t3/group_rc.sh b/src/etc/hepix/sh/GROUP/t3/group_rc.sh new file mode 100644 index 0000000000000000000000000000000000000000..bc47ba7e4dc4f374012158448256b06c4092f62c --- /dev/null +++ b/src/etc/hepix/sh/GROUP/t3/group_rc.sh @@ -0,0 +1,4 @@ +# https://its.cern.ch/jira/browse/NOAFS-492 +# shell settings for "t3" group +WWW_HOME="http://wwwth.cern.ch"; export WWW_HOME + diff --git a/src/etc/hepix/sh/GROUP/v5/group_rc.sh b/src/etc/hepix/sh/GROUP/v5/group_rc.sh new file mode 100644 index 0000000000000000000000000000000000000000..7cd918c338151412fe65ef545e5a403aa8012f4e --- /dev/null +++ b/src/etc/hepix/sh/GROUP/v5/group_rc.sh @@ -0,0 +1,63 @@ +# https://its.cern.ch/jira/browse/NOAFS-494 +## shell settings for 'v5' (CHORUS) +# mostly from /afs/cern.ch/group/v5/group_sys.conf.sh + +sys=`/usr/bin/sys` +if [ -r /chorus ]; then + CHORUS=/chorus; export CHORUS +elif [ -r /afs/cern.ch/chorus/offl/@sys ]; then + CHORUS=/afs/cern.ch/chorus/offl/@sys; export CHORUS +elif [ -r /afs/cern.ch/chorus/offl/$sys ]; then + CHORUS=/afs/cern.ch/chorus/offl/$sys; export CHORUS +else + CHORUS=/CHORUS_var_not_defined + echo "Don't know how to find chorus software" >& 2 +fi + +######################################################################## +# Fatmen, hepdb, stager +######################################################################## +CDSERV=/hepdb/cdchorus; export CDSERV +FMCHORUS=/fatmen/fmchorus; export FMCHORUS +FATPATH=.:~:$CHORUS/etc; export FATPATH +STAGE_HOST=stagepublic; export STAGE_HOST + +######################################################################## +# ORACLE variables +######################################################################## +CHDB_NAME=cerndb1; export CHDB_NAME +CHDB_ACCT=pubv5; export CHDB_ACCT +# removed CHDB_PASSWD + +unset ORACLE_MOUNT +if [ -r /afs/cern.ch/project/oracle/@sys ]; then + ORACLE_MOUNT=/afs/cern.ch/project/oracle/@sys +elif [ -n "$sys" ]; then + if [ -r /afs/cern.ch/project/oracle/$sys ]; then + ORACLE_MOUNT=/afs/cern.ch/project/oracle/$sys + fi +fi +if [ -n "$ORACLE_MOUNT" ]; then + export CHDB_NAME CHDB_ACCT ORACLE_MOUNT +fi + +######################################################################## +# Misc. interactive stuff (could even be excluded for batch) +######################################################################## +CMZSYS=$CHORUS/etc/cmzsys.kumac; export CMZSYS # CMZ startup kumac +LESS=eMqw; export LESS # default less options +TEXEDIT=emacs; export TEXEDIT # Editor called from TeX + +######################################################################## +# Group paths +######################################################################## +PATH="$CHORUS/pro/bin:$CHORUS/bin:$PATH"; export PATH + +######################################################################## +# Choice of Chorus software level +######################################################################## + +chlevel () +{ + eval `$CHORUS/bin/chlevel.pl $1` +} diff --git a/src/etc/hepix/sh/GROUP/va/group_rc.sh b/src/etc/hepix/sh/GROUP/va/group_rc.sh new file mode 100644 index 0000000000000000000000000000000000000000..3dde2e97d47a357e2dfa9f42088b860975b5de64 --- /dev/null +++ b/src/etc/hepix/sh/GROUP/va/group_rc.sh @@ -0,0 +1,28 @@ +# https://its.cern.ch/jira/browse/NOAFS-495 +## shell settings for "va" (AMS) + +OS="Linux"; export OS +LD_LIBRARY_PATH="/afs/cern.ch/ams/local2/opt/xrootd-gcc64-41/lib64"; export LD_LIBRARY_PATH +if [ -d /opt/intel/Compiler/11.0/069/ ]; then + PATH="/opt/intel/Compiler/11.0/069/bin/ia32:${PATH}"; export PATH + LD_LIBRARY_PATH="/opt/intel/Compiler/11.0/069/lib/ia32:${LD_LIBRARY_PATH}"; export LD_LIBRARY_PATH +fi + +STAGE_HOST=castorpublic; export STAGE_HOST +STAGE_SVCCLASS=amsuser; export STAGE_SVCCLASS +CASTOR_INSTANCE=castorpublic; export CASTOR_INSTANCE + +ulimit -m 2000000 +case "$USER" in + ams) + ulimit -m 4000000 + ;; + merge) + ulimit -S -v 6000000 + ulimit -m 2000000 + ;; + qfeng) + ulimit -S -v 8000000 + ulimit -S -m 4000000 + ;; +esac diff --git a/src/etc/hepix/sh/GROUP/vl/group_rc.sh b/src/etc/hepix/sh/GROUP/vl/group_rc.sh new file mode 100644 index 0000000000000000000000000000000000000000..123b150cd3ab9d149dcb86f44dde76575031dbf6 --- /dev/null +++ b/src/etc/hepix/sh/GROUP/vl/group_rc.sh @@ -0,0 +1,10 @@ +# NA48 / 'vl' shell variables +# https://its.cern.ch/jira/browse/NOAFS-496 +# based on /afs/cern.ch/group/vl/group_env.sh + +export STAGE_HOST=castorpublic +export STAGE_SVCCLASS=na62 + +export CDBHOME=/afs/cern.ch/user/c/cdbase/public/CDBHOME +export CDSERV=/afs/cern.ch/na48/offline/hepdb +export DBINCDIR=/afs/cern.ch/na48/offline2/cdbase/code/inc diff --git a/src/etc/hepix/sh/GROUP/vv/group_rc.sh b/src/etc/hepix/sh/GROUP/vv/group_rc.sh new file mode 100644 index 0000000000000000000000000000000000000000..7be64c9173696cebdc80e1a2e6a3a9ea2393cfe4 --- /dev/null +++ b/src/etc/hepix/sh/GROUP/vv/group_rc.sh @@ -0,0 +1,42 @@ +# based on https://its.cern.ch/jira/browse/NOAFS-498 + +ARCHITECTURE=UNKNOWN; export ARCHITECTURE + +# Cern paths check +if [ "$CERN" = "" ]; then + CERN="/cern"; export CERN + CERN_LEVEL="pro"; export CERN_LEVEL + CERN_ROOT="$CERN/pro"; export CERN_ROOT +fi + +# Cern paths not set up by default +CERN_LIB="$CERN_ROOT/lib"; export CERN_LIB +CERN_CAR="/cern/old/src/car"; export CERN_CAR +CERN_BIN="$CERN_ROOT/bin"; export CERN_BIN + +# CPLEAR environment + INSTITUTE="CERN"; export INSTITUTE + CPLEAR="/afs/cern.ch/cplear/offline"; export CPLEAR + CP_BIN="$CPLEAR/bin"; export CP_BIN + CP_TEST="$CPLEAR/test"; export CP_TEST + CP_DEV="$CPLEAR/dev"; export CP_DEV + CP_NEW="$CPLEAR/pro"; export CP_NEW + CP_PRO="$CPLEAR/pro"; export CP_PRO + CP_OLD="$CPLEAR/old"; export CP_OLD +# + CPLEVEL=$CP_PRO; export CPLEVEL +# + CP_LIB="$CPLEVEL/lib"; export CP_LIB + CP_CAR="$CPLEVEL/car; export CP_CAR + CP_LIS="$CPLEVEL/car; export CP_LIS + CP_FCA="$CPLEVEL/fca; export CP_FCA + CP_DAT="$CPLEVEL/dat; export CP_DAT + CP_ANA="$CPLEAR/ana; export CP_ANA + CP_MGR="$CPLEAR/mgr; export CP_MGR + +# Initialize FATMEN + FMCPLEAR="/fatmen/fmcplear"; export FMCPLEAR + FATGRP="cplear"; export FATGRP + FATPATH="$CPLEAR/kumacs"; export FATPATH + +# old scripts set PATH directly but used whitespace as separator. Not working, dropped. diff --git a/src/etc/hepix/sh/GROUP/vy/group_rc.sh b/src/etc/hepix/sh/GROUP/vy/group_rc.sh new file mode 100644 index 0000000000000000000000000000000000000000..2c26198faaf8978b9120b14cfbc4bb03c4bb7e49 --- /dev/null +++ b/src/etc/hepix/sh/GROUP/vy/group_rc.sh @@ -0,0 +1,4 @@ +## https://its.cern.ch/jira/browse/NOAFS-499 +## COMPASS = NA58 +export STAGE_HOST=castorpublic +export STAGE_SVCCLASS=compassuser diff --git a/src/etc/hepix/sh/GROUP/wj/group_rc.sh b/src/etc/hepix/sh/GROUP/wj/group_rc.sh new file mode 100644 index 0000000000000000000000000000000000000000..3e21e2d41922a5d523a343552401773a67784bb9 --- /dev/null +++ b/src/etc/hepix/sh/GROUP/wj/group_rc.sh @@ -0,0 +1,8 @@ +# https://its.cern.ch/jira/browse/NOAFS-500 +# settings for "wj" (NA61/SHINE) + +if [ -d /cvmfs/na61.cern.ch ]; then + hpx_source /cvmfs/na61.cern.ch/etc/env.sh +else + export HPX_WANTS_AFS=true +fi diff --git a/src/etc/hepix/sh/GROUP/ws/group_rc.sh b/src/etc/hepix/sh/GROUP/ws/group_rc.sh new file mode 100755 index 0000000000000000000000000000000000000000..7748f3e7cce8a8d70da9b9bd0df3d4798b2df299 --- /dev/null +++ b/src/etc/hepix/sh/GROUP/ws/group_rc.sh @@ -0,0 +1,89 @@ +# group settings for 'ws' (OPAL) +# https://its.cern.ch/jira/browse/NOAFS-501 +# based on /afs/cern.ch/group/ws/group_env.sh + +export OPAL=/afs/cern.ch/opal ##Define the top of the OPAL project tree +export OPAL_ROOT=$OPAL/offline ##Define the top of the OPAL code tree +export OPAL_WWW=$OPAL/www ##Define the top of the OPAL WWW tree +export OPAL_GEN=$OPAL/offline/generator ##Define the top of the + ##OPAL generator tree +export otop=$OPAL/offline ##Define the top of the OPAL code tree +export odoc=$OPAL/www/doc ##Define the top of the OPAL documentation +export opal=$OPAL ##Define the top of the OPAL project tree +export OPAL_GR=$OPAL/offline/grope ## the grope directory + +CERN_ROOT=/cern/pro; export CERN_ROOT + +## Define CERN global variables +libver="pro" ; export libver +gksver="pro" ; export gksver +cern=/cern ; export cern +cern_root=$cern/$libver ; export cern_root +kernlib=$cern_root/lib/libkernlib.a ; export kernlib +packlib=$cern_root/lib/libpacklib.a ; export packlib +mathlib=$cern_root/lib/libmathlib.a ; export mathlib +graflib=$cern_root/lib/libgraflib.a ; export graflib +graflibX11=$cern_root/lib/libgrafX11.a ; export graflibX11 + +## Generate OPAL symbols +version_opal=pro ; export version_opal +if [ -f $otop/utl/oversion.$version_opal ]; then + hpx_source $otop/utl/oversion.$version_opal +else + echo "Warning: oversion.$version_opal does not exist!" +fi + +OPAL_P_CAR=$otop/links/pro +OPAL_P_CRA=$otop/links/pro +OPAL_P_LIB=$otop/links/pro +OPAL_D_CAR=$otop/links/dev +OPAL_D_CRA=$otop/links/dev +OPAL_D_LIB=$otop/links/dev + +OPAL_P_DB=$otop/db + +export OPAL_P_CAR OPAL_P_CRA OPAL_P_LIB OPAL_D_CAR OPAL_D_CRA OPAL_D_LIB OPAL_P_DB + +CERN_P_CAR=/cern/pro/src/car; export CERN_P_CAR +CERN_P_LIB=/cern/pro/lib; export CERN_P_LIB + +FMOPAL=$OPAL/fatmen/fmopal ; export FMOPAL + +HARDWARE=`$otop/scripts/hardware` +export HARDWARE +if [ "$HARDWARE" = "i386slc3" ]; then + OpalBinTag='/i386slc3' +elif [ "$HARDWARE" = "i386slc5" ]; then + OpalBinTag='/i386slc5' +elif [ "$HARDWARE" = "amd64slc5" ]; then + OpalBinTag='/amd64slc5' +elif [ "$HARDWARE" = "i386slc6" -o "$HARDWARE" = "amd64slc6" ]; then + OpalBinTag='/i386slc6' + PATH=$PATH:/cern/pro/bin +elif [ "$HARDWARE" = "i386cc7" -o "$HARDWARE" = "amd64cc7" ]; then + OpalBinTag='/i386cc7' + PATH=$PATH:/cern/pro/bin +else + OpalBinTag='' +fi + +PATH="${otop}${OpalBinTag}/mgr:$otop/scripts:$otop/bin:$PATH"; export PATH + +propath=". $HOME/car $HOME/cra $HOME$OpalBinTag/lib $HOME$OpalBinTag/src $otop/rope/pro/car $otop/rope/pro/cra $otop/rope/pro$OpalBinTag/lib $otop/gopal/pro/car $otop/gopal/pro/cra $otop/gopal/pro$OpalBinTag/lib $otop/geant/pro/car $otop/geant/pro/cra $otop/geant/pro$OpalBinTag/lib " + +devpath=". $HOME/dev/car $HOME/dev/cra $HOME/dev$OpalBinTag/lib $HOME/dev$OpalBinTag/src $otop/rope/dev/car $otop/rope/dev/cra $otop/rope/dev$OpalBinTag/lib $otop/gopal/dev/car $otop/gopal/dev/cra $otop/gopal/dev$OpalBinTag/lib $otop/geant/dev/car $otop/geant/dev/cra $otop/geant/dev$OpalBinTag/lib $propath" + +oldpath=". $HOME/car $HOME/cra $HOME$OpalBinTag/lib $HOME$OpalBinTag/src $otop/rope/old/car $otop/rope/old/cra $otop/rope/old$OpalBinTag/lib $otop/gopal/old/car $otop/gopal/old/cra $otop/gopal/old$OpalBinTag/lib $otop/geant/old/car $otop/geant/old/cra $otop/geant/old$OpalBinTag/lib " + +export propath devpath oldpath + +allrope="rope dc cv cj jc cz ct cx ce id lm tb pb eb pe ee em hb hp mb me mm fd od ou tr oc dd px su op si cs dx ll cu" +dstrope="rope dc px ou tr oc od cx su ll cu" +export allrope dstrope + +# Set opalnews enviroment variables +# +export OPALINFO_CONFIG=$OPAL_ROOT/xoinfo/.opalinfo_config +export OPALINFO_LOCAL_CONFIG=$OPAL_ROOT/xoinfo/.opalinfo_local_config +export OPALINFO_HELP=$OPAL_ROOT/xoinfo/help +export OPALINFO_PSVIEWER="gv" diff --git a/src/etc/hepix/sh/GROUP/xu/group_rc.sh b/src/etc/hepix/sh/GROUP/xu/group_rc.sh new file mode 100644 index 0000000000000000000000000000000000000000..95ffa4663c00cf454dcb5d0132407a1f4d5150af --- /dev/null +++ b/src/etc/hepix/sh/GROUP/xu/group_rc.sh @@ -0,0 +1,93 @@ +# group settings for 'xu' (ALEPH) +# https://its.cern.ch/jira/browse/NOAFS-504 + +ALEPH_ROOT=/afs/cern.ch/aleph; export ALEPH_ROOT + +OSYS=Linux; export OSYS + +WWW_HOME=http://alephwww.cern.ch/; export WWW_HOME + +ALEPH=$ALEPH_ROOT/$OSYS; export ALEPH + +MASTER=reference; export MASTER +REFERENCE=${ALEPH_ROOT}/reference; export REFERENCE +SHARED=${ALEPH_ROOT}/shared; export SHARED + +PATH="${ALEPH}/bin:${SHARED}/script:$PATH"; export PATH + +TAPESCONF=$SHARED/etc/tapes.conf; export TAPESCONF + +CVSROOT=$REFERENCE/cvsmaster; export CVSROOT +CVSIGNORE='HPUX9; export CVSIGNORE HPUX10 IRIX5 IRIX6 OSF1 fort.1 garbage spy *.i' + +ALROOT=$REFERENCE/cvs; export ALROOT +ALINC=$ALROOT/inc; export ALINC + +ADBSCONS=$ALEPH/dbase/adbscons.daf; export ADBSCONS +ADBSTEST=$ALEPH/dbase/adbstest.daf; export ADBSTEST +ADBS8990=$ALEPH/dbase/adbs8990.daf; export ADBS8990 + +ALEDIR=/afs/cern.ch/aleph/shared/edirlink; export ALEDIR +ALDOC=$REFERENCE/doc; export ALDOC +ALBOOK=$REFERENCE/book; export ALBOOK +PHYINC=$REFERENCE/phy; export PHYINC + +BANKALFMT=$REFERENCE/dbase/bankal.fmt; export BANKALFMT +GENATTR=$REFERENCE/dbase/genattr.ddl; export GENATTR +BOSKEY=$REFERENCE/dbase/boskey.ddl; export BOSKEY + +DBASBANK=$REFERENCE/phy/dbas.bank; export DBASBANK +BEAMPOSITION=$REFERENCE/phy/beam.position; export BEAMPOSITION + +ALPHACARDS=$REFERENCE/phy/alpha.cards; export ALPHACARDS +GALEPHCARDS=$REFERENCE/gal/galeph.cards; export GALEPHCARDS +JULIACARDS=$REFERENCE/jul/julia.cards; export JULIACARDS +KINGALCARDS=$REFERENCE/kin/kingal.cards; export KINGALCARDS +KINAGAINCARDS=$REFERENCE/kin/kinagain.cards; export KINAGAINCARDS +LOOKCARDS=$REFERENCE/gen/look.cards; export LOOKCARDS + +RUNCARTSLIST=$ALBOOK/runcarts.list; export RUNCARTSLIST + +SCWORK=/aleph/scwork; export SCWORK +SCWEEK=/aleph/scweek; export SCWEEK + +ALSTOUT=aldataout; export ALSTOUT +DPMSIZE=200; export DPMSIZE +DPMUSER=aleph; export DPMUSER +STAGELABEL=sl; export STAGELABEL +STAGEFSEQ=1; export STAGEFSEQ +STAGERECFM=F; export STAGERECFM +STAGELRECL=32040; export STAGELRECL +STAGEBLKSIZ=32040; export STAGEBLKSIZ +STAGECLEAN=$SHARED/script/stage-clean-sh; export STAGECLEAN +RETRYCOUNT=10; export RETRYCOUNT +ALDATA=$SHARED/data; export ALDATA +ALSTAGE=$SHARED/data; export ALSTAGE +if [ -z $SERVICE ] ; then + DPMLINKDIR=$SHARED/data; export DPMLINKDIR +fi + +CCOPT="-w -c -DALEPH_C -I${ALINC}"; export CCOPT + +export VENDOR=Linux +export CPPOPT="-DUNIX -DALEPH_LINUX -I${ALINC}" +export FCOPT="-c -O -fno-automatic -fdollar-ok -fno-backslash $CPPOPT" +export FC=g77 +export CCOPT=" -c -O -DALEPH_C -I${ALINC}" + +ALPOPT="${FCOPT} -I${SHARED}/src/alpha/inc"; export ALOPT + +GINTER="galeph.F asieve.F agtpch.F gaxeph.F"; export GINTER + +GUSER="-Wl,-u,qnext_,-u,gntube_,-u,grndm_,-u,gstmed_,-u,gufld_,-u,guhadr_,-u,guphad_,-u,gusear_,-u,gustep_,-u,gutrak_,-u,gdray_,-u,gpghei_"; export GUSER +JMUID="-Wl,-u,ftrack_,-u,hmfind_,-u,mpredg_,-u,mpredm_,-u,muass_"; export JMUID +UNDEF="-Wl,-u,aboldr_,-u,babend_,-u,dafrds_"; export UNDEF + + +ALPVER=`egrep -i alphaver $ALEPH/phy/alpha.version | awk '{print $3}'` +GALVER=`egrep -i galver $ALEPH/gal/galeph.version | awk '{print $3}'` +JULVER=`egrep -i julver $ALEPH/jul/julia.version | awk '{print $3}'` + +BEW=/wg/wwtf/bew; export BEW +WWTF=/wg/wwtf/wwtf; export WWTF +STF=/wg/stf/stf; export STF diff --git a/src/etc/hepix/sh/GROUP/xv/group_rc.sh b/src/etc/hepix/sh/GROUP/xv/group_rc.sh new file mode 120000 index 0000000000000000000000000000000000000000..9c8c0e5500364c5d1034114fabff3a3b23e275df --- /dev/null +++ b/src/etc/hepix/sh/GROUP/xv/group_rc.sh @@ -0,0 +1 @@ +../va/group_rc.sh \ No newline at end of file diff --git a/src/etc/hepix/sh/GROUP/xx/group_rc.sh b/src/etc/hepix/sh/GROUP/xx/group_rc.sh new file mode 100644 index 0000000000000000000000000000000000000000..cb77d35be1aef46ddc400c8e0861cef83c80004c --- /dev/null +++ b/src/etc/hepix/sh/GROUP/xx/group_rc.sh @@ -0,0 +1,4 @@ +# DELPHI environment +## https://its.cern.ch/jira/browse/NOAFS-506 + +hpx_source "/cvmfs/delphi.cern.ch/setup.sh" diff --git a/src/etc/hepix/sh/GROUP/z2/group_rc.sh b/src/etc/hepix/sh/GROUP/z2/group_rc.sh new file mode 100644 index 0000000000000000000000000000000000000000..160f2cbfa11f0fcd62bdcc12ec57f1eb1b119821 --- /dev/null +++ b/src/etc/hepix/sh/GROUP/z2/group_rc.sh @@ -0,0 +1,27 @@ +# z2 / ALICE shell settings +## https://its.cern.ch/jira/browse/NOAFS-507 +## based on /afs/cern.ch/alice/offline/etc/login.sh + +# CASTOR environment +export STAGE_HOST=castoralice +export STAGE_SVCCLASS=t0alice + +# Load ALICE's environment from CernVM-FS (Bash version) +hpx_source /cvmfs/alice.cern.ch/etc/login.sh + +# Latest AliPhysics and fastjet versions +LatestAliPhysics=$(alienv q 2> /dev/null | grep AliPhysics::vAN- | sort -n | tail -n1) +LatestFastjet=$(alienv q 2> /dev/null | grep fastjet:: | sort -n | tail -n1) + +# Do not print any output if shell is non-interactive (i.e. scp) +tty > /dev/null 2> /dev/null || return +ac0="\033[m" +ac1="${ac0}\033[1m" +ac2="${ac0}\033[36m" +ac3="${ac0}\033[35m" +echo -e "${ac1}Welcome my dear ALICE user! To use ALICE software from CVMFS:${ac0}" +echo -e "${ac3} *${ac1} List all packages --> ${ac2}/cvmfs/alice.cern.ch/bin/alienv q${ac0}" +echo -e "${ac3} *${ac1} List AliPhysics packages --> ${ac2}/cvmfs/alice.cern.ch/bin/alienv q | grep -i ${ac3}aliphysics${ac0}" +echo -e "${ac3} *${ac1} Enable a specific package --> ${ac2}/cvmfs/alice.cern.ch/bin/alienv enter ${ac3}${LatestAliPhysics}${ac0}" +echo -e "${ac3} *${ac1} Enable multiple packages --> ${ac2}/cvmfs/alice.cern.ch/bin/alienv enter ${ac3}${LatestAliPhysics}${ac2},${ac3}${LatestFastjet}${ac0}" +unset ac0 ac1 ac2 ac3 LatestAliPhysics LatestFastjet diff --git a/src/etc/hepix/sh/GROUP/z5/group_rc.sh b/src/etc/hepix/sh/GROUP/z5/group_rc.sh new file mode 100644 index 0000000000000000000000000000000000000000..53bb8a897f0b9ed437e99db882ec212450214e13 --- /dev/null +++ b/src/etc/hepix/sh/GROUP/z5/group_rc.sh @@ -0,0 +1,3 @@ +# https://its.cern.ch/jira/browse/NOAFS-508 +# z5 / LHCb settings +hpx_source /cvmfs/lhcb.cern.ch/lib/etc/cern_profile.sh diff --git a/src/etc/hepix/sh/GROUP/zh/group_rc.sh b/src/etc/hepix/sh/GROUP/zh/group_rc.sh new file mode 100644 index 0000000000000000000000000000000000000000..75d2db30e81bb1e480178c5bc5546dde7a75297f --- /dev/null +++ b/src/etc/hepix/sh/GROUP/zh/group_rc.sh @@ -0,0 +1,20 @@ +# CMS-specifics +## https://its.cern.ch/jira/browse/NOAFS-510 +## /afs/cern.ch/group/zh/group_env.sh + +# This is host dependent. If CvmFS is installed, use it, otherwise fall +# back on AFS (e.g. on a desktop/laptop w/o CvmFS). +if [ -d /cvmfs/cms.cern.ch ]; then + CMS_PATH=/cvmfs/cms.cern.ch +else + CMS_PATH=/afs/cern.ch/cms +fi +export CMS_PATH + +# CMS wide settings for latex styles +TEXINPUTS=:${CMS_PATH}/latex/styles ; export TEXINPUTS + +# setup for castor +export STAGE_HOST=castorcms + +hpx_source $CMS_PATH/cmsset_default.sh diff --git a/src/etc/hepix/sh/GROUP/zp/alrb/alrb_container.cfg.sh b/src/etc/hepix/sh/GROUP/zp/alrb/alrb_container.cfg.sh new file mode 100644 index 0000000000000000000000000000000000000000..59696ad2f0ea76dd0f107a5c4f57cacc641373dc --- /dev/null +++ b/src/etc/hepix/sh/GROUP/zp/alrb/alrb_container.cfg.sh @@ -0,0 +1,26 @@ + +local_alrb_mounts="" +# make all of afs available +if [ -d /afs ]; then + set_ALRB_ContainerEnv ALRB_CONT_CMDOPTS "-B /afs:/afs" + local_alrb_mounts="$local_alrb_mounts /afs" +fi + +# make all of eos available +if [ -d /eos ]; then + set_ALRB_ContainerEnv ALRB_CONT_CMDOPTS "-B /eos:/eos" + local_alrb_mounts="$local_alrb_mounts /eos" +fi + +if [ "$local_alrb_mounts" != "" ]; then + set_ALRB_ContainerEnv ALRB_CONT_POSTSETUP "echo '$local_alrb_mounts available in this container'" +fi +unset local_alrb_mounts + +# set HOME to be the same as the dir on lxplus instead of /home/ +# don't do this now as existing container users may be confused. +#set_ALRB_ContainerEnv ALRB_CONT_POSTSETUP "export HOME='$HOME'" +# instead provide a env for users to use if they want to cd to their real HOME +set_ALRB_ContainerEnv ALRB_CONT_POSTSETUP "export UHOME='$HOME'" + + diff --git a/src/etc/hepix/sh/GROUP/zp/group_rc.sh b/src/etc/hepix/sh/GROUP/zp/group_rc.sh new file mode 100644 index 0000000000000000000000000000000000000000..a89d00449503ee26f4f5f57a0cbd323c17a77edf --- /dev/null +++ b/src/etc/hepix/sh/GROUP/zp/group_rc.sh @@ -0,0 +1,26 @@ +# https://its.cern.ch/jira/browse/NOAFS-511 +# zp / ATLAS settings, based on /afs/cern.ch/group/zp/group_env.sh + +export PATH="/afs/cern.ch/atlas/scripts:$PATH" + +export SITE_NAME=CERN-PROD + +export FRONTIER_SERVER='(serverurl=http://atlasfrontier-local.cern.ch:8000/atlr)(serverurl=http://atlasfrontier-ai.cern.ch:8000/atlr)(serverurl=http://lcgft-atlas.gridpp.rl.ac.uk:3128/frontierATLAS)(serverurl=http://ccfrontier.in2p3.fr:23128/ccin2p3-AtlasFrontier)(proxyurl=http://ca-proxy.cern.ch:3128)(proxyurl=http://ca-proxy-meyrin.cern.ch:3128)(proxyurl=http://ca-proxy-wigner.cern.ch:3128)' + +STAGE_HOST=castoratlas; export STAGE_HOST +STAGE_SVCCLASS=default; export STAGE_SVCCLASS + +function setupATLAS +{ + if [ -d /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase ]; then + + export ALRB_localConfigDir="/etc/hepix/sh/GROUP/zp/alrb" + + export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase + source $ATLAS_LOCAL_ROOT_BASE/user/atlasLocalSetup.sh + return $? + else + \echo "Error: cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase is unavailable" >&2 + return 64 + fi +} diff --git a/src/etc/hepix/sh/HEP/bashrc b/src/etc/hepix/sh/HEP/bashrc index 9840ff9bb7a5500b502ee5df58acfb724197f3f8..110b0de32cf750160bdb9e7a7190c03a677d7f8f 100755 --- a/src/etc/hepix/sh/HEP/bashrc +++ b/src/etc/hepix/sh/HEP/bashrc @@ -3,6 +3,6 @@ [ -n "$_HPX_SEEN_HEP_BASHRC" ] && return _HPX_SEEN_HEP_BASHRC=1 -[ -n "$GROUP_DIR" ] && hpx_source $GROUP_DIR/group_bashrc +[ "$HPX_WANTS_AFS" = "true" -a -n "$GROUP_DIR" ] && hpx_source $GROUP_DIR/group_bashrc # End of file. diff --git a/src/etc/hepix/sh/HEP/env b/src/etc/hepix/sh/HEP/env index a3e82a049565213df8bcb36f0cd0114380ca2b1f..a94e3b6dad4a0fa90728be8b05888e442bc795a8 100755 --- a/src/etc/hepix/sh/HEP/env +++ b/src/etc/hepix/sh/HEP/env @@ -8,51 +8,63 @@ _HPX_SEEN_HEP_ENV=1 hpx_source $HPX_HOME_CORE/pathtools umask $HPX_UMASK +# Sanitize and set site-wide environment variables. + +HPX_INITIALE=`echo $USER | /usr/bin/cut -c1` +export CASTOR_HOME=/castor/cern.ch/user/$HPX_INITIALE/$USER +unset HPX_INITIALE + +# $EDITOR is used by SVN, crontab, etc +export EDITOR="/bin/nano -w" + # Determine HEP group name. HPX_PREF_GROUP=$HPX_USER_HOME/preferred-group [ -r $HPX_PREF_GROUP ] \ && HPX_HEPGROUP=`/bin/cat $HPX_PREF_GROUP` \ || HPX_HEPGROUP=`/usr/bin/id -gn` unset HPX_PREF_GROUP -set -a -# Determine HEP group directory. Defaults to AFS. if [ -d /afs/cern.ch/group/$HPX_HEPGROUP ]; then - GROUP_DIR=/afs/cern.ch/group/$HPX_HEPGROUP + export GROUP_DIR="/afs/cern.ch/group/$HPX_HEPGROUP" fi -unset HPX_HEPGROUP -# Sanitize and set site-wide environment variables. -set -a +# Decide whether a group script is packaged (overriding any afs/group scripts) and source it; +# then return, unless that script decides otherwise +if [ "$HPX_WANTS_AFS" != "true" ]; then + if [ -r "$HPX_HOME_GROUP/$HPX_HEPGROUP/group_rc.sh" ]; then + hpx_source "$HPX_HOME_GROUP/$HPX_HEPGROUP/group_rc.sh" + + # the group script can also ask to go into AFS + if [ "$HPX_WANTS_AFS" != "true" ]; then + # $HOME/scripts was used by ~15% of users.. + if [ -d $HOME/scripts ]; then + export PATH="$HOME/scripts:$PATH" + fi -HPX_INITIALE=`echo $USER | /usr/bin/cut -c1` -CASTOR_HOME=/castor/cern.ch/user/$HPX_INITIALE/$USER -unset HPX_INITIALE + # do not source anything else + return + fi + [ $HPX_VERBOSE -ge 10 ] && hpx_echo "N: Explicit fall-through to legacy AFS scripts" + else + [ $HPX_VERBOSE -ge 10 ] && hpx_echo "N: No local group script found in $HPX_HOME_GROUP/$HPX_HEPGROUP" + fi +else + [ $HPX_VERBOSE -ge 10 ] && hpx_echo "N: User config requests legacy AFS scripts" +fi -# $EDITOR is used by SVN, crontab, etc -EDITOR="/bin/nano -w" +## Continue here only if there's no packaged group script, or if the user specifically wants to run the afs/group scripts +## in particular PATH manipulation needs to be done in the packaged script -set +a +unset HPX_HEPGROUP if [ -n "$GROUP_DIR" ]; then GROUPPATH=$GROUP_DIR/bin -fi -[ -n "$GROUP_DIR" ] && hpx_source $GROUP_DIR/group_sys.conf.sh - -[ -n "$GROUP_DIR" ] && hpx_source $GROUP_DIR/group_env.sh + hpx_source $GROUP_DIR/group_sys.conf.sh + hpx_source $GROUP_DIR/group_env.sh +fi set -a -if [ -n "$GROUPPATH" ];then - if [ "${GROUPPATH%% *}" != "${GROUPPATH}" ]; then - hpx_debug "GROUPPATH contains obsolete space separator, use colons." - GROUPPATH=`echo "$GROUPPATH" | /bin/sed 's/ /:/g'` - fi -fi -if [ "${USERPATH%% *}" != "${USERPATH}" ]; then - hpx_debug "USERPATH contains obsolete space separator, use colons." - USERPATH=`echo "$USERPATH" | /bin/sed 's/ /:/g'` -fi if [ -n "$GROUPPATH" ];then USERPATH=$GROUPPATH:$HOME/scripts else @@ -90,7 +102,7 @@ unset GROUPPATH set +a hpx_source $HPX_HOME_HEP/rc -_HPX_SHELL=`/bin/echo ${SHELL} | /usr/bin/cut -f3 -d/` +_HPX_SHELL=${SHELL##*/} hpx_source $HPX_HOME_HEP/${_HPX_SHELL}rc unset _HPX_SHELL diff --git a/src/etc/hepix/sh/HEP/kshrc b/src/etc/hepix/sh/HEP/kshrc index 5fa324c2748355a08a4ee0b0940dfa85d05d6bef..5d80ab9d44217bb1161444960c9fc29b32caab7a 100755 --- a/src/etc/hepix/sh/HEP/kshrc +++ b/src/etc/hepix/sh/HEP/kshrc @@ -5,6 +5,6 @@ _HPX_SEEN_HEP_KSHRC=1 hpx_source $HOME/.kshrc -[ -n "$GROUP_DIR" ] && hpx_source $GROUP_DIR/group_kshrc +[ "$HPX_WANTS_AFS" = "true" -a -n "$GROUP_DIR" ] && hpx_source $GROUP_DIR/group_kshrc # End of file. diff --git a/src/etc/hepix/sh/HEP/logout b/src/etc/hepix/sh/HEP/logout deleted file mode 100755 index 4974e937b3d4936114264f3d96627596c9402851..0000000000000000000000000000000000000000 --- a/src/etc/hepix/sh/HEP/logout +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -[ -n "$_HPX_SEEN_HEP_LOGOUT" ] && return -_HPX_SEEN_HEP_LOGOUT=1 - -[ -z "$HPX_INIT" ] && . /etc/hepix/init.sh - -[ -n "$GROUP_DIR" ] && hpx_source $GROUP_DIR/group_logout - -# End of file. diff --git a/src/etc/hepix/sh/HEP/profile b/src/etc/hepix/sh/HEP/profile index 0a5282cb0720f868437130bea5648cc41df6e06e..93191e3a92d40bb66320990a2c6862c22b9eba7e 100755 --- a/src/etc/hepix/sh/HEP/profile +++ b/src/etc/hepix/sh/HEP/profile @@ -85,7 +85,7 @@ fi set +a unset HPX_TMPDIR -if [ -n "$GROUP_DIR" ];then +if [ "$HPX_WANTS_AFS" = "true" -a -n "$GROUP_DIR" ]; then hpx_source $GROUP_DIR/group_profile hpx_source $GROUP_DIR/group_login.sh hpx_source $GROUP_DIR/group_termset.sh diff --git a/src/etc/hepix/sh/HEP/rc b/src/etc/hepix/sh/HEP/rc index 5938ed6dc204878be064a6f1fc106baa73b68a4e..20cdbcef623e5c1b6d7111f0f30bd8051e602388 100755 --- a/src/etc/hepix/sh/HEP/rc +++ b/src/etc/hepix/sh/HEP/rc @@ -5,6 +5,6 @@ _HPX_SEEN_HEP_RC=1 [ -z "$HPX_INIT" ] && . /etc/hepix/init.sh -[ -n "$GROUP_DIR" ] && hpx_source $GROUP_DIR/group_aliases.sh +[ "$HPX_WANTS_AFS" = "true" -a -n "$GROUP_DIR" ] && hpx_source $GROUP_DIR/group_aliases.sh # End of file. diff --git a/src/etc/hepix/sh/HEP/zshrc b/src/etc/hepix/sh/HEP/zshrc index d133cc8746929d5425fbdef8354952640f529775..fe15df533c95f9f0387ebc88f57236847b3eeca3 100755 --- a/src/etc/hepix/sh/HEP/zshrc +++ b/src/etc/hepix/sh/HEP/zshrc @@ -3,21 +3,6 @@ [ -n "$_HPX_SEEN_HEP_ZSHRC" ] && return _HPX_SEEN_HEP_ZSHRC=1 -HPXB_ALIFETIME=/usr/bin/alifetime - -[ -n "$HPX_AFS_HOME" ] && [ -x "$HPXB_ALIFETIME" ] && { - PERIOD=3000 - periodic () { - _HPX_TKLIFE=`$HPXB_ALIFETIME` - if [ $_HPX_TKLIFE -eq 0 ]; then - hpx_echo ">>>>> AFS token expired! <<<<<" - elif [ $_HPX_TKLIFE -lt 3600 ]; then - hpx_echo ">>>>> AFS token is going to expire in $((_HPX_TKLIFE/60)) minutes <<<<<" - fi - unset _HPX_TKLIFE - } -} - -[ -n "$GROUP_DIR" ] && hpx_source $GROUP_DIR/group_zshrc +[ "$HPX_WANTS_AFS" = "true" -a -n "$GROUP_DIR" ] && hpx_source $GROUP_DIR/group_zshrc # End of file.