2 Packager: PlanetLab Central <support@planet-lab.org>
3 Distribution: PlanetLab 4.0
4 URL: http://cvs.planet-lab.org/cvs/myplc
6 Summary: PlanetLab Central (PLC) Portable Installation
9 Release: 4%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11 Group: Applications/Systems
12 Source0: %{name}-%{version}.tar.gz
13 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
15 %define debug_package %{nil}
18 MyPLC is a complete PlanetLab Central (PLC) portable installation
19 contained within a chroot jail. The default installation consists of a
20 web server, an XML-RPC API server, a boot server, and a database
21 server: the core components of PLC. The installation may be customized
22 through a graphical interface. All PLC services are started up and
23 shut down through a single System V init script installed in the host
35 rm -rf $RPM_BUILD_ROOT
43 # Install host startup script and configuration file
44 install -D -m 755 host.init $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/plc
45 install -D -m 644 plc.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/plc
47 # Create convenient symlink
48 install -d -m 755 $RPM_BUILD_ROOT/%{_sysconfdir}
49 ln -sf /plc/data/etc/planetlab $RPM_BUILD_ROOT/%{_sysconfdir}/planetlab
51 # Install root filesystem
52 install -d -m 755 $RPM_BUILD_ROOT/plc/root
53 install -D -m 644 root.img $RPM_BUILD_ROOT/plc/root.img
55 # Install data directory
56 find data | cpio -p -d -u $RPM_BUILD_ROOT/plc/
61 rm -rf $RPM_BUILD_ROOT
64 if [ -n "$SUDO_USER" ] ; then
65 # Allow user to delete the build directory
66 chown -h -R $SUDO_USER .
67 # Some temporary cdroot files like /var/empty/sshd and
68 # /usr/bin/sudo get created with non-readable permissions.
69 find . -not -perm +0600 -exec chmod u+rw {} \;
70 # Allow user to delete the built RPM(s)
71 chown -h -R $SUDO_USER %{_rpmdir}/%{_arch}
75 if [ -x %{_sysconfdir}/init.d/plc ] ; then
76 %{_sysconfdir}/init.d/plc stop
79 # Old versions of myplc used to ship with a bootstrapped database and
80 # /etc/planetlab directory. Including generated files in the manifest
81 # was dangerous; if /plc/data/var/lib/pgsql/data/base/1/16676 changed
82 # names from one RPM build to another, it would be rpmsaved and thus
83 # effectively deleted. Now we do not include these files in the
84 # manifest. However, to avoid deleting these files in the process of
85 # upgrading from one of these old versions of myplc, we must back up
86 # the database and /etc/planetlab and restore them after the old
87 # version has been uninstalled in %triggerpostun (also in %post, in
88 # case we are force upgrading to the same version).
90 # This code can be removed once all myplc-0.4-1 installations have
91 # been upgraded to at least myplc-0.4-2.
93 # 0 = install, 1 = upgrade
94 if [ $1 -gt 0 ] ; then
95 for dir in /var/lib/pgsql/data /etc/planetlab ; do
96 if [ -d /plc/data/$dir ] ; then
97 echo "Preserving /plc/data/$dir"
98 mkdir -p /plc/data/$dir.rpmsave
99 tar -C /plc/data/$dir -cpf - . | \
100 tar -C /plc/data/$dir.rpmsave -xpf -
102 # Except for the default configuration file and DTD, which
103 # really should be considered for upgrade.
104 rm -f /plc/data/$dir.rpmsave/{default_config.xml,plc_config.dtd}
110 if [ -x /sbin/chkconfig ] ; then
111 /sbin/chkconfig --add plc
112 /sbin/chkconfig plc on
115 %triggerpostun -- %{name}
116 # 0 = erase, 1 = upgrade
117 if [ $1 -gt 0 ] ; then
118 for dir in /var/lib/pgsql/data /etc/planetlab ; do
119 if [ -d /plc/data/$dir.rpmsave -a -d /plc/data/$dir ] ; then
120 echo "Merging /plc/data/$dir"
121 if tar -C /plc/data/$dir.rpmsave -cpf - . | \
122 tar -C /plc/data/$dir -xpf - ; then
123 rm -rf /plc/data/$dir.rpmsave
130 # 0 = erase, 1 = upgrade
131 if [ $1 -eq 0 ] ; then
132 %{_sysconfdir}/init.d/plc stop
133 if [ -x /sbin/chkconfig ] ; then
134 /sbin/chkconfig plc off
135 /sbin/chkconfig --del plc
140 %defattr(-,root,root,-)
141 # Host startup script and configuration file
142 %{_sysconfdir}/init.d/plc
143 %{_sysconfdir}/sysconfig/plc
145 # Symlink to /etc/planetlab within data directory
146 %{_sysconfdir}/planetlab
154 %config(noreplace) /plc/data/*
157 * Fri Jan 19 2007 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.5-3
158 - Split off myplc-devel into separate spec file, so that it can be
161 * Tue Aug 22 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.4-3, 0.5-3
163 - Fix upgrade path from RC1.
164 - Always regenerate plc_config.xml at first startup
165 - Upgrade kernel, iptables, vnet to 2.6.17-1.2142_FC4-3.planetlab
166 - Minor PlanetFlow fixes
167 - pl_mom/swapmon: Minor fixes
168 - bootcd: Added Supermicro IPMI support
169 - bootmanager: Cleanup, fixed check for new disks
171 * Wed Aug 09 2006 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
172 - introduces variable %{build_devel} to allow custom sites to skip building
173 the myplc-devel package.
175 * Thu Jul 13 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.4-2, 0.5-2
177 - Fix many spec files (License replaces Copyright).
178 - Fix kernel build under gcc32 (module verification bug).
179 - Fix vnet build under gcc32
180 - Fix PlanetFlow. MySQL RPM postinstall script no longer starts the
181 server. Also, get hostnames list from PLC_WWW_HOST, not
183 - Fix pl_mom/bwmon to use cached values if NM is unresponsive
184 - Fix pl_mom/swapmon reset logic to avoid endless loops
185 - Remove ksymoops, add kernel-smp to standard PlanetLab package group
186 - Add kernel-smp boot support to bootmanager
187 - Add badblock search support to bootmanager
188 - Build development environment (myplc-devel). Add support for
189 building myplc itself inside myplc-devel.
190 - Move step-specific initialization to appropriate plc.d scripts
191 - Fix postgresql startup failure when bootstrapping
192 - Allow CA to be configured for each SSL certificate set. Stop doing
193 root CA stuff, this is outside the scope of MyPLC. MyPLC now only
194 generates self-signed certificates, but supports replacement of the
195 self-signed certificates with real certifcates signed by another CA,
196 as long as the CA is specified.
197 - Self-sign the MA/SA SSL certificate (and by extension, the MA/SA API
199 - pl_mom: Workarounds for when NM queries time out.
200 - plc_api: Honor PLC_MAIL_ENABLED.
202 * Wed Jul 6 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.4-1, 0.5-1
203 - First stable release of MyPLC 0.4 RC1.
205 * Wed Apr 5 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.2-1
206 - Basic functionality complete. Consolidate into a single package
209 * Fri Mar 17 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.1-1