ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/webtools.spec
Revision: 1.41
Committed: Fri Aug 22 18:37:01 2008 UTC (16 years, 8 months ago) by valya
Branch: MAIN
CVS Tags: CRABSERVER_1_1_3_pre2_BUILD_SLC5, CRABSERVER_1_1_3_pre1_BUILD_SLC5, CRABSERVER_1_1_2_py26_BUILD_SLC5, CRABSERVER_1_1_2_BUILD_SLC5, CRABSERVER_1_1_2_pre1_BUILD_SLC5, CRABSERVER_1_1_2_beta_BUILD_SLC5, CRABSERVER_1_1_2_beta_BUILD_SLC4, CRABSERVER_1_1_1_BUILD_SLC4, CRABSERVER_1_1_1_BUILD_SLC5, dg20100323-prodagent, CRABSERVER_1_1_1_pre12_BUILD_SLC5, CRABSERVER_1_1_1_pre10_BUILD_SLC5, CRABSERVER_1_1_1_pre9_BUILD_SLC4, CRABSERVER_1_1_1_pre9_BUILD_SLC5, CRABSERVER_1_1_1_pre8_BUILD_SLC5, CRABSERVER_1_1_1_pre7_BUILD_SLC5, CRABSERVER_1_1_1_pre7_BUILD_SLC4, CRABSERVER_1_1_1_pre6_BUILD_SLC4, CRABSERVER_1_1_1_pre6_BUILD_SLC5, CRABSERVER_1_1_1_pre5_BUILD_SLC5, CRABSERVER_1_1_1_pre5_BUILD_SLC4, CRABSERVER_1_1_1_pre4_BUILD_SLC5, CRABSERVER_1_1_1_pre4_BUILD_SLC4, CRABSERVER_1_1_1_pre3_BUILD_SLC5_1, CRABSERVER_1_1_1_pre3_BUILD_SLC4, CRABSERVER_1_1_1_pre3_BUILD_SLC5, CRABSERVER_1_1_1_pre3_BUILD_OK, CS_1_1_1_slc4_1_BUILD, CS_1_1_1_test1_SLC4_BUILD, CS_1_1_1_test1_BUILD, CS_1_1_1_slc5_BUILD, CS_1_1_1_slc4_BUILD, ds20100115_cs_SLC5_workOK, CS_SLC5_test_4, CRABSERVER_CS_SLC5_test_3_BUILD, dg20091218c-crabserver, dg20091215c-crabserver, dg20091218b-crabserver, dg20091218-crabserver, CRABSERVER_1_1_1_pre3_BUILD, CRABSERVER_1_1_1_pre2_BUILD, dg20091215b-crabserver, dg20091215-crabserver, CRABSERVER_1_1_1_pre1_BUILD, CRABSERVER_1_1_0_BUILD, CRABSERVER_1_1_0_pre7_BUILD, CRABSERVER_1_1_0_pre6_BUILD, CRABSERVER_1_1_0_pre5_BUILD, CRABSERVER_1_1_0_pre4_BUILD, CRABSERVER_1_1_0_pre3_BUILD, CRABSERVER_1_0_10_BUILD, CRABSERVER_1_0_10_pre1_BUILD, CRABSERVER_1_1_0_pre2_BUILD, CRABSERVER_1_1_0_pre1_BUILD, CRABSERVER_1_0_9_BUILD, CRABSERVER_1_0_9_pre3_BUILD, CRABSERVER_1_0_9_pre2_BUILD, CRABSERVER_1_0_9_pre1_BUILD, CRABSERVER_1_0_9_pre1, CRABSERVER_1_0_8_BUILD, CRABSERVER_1_0_8_pre7_BUILD, CRABSERVER_1_0_8_pre6_BUILD, CRABSERVER_1_0_8_pre5_BUILD, CRABSERVER_1_0_8_pre4_BUILD, CRABSERVER_1_0_8_pre3_BUILD, CRABSERVER_1_0_8_pre2_BUILD, CRABSERVER_1_0_8_pre1_BUILD, CRABSERVER_1_0_7_BUILD, CRABSERVER_1_0_7_pre4_BUILD, CRABSERVER_1_0_7_pre3_BUILD, CRABSERVER_1_0_7_pre2_BUILD, CRABSERVER_1_0_7_pre1_BUILD, CRABSERVER_1_0_6_BUILD, CRABSERVER_1_0_6_pre6_BUILD, CRABSERVER_1_0_6_pre5_BUILD, CRABSERVER_1_0_6_pre4_BUILD, CRABSERVER_1_0_6_pre3_BUILD, CRABSERVER_1_0_6_pre2_BUILD, CRABSERVER_1_0_6_pre1_BUILD, CRABSERVER_1_0_5_BUILD, CRABSERVER_1_0_5_pre5_BUILD, CRABSERVER_1_0_5_pre4_BUILD, CRABSERVER_1_0_5_TEST_2_BUILD, CRABSERVER_1_0_5_TEST_1_BUILD, CRABSERVER_1_0_5_TEST_BUILD, CRABSERVER_104_BUILD, CRABSERVER_TEST_BUILD_V14, CRABSERVER_TEST_BUILD_V13, CRABSERVER_TEST_BUILD_V12, CRABSERVER_TEST_BUILD_V11, CRABSERVER_TEST_BUILD_V10, CRABSERVER_TEST_BUILD_V9, CRABSERVER_TEST_BUILD_V8, PRODAGENT_0_12_1_20090916, PRODAGENT_0_12_0_20090915_V2, PRODAGENT_0_12_0_20090915, PRODAGENT_BUILD_TEST_0_0_2_20090912, CRABSERVER_TEST_BUILD_V7, CRABSERVER_TEST_BUILD_V6, CRABSERVER_TEST_BUILD_V5, DBS-APPS_20080908, T0Mon_080905_1, T0Mon_080905_01, WEBTOOLS-APPS_20080903, T0Mon_080902_2, T0Mon_080902_1, PRODAGENT_0_11_8_20080901, PRODAGENT_0_12_0_pre3_20080828, WEBTOOLS-APPS_20080826, T0Mon_080824_1, T0Mon_080823_1, WEBTOOLS-APPS_20080822
Changes since 1.40: +2 -2 lines
Log Message:
New versions/tags

