import repository from arizona
[raven.git] / rpm_builds / SPECS / stork-mp-repository.spec.template
1 Summary: stork package repository (mod-python based)
2 Name: stork-mp-repository
3 Version: @VER@
4 Release: @REL@
5 License: Public Domain
6 Group: stork at U of Arizona
7 URL: http://www.cs.arizona.edu/
8 Source RPM: ftp://quadrus.cs.arizona.edu/PlanetLab/V3/stork-mp-repository-@VER@.tar.gz
9 Vendor: University of Arizona
10 BuildRoot: %{_tmppath}/%{name}-root
11 requires: arizona-lib, ravenlib >= 2.2.18, httpd
12 # python-dateutil xmlsec1
13
14 %description
15 This rpm provides the basic setup of a stork package repository. It requires both Apache to run. For questions, please email jplichta@cs.arizona.edu
16 %prep
17 %setup -q
18
19 %build
20
21 %install
22 rm -rf %\{buildroot]
23 install -d -o 0 -g 0 %{buildroot}/usr
24 install -d -o 0 -g 0 %{buildroot}/usr/local
25 install -d -o 0 -g 0 %{buildroot}/usr/local/mprepo/bin
26 install -d -o 0 -g 0 %{buildroot}/usr/local/mprepo/bin/package
27 install -d -o 0 -g 0 %{buildroot}/usr/local/mprepo/bin/sfa
28 install -d -o 0 -g 0 %{buildroot}/usr/local/mprepo/bin/sfa/trust
29 install -d -o 0 -g 0 %{buildroot}/usr/local/mprepo/bin/sfa/util
30 install -d -o 0 -g 0 %{buildroot}/usr/local/mprepo/etc
31 install -d -o 0 -g 0 %{buildroot}/usr/local/mprepo/scripts
32 install -d -o 0 -g 0 %{buildroot}/usr/local/mprepo/tmp
33 install -d -o 0 -g 0 %{buildroot}/usr/local/mprepo/var
34 install -d -o 0 -g 0 %{buildroot}/usr/local/mprepo/var/keys
35 install -d -o 0 -g 0 %{buildroot}/usr/local/mprepo/var/log
36
37 install -d -o 0 -g 0 %{buildroot}/etc
38 install -d -o 0 -g 0 %{buildroot}/etc/httpd
39 install -d -o 0 -g 0 %{buildroot}/etc/httpd/conf.d
40 install -d -o 0 -g 0 %{buildroot}/etc/init.d
41
42 install -d -o 0 -g 0 %{buildroot}/repository
43 install -d -o 0 -g 0 %{buildroot}/repository/keys
44 install -d -o 0 -g 0 %{buildroot}/repository/packages
45 install -d -o 0 -g 0 %{buildroot}/repository/metadata
46 install -d -o 0 -g 0 %{buildroot}/repository/packageinfo
47 install -d -o 0 -g 0 %{buildroot}/repository/symdir
48 install -d -o 0 -g 0 %{buildroot}/repository/info
49 install -d -o 0 -g 0 %{buildroot}/repository/torrents
50 install -d -o 0 -g 0 %{buildroot}/repository/old-files
51 install -d -o 0 -g 0 %{buildroot}/repository/user-upload
52 install -d -o 0 -g 0 %{buildroot}/repository/user-upload/tpfiles
53 install -d -o 0 -g 0 %{buildroot}/repository/user-upload/conf
54 install -d -o 0 -g 0 %{buildroot}/repository/user-upload/pubkeys
55 install -d -o 0 -g 0 %{buildroot}/repository/user-upload/pacman
56 install -d -o 0 -g 0 %{buildroot}/repository/user-upload/tmp
57 install -d -o 0 -g 0 %{buildroot}/repository/stork/
58 install -d -o 0 -g 0 %{buildroot}/repository/static
59
60 install index.html %{buildroot}/repository
61
62 install index.py %{buildroot}/repository/stork
63
64 install mprepo.conf %{buildroot}/usr/local/mprepo/etc
65 install stork-mprepo-apache.conf %{buildroot}/etc/httpd/conf.d
66 install api.conf %{buildroot}/etc/httpd/conf.d
67
68 install API.py %{buildroot}/usr/local/mprepo/bin
69 install ModPython.py %{buildroot}/usr/local/mprepo/bin
70 install BaseApi.py %{buildroot}/usr/local/mprepo/bin
71 install AuthenticatedApi.py %{buildroot}/usr/local/mprepo/bin
72 install ApiExceptionCodes.py  %{buildroot}/usr/local/mprepo/bin
73
74 install API.py %{buildroot}/usr/local/mprepo/bin
75 install mprfrontend.py %{buildroot}/usr/local/mprepo/bin
76 install frontend.py %{buildroot}/usr/local/mprepo/bin
77 install repoauth.py %{buildroot}/usr/local/mprepo/bin
78 install html.py %{buildroot}/usr/local/mprepo/bin
79 install passfile.py %{buildroot}/usr/local/mprepo/bin
80 install repobackend.py %{buildroot}/usr/local/mprepo/bin
81 install repoclassify.py %{buildroot}/usr/local/mprepo/bin
82 install repoconfig.py %{buildroot}/usr/local/mprepo/bin
83 install repogeni.py %{buildroot}/usr/local/mprepo/bin
84 install repouid.py %{buildroot}/usr/local/mprepo/bin
85 install repometafileupdate.py %{buildroot}/usr/local/mprepo/bin
86 install repoplc.py %{buildroot}/usr/local/mprepo/bin
87 install repopublish.py %{buildroot}/usr/local/mprepo/bin
88 install repopubsub.py %{buildroot}/usr/local/mprepo/bin
89 install repoutil.py %{buildroot}/usr/local/mprepo/bin
90
91 install geniserverbase.py %{buildroot}/usr/local/mprepo/bin
92
93 # Geniwrapper stuff
94 install __init__.py %{buildroot}/usr/local/mprepo/bin/sfa
95 install __init__.py %{buildroot}/usr/local/mprepo/bin/sfa/trust
96 install certificate.py %{buildroot}/usr/local/mprepo/bin/sfa/trust
97 install credential.py %{buildroot}/usr/local/mprepo/bin/sfa/trust
98 install credential_legacy.py %{buildroot}/usr/local/mprepo/bin/sfa/trust
99 install gid.py %{buildroot}/usr/local/mprepo/bin/sfa/trust
100 install rights.py %{buildroot}/usr/local/mprepo/bin/sfa/trust
101 install trustedroot.py %{buildroot}/usr/local/mprepo/bin/sfa/trust
102
103 install __init__.py %{buildroot}/usr/local/mprepo/bin/sfa/util
104 install faults.py %{buildroot}/usr/local/mprepo/bin/sfa/util
105 install sfaticket.py %{buildroot}/usr/local/mprepo/bin/sfa/util
106 #install misc.py %{buildroot}/usr/local/mprepo/bin/sfa/util
107 #install namespace.py %{buildroot}/usr/local/mprepo/bin/sfa/util
108 install parameter.py %{buildroot}/usr/local/mprepo/bin/sfa/util
109 install record.py %{buildroot}/usr/local/mprepo/bin/sfa/util
110 #install report.py %{buildroot}/usr/local/mprepo/bin/sfa/util
111 install rspec.py %{buildroot}/usr/local/mprepo/bin/sfa/util
112 install sfalogging.py %{buildroot}/usr/local/mprepo/bin/sfa/util
113 install xmlrpcprotocol.py %{buildroot}/usr/local/mprepo/bin/sfa/util
114 install xrn.py %{buildroot}/usr/local/mprepo/bin/sfa/util
115
116 install browsepage.stemp %{buildroot}/usr/local/mprepo/etc
117 install errorpage.stemp %{buildroot}/usr/local/mprepo/etc
118 install footer.stemp %{buildroot}/usr/local/mprepo/etc
119 install header.stemp %{buildroot}/usr/local/mprepo/etc
120 install home.stemp %{buildroot}/usr/local/mprepo/etc
121 install loginpage.stemp %{buildroot}/usr/local/mprepo/etc
122 install mustloginpage.stemp %{buildroot}/usr/local/mprepo/etc
123 install passfileauthenticatefail.stemp %{buildroot}/usr/local/mprepo/etc
124 install passfileauthenticate.stemp %{buildroot}/usr/local/mprepo/etc
125 install PLauthenticatefail.stemp %{buildroot}/usr/local/mprepo/etc
126 install PLauthenticate.stemp %{buildroot}/usr/local/mprepo/etc
127 install PLEauthenticatefail.stemp %{buildroot}/usr/local/mprepo/etc
128 install PLEauthenticate.stemp %{buildroot}/usr/local/mprepo/etc
129 install searchpage.stemp %{buildroot}/usr/local/mprepo/etc
130 install storkcontrol.stemp %{buildroot}/usr/local/mprepo/etc
131 install uploadlegacy.stemp %{buildroot}/usr/local/mprepo/etc
132 install uploadpage.stemp %{buildroot}/usr/local/mprepo/etc
133 install uploadstatus.stemp %{buildroot}/usr/local/mprepo/etc
134
135 install pbpl.png %{buildroot}/repository/static
136 install powered_by_pl_grey.png %{buildroot}/repository/static
137 install stork.css %{buildroot}/repository/static
138 install stork-header.png %{buildroot}/repository/static
139 install template_logo_small_grey.png %{buildroot}/repository/static
140 install uacs.png %{buildroot}/repository/static
141
142 install repopubsub.init %{buildroot}/etc/init.d/repopubsub
143
144 %clean
145 rm -rf %{buildroot}
146
147 %pre
148
149 %post
150 mkdir /repository/packageinfo 2>/dev/null
151 mkdir /repository/packages    2>/dev/null
152 mkdir /repository/metadata    2>/dev/null
153 mkdir /repository/info        2>/dev/null
154 mkdir /repository/keys        2>/dev/null
155 mkdir /repository/symdir      2>/dev/null
156 mkdir /repository/torrents    2>/dev/null
157 mkdir /repository/old-files   2>/dev/null
158 mkdir /repository/user-upload 2>/dev/null
159 mkdir /repository/user-upload/tpfiles 2>/dev/null
160 mkdir /repository/user-upload/conf    2>/dev/null
161 mkdir /repository/user-upload/pacman  2>/dev/null
162 mkdir /repository/user-upload/pubkeys 2>/dev/null
163 mkdir /repository/user-upload/tmp     2>/dev/null
164 mkdir -p /usr/local/stork/tar_packinfo 2>/dev/null
165 mkdir -p /usr/local/mprepo/var 2>/dev/null
166 mkdir -p /usr/local/mprepo/var/keys 2>/dev/null
167 mkdir -p /usr/local/mprepo/var/log 2>/dev/null
168 mkdir -p /usr/local/mprepo/tmp 2>/dev/null
169 chown -R apache /repository
170 chown -R apache /usr/local/mprepo
171
172 # restart the httpd daemon
173 /etc/init.d/httpd restart
174
175 chkconfig --add repopubsub
176 /etc/init.d/repopubsub restart
177
178
179 echo " ************************* IMPORTANT ******************************"
180 echo " *                                                                *"
181 echo " * To complete the configuration of the stork package repository  *"
182 echo " * please go to:                                                  *"
183 echo " * http://www.cs.arizona.edu/stork/newdesign/repositorysetup.html *"
184 echo " *                                                                *"
185 echo " ******************************************************************"
186
187
188
189 %preun
190 if [ $1 = 0 ]; then
191   chkconfig --del repo_xmlrpc_server
192   /etc/init.d/repo_xmlrpc_server stop
193   rm -f /etc/init.d/repo_xmlrpc_server
194
195   chkconfig --del repopubsub
196   /etc/init.d/repopubsub stop
197 fi
198
199
200 %files
201 %defattr(-,root,root)
202 /repository/index.html
203 /repository/stork/index.py
204
205 /usr/local/mprepo/etc/mprepo.conf
206 /etc/httpd/conf.d/stork-mprepo-apache.conf
207 /etc/httpd/conf.d/api.conf
208
209 /usr/local/mprepo/bin/API.py
210 /usr/local/mprepo/bin/ModPython.py
211 /usr/local/mprepo/bin/BaseApi.py
212 /usr/local/mprepo/bin/AuthenticatedApi.py
213 /usr/local/mprepo/bin/ApiExceptionCodes.py
214
215 /usr/local/mprepo/etc/browsepage.stemp
216 /usr/local/mprepo/etc/errorpage.stemp
217 /usr/local/mprepo/etc/footer.stemp
218 /usr/local/mprepo/etc/header.stemp
219 /usr/local/mprepo/etc/home.stemp
220 /usr/local/mprepo/etc/loginpage.stemp
221 /usr/local/mprepo/etc/mustloginpage.stemp
222 /usr/local/mprepo/etc/passfileauthenticatefail.stemp
223 /usr/local/mprepo/etc/passfileauthenticate.stemp
224 /usr/local/mprepo/etc/PLauthenticatefail.stemp
225 /usr/local/mprepo/etc/PLauthenticate.stemp
226 /usr/local/mprepo/etc/PLEauthenticatefail.stemp
227 /usr/local/mprepo/etc/PLEauthenticate.stemp
228 /usr/local/mprepo/etc/searchpage.stemp
229 /usr/local/mprepo/etc/storkcontrol.stemp
230 /usr/local/mprepo/etc/uploadlegacy.stemp
231 /usr/local/mprepo/etc/uploadpage.stemp
232 /usr/local/mprepo/etc/uploadstatus.stemp
233
234 /usr/local/mprepo/bin/API.py
235 /usr/local/mprepo/bin/mprfrontend.py
236 /usr/local/mprepo/bin/frontend.py
237 /usr/local/mprepo/bin/repoauth.py
238 /usr/local/mprepo/bin/html.py
239 /usr/local/mprepo/bin/passfile.py
240 /usr/local/mprepo/bin/repobackend.py
241 /usr/local/mprepo/bin/repoclassify.py
242 /usr/local/mprepo/bin/repoconfig.py
243 /usr/local/mprepo/bin/repogeni.py
244 /usr/local/mprepo/bin/repouid.py
245 /usr/local/mprepo/bin/repometafileupdate.py
246 /usr/local/mprepo/bin/repoplc.py
247 /usr/local/mprepo/bin/repopublish.py
248 /usr/local/mprepo/bin/repopubsub.py
249 /usr/local/mprepo/bin/repoutil.py
250
251 /usr/local/mprepo/bin/geniserverbase.py
252
253 /etc/init.d/repopubsub
254
255 # geniwrapper stuff
256 /usr/local/mprepo/bin/sfa/__init__.py
257 /usr/local/mprepo/bin/sfa/trust/__init__.py
258 /usr/local/mprepo/bin/sfa/trust/certificate.py
259 /usr/local/mprepo/bin/sfa/trust/credential.py
260 /usr/local/mprepo/bin/sfa/trust/credential_legacy.py
261 /usr/local/mprepo/bin/sfa/trust/gid.py
262 /usr/local/mprepo/bin/sfa/trust/rights.py
263 /usr/local/mprepo/bin/sfa/trust/trustedroot.py
264
265 /usr/local/mprepo/bin/sfa/util/__init__.py
266 /usr/local/mprepo/bin/sfa/util/faults.py
267 /usr/local/mprepo/bin/sfa/util/sfaticket.py
268 #/usr/local/mprepo/bin/sfa/util/misc.py
269 #/usr/local/mprepo/bin/sfa/util/namespace.py
270 /usr/local/mprepo/bin/sfa/util/parameter.py
271 /usr/local/mprepo/bin/sfa/util/record.py
272 #/usr/local/mprepo/bin/sfa/util/report.py
273 /usr/local/mprepo/bin/sfa/util/rspec.py
274 /usr/local/mprepo/bin/sfa/util/sfalogging.py
275 /usr/local/mprepo/bin/sfa/util/xmlrpcprotocol.py
276 /usr/local/mprepo/bin/sfa/util/xrn.py
277
278 /repository/static/pbpl.png
279 /repository/static/powered_by_pl_grey.png
280 /repository/static/stork.css
281 /repository/static/stork-header.png
282 /repository/static/template_logo_small_grey.png
283 /repository/static/uacs.png
284