ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/webtools.spec
Revision: 1.61
Committed: Fri Apr 17 19:35:32 2009 UTC (16 years ago) by valya
Branch: MAIN
CVS Tags: DAS_20100302_slc5_amd64_gcc434, forPHEDEX-web-20100226, forPHEDEX-web-20100225, dg20100225-prodagent, dg-base-rev5, dg-base-rev4, CRABSERVER_1_1_1_pre9_BUILD_SLC5rev3py24, dg-base-rev3, dg-base-rev2, dg-base-rev1, DBS_20100217_slc5_amd64_gcc434, DAS_20100217_slc5_amd64_gcc434, DAS_20100216b_slc5_amd64_gcc434, DAS_20100216_slc5_amd64_gcc434, dg20100201-dbs3, dg20100129-dbs3, dg20100128-dbs3, DAS_20100127_slc5_amd64_gcc434, DAS_20100126_slc5_amd64_gcc434, DBS-APP_20100122_slc4, DBS-APP_20100121_slc4, DBS-WEB_20100120_slc4, DBS-APP_20100120_slc4, DAS_20100119_slc5_amd64_gcc434, DBS-APP_20100118_slc4, DBS-WEB_20100118_slc4, DAS_20100115_slc5_amd64_gcc434, dg20100115-security, DBS-APP_20100114_slc4, DBS-WEB_20100113_slc4, dg20100112-security, DBS_20100111_slc5_amd64_gcc434, dg20100111-security, dg20100107b-wmcore, dg20100107-wmcore, DAS_20100105_slc5_amd64_gcc434, DAS_20091221_slc5_amd64_gcc434, DAS_20091214_slc5_amd64_gcc434, dg20091211-couchdb, dg20091210-phedex, dg20091203c-comp-base, DD_20091208_slc5_amd64_gcc434, DAS_20091208_slc5_amd64_gcc434, FILEMOVER_20091208_slc5_amd64_gcc434, DBS_20091208_slc5_amd64_gcc434, dg20091203b-comp-base, dg20091203-comp-base, DQMCATTEST_0_0_1, FILEMOVER_20091118, DBS-APPS_20090929, DAS_20091117, BUILDBOT_01, CERNOIDv02, DBS-WEB_20091021, CouchDB_0_10_0, forPHEDEX-web-20091020, forPHEDEX-web-20091016, CERNOIDv01, WMCORE-before-refactor, forPHEDEX-web-20091014, DBS-WEB_20091012, forPHEDEX-web-20091002, PerfSuiteDB_20090930, forPHEDEX-web-20090929, DBS-WEB_20090921, PerfSuiteDB_20090916, FILEMOVER_20090910, PerfSuiteDB_20090904_almost_stable, DBS-WEB_20090817, PerfSuiteDB_20090904, FILEMOVER_20090828, PerfSuiteDB_20090901, DBS-APPS_20090706, forHEARTBEATr04, RPMVERIFY_0_2, forHEARTBEATr01, forPHEDEX-web-20090821, WEBTOOLS_APPS_20090817, DBS-APPS_20090804, DBS-APPS_20090730, forPHEDEX-web-20090722, popcon_monitoring-V01-00-00, DBS-WEB_20090618, DBS-APPS_20090619, DBS-APPS_20090608, DBS-APPS_20090604_1, DBS-APPS_20090604, DBS-APPS_20090603, DBS-APPS_20090528, forPHEDEX-web-20090520, ap20090520-osx105, ap20090519-osx105, DBS_APPS_20090518, forPHEDEX-web-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, forPHEDEX-web-services-20090423, DBS-WEB_20090422, DBS-WEB_20090420, DBS-APPS_20090417
Changes since 1.60: +2 -2 lines
Log Message:
New tag

File Contents

