ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/conddb-appserver.spec
Revision: 1.13
Committed: Mon Feb 9 18:47:53 2009 UTC (16 years, 2 months ago) by xiezhen
Branch: MAIN
CVS Tags: DBS-APP_20100122_slc4, DBS-APP_20100121_slc4, DBS-WEB_20100120_slc4, DBS-APP_20100120_slc4, DBS-APP_20100118_slc4, DBS-WEB_20100118_slc4, DBS-APP_20100114_slc4, DBS-WEB_20100113_slc4, DAS_20091202, FILEMOVER_20091118, DBS-APPS_20090929, pe20091117a-fromDAS_20090709, pe20091116b-fromDAS_20090709, pe20091116a-fromDAS_20090709, DAS_20091104, DBS-WEB_20091021, DAS_20091016, DAS_20091014, DBS-WEB_20091012, DBS-WEB_20090921, pe20090910-fromDAS_20090709, FILEMOVER_20090910, DBS-WEB_20090817, FILEMOVER_20090828, DBS-APPS_20090706, WEBTOOLS_APPS_20090817, DBS-APPS_20090804, DBS-APPS_20090730, DAS_20090709, DAS_20090607, DBS-WEB_20090618, DBS-APPS_20090619, DBS-APPS_20090608, DBS-APPS_20090604_1, DAS_20090604, DBS-APPS_20090604, DAS_20090603, DBS-APPS_20090603, DBS-APPS_20090528, condcore306, DBS_APPS_20090518, DAS_20090514_3, DAS_20090514_2, DAS_20090514_1, DAS_20090514, DBS-WEB_20090512, DBS-WEB_20090507, DBS_APPS_20090504, DBS_APPS_20090501, DBS-APPS_20090429_2, DBS-WEB_20090429, DBS-APPS_20090429, DBS-WEB_20090428, DBS-WEB_20090422, DBS-WEB_20090420, DBS-APPS_20090417, DBS-APPS_20090415, DBS-APPS_20090410, DAS_20090408, DBS-APPS_20090406, DAS_20090330, DBS-APPS_20090326, DAS_20090319_1, DAS_20090319, DBS-APPS_20090318, DBS-APPS_20090316, DAS_20090316, DAS_20090313, COUCHDB_20090313, DBS-APPS_20090310, WEBTOOLS-APPS_20090310_1, WEBTOOLS-APPS_20090310, WEBTOOLS-APPS_20090309, DBS-APPS_20090306, DBS-APPS_20090304_1, DBS-APPS_20090304, DBS-APPS_20090303_1, DBS-APPS_20090303, DBS-APPS_20090302, DBS-APPS_20090220_1, DBS-APPS_20090220, MEMCACHED_20090219_1, MEMCACHED_20090219, WEBTOOLS-APPS_20090217_1, WEBTOOLS-APPS_20090217, WEBTOOLS-APPS_20090216, condcore305, WEBTOOLS-APPS_20090212, WEBTOOLS-APPS_20090209_64bit, zx20090209
Changes since 1.12: +2 -2 lines
Log Message:
update

File Contents

# User Rev Content
1 xiezhen 1.13 ### RPM cms conddb-appserver 1.6.3
2 eulisse 1.1 ## INITENV +PATH PYTHONPATH %i
3     # FIXME: Change the version above
4     # FIXME: Change the tag in cvstag
5 xiezhen 1.3 %define moduleName WEBCONDDB
6     %define exportName WEBCONDDB
7 xiezhen 1.13 %define cvstag CONDAPP-1-6-3
8 eulisse 1.1
9     %define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e
10     Source: %cvsserver&strategy=checkout&module=%{moduleName}&nocache=true&export=%{exportName}&tag=-r%{cvstag}&output=/WEBCONDDB.tar.gz
11 xiezhen 1.11 Requires: python cherrypy
12 eulisse 1.1
13    
14     %prep
15     %setup -n WEBCONDDB
16     %build
17     rm -rf %i/etc/profile.d
18     mkdir -p %i/etc/profile.d/
19 xiezhen 1.9 rm -rf %i/etc/init.d
20     mkdir -p %i/etc/init.d/
21     rm -rf %i/data
22     mkdir -p %i/data
23     rm -rf %i/auth
24     mkdir -p %i/auth
25 eulisse 1.1
26     echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh
27     echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh
28 xiezhen 1.11
29 eulisse 1.1 echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
30     for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
31     do
32     case X$tool in
33     Xdistcc|Xccache )
34     ;;
35     * )
36     toolcap=`echo $tool | tr a-z- A-Z_`
37     eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh
38 xiezhen 1.11 eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh
39 eulisse 1.1 ;;
40     esac
41     done
42    
43     perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh
44     perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh
45    
46     %install
47 xiezhen 1.5 cp -r CondWebServer %i
48 xiezhen 1.9 cp -f CondWebServer/scripts/conddb-app-server %i/etc/init.d/
49     cp -f CondWebServer/scripts/conddb-app-server.conf %i/etc/init.d/
50     chmod a+x %{i}/etc/init.d/conddb-app-server
51    
52     rm -f %i/CondWebServer/config/application.conf
53     cat << \EOF_APP_CONF > %{i}/CondWebServer/config/application.conf
54     # generate application.conf on the fly
55     [common]
56     auth_path = %{i}/auth
57     datasave_dir = %{i}/data
58     detector_conf= %{i}/CondWebServer/config/detector.conf
59    
60     [iov]
61     log_conn=sqlite_file:log.db
62    
63     [globaltag]
64     config_file = %{i}/CondWebServer/config/globaltag.conf
65     EOF_APP_CONF
66    
67 eulisse 1.1 %post
68     %{relocateConfig}etc/profile.d/dependencies-setup.sh
69     %{relocateConfig}etc/profile.d/dependencies-setup.csh
70 xiezhen 1.9 %{relocateConfig}CondWebServer/config/application.conf
71    
72     echo "*************************************************************"
73     echo
74     echo Please now add authentication.xml in
75     echo $RPM_INSTALL_PREFIX/%{pkgrel}/auth
76     echo
77 xiezhen 1.11 echo Please ajust PORT variables in
78 xiezhen 1.9 echo $RPM_INSTALL_PREFIX/%{pkgrel}/etc/init.d/conddb-app-server.conf
79     echo
80     echo If you choose to use non-default setup, please ajust the parameters in:
81 xiezhen 1.8 echo
82     echo $RPM_INSTALL_PREFIX/%{pkgrel}/CondWebServer/config/application.conf
83     echo
84 xiezhen 1.9 echo "*************************************************************"