5 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
6 %global python_sitearch %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" )
12 Source0: %{name}-%{version}.tar.gz
13 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
17 Packager: PlanetLab Central <support@planet-lab.org>
18 Distribution: PlanetLab %{plrelease}
21 %define nodefamily %{pldistro}-%{distroname}-%{_arch}
23 ####################### myplc
24 Summary: PlanetLab Central (PLC) Portable Installation
25 Group: Applications/Systems
27 # as much as possible, requires should go in the subpackages specfile
38 Requires: python-devel
52 Requires: xmlsec1-openssl
53 %if "%{distro}" == "Fedora" && %{distrorelease} >= 10
60 Requires: bootcd-%{nodefamily}
61 Requires: bootcd-initscripts
63 Requires: www-register-wizard
67 Requires: bootstrapfs-%{nodefamily}
69 Requires: myplc-release
70 Requires: myplc-config
72 %define debug_package %{nil}
75 MyPLC is a complete PlanetLab Central (PLC) portable installation
76 contained within a chroot jail. The default installation consists of a
77 web server, an XML-RPC API server, a boot server, and a database
78 server: the core components of PLC. The installation may be customized
79 through a graphical interface. All PLC services are started up and
80 shut down through a single System V init script installed in the host
83 ####################### myplc-config
87 Summary: PlanetLab Central (PLC) configuration python module
88 Group: Applications/Systems
92 This package provides the Python module to configure MyPLC.
101 rm -rf $RPM_BUILD_ROOT
103 # Install configuration scripts
104 echo "* Installing plc_config.py in " ${PYTHON_SITEARCH}
105 PYTHON_SITEARCH=`python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)'`
106 install -D -m 755 plc_config.py ${RPM_BUILD_ROOT}/${PYTHON_SITEARCH}/plc_config.py
108 echo "* Installing scripts in /usr/bin"
109 mkdir -p ${RPM_BUILD_ROOT}/usr/bin
110 rsync -av --exclude .svn bin/ ${RPM_BUILD_ROOT}/usr/bin/
111 chmod 755 ${RPM_BUILD_ROOT}/usr/bin/*
114 echo "* Installing plc initscript"
115 install -D -m 755 plc.init ${RPM_BUILD_ROOT}/etc/init.d/plc
117 # Install initscripts
118 echo "* Installing plc.d initscripts"
119 find plc.d | cpio -p -d -u ${RPM_BUILD_ROOT}/etc/
120 chmod 755 ${RPM_BUILD_ROOT}/etc/plc.d/*
122 # Install db-config.d files
123 echo "* Installing db-config.d files"
124 mkdir -p ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d
125 cp db-config.d/* ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d
126 chmod 444 ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d/*
128 # Extra scripts (mostly for mail and dns) not installed by myplc by default. Used in production
129 echo "* Installing scripts in /etc/support-scripts"
130 mkdir -p ${RPM_BUILD_ROOT}/etc/support-scripts
131 cp support-scripts/* ${RPM_BUILD_ROOT}/etc/support-scripts
132 chmod 444 ${RPM_BUILD_ROOT}/etc/support-scripts/*
134 # copy initscripts to etc/plc_sliceinitscripts
135 mkdir -p ${RPM_BUILD_ROOT}/etc/plc_sliceinitscripts
136 cp plc_sliceinitscripts/* ${RPM_BUILD_ROOT}/etc/plc_sliceinitscripts
137 chmod 444 ${RPM_BUILD_ROOT}/etc/plc_sliceinitscripts/*
139 # Install configuration file
140 echo "* myplc: Installing configuration file"
141 install -D -m 444 plc_config.dtd ${RPM_BUILD_ROOT}/etc/planetlab/plc_config.dtd
142 sed -e "s,@PLDISTRO@,%{pldistro},g" -e "s,@FCDISTRO@,%{distroname},g" -e "s,@ARCH@,%{_arch},g" \
143 default_config.xml > ${RPM_BUILD_ROOT}/etc/planetlab/default_config.xml
144 chmod 444 ${RPM_BUILD_ROOT}/etc/planetlab/default_config.xml
146 echo "* Installing bashrc convenience"
147 install -D -m 644 bashrc ${RPM_BUILD_ROOT}/usr/share/myplc/bashrc
149 # yumgroups.xml and yum repo : let noderepo handle that
152 rm -rf $RPM_BUILD_ROOT
155 if [ -x %{_sysconfdir}/init.d/plc ] ; then
156 %{_sysconfdir}/init.d/plc stop
159 # Old versions of myplc used to ship with a bootstrapped database and
160 # /etc/planetlab directory. Including generated files in the manifest
161 # was dangerous; if /plc/data/var/lib/pgsql/data/base/1/16676 changed
162 # names from one RPM build to another, it would be rpmsaved and thus
163 # effectively deleted. Now we do not include these files in the
164 # manifest. However, to avoid deleting these files in the process of
165 # upgrading from one of these old versions of myplc, we must back up
166 # the database and /etc/planetlab and restore them after the old
167 # version has been uninstalled in %triggerpostun (also in %post, in
168 # case we are force upgrading to the same version).
170 # This code can be removed once all myplc-0.4-1 installations have
171 # been upgraded to at least myplc-0.4-2.
173 # 0 = install, 1 = upgrade
174 if [ $1 -gt 0 ] ; then
175 for dir in /var/lib/pgsql/data /etc/planetlab ; do
176 if [ -d $dir ] ; then
177 echo "Preserving $dir"
178 mkdir -p $dir.rpmsave
179 tar -C $dir -cpf - . | \
180 tar -C $dir.rpmsave -xpf -
182 # Except for the default configuration file and DTD, which
183 # really should be considered for upgrade.
184 rm -f $dir.rpmsave/{default_config.xml,plc_config.dtd}
190 if [ -x /sbin/chkconfig ] ; then
191 /sbin/chkconfig --add plc
192 /sbin/chkconfig plc on
195 %triggerpostun -- %{name}
196 # 0 = erase, 1 = upgrade
197 if [ $1 -gt 0 ] ; then
198 for dir in /var/lib/pgsql/data /etc/planetlab ; do
199 if [ -d $dir.rpmsave -a -d $dir ] ; then
201 if tar -C $dir.rpmsave -cpf - . | \
202 tar -C $dir -xpf - ; then
210 # 0 = erase, 1 = upgrade
211 if [ $1 -eq 0 ] ; then
212 %{_sysconfdir}/init.d/plc stop
213 if [ -x /sbin/chkconfig ] ; then
214 /sbin/chkconfig plc off
215 /sbin/chkconfig --del plc
220 %defattr(-,root,root,-)
221 # Host startup script and configuration file
225 /etc/plc_sliceinitscripts
227 /usr/share/myplc/bashrc
228 # keep a detailed list, to avoid duplicate of plc-config,
229 # that belongs to the myplc-config rpm
230 /usr/bin/plc-config-tty
233 /usr/bin/refresh-peer.py*
234 /usr/bin/partial-repo.sh
238 /usr/bin/clean-empty-dirs.py*
239 /usr/bin/plc-check-ssl-peering.py*
240 /usr/bin/plc-orphan-accounts.py*
241 /usr/bin/spot-aliens.py*
242 /usr/bin/spot-dup-accounts.sh
245 %defattr(-,root,root,-)
247 %{python_sitearch}/plc_config.py*
251 * Mon Jan 24 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-5.0-13
252 - no semantic change - just fixed specfile for git URL
254 * Wed Dec 01 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-5.0-12
255 - needed for plcapi-5.0-19, i.e. tag permissions based on roles
257 * Mon Oct 04 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - myplc-5.0-11
258 - add missing files to rpm package
260 * Mon Oct 04 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-5.0-10
261 - mtail.py -s for SFA
262 - spot-aliesm.py is a utility script for sanity checks of the PLC db when running refreshpeer+sfa
264 * Thu Jul 15 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-5.0-9
265 - avoid duplication of the plc-config binary in both myplc and myplc-config rpms
267 * Mon Jul 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-5.0-8
268 - plc-config-tty now has a validator on booleans
269 - e.g. entering 'True' now is rejected rather than silently recording 'false'
271 * Tue Jul 06 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - MyPLC-5.0-7
274 * Mon Jul 05 2010 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - MyPLC-5.0-6
275 - module name changes
278 * Tue Jun 22 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-5.0-5
279 - new setting PLC_RESERVATION_GRANULARITY
281 * Wed May 12 2010 Talip Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - MyPLC-5.0-4
282 - * partial-repo.sh script
283 - * preserve key along with certificates
285 * Fri Apr 02 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-5.0-3
286 - set date.timezone to GMT if not set in php.ini for php-5.3 / fedora12
288 * Fri Mar 12 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-5.0-2
289 - legacy scripts gen-sites-xml & gen-static-content back in (sigh)
290 - new OMF category in the config
291 - create the drl system slice
293 * Fri Jan 29 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-5.0-1
294 - first working version of 5.0:
295 - pld.c/, db-config.d/ and nodeconfig/ scripts should now sit in the module they belong to
296 - nodefamily is 3-fold with pldistro-fcdistro-arch
297 - new PLC_FLAVOUR config category
298 - reviewed module layout
299 - cleaned up old chroot-related build stuff (does not need the build module when building anymore)
301 * Sat Jan 09 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-37
302 - support for fedora 12
303 - new package myplc-config for use by sfa
304 - drupal user registration turned off
306 * Thu Dec 31 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-36
307 - - fix to make sure when API, BOOT, MONITOR are on the same
308 - machine as WWW that the SSL key,cert for WWW takes precedence.
309 - - Do proper setup for SSL CA certficate to be used as the server
312 * Wed Dec 23 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-35
313 - - Change sysctl.conf source to be PlanetLabConfsysctl.con rather than the php script.
315 * Tue Dec 22 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - MyPLC-4.3-34
316 - depend on pcucontrol
318 * Fri Dec 18 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - MyPLC-4.3-33
319 - * validate input according to type in plc_config
320 - * added the _genicw system slice
321 - * add tag types for sites and persons
322 - * add new tags for nodes and slices for exemption from myops
324 * Thu Nov 26 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-32
325 - turn off drupal on a box that acts as BOOT server but not as WWW server
326 - cleanup some obsolete code for old chroot-jail packaging in the process
327 - new bootcd-kernel script for keeping bootcd variants up2date
329 * Mon Nov 09 2009 Daniel Hokka Zakrisson <daniel@hozac.com> - MyPLC-4.3-31
330 - Make the /etc/hosts manipulation optional.
332 * Thu Nov 05 2009 Daniel Hokka Zakrisson <daniel@hozac.com> - MyPLC-4.3-30
335 * Tue Nov 03 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-29
336 - - Added "SetRole()" so that db-config.d/ scriplets can insert roles
338 - - Added the root ssh key handling support back into plc.d/ssh and the
339 - default xml file. This should be identical to the way it was in
341 - - Added support in the db-config.d/01-init script to register the root
342 - ssh public key with the default administrator. In this way the root
343 - ssh key will make it into the root account on the nodes by means of
344 - NodeManager's specialaccounts plugin.
346 * Tue Oct 20 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-28
347 - db-config ignores sliver tags
348 - sirius's db-config script renamed (was sirious)
350 * Tue Oct 13 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-27
351 - fix for silverauth - missing tag types now created at plc startup time
353 * Fri Oct 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-26
354 - plc.d/ssl preserves SSL certificates when it thinkfs they're obsolete
356 * Wed Oct 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-25
357 - companion to NM's specialaccounts plugin
358 - do not generate /etc/planetlab/root_ssh_key* anymore
359 - remove related config. variables and conf_files
361 * Sun Sep 20 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.3-24
362 - clarified description text to refer only to plcrt and not other optional
365 * Sat Sep 19 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.3-23
366 - fixed a bug setting slice multiple attributes with the same tag name
368 * Mon Sep 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-22
369 - SSL setup for monitor box, and related new config variables
370 - new conf_file for /etc/planetlab/extensions
371 - various tweaks in db-config internals, about initscripts among others
372 - also more messages defined in the db
374 * Tue Jul 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-21
375 - create node tags, like e.g. 'arch', that were not handled with 4.3-20
377 * Tue Jul 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-20
378 - bugfix in db-config, tag 4.3-19 would not fly
380 * Mon Jul 06 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-19
381 - Refactored db-config into snippets in db-config.d/.
383 * Thu Jul 02 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-18
384 - oops, tag 4.3-17 was broken and would not work
386 * Wed Jul 01 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-17
387 - bugfix - escape sequences inserted in xml configs
389 * Fri Jun 26 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-16
390 - Handle db-config.d files properly.
392 * Tue Jun 23 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-15
393 - - Fix /etc/init.d/plc to have command usage show up on the tty rather
395 - - Fix db-config to be a bit more cautious when
396 - /etc/planetlab/db-config.d doesn''t exist
397 - - Clean up db-config approach to ignore .bak, *~, .rpm{save,new}, and
399 - - Refactor generic plc-config-tty code into plc_config.py.
400 - plc-config-tty now contains MyPLC specific paths, "usual" variables,
401 - and the list of validated variables and the corresponding
402 - validator() function. This refactoring lets one reuse plc_config.py
403 - as a generic cmdline configuration tool for highly customer MyPLC
406 * Mon Jun 15 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.3-14
407 - update PCU Type descriptions.
408 - updates to init scripts
410 * Wed Jun 03 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-13
411 - requires monitor-pcucontrol so register-wizard can work
413 * Tue May 26 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-12
414 - cleaned up plc-config-tty, no more need to configure plc-devel
416 * Tue May 19 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-11
417 - first draft of plc-orpha-accounts.py, and rename check-ssl-peering into plc-<>
419 * Wed May 06 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-9
420 - fix issue in db-config that prevented correct operation
422 * Wed May 06 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-8
423 - remove support for chroot-based packaging - no crond nor syslog step anymore
424 - plc init script now named plc.init instead of former guest.init
426 * Mon May 04 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.3-7
427 - add Monitor to docs build
429 * Wed Apr 29 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-6
430 - plc_config.py and plc-config-tty: generalized to work for more diverse
431 - MyPLC configurations.
432 - plc.d/httpd: only update httpd_conf with /data for chroot-ed MyPLC
433 - deployments and increase the memory limits in php.ini
434 - plc.d/crond: add --full option to vacuumdb
436 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-5
437 - avoid generating ssl certificates for disabled services among www api boot
439 * Mon Mar 30 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-4
440 - cleaned up old entries in db-config
443 * Tue Mar 24 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-3
444 - php include path tweaked for plekit includes
445 - reviewed myplc (fka native) packaging dependencies
448 * Thu Jan 29 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-2
449 - rename myplc into myplc-chroot and myplc-native into myplc
450 - new settings (shortname & hrn_root) for local peer
452 * Wed Sep 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-1
453 - First iteration of new data model
454 - Bunch of various fixes
456 * Tue May 20 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - MyPLC-4.2-15
457 - Removed proper ops from planetflow slice.
459 * Wed May 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-14
460 - myplc-native requires myplc-docs
461 - fixed doc build by locating locally installed DTDs at build-time
463 * Sun May 11 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-13
464 - turn myplc-docs off for now
466 * Sat May 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-12
467 - figures in doc package
469 * Fri May 09 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-11
470 - no more doc packaged outside of myplc-docs - doc/ cleaned up
471 - chroot packaging does not have docs anymore
472 - 'cvs' and 'dev' not required from myplc-native anymore
473 - cosmetic change in kml output
475 * Thu May 08 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-10
476 - defaults for *_IP conf vars now void, expect more accurate /etc/hosts
477 - gethostbyname uses python rather than perl (hope this shrinks deps)
478 - doc: reviewed myplc doc - deprecated everything related to myplc-devel
479 - doc: packaging doc in myplc-native (myplc&PLCAPI) & removed target files from svn
480 - make sync now works towards vserver-based myplc only
482 * Mon May 05 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-9
484 - added vsys 'pfmount' script to the default netflow slice attributes.
487 * Thu Apr 24 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-8
488 - plc.d/bootcd step altered for handling legacy bootcd smooth migration
489 - to new bootcd packaging
491 * Wed Apr 23 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-7
492 - changes needed for bootcd 4.2 : new, possible multiple, installation locations, and new rpm name
494 * Tue Apr 22 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-6
495 - packaging of mplc-release in myplc-native
496 - sudoers.php is new to PlanetLabConf (needs nodeconfig-4.2-4)
497 - resolv file in /etc/resolv.conf, not plc_resolv.conf
498 - improved sirius script
499 - remove the 'driver' node-network-setting that was unused, and new 'Multihome' category
500 - expires more properly set
502 * Mon Apr 07 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-4 MyPLC-4.2-5
505 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-3 MyPLC-4.2-4
506 - renew_reminder script moved to support-scripts/
507 - gen-aliases script added in support-scripts/
508 - sirius initscript moved to plc_sliceinitscripts (formerly inlined in db-config)
509 - plc-map script : no javascript for googlemap anymore, see new plc-kml script instead
510 - nodefamily-aware (creates legacy symlink /var/www/html/install-rpms/planetlab)
511 - new native slice attributes 'capabilities', 'vsys' and 'codemux'
512 - new setting 'Mom list address' for sending emails to a separate destination
513 - starts rsyslogd/syslogd as appropriate
514 - expects nodeconfig package (former PlanetLabConf/ dir from PLCWWW)
515 - convenience generation of yum.conf in resulting image based on build/mirroring
517 * Thu Feb 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-4.2-2 myplc-4.2-3
518 - refresh-peer.py removed (duplicate with PLCAPI)
519 - plc.d/ scripts cleaned up
520 - sirius initscript updated
521 - slice auto renewal fixed
523 * Fri Aug 31 2007 Marc E. Fiuczynski <mef@CS.Princeton.EDU>
526 %define module_current_branch 4.3