10 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
12 Summary: PlanetLab Central (PLC) Portable Installation
17 Group: Applications/Systems
18 Source0: %{name}-%{version}.tar.gz
19 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
23 Packager: PlanetLab Central <support@planet-lab.org>
24 Distribution: PlanetLab %{plrelease}
25 URL: %(echo %{url} | cut -d ' ' -f 2)
27 # as much as possible, requires should go in the subpackages specfile
38 Requires: python-devel
53 Requires: xmlsec1-openssl
56 Requires: bootcd-%{pldistro}-%{_arch}
58 Requires: www-register-wizard
61 # TODO: pack pcucontrol as a separate package. myplc only requires
62 # pcucontrol (which is now provided by monitor-server).
63 Requires: monitor-server
64 Requires: bootstrapfs-%{pldistro}-%{_arch}
66 Requires: myplc-release
68 # argh - ugly - we might wish to use something from build/config.%{pldistro} instead
69 %if "%{pldistro}" == "onelab"
70 Requires: dummynet_image
73 %define debug_package %{nil}
76 MyPLC is a complete PlanetLab Central (PLC) portable installation
77 contained within a chroot jail. The default installation consists of a
78 web server, an XML-RPC API server, a boot server, and a database
79 server: the core components of PLC. The installation may be customized
80 through a graphical interface. All PLC services are started up and
81 shut down through a single System V init script installed in the host
91 rm -rf $RPM_BUILD_ROOT
92 ./build.sh %{pldistro} $RPM_BUILD_ROOT
96 rm -rf $RPM_BUILD_ROOT
99 if [ -n "$SUDO_USER" ] ; then
100 # Allow user to delete the build directory
101 chown -h -R $SUDO_USER .
102 # Some temporary cdroot files like /var/empty/sshd and
103 # /usr/bin/sudo get created with non-readable permissions.
104 find . -not -perm +0600 -exec chmod u+rw {} \;
105 # Allow user to delete the built RPM(s)
106 [ -d %{_rpmdir}/noarch ] && chown -h -R $SUDO_USER %{_rpmdir}/noarch
110 if [ -x %{_sysconfdir}/init.d/plc ] ; then
111 %{_sysconfdir}/init.d/plc stop
114 # Old versions of myplc used to ship with a bootstrapped database and
115 # /etc/planetlab directory. Including generated files in the manifest
116 # was dangerous; if /plc/data/var/lib/pgsql/data/base/1/16676 changed
117 # names from one RPM build to another, it would be rpmsaved and thus
118 # effectively deleted. Now we do not include these files in the
119 # manifest. However, to avoid deleting these files in the process of
120 # upgrading from one of these old versions of myplc, we must back up
121 # the database and /etc/planetlab and restore them after the old
122 # version has been uninstalled in %triggerpostun (also in %post, in
123 # case we are force upgrading to the same version).
125 # This code can be removed once all myplc-0.4-1 installations have
126 # been upgraded to at least myplc-0.4-2.
128 # 0 = install, 1 = upgrade
129 if [ $1 -gt 0 ] ; then
130 for dir in /var/lib/pgsql/data /etc/planetlab ; do
131 if [ -d $dir ] ; then
132 echo "Preserving $dir"
133 mkdir -p $dir.rpmsave
134 tar -C $dir -cpf - . | \
135 tar -C $dir.rpmsave -xpf -
137 # Except for the default configuration file and DTD, which
138 # really should be considered for upgrade.
139 rm -f $dir.rpmsave/{default_config.xml,plc_config.dtd}
145 if [ -x /sbin/chkconfig ] ; then
146 /sbin/chkconfig --add plc
147 /sbin/chkconfig plc on
149 pushd /usr/share/myplc &> /dev/null
150 python plc_config.py build
151 python plc_config.py install
154 %triggerpostun -- %{name}
155 # 0 = erase, 1 = upgrade
156 if [ $1 -gt 0 ] ; then
157 for dir in /var/lib/pgsql/data /etc/planetlab ; do
158 if [ -d $dir.rpmsave -a -d $dir ] ; then
160 if tar -C $dir.rpmsave -cpf - . | \
161 tar -C $dir -xpf - ; then
169 # 0 = erase, 1 = upgrade
170 if [ $1 -eq 0 ] ; then
171 %{_sysconfdir}/init.d/plc stop
172 if [ -x /sbin/chkconfig ] ; then
173 /sbin/chkconfig plc off
174 /sbin/chkconfig --del plc
179 %defattr(-,root,root,-)
180 # Host startup script and configuration file
184 /etc/plc_sliceinitscripts/sirius
185 /etc/support-scripts/gen_aliases.py*
186 /etc/support-scripts/renew_reminder.py*
187 /etc/support-scripts/renew_reminder_logrotate
189 /usr/bin/plc-config-tty
194 /usr/bin/refresh-peer.py*
195 /usr/bin/clean-empty-dirs.py*
197 /usr/bin/plc-check-ssl-peering.py*
198 /usr/bin/plc-orphan-accounts.py*
202 * Fri Dec 18 2009 Baris Metin <Talip-Baris.Metin@sophia.inria.fr> - MyPLC-4.3-33
203 - * validate input according to type in plc_config
204 - * added the _genicw system slice
205 - * add tag types for sites and persons
206 - * add new tags for nodes and slices for exemption from myops
208 * Thu Nov 26 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-32
209 - turn off drupal on a box that acts as BOOT server but not as WWW server
210 - cleanup some obsolete code for old chroot-jail packaging in the process
211 - new bootcd-kernel script for keeping bootcd variants up2date
213 * Mon Nov 09 2009 Daniel Hokka Zakrisson <daniel@hozac.com> - MyPLC-4.3-31
214 - Make the /etc/hosts manipulation optional.
216 * Thu Nov 05 2009 Daniel Hokka Zakrisson <daniel@hozac.com> - MyPLC-4.3-30
219 * Tue Nov 03 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-29
220 - - Added "SetRole()" so that db-config.d/ scriplets can insert roles
222 - - Added the root ssh key handling support back into plc.d/ssh and the
223 - default xml file. This should be identical to the way it was in
225 - - Added support in the db-config.d/01-init script to register the root
226 - ssh public key with the default administrator. In this way the root
227 - ssh key will make it into the root account on the nodes by means of
228 - NodeManager's specialaccounts plugin.
230 * Tue Oct 20 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-28
231 - db-config ignores sliver tags
232 - sirius's db-config script renamed (was sirious)
234 * Tue Oct 13 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-27
235 - fix for silverauth - missing tag types now created at plc startup time
237 * Fri Oct 09 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-26
238 - plc.d/ssl preserves SSL certificates when it thinkfs they're obsolete
240 * Wed Oct 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-25
241 - companion to NM's specialaccounts plugin
242 - do not generate /etc/planetlab/root_ssh_key* anymore
243 - remove related config. variables and conf_files
245 * Sun Sep 20 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.3-24
246 - clarified description text to refer only to plcrt and not other optional
249 * Sat Sep 19 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.3-23
250 - fixed a bug setting slice multiple attributes with the same tag name
252 * Mon Sep 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-22
253 - SSL setup for monitor box, and related new config variables
254 - new conf_file for /etc/planetlab/extensions
255 - various tweaks in db-config internals, about initscripts among others
256 - also more messages defined in the db
258 * Tue Jul 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-21
259 - create node tags, like e.g. 'arch', that were not handled with 4.3-20
261 * Tue Jul 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-20
262 - bugfix in db-config, tag 4.3-19 would not fly
264 * Mon Jul 06 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-19
265 - Refactored db-config into snippets in db-config.d/.
267 * Thu Jul 02 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-18
268 - oops, tag 4.3-17 was broken and would not work
270 * Wed Jul 01 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-17
271 - bugfix - escape sequences inserted in xml configs
273 * Fri Jun 26 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-16
274 - Handle db-config.d files properly.
276 * Tue Jun 23 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-15
277 - - Fix /etc/init.d/plc to have command usage show up on the tty rather
279 - - Fix db-config to be a bit more cautious when
280 - /etc/planetlab/db-config.d doesn't exist
281 - - Clean up db-config approach to ignore .bak, *~, .rpm{save,new}, and
283 - - Refactor generic plc-config-tty code into plc_config.py.
284 - plc-config-tty now contains MyPLC specific paths, "usual" variables,
285 - and the list of validated variables and the corresponding
286 - validator() function. This refactoring lets one reuse plc_config.py
287 - as a generic cmdline configuration tool for highly customer MyPLC
290 * Mon Jun 15 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.3-14
291 - update PCU Type descriptions.
292 - updates to init scripts
294 * Wed Jun 03 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-13
295 - requires monitor-pcucontrol so register-wizard can work
297 * Tue May 26 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-12
298 - cleaned up plc-config-tty, no more need to configure plc-devel
300 * Tue May 19 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-11
301 - first draft of plc-orpha-accounts.py, and rename check-ssl-peering into plc-<>
303 * Wed May 06 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-9
304 - fix issue in db-config that prevented correct operation
306 * Wed May 06 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-8
307 - remove support for chroot-based packaging - no crond nor syslog step anymore
308 - plc init script now named plc.init instead of former guest.init
310 * Mon May 04 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.3-7
311 - add Monitor to docs build
313 * Wed Apr 29 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-6
314 - plc_config.py and plc-config-tty: generalized to work for more diverse
315 - MyPLC configurations.
316 - plc.d/httpd: only update httpd_conf with /data for chroot-ed MyPLC
317 - deployments and increase the memory limits in php.ini
318 - plc.d/crond: add --full option to vacuumdb
320 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-5
321 - avoid generating ssl certificates for disabled services among www api boot
323 * Mon Mar 30 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-4
324 - cleaned up old entries in db-config
327 * Tue Mar 24 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-3
328 - php include path tweaked for plekit includes
329 - reviewed myplc (fka native) packaging dependencies
332 * Thu Jan 29 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-2
333 - rename myplc into myplc-chroot and myplc-native into myplc
334 - new settings (shortname & hrn_root) for local peer
336 * Wed Sep 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-1
337 - First iteration of new data model
338 - Bunch of various fixes
340 * Tue May 20 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - MyPLC-4.2-15
341 - Removed proper ops from planetflow slice.
343 * Wed May 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-14
344 - myplc-native requires myplc-docs
345 - fixed doc build by locating locally installed DTDs at build-time
347 * Sun May 11 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-13
348 - turn myplc-docs off for now
350 * Sat May 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-12
351 - figures in doc package
353 * Fri May 09 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-11
354 - no more doc packaged outside of myplc-docs - doc/ cleaned up
355 - chroot packaging does not have docs anymore
356 - 'cvs' and 'dev' not required from myplc-native anymore
357 - cosmetic change in kml output
359 * Thu May 08 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-10
360 - defaults for *_IP conf vars now void, expect more accurate /etc/hosts
361 - gethostbyname uses python rather than perl (hope this shrinks deps)
362 - doc: reviewed myplc doc - deprecated everything related to myplc-devel
363 - doc: packaging doc in myplc-native (myplc&PLCAPI) & removed target files from svn
364 - make sync now works towards vserver-based myplc only
366 * Mon May 05 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-9
368 - added vsys 'pfmount' script to the default netflow slice attributes.
371 * Thu Apr 24 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-8
372 - plc.d/bootcd step altered for handling legacy bootcd smooth migration
373 - to new bootcd packaging
375 * Wed Apr 23 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-7
376 - changes needed for bootcd 4.2 : new, possible multiple, installation locations, and new rpm name
378 * Tue Apr 22 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-6
379 - packaging of mplc-release in myplc-native
380 - sudoers.php is new to PlanetLabConf (needs nodeconfig-4.2-4)
381 - resolv file in /etc/resolv.conf, not plc_resolv.conf
382 - improved sirius script
383 - remove the 'driver' node-network-setting that was unused, and new 'Multihome' category
384 - expires more properly set
386 * Mon Apr 07 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-4 MyPLC-4.2-5
389 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-3 MyPLC-4.2-4
390 - renew_reminder script moved to support-scripts/
391 - gen-aliases script added in support-scripts/
392 - sirius initscript moved to plc_sliceinitscripts (formerly inlined in db-config)
393 - plc-map script : no javascript for googlemap anymore, see new plc-kml script instead
394 - nodefamily-aware (creates legacy symlink /var/www/html/install-rpms/planetlab)
395 - new native slice attributes 'capabilities', 'vsys' and 'codemux'
396 - new setting 'Mom list address' for sending emails to a separate destination
397 - starts rsyslogd/syslogd as appropriate
398 - expects nodeconfig package (former PlanetLabConf/ dir from PLCWWW)
399 - convenience generation of yum.conf in resulting image based on build/mirroring
401 * Thu Feb 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-4.2-2 myplc-4.2-3
402 - refresh-peer.py removed (duplicate with PLCAPI)
403 - plc.d/ scripts cleaned up
404 - sirius initscript updated
405 - slice auto renewal fixed
407 * Fri Aug 31 2007 Marc E. Fiuczynski <mef@CS.Princeton.EDU>
410 %define module_current_branch 4.2