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