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