1 |
xiezhen |
1.8.2.16 |
### RPM cms conddb-appserver 1.6.3b
|
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.8.2.16 |
%define cvstag CONDAPP-1-6-3b
|
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.8.2.15 |
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.8.2.5 |
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.8.2.15 |
|
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.8.2.15 |
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.8.2.5 |
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 |
xiezhen |
1.8.2.2 |
|
52 |
xiezhen |
1.8.2.10 |
rm -f %i/CondWebServer/config/application.conf
|
53 |
|
|
cat << \EOF_APP_CONF > %{i}/CondWebServer/config/application.conf
|
54 |
xiezhen |
1.8.2.8 |
# generate application.conf on the fly
|
55 |
xiezhen |
1.8.2.14 |
[common]
|
56 |
xiezhen |
1.8.2.9 |
auth_path = %{i}/auth
|
57 |
|
|
datasave_dir = %{i}/data
|
58 |
xiezhen |
1.8.2.10 |
detector_conf= %{i}/CondWebServer/config/detector.conf
|
59 |
xiezhen |
1.8.2.14 |
|
60 |
|
|
[iov]
|
61 |
|
|
log_conn=sqlite_file:log.db
|
62 |
|
|
|
63 |
xiezhen |
1.8.2.11 |
[globaltag]
|
64 |
|
|
config_file = %{i}/CondWebServer/config/globaltag.conf
|
65 |
xiezhen |
1.8.2.8 |
EOF_APP_CONF
|
66 |
|
|
|
67 |
xiezhen |
1.8.2.9 |
%post
|
68 |
|
|
%{relocateConfig}etc/profile.d/dependencies-setup.sh
|
69 |
|
|
%{relocateConfig}etc/profile.d/dependencies-setup.csh
|
70 |
xiezhen |
1.8.2.10 |
%{relocateConfig}CondWebServer/config/application.conf
|
71 |
xiezhen |
1.8.2.9 |
|
72 |
|
|
echo "*************************************************************"
|
73 |
xiezhen |
1.8.2.6 |
echo
|
74 |
xiezhen |
1.8.2.9 |
echo Please now add authentication.xml in
|
75 |
xiezhen |
1.8.2.3 |
echo $RPM_INSTALL_PREFIX/%{pkgrel}/auth
|
76 |
|
|
echo
|
77 |
xiezhen |
1.8.2.15 |
echo Please ajust PORT variables in
|
78 |
xiezhen |
1.8.2.6 |
echo $RPM_INSTALL_PREFIX/%{pkgrel}/etc/init.d/conddb-app-server.conf
|
79 |
xiezhen |
1.8 |
echo
|
80 |
xiezhen |
1.8.2.9 |
echo If you choose to use non-default setup, please ajust the parameters in:
|
81 |
xiezhen |
1.8 |
echo
|
82 |
xiezhen |
1.8.2.10 |
echo $RPM_INSTALL_PREFIX/%{pkgrel}/CondWebServer/config/application.conf
|
83 |
xiezhen |
1.8 |
echo
|
84 |
xiezhen |
1.8.2.9 |
echo "*************************************************************"
|