1 |
lat |
1.41 |
### RPM cms frontend 3.12e
|
2 |
lat |
1.5 |
%define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&strategy=export&nocache=true
|
3 |
lat |
1.37 |
Source0: %cvsserver&module=COMP/WEBTOOLS/Configuration&export=conf&tag=-rFRONTEND_CONF_3_10&output=/config.tar.gz
|
4 |
lat |
1.31 |
Source1: %cvsserver&module=COMP/WEBTOOLS/WelcomePages&export=htdocs&tag=-rFRONTEND_HTDOCS_1_2&output=/htdocs.tar.gz
|
5 |
lat |
1.24 |
Requires: apache2-conf mod_perl2 p5-apache2-modssl
|
6 |
lat |
1.14 |
Provides: perl(Compress::Zlib) perl(Digest::HMAC_SHA1)
|
7 |
lat |
1.41 |
Obsoletes: cms+frontend+3.12d-cmp
|
8 |
lat |
1.40 |
Obsoletes: cms+frontend+3.12c-cmp
|
9 |
lat |
1.39 |
Obsoletes: cms+frontend+3.12b-cmp
|
10 |
lat |
1.38 |
Obsoletes: cms+frontend+3.12-cmp
|
11 |
lat |
1.37 |
Obsoletes: cms+frontend+3.11-cmp
|
12 |
egeland |
1.36 |
Obsoletes: cms+frontend+3.10-cmp2
|
13 |
|
|
Obsoletes: cms+frontend+3.10-cmp
|
14 |
|
|
Obsoletes: cms+frontend+3.9-cmp
|
15 |
eulisse |
1.1 |
|
16 |
|
|
%prep
|
17 |
lat |
1.5 |
%setup -T -b 0 -n conf
|
18 |
|
|
%setup -D -T -b 1 -n htdocs
|
19 |
|
|
|
20 |
eulisse |
1.1 |
%build
|
21 |
|
|
%install
|
22 |
lat |
1.6 |
# Make directory for various resources of this package.
|
23 |
|
|
rm -fr %instroot/htdocs/*
|
24 |
|
|
rm -fr %instroot/apache2/*rewrites.d
|
25 |
|
|
rm -f %instroot/apache2/apps.d/*frontend.conf
|
26 |
lat |
1.19 |
rm -f %instroot/apache2/etc/startenv.d/01-mod_perl2.sh
|
27 |
lat |
1.25 |
rm -f %instroot/apache2/etc/startenv.d/02-p5-apache2-modssl.sh
|
28 |
lat |
1.24 |
rm -f %instroot/apache2/conf/testme
|
29 |
lat |
1.12 |
rm -f %instroot/apache2/*/CMSAuth.pm
|
30 |
lat |
1.13 |
rm -f %instroot/apache2/*/update-cookie-key
|
31 |
lat |
1.19 |
rm -f %instroot/apache2/*/update-and-sync-cookie-keys
|
32 |
|
|
rm -f %instroot/apache2/*/update-ca-files
|
33 |
lat |
1.27 |
rm -f %instroot/apache2/*/mkgridmap.conf
|
34 |
|
|
rm -f %instroot/apache2/*/voms-gridmap.txt
|
35 |
lat |
1.6 |
|
36 |
|
|
mkdir -p %instroot/apache2/apps.d
|
37 |
|
|
mkdir -p %instroot/apache2/rewrites.d
|
38 |
|
|
mkdir -p %instroot/apache2/ssl_rewrites.d
|
39 |
lat |
1.12 |
mkdir -p %instroot/apache2/var/cookie-keys
|
40 |
lat |
1.6 |
mkdir -p %instroot/apache2/htdocs
|
41 |
lat |
1.12 |
mkdir -p %instroot/apache2/auth
|
42 |
lat |
1.6 |
|
43 |
|
|
# Replace template variables in configuration files with actual paths.
|
44 |
lat |
1.12 |
perl -p -i -e "
|
45 |
|
|
s|\@SERVER_ROOT\@|%instroot/apache2|g;
|
46 |
|
|
s|\@APACHE2_ROOT\@|$APACHE2_ROOT|g;
|
47 |
|
|
s|\@MOD_PERL2_ROOT\@|$MOD_PERL2_ROOT|g" \
|
48 |
|
|
%_builddir/conf/*/*.conf
|
49 |
lat |
1.6 |
|
50 |
|
|
# Copy files to the server setup directory.
|
51 |
lat |
1.19 |
cp -p $MOD_PERL2_ROOT/etc/profile.d/init.sh %instroot/apache2/etc/startenv.d/01-mod_perl2.sh
|
52 |
lat |
1.25 |
cp -p $P5_APACHE2_MODSSL_ROOT/etc/profile.d/init.sh %instroot/apache2/etc/startenv.d/02-p5-apache2-modssl.sh
|
53 |
lat |
1.24 |
cp -p %_builddir/conf/testme %instroot/apache2/conf/
|
54 |
lat |
1.19 |
cp -p %_builddir/conf/CMSAuth.pm %instroot/apache2/conf/
|
55 |
|
|
cp -p %_builddir/conf/cms-centres.txt %instroot/apache2/etc/
|
56 |
|
|
cp -p %_builddir/conf/extra-certificates.txt %instroot/apache2/etc/
|
57 |
lat |
1.27 |
cp -p %_builddir/conf/mkgridmap.conf %instroot/apache2/etc/
|
58 |
lat |
1.19 |
cp -p %_builddir/conf/update-ca-files %instroot/apache2/etc/
|
59 |
|
|
cp -p %_builddir/conf/update-cookie-key %instroot/apache2/etc/
|
60 |
|
|
cp -p %_builddir/conf/update-and-sync-cookie-keys %instroot/apache2/etc/
|
61 |
|
|
cp -p %_builddir/conf/apps.d/*frontend.conf %instroot/apache2/apps.d/
|
62 |
|
|
cp -p %_builddir/conf/rewrites.d/*.conf %instroot/apache2/rewrites.d/
|
63 |
|
|
cp -p %_builddir/conf/ssl_rewrites.d/*.conf %instroot/apache2/ssl_rewrites.d/
|
64 |
|
|
cp -rp %_builddir/htdocs/* %instroot/apache2/htdocs/
|
65 |
lat |
1.6 |
|
66 |
lat |
1.27 |
touch %instroot/apache2/etc/voms-gridmap.txt
|
67 |
|
|
|
68 |
lat |
1.6 |
%post
|
69 |
|
|
# Relocate files.
|
70 |
lat |
1.21 |
perl -p -i -e "s|%instroot|$RPM_INSTALL_PREFIX|g" \
|
71 |
|
|
$RPM_INSTALL_PREFIX/apache2/*.d/*.conf \
|
72 |
|
|
$RPM_INSTALL_PREFIX/apache2/etc/*.d/*.sh
|
73 |
lat |
1.6 |
|
74 |
|
|
# Deter attempts to modify installed files locally.
|
75 |
lat |
1.21 |
chmod a-w $RPM_INSTALL_PREFIX/apache2/*.d/*.conf
|
76 |
|
|
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/*.d/*.sh
|
77 |
lat |
1.24 |
chmod a-w $RPM_INSTALL_PREFIX/apache2/conf/testme
|
78 |
lat |
1.23 |
chmod a-wx $RPM_INSTALL_PREFIX/apache2/conf/CMSAuth.pm
|
79 |
lat |
1.19 |
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/update-ca-files
|
80 |
lat |
1.13 |
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/update-cookie-key
|
81 |
lat |
1.19 |
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/update-and-sync-cookie-keys
|
82 |
lat |
1.6 |
|
83 |
|
|
%files
|
84 |
lat |
1.7 |
%i/
|
85 |
lat |
1.12 |
%dir %instroot/apache2/var/cookie-keys
|
86 |
lat |
1.6 |
%dir %instroot/apache2/rewrites.d
|
87 |
|
|
%dir %instroot/apache2/ssl_rewrites.d
|
88 |
lat |
1.12 |
%dir %instroot/apache2/auth
|
89 |
lat |
1.19 |
%attr(444,-,-) %instroot/apache2/etc/startenv.d/01-mod_perl2.sh
|
90 |
lat |
1.25 |
%attr(444,-,-) %instroot/apache2/etc/startenv.d/02-p5-apache2-modssl.sh
|
91 |
lat |
1.19 |
%attr(555,-,-) %instroot/apache2/etc/update-ca-files
|
92 |
lat |
1.13 |
%attr(555,-,-) %instroot/apache2/etc/update-cookie-key
|
93 |
lat |
1.19 |
%attr(555,-,-) %instroot/apache2/etc/update-and-sync-cookie-keys
|
94 |
lat |
1.12 |
%config %instroot/apache2/etc/cms-centres.txt
|
95 |
lat |
1.19 |
%config %instroot/apache2/etc/extra-certificates.txt
|
96 |
lat |
1.27 |
%config %instroot/apache2/etc/voms-gridmap.txt
|
97 |
|
|
%config %attr(444,-,-) %instroot/apache2/etc/mkgridmap.conf
|
98 |
lat |
1.12 |
%config %attr(444,-,-) %instroot/apache2/apps.d/*frontend.conf
|
99 |
|
|
%config %attr(444,-,-) %instroot/apache2/rewrites.d/*.conf
|
100 |
|
|
%config %attr(444,-,-) %instroot/apache2/ssl_rewrites.d/*.conf
|
101 |
lat |
1.24 |
%config %attr(555,-,-) %instroot/apache2/conf/testme
|
102 |
lat |
1.12 |
%attr(444,-,-) %instroot/apache2/conf/CMSAuth.pm
|
103 |
lat |
1.8 |
%instroot/apache2/htdocs/*
|