1 |
< |
### RPM cms frontend 1.1d |
1 |
> |
### RPM cms frontend 2.2 |
2 |
|
%define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&strategy=export&nocache=true |
3 |
< |
Source0: %cvsserver&module=COMP/WEBTOOLS/Configuration&export=conf&tag=-rFRONTEND_CONF_1_1&output=/config.tar.gz |
3 |
> |
Source0: %cvsserver&module=COMP/WEBTOOLS/Configuration&export=conf&tag=-rFRONTEND_CONF_2_2&output=/config.tar.gz |
4 |
|
Source1: %cvsserver&module=COMP/WEBTOOLS/WelcomePages&export=htdocs&tag=-rFRONTEND_HTDOCS_1_0&output=/htdocs.tar.gz |
5 |
< |
Requires: apache2-conf |
5 |
> |
Requires: apache2-conf mod_perl2 |
6 |
> |
Provides: perl(Compress::Zlib) perl(Digest::HMAC_SHA1) |
7 |
> |
Obsoletes: cms+frontend+2.1-cmp |
8 |
> |
Obsoletes: cms+frontend+2.0c-cmp |
9 |
> |
Obsoletes: cms+frontend+2.0b-cmp |
10 |
> |
Obsoletes: cms+frontend+2.0-cmp |
11 |
> |
Obsoletes: cms+frontend+1.3-cmp |
12 |
> |
Obsoletes: cms+frontend+1.2-cmp |
13 |
> |
Obsoletes: cms+frontend+1.1e-cmp |
14 |
> |
Obsoletes: cms+frontend+1.1d-cmp |
15 |
|
Obsoletes: cms+frontend+1.1c-cmp |
16 |
|
Obsoletes: cms+frontend+1.1b-cmp |
17 |
|
Obsoletes: cms+frontend+1.1-cmp |
37 |
|
rm -fr %instroot/htdocs/* |
38 |
|
rm -fr %instroot/apache2/*rewrites.d |
39 |
|
rm -f %instroot/apache2/apps.d/*frontend.conf |
40 |
+ |
rm -f %instroot/apache2/startenv.d/mod_perl2.sh |
41 |
+ |
rm -f %instroot/apache2/*/CMSAuth.pm |
42 |
+ |
rm -f %instroot/apache2/*/update-cookie-key |
43 |
|
|
44 |
|
mkdir -p %instroot/apache2/apps.d |
45 |
|
mkdir -p %instroot/apache2/rewrites.d |
46 |
|
mkdir -p %instroot/apache2/ssl_rewrites.d |
47 |
+ |
mkdir -p %instroot/apache2/var/cookie-keys |
48 |
|
mkdir -p %instroot/apache2/htdocs |
49 |
+ |
mkdir -p %instroot/apache2/auth |
50 |
+ |
mkdir -p %instroot/apache2/etc |
51 |
|
|
52 |
|
# Replace template variables in configuration files with actual paths. |
53 |
< |
perl -p -i -e "s|\@SERVER_ROOT\@|%instroot|g;s|\@APACHE2_ROOT\@|$APACHE2_ROOT|g;" %_builddir/conf/*/*.conf |
53 |
> |
perl -p -i -e " |
54 |
> |
s|\@SERVER_ROOT\@|%instroot/apache2|g; |
55 |
> |
s|\@APACHE2_ROOT\@|$APACHE2_ROOT|g; |
56 |
> |
s|\@MOD_PERL2_ROOT\@|$MOD_PERL2_ROOT|g" \ |
57 |
> |
%_builddir/conf/*/*.conf |
58 |
|
|
59 |
|
# Copy files to the server setup directory. |
60 |
+ |
cp -p $MOD_PERL2_ROOT/etc/profile.d/init.sh %instroot/apache2/startenv.d/mod_perl2.sh |
61 |
+ |
cp -p %_builddir/conf/CMSAuth.pm %instroot/apache2/conf/CMSAuth.pm |
62 |
+ |
cp -p %_builddir/conf/cms-centres.txt %instroot/apache2/etc/cms-centres.txt |
63 |
+ |
cp -p %_builddir/conf/update-cookie-key %instroot/apache2/etc/update-cookie-key |
64 |
|
cp -p %_builddir/conf/apps.d/*frontend.conf %instroot/apache2/apps.d |
65 |
|
cp -p %_builddir/conf/rewrites.d/*.conf %instroot/apache2/rewrites.d |
66 |
|
cp -p %_builddir/conf/ssl_rewrites.d/*.conf %instroot/apache2/ssl_rewrites.d |
68 |
|
|
69 |
|
%post |
70 |
|
# Relocate files. |
71 |
< |
perl -p -i -e "s|%instroot|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/apache2/*.d/*.conf |
71 |
> |
perl -p -i -e "s|%instroot|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/apache2/*.d/*.{conf,sh} |
72 |
|
|
73 |
|
# Deter attempts to modify installed files locally. |
74 |
< |
chmod a-w $RPM_INSTALL_PREFIX/apache2/*.d/*.conf |
74 |
> |
chmod a-w $RPM_INSTALL_PREFIX/apache2/*.d/*.{conf,sh} |
75 |
> |
chmod a-w $RPM_INSTALL_PREFIX/apache2/conf/CMSAuth.pm |
76 |
> |
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/update-cookie-key |
77 |
|
|
78 |
|
%files |
79 |
|
%i/ |
80 |
+ |
%dir %instroot/apache2/var/cookie-keys |
81 |
|
%dir %instroot/apache2/rewrites.d |
82 |
|
%dir %instroot/apache2/ssl_rewrites.d |
83 |
< |
%attr(444,-,-) %instroot/apache2/apps.d/*frontend.conf |
84 |
< |
%attr(444,-,-) %instroot/apache2/rewrites.d/*.conf |
85 |
< |
%attr(444,-,-) %instroot/apache2/ssl_rewrites.d/*.conf |
83 |
> |
%dir %instroot/apache2/auth |
84 |
> |
%dir %instroot/apache2/etc |
85 |
> |
%attr(444,-,-) %instroot/apache2/startenv.d/mod_perl2.sh |
86 |
> |
%attr(555,-,-) %instroot/apache2/etc/update-cookie-key |
87 |
> |
%config %instroot/apache2/etc/cms-centres.txt |
88 |
> |
%config %attr(444,-,-) %instroot/apache2/apps.d/*frontend.conf |
89 |
> |
%config %attr(444,-,-) %instroot/apache2/rewrites.d/*.conf |
90 |
> |
%config %attr(444,-,-) %instroot/apache2/ssl_rewrites.d/*.conf |
91 |
> |
%attr(444,-,-) %instroot/apache2/conf/CMSAuth.pm |
92 |
|
%instroot/apache2/htdocs/* |