From: Marc Fiuczynski Date: Mon, 10 Sep 2007 20:16:44 +0000 (+0000) Subject: build script a myplc that can be installed into a vserver/vanilla fc box X-Git-Tag: myplc-4.0-15~80 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=44769fe2ae7dc8116684294ccc6b2187d2596b8f;p=myplc.git build script a myplc that can be installed into a vserver/vanilla fc box --- diff --git a/build-native.sh b/build-native.sh new file mode 100755 index 0000000..9ea57bc --- /dev/null +++ b/build-native.sh @@ -0,0 +1,65 @@ +#!/bin/bash +# +# Builds MyPLC, either inside the MyPLC development environment in +# devel/root (if PLC_DEVEL_BOOTSTRAP is true), or in the current host +# environment (may be itself a MyPLC development environment or a +# Fedora environment with the appropriate development packages +# installed). +# +# Marc E. Fiuczynski +# Copyright (C) 2007 The Trustees of Princeton University +# +# $Id: build-native.sh,v 1.1.2.5 2007/08/31 17:46:11 mef Exp $ +# + +. build.functions + +# XXX .spec file needs to have the appropriate set of requires statements + +# Install configuration scripts +echo "* myplc-native: Installing configuration scripts" +tmpdir=$1 +mkdir -p ${tmpdir} +rm -rf ${tmpdir} +mkdir -p ${tmpdir} +install -D -m 755 plc-config ${tmpdir}/usr/bin/plc-config +install -D -m 755 plc-config-tty ${tmpdir}/usr/bin/plc-config-tty +install -D -m 755 db-config ${tmpdir}/usr/bin/db-config +install -D -m 755 dns-config ${tmpdir}/usr/bin/dns-config +echo "* myplc-native: skipping build/install of plc_config.py" + +# XXX needs to be done by %pre script in .spec file +# install -D -m 755 plc_config.py /tmp/plc_config.py +# sh -c 'cd ${tmpdir}; python plc_config.py build; python plc_config.py install' +# XXX needs to be done by %pre script in .spec file +# sh -c 'chkconfig --add plc; chkconfig plc on' + + + +# Install initscripts +echo "* myplc-native: Installing initscripts" +find plc.d | cpio -p -d -u ${tmpdir}/etc/ +install -D -m 755 guest.init ${tmpdir}/etc/init.d/plc + + +# Install web scripts +echo "* myplc: Installing web scripts" +mkdir -p ${tmpdir}/usr/bin +install -m 755 \ + $srcdir/plc/scripts/gen-sites-xml.py \ + $srcdir/plc/scripts/gen-slices-xml-05.py \ + $srcdir/plc/scripts/gen-static-content.py \ + ${tmpdir}/usr/bin/ + +# Install configuration file +echo "* myplc: Installing configuration file" +install -D -m 444 plc_config.xml ${tmpdir}/etc/planetlab/default_config.xml +install -D -m 444 plc_config.dtd ${tmpdir}/etc/planetlab/plc_config.dtd + +# Initialize node RPMs directory. The PlanetLab-Bootstrap.tar.bz2 +# tarball already contains all of the node RPMs pre-installed. Only +# updates or optional packages should be placed in this directory. +install -D -m 644 $pl_YUMGROUPSXML \ + ${tmpdir}/var/www/html/install-rpms/planetlab/yumgroups.xml + +exit 0