9 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
10 %global python_sitearch %( python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)" )
16 Source0: %{name}-%{version}.tar.gz
17 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
21 Packager: PlanetLab Central <support@planet-lab.org>
22 Distribution: PlanetLab %{plrelease}
23 URL: %(echo %{url} | cut -d ' ' -f 2)
25 %define nodefamily %{pldistro}-%{distroname}-%{_arch}
27 ####################### myplc
28 Summary: PlanetLab Central (PLC) Portable Installation
29 Group: Applications/Systems
31 # as much as possible, requires should go in the subpackages specfile
42 Requires: python-devel
56 Requires: xmlsec1-openssl
57 %if "%{distro}" == "Fedora" && %{distrorelease} >= 10
64 # make sure to remove 2-fold nodefamily stuff
65 Conflicts: bootcd-%{pldistro}-%{_arch}
66 Requires: bootcd-%{nodefamily}
67 Requires: bootcd-initscripts
69 Requires: www-register-wizard
72 # make sure to remove 2-fold nodefamily stuff
73 Conflicts: bootstrapfs-%{pldistro}-%{_arch}
74 Requires: bootstrapfs-%{nodefamily}
76 Requires: myplc-release
77 Requires: myplc-config
79 %define debug_package %{nil}
82 MyPLC is a complete PlanetLab Central (PLC) portable installation
83 contained within a chroot jail. The default installation consists of a
84 web server, an XML-RPC API server, a boot server, and a database
85 server: the core components of PLC. The installation may be customized
86 through a graphical interface. All PLC services are started up and
87 shut down through a single System V init script installed in the host
90 ####################### myplc-config
94 Summary: PlanetLab Central (PLC) configuration python module
95 Group: Applications/Systems
99 This package provides the Python module to configure MyPLC.
108 rm -rf $RPM_BUILD_ROOT
110 # Install configuration scripts
111 echo "* Installing plc_config.py in " ${PYTHON_SITEARCH}
112 PYTHON_SITEARCH=`python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)'`
113 install -D -m 755 plc_config.py ${RPM_BUILD_ROOT}/${PYTHON_SITEARCH}/plc_config.py
115 echo "* Installing scripts in /usr/bin"
116 mkdir -p ${RPM_BUILD_ROOT}/usr/bin
117 rsync -av --exclude .svn bin/ ${RPM_BUILD_ROOT}/usr/bin/
118 chmod 755 ${RPM_BUILD_ROOT}/usr/bin/*
121 echo "* Installing plc initscript"
122 install -D -m 755 plc.init ${RPM_BUILD_ROOT}/etc/init.d/plc
124 # Install initscripts
125 echo "* Installing plc.d initscripts"
126 find plc.d | cpio -p -d -u ${RPM_BUILD_ROOT}/etc/
127 chmod 755 ${RPM_BUILD_ROOT}/etc/plc.d/*
129 # Install db-config.d files
130 echo "* Installing db-config.d files"
131 mkdir -p ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d
132 cp db-config.d/* ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d
133 chmod 444 ${RPM_BUILD_ROOT}/etc/planetlab/db-config.d/*
135 # Extra scripts (mostly for mail and dns) not installed by myplc by default. Used in production
136 echo "* Installing scripts in /etc/support-scripts"
137 mkdir -p ${RPM_BUILD_ROOT}/etc/support-scripts
138 cp support-scripts/* ${RPM_BUILD_ROOT}/etc/support-scripts
139 chmod 444 ${RPM_BUILD_ROOT}/etc/support-scripts/*
141 # copy initscripts to etc/plc_sliceinitscripts
142 mkdir -p ${RPM_BUILD_ROOT}/etc/plc_sliceinitscripts
143 cp plc_sliceinitscripts/* ${RPM_BUILD_ROOT}/etc/plc_sliceinitscripts
144 chmod 444 ${RPM_BUILD_ROOT}/etc/plc_sliceinitscripts/*
146 # Install configuration file
147 echo "* myplc: Installing configuration file"
148 install -D -m 444 plc_config.dtd ${RPM_BUILD_ROOT}/etc/planetlab/plc_config.dtd
149 sed -e "s,@PLDISTRO@,%{pldistro},g" -e "s,@FCDISTRO@,%{fcdistro},g" -e "s,@ARCH@,%{_arch},g" \
150 default_config.xml > ${RPM_BUILD_ROOT}/etc/planetlab/default_config.xml
151 chmod 444 ${RPM_BUILD_ROOT}/etc/planetlab/default_config.xml
153 echo "* Installing bashrc convenience"
154 install -D -m 644 bashrc ${RPM_BUILD_ROOT}/usr/share/myplc/bashrc
156 # yumgroups.xml and yum repo : let noderepo handle that
159 rm -rf $RPM_BUILD_ROOT
162 if [ -x %{_sysconfdir}/init.d/plc ] ; then
163 %{_sysconfdir}/init.d/plc stop
166 # Old versions of myplc used to ship with a bootstrapped database and
167 # /etc/planetlab directory. Including generated files in the manifest
168 # was dangerous; if /plc/data/var/lib/pgsql/data/base/1/16676 changed
169 # names from one RPM build to another, it would be rpmsaved and thus
170 # effectively deleted. Now we do not include these files in the
171 # manifest. However, to avoid deleting these files in the process of
172 # upgrading from one of these old versions of myplc, we must back up
173 # the database and /etc/planetlab and restore them after the old
174 # version has been uninstalled in %triggerpostun (also in %post, in
175 # case we are force upgrading to the same version).
177 # This code can be removed once all myplc-0.4-1 installations have
178 # been upgraded to at least myplc-0.4-2.
180 # 0 = install, 1 = upgrade
181 if [ $1 -gt 0 ] ; then
182 for dir in /var/lib/pgsql/data /etc/planetlab ; do
183 if [ -d $dir ] ; then
184 echo "Preserving $dir"
185 mkdir -p $dir.rpmsave
186 tar -C $dir -cpf - . | \
187 tar -C $dir.rpmsave -xpf -
189 # Except for the default configuration file and DTD, which
190 # really should be considered for upgrade.
191 rm -f $dir.rpmsave/{default_config.xml,plc_config.dtd}
197 if [ -x /sbin/chkconfig ] ; then
198 /sbin/chkconfig --add plc
199 /sbin/chkconfig plc on
202 %triggerpostun -- %{name}
203 # 0 = erase, 1 = upgrade
204 if [ $1 -gt 0 ] ; then
205 for dir in /var/lib/pgsql/data /etc/planetlab ; do
206 if [ -d $dir.rpmsave -a -d $dir ] ; then
208 if tar -C $dir.rpmsave -cpf - . | \
209 tar -C $dir -xpf - ; then
217 # 0 = erase, 1 = upgrade
218 if [ $1 -eq 0 ] ; then
219 %{_sysconfdir}/init.d/plc stop
220 if [ -x /sbin/chkconfig ] ; then
221 /sbin/chkconfig plc off
222 /sbin/chkconfig --del plc
227 %defattr(-,root,root,-)
228 # Host startup script and configuration file
232 /etc/plc_sliceinitscripts
235 /usr/share/myplc/bashrc
238 %defattr(-,root,root,-)
240 %{python_sitearch}/plc_config.py*
244 * Sat Jan 09 2010 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-37
245 - support for fedora 12
246 - new package myplc-config for use by sfa
247 - drupal user registration turned off
249 * Thu Dec 31 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-36
250 - - fix to make sure when API, BOOT, MONITOR are on the same
251 - machine as WWW that the SSL key,cert for WWW takes precedence.
252 - - Do proper setup for SSL CA certficate to be used as the server
255 * Wed Dec 23 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-35
256 - - Change sysctl.conf source to be PlanetLabConfsysctl.con rather than the php script.
258 * Tue Dec 22 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - MyPLC-4.3-34
259 - depend on pcucontrol
261 * Fri Dec 18 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - MyPLC-4.3-33
262 - * validate input according to type in plc_config
263 - * added the _genicw system slice
264 - * add tag types for sites and persons
265 - * add new tags for nodes and slices for exemption from myops
267 * Thu Nov 26 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-32
268 - turn off drupal on a box that acts as BOOT server but not as WWW server
269 - cleanup some obsolete code for old chroot-jail packaging in the process
270 - new bootcd-kernel script for keeping bootcd variants up2date
272 * Mon Nov 09 2009 Daniel Hokka Zakrisson <daniel@hozac.com> - MyPLC-4.3-31
273 - Make the /etc/hosts manipulation optional.
275 * Thu Nov 05 2009 Daniel Hokka Zakrisson <daniel@hozac.com> - MyPLC-4.3-30
278 * Tue Nov 03 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-29
279 - - Added "SetRole()" so that db-config.d/ scriplets can insert roles
281 - - Added the root ssh key handling support back into plc.d/ssh and the
282 - default xml file. This should be identical to the way it was in
284 - - Added support in the db-config.d/01-init script to register the root
285 - ssh public key with the default administrator. In this way the root
286 - ssh key will make it into the root account on the nodes by means of
287 - NodeManager's specialaccounts plugin.
289 * Tue Oct 20 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-28
290 - db-config ignores sliver tags
291 - sirius's db-config script renamed (was sirious)
293 * Tue Oct 13 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-27
294 - fix for silverauth - missing tag types now created at plc startup time
296 * Fri Oct 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-26
297 - plc.d/ssl preserves SSL certificates when it thinkfs they're obsolete
299 * Wed Oct 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-25
300 - companion to NM's specialaccounts plugin
301 - do not generate /etc/planetlab/root_ssh_key* anymore
302 - remove related config. variables and conf_files
304 * Sun Sep 20 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.3-24
305 - clarified description text to refer only to plcrt and not other optional
308 * Sat Sep 19 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.3-23
309 - fixed a bug setting slice multiple attributes with the same tag name
311 * Mon Sep 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-22
312 - SSL setup for monitor box, and related new config variables
313 - new conf_file for /etc/planetlab/extensions
314 - various tweaks in db-config internals, about initscripts among others
315 - also more messages defined in the db
317 * Tue Jul 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-21
318 - create node tags, like e.g. 'arch', that were not handled with 4.3-20
320 * Tue Jul 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-20
321 - bugfix in db-config, tag 4.3-19 would not fly
323 * Mon Jul 06 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-19
324 - Refactored db-config into snippets in db-config.d/.
326 * Thu Jul 02 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-18
327 - oops, tag 4.3-17 was broken and would not work
329 * Wed Jul 01 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-17
330 - bugfix - escape sequences inserted in xml configs
332 * Fri Jun 26 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-16
333 - Handle db-config.d files properly.
335 * Tue Jun 23 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-15
336 - - Fix /etc/init.d/plc to have command usage show up on the tty rather
338 - - Fix db-config to be a bit more cautious when
339 - /etc/planetlab/db-config.d doesn''t exist
340 - - Clean up db-config approach to ignore .bak, *~, .rpm{save,new}, and
342 - - Refactor generic plc-config-tty code into plc_config.py.
343 - plc-config-tty now contains MyPLC specific paths, "usual" variables,
344 - and the list of validated variables and the corresponding
345 - validator() function. This refactoring lets one reuse plc_config.py
346 - as a generic cmdline configuration tool for highly customer MyPLC
349 * Mon Jun 15 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.3-14
350 - update PCU Type descriptions.
351 - updates to init scripts
353 * Wed Jun 03 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-13
354 - requires monitor-pcucontrol so register-wizard can work
356 * Tue May 26 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-12
357 - cleaned up plc-config-tty, no more need to configure plc-devel
359 * Tue May 19 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-11
360 - first draft of plc-orpha-accounts.py, and rename check-ssl-peering into plc-<>
362 * Wed May 06 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-9
363 - fix issue in db-config that prevented correct operation
365 * Wed May 06 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-8
366 - remove support for chroot-based packaging - no crond nor syslog step anymore
367 - plc init script now named plc.init instead of former guest.init
369 * Mon May 04 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.3-7
370 - add Monitor to docs build
372 * Wed Apr 29 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-6
373 - plc_config.py and plc-config-tty: generalized to work for more diverse
374 - MyPLC configurations.
375 - plc.d/httpd: only update httpd_conf with /data for chroot-ed MyPLC
376 - deployments and increase the memory limits in php.ini
377 - plc.d/crond: add --full option to vacuumdb
379 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-5
380 - avoid generating ssl certificates for disabled services among www api boot
382 * Mon Mar 30 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-4
383 - cleaned up old entries in db-config
386 * Tue Mar 24 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-3
387 - php include path tweaked for plekit includes
388 - reviewed myplc (fka native) packaging dependencies
391 * Thu Jan 29 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-2
392 - rename myplc into myplc-chroot and myplc-native into myplc
393 - new settings (shortname & hrn_root) for local peer
395 * Wed Sep 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-1
396 - First iteration of new data model
397 - Bunch of various fixes
399 * Tue May 20 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - MyPLC-4.2-15
400 - Removed proper ops from planetflow slice.
402 * Wed May 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-14
403 - myplc-native requires myplc-docs
404 - fixed doc build by locating locally installed DTDs at build-time
406 * Sun May 11 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-13
407 - turn myplc-docs off for now
409 * Sat May 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-12
410 - figures in doc package
412 * Fri May 09 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-11
413 - no more doc packaged outside of myplc-docs - doc/ cleaned up
414 - chroot packaging does not have docs anymore
415 - 'cvs' and 'dev' not required from myplc-native anymore
416 - cosmetic change in kml output
418 * Thu May 08 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-10
419 - defaults for *_IP conf vars now void, expect more accurate /etc/hosts
420 - gethostbyname uses python rather than perl (hope this shrinks deps)
421 - doc: reviewed myplc doc - deprecated everything related to myplc-devel
422 - doc: packaging doc in myplc-native (myplc&PLCAPI) & removed target files from svn
423 - make sync now works towards vserver-based myplc only
425 * Mon May 05 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-9
427 - added vsys 'pfmount' script to the default netflow slice attributes.
430 * Thu Apr 24 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-8
431 - plc.d/bootcd step altered for handling legacy bootcd smooth migration
432 - to new bootcd packaging
434 * Wed Apr 23 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-7
435 - changes needed for bootcd 4.2 : new, possible multiple, installation locations, and new rpm name
437 * Tue Apr 22 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-6
438 - packaging of mplc-release in myplc-native
439 - sudoers.php is new to PlanetLabConf (needs nodeconfig-4.2-4)
440 - resolv file in /etc/resolv.conf, not plc_resolv.conf
441 - improved sirius script
442 - remove the 'driver' node-network-setting that was unused, and new 'Multihome' category
443 - expires more properly set
445 * Mon Apr 07 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-4 MyPLC-4.2-5
448 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-3 MyPLC-4.2-4
449 - renew_reminder script moved to support-scripts/
450 - gen-aliases script added in support-scripts/
451 - sirius initscript moved to plc_sliceinitscripts (formerly inlined in db-config)
452 - plc-map script : no javascript for googlemap anymore, see new plc-kml script instead
453 - nodefamily-aware (creates legacy symlink /var/www/html/install-rpms/planetlab)
454 - new native slice attributes 'capabilities', 'vsys' and 'codemux'
455 - new setting 'Mom list address' for sending emails to a separate destination
456 - starts rsyslogd/syslogd as appropriate
457 - expects nodeconfig package (former PlanetLabConf/ dir from PLCWWW)
458 - convenience generation of yum.conf in resulting image based on build/mirroring
460 * Thu Feb 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-4.2-2 myplc-4.2-3
461 - refresh-peer.py removed (duplicate with PLCAPI)
462 - plc.d/ scripts cleaned up
463 - sirius initscript updated
464 - slice auto renewal fixed
466 * Fri Aug 31 2007 Marc E. Fiuczynski <mef@CS.Princeton.EDU>
469 %define module_current_branch 4.3