6 %define name myplc-native
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)
38 Requires: python-pycurl
39 Requires: python-psycopg2
45 Requires: python-devel
52 Requires: python >= 2.4
54 Requires: postgresql-python
56 Requires: postgresql-server
59 Requires: xmlsec1-openssl
62 Requires: bootcd-%{pldistro}-%{_arch}
72 Requires: bootstrapfs-%{pldistro}-%{_arch}
77 %define debug_package %{nil}
80 MyPLC is a complete PlanetLab Central (PLC) portable installation
81 contained within a chroot jail. The default installation consists of a
82 web server, an XML-RPC API server, a boot server, and a database
83 server: the core components of PLC. The installation may be customized
84 through a graphical interface. All PLC services are started up and
85 shut down through a single System V init script installed in the host
93 rm -rf $RPM_BUILD_ROOT
94 ./build-native.sh %{pldistro} $RPM_BUILD_ROOT
101 rm -rf $RPM_BUILD_ROOT
104 if [ -n "$SUDO_USER" ] ; then
105 # Allow user to delete the build directory
106 chown -h -R $SUDO_USER .
107 # Some temporary cdroot files like /var/empty/sshd and
108 # /usr/bin/sudo get created with non-readable permissions.
109 find . -not -perm +0600 -exec chmod u+rw {} \;
110 # Allow user to delete the built RPM(s)
111 [ -d %{_rpmdir}/%{_arch} ] && chown -h -R $SUDO_USER %{_rpmdir}/%{_arch}
115 if [ -x %{_sysconfdir}/init.d/plc ] ; then
116 %{_sysconfdir}/init.d/plc stop
119 # Old versions of myplc used to ship with a bootstrapped database and
120 # /etc/planetlab directory. Including generated files in the manifest
121 # was dangerous; if /plc/data/var/lib/pgsql/data/base/1/16676 changed
122 # names from one RPM build to another, it would be rpmsaved and thus
123 # effectively deleted. Now we do not include these files in the
124 # manifest. However, to avoid deleting these files in the process of
125 # upgrading from one of these old versions of myplc, we must back up
126 # the database and /etc/planetlab and restore them after the old
127 # version has been uninstalled in %triggerpostun (also in %post, in
128 # case we are force upgrading to the same version).
130 # This code can be removed once all myplc-0.4-1 installations have
131 # been upgraded to at least myplc-0.4-2.
133 # 0 = install, 1 = upgrade
134 if [ $1 -gt 0 ] ; then
135 for dir in /var/lib/pgsql/data /etc/planetlab ; do
136 if [ -d $dir ] ; then
137 echo "Preserving $dir"
138 mkdir -p $dir.rpmsave
139 tar -C $dir -cpf - . | \
140 tar -C $dir.rpmsave -xpf -
142 # Except for the default configuration file and DTD, which
143 # really should be considered for upgrade.
144 rm -f $dir.rpmsave/{default_config.xml,plc_config.dtd}
150 if [ -x /sbin/chkconfig ] ; then
151 /sbin/chkconfig --add plc
152 /sbin/chkconfig plc on
154 pushd /usr/share/myplc &> /dev/null
155 python plc_config.py build
156 python plc_config.py install
159 %triggerpostun -- %{name}
160 # 0 = erase, 1 = upgrade
161 if [ $1 -gt 0 ] ; then
162 for dir in /var/lib/pgsql/data /etc/planetlab ; do
163 if [ -d $dir.rpmsave -a -d $dir ] ; then
165 if tar -C $dir.rpmsave -cpf - . | \
166 tar -C $dir -xpf - ; then
174 # 0 = erase, 1 = upgrade
175 if [ $1 -eq 0 ] ; then
176 %{_sysconfdir}/init.d/plc stop
177 if [ -x /sbin/chkconfig ] ; then
178 /sbin/chkconfig plc off
179 /sbin/chkconfig --del plc
184 %defattr(-,root,root,-)
185 # Host startup script and configuration file
190 /etc/plc_sliceinitscripts/sirius
191 /etc/support-scripts/gen_aliases.py*
192 /etc/support-scripts/renew_reminder.py*
194 /usr/bin/plc-config-tty
198 /usr/bin/clean-empty-dirs.py*
200 /usr/bin/check-ssl-peering.py*
204 * Fri Aug 01 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - MyPLC-4.2-17
205 - Remove iptables conf_file. Now in iptables module.
206 - Arch specific download directory now in /data for chrooted myplc
207 - Vim now a dependency in myplc. :-)
209 * Fri Jul 04 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-16
210 - yum config on nodes improved -- see https://svn.planet-lab.org/ticket/342
211 - also does not create any repo under /var/www/html/install-rpms, to prevent conflicts with noderepo
213 * Tue May 20 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - MyPLC-4.2-15
214 - Removed proper ops from planetflow slice.
216 * Wed May 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-14
217 - myplc-native requires myplc-docs
218 - fixed doc build by locating locally installed DTDs at build-time
220 * Sun May 11 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-13
221 - turn myplc-docs off for now
223 * Sat May 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-12
224 - figures in doc package
226 * Fri May 09 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-11
227 - no more doc packaged outside of myplc-docs - doc/ cleaned up
228 - chroot packaging does not have docs anymore
229 - 'cvs' and 'dev' not required from myplc-native anymore
230 - cosmetic change in kml output
232 * Thu May 08 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-10
233 - defaults for *_IP conf vars now void, expect more accurate /etc/hosts
234 - gethostbyname uses python rather than perl (hope this shrinks deps)
235 - doc: reviewed myplc doc - deprecated everything related to myplc-devel
236 - doc: packaging doc in myplc-native (myplc&PLCAPI) & removed target files from svn
237 - make sync now works towards vserver-based myplc only
239 * Mon May 05 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-9
241 - added vsys 'pfmount' script to the default netflow slice attributes.
244 * Thu Apr 24 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-8
245 - plc.d/bootcd step altered for handling legacy bootcd smooth migration
246 - to new bootcd packaging
248 * Wed Apr 23 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-7
249 - changes needed for bootcd 4.2 : new, possible multiple, installation locations, and new rpm name
251 * Tue Apr 22 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-6
252 - packaging of mplc-release in myplc-native
253 - sudoers.php is new to PlanetLabConf (needs nodeconfig-4.2-4)
254 - resolv file in /etc/resolv.conf, not plc_resolv.conf
255 - improved sirius script
256 - remove the 'driver' node-network-setting that was unused, and new 'Multihome' category
257 - expires more properly set
259 * Mon Apr 07 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-4 MyPLC-4.2-5
262 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-3 MyPLC-4.2-4
263 - renew_reminder script moved to support-scripts/
264 - gen-aliases script added in support-scripts/
265 - sirius initscript moved to plc_sliceinitscripts (formerly inlined in db-config)
266 - plc-map script : no javascript for googlemap anymore, see new plc-kml script instead
267 - nodefamily-aware (creates legacy symlink /var/www/html/install-rpms/planetlab)
268 - new native slice attributes 'capabilities', 'vsys' and 'codemux'
269 - new setting 'Mom list address' for sending emails to a separate destination
270 - starts rsyslogd/syslogd as appropriate
271 - expects nodeconfig package (former PlanetLabConf/ dir from PLCWWW)
272 - convenience generation of yum.conf in resulting image based on build/mirroring
274 * Thu Feb 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-4.2-2 myplc-4.2-3
275 - refresh-peer.py removed (duplicate with PLCAPI)
276 - plc.d/ scripts cleaned up
277 - sirius initscript updated
278 - slice auto renewal fixed
280 * Fri Aug 31 2007 Marc E. Fiuczynski <mef@CS.Princeton.EDU>