1 |
< |
### RPM cms frontend 1.1 |
1 |
> |
### RPM cms frontend 2.91 |
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_90&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.90-cmp |
8 |
> |
Obsoletes: cms+frontend+2.3-cmp |
9 |
> |
Obsoletes: cms+frontend+2.2-cmp |
10 |
> |
Obsoletes: cms+frontend+2.1-cmp |
11 |
> |
Obsoletes: cms+frontend+2.0c-cmp |
12 |
> |
Obsoletes: cms+frontend+2.0b-cmp |
13 |
> |
Obsoletes: cms+frontend+2.0-cmp |
14 |
> |
Obsoletes: cms+frontend+1.4-cmp |
15 |
> |
Obsoletes: cms+frontend+1.3-cmp |
16 |
> |
Obsoletes: cms+frontend+1.2-cmp |
17 |
> |
Obsoletes: cms+frontend+1.1e-cmp |
18 |
> |
Obsoletes: cms+frontend+1.1d-cmp |
19 |
> |
Obsoletes: cms+frontend+1.1c-cmp |
20 |
> |
Obsoletes: cms+frontend+1.1b-cmp |
21 |
> |
Obsoletes: cms+frontend+1.1-cmp |
22 |
|
Obsoletes: cms+frontend+1.0-cmp11 |
23 |
|
Obsoletes: cms+frontend+1.0-cmp10 |
24 |
|
Obsoletes: cms+frontend+1.0-cmp9 |
41 |
|
rm -fr %instroot/htdocs/* |
42 |
|
rm -fr %instroot/apache2/*rewrites.d |
43 |
|
rm -f %instroot/apache2/apps.d/*frontend.conf |
44 |
+ |
rm -f %instroot/apache2/etc/startenv.d/01-mod_perl2.sh |
45 |
+ |
rm -f %instroot/apache2/*/CMSAuth.pm |
46 |
+ |
rm -f %instroot/apache2/*/update-cookie-key |
47 |
+ |
rm -f %instroot/apache2/*/update-and-sync-cookie-keys |
48 |
+ |
rm -f %instroot/apache2/*/update-ca-files |
49 |
|
|
50 |
|
mkdir -p %instroot/apache2/apps.d |
51 |
|
mkdir -p %instroot/apache2/rewrites.d |
52 |
|
mkdir -p %instroot/apache2/ssl_rewrites.d |
53 |
+ |
mkdir -p %instroot/apache2/var/cookie-keys |
54 |
|
mkdir -p %instroot/apache2/htdocs |
55 |
+ |
mkdir -p %instroot/apache2/auth |
56 |
|
|
57 |
|
# Replace template variables in configuration files with actual paths. |
58 |
< |
perl -p -i -e "s|\@SERVER_ROOT\@|%instroot|g;s|\@APACHE2_ROOT\@|$APACHE2_ROOT|g;" %_builddir/conf/*/*.conf |
58 |
> |
perl -p -i -e " |
59 |
> |
s|\@SERVER_ROOT\@|%instroot/apache2|g; |
60 |
> |
s|\@APACHE2_ROOT\@|$APACHE2_ROOT|g; |
61 |
> |
s|\@MOD_PERL2_ROOT\@|$MOD_PERL2_ROOT|g" \ |
62 |
> |
%_builddir/conf/*/*.conf |
63 |
|
|
64 |
|
# Copy files to the server setup directory. |
65 |
< |
cp -p %_builddir/conf/apps.d/*frontend.conf %instroot/apache2/apps.d |
66 |
< |
cp -p %_builddir/conf/rewrites.d/*.conf %instroot/apache2/rewrites.d |
67 |
< |
cp -p %_builddir/conf/ssl_rewrites.d/*.conf %instroot/apache2/ssl_rewrites.d |
68 |
< |
cp -rp %_builddir/htdocs/* %instroot/htdocs |
65 |
> |
cp -p $MOD_PERL2_ROOT/etc/profile.d/init.sh %instroot/apache2/etc/startenv.d/01-mod_perl2.sh |
66 |
> |
cp -p %_builddir/conf/CMSAuth.pm %instroot/apache2/conf/ |
67 |
> |
cp -p %_builddir/conf/cms-centres.txt %instroot/apache2/etc/ |
68 |
> |
cp -p %_builddir/conf/extra-certificates.txt %instroot/apache2/etc/ |
69 |
> |
cp -p %_builddir/conf/update-ca-files %instroot/apache2/etc/ |
70 |
> |
cp -p %_builddir/conf/update-cookie-key %instroot/apache2/etc/ |
71 |
> |
cp -p %_builddir/conf/update-and-sync-cookie-keys %instroot/apache2/etc/ |
72 |
> |
cp -p %_builddir/conf/apps.d/*frontend.conf %instroot/apache2/apps.d/ |
73 |
> |
cp -p %_builddir/conf/rewrites.d/*.conf %instroot/apache2/rewrites.d/ |
74 |
> |
cp -p %_builddir/conf/ssl_rewrites.d/*.conf %instroot/apache2/ssl_rewrites.d/ |
75 |
> |
cp -rp %_builddir/htdocs/* %instroot/apache2/htdocs/ |
76 |
|
|
77 |
|
%post |
78 |
|
# Relocate files. |
79 |
< |
perl -p -i -e "s|%instroot|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/apache2/*.d/*.conf |
79 |
> |
perl -p -i -e "s|%instroot|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/apache2/*.d/*.{conf,sh} |
80 |
|
|
81 |
|
# Deter attempts to modify installed files locally. |
82 |
< |
chmod a-w $RPM_INSTALL_PREFIX/apache2/*.d/*.conf |
82 |
> |
chmod a-w $RPM_INSTALL_PREFIX/apache2/*.d/*.{conf,sh} |
83 |
> |
chmod a-w $RPM_INSTALL_PREFIX/apache2/conf/CMSAuth.pm |
84 |
> |
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/update-ca-files |
85 |
> |
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/update-cookie-key |
86 |
> |
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/update-and-sync-cookie-keys |
87 |
|
|
88 |
|
%files |
89 |
+ |
%i/ |
90 |
+ |
%dir %instroot/apache2/var/cookie-keys |
91 |
|
%dir %instroot/apache2/rewrites.d |
92 |
|
%dir %instroot/apache2/ssl_rewrites.d |
93 |
< |
%attr(444,-,-) %instroot/apache2/apps.d/*frontend.conf |
94 |
< |
%attr(444,-,-) %instroot/apache2/rewrites.d/*.conf |
95 |
< |
%attr(444,-,-) %instroot/apache2/ssl_rewrites.d/*.conf |
93 |
> |
%dir %instroot/apache2/auth |
94 |
> |
%attr(444,-,-) %instroot/apache2/etc/startenv.d/01-mod_perl2.sh |
95 |
> |
%attr(555,-,-) %instroot/apache2/etc/update-ca-files |
96 |
> |
%attr(555,-,-) %instroot/apache2/etc/update-cookie-key |
97 |
> |
%attr(555,-,-) %instroot/apache2/etc/update-and-sync-cookie-keys |
98 |
> |
%config %instroot/apache2/etc/cms-centres.txt |
99 |
> |
%config %instroot/apache2/etc/extra-certificates.txt |
100 |
> |
%config %attr(444,-,-) %instroot/apache2/apps.d/*frontend.conf |
101 |
> |
%config %attr(444,-,-) %instroot/apache2/rewrites.d/*.conf |
102 |
> |
%config %attr(444,-,-) %instroot/apache2/ssl_rewrites.d/*.conf |
103 |
> |
%attr(444,-,-) %instroot/apache2/conf/CMSAuth.pm |
104 |
> |
%instroot/apache2/htdocs/* |