7744cb025a3071f145b10185afa59180f96928df
[raven.git] / rpm_builds / SPECS / gackscentral.spec.template
1 Summary: Gacks Central
2 Name: gackscentral
3 Version: @VER@
4 Release: @REL@
5 License: Public Domain
6 Group: Raven at U of Arizona
7 URL: http://www.cs.arizona.edu/
8 Source RPM: ftp://quadrus.cs.arizona.edu/PlanetLab/V3/gackscentral-@VER@.tar.gz
9 Vendor: University of Arizona
10 BuildRoot: %{_tmppath}/%{name}-root
11 requires: arizona-lib >= 2.2.8, httpd
12
13 %description
14 This rpm provides gacks central.
15 %prep
16 %setup -q
17
18 %build
19
20 %install
21 rm -rf %\{buildroot]
22 install -d -o 0 -g 0 %{buildroot}/usr
23 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral
24 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/bin
25 #install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/bin/sfa
26 #install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/bin/sfa/trust
27 #install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/bin/sfa/util
28 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/scripts
29 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/var
30 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/var/trusted_roots
31 install -d -o 0 -g 0 %{buildroot}/usr/local/gackscentral/var/log
32
33 install -d -o 0 -g 0 %{buildroot}/usr
34 install -d -o 0 -g 0 %{buildroot}/usr/share
35 install -d -o 0 -g 0 %{buildroot}/usr/share/plc_api
36 install -d -o 0 -g 0 %{buildroot}/usr/share/plc_api/PLC
37 install -d -o 0 -g 0 %{buildroot}/usr/share/plc_api/PLC/Methods
38
39 install -d -o 0 -g 0 %{buildroot}/var
40 install -d -o 0 -g 0 %{buildroot}/var/log
41 install -d -o 0 -g 0 %{buildroot}/var/log/gacks
42
43 install -d -o 0 -g 0 %{buildroot}/etc
44 install -d -o 0 -g 0 %{buildroot}/etc/httpd
45 install -d -o 0 -g 0 %{buildroot}/etc/httpd/conf.d
46
47 install -d -o 0 -g 0 %{buildroot}/etc/cron.d
48 install -d -o 0 -g 0 %{buildroot}/etc/init.d
49
50 install -d -o 0 -g 0 %{buildroot}/etc/gacks
51
52 install gacks-api.conf %{buildroot}/etc/httpd/conf.d
53
54 install API.py %{buildroot}/usr/local/gackscentral/bin
55 install ModPython.py %{buildroot}/usr/local/gackscentral/bin
56 install BaseApi.py %{buildroot}/usr/local/gackscentral/bin
57 install AuthenticatedApi.py %{buildroot}/usr/local/gackscentral/bin
58 install ApiExceptionCodes.py  %{buildroot}/usr/local/gackscentral/bin
59
60 install testGacksCalendar.py %{buildroot}/usr/local/gackscentral/bin
61 install gacksaccount.py %{buildroot}/usr/local/gackscentral/bin
62 install gacksaccountmanager.py %{buildroot}/usr/local/gackscentral/bin
63 install gacksaccount_test.py %{buildroot}/usr/local/gackscentral/bin
64 install gacksauth.py %{buildroot}/usr/local/gackscentral/bin
65 install gacksbilling.py %{buildroot}/usr/local/gackscentral/bin
66 install gacksid.py %{buildroot}/usr/local/gackscentral/bin
67 install gacksreset.py %{buildroot}/usr/local/gackscentral/bin
68 install gacksbackend.py %{buildroot}/usr/local/gackscentral/bin
69 install gackscalendar.py %{buildroot}/usr/local/gackscentral/bin
70 install gackscalendar_list.py %{buildroot}/usr/local/gackscentral/bin
71 install gackscalendar_mysql.py %{buildroot}/usr/local/gackscentral/bin
72 install gackscalendar_db.py %{buildroot}/usr/local/gackscentral/bin
73 install gackscli.py %{buildroot}/usr/local/gackscentral/bin
74 install gacksclient.py %{buildroot}/usr/local/gackscentral/bin
75 install gackscollector.py %{buildroot}/usr/local/gackscentral/bin
76 install gacksconfig.py %{buildroot}/usr/local/gackscentral/bin
77 install gacksdaemon.py %{buildroot}/usr/local/gackscentral/bin
78 install gacksdb.py %{buildroot}/usr/local/gackscentral/bin
79 install gacksexcep.py %{buildroot}/usr/local/gackscentral/bin
80 install gacksenforce.py %{buildroot}/usr/local/gackscentral/bin
81 install gackshandle.py %{buildroot}/usr/local/gackscentral/bin
82 install gackshandler_base.py %{buildroot}/usr/local/gackscentral/bin
83 install gackshandler_plc.py %{buildroot}/usr/local/gackscentral/bin
84 install gacksid.py %{buildroot}/usr/local/gackscentral/bin
85 install gacksinvoice.py %{buildroot}/usr/local/gackscentral/bin
86 install gackslogserver.py %{buildroot}/usr/local/gackscentral/bin
87 install gacksjob.py %{buildroot}/usr/local/gackscentral/bin
88 install gacksnodepicker.py %{buildroot}/usr/local/gackscentral/bin
89 install gacksnodestatus.py %{buildroot}/usr/local/gackscentral/bin
90 install gackspolicy.py %{buildroot}/usr/local/gackscentral/bin
91 install gacksqueue.py %{buildroot}/usr/local/gackscentral/bin
92 install gacksqueue_mysql.py %{buildroot}/usr/local/gackscentral/bin
93 install gacksreceipt.py %{buildroot}/usr/local/gackscentral/bin
94 install gacksresource.py %{buildroot}/usr/local/gackscentral/bin
95 install gacksrspec.py %{buildroot}/usr/local/gackscentral/bin
96 install gackstime.py %{buildroot}/usr/local/gackscentral/bin
97 install gackslog.py %{buildroot}/usr/local/gackscentral/bin
98 install gackslog_mysql.py %{buildroot}/usr/local/gackscentral/bin
99
100 install localhost-gacks-defragment.sh %{buildroot}/usr/local/gackscentral/bin
101 install localhost-gacks-garbagecollect.sh %{buildroot}/usr/local/gackscentral/bin
102 install localhost-gacks-runasap.sh %{buildroot}/usr/local/gackscentral/bin
103 install localhost-gacks-applyinvoices.sh %{buildroot}/usr/local/gackscentral/bin
104 install localhost-gacks-mailinvoices.sh %{buildroot}/usr/local/gackscentral/bin
105 install gackscentral.cron %{buildroot}/etc/cron.d
106
107 install gacksbackend.init %{buildroot}/etc/init.d
108 install gackslogserver.init %{buildroot}/etc/init.d
109 install gackscollector.init %{buildroot}/etc/init.d
110
111 install gackslog.conf %{buildroot}/etc/gacks
112
113 install bridgeconfig.py %{buildroot}/usr/share/plc_api/PLC
114 install SliceAutoConfig.py %{buildroot}/usr/share/plc_api/PLC/Methods
115 install SliceGetConfig.py %{buildroot}/usr/share/plc_api/PLC/Methods
116
117
118 # Geniwrapper stuff
119 #install __init__.py %{buildroot}/usr/local/gackscentral/bin/sfa
120 #install __init__.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
121 #install certificate.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
122 #install credential.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
123 #install gid.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
124 #install rights.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
125 #install trustedroot.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
126
127 #install __init__.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
128 #install client.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
129 #install faults.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
130 #install sfaticket.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
131 #install misc.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
132 #install namespace.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
133 #install parameter.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
134 #install record.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
135 #install report.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
136 #install rspec.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
137 #install xmlrpcprotocol.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
138
139 %clean
140 rm -rf %{buildroot}
141
142 %post
143 mkdir -p /usr/local/gackscentral/var 2>/dev/null
144 mkdir -p /usr/local/gackscentral/var/log 2>/dev/null
145 mkdir -p /usr/local/gackscentral/var/trusted_roots 2>/dev/null
146
147 ln -sf /usr/local/gackscentral/bin/gackscli.py /usr/bin/gackscli
148
149 # apache can't seem to write the log files
150 chown -R apache /usr/local/gackscentral/var/log
151
152 chkconfig gacksbackend.init on
153 service gacksbackend.init restart
154 chkconfig gackslogserver.init on
155 service gackslogserver.init restart
156 chkconfig gackscollector.init on
157 service gackscollector.init restart
158
159 %preun
160 if [ $1 = 0 ]; then
161   rm -f /usr/bin/gackscli
162 fi
163
164 %files
165 %defattr(-,root,root)
166
167 /etc/httpd/conf.d/gacks-api.conf
168
169 /usr/local/gackscentral/bin/API.py
170 /usr/local/gackscentral/bin/ModPython.py
171 /usr/local/gackscentral/bin/BaseApi.py
172 /usr/local/gackscentral/bin/AuthenticatedApi.py
173 /usr/local/gackscentral/bin/ApiExceptionCodes.py
174
175 /usr/local/gackscentral/bin/testGacksCalendar.py
176 /usr/local/gackscentral/bin/gacksaccount.py
177 /usr/local/gackscentral/bin/gacksaccountmanager.py
178 /usr/local/gackscentral/bin/gacksaccount_test.py
179 /usr/local/gackscentral/bin/gacksauth.py
180 /usr/local/gackscentral/bin/gacksbilling.py
181 /usr/local/gackscentral/bin/gacksid.py
182 /usr/local/gackscentral/bin/gacksreset.py
183 /usr/local/gackscentral/bin/gacksbackend.py
184 /usr/local/gackscentral/bin/gackscalendar.py
185 /usr/local/gackscentral/bin/gackscalendar_list.py
186 /usr/local/gackscentral/bin/gackscalendar_mysql.py
187 /usr/local/gackscentral/bin/gackscalendar_db.py
188 /usr/local/gackscentral/bin/gackscli.py
189 /usr/local/gackscentral/bin/gacksclient.py
190 /usr/local/gackscentral/bin/gackscollector.py
191 /usr/local/gackscentral/bin/gacksconfig.py
192 /usr/local/gackscentral/bin/gacksdaemon.py
193 /usr/local/gackscentral/bin/gacksdb.py
194 /usr/local/gackscentral/bin/gacksenforce.py
195 /usr/local/gackscentral/bin/gacksexcep.py
196 /usr/local/gackscentral/bin/gackshandle.py
197 /usr/local/gackscentral/bin/gackshandler_base.py
198 /usr/local/gackscentral/bin/gackshandler_plc.py
199 /usr/local/gackscentral/bin/gacksid.py
200 /usr/local/gackscentral/bin/gacksinvoice.py
201 /usr/local/gackscentral/bin/gacksjob.py
202 /usr/local/gackscentral/bin/gacksnodepicker.py
203 /usr/local/gackscentral/bin/gacksnodestatus.py
204 /usr/local/gackscentral/bin/gackspolicy.py
205 /usr/local/gackscentral/bin/gacksqueue.py
206 /usr/local/gackscentral/bin/gacksqueue_mysql.py
207 /usr/local/gackscentral/bin/gacksreceipt.py
208 /usr/local/gackscentral/bin/gacksresource.py
209 /usr/local/gackscentral/bin/gacksrspec.py
210 /usr/local/gackscentral/bin/gackstime.py
211 /usr/local/gackscentral/bin/gackslog.py
212 /usr/local/gackscentral/bin/gackslog_mysql.py
213 /usr/local/gackscentral/bin/gackslogserver.py
214
215 /usr/share/plc_api/PLC/bridgeconfig.py
216 /usr/share/plc_api/PLC/Methods/SliceAutoConfig.py
217 /usr/share/plc_api/PLC/Methods/SliceGetConfig.py
218
219 /usr/local/gackscentral/bin/localhost-gacks-defragment.sh
220 /usr/local/gackscentral/bin/localhost-gacks-garbagecollect.sh
221 /usr/local/gackscentral/bin/localhost-gacks-runasap.sh
222 /usr/local/gackscentral/bin/localhost-gacks-applyinvoices.sh
223 /usr/local/gackscentral/bin/localhost-gacks-mailinvoices.sh
224 %attr(0644,root,root) /etc/cron.d/gackscentral.cron
225
226 /etc/gacks/gackslog.conf
227
228 /etc/init.d/gacksbackend.init
229 %attr(0755,root,root) /etc/init.d/gacksbackend.init
230 /etc/init.d/gackslogserver.init
231 %attr(0755,root,root) /etc/init.d/gackslogserver.init
232 /etc/init.d/gackscollector.init
233 %attr(0755,root,root) /etc/init.d/gackscollector.init
234
235 # geniwrapper stuff
236 #/usr/local/gackscentral/bin/sfa/__init__.py
237 #/usr/local/gackscentral/bin/sfa/trust/__init__.py
238 #/usr/local/gackscentral/bin/sfa/trust/certificate.py
239 #/usr/local/gackscentral/bin/sfa/trust/credential.py
240 #/usr/local/gackscentral/bin/sfa/trust/gid.py
241 #/usr/local/gackscentral/bin/sfa/trust/rights.py
242 #/usr/local/gackscentral/bin/sfa/trust/trustedroot.py
243
244 #/usr/local/gackscentral/bin/sfa/util/__init__.py
245 #/usr/local/gackscentral/bin/sfa/util/client.py
246 #/usr/local/gackscentral/bin/sfa/util/faults.py
247 #/usr/local/gackscentral/bin/sfa/util/sfaticket.py
248 #/usr/local/gackscentral/bin/sfa/util/misc.py
249 #/usr/local/gackscentral/bin/sfa/util/namespace.py
250 #/usr/local/gackscentral/bin/sfa/util/parameter.py
251 #/usr/local/gackscentral/bin/sfa/util/record.py
252 #/usr/local/gackscentral/bin/sfa/util/report.py
253 #/usr/local/gackscentral/bin/sfa/util/rspec.py
254 #/usr/local/gackscentral/bin/sfa/util/xmlrpcprotocol.py
255