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}
75 # argh - ugly - we might wish to use something from build/config.%{pldistro} instead
76 %if "%{pldistro}" == "onelab"
77 Requires: dummynet_image
80 Provides: myplc = %version-%release
82 %define debug_package %{nil}
85 MyPLC is a complete PlanetLab Central (PLC) portable installation
86 contained within a chroot jail. The default installation consists of a
87 web server, an XML-RPC API server, a boot server, and a database
88 server: the core components of PLC. The installation may be customized
89 through a graphical interface. All PLC services are started up and
90 shut down through a single System V init script installed in the host
98 rm -rf $RPM_BUILD_ROOT
99 ./build-native.sh %{pldistro} $RPM_BUILD_ROOT
106 rm -rf $RPM_BUILD_ROOT
109 if [ -n "$SUDO_USER" ] ; then
110 # Allow user to delete the build directory
111 chown -h -R $SUDO_USER .
112 # Some temporary cdroot files like /var/empty/sshd and
113 # /usr/bin/sudo get created with non-readable permissions.
114 find . -not -perm +0600 -exec chmod u+rw {} \;
115 # Allow user to delete the built RPM(s)
116 [ -d %{_rpmdir}/noarch ] && chown -h -R $SUDO_USER %{_rpmdir}/noarch
120 if [ -x %{_sysconfdir}/init.d/plc ] ; then
121 %{_sysconfdir}/init.d/plc stop
124 # Old versions of myplc used to ship with a bootstrapped database and
125 # /etc/planetlab directory. Including generated files in the manifest
126 # was dangerous; if /plc/data/var/lib/pgsql/data/base/1/16676 changed
127 # names from one RPM build to another, it would be rpmsaved and thus
128 # effectively deleted. Now we do not include these files in the
129 # manifest. However, to avoid deleting these files in the process of
130 # upgrading from one of these old versions of myplc, we must back up
131 # the database and /etc/planetlab and restore them after the old
132 # version has been uninstalled in %triggerpostun (also in %post, in
133 # case we are force upgrading to the same version).
135 # This code can be removed once all myplc-0.4-1 installations have
136 # been upgraded to at least myplc-0.4-2.
138 # 0 = install, 1 = upgrade
139 if [ $1 -gt 0 ] ; then
140 for dir in /var/lib/pgsql/data /etc/planetlab ; do
141 if [ -d $dir ] ; then
142 echo "Preserving $dir"
143 mkdir -p $dir.rpmsave
144 tar -C $dir -cpf - . | \
145 tar -C $dir.rpmsave -xpf -
147 # Except for the default configuration file and DTD, which
148 # really should be considered for upgrade.
149 rm -f $dir.rpmsave/{default_config.xml,plc_config.dtd}
155 if [ -x /sbin/chkconfig ] ; then
156 /sbin/chkconfig --add plc
157 /sbin/chkconfig plc on
159 pushd /usr/share/myplc &> /dev/null
160 python plc_config.py build
161 python plc_config.py install
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 $dir.rpmsave -a -d $dir ] ; then
170 if tar -C $dir.rpmsave -cpf - . | \
171 tar -C $dir -xpf - ; then
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
189 %defattr(-,root,root,-)
190 # Host startup script and configuration file
195 /etc/plc_sliceinitscripts/sirius
196 /etc/support-scripts/gen_aliases.py*
197 /etc/support-scripts/renew_reminder.py*
199 /usr/bin/plc-config-tty
203 /usr/bin/clean-empty-dirs.py*
205 /usr/bin/check-ssl-peering.py*
209 * Fri Apr 10 2009 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - MyPLC-4.2-20
210 - * Skip SSL generation for services that aren't enabled
211 - * added --full flag to crond for vacuumdb
213 * Tue Nov 18 2008 Daniel Hokka Zakrisson <daniel@hozac.com> - MyPLC-4.2-19
214 - Add common slice attributes.
215 - Clarified 'failed to authenticate' message.
216 - Make db-config extensible.
218 * Wed Sep 03 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-18
219 - onelab distro requires the dummynet_image package with myplc-native
220 - (onelab distro does not build chroot-myplc anymore)
222 * Fri Aug 01 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - MyPLC-4.2-17
223 - Remove iptables conf_file. Now in iptables module.
224 - Arch specific download directory now in /data for chrooted myplc
225 - Vim now a dependency in myplc. :-)
227 * Fri Jul 04 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-16
228 - yum config on nodes improved -- see https://svn.planet-lab.org/ticket/342
229 - also does not create any repo under /var/www/html/install-rpms, to prevent conflicts with noderepo
231 * Tue May 20 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - MyPLC-4.2-15
232 - Removed proper ops from planetflow slice.
234 * Wed May 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-14
235 - myplc-native requires myplc-docs
236 - fixed doc build by locating locally installed DTDs at build-time
238 * Sun May 11 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-13
239 - turn myplc-docs off for now
241 * Sat May 10 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-12
242 - figures in doc package
244 * Fri May 09 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-11
245 - no more doc packaged outside of myplc-docs - doc/ cleaned up
246 - chroot packaging does not have docs anymore
247 - 'cvs' and 'dev' not required from myplc-native anymore
248 - cosmetic change in kml output
250 * Thu May 08 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-10
251 - defaults for *_IP conf vars now void, expect more accurate /etc/hosts
252 - gethostbyname uses python rather than perl (hope this shrinks deps)
253 - doc: reviewed myplc doc - deprecated everything related to myplc-devel
254 - doc: packaging doc in myplc-native (myplc&PLCAPI) & removed target files from svn
255 - make sync now works towards vserver-based myplc only
257 * Mon May 05 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-9
259 - added vsys 'pfmount' script to the default netflow slice attributes.
262 * Thu Apr 24 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-8
263 - plc.d/bootcd step altered for handling legacy bootcd smooth migration
264 - to new bootcd packaging
266 * Wed Apr 23 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-7
267 - changes needed for bootcd 4.2 : new, possible multiple, installation locations, and new rpm name
269 * Tue Apr 22 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-6
270 - packaging of mplc-release in myplc-native
271 - sudoers.php is new to PlanetLabConf (needs nodeconfig-4.2-4)
272 - resolv file in /etc/resolv.conf, not plc_resolv.conf
273 - improved sirius script
274 - remove the 'driver' node-network-setting that was unused, and new 'Multihome' category
275 - expires more properly set
277 * Mon Apr 07 2008 Stephen Soltesz <soltesz@cs.princeton.edu> - MyPLC-4.2-4 MyPLC-4.2-5
280 * Wed Mar 26 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - MyPLC-4.2-3 MyPLC-4.2-4
281 - renew_reminder script moved to support-scripts/
282 - gen-aliases script added in support-scripts/
283 - sirius initscript moved to plc_sliceinitscripts (formerly inlined in db-config)
284 - plc-map script : no javascript for googlemap anymore, see new plc-kml script instead
285 - nodefamily-aware (creates legacy symlink /var/www/html/install-rpms/planetlab)
286 - new native slice attributes 'capabilities', 'vsys' and 'codemux'
287 - new setting 'Mom list address' for sending emails to a separate destination
288 - starts rsyslogd/syslogd as appropriate
289 - expects nodeconfig package (former PlanetLabConf/ dir from PLCWWW)
290 - convenience generation of yum.conf in resulting image based on build/mirroring
292 * Thu Feb 14 2008 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - myplc-4.2-2 myplc-4.2-3
293 - refresh-peer.py removed (duplicate with PLCAPI)
294 - plc.d/ scripts cleaned up
295 - sirius initscript updated
296 - slice auto renewal fixed
298 * Fri Aug 31 2007 Marc E. Fiuczynski <mef@CS.Princeton.EDU>