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.
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/
88 rm -rf $RPM_BUILD_ROOT
91 if [ -n "$SUDO_USER" ] ; then
92 # Allow user to delete the build directory
94 # Some temporary cdroot files like /var/empty/sshd and
95 # /usr/bin/sudo get created with non-readable permissions.
96 find . -not -perm +0600 -exec chmod u+rw {} \;
97 # Allow user to delete the built RPM(s)
98 chown -R $SUDO_USER %{_rpmdir}/%{_arch}
102 if [ -x %{_sysconfdir}/init.d/plc ] ; then
103 %{_sysconfdir}/init.d/plc stop
106 # Old versions of myplc used to ship with a bootstrapped database and
107 # /etc/planetlab directory. Including generated files in the manifest
108 # was dangerous; if /plc/data/var/lib/pgsql/data/base/1/16676 changed
109 # names from one RPM build to another, it would be rpmsaved and thus
110 # effectively deleted. Now we do not include these files in the
111 # manifest. However, to avoid deleting these files in the process of
112 # upgrading from one of these old versions of myplc, we must back up
113 # the database and /etc/planetlab and restore them after the old
114 # version has been uninstalled in %triggerpostun.
116 # 0 = install, 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 ] ; then
120 mv /plc/data/$dir /plc/data/$dir.rpmsave
124 # Except for the default configuration file and DTD, which really
125 # should be considered for upgrade.
126 mkdir -m 755 -p /plc/data/etc/planetlab
127 mv /plc/data/etc/planetlab.rpmsave/{default_config.xml,plc_config.dtd} \
128 /plc/data/etc/planetlab/ || :
132 if [ -x /sbin/chkconfig ] ; then
133 /sbin/chkconfig --add plc
134 /sbin/chkconfig plc on
137 # Force a regeneration to take into account new variables
138 touch /plc/data/etc/planetlab/default_config.xml
140 %triggerpostun -- %{name}
141 # 0 = erase, 1 = upgrade
142 if [ $1 -gt 0 ] ; then
143 for dir in /var/lib/pgsql/data /etc/planetlab ; do
144 if [ -d /plc/data/$dir.rpmsave -a -d /plc/data/$dir ] ; then
145 if tar -C /plc/data/$dir.rpmsave -cpf - . | \
146 tar -C /plc/data/$dir -xpf - ; then
147 rm -rf /plc/data/$dir.rpmsave
154 # 0 = erase, 1 = upgrade
155 if [ $1 -eq 0 ] ; then
156 %{_sysconfdir}/init.d/plc stop
157 if [ -x /sbin/chkconfig ] ; then
158 /sbin/chkconfig plc off
159 /sbin/chkconfig --del plc
164 if [ -x %{_sysconfdir}/init.d/plc-devel ] ; then
165 %{_sysconfdir}/init.d/plc-devel stop
168 # 0 = install, 1 = upgrade
169 if [ $1 -gt 0 ] ; then
170 # Never overwrite /cvs
171 if [ -d /plc/devel/data/cvs ] ; then
172 echo "Preserving /plc/devel/data/cvs"
173 mv /plc/devel/data/cvs /plc/devel/data/cvs.rpmsave
178 if [ -x /sbin/chkconfig ] ; then
179 /sbin/chkconfig --add plc-devel
180 /sbin/chkconfig plc-devel on
183 %triggerpostun -- %{name}
184 # 0 = erase, 1 = upgrade
185 if [ $1 -gt 0 ] ; then
186 if [ -d /plc/devel/data/cvs.rpmsave ] ; then
187 echo "Restoring /plc/devel/data/cvs"
188 mv /plc/devel/data/cvs /plc/devel/data/cvs.%{version}-%{release}
189 mv /plc/devel/data/cvs.rpmsave /plc/devel/data/cvs
194 # 0 = erase, 1 = upgrade
195 if [ $1 -eq 0 ] ; then
196 %{_sysconfdir}/init.d/plc-devel stop
197 if [ -x /sbin/chkconfig ] ; then
198 /sbin/chkconfig plc-devel off
199 /sbin/chkconfig --del plc-devel
204 %defattr(-,root,root,-)
205 # Host startup script and configuration file
206 %{_sysconfdir}/init.d/plc
207 %{_sysconfdir}/sysconfig/plc
209 # Symlink to /etc/planetlab within data directory
210 %{_sysconfdir}/planetlab
218 %config(noreplace) /plc/data/*
221 %defattr(-,root,root,-)
222 # Host startup script and configuration file
223 %{_sysconfdir}/init.d/plc-devel
224 %{_sysconfdir}/sysconfig/plc-devel
232 %config(noreplace) /plc/devel/data/*
235 * Thu Jul 13 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.4-2, 0.5-2
237 - Build development environment (myplc-devel). Add support for
238 building myplc itself inside myplc-devel.
239 - Move step-specific initialization to appropriate plc.d scripts
240 - Fix postgresql startup failure when bootstrapping
241 - Allow CA to be configured for each SSL certificate set. Stop doing
242 root CA stuff, this is outside the scope of MyPLC. MyPLC now only
243 generates self-signed certificates, but supports replacement of the
244 self-signed certificates with real certifcates signed by another CA,
245 as long as the CA is specified.
246 - Self-sign the MA/SA SSL certificate (and by extension, the MA/SA API
248 - pl_mom: Workarounds for when NM queries time out.
249 - plc_api: Honor PLC_MAIL_ENABLED.
251 * Wed Jul 6 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.4-1, 0.5-1
252 - First stable release of MyPLC 0.4 RC1.
254 * Wed Apr 5 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.2-1
255 - Basic functionality complete. Consolidate into a single package
258 * Fri Mar 17 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.1-1