ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/CMSDIST/webtools.spec
Revision: 1.50
Committed: Thu Oct 16 18:54:08 2008 UTC (16 years, 6 months ago) by valya
Branch: MAIN
CVS Tags: MotT0_1_0_2, MotT0_1_0_1, MotT0_1_0_0, MotT0_100531_1, MotT0_100528_1, T0Mon_100518_1, T0Mon_100503_1, dg20100326-prodagent, T0Mon_100316_1, T0Mon_100308_2, T0Mon_100308_1, sw_20100218, T0Mon_100216_1, T0Mon_100210_1, T0Mon_100204_4, T0Mon_100204_3, T0Mon_100204_1, T0Mon_100127_1, dg20100125-prodagent, dg20100106b-prodagent, dg20100106-prodagent, PRODAGENT_0_12_17_pre2, T0Mon_091111_1, PRODAGENT_0_12_17_pre1, PRODAGENT_0_12_16_patch2, PRODAGENT_0_12_16_patch1, sjg091014a, PRODAGENT_0_12_16, sm090924a, T0Mon_090828_1, T0Mon_090822_1, sm090807a, T0Mon_090715_1, PRODAGENT_0_12_15_patch1, sm090703b, PRODAGENT_0_12_15, T0Mon_090612_1, T0Mon_090611_1, T0Mon_090610_1, T0Mon_090601_1, T0Mon_090527_2, T0Mon_090527_1, T0Mon_090522_1, T0Mon_090519_2, T0Mon_090519_1, T0Mon_090517_1, T0Mon_090516_1, T0Mon_090515_4, T0Mon_090515_3, T0Mon_090515_2, T0Mon_090515_1, T0Mon_090510_1, PRODAGENT_0_12_14-dbs206p5-090507, PRODAGENT_0_12_15_pre2-090507, PRODAGENT_0_12_15_pre2, sm090506c, PRODAGENT_0_12_14-dbs206p5, sm090506b, sm090506a, PRODAGENT_0_12_13_patch5_DBS206a, PRODAGENT_0_12_14, PRODAGENT_0_12_13_patch5_DBS206, sm090408a, T0Mon_090406_1, PRODAGENT_0_12_13_patch5, sm090331a_pa0_12_13-p5, PRODAGENT_0_12_13_patch5_V1_20090331, sm090331_pa0_12_13-p5, T0Mon_090326_1, T0Mon_090325_1, T0Mon_090318_1, T0Mon_090315_1, PRODAGENT_0_12_13_patch4_V1_20090304, T0Mon_090303_1, PRODAGENT_0_12_13_patch3_V1_20090225, PRODAGENT_0_12_9_patch1_20081219, PRODAGENT_0_12_10_20081219, PRODAGENT_0_12_9_20081218, PRODAGENT_0_12_8_20081211, DBS-APPS_20081205, DBS-APPS_20081204, DBS-APPS_200811204, PRODAGENT_0_12_8_pre1_20081129, DBS-APPS_20081126_1, DBS-APPS_20081126, DBS-APPS_20081125, testofc, PRODAGENT_BUILD_TEST_0_0_5_20081120, PRODAGENT_BUILD_TEST_0_0_4_20081120, PRODAGENT_BUILD_TEST_0_0_3_20081120_V1, PRODAGENT_BUILD_TEST_0_0_3_20081120, DBS-APPS_20081119, DBS-APPS_20081118, PRODAGENT_0_12_7_20081118_V3, PRODAGENT_0_12_7_20081118_V2, PRODAGENT_0_12_7_20081118_V1, PRODAGENT_0_12_7_20081118, DBS-APPS_20081117, DBS-APPS_20081114_1, DBS-APPS_20081114, DBS-APPS_20081112, DBS-APPS_20081111_1, DBS-APPS_20081110_2, DBS-APPS_20081110_1, WEBTOOLS-APPS_20081110, DBS-APPS_20081110, PRODAGENT_0_12_7_pre2_20081110, WEBTOOLS-APPS_20081107_1, WEBTOOLS-APPS_20081107, DBS-APPS_20081107, T0Mon_081107_1, DBS-APPS_20081105, T0Mon_081105_1, DBS-APPS_20081104, WEBTOOLS-APPS_20081031_2, DBS-APPS_20081031_2, DBS-APPS_20081031_1, WEBTOOLS-APPS_20081031_1, WEBTOOLS-APPS_20081031, DBS-APPS_20081024, WEBTOOLS-APPS_20081020_1, WEBTOOLS-APPS_20081020
Changes since 1.49: +0 -8 lines
Log Message:
Removed condition to check cmswttest. Will only rely on WEBTOOLS_CONF and check it out to create a link to security.ini

File Contents

# User Rev Content
1 valya 1.49 ### RPM cms webtools 1.3.10
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.49 %define cvstag V01-03-21
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