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 Requires: bootstrapfs-%{pldistro}-%{_arch}
63 Requires: myplc-release
65 # argh - ugly - we might wish to use something from build/config.%{pldistro} instead
66 %if "%{pldistro}" == "onelab"
67 Requires: dummynet_image
70 %define debug_package %{nil}
73 MyPLC is a complete PlanetLab Central (PLC) portable installation
74 contained within a chroot jail. The default installation consists of a
75 web server, an XML-RPC API server, a boot server, and a database
76 server: the core components of PLC. The installation may be customized
77 through a graphical interface. All PLC services are started up and
78 shut down through a single System V init script installed in the host
88 rm -rf $RPM_BUILD_ROOT
89 ./build.sh %{pldistro} $RPM_BUILD_ROOT
93 rm -rf $RPM_BUILD_ROOT
96 if [ -n "$SUDO_USER" ] ; then
97 # Allow user to delete the build directory
98 chown -h -R $SUDO_USER .
99 # Some temporary cdroot files like /var/empty/sshd and
100 # /usr/bin/sudo get created with non-readable permissions.
101 find . -not -perm +0600 -exec chmod u+rw {} \;
102 # Allow user to delete the built RPM(s)
103 [ -d %{_rpmdir}/noarch ] && chown -h -R $SUDO_USER %{_rpmdir}/noarch
107 if [ -x %{_sysconfdir}/init.d/plc ] ; then
108 %{_sysconfdir}/init.d/plc stop
111 # Old versions of myplc used to ship with a bootstrapped database and
112 # /etc/planetlab directory. Including generated files in the manifest
113 # was dangerous; if /plc/data/var/lib/pgsql/data/base/1/16676 changed
114 # names from one RPM build to another, it would be rpmsaved and thus
115 # effectively deleted. Now we do not include these files in the
116 # manifest. However, to avoid deleting these files in the process of
117 # upgrading from one of these old versions of myplc, we must back up
118 # the database and /etc/planetlab and restore them after the old
119 # version has been uninstalled in %triggerpostun (also in %post, in
120 # case we are force upgrading to the same version).
122 # This code can be removed once all myplc-0.4-1 installations have
123 # been upgraded to at least myplc-0.4-2.
125 # 0 = install, 1 = upgrade
126 if [ $1 -gt 0 ] ; then
127 for dir in /var/lib/pgsql/data /etc/planetlab ; do
128 if [ -d $dir ] ; then
129 echo "Preserving $dir"
130 mkdir -p $dir.rpmsave
131 tar -C $dir -cpf - . | \
132 tar -C $dir.rpmsave -xpf -
134 # Except for the default configuration file and DTD, which
135 # really should be considered for upgrade.
136 rm -f $dir.rpmsave/{default_config.xml,plc_config.dtd}
142 if [ -x /sbin/chkconfig ] ; then
143 /sbin/chkconfig --add plc
144 /sbin/chkconfig plc on
146 pushd /usr/share/myplc &> /dev/null
147 python plc_config.py build
148 python plc_config.py install
151 %triggerpostun -- %{name}
152 # 0 = erase, 1 = upgrade
153 if [ $1 -gt 0 ] ; then
154 for dir in /var/lib/pgsql/data /etc/planetlab ; do
155 if [ -d $dir.rpmsave -a -d $dir ] ; then
157 if tar -C $dir.rpmsave -cpf - . | \
158 tar -C $dir -xpf - ; then
166 # 0 = erase, 1 = upgrade
167 if [ $1 -eq 0 ] ; then
168 %{_sysconfdir}/init.d/plc stop
169 if [ -x /sbin/chkconfig ] ; then
170 /sbin/chkconfig plc off
171 /sbin/chkconfig --del plc
176 %defattr(-,root,root,-)
177 # Host startup script and configuration file
181 /etc/plc_sliceinitscripts/sirius
182 /etc/support-scripts/gen_aliases.py*
183 /etc/support-scripts/renew_reminder.py*
184 /etc/support-scripts/renew_reminder_logrotate
186 /usr/bin/plc-config-tty
191 /usr/bin/refresh-peer.py*
192 /usr/bin/clean-empty-dirs.py*
194 /usr/bin/check-ssl-peering.py*
198 * Wed Apr 29 2009 Marc Fiuczynski <mef@cs.princeton.edu> - MyPLC-4.3-6
199 - plc_config.py and plc-config-tty: generalized to work for more diverse
200 - MyPLC configurations.
201 - plc.d/httpd: only update httpd_conf with /data for chroot'ed MyPLC
202 - deployments and increase the memory limits in php.ini
203 - plc.d/crond: add --full option to vacuumdb
205 * Tue Apr 07 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-5
206 - avoid generating ssl certificates for disabled services among www api boot
208 * Mon Mar 30 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-4
209 - cleaned up old entries in db-config
212 * Tue Mar 24 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-3
213 - php include path tweaked for plekit includes
214 - reviewed myplc (fka native) packaging dependencies
217 * Thu Jan 29 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-2
218 - rename myplc into myplc-chroot and myplc-native into myplc
219 - new settings (shortname & hrn_root) for local peer
221 * Wed Sep 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.3-1
222 - First iteration of new data model
223 - Bunch of various fixes
225 * Tue May 20 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - MyPLC-4.2-15
226 - Removed proper ops from planetflow slice.
228 * Wed May 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-14
229 - myplc-native requires myplc-docs
230 - fixed doc build by locating locally installed DTDs at build-time
232 * Sun May 11 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-13
233 - turn myplc-docs off for now
235 * Sat May 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-12
236 - figures in doc package
238 * Fri May 09 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-11
239 - no more doc packaged outside of myplc-docs - doc/ cleaned up
240 - chroot packaging does not have docs anymore
241 - 'cvs' and 'dev' not required from myplc-native anymore
242 - cosmetic change in kml output
244 * Thu May 08 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-10
245 - defaults for *_IP conf vars now void, expect more accurate /etc/hosts
246 - gethostbyname uses python rather than perl (hope this shrinks deps)
247 - doc: reviewed myplc doc - deprecated everything related to myplc-devel
248 - doc: packaging doc in myplc-native (myplc&PLCAPI) & removed target files from svn
249 - make sync now works towards vserver-based myplc only
251 * Mon May 05 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-9
253 - added vsys 'pfmount' script to the default netflow slice attributes.
256 * Thu Apr 24 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-8
257 - plc.d/bootcd step altered for handling legacy bootcd smooth migration
258 - to new bootcd packaging
260 * Wed Apr 23 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-7
261 - changes needed for bootcd 4.2 : new, possible multiple, installation locations, and new rpm name
263 * Tue Apr 22 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-6
264 - packaging of mplc-release in myplc-native
265 - sudoers.php is new to PlanetLabConf (needs nodeconfig-4.2-4)
266 - resolv file in /etc/resolv.conf, not plc_resolv.conf
267 - improved sirius script
268 - remove the 'driver' node-network-setting that was unused, and new 'Multihome' category
269 - expires more properly set
271 * Mon Apr 07 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-4 MyPLC-4.2-5
274 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-3 MyPLC-4.2-4
275 - renew_reminder script moved to support-scripts/
276 - gen-aliases script added in support-scripts/
277 - sirius initscript moved to plc_sliceinitscripts (formerly inlined in db-config)
278 - plc-map script : no javascript for googlemap anymore, see new plc-kml script instead
279 - nodefamily-aware (creates legacy symlink /var/www/html/install-rpms/planetlab)
280 - new native slice attributes 'capabilities', 'vsys' and 'codemux'
281 - new setting 'Mom list address' for sending emails to a separate destination
282 - starts rsyslogd/syslogd as appropriate
283 - expects nodeconfig package (former PlanetLabConf/ dir from PLCWWW)
284 - convenience generation of yum.conf in resulting image based on build/mirroring
286 * Thu Feb 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-4.2-2 myplc-4.2-3
287 - refresh-peer.py removed (duplicate with PLCAPI)
288 - plc.d/ scripts cleaned up
289 - sirius initscript updated
290 - slice auto renewal fixed
292 * Fri Aug 31 2007 Marc E. Fiuczynski <mef@CS.Princeton.EDU>
295 %define module_current_branch 4.2