1 |
< |
### RPM cms frontend 1.0 |
2 |
< |
|
3 |
< |
# Dummy package to get apache-conf installed. |
1 |
> |
### RPM cms frontend 2.92 |
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=-rSERVER_CONF_1_12&output=/config.tar.gz |
4 |
< |
Source1: %cvsserver&module=COMP/WEBTOOLS/WelcomePages&export=htdocs&tag=-rSERVER_CONF_1_12&output=/htdocs.tar.gz |
5 |
< |
Requires: apache2-conf |
3 |
> |
Source0: %cvsserver&module=COMP/WEBTOOLS/Configuration&export=conf&tag=-rFRONTEND_CONF_2_92&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.91b-cmp |
8 |
> |
Obsoletes: cms+frontend+2.91-cmp |
9 |
> |
Obsoletes: cms+frontend+2.90-cmp |
10 |
> |
Obsoletes: cms+frontend+2.3-cmp |
11 |
> |
Obsoletes: cms+frontend+2.2-cmp |
12 |
> |
Obsoletes: cms+frontend+2.1-cmp |
13 |
> |
Obsoletes: cms+frontend+2.0c-cmp |
14 |
> |
Obsoletes: cms+frontend+2.0b-cmp |
15 |
> |
Obsoletes: cms+frontend+2.0-cmp |
16 |
> |
Obsoletes: cms+frontend+1.4-cmp |
17 |
> |
Obsoletes: cms+frontend+1.3-cmp |
18 |
> |
Obsoletes: cms+frontend+1.2-cmp |
19 |
> |
Obsoletes: cms+frontend+1.1e-cmp |
20 |
> |
Obsoletes: cms+frontend+1.1d-cmp |
21 |
> |
Obsoletes: cms+frontend+1.1c-cmp |
22 |
> |
Obsoletes: cms+frontend+1.1b-cmp |
23 |
> |
Obsoletes: cms+frontend+1.1-cmp |
24 |
> |
Obsoletes: cms+frontend+1.0-cmp11 |
25 |
> |
Obsoletes: cms+frontend+1.0-cmp10 |
26 |
> |
Obsoletes: cms+frontend+1.0-cmp9 |
27 |
> |
Obsoletes: cms+frontend+1.0-cmp8 |
28 |
> |
Obsoletes: cms+frontend+1.0-cmp7 |
29 |
> |
Obsoletes: cms+frontend+1.0-cmp6 |
30 |
> |
Obsoletes: cms+frontend+1.0-cmp5 |
31 |
> |
Obsoletes: cms+frontend+1.0-cmp4 |
32 |
> |
Obsoletes: cms+frontend+1.0-cmp3 |
33 |
> |
Obsoletes: cms+frontend+1.0-cmp2 |
34 |
> |
Obsoletes: cms+frontend+1.0-cmp |
35 |
|
|
36 |
|
%prep |
37 |
|
%setup -T -b 0 -n conf |
39 |
|
|
40 |
|
%build |
41 |
|
%install |
42 |
+ |
# Make directory for various resources of this package. |
43 |
+ |
rm -fr %instroot/htdocs/* |
44 |
+ |
rm -fr %instroot/apache2/*rewrites.d |
45 |
+ |
rm -f %instroot/apache2/apps.d/*frontend.conf |
46 |
+ |
rm -f %instroot/apache2/etc/startenv.d/01-mod_perl2.sh |
47 |
+ |
rm -f %instroot/apache2/*/CMSAuth.pm |
48 |
+ |
rm -f %instroot/apache2/*/update-cookie-key |
49 |
+ |
rm -f %instroot/apache2/*/update-and-sync-cookie-keys |
50 |
+ |
rm -f %instroot/apache2/*/update-ca-files |
51 |
+ |
|
52 |
+ |
mkdir -p %instroot/apache2/apps.d |
53 |
+ |
mkdir -p %instroot/apache2/rewrites.d |
54 |
+ |
mkdir -p %instroot/apache2/ssl_rewrites.d |
55 |
+ |
mkdir -p %instroot/apache2/var/cookie-keys |
56 |
+ |
mkdir -p %instroot/apache2/htdocs |
57 |
+ |
mkdir -p %instroot/apache2/auth |
58 |
+ |
|
59 |
+ |
# Replace template variables in configuration files with actual paths. |
60 |
+ |
perl -p -i -e " |
61 |
+ |
s|\@SERVER_ROOT\@|%instroot/apache2|g; |
62 |
+ |
s|\@APACHE2_ROOT\@|$APACHE2_ROOT|g; |
63 |
+ |
s|\@MOD_PERL2_ROOT\@|$MOD_PERL2_ROOT|g" \ |
64 |
+ |
%_builddir/conf/*/*.conf |
65 |
+ |
|
66 |
+ |
# Copy files to the server setup directory. |
67 |
+ |
cp -p $MOD_PERL2_ROOT/etc/profile.d/init.sh %instroot/apache2/etc/startenv.d/01-mod_perl2.sh |
68 |
+ |
cp -p %_builddir/conf/CMSAuth.pm %instroot/apache2/conf/ |
69 |
+ |
cp -p %_builddir/conf/cms-centres.txt %instroot/apache2/etc/ |
70 |
+ |
cp -p %_builddir/conf/extra-certificates.txt %instroot/apache2/etc/ |
71 |
+ |
cp -p %_builddir/conf/update-ca-files %instroot/apache2/etc/ |
72 |
+ |
cp -p %_builddir/conf/update-cookie-key %instroot/apache2/etc/ |
73 |
+ |
cp -p %_builddir/conf/update-and-sync-cookie-keys %instroot/apache2/etc/ |
74 |
+ |
cp -p %_builddir/conf/apps.d/*frontend.conf %instroot/apache2/apps.d/ |
75 |
+ |
cp -p %_builddir/conf/rewrites.d/*.conf %instroot/apache2/rewrites.d/ |
76 |
+ |
cp -p %_builddir/conf/ssl_rewrites.d/*.conf %instroot/apache2/ssl_rewrites.d/ |
77 |
+ |
cp -rp %_builddir/htdocs/* %instroot/apache2/htdocs/ |
78 |
+ |
|
79 |
+ |
%post |
80 |
+ |
# Relocate files. |
81 |
+ |
perl -p -i -e "s|%instroot|$RPM_INSTALL_PREFIX|g" \ |
82 |
+ |
$RPM_INSTALL_PREFIX/apache2/*.d/*.conf \ |
83 |
+ |
$RPM_INSTALL_PREFIX/apache2/etc/*.d/*.sh |
84 |
+ |
|
85 |
+ |
# Deter attempts to modify installed files locally. |
86 |
+ |
chmod a-w $RPM_INSTALL_PREFIX/apache2/*.d/*.conf |
87 |
+ |
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/*.d/*.sh |
88 |
+ |
chmod a-w $RPM_INSTALL_PREFIX/apache2/conf/CMSAuth.pm |
89 |
+ |
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/update-ca-files |
90 |
+ |
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/update-cookie-key |
91 |
+ |
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/update-and-sync-cookie-keys |
92 |
+ |
|
93 |
+ |
%files |
94 |
+ |
%i/ |
95 |
+ |
%dir %instroot/apache2/var/cookie-keys |
96 |
+ |
%dir %instroot/apache2/rewrites.d |
97 |
+ |
%dir %instroot/apache2/ssl_rewrites.d |
98 |
+ |
%dir %instroot/apache2/auth |
99 |
+ |
%attr(444,-,-) %instroot/apache2/etc/startenv.d/01-mod_perl2.sh |
100 |
+ |
%attr(555,-,-) %instroot/apache2/etc/update-ca-files |
101 |
+ |
%attr(555,-,-) %instroot/apache2/etc/update-cookie-key |
102 |
+ |
%attr(555,-,-) %instroot/apache2/etc/update-and-sync-cookie-keys |
103 |
+ |
%config %instroot/apache2/etc/cms-centres.txt |
104 |
+ |
%config %instroot/apache2/etc/extra-certificates.txt |
105 |
+ |
%config %attr(444,-,-) %instroot/apache2/apps.d/*frontend.conf |
106 |
+ |
%config %attr(444,-,-) %instroot/apache2/rewrites.d/*.conf |
107 |
+ |
%config %attr(444,-,-) %instroot/apache2/ssl_rewrites.d/*.conf |
108 |
+ |
%attr(444,-,-) %instroot/apache2/conf/CMSAuth.pm |
109 |
+ |
%instroot/apache2/htdocs/* |