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