1 |
lat |
1.16 |
### RPM cms frontend 2.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.12 |
Source0: %cvsserver&module=COMP/WEBTOOLS/Configuration&export=conf&tag=-rFRONTEND_CONF_2_0&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.12 |
Requires: apache2-conf mod_perl2
|
6 |
lat |
1.14 |
Provides: perl(Compress::Zlib) perl(Digest::HMAC_SHA1)
|
7 |
lat |
1.16 |
Obsoletes: cms+frontend+2.0c-cmp
|
8 |
lat |
1.15 |
Obsoletes: cms+frontend+2.0b-cmp
|
9 |
|
|
Obsoletes: cms+frontend+2.0-cmp
|
10 |
lat |
1.12 |
Obsoletes: cms+frontend+1.3-cmp
|
11 |
|
|
Obsoletes: cms+frontend+1.2-cmp
|
12 |
lat |
1.11 |
Obsoletes: cms+frontend+1.1e-cmp
|
13 |
lat |
1.10 |
Obsoletes: cms+frontend+1.1d-cmp
|
14 |
lat |
1.9 |
Obsoletes: cms+frontend+1.1c-cmp
|
15 |
|
|
Obsoletes: cms+frontend+1.1b-cmp
|
16 |
|
|
Obsoletes: cms+frontend+1.1-cmp
|
17 |
lat |
1.6 |
Obsoletes: cms+frontend+1.0-cmp11
|
18 |
|
|
Obsoletes: cms+frontend+1.0-cmp10
|
19 |
|
|
Obsoletes: cms+frontend+1.0-cmp9
|
20 |
|
|
Obsoletes: cms+frontend+1.0-cmp8
|
21 |
|
|
Obsoletes: cms+frontend+1.0-cmp7
|
22 |
|
|
Obsoletes: cms+frontend+1.0-cmp6
|
23 |
|
|
Obsoletes: cms+frontend+1.0-cmp5
|
24 |
|
|
Obsoletes: cms+frontend+1.0-cmp4
|
25 |
|
|
Obsoletes: cms+frontend+1.0-cmp3
|
26 |
|
|
Obsoletes: cms+frontend+1.0-cmp2
|
27 |
|
|
Obsoletes: cms+frontend+1.0-cmp
|
28 |
eulisse |
1.1 |
|
29 |
|
|
%prep
|
30 |
lat |
1.5 |
%setup -T -b 0 -n conf
|
31 |
|
|
%setup -D -T -b 1 -n htdocs
|
32 |
|
|
|
33 |
eulisse |
1.1 |
%build
|
34 |
|
|
%install
|
35 |
lat |
1.6 |
# Make directory for various resources of this package.
|
36 |
|
|
rm -fr %instroot/htdocs/*
|
37 |
|
|
rm -fr %instroot/apache2/*rewrites.d
|
38 |
|
|
rm -f %instroot/apache2/apps.d/*frontend.conf
|
39 |
lat |
1.15 |
rm -f %instroot/apache2/startenv.d/mod_perl2.sh
|
40 |
lat |
1.12 |
rm -f %instroot/apache2/*/CMSAuth.pm
|
41 |
lat |
1.13 |
rm -f %instroot/apache2/*/update-cookie-key
|
42 |
lat |
1.6 |
|
43 |
|
|
mkdir -p %instroot/apache2/apps.d
|
44 |
|
|
mkdir -p %instroot/apache2/rewrites.d
|
45 |
|
|
mkdir -p %instroot/apache2/ssl_rewrites.d
|
46 |
lat |
1.12 |
mkdir -p %instroot/apache2/var/cookie-keys
|
47 |
lat |
1.6 |
mkdir -p %instroot/apache2/htdocs
|
48 |
lat |
1.12 |
mkdir -p %instroot/apache2/auth
|
49 |
|
|
mkdir -p %instroot/apache2/etc
|
50 |
lat |
1.6 |
|
51 |
|
|
# Replace template variables in configuration files with actual paths.
|
52 |
lat |
1.12 |
perl -p -i -e "
|
53 |
|
|
s|\@SERVER_ROOT\@|%instroot/apache2|g;
|
54 |
|
|
s|\@APACHE2_ROOT\@|$APACHE2_ROOT|g;
|
55 |
|
|
s|\@MOD_PERL2_ROOT\@|$MOD_PERL2_ROOT|g" \
|
56 |
|
|
%_builddir/conf/*/*.conf
|
57 |
lat |
1.6 |
|
58 |
|
|
# Copy files to the server setup directory.
|
59 |
lat |
1.15 |
cp -p $MOD_PERL2_ROOT/etc/profile.d/init.sh %instroot/apache2/startenv.d/mod_perl2.sh
|
60 |
lat |
1.12 |
cp -p %_builddir/conf/CMSAuth.pm %instroot/apache2/conf/CMSAuth.pm
|
61 |
|
|
cp -p %_builddir/conf/cms-centres.txt %instroot/apache2/etc/cms-centres.txt
|
62 |
lat |
1.13 |
cp -p %_builddir/conf/update-cookie-key %instroot/apache2/etc/update-cookie-key
|
63 |
lat |
1.6 |
cp -p %_builddir/conf/apps.d/*frontend.conf %instroot/apache2/apps.d
|
64 |
|
|
cp -p %_builddir/conf/rewrites.d/*.conf %instroot/apache2/rewrites.d
|
65 |
|
|
cp -p %_builddir/conf/ssl_rewrites.d/*.conf %instroot/apache2/ssl_rewrites.d
|
66 |
lat |
1.7 |
cp -rp %_builddir/htdocs/* %instroot/apache2/htdocs
|
67 |
lat |
1.6 |
|
68 |
|
|
%post
|
69 |
|
|
# Relocate files.
|
70 |
lat |
1.15 |
perl -p -i -e "s|%instroot|$RPM_INSTALL_PREFIX|g" $RPM_INSTALL_PREFIX/apache2/*.d/*.{conf,sh}
|
71 |
lat |
1.6 |
|
72 |
|
|
# Deter attempts to modify installed files locally.
|
73 |
lat |
1.15 |
chmod a-w $RPM_INSTALL_PREFIX/apache2/*.d/*.{conf,sh}
|
74 |
lat |
1.12 |
chmod a-w $RPM_INSTALL_PREFIX/apache2/conf/CMSAuth.pm
|
75 |
lat |
1.13 |
chmod a-w $RPM_INSTALL_PREFIX/apache2/etc/update-cookie-key
|
76 |
lat |
1.6 |
|
77 |
|
|
%files
|
78 |
lat |
1.7 |
%i/
|
79 |
lat |
1.12 |
%dir %instroot/apache2/var/cookie-keys
|
80 |
lat |
1.6 |
%dir %instroot/apache2/rewrites.d
|
81 |
|
|
%dir %instroot/apache2/ssl_rewrites.d
|
82 |
lat |
1.12 |
%dir %instroot/apache2/auth
|
83 |
|
|
%dir %instroot/apache2/etc
|
84 |
lat |
1.15 |
%attr(444,-,-) %instroot/apache2/startenv.d/mod_perl2.sh
|
85 |
lat |
1.13 |
%attr(555,-,-) %instroot/apache2/etc/update-cookie-key
|
86 |
lat |
1.12 |
%config %instroot/apache2/etc/cms-centres.txt
|
87 |
|
|
%config %attr(444,-,-) %instroot/apache2/apps.d/*frontend.conf
|
88 |
|
|
%config %attr(444,-,-) %instroot/apache2/rewrites.d/*.conf
|
89 |
|
|
%config %attr(444,-,-) %instroot/apache2/ssl_rewrites.d/*.conf
|
90 |
|
|
%attr(444,-,-) %instroot/apache2/conf/CMSAuth.pm
|
91 |
lat |
1.8 |
%instroot/apache2/htdocs/*
|