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}
60 Requires: bootstrapfs-%{pldistro}-%{_arch}
62 Requires: myplc-release
64 # argh - ugly - we might wish to use something from build/config.%{pldistro} instead
65 %if "%{pldistro}" == "onelab"
66 Requires: dummynet_image
69 %define debug_package %{nil}
72 MyPLC is a complete PlanetLab Central (PLC) portable installation
73 contained within a chroot jail. The default installation consists of a
74 web server, an XML-RPC API server, a boot server, and a database
75 server: the core components of PLC. The installation may be customized
76 through a graphical interface. All PLC services are started up and
77 shut down through a single System V init script installed in the host
87 rm -rf $RPM_BUILD_ROOT
88 ./build.sh %{pldistro} $RPM_BUILD_ROOT
92 rm -rf $RPM_BUILD_ROOT
95 if [ -n "$SUDO_USER" ] ; then
96 # Allow user to delete the build directory
97 chown -h -R $SUDO_USER .
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 [ -d %{_rpmdir}/noarch ] && chown -h -R $SUDO_USER %{_rpmdir}/noarch
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 $dir ] ; then
128 echo "Preserving $dir"
129 mkdir -p $dir.rpmsave
130 tar -C $dir -cpf - . | \
131 tar -C $dir.rpmsave -xpf -
133 # Except for the default configuration file and DTD, which
134 # really should be considered for upgrade.
135 rm -f $dir.rpmsave/{default_config.xml,plc_config.dtd}
141 if [ -x /sbin/chkconfig ] ; then
142 /sbin/chkconfig --add plc
143 /sbin/chkconfig plc on
145 pushd /usr/share/myplc &> /dev/null
146 python plc_config.py build
147 python plc_config.py install
150 %triggerpostun -- %{name}
151 # 0 = erase, 1 = upgrade
152 if [ $1 -gt 0 ] ; then
153 for dir in /var/lib/pgsql/data /etc/planetlab ; do
154 if [ -d $dir.rpmsave -a -d $dir ] ; then
156 if tar -C $dir.rpmsave -cpf - . | \
157 tar -C $dir -xpf - ; then
165 # 0 = erase, 1 = upgrade
166 if [ $1 -eq 0 ] ; then
167 %{_sysconfdir}/init.d/plc stop
168 if [ -x /sbin/chkconfig ] ; then
169 /sbin/chkconfig plc off
170 /sbin/chkconfig --del plc
175 %defattr(-,root,root,-)
176 # Host startup script and configuration file
180 /etc/plc_sliceinitscripts/sirius
181 /etc/support-scripts/gen_aliases.py*
182 /etc/support-scripts/renew_reminder.py*
183 /etc/support-scripts/renew_reminder_logrotate
185 /usr/bin/plc-config-tty
190 /usr/bin/refresh-peer.py*
191 /usr/bin/clean-empty-dirs.py*
193 /usr/bin/check-ssl-peering.py*
197 * Thu Jan 29 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-5.0-2
198 - rename myplc into myplc-chroot and myplc-native into myplc
199 - new settings (shortname & hrn_root) for local peer
201 * Wed Sep 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-5.0-1
202 - First iteration of new data model
203 - Bunch of various fixes
205 * Tue May 20 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - MyPLC-4.2-15
206 - Removed proper ops from planetflow slice.
208 * Wed May 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-14
209 - myplc-native requires myplc-docs
210 - fixed doc build by locating locally installed DTDs at build-time
212 * Sun May 11 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-13
213 - turn myplc-docs off for now
215 * Sat May 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-12
216 - figures in doc package
218 * Fri May 09 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-11
219 - no more doc packaged outside of myplc-docs - doc/ cleaned up
220 - chroot packaging does not have docs anymore
221 - 'cvs' and 'dev' not required from myplc-native anymore
222 - cosmetic change in kml output
224 * Thu May 08 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-10
225 - defaults for *_IP conf vars now void, expect more accurate /etc/hosts
226 - gethostbyname uses python rather than perl (hope this shrinks deps)
227 - doc: reviewed myplc doc - deprecated everything related to myplc-devel
228 - doc: packaging doc in myplc-native (myplc&PLCAPI) & removed target files from svn
229 - make sync now works towards vserver-based myplc only
231 * Mon May 05 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-9
233 - added vsys 'pfmount' script to the default netflow slice attributes.
236 * Thu Apr 24 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-8
237 - plc.d/bootcd step altered for handling legacy bootcd smooth migration
238 - to new bootcd packaging
240 * Wed Apr 23 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-7
241 - changes needed for bootcd 4.2 : new, possible multiple, installation locations, and new rpm name
243 * Tue Apr 22 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-6
244 - packaging of mplc-release in myplc-native
245 - sudoers.php is new to PlanetLabConf (needs nodeconfig-4.2-4)
246 - resolv file in /etc/resolv.conf, not plc_resolv.conf
247 - improved sirius script
248 - remove the 'driver' node-network-setting that was unused, and new 'Multihome' category
249 - expires more properly set
251 * Mon Apr 07 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-4 MyPLC-4.2-5
254 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-3 MyPLC-4.2-4
255 - renew_reminder script moved to support-scripts/
256 - gen-aliases script added in support-scripts/
257 - sirius initscript moved to plc_sliceinitscripts (formerly inlined in db-config)
258 - plc-map script : no javascript for googlemap anymore, see new plc-kml script instead
259 - nodefamily-aware (creates legacy symlink /var/www/html/install-rpms/planetlab)
260 - new native slice attributes 'capabilities', 'vsys' and 'codemux'
261 - new setting 'Mom list address' for sending emails to a separate destination
262 - starts rsyslogd/syslogd as appropriate
263 - expects nodeconfig package (former PlanetLabConf/ dir from PLCWWW)
264 - convenience generation of yum.conf in resulting image based on build/mirroring
266 * Thu Feb 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-4.2-2 myplc-4.2-3
267 - refresh-peer.py removed (duplicate with PLCAPI)
268 - plc.d/ scripts cleaned up
269 - sirius initscript updated
270 - slice auto renewal fixed
272 * Fri Aug 31 2007 Marc E. Fiuczynski <mef@CS.Princeton.EDU>
275 %define module_current_branch 4.2