1 |
lat |
1.24 |
### RPM cms frontend 3.1
|
2 |
lat |
1.5 |
%define cvsserver cvs://:pserver:anonymous@cmscvs.cern.ch:2401/cvs_server/repositories/CMSSW?passwd=AA_:yZZ3e&strategy=export&nocache=true
|
3 |
lat |
1.24 |
Source0: %cvsserver&module=COMP/WEBTOOLS/Configuration&export=conf&tag=-rFRONTEND_CONF_3_1&output=/config.tar.gz
|
4 |
lat |
1.6 |
Source1: %cvsserver&module=COMP/WEBTOOLS/WelcomePages&export=htdocs&tag=-rFRONTEND_HTDOCS_1_0&output=/htdocs.tar.gz
|
5 |
lat |
1.24 |
Requires: apache2-conf mod_perl2 p5-apache2-modssl
|
6 |
lat |
1.14 |
Provides: perl(Compress::Zlib) perl(Digest::HMAC_SHA1)
|
7 |
lat |
1.24 |
Obsoletes: cms+frontend+3.0-cmp
|
8 |
lat |
1.23 |
Obsoletes: cms+frontend+2.92-cmp
|
9 |
lat |
1.22 |
Obsoletes: cms+frontend+2.91b-cmp
|
10 |
lat |
1.21 |
Obsoletes: cms+frontend+2.91-cmp
|
11 |
lat |
1.20 |
Obsoletes: cms+frontend+2.90-cmp
|
12 |
lat |
1.19 |
Obsoletes: cms+frontend+2.3-cmp
|
13 |
lat |
1.18 |
Obsoletes: cms+frontend+2.2-cmp
|
14 |
lat |
1.17 |
Obsoletes: cms+frontend+2.1-cmp
|
15 |
lat |
1.16 |
Obsoletes: cms+frontend+2.0c-cmp
|
16 |
lat |
1.15 |
Obsoletes: cms+frontend+2.0b-cmp
|
17 |
|
|
Obsoletes: cms+frontend+2.0-cmp
|
18 |
lat |
1.18 |
Obsoletes: cms+frontend+1.4-cmp
|
19 |
lat |
1.12 |
Obsoletes: cms+frontend+1.3-cmp
|
20 |
|
|
Obsoletes: cms+frontend+1.2-cmp
|
21 |
lat |
1.11 |
Obsoletes: cms+frontend+1.1e-cmp
|
22 |
lat |
1.10 |
Obsoletes: cms+frontend+1.1d-cmp
|
23 |
lat |
1.9 |
Obsoletes: cms+frontend+1.1c-cmp
|
24 |
|
|
Obsoletes: cms+frontend+1.1b-cmp
|
25 |
|
|
Obsoletes: cms+frontend+1.1-cmp
|
26 |
lat |
1.6 |
Obsoletes: cms+frontend+1.0-cmp11
|
27 |
|
|
Obsoletes: cms+frontend+1.0-cmp10
|
28 |
|
|
Obsoletes: cms+frontend+1.0-cmp9
|
29 |
|
|
Obsoletes: cms+frontend+1.0-cmp8
|
30 |
|
|
Obsoletes: cms+frontend+1.0-cmp7
|
31 |
|
|
Obsoletes: cms+frontend+1.0-cmp6
|
32 |
|
|
Obsoletes: cms+frontend+1.0-cmp5
|
33 |
|
|
Obsoletes: cms+frontend+1.0-cmp4
|
34 |
|
|
Obsoletes: cms+frontend+1.0-cmp3
|
35 |
|
|
Obsoletes: cms+frontend+1.0-cmp2
|
36 |
|
|
Obsoletes: cms+frontend+1.0-cmp
|
37 |
eulisse |
1.1 |
|
38 |
|
|
%prep
|
39 |
lat |
1.5 |
%setup -T -b 0 -n conf
|
40 |
|
|
%setup -D -T -b 1 -n htdocs
|
41 |
|
|
|
42 |
eulisse |
1.1 |
%build
|
43 |
|
|
%install
|
44 |
lat |
1.6 |
# Make directory for various resources of this package.
|
45 |
|
|
rm -fr %instroot/htdocs/*
|
46 |
|
|
rm -fr %instroot/apache2/*rewrites.d
|
47 |
|
|
rm -f %instroot/apache2/apps.d/*frontend.conf
|
48 |
lat |
1.19 |
rm -f %instroot/apache2/etc/startenv.d/01-mod_perl2.sh
|
49 |
lat |
1.25 |
rm -f %instroot/apache2/etc/startenv.d/02-p5-apache2-modssl.sh
|
50 |
lat |
1.24 |
rm -f %instroot/apache2/conf/testme
|
51 |
lat |
1.12 |
rm -f %instroot/apache2/*/CMSAuth.pm
|
52 |
lat |
1.13 |
rm -f %instroot/apache2/*/update-cookie-key
|
53 |
lat |
1.19 |
rm -f %instroot/apache2/*/update-and-sync-cookie-keys
|
54 |
|
|
rm -f %instroot/apache2/*/update-ca-files
|
55 |
lat |
1.6 |
|
56 |
|
|
mkdir -p %instroot/apache2/apps.d
|
57 |
|
|
mkdir -p %instroot/apache2/rewrites.d
|
58 |
|
|
mkdir -p %instroot/apache2/ssl_rewrites.d
|
59 |
lat |
1.12 |
mkdir -p %instroot/apache2/var/cookie-keys
|
60 |
lat |
1.6 |
mkdir -p %instroot/apache2/htdocs
|
61 |
lat |
1.12 |
mkdir -p %instroot/apache2/auth
|
62 |
lat |
1.6 |
|
63 |
|
|
# Replace template variables in configuration files with actual paths.
|
64 |
lat |
1.12 |
perl -p -i -e "
|
65 |
|
|
s|\@SERVER_ROOT\@|%instroot/apache2|g;
|
66 |
|
|
s|\@APACHE2_ROOT\@|$APACHE2_ROOT|g;
|
67 |
|
|
s|\@MOD_PERL2_ROOT\@|$MOD_PERL2_ROOT|g" \
|
68 |
|
|
%_builddir/conf/*/*.conf
|
69 |
lat |
1.6 |
|
70 |
|
|
# Copy files to the server setup directory.
|
71 |
lat |
1.19 |
cp -p $MOD_PERL2_ROOT/etc/profile.d/init.sh %instroot/apache2/etc/startenv.d/01-mod_perl2.sh
|
72 |
lat |
1.25 |
cp -p $P5_APACHE2_MODSSL_ROOT/etc/profile.d/init.sh %instroot/apache2/etc/startenv.d/02-p5-apache2-modssl.sh
|
73 |
lat |
1.24 |
cp -p %_builddir/conf/testme %instroot/apache2/conf/
|
74 |
lat |
1.19 |
cp -p %_builddir/conf/CMSAuth.pm %instroot/apache2/conf/
|
75 |
|
|
cp -p %_builddir/conf/cms-centres.txt %instroot/apache2/etc/
|
76 |
|
|
cp -p %_builddir/conf/extra-certificates.txt %instroot/apache2/etc/
|
77 |
|
|
cp -p %_builddir/conf/update-ca-files %instroot/apache2/etc/
|
78 |
|
|
cp -p %_builddir/conf/update-cookie-key %instroot/apache2/etc/
|
79 |
|
|
cp -p %_builddir/conf/update-and-sync-cookie-keys %instroot/apache2/etc/
|
80 |
|
|
cp -p %_builddir/conf/apps.d/*frontend.conf %instroot/apache2/apps.d/
|
81 |
|
|
cp -p %_builddir/conf/rewrites.d/*.conf %instroot/apache2/rewrites.d/
|
82 |
|
|
cp -p %_builddir/conf/ssl_rewrites.d/*.conf %instroot/apache2/ssl_rewrites.d/
|
83 |
|
|
cp -rp %_builddir/htdocs/* %instroot/apache2/htdocs/
|
84 |
lat |
1.6 |
|
85 |
|
|
%post
|
86 |
|
|
# Relocate files.
|
87 |
lat |
1.21 |
perl -p -i -e "s|%instroot|$RPM_INSTALL_PREFIX|g" \
|
88 |
|
|
$RPM_INSTALL_PREFIX/apache2/*.d/*.conf \
|
89 |
|
|
$RPM_INSTALL_PREFIX/apache2/etc/*.d/*.sh
|
90 |
lat |
1.6 |
|
91 |
|
|
# Deter attempts to modify installed files locally.
|
92 |
lat |
1.21 |
chmod a-w $RPM_INSTALL_PREFIX/apache2/*.d/*.conf
|
93 |
|
|
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/*.d/*.sh
|
94 |
lat |
1.24 |
chmod a-w $RPM_INSTALL_PREFIX/apache2/conf/testme
|
95 |
lat |
1.23 |
chmod a-wx $RPM_INSTALL_PREFIX/apache2/conf/CMSAuth.pm
|
96 |
lat |
1.19 |
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/update-ca-files
|
97 |
lat |
1.13 |
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/update-cookie-key
|
98 |
lat |
1.19 |
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/update-and-sync-cookie-keys
|
99 |
lat |
1.6 |
|
100 |
|
|
%files
|
101 |
lat |
1.7 |
%i/
|
102 |
lat |
1.12 |
%dir %instroot/apache2/var/cookie-keys
|
103 |
lat |
1.6 |
%dir %instroot/apache2/rewrites.d
|
104 |
|
|
%dir %instroot/apache2/ssl_rewrites.d
|
105 |
lat |
1.12 |
%dir %instroot/apache2/auth
|
106 |
lat |
1.19 |
%attr(444,-,-) %instroot/apache2/etc/startenv.d/01-mod_perl2.sh
|
107 |
lat |
1.25 |
%attr(444,-,-) %instroot/apache2/etc/startenv.d/02-p5-apache2-modssl.sh
|
108 |
lat |
1.19 |
%attr(555,-,-) %instroot/apache2/etc/update-ca-files
|
109 |
lat |
1.13 |
%attr(555,-,-) %instroot/apache2/etc/update-cookie-key
|
110 |
lat |
1.19 |
%attr(555,-,-) %instroot/apache2/etc/update-and-sync-cookie-keys
|
111 |
lat |
1.12 |
%config %instroot/apache2/etc/cms-centres.txt
|
112 |
lat |
1.19 |
%config %instroot/apache2/etc/extra-certificates.txt
|
113 |
lat |
1.12 |
%config %attr(444,-,-) %instroot/apache2/apps.d/*frontend.conf
|
114 |
|
|
%config %attr(444,-,-) %instroot/apache2/rewrites.d/*.conf
|
115 |
|
|
%config %attr(444,-,-) %instroot/apache2/ssl_rewrites.d/*.conf
|
116 |
lat |
1.24 |
%config %attr(555,-,-) %instroot/apache2/conf/testme
|
117 |
lat |
1.12 |
%attr(444,-,-) %instroot/apache2/conf/CMSAuth.pm
|
118 |
lat |
1.8 |
%instroot/apache2/htdocs/*
|