X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=build.sh;h=eb0173259f58a89e9ac997627b0ff446ecb57bbc;hb=e5acac6d6e8118faab76ac73cb2b8b10d89dd086;hp=967c115a3ee76bb6caba89dd6c61be5b46f2825a;hpb=eadae019c3723576f1c650fb2b5c08e564c5cc3d;p=myplc.git diff --git a/build.sh b/build.sh index 967c115..eb01732 100755 --- a/build.sh +++ b/build.sh @@ -3,7 +3,7 @@ # 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 Core 4 environment with the appropriate development packages +# Fedora environment with the appropriate development packages # installed). # # root.img (loopback image) @@ -13,9 +13,10 @@ # data/root (root's homedir) # # Mark Huang -# Copyright (C) 2006 The Trustees of Princeton University +# Marc E. Fiuczynski +# Copyright (C) 2006-2007 The Trustees of Princeton University # -# $Id$ +# $Id:$ # . build.functions @@ -31,6 +32,7 @@ datadirs=( /var/www/html/boot /var/www/html/download /var/www/html/files +/var/www/html/sites /var/www/html/generated /var/www/html/install-rpms /var/www/html/xml @@ -39,13 +41,8 @@ datadirs=( /var/tmp /var/log ) -for datadir in "${datadirs[@]}" ; do - # If we are being re-run, it may be a symlink - if [ -h root/$datadir ] ; then - rm -f root/$datadir - mkdir -p root/$datadir - fi -done + +pl_fixdirs root "${datadirs[@]}" echo "* myplc: Installing base filesystem" mkdir -p root data @@ -57,7 +54,6 @@ install -D -m 755 plc_config.py root/tmp/plc_config.py chroot root sh -c 'cd /tmp; python plc_config.py build; python plc_config.py install' install -D -m 755 plc-config root/usr/bin/plc-config install -D -m 755 plc-config-tty root/usr/bin/plc-config-tty -install -D -m 755 api-config root/usr/bin/api-config install -D -m 755 db-config root/usr/bin/db-config install -D -m 755 dns-config root/usr/bin/dns-config @@ -100,10 +96,10 @@ chmod 644 $roothome/.profile # Move "data" directories out of the installation echo "* myplc: Moving data directories out of the installation" -move_datadirs root data "${datadirs[@]}" +pl_move_dirs root data /data "${datadirs[@]}" # Fix permissions on tmp directories -chmod 1777 data/tmp data/usr/tmp data/var/tmp +pl_fixtmp_permissions data # Remove generated bootmanager script rm -f data/var/www/html/boot/bootmanager.sh @@ -111,11 +107,11 @@ rm -f data/var/www/html/boot/bootmanager.sh # 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 ../build/groups/v3_yumgroups.xml \ +install -D -m 644 $pl_YUMGROUPSXML \ data/var/www/html/install-rpms/planetlab/yumgroups.xml # Make image out of directory echo "* myplc: Building loopback image" -make_image root root.img +pl_make_image root root.img 100000000 exit 0