merge ratelimiting support from memcache branch
[plcapi.git] / PLCAPI.spec
1 #
2 # $Id$
3 #
4
5 %define url $URL$
6
7 %define name PLCAPI
8 %define version 5.0
9 %define taglevel 18
10
11 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
12
13 Summary: PlanetLab Central API
14 Name: %{name}
15 Version: %{version}
16 Release: %{release}
17 License: PlanetLab
18 Group: System Environment/Daemons
19 Source0: %{name}-%{version}.tar.gz
20 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
21
22 Vendor: PlanetLab
23 Packager: PlanetLab Central <support@planet-lab.org>
24 Distribution: PlanetLab %{plrelease}
25 URL: %(echo %{url} | cut -d ' ' -f 2)
26
27 Obsoletes: plcapilib
28
29 # We use set everywhere
30 Requires: python >= 2.4
31 Requires: postgresql >= 8.2, postgresql-server >= 8.2
32 Requires: postgresql-python
33 Requires: python-psycopg2
34 Requires: python-pycurl
35 Requires: httpd
36 Requires: mod_python
37 # mod_wsgi will replace mod_python when we are ready
38 Requires: mod_wsgi
39 Requires: mod_ssl
40 Requires: SOAPpy
41 Requires: python-simplejson
42 # for the RebootNodeWithPCU method
43 Requires: pcucontrol >= 1.0-6
44 # for OMF integration
45 Requires: pyaspects >= 0.4
46 Requires: python-twisted-words
47 Requires: python-twisted-web
48 # ldap
49 Requires: python-ldap
50 # for memcache
51 Requires: python-memcached
52 Requires: memcached
53 ### avoid having yum complain about updates, as stuff is moving around
54 # plc.d/api
55 Conflicts: MyPLC <= 4.3
56
57 # We use psycopg2
58 #
59 # but we don't need to rebuild it as we depend on distro's packages - baris
60 # BuildRequires: postgresql-devel
61
62 # Standard xmlrpc.so that ships with PHP does not marshal NULL
63 BuildRequires: php-devel
64 Obsoletes: php-xmlrpc
65 Provides: php-xmlrpc
66
67 # PostgreSQL and SOAPpy are necessary to run the API server, but not
68 # plcsh. Since the only supported method of running the server is via
69 # MyPLC anyway, don't be so stringent about binary requirements, in
70 # case people want to install this package just for plcsh.
71 # Requires: postgresql-server, SOAPpy
72 AutoReqProv: no
73
74 %description
75 The PLCAPI package provides an XML-RPC and SOAP API for accessing the
76 PlanetLab Central (PLC) database. The API may be accessed directly via
77 the Python shell program plcsh, through a toy standalone server, or
78 through Apache mod_python.
79
80 %prep
81 %setup -q
82
83 %build
84 # python-pycurl and python-psycopg2 avail. from fedora 5
85 # we used to ship our own version of psycopg2 and pycurl, for fedora4
86 # starting with 4.3, support for these two modules is taken out
87
88 # Build __init__.py metafiles and PHP API. 
89 %{__make} %{?_smp_mflags}
90 %{__make} -C wsdl
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94 %{__make} %{?_smp_mflags} install DESTDIR="$RPM_BUILD_ROOT" datadir="%{_datadir}" bindir="%{_bindir}"
95
96 # Install shell symlink
97 mkdir -p $RPM_BUILD_ROOT/%{_bindir}
98 ln -s %{_datadir}/plc_api/plcsh $RPM_BUILD_ROOT/%{_bindir}/plcsh
99
100 mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/php.d
101 cat > $RPM_BUILD_ROOT/%{_sysconfdir}/php.d/xmlrpc.ini <<EOF
102 ; Enable xmlrpc extension module
103 extension=xmlrpc.so
104 EOF
105
106 # Install initscripts
107 echo "* Installing initscripts"
108 find plc.d | cpio -p -d -u ${RPM_BUILD_ROOT}/etc/
109 chmod 755 ${RPM_BUILD_ROOT}/etc/plc.d/*
110
111 # Install db-config.d files
112 echo "* Installing db-config.d files"
113 mkdir -p ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d
114 cp db-config.d/* ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d
115 chmod 444 ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d/*
116
117 # Install wsdl
118 echo "* Installing wsdl"
119 install -D -m 644 wsdl/plcapi.wsdl $RPM_BUILD_ROOT/var/www/html/wsdl/plcapi.wsdl
120
121 # Install omf_slicemgr.py
122 install -D -m 755 omf/omf_slicemgr.py $RPM_BUILD_ROOT/usr/bin/omf_slicemgr.py
123 install -D -m 755 omf/reset_xmpp_pubsub_nodes.py $RPM_BUILD_ROOT/usr/bin/reset_xmpp_pubsub_nodes.py
124 mkdir -p $RPM_BUILD_ROOT/var/log/omf
125
126 # Install ratelimit log
127 touch $RPM_BUILD_ROOT/var/log/plc_api_ratelimit.log
128 chown apache:apache $RPM_BUILD_ROOT/var/log/plc_api_ratelimit.log
129
130 %clean
131 rm -rf $RPM_BUILD_ROOT
132
133 %define php_extension_dir %(php-config --extension-dir)
134
135 %files
136 %defattr(-,root,root,-)
137 %dir %{_datadir}/plc_api
138 %dir /var/log/omf/
139 %{_datadir}/plc_api/*
140 %{_bindir}/plcsh
141 %{php_extension_dir}/xmlrpc.so
142 %{_sysconfdir}/php.d/xmlrpc.ini
143 %config (noreplace) %{_datadir}/plc_api/PLC/Accessors/Accessors_site.py
144 /etc/plc.d
145 /etc/planetlab/db-config.d
146 /var/www/html/wsdl/plcapi.wsdl
147 /usr/bin/omf_slicemgr.py*
148 /usr/bin/reset_xmpp_pubsub_nodes.py*
149
150
151 %changelog
152 * Thu Sep 16 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-18
153 - fix RefreshPeer that was not working in 5.0-17
154
155 * Thu Sep 16 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-17
156 - RefreshPeer is able to cope with 2 peers running different releases of the api
157 - DeletePerson can be used on duplicates
158 - first appearance of ModPythonJson.py
159
160 * Wed Sep 01 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - plcapi-5.0-16
161 - set accessors return the new value
162 - tweaks in the pubsub groups management
163
164 * Wed Jul 28 2010 S.Çağlar Onur <caglar@cs.princeton.edu> - plcapi-5.0-15
165 - convert hostnames to lower case and use ILIKE instead of LIKE
166
167 * Fri Jul 16 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - plcapi-5.0-14
168 - use hrn in pubsub groups
169
170 * Tue Jul 13 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - plcapi-5.0-13
171 - - Add timestamps to Nodes, PCUs and Interfaces to make concrete statements about a node's configuration state.
172 - - OMF fixes
173
174 * Mon Jun 28 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - PLCAPI-5.0-12
175 - automatically set vsys tag for omf controlled slices
176
177 * Sat Jun 26 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-11
178 - addition of the 'ssh_key' slice tag
179 - first draft of the LDAP interface
180
181 * Tue Jun 22 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-10
182 - reservation granularity defined in plc-config-tty (requires myplc 5.0.5)
183 - and readable through GetLeaseGranularity
184 - GetSlivers to expose reservation_policy and lease_granularity
185 - GetBootMedium fixed for reservable nodes
186 - tweaks in pcucontrol (requires pcucontrol-1.0-6)
187 - new Apache mod_wsgi python interface
188
189 * Fri May 14 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-9
190 - the leases system
191
192 * Wed Apr 14 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-8
193 - previous tag had gone wrong
194
195 * Wed Apr 14 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - PLCAPI-5.0-6
196 - fix pubsub hostname
197
198 * Fri Apr 02 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-5
199 - tweaks for the omf support (xmpp groups and RC-controlled slices)
200 - BootNodeUpdate supports also ssh_rsa_key (and logs only changes)
201 - GetNodeFlavour exposes fcdistro
202
203 * Sun Mar 14 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-4
204 - do not use UpdateNode for handling the 'hrn' tag - should fix refresh peer & foreign nodes more generally
205
206 * Fri Mar 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-3
207 - slice tag 'omf_control' supported for getting OMF's resource controller shipped to slivers
208 - pyaspect hooks allow to  maintain the namespace xmpp groups
209 - new omf_slicemgr is a proxy to xmpp, used by these hooks
210 - nodes have their hrn exposed in the 'hrn' tag
211 - node hrn exposed in GetSlivers, as well as the overall xmpp config
212 - system slice 'drl' gets created by db-config
213 - daniel's changes to Filter for supporting wildcards in lists
214 - AddSliceTag consistency check tweaked
215
216 * Thu Feb 11 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-2
217 - major cleanup
218 - get rid of all 4.2-related legacy code
219 - reset the migrations code, planetlab5.sql somes with (5,100)
220 - uses hashlib module when available
221
222 * Fri Jan 29 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-5.0-1
223 - first working version of 5.0:
224 - pld.c/, db-config.d/ and nodeconfig/ scripts should now sit in the module they belong to
225 - nodefamily is 3-fold with pldistro-fcdistro-arch
226 - site and person tags
227 - new methods GetSliceFamily and GetNodeFlavour
228 - deprecated the dummynet stuff that were for the external dummyboxes
229 - tags definition : more consistency between db-config scripts and accessors
230 - (get accessor to create the tag type too if absent)
231 - logging an event for AddSliceToNodes
232
233 * Sat Jan 09 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-32
234 - support for fedora 12
235 - fix subtle bug in filtering with ] and quotes
236
237 * Fri Dec 18 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - PLCAPI-4.3-31
238 - * patch for php-5.3 (the one in f12)
239 - * validate email addresses with regex
240 - * add PersonTags and SiteTags
241 - * add additional accessors for node tags (kvariant, serial, ..)
242
243 * Tue Nov 03 2009 Marc Fiuczynski <mef@cs.princeton.edu> - PLCAPI-4.3-30
244 - Redacting password, session, and authstring values from the event log.
245
246 * Mon Oct 19 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-29
247 - let AddSite set ext_consortium_id - required for the poorman registration pages
248 - drop version constraint on Requires: postgresql-python
249 - don't log system calls nor ReportRunLevel
250
251 * Thu Oct 15 2009 Daniel Hokka Zakrisson <daniel@hozac.com> - PLCAPI-4.3-28
252 - Fix requires for CentOS.
253
254 * Fri Oct 09 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - PLCAPI-4.3-27
255 - Require postgresql 8.2 (for array operators && and @>)
256
257 * Thu Oct 08 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-26
258 - Filter now supports the | and & features to match in sequence values
259 - bugfix in the postgresql wrapper for sequence filter values
260 - reviewed GetSlivers to export admin keys more efficiently
261 - fix checking roles in UpdateSliceTag
262
263 * Sat Sep 26 2009 Marc Fiuczynski <mef@cs.princeton.edu> - PLCAPI-4.3-25
264 - - Some typos in the documentation were fixed.
265 - - UpdateSliceTag check if a node's min_role_id is >= (rather than >)
266 - to the tag's min_role_id.
267
268 * Fri Sep 18 2009 anil vengalil <avengali@sophia.inria.fr> - PLCAPI-4.3-24
269
270 * Mon Sep 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-23
271 - Ongoing work to add upcalls, using new SFA class
272 - new methods BindObjectToPeer, UnBindObjectFromPeer, still for SFA
273 - reviewed type-checking for the 3 taggable classes node-interface-slice
274 - cleanup ald dummynet stuff
275 - expose the 'extensions' accessors to the API
276 - tweaked checks in AddSliceTag
277 - GetPersons exposes roles by default
278 - bugfix in ReportRunLevel for non-string levels
279 - tweaks in GetSlivers ( seems that it now exposes the keys for the root context )
280
281 * Fri Jul 10 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-22
282 - new BindObjectToPeer method for sfa
283 - AddSliceTag and UpdateSliceTag open to the 'node' auth method with restrictions
284
285 * Wed Jul 01 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-21
286 - getbootmedium supports options as tags (serial, cramfs, kvariant, kargs, no-hangcheck )
287 - reportrunlevel logs its calls only when run_level changes
288 - pycurl more robust wrt to xmlrpclib.Transport
289
290 * Tue Jun 16 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-20
291 - produce a wsdl interface
292 - bugfix in getbootmedium for nodes with interface tags
293
294 * Sun Jun 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-19
295 - bugfix for some rare pattern-based filters
296
297 * Wed Jun 03 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-18
298 - improvements in the 4.2 legacy layer
299
300 * Sat May 30 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-17
301 - bugfix required for slice tags set on nodegroups
302
303 * Thu May 28 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-16
304 - more complete compatibility layer - second iteration, with legacy code isolated in Legacy/
305
306 * Tue May 26 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-15
307 - more powerful legacy layer with 4.2
308
309 * Fri May 15 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-14
310 - RefreshPeer sets lock per-peer to avoid multiple concurent instances
311 - migration script has an option for running interactively
312
313 * Wed May 06 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-13
314 - skips already added entries
315
316 * Tue Apr 28 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-12
317 - yet another set of fixes for external dummynet boxes
318
319 * Wed Apr 22 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-11
320 - GetDummyBoxMedium returns a base64-encoded boot image, doc is updated
321 - and tmp file is cleaned up
322
323 * Wed Apr 22 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-10
324 - restore missing ResolveSlices
325
326 * Mon Apr 20 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-9
327 - new method GetDummyBoxMedium
328
329 * Fri Apr 17 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-8
330 - remove duplicate in Methods/__init__ that was breaking build of myplc-docs
331
332 * Fri Apr 17 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-7
333 - support for external dummynet boxes back in 4.3 - first draft
334
335 * Thu Apr 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-6
336 - fixes for smooth federation between 4.2 and 4.3
337 - peername is not UNIQUE in schema anymore, was preventing delete/recreate
338
339 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-5
340 - support for BootCD variants (GetBootMedium ['variant:centos5'])
341 - fix corner case with filters like {'~slice_id':[]}
342 - fix transaction leak that caused the db connections pool to exhaust
343 - properly expose all methods, including Legacy/, and not only Methods/
344
345 * Tue Mar 24 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-4
346 - renumbered as 4.3
347 - nodes have new fields run_level (in addition to boot_state) and verified
348 - tweaked migration from 4.2
349 - tuned rpm dependencies
350 - doc generation more explicit about errors like missing python modules
351 - removed obsolete method GetSlicesMD5
352
353 * Wed Jan 28 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-3
354 - unified all tags
355 - renamed interface settings into interface tags and slice attributes into slice tags
356 - nodes have a node_type
357 - various changes on the way to 4.3
358
359 * Thu Nov 27 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-2
360 - Checkpointing : this version still has interface settings and slice attributes
361
362 * Wed Sep 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.3-1
363 - first iteration with taggable nodes/interfaces/slices
364 - embryo for ilinks
365 - cleaned up boot states
366 - migration script moslty complete
367
368 * Wed May 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-8
369 - fixed doc build by locating locally installed DTDs at build-time
370
371 * Fri May 09 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-7
372 - no more doc packaged outside of myplc-docs - doc/ cleaned up
373 - enhancements in doc on filters 
374 - bootcd-aware GetBootMedium merged from onelab
375
376 * Thu May 08 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-6
377 - checkpoint while the new myplc-docs package is underway
378 - bugfix: GetSlivers & conf files
379 - doc: removed target files 
380
381 * Wed Apr 23 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - PLCAPI-4.2-5
382 - Removed conditions on the persons, site, and nodes indexes.  previsouly only
383 - the non-deleted fields were index, resulting in massivly slow queries.
384
385
386 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-3 PLCAPI-4.2-4
387 - plcsh: better handling of options when running as a shell script
388 - getbootmedium exports compute_key
389 - tweaks for accepted args in GetPCUTypes and BootNotifyOwners
390
391 * Thu Feb 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-2 PLCAPI-4.2-3
392 - GetBootMedium support for build.sh full options, incl. serial & console_spec 
393 - GetBootMedium simpler, cleaner and safer use of tmpdirs in (dated from bootcustom.sh)
394
395 * Fri Feb 01 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-1 PLCAPI-4.2-2
396 - refresh peer script to use a month-dependent logfile
397 - tracking the starting point for UniPi integration of the dummynet boxes
398
399 * Thu Jan 31 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - PLCAPI-4.2-0 PLCAPI-4.2-1
400 - plcsh adds its own path to sys.path
401 - fix so GetNodes can be called from a Node
402
403 * Fri Oct 27 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 
404 - Initial build.
405
406 %define module_current_branch 4.3