# User Rev Content
1 valya 1.61 ### RPM cms webtools 1.3.33
2 eulisse 1.10 ## INITENV +PATH PYTHONPATH %i/lib/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages
3 valya 1.47 ## INITENV +PATH PERL5LIB %i/lib/perl
4    
5 eulisse 1.1 %define moduleName WEBTOOLS
6     %define exportName WEBTOOLS
7 valya 1.61 %define cvstag V01-03-33
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.47 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     Requires: p5-crypt-cbc p5-crypt-blowfish
12 eulisse 1.8 Provides: perl(CGI)
13     Provides: perl(Crypt::CBC)
14     Provides: perl(SecurityModule)
15 eulisse 1.28 Provides: perl(DBI)
16 eulisse 1.1 %prep
17     %setup -n %{moduleName}
18     %build
19 eulisse 1.9 rm -rf %i/etc/profile.d
20 eulisse 1.29 mkdir -p %i/etc/profile.d
21 valya 1.47 mkdir -p %i/etc/init.d
22 eulisse 1.29 echo '#!/bin/sh' > %{i}/etc/profile.d/dependencies-setup.sh
23     echo '#!/bin/tcsh' > %{i}/etc/profile.d/dependencies-setup.csh
24     echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
25     for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
26 eulisse 1.9 do
27 eulisse 1.29 case X$tool in
28     Xdistcc|Xccache )
29     ;;
30     * )
31     toolcap=`echo $tool | tr a-z- A-Z_`
32     eval echo ". $`echo ${toolcap}_ROOT`/etc/profile.d/init.sh" >> %{i}/etc/profile.d/dependencies-setup.sh
33     eval echo "source $`echo ${toolcap}_ROOT`/etc/profile.d/init.csh" >> %{i}/etc/profile.d/dependencies-setup.csh
34     ;;
35     esac
36 eulisse 1.9 done
37    
38 eulisse 1.29 perl -p -i -e 's|\. /etc/profile\.d/init\.sh||' %{i}/etc/profile.d/dependencies-setup.sh
39     perl -p -i -e 's|source /etc/profile\.d/init\.csh||' %{i}/etc/profile.d/dependencies-setup.csh
40 eulisse 1.1 %install
41     mkdir -p %i/etc
42 eulisse 1.10 mkdir -p %i/bin
43 valya 1.47 mkdir -p %i/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages
44     mkdir -p %i/lib/perl
45    
46     # copy init script
47     cp Applications/SiteDB/initscripts/start.sh %{i}/etc/init.d/
48     chmod a+x %{i}/etc/init.d/*
49    
50     rm -rf Applications Configuration
51     cp -r SecurityModule/perl/lib/* %i/lib/perl
52     cp -r * %i/lib/python`echo $PYTHON_VERSION | cut -d. -f1,2`/site-packages
53 eulisse 1.10 cp cmsWeb %i/bin
54 valya 1.47
55     cat << \EOF_CHERRYPY_CONF > %i/etc/cherrypy.conf
56     # Serve a complete directory
57     [/Common]
58     tools.staticdir.on = True
59     tools.staticdir.dir = %i/Common
60     [/Templates]
61     tools.staticdir.on = True
62     tools.staticdir.dir = %i/Templates
63     # Serve a complete directory
64     [/WEBTOOLS/Common]
65     tools.staticdir.on = True
66     tools.staticdir.dir = %i/Common
67     [/WEBTOOLS/Templates]
68     tools.staticdir.on = True
69     tools.staticdir.dir = %i/Templates
70     EOF_CHERRYPY_CONF
71     cat << \EOF_APACHE2_HEADER > %i/etc/apache2-header.conf
72     RewriteEngine On
73     RewriteBase /cms/services
74     EOF_APACHE2_HEADER
75    
76     cat << \EOF_APACHE2_CONF > %i/etc/apache2.conf
77     <Directory %i/Common>
78     Allow from all
79     </Directory>
80     <Directory %i/Templates>
81     Allow from all
82     </Directory>
83     EOF_APACHE2_CONF
84    
85     cat << \EOF_APACHE2_FOOTER > %i/etc/apache2-footer.conf
86     RewriteRule ^/cms/services/webtools/Common(.*)$ %i/Common$1
87     RewriteRule ^/cms/services/webtools/Templates(.*)$ %i/Templates$1
88     EOF_APACHE2_FOOTER
89     %define pythonv %(echo $PYTHON_ROOT | cut -d. -f1,2)
90 eulisse 1.1 %post
91 valya 1.47 %{relocateConfig}etc/cherrypy.conf
92     %{relocateConfig}etc/apache2.conf
93     %{relocateConfig}etc/apache2-header.conf
94     %{relocateConfig}etc/apache2-footer.conf
95 eulisse 1.9 %{relocateConfig}etc/profile.d/dependencies-setup.sh
96     %{relocateConfig}etc/profile.d/dependencies-setup.csh
97 eulisse 1.14 perl -p -i -e "s!\@RPM_INSTALL_PREFIX\@!$RPM_INSTALL_PREFIX/%pkgrel!" $RPM_INSTALL_PREFIX/%pkgrel/bin/cmsWeb
98 valya 1.33
99 valya 1.47
100     # setup approripate links and made post install procedure
101     . $RPM_INSTALL_PREFIX/%{pkgrel}/etc/profile.d/init.sh
102     if [ -n "${WEBTOOLS_CONF}" ] && [ -f ${WEBTOOLS_CONF}/sitedb/security.ini ]; then
103     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
104     fi
105