d9c9428e465d4af1b1d24ed594ff05ac38f69749
[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}/var
34 install -d -o 0 -g 0 %{buildroot}/var/log
35 install -d -o 0 -g 0 %{buildroot}/var/log/gacks
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
41 install -d -o 0 -g 0 %{buildroot}/etc/cron.d
42 install -d -o 0 -g 0 %{buildroot}/etc/init.d
43
44 install -d -o 0 -g 0 %{buildroot}/etc/gacks
45
46 install gacks-api.conf %{buildroot}/etc/httpd/conf.d
47
48 install API.py %{buildroot}/usr/local/gackscentral/bin
49 install ModPython.py %{buildroot}/usr/local/gackscentral/bin
50 install BaseApi.py %{buildroot}/usr/local/gackscentral/bin
51 install AuthenticatedApi.py %{buildroot}/usr/local/gackscentral/bin
52 install ApiExceptionCodes.py  %{buildroot}/usr/local/gackscentral/bin
53
54 install testGacksCalendar.py %{buildroot}/usr/local/gackscentral/bin
55 install gacksaccount.py %{buildroot}/usr/local/gackscentral/bin
56 install gacksaccountmanager.py %{buildroot}/usr/local/gackscentral/bin
57 install gacksaccount_test.py %{buildroot}/usr/local/gackscentral/bin
58 install gacksauth.py %{buildroot}/usr/local/gackscentral/bin
59 install gacksid.py %{buildroot}/usr/local/gackscentral/bin
60 install gacksreset.py %{buildroot}/usr/local/gackscentral/bin
61 install gacksbackend.py %{buildroot}/usr/local/gackscentral/bin
62 install gackscalendar.py %{buildroot}/usr/local/gackscentral/bin
63 install gackscalendar_list.py %{buildroot}/usr/local/gackscentral/bin
64 install gackscalendar_mysql.py %{buildroot}/usr/local/gackscentral/bin
65 install gackscalendar_db.py %{buildroot}/usr/local/gackscentral/bin
66 install gackscli.py %{buildroot}/usr/local/gackscentral/bin
67 install gacksclient.py %{buildroot}/usr/local/gackscentral/bin
68 install gackscollector.py %{buildroot}/usr/local/gackscentral/bin
69 install gacksconfig.py %{buildroot}/usr/local/gackscentral/bin
70 install gacksdb.py %{buildroot}/usr/local/gackscentral/bin
71 install gacksexcep.py %{buildroot}/usr/local/gackscentral/bin
72 install gacksenforce.py %{buildroot}/usr/local/gackscentral/bin
73 install gackshandle.py %{buildroot}/usr/local/gackscentral/bin
74 install gackshandler_base.py %{buildroot}/usr/local/gackscentral/bin
75 install gackshandler_plc.py %{buildroot}/usr/local/gackscentral/bin
76 install gacksid.py %{buildroot}/usr/local/gackscentral/bin
77 install gacksinvoice.py %{buildroot}/usr/local/gackscentral/bin
78 install gackslogserver.py %{buildroot}/usr/local/gackscentral/bin
79 install gacksjob.py %{buildroot}/usr/local/gackscentral/bin
80 install gacksnodepicker.py %{buildroot}/usr/local/gackscentral/bin
81 install gacksnodestatus.py %{buildroot}/usr/local/gackscentral/bin
82 install gackspolicy.py %{buildroot}/usr/local/gackscentral/bin
83 install gacksqueue.py %{buildroot}/usr/local/gackscentral/bin
84 install gacksqueue_mysql.py %{buildroot}/usr/local/gackscentral/bin
85 install gacksreceipt.py %{buildroot}/usr/local/gackscentral/bin
86 install gacksresource.py %{buildroot}/usr/local/gackscentral/bin
87 install gacksrspec.py %{buildroot}/usr/local/gackscentral/bin
88 install gackslog.py %{buildroot}/usr/local/gackscentral/bin
89 install gackslog_mysql.py %{buildroot}/usr/local/gackscentral/bin
90
91 install localhost-gacks-defragment.sh %{buildroot}/usr/local/gackscentral/bin
92 install localhost-gacks-garbagecollect.sh %{buildroot}/usr/local/gackscentral/bin
93 install localhost-gacks-runasap.sh %{buildroot}/usr/local/gackscentral/bin
94 install localhost-gacks-applyinvoices.sh %{buildroot}/usr/local/gackscentral/bin
95 install localhost-gacks-mailinvoices.sh %{buildroot}/usr/local/gackscentral/bin
96 install gackscentral.cron %{buildroot}/etc/cron.d
97
98 install gacksbackend.init %{buildroot}/etc/init.d
99 install gackslogserver.init %{buildroot}/etc/init.d
100
101 install gackslog.conf %{buildroot}/etc/gacks
102
103 # Geniwrapper stuff
104 #install __init__.py %{buildroot}/usr/local/gackscentral/bin/sfa
105 #install __init__.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
106 #install certificate.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
107 #install credential.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
108 #install gid.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
109 #install rights.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
110 #install trustedroot.py %{buildroot}/usr/local/gackscentral/bin/sfa/trust
111
112 #install __init__.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
113 #install client.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
114 #install faults.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
115 #install sfaticket.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
116 #install misc.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
117 #install namespace.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
118 #install parameter.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
119 #install record.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
120 #install report.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
121 #install rspec.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
122 #install xmlrpcprotocol.py %{buildroot}/usr/local/gackscentral/bin/sfa/util
123
124 %clean
125 rm -rf %{buildroot}
126
127 %post
128 mkdir -p /usr/local/gackscentral/var 2>/dev/null
129 mkdir -p /usr/local/gackscentral/var/log 2>/dev/null
130 mkdir -p /usr/local/gackscentral/var/trusted_roots 2>/dev/null
131
132 ln -sf /usr/local/gackscentral/bin/gackscli.py /usr/bin/gackscli
133
134 # apache can't seem to write the log files
135 chown -R apache /usr/local/gackscentral/var/log
136
137 chkconfig gacksbackend.init on
138 service gacksbackend.init restart
139 chkconfig gackslogserver.init on
140 service gackslogserver.init restart
141
142 %preun
143 if [ $1 = 0 ]; then
144   rm -f /usr/bin/gackscli
145 fi
146
147 %files
148 %defattr(-,root,root)
149
150 /etc/httpd/conf.d/gacks-api.conf
151
152 /usr/local/gackscentral/bin/API.py
153 /usr/local/gackscentral/bin/ModPython.py
154 /usr/local/gackscentral/bin/BaseApi.py
155 /usr/local/gackscentral/bin/AuthenticatedApi.py
156 /usr/local/gackscentral/bin/ApiExceptionCodes.py
157
158 /usr/local/gackscentral/bin/testGacksCalendar.py
159 /usr/local/gackscentral/bin/gacksaccount.py
160 /usr/local/gackscentral/bin/gacksaccountmanager.py
161 /usr/local/gackscentral/bin/gacksaccount_test.py
162 /usr/local/gackscentral/bin/gacksauth.py
163 /usr/local/gackscentral/bin/gacksid.py
164 /usr/local/gackscentral/bin/gacksreset.py
165 /usr/local/gackscentral/bin/gacksbackend.py
166 /usr/local/gackscentral/bin/gackscalendar.py
167 /usr/local/gackscentral/bin/gackscalendar_list.py
168 /usr/local/gackscentral/bin/gackscalendar_mysql.py
169 /usr/local/gackscentral/bin/gackscalendar_db.py
170 /usr/local/gackscentral/bin/gackscli.py
171 /usr/local/gackscentral/bin/gacksclient.py
172 /usr/local/gackscentral/bin/gackscollector.py
173 /usr/local/gackscentral/bin/gacksconfig.py
174 /usr/local/gackscentral/bin/gacksdb.py
175 /usr/local/gackscentral/bin/gacksenforce.py
176 /usr/local/gackscentral/bin/gacksexcep.py
177 /usr/local/gackscentral/bin/gackshandle.py
178 /usr/local/gackscentral/bin/gackshandler_base.py
179 /usr/local/gackscentral/bin/gackshandler_plc.py
180 /usr/local/gackscentral/bin/gacksid.py
181 /usr/local/gackscentral/bin/gacksinvoice.py
182 /usr/local/gackscentral/bin/gacksjob.py
183 /usr/local/gackscentral/bin/gacksnodepicker.py
184 /usr/local/gackscentral/bin/gacksnodestatus.py
185 /usr/local/gackscentral/bin/gackspolicy.py
186 /usr/local/gackscentral/bin/gacksqueue.py
187 /usr/local/gackscentral/bin/gacksqueue_mysql.py
188 /usr/local/gackscentral/bin/gacksreceipt.py
189 /usr/local/gackscentral/bin/gacksresource.py
190 /usr/local/gackscentral/bin/gacksrspec.py
191 /usr/local/gackscentral/bin/gackslog.py
192 /usr/local/gackscentral/bin/gackslog_mysql.py
193 /usr/local/gackscentral/bin/gackslogserver.py
194
195 /usr/local/gackscentral/bin/localhost-gacks-defragment.sh
196 /usr/local/gackscentral/bin/localhost-gacks-garbagecollect.sh
197 /usr/local/gackscentral/bin/localhost-gacks-runasap.sh
198 /usr/local/gackscentral/bin/localhost-gacks-applyinvoices.sh
199 /usr/local/gackscentral/bin/localhost-gacks-mailinvoices.sh
200 %attr(0644,root,root) /etc/cron.d/gackscentral.cron
201
202 /etc/gacks/gackslog.conf
203
204 /etc/init.d/gacksbackend.init
205 %attr(0755,root,root) /etc/init.d/gacksbackend.init
206 /etc/init.d/gackslogserver.init
207 %attr(0755,root,root) /etc/init.d/gackslogserver.init
208
209 # geniwrapper stuff
210 #/usr/local/gackscentral/bin/sfa/__init__.py
211 #/usr/local/gackscentral/bin/sfa/trust/__init__.py
212 #/usr/local/gackscentral/bin/sfa/trust/certificate.py
213 #/usr/local/gackscentral/bin/sfa/trust/credential.py
214 #/usr/local/gackscentral/bin/sfa/trust/gid.py
215 #/usr/local/gackscentral/bin/sfa/trust/rights.py
216 #/usr/local/gackscentral/bin/sfa/trust/trustedroot.py
217
218 #/usr/local/gackscentral/bin/sfa/util/__init__.py
219 #/usr/local/gackscentral/bin/sfa/util/client.py
220 #/usr/local/gackscentral/bin/sfa/util/faults.py
221 #/usr/local/gackscentral/bin/sfa/util/sfaticket.py
222 #/usr/local/gackscentral/bin/sfa/util/misc.py
223 #/usr/local/gackscentral/bin/sfa/util/namespace.py
224 #/usr/local/gackscentral/bin/sfa/util/parameter.py
225 #/usr/local/gackscentral/bin/sfa/util/record.py
226 #/usr/local/gackscentral/bin/sfa/util/report.py
227 #/usr/local/gackscentral/bin/sfa/util/rspec.py
228 #/usr/local/gackscentral/bin/sfa/util/xmlrpcprotocol.py
229