ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/crab.spec
Revision: 1.8
Committed: Fri Jan 5 16:54:36 2007 UTC (18 years, 3 months ago) by afanfani
Branch: MAIN
CVS Tags: pe20070501a-ports, pe20070428a-ports, pe20070423b-ports, pe20070423a-ports, pe20070414b-ports, pe20070414a-ports, pe20070412b-ports, pe20070412a-ports, pe20070411a-ports
Changes since 1.7: +61 -65 lines
Log Message:
fixes for check boss env

File Contents

# User Rev Content
1 afanfani 1.7 ### RPM cms crab CRAB_1_4_2
2 eulisse 1.1 ## INITENV +PATH PYTHONPATH %i/python
3 afanfani 1.7 ## INITENV +PATH PYTHONPATH %i/PsetCode
4     ## INITENV +PATH PATH %i/python
5 afanfani 1.8 ## INITENV SET CRABPYTHON %i/python
6 afanfani 1.7 ## INITENV SET CRABDIR %i
7     ## INITENV SET CRABSCRIPT %i/script
8 eulisse 1.1
9 elmer 1.3 %define cvstag %v
10 eulisse 1.1 Source: cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&module=CRAB&export=CRAB&&tag=-r%{cvstag}&output=/CRAB.tar.gz
11 afanfani 1.7 Requires: python boss dbs dls prodagent
12 eulisse 1.1
13     %prep
14     %setup -n CRAB
15     %build
16 afanfani 1.7 %install
17 eulisse 1.1 rm -rf %i
18     mkdir -p %i
19     cp -r ./* %i
20 afanfani 1.7 mkdir -p %{i}/etc/profile.d
21    
22     (echo "#!/bin/sh"; \
23     echo "source $PYTHON_ROOT/etc/profile.d/init.sh"; \
24     echo "source $DBS_ROOT/etc/profile.d/init.sh"; \
25     echo "source $DLS_ROOT/etc/profile.d/init.sh"; \
26     echo "source $PRODAGENT_ROOT/etc/profile.d/init.sh"; \
27 afanfani 1.8 echo "source $BOSS_ROOT/etc/profile.d/init.sh"; \
28     echo "# check if BOSS is configured"; \
29     echo "if [ ! -d ~/.bossrc ]; then"; \
30     echo " mkdir ~/.bossrc "; \
31     echo "fi "; \
32     echo "# check if *clad files exist"; \
33     echo "if [ ! -e ~/.bossrc/BossConfig.clad ]; then "; \
34     echo "if [ -e ~/BossConfig.clad ]; then "; \
35     echo " cp ~/BossConfig.clad ~/.bossrc/BossConfig.clad "; \
36     echo " else "; \
37     echo " echo \"User-boss DB not installed => run $\CRABPYTHON/configureBoss\" "; \
38     echo " return 1 "; \
39     echo " fi "; \
40     echo "fi "; \
41     echo "if [ ! -e ~/.bossrc/SQLiteConfig.clad ]; then"; \
42     echo " if [ -e ~/SQLiteConfig.clad ]; then"; \
43     echo " cp ~/SQLiteConfig.clad ~/.bossrc/SQLiteConfig.clad"; \
44     echo " else"; \
45     echo " echo \"User-boss DB not installed => run $\CRABPYTHON/configureBoss\" "; \
46     echo " return 1"; \
47     echo " fi"; \
48     echo "fi "; \
49     echo "if [ ! -e ~/.bossrc/MySQLRTConfig.clad ]; then"; \
50     echo " if [ -e ~/MySQLRTConfig.clad ]; then"; \
51     echo " cp ~/MySQLRTConfig.clad ~/.bossrc/MySQLRTConfig.clad"; \
52     echo " else"; \
53     echo " echo \"User-boss DB not installed => run $\CRABPYTHON/configureBoss\" "; \
54     echo " return 1"; \
55     echo " fi"; \
56     echo "fi " ) > %{i}/etc/profile.d/dependencies-setup.sh
57 afanfani 1.7
58     (echo "#!/bin/tcsh"; \
59     echo "source $PYTHON_ROOT/etc/profile.d/init.csh"; \
60     echo "source $DBS_ROOT/etc/profile.d/init.csh"; \
61     echo "source $DLS_ROOT/etc/profile.d/init.csh"; \
62     echo "source $PRODAGENT_ROOT/etc/profile.d/init.csh"; \
63 afanfani 1.8 echo "source $BOSS_ROOT/etc/profile.d/init.csh"; \
64     echo "if ( ! -d ~/.bossrc ) then"; \
65     echo " mkdir ~/.bossrc"; \
66     echo "endif"; \
67     echo "# check if *clad files exist"; \
68     echo "if ( ! -e ~/.bossrc/BossConfig.clad ) then"; \
69     echo " if ( -e ~/BossConfig.clad ) then"; \
70     echo " cp ~/BossConfig.clad ~/.bossrc/BossConfig.clad"; \
71     echo " else"; \
72     echo " echo \"User-boss DB not installed => run $\CRABPYTHON/python/configureBoss\""; \
73     echo " exit 1"; \
74     echo " endif"; \
75     echo "endif"; \
76     echo "if ( ! -e ~/.bossrc/SQLiteConfig.clad ) then"; \
77     echo " if ( -e ~/SQLiteConfig.clad ) then"; \
78     echo " cp ~/SQLiteConfig.clad ~/.bossrc/SQLiteConfig.clad"; \
79     echo " else"; \
80     echo " echo \"User-boss DB not installed => run $\CRABPYTHON/configureBoss\""; \
81     echo " exit 1"; \
82     echo " endif"; \
83     echo "endif"; \
84     echo "if ( ! -e ~/.bossrc/MySQLRTConfig.clad ) then"; \
85     echo " if ( -e ~/MySQLRTConfig.clad ) then"; \
86     echo " cp ~/MySQLRTConfig.clad ~/.bossrc/MySQLRTConfig.clad"; \
87     echo " else"; \
88     echo " echo \"User-boss DB not installed => run $\CRABPYTHON/configureBoss\""; \
89     echo " exit 1"; \
90     echo " endif"; \
91     echo "endif " ) > %{i}/etc/profile.d/dependencies-setup.csh
92 afanfani 1.7
93     %post
94     %{relocateConfig}etc/profile.d/dependencies-setup.sh
95     %{relocateConfig}etc/profile.d/dependencies-setup.csh
96    
97 afanfani 1.8