File Contents

# User Rev Content
1 valya 1.41 ### RPM cms webtools 1.3.5
2 eulisse 1.10 ## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages
3 egeland 1.39 ## INITENV +PATH PERL5LIB %i/lib/perl
4    
5 eulisse 1.1 %define moduleName WEBTOOLS
6     %define exportName WEBTOOLS
7 valya 1.41 %define cvstag V01-03-12
8 eulisse 1.1 %define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e
9     Source: %cvsserver&strategy=checkout&module=%{moduleName}&nocache=true&export=%{exportName}&tag=-r%{cvstag}&output=/%{moduleName}.tar.gz
10 valya 1.40 Requires: python cherrypy py2-cheetah yui sqlite zlib py2-pysqlite expat openssl bz2lib db4 gdbm py2-cx-oracle py2-formencode py2-pycrypto oracle beautifulsoup py2-sqlalchemy oracle-env
11 eulisse 1.8 Provides: perl(CGI)
12     Provides: perl(Crypt::CBC)
13     Provides: perl(SecurityModule)
14 eulisse 1.28 Provides: perl(DBI)
15 eulisse 1.1 %prep
16     %setup -n %{moduleName}
17     %build
18 eulisse 1.9 rm -rf %i/etc/profile.d
19 eulisse 1.29 mkdir -p %i/etc/profile.d
20 valya 1.38 mkdir -p %i/etc/init.d
21 eulisse 1.29 echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh
22     echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh
23     echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
24     for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
25 eulisse 1.9 do
26 eulisse 1.29 case X$tool in
27     Xdistcc|Xccache )
28     ;;
29     * )
30     toolcap=`echo $tool | tr a-z- A-Z_`
31     eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh
32     eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh
33     ;;
34     esac
35 eulisse 1.9 done
36    
37 eulisse 1.29 perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh
38     perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh
39 eulisse 1.1 %install
40     mkdir -p %i/etc
41 eulisse 1.10 mkdir -p %i/bin
42     mkdir -p %i/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages
43 egeland 1.39 mkdir -p %i/lib/perl
44 valya 1.38
45     # copy init script
46     cp Applications/SiteDB/initscripts/start.sh %{i}/etc/init.d/
47     chmod a+x %{i}/etc/init.d/*
48    
49 metson 1.35 rm -rf Applications Configuration
50 egeland 1.39 cp -r SecurityModule/perl/lib/* %i/lib/perl
51 eulisse 1.10 cp -r * %i/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages
52     cp cmsWeb %i/bin
53 valya 1.38
54 eulisse 1.1 cat << \EOF_CHERRYPY_CONF > %i/etc/cherrypy.conf
55     # Serve a complete directory
56     [/Common]
57 eulisse 1.6 tools.staticdir.on = True
58     tools.staticdir.dir = %i/Common
59 eulisse 1.1 [/Templates]
60 eulisse 1.6 tools.staticdir.on = True
61     tools.staticdir.dir = %i/Templates
62 eulisse 1.5 # Serve a complete directory
63     [/WEBTOOLS/Common]
64 eulisse 1.6 tools.staticdir.on = True
65     tools.staticdir.dir = %i/Common
66 eulisse 1.5 [/WEBTOOLS/Templates]
67 eulisse 1.6 tools.staticdir.on = True
68     tools.staticdir.dir = %i/Templates
69 eulisse 1.1 EOF_CHERRYPY_CONF
70 eulisse 1.2 cat << \EOF_APACHE2_HEADER > %i/etc/apache2-header.conf
71     RewriteEngine On
72     RewriteBase /cms/services
73     EOF_APACHE2_HEADER
74    
75     cat << \EOF_APACHE2_CONF > %i/etc/apache2.conf
76     <Directory %i/Common>
77     Allow from all
78     </Directory>
79     <Directory %i/Templates>
80     Allow from all
81     </Directory>
82     EOF_APACHE2_CONF
83    
84     cat << \EOF_APACHE2_FOOTER > %i/etc/apache2-footer.conf
85     RewriteRule ^/cms/services/webtools/Common(.*)$ %i/Common$1
86     RewriteRule ^/cms/services/webtools/Templates(.*)$ %i/Templates$1
87     EOF_APACHE2_FOOTER
88 eulisse 1.14 %define pythonv %(echo $PYTHON_ROOT | cut -d. -f1,2)
89 eulisse 1.1 %post
90     %{relocateConfig}etc/cherrypy.conf
91 eulisse 1.2 %{relocateConfig}etc/apache2.conf
92     %{relocateConfig}etc/apache2-header.conf
93     %{relocateConfig}etc/apache2-footer.conf
94 eulisse 1.9 %{relocateConfig}etc/profile.d/dependencies-setup.sh
95     %{relocateConfig}etc/profile.d/dependencies-setup.csh
96 eulisse 1.14 perl -p -i -e "s!\@RPM_INSTALL_PREFIX\@!$RPM_INSTALL_PREFIX/%pkgrel!" $RPM_INSTALL_PREFIX/%pkgrel/bin/cmsWeb
97 valya 1.33
98    
99     # setup approripate links and made post install procedure
100     . $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh
101     if [ `hostname`=="cmswttest.cern.ch" ]; then
102     cat > $RPM_INSTALL_PREFIX/%{pkgrel}/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages/Tools/SiteDBCore/security.ini << POST_EOF
103     [database]
104     dbtype = sqlite
105     dbname = $RPM_INSTALL_PREFIX/%{pkgrel}/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages/Tools/SiteDBCore/sitedb.db
106     POST_EOF
107     else
108     if [ -n "${WEBTOOLS_CONF}" ] && [ -f ${WEBTOOLS_CONF}/sitedb/security.ini ]; then
109     ln -s ${WEBTOOLS_CONF}/sitedb/security.ini $RPM_INSTALL_PREFIX/%{pkgrel}/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages/Tools/SiteDBCore/security.ini
110     fi
111     fi
112