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: 3%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11 Group: Applications/Systems
12 Source0: %{name}-%{version}.tar.gz
13 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
15 # for preventing myplc-devel from being built
16 # *should* support invokation like rpmbuild --define "build_level 0"
17 # *but* this does not seem to work : so just set to 0 here
18 %{!?build_level: %define build_devel 1}
20 %define debug_package %{nil}
23 MyPLC is a complete PlanetLab Central (PLC) portable installation
24 contained within a chroot jail. The default installation consists of a
25 web server, an XML-RPC API server, a boot server, and a database
26 server: the core components of PLC. The installation may be customized
27 through a graphical interface. All PLC services are started up and
28 shut down through a single System V init script installed in the host
33 Summary: PlanetLab Central (PLC) Development Environment
34 Group: Development/Tools
40 This package install a complete PlanetLab development environment
41 contained within a chroot jail. The default installation consists of a
42 local CVS repository bootstrapped with a snapshot of all PlanetLab
43 source code, and all the tools necessary to compile it.
52 echo -n "XXXXXXXXXXXXXXX myplc::build_devel " ; date
53 ./build_devel.sh %{?cvstag:-t %{cvstag}}
55 echo -n "XXXXXXXXXXXXXXX myplc::build " ; date
56 ./build.sh %{?cvstag:-t %{cvstag}}
57 echo -n "XXXXXXXXXXXXXXX myplc::endbuild " ; date
61 rm -rf $RPM_BUILD_ROOT
69 # Install host startup script and configuration file
70 install -D -m 755 host.init $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/plc
71 install -D -m 644 plc.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/plc
73 # Create convenient symlink
74 install -d -m 755 $RPM_BUILD_ROOT/%{_sysconfdir}
75 ln -sf /plc/data/etc/planetlab $RPM_BUILD_ROOT/%{_sysconfdir}/planetlab
77 # Install root filesystem
78 install -d -m 755 $RPM_BUILD_ROOT/plc/root
79 install -D -m 644 root.img $RPM_BUILD_ROOT/plc/root.img
81 # Install data directory
82 find data | cpio -p -d -u $RPM_BUILD_ROOT/plc/
90 # Install host startup script and configuration file
91 install -D -m 755 host.init $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/plc-devel
92 install -D -m 644 plc-devel.sysconfig $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/plc-devel
94 # Install root filesystem
95 install -d -m 755 $RPM_BUILD_ROOT/plc/devel/root
96 install -D -m 644 devel/root.img $RPM_BUILD_ROOT/plc/devel/root.img
98 # Install data directory
99 find devel/data | cpio -p -d -u $RPM_BUILD_ROOT/plc/
101 # Make sure /cvs is never upgraded once installed by giving it a
102 # unique name. A hard-linked copy is made in %post.
103 mv $RPM_BUILD_ROOT/plc/devel/data/{cvs,cvs-%{version}-%{release}}
110 rm -rf $RPM_BUILD_ROOT
113 if [ -n "$SUDO_USER" ] ; then
114 # Allow user to delete the build directory
115 chown -h -R $SUDO_USER .
116 # Some temporary cdroot files like /var/empty/sshd and
117 # /usr/bin/sudo get created with non-readable permissions.
118 find . -not -perm +0600 -exec chmod u+rw {} \;
119 # Allow user to delete the built RPM(s)
120 chown -h -R $SUDO_USER %{_rpmdir}/%{_arch}
124 if [ -x %{_sysconfdir}/init.d/plc ] ; then
125 %{_sysconfdir}/init.d/plc stop
128 # Old versions of myplc used to ship with a bootstrapped database and
129 # /etc/planetlab directory. Including generated files in the manifest
130 # was dangerous; if /plc/data/var/lib/pgsql/data/base/1/16676 changed
131 # names from one RPM build to another, it would be rpmsaved and thus
132 # effectively deleted. Now we do not include these files in the
133 # manifest. However, to avoid deleting these files in the process of
134 # upgrading from one of these old versions of myplc, we must back up
135 # the database and /etc/planetlab and restore them after the old
136 # version has been uninstalled in %triggerpostun (also in %post, in
137 # case we are force upgrading to the same version).
139 # This code can be removed once all myplc-0.4-1 installations have
140 # been upgraded to at least myplc-0.4-2.
142 # 0 = install, 1 = upgrade
143 if [ $1 -gt 0 ] ; then
144 for dir in /var/lib/pgsql/data /etc/planetlab ; do
145 if [ -d /plc/data/$dir ] ; then
146 echo "Preserving /plc/data/$dir"
147 mkdir -p /plc/data/$dir.rpmsave
148 tar -C /plc/data/$dir -cpf - . | \
149 tar -C /plc/data/$dir.rpmsave -xpf -
151 # Except for the default configuration file and DTD, which
152 # really should be considered for upgrade.
153 rm -f /plc/data/$dir.rpmsave/{default_config.xml,plc_config.dtd}
159 if [ -x /sbin/chkconfig ] ; then
160 /sbin/chkconfig --add plc
161 /sbin/chkconfig plc on
164 %triggerpostun -- %{name}
165 # 0 = erase, 1 = upgrade
166 if [ $1 -gt 0 ] ; then
167 for dir in /var/lib/pgsql/data /etc/planetlab ; do
168 if [ -d /plc/data/$dir.rpmsave -a -d /plc/data/$dir ] ; then
169 echo "Merging /plc/data/$dir"
170 if tar -C /plc/data/$dir.rpmsave -cpf - . | \
171 tar -C /plc/data/$dir -xpf - ; then
172 rm -rf /plc/data/$dir.rpmsave
179 # 0 = erase, 1 = upgrade
180 if [ $1 -eq 0 ] ; then
181 %{_sysconfdir}/init.d/plc stop
182 if [ -x /sbin/chkconfig ] ; then
183 /sbin/chkconfig plc off
184 /sbin/chkconfig --del plc
190 if [ -x %{_sysconfdir}/init.d/plc-devel ] ; then
191 %{_sysconfdir}/init.d/plc-devel stop
197 if [ -x /sbin/chkconfig ] ; then
198 /sbin/chkconfig --add plc-devel
199 /sbin/chkconfig plc-devel on
202 # If /cvs does not already exist, make a hard-linked copy of this
203 # version's /cvs repository.
204 if [ ! -d /plc/devel/data/cvs ] ; then
205 cp -rl /plc/devel/data/{cvs-%{version}-%{release},cvs}
211 # 0 = erase, 1 = upgrade
212 if [ $1 -eq 0 ] ; then
213 %{_sysconfdir}/init.d/plc-devel stop
214 if [ -x /sbin/chkconfig ] ; then
215 /sbin/chkconfig plc-devel off
216 /sbin/chkconfig --del plc-devel
222 %defattr(-,root,root,-)
223 # Host startup script and configuration file
224 %{_sysconfdir}/init.d/plc
225 %{_sysconfdir}/sysconfig/plc
227 # Symlink to /etc/planetlab within data directory
228 %{_sysconfdir}/planetlab
236 %config(noreplace) /plc/data/*
240 %defattr(-,root,root,-)
241 # Host startup script and configuration file
242 %{_sysconfdir}/init.d/plc-devel
243 %{_sysconfdir}/sysconfig/plc-devel
251 %config(noreplace) /plc/devel/data/*
255 * Tue Aug 22 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.4-3, 0.5-3
257 - Fix upgrade path from RC1.
258 - Always regenerate plc_config.xml at first startup
259 - Upgrade kernel, iptables, vnet to 2.6.17-1.2142_FC4-3.planetlab
260 - Minor PlanetFlow fixes
261 - pl_mom/swapmon: Minor fixes
262 - bootcd: Added Supermicro IPMI support
263 - bootmanager: Cleanup, fixed check for new disks
265 * Wed Aug 09 2006 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
266 - introduces variable %{build_devel} to allow custom sites to skip building
267 the myplc-devel package.
269 * Thu Jul 13 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.4-2, 0.5-2
271 - Fix many spec files (License replaces Copyright).
272 - Fix kernel build under gcc32 (module verification bug).
273 - Fix vnet build under gcc32
274 - Fix PlanetFlow. MySQL RPM postinstall script no longer starts the
275 server. Also, get hostnames list from PLC_WWW_HOST, not
277 - Fix pl_mom/bwmon to use cached values if NM is unresponsive
278 - Fix pl_mom/swapmon reset logic to avoid endless loops
279 - Remove ksymoops, add kernel-smp to standard PlanetLab package group
280 - Add kernel-smp boot support to bootmanager
281 - Add badblock search support to bootmanager
282 - Build development environment (myplc-devel). Add support for
283 building myplc itself inside myplc-devel.
284 - Move step-specific initialization to appropriate plc.d scripts
285 - Fix postgresql startup failure when bootstrapping
286 - Allow CA to be configured for each SSL certificate set. Stop doing
287 root CA stuff, this is outside the scope of MyPLC. MyPLC now only
288 generates self-signed certificates, but supports replacement of the
289 self-signed certificates with real certifcates signed by another CA,
290 as long as the CA is specified.
291 - Self-sign the MA/SA SSL certificate (and by extension, the MA/SA API
293 - pl_mom: Workarounds for when NM queries time out.
294 - plc_api: Honor PLC_MAIL_ENABLED.
296 * Wed Jul 6 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.4-1, 0.5-1
297 - First stable release of MyPLC 0.4 RC1.
299 * Wed Apr 5 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.2-1
300 - Basic functionality complete. Consolidate into a single package
303 * Fri Mar 17 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.1-1