1 |
< |
### RPM cms dbs-light DBS_1_0_8_pre1 |
1 |
> |
### RPM cms dbs-light DBS_1_0_8_pre2 |
2 |
|
## INITENV +PATH PYTHONPATH %i/lib/Clients/Python |
3 |
|
|
4 |
+ |
# in order to build DBS RPM you MUST specify which schema/client version should be used. |
5 |
+ |
%define schemaVer DBS_1_0_7 |
6 |
+ |
%define clientVer DBS_1_0_7 |
7 |
+ |
|
8 |
|
%define cvstag %v |
9 |
|
Source: cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&module=DBS&export=DBS&tag=-r%{cvstag}&output=/dbs-light.tar.gz |
10 |
|
#Source: cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&module=DBS/{Servers/JavaServer,Clients/Python,Schema/NeXtGen/DBS-NeXtGen-SQLite_DEPLOYABLE.sql}&export=DBS&tag=-r%{cvstag}&output=/dbs-light.tar.gz |
38 |
|
echo "source $SQLITE_ROOT/etc/profile.d/init.sh"; \ |
39 |
|
echo "source $APACHE_ANT_ROOT/etc/profile.d/init.sh"; \ |
40 |
|
echo "source $OPENSSL_ROOT/etc/profile.d/init.sh"; \ |
41 |
+ |
echo -e "export PYTHONPATH=\044PYTHONPATH:\044DBS_LIGHT_ROOT/Clients/Python:\044DBS_LIGHT_ROOT/Clients/Python/DBSAPI"; \ |
42 |
+ |
echo -e "export DBS_CLIENT_CONFIG=\044DBS_LIGHT_ROOT/Clients/Python/DBSAPI/dbs.config"; \ |
43 |
|
) > %{i}/etc/profile.d/dependencies-setup.sh |
44 |
|
|
45 |
|
(echo "#!/bin/tcsh"; \ |
47 |
|
echo "source $SQLITE_ROOT/etc/profile.d/init.csh"; \ |
48 |
|
echo "source $APACHE_ANT_ROOT/etc/profile.d/init.csh"; \ |
49 |
|
echo "source $OPENSSL_ROOT/etc/profile.d/init.csh"; \ |
50 |
+ |
echo -e "setenv PYTHONPATH \044PYTHONPATH:\044DBS_LIGHT_ROOT/Clients/Python:\044DBS_LIGHT_ROOT/Clients/Python/DBSAPI"; \ |
51 |
+ |
echo -e "setenv DBS_CLIENT_CONFIG=\044DBS_LIGHT_ROOT/Clients/Python/DBSAPI/dbs.config"; \ |
52 |
|
) > %{i}/etc/profile.d/dependencies-setup.csh |
53 |
|
|
54 |
|
# client |
75 |
|
|
76 |
|
# correct DBS client config file to operate in stand-along mode |
77 |
|
cat $RPM_INSTALL_PREFIX/%{pkgrel}/Clients/Python/DBSAPI/dbs.config | \ |
78 |
+ |
sed "s/DBSHOME/#DBSHOME/g" | |
79 |
+ |
sed "s/JAVAHOME/#JAVAHOME/g" | |
80 |
|
sed "s/MODE=POST/#MODE=POST/g" > \ |
81 |
|
$RPM_INSTALL_PREFIX/%{pkgrel}/Clients/Python/DBSAPI/dbs.config.tmp |
82 |
|
cat >> $RPM_INSTALL_PREFIX/%{pkgrel}/Clients/Python/DBSAPI/dbs.config.tmp << EOF |
90 |
|
|
91 |
|
# correct DBS server config file |
92 |
|
cat > $RPM_INSTALL_PREFIX/%{pkgrel}/Servers/JavaServer/etc/context.xml << EOF |
93 |
+ |
<Context path="/servlet/DBSServlet" docBase="DBSServlet" debug="5" reloadable="true" crossContext="true"> |
94 |
|
<Resource name="jdbc/dbs" |
95 |
|
auth="Container" |
96 |
|
type="javax.sql.DataSource" |
101 |
|
password="" |
102 |
|
driverClassName="org.sqlite.JDBC" |
103 |
|
url="jdbc:sqlite:`echo $RPM_INSTALL_PREFIX/%{pkgrel}/dbs.db`"/> |
104 |
+ |
<SupportedSchemaVersion schemaversion="%{schemaVer}" /> |
105 |
+ |
<SupportedClientVersions clientversions="%{clientVer}" /> |
106 |
+ |
<DBSBlockConfig maxBlockSize="20000" maxBlockFiles="50" /> |
107 |
+ |
</Context> |
108 |
|
EOF |
109 |
|
cd $RPM_INSTALL_PREFIX/%{pkgrel}/Servers/JavaServer/ |
110 |
|
ant --noconfig jar |