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: 2%{?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
27 Summary: PlanetLab Central (PLC) Development Environment
28 Group: Development/Tools
32 This package install a complete PlanetLab development environment
33 contained within a chroot jail. The default installation consists of a
34 local CVS repository bootstrapped with a snapshot of all PlanetLab
35 source code, and all the tools necessary to compile it.
42 ./build_devel.sh %{?cvstag:-t %{cvstag}}
43 ./build.sh %{?cvstag:-t %{cvstag}}
47 rm -rf $RPM_BUILD_ROOT
55 # Install host startup script and configuration file
56 install -D -m 755 host.init $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/plc
57 install -D -m 644 plc.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/plc
59 # Create convenient symlink
60 install -d -m 755 $RPM_BUILD_ROOT/%{_sysconfdir}
61 ln -sf /plc/data/etc/planetlab $RPM_BUILD_ROOT/%{_sysconfdir}/planetlab
63 # Install root filesystem
64 install -d -m 755 $RPM_BUILD_ROOT/plc/root
65 install -D -m 644 root.img $RPM_BUILD_ROOT/plc/root.img
67 # Install data directory
68 find data | cpio -p -d -u $RPM_BUILD_ROOT/plc/
74 # Install host startup script and configuration file
75 install -D -m 755 host.init $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/plc-devel
76 install -D -m 644 plc-devel.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/plc-devel
78 # Install root filesystem
79 install -d -m 755 $RPM_BUILD_ROOT/plc/devel/root
80 install -D -m 644 devel/root.img $RPM_BUILD_ROOT/plc/devel/root.img
82 # Install data directory
83 find devel/data | cpio -p -d -u $RPM_BUILD_ROOT/plc/
85 # Make sure /cvs is never upgraded once installed by giving it a
86 # unique name. A hard-linked copy is made in %post.
87 mv $RPM_BUILD_ROOT/plc/devel/data/{cvs,cvs-%{version}-%{release}}
92 rm -rf $RPM_BUILD_ROOT
95 if [ -n "$SUDO_USER" ] ; then
96 # Allow user to delete the build directory
98 # Some temporary cdroot files like /var/empty/sshd and
99 # /usr/bin/sudo get created with non-readable permissions.
100 find . -not -perm +0600 -exec chmod u+rw {} \;
101 # Allow user to delete the built RPM(s)
102 chown -R $SUDO_USER %{_rpmdir}/%{_arch}
106 if [ -x %{_sysconfdir}/init.d/plc ] ; then
107 %{_sysconfdir}/init.d/plc stop
110 # Old versions of myplc used to ship with a bootstrapped database and
111 # /etc/planetlab directory. Including generated files in the manifest
112 # was dangerous; if /plc/data/var/lib/pgsql/data/base/1/16676 changed
113 # names from one RPM build to another, it would be rpmsaved and thus
114 # effectively deleted. Now we do not include these files in the
115 # manifest. However, to avoid deleting these files in the process of
116 # upgrading from one of these old versions of myplc, we must back up
117 # the database and /etc/planetlab and restore them after the old
118 # version has been uninstalled in %triggerpostun (also in %post, in
119 # case we are force upgrading to the same version).
121 # This code can be removed once all myplc-0.4-1 installations have
122 # been upgraded to at least myplc-0.4-2.
124 # 0 = install, 1 = upgrade
125 if [ $1 -gt 0 ] ; then
126 for dir in /var/lib/pgsql/data /etc/planetlab ; do
127 if [ -d /plc/data/$dir ] ; then
128 echo "Preserving /plc/data/$dir"
129 mkdir -p /plc/data/$dir.rpmsave
130 tar -C /plc/data/$dir -cpf - . | \
131 tar -C /plc/data/$dir.rpmsave -xpf -
133 # Except for the default configuration file and DTD, which
134 # really should be considered for upgrade.
135 rm -f /plc/data/$dir.rpmsave/{default_config.xml,plc_config.dtd}
141 if [ -x /sbin/chkconfig ] ; then
142 /sbin/chkconfig --add plc
143 /sbin/chkconfig plc on
146 # Force a regeneration to take into account new variables
147 touch /plc/data/etc/planetlab/default_config.xml
149 %triggerpostun -- %{name}
150 # 0 = erase, 1 = upgrade
151 if [ $1 -gt 0 ] ; then
152 for dir in /var/lib/pgsql/data /etc/planetlab ; do
153 if [ -d /plc/data/$dir.rpmsave -a -d /plc/data/$dir ] ; then
154 echo "Merging /plc/data/$dir"
155 if tar -C /plc/data/$dir.rpmsave -cpf - . | \
156 tar -C /plc/data/$dir -xpf - ; then
157 rm -rf /plc/data/$dir.rpmsave
164 # 0 = erase, 1 = upgrade
165 if [ $1 -eq 0 ] ; then
166 %{_sysconfdir}/init.d/plc stop
167 if [ -x /sbin/chkconfig ] ; then
168 /sbin/chkconfig plc off
169 /sbin/chkconfig --del plc
174 if [ -x %{_sysconfdir}/init.d/plc-devel ] ; then
175 %{_sysconfdir}/init.d/plc-devel stop
179 if [ -x /sbin/chkconfig ] ; then
180 /sbin/chkconfig --add plc-devel
181 /sbin/chkconfig plc-devel on
184 # If /cvs does not already exist, make a hard-linked copy of this
185 # version's /cvs repository.
186 if [ ! -d /plc/devel/data/cvs ] ; then
187 cp -rl /plc/devel/data/{cvs-%{version}-%{release},cvs}
191 # 0 = erase, 1 = upgrade
192 if [ $1 -eq 0 ] ; then
193 %{_sysconfdir}/init.d/plc-devel stop
194 if [ -x /sbin/chkconfig ] ; then
195 /sbin/chkconfig plc-devel off
196 /sbin/chkconfig --del plc-devel
201 %defattr(-,root,root,-)
202 # Host startup script and configuration file
203 %{_sysconfdir}/init.d/plc
204 %{_sysconfdir}/sysconfig/plc
206 # Symlink to /etc/planetlab within data directory
207 %{_sysconfdir}/planetlab
215 %config(noreplace) /plc/data/*
218 %defattr(-,root,root,-)
219 # Host startup script and configuration file
220 %{_sysconfdir}/init.d/plc-devel
221 %{_sysconfdir}/sysconfig/plc-devel
229 %config(noreplace) /plc/devel/data/*
232 * Thu Jul 13 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.4-2, 0.5-2
234 - Fix many spec files (License replaces Copyright).
235 - Fix kernel build under gcc32 (module verification bug).
236 - Fix vnet build under gcc32
237 - Fix PlanetFlow. MySQL RPM postinstall script no longer starts the
238 server. Also, get hostnames list from PLC_WWW_HOST, not
240 - Fix pl_mom/bwmon to use cached values if NM is unresponsive
241 - Fix pl_mom/swapmon reset logic to avoid endless loops
242 - Remove ksymoops, add kernel-smp to standard PlanetLab package group
243 - Add kernel-smp boot support to bootmanager
244 - Add badblock search support to bootmanager
245 - Build development environment (myplc-devel). Add support for
246 building myplc itself inside myplc-devel.
247 - Move step-specific initialization to appropriate plc.d scripts
248 - Fix postgresql startup failure when bootstrapping
249 - Allow CA to be configured for each SSL certificate set. Stop doing
250 root CA stuff, this is outside the scope of MyPLC. MyPLC now only
251 generates self-signed certificates, but supports replacement of the
252 self-signed certificates with real certifcates signed by another CA,
253 as long as the CA is specified.
254 - Self-sign the MA/SA SSL certificate (and by extension, the MA/SA API
256 - pl_mom: Workarounds for when NM queries time out.
257 - plc_api: Honor PLC_MAIL_ENABLED.
259 * Wed Jul 6 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.4-1, 0.5-1
260 - First stable release of MyPLC 0.4 RC1.
262 * Wed Apr 5 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.2-1
263 - Basic functionality complete. Consolidate into a single package
266 * Fri Mar 17 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.1-1