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 * Thu Jan 29 2009 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-5.0-2
199 - rename myplc into myplc-chroot and myplc-native into myplc
200 - new settings (shortname & hrn_root) for local peer
202 * Wed Sep 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-5.0-1
203 - First iteration of new data model
204 - Bunch of various fixes
206 * Tue May 20 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - MyPLC-4.2-15
207 - Removed proper ops from planetflow slice.
209 * Wed May 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-14
210 - myplc-native requires myplc-docs
211 - fixed doc build by locating locally installed DTDs at build-time
213 * Sun May 11 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-13
214 - turn myplc-docs off for now
216 * Sat May 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-12
217 - figures in doc package
219 * Fri May 09 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-11
220 - no more doc packaged outside of myplc-docs - doc/ cleaned up
221 - chroot packaging does not have docs anymore
222 - 'cvs' and 'dev' not required from myplc-native anymore
223 - cosmetic change in kml output
225 * Thu May 08 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-10
226 - defaults for *_IP conf vars now void, expect more accurate /etc/hosts
227 - gethostbyname uses python rather than perl (hope this shrinks deps)
228 - doc: reviewed myplc doc - deprecated everything related to myplc-devel
229 - doc: packaging doc in myplc-native (myplc&PLCAPI) & removed target files from svn
230 - make sync now works towards vserver-based myplc only
232 * Mon May 05 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-9
234 - added vsys 'pfmount' script to the default netflow slice attributes.
237 * Thu Apr 24 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-8
238 - plc.d/bootcd step altered for handling legacy bootcd smooth migration
239 - to new bootcd packaging
241 * Wed Apr 23 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-7
242 - changes needed for bootcd 4.2 : new, possible multiple, installation locations, and new rpm name
244 * Tue Apr 22 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-6
245 - packaging of mplc-release in myplc-native
246 - sudoers.php is new to PlanetLabConf (needs nodeconfig-4.2-4)
247 - resolv file in /etc/resolv.conf, not plc_resolv.conf
248 - improved sirius script
249 - remove the 'driver' node-network-setting that was unused, and new 'Multihome' category
250 - expires more properly set
252 * Mon Apr 07 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-4 MyPLC-4.2-5
255 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-3 MyPLC-4.2-4
256 - renew_reminder script moved to support-scripts/
257 - gen-aliases script added in support-scripts/
258 - sirius initscript moved to plc_sliceinitscripts (formerly inlined in db-config)
259 - plc-map script : no javascript for googlemap anymore, see new plc-kml script instead
260 - nodefamily-aware (creates legacy symlink /var/www/html/install-rpms/planetlab)
261 - new native slice attributes 'capabilities', 'vsys' and 'codemux'
262 - new setting 'Mom list address' for sending emails to a separate destination
263 - starts rsyslogd/syslogd as appropriate
264 - expects nodeconfig package (former PlanetLabConf/ dir from PLCWWW)
265 - convenience generation of yum.conf in resulting image based on build/mirroring
267 * Thu Feb 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-4.2-2 myplc-4.2-3
268 - refresh-peer.py removed (duplicate with PLCAPI)
269 - plc.d/ scripts cleaned up
270 - sirius initscript updated
271 - slice auto renewal fixed
273 * Fri Aug 31 2007 Marc E. Fiuczynski <mef@CS.Princeton.EDU>
276 %define module_current_branch 4.2